@kashi-ui/css 0.10.0 → 0.12.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,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,169 @@
1
+ /* نمودارها (BarChart، LineChart) — طبق روش dataviz: نشانه‌های باریک، شبکهٔ کم‌رنگ، رنگ دسته‌ای با ترتیب ثابت
2
+ * پالت: چهار رنگ اول پالت مرجع، اعتبارسنجی‌شده روی سطح کاشی در هر دو تم (CVD ΔE ≥ ۸)
3
+ * متغیرها: --k-chart-1..4 --k-chart-height
4
+ */
5
+ :root, [data-theme="dark"] {
6
+ --k-chart-1: #3987e5;
7
+ --k-chart-2: #d95926;
8
+ --k-chart-3: #199e70;
9
+ --k-chart-4: #c98500;
10
+ }
11
+ [data-theme="light"] {
12
+ --k-chart-1: #2a78d6;
13
+ --k-chart-2: #eb6834;
14
+ --k-chart-3: #1baf7a;
15
+ --k-chart-4: #eda100;
16
+ }
17
+ .k-chart { position: relative; display: grid; gap: var(--k-space-3); font-size: var(--k-text-xs); }
18
+ .k-chart__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--k-space-2) var(--k-space-4); }
19
+ .k-chart__title { margin: 0; color: var(--k-text-primary); font-size: var(--k-text-sm); font-weight: var(--k-weight-semibold); }
20
+ .k-chart__legend { display: flex; flex-wrap: wrap; gap: var(--k-space-1) var(--k-space-4); margin: 0; padding: 0; list-style: none; color: var(--k-text-secondary); }
21
+ .k-chart__legend li { display: inline-flex; align-items: center; gap: var(--k-space-1_5); }
22
+ .k-chart__key { inline-size: 0.875rem; block-size: 2px; border-radius: 1px; background: var(--_c); }
23
+ .k-chart__plot { position: relative; block-size: var(--k-chart-height, 14rem); }
24
+ .k-chart__svg { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; overflow: visible; }
25
+ .k-chart__grid line { stroke: var(--k-border-secondary); stroke-width: 1; shape-rendering: crispEdges; }
26
+ .k-chart__tick { fill: var(--k-text-tertiary); font-size: 11px; }
27
+ .k-chart__line { fill: none; stroke: var(--_c); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
28
+ .k-chart__area { stroke: none; }
29
+ .k-chart__dot { fill: var(--_c); stroke: var(--k-bg-elevated); stroke-width: 2; }
30
+ .k-chart__end { fill: var(--k-text-secondary); font-size: 11px; font-weight: var(--k-weight-medium); }
31
+ .k-chart__cross { stroke: var(--k-border-primary); stroke-width: 1; }
32
+ .k-chart__hit { fill: transparent; cursor: crosshair; outline: 0; }
33
+ .k-chart__plot:focus-visible { outline: 2px solid transparent; border-radius: var(--k-radius-md); box-shadow: var(--k-ring-brand); }
34
+
35
+ /* ستون‌ها با HTML تا در RTL و هر عرضی درست بچینند */
36
+ .k-bars { position: absolute; inset: 0 0 1.5rem; display: flex; align-items: flex-end; gap: 2px; padding-inline: var(--k-space-1); }
37
+ .k-bars__grid { position: absolute; inset: 0 0 1.5rem; display: flex; flex-direction: column-reverse; justify-content: space-between; pointer-events: none; }
38
+ .k-bars__grid span { position: relative; border-block-start: 1px solid var(--k-border-secondary); }
39
+ .k-bars__grid span::after { content: attr(data-v); position: absolute; inset-block-start: -0.55rem; inset-inline-end: 100%; padding-inline-end: var(--k-space-1_5); color: var(--k-text-tertiary); white-space: nowrap; }
40
+ .k-bars__col { position: relative; display: flex; flex: 1; flex-direction: column; justify-content: flex-end; align-items: center; block-size: 100%; outline: 0; }
41
+ .k-bars__bar { inline-size: min(100%, 24px); min-block-size: 2px; border-radius: 4px 4px 0 0; background: var(--_c, var(--k-bg-brand)); transition: opacity var(--k-duration-fast); }
42
+ .k-bars:has(.k-bars__col:is(:hover, :focus-visible)) .k-bars__col:not(:hover, :focus-visible) .k-bars__bar { opacity: 0.45; }
43
+ .k-bars__col:focus-visible .k-bars__bar { box-shadow: var(--k-ring-brand); }
44
+ .k-bars__label { position: absolute; inset-block-start: calc(100% + 0.4rem); color: var(--k-text-tertiary); white-space: nowrap; }
45
+ .k-bars__value { margin-block-end: var(--k-space-1); color: var(--k-text-secondary); font-weight: var(--k-weight-semibold); white-space: nowrap; }
46
+ .k-chart--bar .k-chart__plot { margin-inline-start: 2.5rem; }
47
+
48
+ .k-chart__tip {
49
+ position: absolute;
50
+ z-index: 2;
51
+ display: grid;
52
+ gap: 2px;
53
+ min-inline-size: 8rem;
54
+ padding: var(--k-space-2) var(--k-space-3);
55
+ border: 1px solid var(--k-border-secondary);
56
+ border-radius: var(--k-radius-md);
57
+ background: var(--k-bg-elevated);
58
+ box-shadow: var(--k-shadow-lg);
59
+ color: var(--k-text-secondary);
60
+ pointer-events: none;
61
+ white-space: nowrap;
62
+ /* با left جای‌گذاری می‌شود، پس در هر جهتی ‎-50%‎ وسط‌چین می‌کند */
63
+ translate: -50% calc(-100% - 0.625rem);
64
+ font-size: var(--k-text-xs);
65
+ animation: k-tip-in 140ms var(--k-ease-standard);
66
+ }
67
+ /* زبانهٔ کوچک زیر راهنما */
68
+ .k-chart__tip::after {
69
+ content: "";
70
+ position: absolute;
71
+ inset-block-start: 100%;
72
+ left: 50%;
73
+ inline-size: 0.625rem;
74
+ block-size: 0.625rem;
75
+ margin-block-start: -0.3rem;
76
+ border: 1px solid var(--k-border-secondary);
77
+ border-block-start: 0;
78
+ border-inline-start: 0;
79
+ background: var(--k-bg-elevated);
80
+ translate: -50% 0;
81
+ rotate: 45deg;
82
+ }
83
+ @keyframes k-tip-in { from { opacity: 0; translate: -50% calc(-100% - 0.25rem); } }
84
+ .k-chart__tip-title { padding-block-end: 2px; font-weight: var(--k-weight-medium); }
85
+ .k-chart__tip-row strong { font-size: var(--k-text-sm); }
86
+ .k-chart__tip-title { color: var(--k-text-tertiary); }
87
+ .k-chart__tip-row { display: flex; align-items: center; justify-content: space-between; gap: var(--k-space-4); }
88
+ .k-chart__tip-row strong { color: var(--k-text-primary); font-weight: var(--k-weight-semibold); }
89
+ .k-chart__tip-row span { display: inline-flex; align-items: center; gap: var(--k-space-1_5); }
90
+ .k-chart__tip-row i { inline-size: 0.5rem; block-size: 0.5rem; border-radius: 50%; background: var(--_c); }
91
+ @media (forced-colors: active) {
92
+ .k-chart__line { stroke: CanvasText; }
93
+ .k-bars__bar { background: CanvasText; }
94
+ }
95
+
96
+ /* ستون انباشته: فاصلهٔ ۲ پیکسلی بین بخش‌ها، گوشهٔ گرد فقط بالای ستون */
97
+ .k-bars__stack { display: flex; flex-direction: column-reverse; gap: 2px; inline-size: min(100%, 24px); min-block-size: 2px; border-radius: 4px 4px 0 0; overflow: hidden; transition: opacity var(--k-duration-fast); }
98
+ .k-bars__seg { flex-basis: 0; min-block-size: 0; background: var(--_c); }
99
+ .k-bars:has(.k-bars__col:is(:hover, :focus-visible)) .k-bars__col:not(:hover, :focus-visible) .k-bars__stack { opacity: 0.45; }
100
+ .k-chart__key--box { inline-size: 0.625rem; block-size: 0.625rem; border-radius: 2px; }
101
+
102
+ /* فهرست میله‌ای افقی */
103
+ .k-barlist { display: grid; gap: var(--k-space-1_5); margin: 0; padding: 0; list-style: none; font-size: var(--k-text-sm); }
104
+ .k-barlist__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--k-space-4); }
105
+ .k-barlist__track { position: relative; display: flex; align-items: center; min-block-size: 2rem; }
106
+ .k-barlist__fill { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: var(--k-radius-sm); background: color-mix(in srgb, var(--k-bg-brand) 22%, transparent); }
107
+ .k-barlist__label { position: relative; padding-inline: var(--k-space-2_5, 0.625rem); color: var(--k-text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
108
+ a.k-barlist__label:hover { text-decoration: underline; }
109
+ a.k-barlist__label:focus-visible { outline: 2px solid transparent; border-radius: var(--k-radius-sm); box-shadow: var(--k-ring-brand); }
110
+ .k-barlist__value { color: var(--k-text-secondary); font-weight: var(--k-weight-semibold); }
111
+
112
+ /* سهم از کل */
113
+ .k-proportion { display: flex; gap: 2px; block-size: 0.75rem; border-radius: var(--k-radius-full); overflow: hidden; }
114
+ .k-proportion__seg { flex-basis: 0; min-inline-size: 2px; background: var(--_c); }
115
+ .k-proportion__legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: var(--k-space-2) var(--k-space-4); margin: var(--k-space-1) 0 0; padding: 0; list-style: none; color: var(--k-text-secondary); font-size: var(--k-text-sm); }
116
+ .k-proportion__legend li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--k-space-1_5) var(--k-space-2); }
117
+ .k-proportion__legend strong { color: var(--k-text-primary); font-weight: var(--k-weight-semibold); }
118
+ .k-proportion__abs { grid-column: 2 / -1; margin-block-start: -0.25rem; color: var(--k-text-tertiary); font-size: var(--k-text-xs); }
119
+
120
+ .k-sparkline { display: block; inline-size: 100%; block-size: 2rem; overflow: visible; }
121
+ /* زمان در جهت خواندن، هماهنگ با LineChart */
122
+ [dir="rtl"] .k-sparkline { scale: -1 1; }
123
+ @media (forced-colors: active) {
124
+ .k-proportion__seg, .k-bars__seg, .k-barlist__fill { background: CanvasText; forced-color-adjust: none; }
125
+ }
126
+
127
+ /* ───── حرکت و برجسته‌سازی ───── */
128
+ .k-bars__col[data-active] .k-bars__label { color: var(--k-text-primary); }
129
+ .k-barlist__row { transition: opacity var(--k-duration-fast); }
130
+ .k-barlist:has(.k-barlist__row[data-active]) .k-barlist__row:not([data-active]) { opacity: 0.5; }
131
+ .k-barlist__row[data-active] .k-barlist__fill { background: color-mix(in srgb, var(--k-bg-brand) 38%, transparent); }
132
+ .k-barlist__share { margin-inline-start: var(--k-space-1); color: var(--k-text-tertiary); font-weight: var(--k-weight-regular); font-size: var(--k-text-xs); }
133
+ .k-proportion__wrap { position: relative; }
134
+ .k-proportion__seg { transition: opacity var(--k-duration-fast); cursor: default; }
135
+ .k-proportion:has([data-active]) .k-proportion__seg:not([data-active]) { opacity: 0.35; }
136
+ .k-proportion { block-size: 0.875rem; }
137
+ .k-heatmap__cell[data-active] { outline: 2px solid var(--k-text-primary); outline-offset: 1px; }
138
+ .k-chart__plot .k-chart__dot { transition: r var(--k-duration-fast); }
139
+
140
+ @media (prefers-reduced-motion: no-preference) {
141
+ .k-bars__bar, .k-bars__stack { transform-origin: 50% 100%; animation: k-grow 0.7s var(--k-ease-standard) both; animation-delay: var(--_d, 0ms); }
142
+ .k-barlist__fill { transform-origin: 100% 50%; animation: k-grow-x 0.8s var(--k-ease-standard) both; animation-delay: var(--_d, 0ms); }
143
+ [dir="ltr"] .k-barlist__fill { transform-origin: 0 50%; }
144
+ .k-proportion__seg { animation: k-fade 0.6s var(--k-ease-standard) both; }
145
+ .k-chart__line { stroke-dasharray: 1; animation: k-draw 1.2s var(--k-ease-standard) both; }
146
+ .k-chart__area { animation: k-fade 1s 0.4s both; }
147
+ }
148
+ @keyframes k-grow { from { scale: 1 0; } }
149
+ @keyframes k-grow-x { from { scale: 0 1; } }
150
+ @keyframes k-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
151
+ @keyframes k-fade { from { opacity: 0; } }
152
+
153
+ /* نمودار دایره‌ای و دونات */
154
+ .k-pie__body { display: flex; flex-wrap: wrap; align-items: center; gap: var(--k-space-6); }
155
+ .k-pie__plot { position: relative; flex-shrink: 0; }
156
+ .k-pie__svg { inline-size: 100%; block-size: 100%; overflow: visible; }
157
+ .k-pie__slice { pointer-events: stroke; cursor: default; transition: opacity var(--k-duration-fast), stroke-width var(--k-duration-normal) var(--k-ease-standard); }
158
+ .k-pie__svg:has([data-active]) .k-pie__slice:not([data-active]) { opacity: 0.35; }
159
+ .k-pie__center { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 2px; pointer-events: none; text-align: center; }
160
+ .k-pie__center strong { color: var(--k-text-primary); font-size: var(--k-text-xl); font-weight: var(--k-weight-bold); line-height: 1.2; }
161
+ .k-pie__center span { max-inline-size: 6rem; color: var(--k-text-tertiary); font-size: var(--k-text-xs); }
162
+ .k-pie__legend { display: grid; flex: 1 1 12rem; gap: var(--k-space-1); margin: 0; padding: 0; list-style: none; font-size: var(--k-text-sm); }
163
+ .k-pie__legend li { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: var(--k-space-2) var(--k-space-3); padding: var(--k-space-1_5) var(--k-space-2); border-radius: var(--k-radius-md); color: var(--k-text-secondary); transition: background-color var(--k-duration-fast); }
164
+ .k-pie__legend li[data-active] { background: var(--k-bg-hover); color: var(--k-text-primary); }
165
+ .k-pie__legend strong { color: var(--k-text-primary); font-weight: var(--k-weight-semibold); }
166
+ .k-pie__abs { min-inline-size: 4.5rem; color: var(--k-text-tertiary); font-size: var(--k-text-xs); text-align: end; }
167
+ @media (prefers-reduced-motion: no-preference) {
168
+ .k-pie__slice { animation: k-fade 0.6s var(--k-ease-standard) both; animation-delay: var(--_d, 0ms); }
169
+ }
@@ -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,22 @@
1
+ /* نقشهٔ فعالیت سالانه با ماه‌های شمسی — طیف تک‌رنگ برند از کم‌رنگ به پررنگ */
2
+ .k-heatmap { --_cell: var(--k-heatmap-cell, 0.75rem); position: relative; display: grid; gap: var(--k-space-2); font-size: var(--k-text-xs); }
3
+ .k-heatmap__scroll { overflow-x: auto; padding-block-end: var(--k-space-1); scrollbar-width: thin; }
4
+ .k-heatmap__months { display: grid; grid-auto-flow: column; grid-auto-columns: calc(var(--_cell) + 3px); margin-inline-start: 1.75rem; color: var(--k-text-tertiary); }
5
+ .k-heatmap__months span { white-space: nowrap; }
6
+ .k-heatmap__body { display: flex; gap: var(--k-space-1_5); }
7
+ .k-heatmap__days { display: grid; grid-template-rows: repeat(7, var(--_cell)); gap: 3px; inline-size: 1.25rem; color: var(--k-text-tertiary); line-height: var(--_cell); }
8
+ .k-heatmap__grid { display: grid; grid-template-rows: repeat(7, var(--_cell)); grid-auto-flow: column; grid-auto-columns: var(--_cell); gap: 3px; }
9
+ .k-heatmap__cell { border-radius: 2px; background: var(--k-bg-tertiary); }
10
+ .k-heatmap__cell[data-l="1"] { background: color-mix(in srgb, var(--k-bg-brand) 30%, var(--k-bg-tertiary)); }
11
+ .k-heatmap__cell[data-l="2"] { background: color-mix(in srgb, var(--k-bg-brand) 55%, var(--k-bg-tertiary)); }
12
+ .k-heatmap__cell[data-l="3"] { background: color-mix(in srgb, var(--k-bg-brand) 80%, var(--k-bg-tertiary)); }
13
+ .k-heatmap__cell[data-l="4"] { background: var(--k-bg-brand); }
14
+ .k-heatmap__cell[data-empty] { background: transparent; }
15
+ .k-heatmap__cell:hover { outline: 1px solid var(--k-text-secondary); outline-offset: 1px; }
16
+ .k-heatmap__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--k-space-2); color: var(--k-text-tertiary); }
17
+ .k-heatmap__scale { display: inline-flex; align-items: center; gap: 3px; }
18
+ .k-heatmap__scale .k-heatmap__cell { inline-size: var(--_cell); block-size: var(--_cell); }
19
+ @media (forced-colors: active) {
20
+ .k-heatmap__cell { border: 1px solid CanvasText; }
21
+ .k-heatmap__cell[data-l="4"], .k-heatmap__cell[data-l="3"] { background: CanvasText; forced-color-adjust: none; }
22
+ }
@@ -0,0 +1,25 @@
1
+ /* ویرایش درجا: متن معمولی که با کلیک یا Enter به فیلد تبدیل می‌شود */
2
+ .k-inline-edit { display: inline-flex; align-items: center; gap: var(--k-space-1); max-inline-size: 100%; }
3
+ .k-inline-edit__view {
4
+ display: inline-flex;
5
+ align-items: center;
6
+ gap: var(--k-space-1_5);
7
+ min-inline-size: 4rem;
8
+ margin-inline: calc(var(--k-space-2) * -1);
9
+ padding: var(--k-space-1) var(--k-space-2);
10
+ border: 0;
11
+ border-radius: var(--k-radius-md);
12
+ background: none;
13
+ color: inherit;
14
+ font: inherit;
15
+ text-align: start;
16
+ cursor: text;
17
+ transition: background-color var(--k-duration-fast);
18
+ }
19
+ .k-inline-edit__view:hover { background: var(--k-bg-hover); }
20
+ .k-inline-edit__view:focus-visible { outline: 2px solid transparent; box-shadow: var(--k-ring-brand); }
21
+ .k-inline-edit__view svg { inline-size: 1rem; block-size: 1rem; color: var(--k-text-quaternary); opacity: 0; transition: opacity var(--k-duration-fast); }
22
+ .k-inline-edit__view:is(:hover, :focus-visible) svg { opacity: 1; }
23
+ .k-inline-edit__placeholder { color: var(--k-text-tertiary); }
24
+ .k-inline-edit .k-input { --_h: 2.25rem; min-inline-size: 12rem; }
25
+ .k-inline-edit__actions { display: inline-flex; gap: 2px; }
@@ -54,3 +54,10 @@
54
54
  .k-menu { border-color: CanvasText; }
55
55
  .k-menu__item:focus { outline: 2px solid Highlight; }
56
56
  }
57
+
58
+ /* منوی راست‌کلیک: جای منو از مختصات نشانگر */
59
+ .k-context-area { position: relative; }
60
+ .k-menu--context { position: fixed; inset: auto; inset-block-start: var(--_y); inset-inline-start: auto; left: var(--_x); }
61
+ /* سبک پیش‌فرض مرورگر برای popover را خنثی می‌کند */
62
+ .k-menu--context[popover] { margin: 0; padding: var(--k-space-1_5); border: 1px solid var(--k-border-secondary); color: inherit; overflow: visible; }
63
+ .k-menu--context:popover-open { position: fixed; inset: auto; top: var(--_y); left: var(--_x); }
@@ -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,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
@@ -781,6 +781,18 @@ a.k-breadcrumb__link:hover, button.k-breadcrumb__link:hover { background: var(--
781
781
  .k-breadcrumb__link[aria-current="page"] { outline: 1px solid CanvasText; }
782
782
  }
783
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
+
784
796
  /* دکمه — به سبک Untitled UI: سایهٔ اسکئومورفیک و حلقهٔ فوکوس نرم
785
797
  * <button class="k-btn k-btn--primary k-btn--md">ثبت</button>
786
798
  * گونه‌ها: primary | secondary | tertiary | link | danger | danger-secondary
@@ -1249,6 +1261,176 @@ a.k-btn[aria-disabled="true"]:not([aria-busy="true"]) {
1249
1261
  .k-card--interactive:has(:focus-visible) { outline: 2px solid Highlight; }
1250
1262
  }
1251
1263
 
1264
+ /* نمودارها (BarChart، LineChart) — طبق روش dataviz: نشانه‌های باریک، شبکهٔ کم‌رنگ، رنگ دسته‌ای با ترتیب ثابت
1265
+ * پالت: چهار رنگ اول پالت مرجع، اعتبارسنجی‌شده روی سطح کاشی در هر دو تم (CVD ΔE ≥ ۸)
1266
+ * متغیرها: --k-chart-1..4 --k-chart-height
1267
+ */
1268
+ :root, [data-theme="dark"] {
1269
+ --k-chart-1: #3987e5;
1270
+ --k-chart-2: #d95926;
1271
+ --k-chart-3: #199e70;
1272
+ --k-chart-4: #c98500;
1273
+ }
1274
+ [data-theme="light"] {
1275
+ --k-chart-1: #2a78d6;
1276
+ --k-chart-2: #eb6834;
1277
+ --k-chart-3: #1baf7a;
1278
+ --k-chart-4: #eda100;
1279
+ }
1280
+ .k-chart { position: relative; display: grid; gap: var(--k-space-3); font-size: var(--k-text-xs); }
1281
+ .k-chart__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--k-space-2) var(--k-space-4); }
1282
+ .k-chart__title { margin: 0; color: var(--k-text-primary); font-size: var(--k-text-sm); font-weight: var(--k-weight-semibold); }
1283
+ .k-chart__legend { display: flex; flex-wrap: wrap; gap: var(--k-space-1) var(--k-space-4); margin: 0; padding: 0; list-style: none; color: var(--k-text-secondary); }
1284
+ .k-chart__legend li { display: inline-flex; align-items: center; gap: var(--k-space-1_5); }
1285
+ .k-chart__key { inline-size: 0.875rem; block-size: 2px; border-radius: 1px; background: var(--_c); }
1286
+ .k-chart__plot { position: relative; block-size: var(--k-chart-height, 14rem); }
1287
+ .k-chart__svg { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; overflow: visible; }
1288
+ .k-chart__grid line { stroke: var(--k-border-secondary); stroke-width: 1; shape-rendering: crispEdges; }
1289
+ .k-chart__tick { fill: var(--k-text-tertiary); font-size: 11px; }
1290
+ .k-chart__line { fill: none; stroke: var(--_c); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
1291
+ .k-chart__area { stroke: none; }
1292
+ .k-chart__dot { fill: var(--_c); stroke: var(--k-bg-elevated); stroke-width: 2; }
1293
+ .k-chart__end { fill: var(--k-text-secondary); font-size: 11px; font-weight: var(--k-weight-medium); }
1294
+ .k-chart__cross { stroke: var(--k-border-primary); stroke-width: 1; }
1295
+ .k-chart__hit { fill: transparent; cursor: crosshair; outline: 0; }
1296
+ .k-chart__plot:focus-visible { outline: 2px solid transparent; border-radius: var(--k-radius-md); box-shadow: var(--k-ring-brand); }
1297
+
1298
+ /* ستون‌ها با HTML تا در RTL و هر عرضی درست بچینند */
1299
+ .k-bars { position: absolute; inset: 0 0 1.5rem; display: flex; align-items: flex-end; gap: 2px; padding-inline: var(--k-space-1); }
1300
+ .k-bars__grid { position: absolute; inset: 0 0 1.5rem; display: flex; flex-direction: column-reverse; justify-content: space-between; pointer-events: none; }
1301
+ .k-bars__grid span { position: relative; border-block-start: 1px solid var(--k-border-secondary); }
1302
+ .k-bars__grid span::after { content: attr(data-v); position: absolute; inset-block-start: -0.55rem; inset-inline-end: 100%; padding-inline-end: var(--k-space-1_5); color: var(--k-text-tertiary); white-space: nowrap; }
1303
+ .k-bars__col { position: relative; display: flex; flex: 1; flex-direction: column; justify-content: flex-end; align-items: center; block-size: 100%; outline: 0; }
1304
+ .k-bars__bar { inline-size: min(100%, 24px); min-block-size: 2px; border-radius: 4px 4px 0 0; background: var(--_c, var(--k-bg-brand)); transition: opacity var(--k-duration-fast); }
1305
+ .k-bars:has(.k-bars__col:is(:hover, :focus-visible)) .k-bars__col:not(:hover, :focus-visible) .k-bars__bar { opacity: 0.45; }
1306
+ .k-bars__col:focus-visible .k-bars__bar { box-shadow: var(--k-ring-brand); }
1307
+ .k-bars__label { position: absolute; inset-block-start: calc(100% + 0.4rem); color: var(--k-text-tertiary); white-space: nowrap; }
1308
+ .k-bars__value { margin-block-end: var(--k-space-1); color: var(--k-text-secondary); font-weight: var(--k-weight-semibold); white-space: nowrap; }
1309
+ .k-chart--bar .k-chart__plot { margin-inline-start: 2.5rem; }
1310
+
1311
+ .k-chart__tip {
1312
+ position: absolute;
1313
+ z-index: 2;
1314
+ display: grid;
1315
+ gap: 2px;
1316
+ min-inline-size: 8rem;
1317
+ padding: var(--k-space-2) var(--k-space-3);
1318
+ border: 1px solid var(--k-border-secondary);
1319
+ border-radius: var(--k-radius-md);
1320
+ background: var(--k-bg-elevated);
1321
+ box-shadow: var(--k-shadow-lg);
1322
+ color: var(--k-text-secondary);
1323
+ pointer-events: none;
1324
+ white-space: nowrap;
1325
+ /* با left جای‌گذاری می‌شود، پس در هر جهتی ‎-50%‎ وسط‌چین می‌کند */
1326
+ translate: -50% calc(-100% - 0.625rem);
1327
+ font-size: var(--k-text-xs);
1328
+ animation: k-tip-in 140ms var(--k-ease-standard);
1329
+ }
1330
+ /* زبانهٔ کوچک زیر راهنما */
1331
+ .k-chart__tip::after {
1332
+ content: "";
1333
+ position: absolute;
1334
+ inset-block-start: 100%;
1335
+ left: 50%;
1336
+ inline-size: 0.625rem;
1337
+ block-size: 0.625rem;
1338
+ margin-block-start: -0.3rem;
1339
+ border: 1px solid var(--k-border-secondary);
1340
+ border-block-start: 0;
1341
+ border-inline-start: 0;
1342
+ background: var(--k-bg-elevated);
1343
+ translate: -50% 0;
1344
+ rotate: 45deg;
1345
+ }
1346
+ @keyframes k-tip-in { from { opacity: 0; translate: -50% calc(-100% - 0.25rem); } }
1347
+ .k-chart__tip-title { padding-block-end: 2px; font-weight: var(--k-weight-medium); }
1348
+ .k-chart__tip-row strong { font-size: var(--k-text-sm); }
1349
+ .k-chart__tip-title { color: var(--k-text-tertiary); }
1350
+ .k-chart__tip-row { display: flex; align-items: center; justify-content: space-between; gap: var(--k-space-4); }
1351
+ .k-chart__tip-row strong { color: var(--k-text-primary); font-weight: var(--k-weight-semibold); }
1352
+ .k-chart__tip-row span { display: inline-flex; align-items: center; gap: var(--k-space-1_5); }
1353
+ .k-chart__tip-row i { inline-size: 0.5rem; block-size: 0.5rem; border-radius: 50%; background: var(--_c); }
1354
+ @media (forced-colors: active) {
1355
+ .k-chart__line { stroke: CanvasText; }
1356
+ .k-bars__bar { background: CanvasText; }
1357
+ }
1358
+
1359
+ /* ستون انباشته: فاصلهٔ ۲ پیکسلی بین بخش‌ها، گوشهٔ گرد فقط بالای ستون */
1360
+ .k-bars__stack { display: flex; flex-direction: column-reverse; gap: 2px; inline-size: min(100%, 24px); min-block-size: 2px; border-radius: 4px 4px 0 0; overflow: hidden; transition: opacity var(--k-duration-fast); }
1361
+ .k-bars__seg { flex-basis: 0; min-block-size: 0; background: var(--_c); }
1362
+ .k-bars:has(.k-bars__col:is(:hover, :focus-visible)) .k-bars__col:not(:hover, :focus-visible) .k-bars__stack { opacity: 0.45; }
1363
+ .k-chart__key--box { inline-size: 0.625rem; block-size: 0.625rem; border-radius: 2px; }
1364
+
1365
+ /* فهرست میله‌ای افقی */
1366
+ .k-barlist { display: grid; gap: var(--k-space-1_5); margin: 0; padding: 0; list-style: none; font-size: var(--k-text-sm); }
1367
+ .k-barlist__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--k-space-4); }
1368
+ .k-barlist__track { position: relative; display: flex; align-items: center; min-block-size: 2rem; }
1369
+ .k-barlist__fill { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: var(--k-radius-sm); background: color-mix(in srgb, var(--k-bg-brand) 22%, transparent); }
1370
+ .k-barlist__label { position: relative; padding-inline: var(--k-space-2_5, 0.625rem); color: var(--k-text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
1371
+ a.k-barlist__label:hover { text-decoration: underline; }
1372
+ a.k-barlist__label:focus-visible { outline: 2px solid transparent; border-radius: var(--k-radius-sm); box-shadow: var(--k-ring-brand); }
1373
+ .k-barlist__value { color: var(--k-text-secondary); font-weight: var(--k-weight-semibold); }
1374
+
1375
+ /* سهم از کل */
1376
+ .k-proportion { display: flex; gap: 2px; block-size: 0.75rem; border-radius: var(--k-radius-full); overflow: hidden; }
1377
+ .k-proportion__seg { flex-basis: 0; min-inline-size: 2px; background: var(--_c); }
1378
+ .k-proportion__legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: var(--k-space-2) var(--k-space-4); margin: var(--k-space-1) 0 0; padding: 0; list-style: none; color: var(--k-text-secondary); font-size: var(--k-text-sm); }
1379
+ .k-proportion__legend li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--k-space-1_5) var(--k-space-2); }
1380
+ .k-proportion__legend strong { color: var(--k-text-primary); font-weight: var(--k-weight-semibold); }
1381
+ .k-proportion__abs { grid-column: 2 / -1; margin-block-start: -0.25rem; color: var(--k-text-tertiary); font-size: var(--k-text-xs); }
1382
+
1383
+ .k-sparkline { display: block; inline-size: 100%; block-size: 2rem; overflow: visible; }
1384
+ /* زمان در جهت خواندن، هماهنگ با LineChart */
1385
+ [dir="rtl"] .k-sparkline { scale: -1 1; }
1386
+ @media (forced-colors: active) {
1387
+ .k-proportion__seg, .k-bars__seg, .k-barlist__fill { background: CanvasText; forced-color-adjust: none; }
1388
+ }
1389
+
1390
+ /* ───── حرکت و برجسته‌سازی ───── */
1391
+ .k-bars__col[data-active] .k-bars__label { color: var(--k-text-primary); }
1392
+ .k-barlist__row { transition: opacity var(--k-duration-fast); }
1393
+ .k-barlist:has(.k-barlist__row[data-active]) .k-barlist__row:not([data-active]) { opacity: 0.5; }
1394
+ .k-barlist__row[data-active] .k-barlist__fill { background: color-mix(in srgb, var(--k-bg-brand) 38%, transparent); }
1395
+ .k-barlist__share { margin-inline-start: var(--k-space-1); color: var(--k-text-tertiary); font-weight: var(--k-weight-regular); font-size: var(--k-text-xs); }
1396
+ .k-proportion__wrap { position: relative; }
1397
+ .k-proportion__seg { transition: opacity var(--k-duration-fast); cursor: default; }
1398
+ .k-proportion:has([data-active]) .k-proportion__seg:not([data-active]) { opacity: 0.35; }
1399
+ .k-proportion { block-size: 0.875rem; }
1400
+ .k-heatmap__cell[data-active] { outline: 2px solid var(--k-text-primary); outline-offset: 1px; }
1401
+ .k-chart__plot .k-chart__dot { transition: r var(--k-duration-fast); }
1402
+
1403
+ @media (prefers-reduced-motion: no-preference) {
1404
+ .k-bars__bar, .k-bars__stack { transform-origin: 50% 100%; animation: k-grow 0.7s var(--k-ease-standard) both; animation-delay: var(--_d, 0ms); }
1405
+ .k-barlist__fill { transform-origin: 100% 50%; animation: k-grow-x 0.8s var(--k-ease-standard) both; animation-delay: var(--_d, 0ms); }
1406
+ [dir="ltr"] .k-barlist__fill { transform-origin: 0 50%; }
1407
+ .k-proportion__seg { animation: k-fade 0.6s var(--k-ease-standard) both; }
1408
+ .k-chart__line { stroke-dasharray: 1; animation: k-draw 1.2s var(--k-ease-standard) both; }
1409
+ .k-chart__area { animation: k-fade 1s 0.4s both; }
1410
+ }
1411
+ @keyframes k-grow { from { scale: 1 0; } }
1412
+ @keyframes k-grow-x { from { scale: 0 1; } }
1413
+ @keyframes k-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
1414
+ @keyframes k-fade { from { opacity: 0; } }
1415
+
1416
+ /* نمودار دایره‌ای و دونات */
1417
+ .k-pie__body { display: flex; flex-wrap: wrap; align-items: center; gap: var(--k-space-6); }
1418
+ .k-pie__plot { position: relative; flex-shrink: 0; }
1419
+ .k-pie__svg { inline-size: 100%; block-size: 100%; overflow: visible; }
1420
+ .k-pie__slice { pointer-events: stroke; cursor: default; transition: opacity var(--k-duration-fast), stroke-width var(--k-duration-normal) var(--k-ease-standard); }
1421
+ .k-pie__svg:has([data-active]) .k-pie__slice:not([data-active]) { opacity: 0.35; }
1422
+ .k-pie__center { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 2px; pointer-events: none; text-align: center; }
1423
+ .k-pie__center strong { color: var(--k-text-primary); font-size: var(--k-text-xl); font-weight: var(--k-weight-bold); line-height: 1.2; }
1424
+ .k-pie__center span { max-inline-size: 6rem; color: var(--k-text-tertiary); font-size: var(--k-text-xs); }
1425
+ .k-pie__legend { display: grid; flex: 1 1 12rem; gap: var(--k-space-1); margin: 0; padding: 0; list-style: none; font-size: var(--k-text-sm); }
1426
+ .k-pie__legend li { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: var(--k-space-2) var(--k-space-3); padding: var(--k-space-1_5) var(--k-space-2); border-radius: var(--k-radius-md); color: var(--k-text-secondary); transition: background-color var(--k-duration-fast); }
1427
+ .k-pie__legend li[data-active] { background: var(--k-bg-hover); color: var(--k-text-primary); }
1428
+ .k-pie__legend strong { color: var(--k-text-primary); font-weight: var(--k-weight-semibold); }
1429
+ .k-pie__abs { min-inline-size: 4.5rem; color: var(--k-text-tertiary); font-size: var(--k-text-xs); text-align: end; }
1430
+ @media (prefers-reduced-motion: no-preference) {
1431
+ .k-pie__slice { animation: k-fade 0.6s var(--k-ease-standard) both; animation-delay: var(--_d, 0ms); }
1432
+ }
1433
+
1252
1434
  /* چک‌باکس — روی <input type="checkbox"> بومی، پس کیبورد و صفحه‌خوان خودکار کار می‌کنند
1253
1435
  * <label class="k-check">
1254
1436
  * <input type="checkbox" class="k-checkbox">
@@ -1347,6 +1529,41 @@ a.k-btn[aria-disabled="true"]:not([aria-busy="true"]) {
1347
1529
  .k-checkbox::before { display: none; }
1348
1530
  }
1349
1531
 
1532
+ /* تراشه‌های فیلتر (Chips) — دکمه‌های aria-pressed
1533
+ * <div class="k-chips" role="group" aria-label="دسته‌بندی"><button class="k-chip" aria-pressed="true">…</button></div>
1534
+ */
1535
+ .k-chips { display: flex; flex-wrap: wrap; gap: var(--k-space-2); }
1536
+ .k-chip {
1537
+ display: inline-flex;
1538
+ align-items: center;
1539
+ gap: var(--k-space-1_5);
1540
+ block-size: 2rem;
1541
+ padding-inline: var(--k-space-3);
1542
+ border: 1px solid var(--k-border-primary);
1543
+ border-radius: var(--k-radius-full);
1544
+ background: var(--k-bg-elevated);
1545
+ color: var(--k-text-secondary);
1546
+ font: inherit;
1547
+ font-size: var(--k-text-sm);
1548
+ font-weight: var(--k-weight-medium);
1549
+ white-space: nowrap;
1550
+ cursor: pointer;
1551
+ box-shadow: var(--k-shadow-xs);
1552
+ transition: background-color var(--k-duration-fast), border-color var(--k-duration-fast), color var(--k-duration-fast);
1553
+ }
1554
+ .k-chip:hover { background: var(--k-bg-hover); color: var(--k-text-primary); }
1555
+ .k-chip:focus-visible { outline: 2px solid transparent; box-shadow: var(--k-ring-brand); }
1556
+ .k-chip svg { inline-size: 1rem; block-size: 1rem; }
1557
+ .k-chip[aria-pressed="true"] { border-color: var(--k-border-brand); background: var(--k-bg-brand-subtle); color: var(--k-text-brand); }
1558
+ .k-chip__check { display: none; }
1559
+ .k-chip[aria-pressed="true"] .k-chip__check { display: inline-flex; }
1560
+ .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; }
1561
+ .k-chip[aria-pressed="true"] .k-chip__count { background: color-mix(in srgb, var(--k-text-brand) 18%, transparent); color: var(--k-text-brand); }
1562
+ .k-chip:disabled { color: var(--k-text-quaternary); cursor: not-allowed; }
1563
+ @media (forced-colors: active) {
1564
+ .k-chip[aria-pressed="true"] { border-width: 2px; border-color: Highlight; }
1565
+ }
1566
+
1350
1567
  /* جستجو و انتخاب (Combobox) و پالت فرمان — فهرست گزینه‌ها با الگوی listbox
1351
1568
  * متغیرها: --k-listbox-max-height --k-option-height
1352
1569
  */
@@ -1402,6 +1619,15 @@ a.k-btn[aria-disabled="true"]:not([aria-busy="true"]) {
1402
1619
  .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); }
1403
1620
  .k-command__footer span { display: inline-flex; align-items: center; gap: var(--k-space-1); }
1404
1621
 
1622
+ /* شمارش معکوس */
1623
+ .k-countdown { display: inline-flex; align-items: baseline; gap: var(--k-space-1); color: var(--k-text-secondary); font-weight: var(--k-weight-semibold); }
1624
+ .k-countdown--blocks { gap: var(--k-space-2); }
1625
+ .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); }
1626
+ .k-countdown__num { color: var(--k-text-primary); font-size: var(--k-text-2xl); line-height: 1.1; }
1627
+ .k-countdown__name { color: var(--k-text-tertiary); font-size: var(--k-text-xs); font-weight: var(--k-weight-medium); }
1628
+ .k-countdown__sep { align-self: center; color: var(--k-text-quaternary); }
1629
+ .k-countdown[data-done] { color: var(--k-text-tertiary); }
1630
+
1405
1631
  /* پنجرهٔ گفتگو — روی <dialog> بومی: تلهٔ فوکوس، Esc و غیرفعال شدن پس‌زمینه رایگان
1406
1632
  * اندازه‌ها: k-dialog--sm | k-dialog--md (پیش‌فرض) | k-dialog--lg
1407
1633
  *
@@ -1668,6 +1894,55 @@ html:has(.k-dialog[open]) { overflow: hidden; }
1668
1894
  .k-file__remove { grid-row: span 2; }
1669
1895
  .k-file .k-progress { grid-column: 2 / -1; }
1670
1896
 
1897
+ /* نقشهٔ فعالیت سالانه با ماه‌های شمسی — طیف تک‌رنگ برند از کم‌رنگ به پررنگ */
1898
+ .k-heatmap { --_cell: var(--k-heatmap-cell, 0.75rem); position: relative; display: grid; gap: var(--k-space-2); font-size: var(--k-text-xs); }
1899
+ .k-heatmap__scroll { overflow-x: auto; padding-block-end: var(--k-space-1); scrollbar-width: thin; }
1900
+ .k-heatmap__months { display: grid; grid-auto-flow: column; grid-auto-columns: calc(var(--_cell) + 3px); margin-inline-start: 1.75rem; color: var(--k-text-tertiary); }
1901
+ .k-heatmap__months span { white-space: nowrap; }
1902
+ .k-heatmap__body { display: flex; gap: var(--k-space-1_5); }
1903
+ .k-heatmap__days { display: grid; grid-template-rows: repeat(7, var(--_cell)); gap: 3px; inline-size: 1.25rem; color: var(--k-text-tertiary); line-height: var(--_cell); }
1904
+ .k-heatmap__grid { display: grid; grid-template-rows: repeat(7, var(--_cell)); grid-auto-flow: column; grid-auto-columns: var(--_cell); gap: 3px; }
1905
+ .k-heatmap__cell { border-radius: 2px; background: var(--k-bg-tertiary); }
1906
+ .k-heatmap__cell[data-l="1"] { background: color-mix(in srgb, var(--k-bg-brand) 30%, var(--k-bg-tertiary)); }
1907
+ .k-heatmap__cell[data-l="2"] { background: color-mix(in srgb, var(--k-bg-brand) 55%, var(--k-bg-tertiary)); }
1908
+ .k-heatmap__cell[data-l="3"] { background: color-mix(in srgb, var(--k-bg-brand) 80%, var(--k-bg-tertiary)); }
1909
+ .k-heatmap__cell[data-l="4"] { background: var(--k-bg-brand); }
1910
+ .k-heatmap__cell[data-empty] { background: transparent; }
1911
+ .k-heatmap__cell:hover { outline: 1px solid var(--k-text-secondary); outline-offset: 1px; }
1912
+ .k-heatmap__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--k-space-2); color: var(--k-text-tertiary); }
1913
+ .k-heatmap__scale { display: inline-flex; align-items: center; gap: 3px; }
1914
+ .k-heatmap__scale .k-heatmap__cell { inline-size: var(--_cell); block-size: var(--_cell); }
1915
+ @media (forced-colors: active) {
1916
+ .k-heatmap__cell { border: 1px solid CanvasText; }
1917
+ .k-heatmap__cell[data-l="4"], .k-heatmap__cell[data-l="3"] { background: CanvasText; forced-color-adjust: none; }
1918
+ }
1919
+
1920
+ /* ویرایش درجا: متن معمولی که با کلیک یا Enter به فیلد تبدیل می‌شود */
1921
+ .k-inline-edit { display: inline-flex; align-items: center; gap: var(--k-space-1); max-inline-size: 100%; }
1922
+ .k-inline-edit__view {
1923
+ display: inline-flex;
1924
+ align-items: center;
1925
+ gap: var(--k-space-1_5);
1926
+ min-inline-size: 4rem;
1927
+ margin-inline: calc(var(--k-space-2) * -1);
1928
+ padding: var(--k-space-1) var(--k-space-2);
1929
+ border: 0;
1930
+ border-radius: var(--k-radius-md);
1931
+ background: none;
1932
+ color: inherit;
1933
+ font: inherit;
1934
+ text-align: start;
1935
+ cursor: text;
1936
+ transition: background-color var(--k-duration-fast);
1937
+ }
1938
+ .k-inline-edit__view:hover { background: var(--k-bg-hover); }
1939
+ .k-inline-edit__view:focus-visible { outline: 2px solid transparent; box-shadow: var(--k-ring-brand); }
1940
+ .k-inline-edit__view svg { inline-size: 1rem; block-size: 1rem; color: var(--k-text-quaternary); opacity: 0; transition: opacity var(--k-duration-fast); }
1941
+ .k-inline-edit__view:is(:hover, :focus-visible) svg { opacity: 1; }
1942
+ .k-inline-edit__placeholder { color: var(--k-text-tertiary); }
1943
+ .k-inline-edit .k-input { --_h: 2.25rem; min-inline-size: 12rem; }
1944
+ .k-inline-edit__actions { display: inline-flex; gap: 2px; }
1945
+
1671
1946
  /* ورودی متن
1672
1947
  * <div class="k-input">
1673
1948
  * <span class="k-input__addon">svg یا متن</span>
@@ -1884,6 +2159,38 @@ html:has(.k-dialog[open]) { overflow: hidden; }
1884
2159
  .k-menu__item:focus { outline: 2px solid Highlight; }
1885
2160
  }
1886
2161
 
2162
+ /* منوی راست‌کلیک: جای منو از مختصات نشانگر */
2163
+ .k-context-area { position: relative; }
2164
+ .k-menu--context { position: fixed; inset: auto; inset-block-start: var(--_y); inset-inline-start: auto; left: var(--_x); }
2165
+ /* سبک پیش‌فرض مرورگر برای popover را خنثی می‌کند */
2166
+ .k-menu--context[popover] { margin: 0; padding: var(--k-space-1_5); border: 1px solid var(--k-border-secondary); color: inherit; overflow: visible; }
2167
+ .k-menu--context:popover-open { position: fixed; inset: auto; top: var(--_y); left: var(--_x); }
2168
+
2169
+ /* انتخاب ماه و سال شمسی */
2170
+ .k-monthpicker { display: grid; gap: var(--k-space-3); inline-size: var(--k-monthpicker-width, 18rem); }
2171
+ .k-monthpicker__header { display: flex; align-items: center; justify-content: space-between; gap: var(--k-space-2); }
2172
+ .k-monthpicker__year { color: var(--k-text-primary); font-size: var(--k-text-md); font-weight: var(--k-weight-semibold); }
2173
+ .k-monthpicker__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--k-space-1); }
2174
+ .k-monthpicker__month {
2175
+ block-size: 2.5rem;
2176
+ border: 0;
2177
+ border-radius: var(--k-radius-md);
2178
+ background: transparent;
2179
+ color: var(--k-text-secondary);
2180
+ font: inherit;
2181
+ font-size: var(--k-text-sm);
2182
+ font-weight: var(--k-weight-medium);
2183
+ cursor: pointer;
2184
+ }
2185
+ .k-monthpicker__month:hover { background: var(--k-bg-hover); color: var(--k-text-primary); }
2186
+ .k-monthpicker__month:focus-visible { outline: 2px solid transparent; box-shadow: var(--k-ring-brand); }
2187
+ .k-monthpicker__month[aria-current="date"] { color: var(--k-text-brand); font-weight: var(--k-weight-bold); }
2188
+ .k-monthpicker__month[aria-pressed="true"] { background: var(--k-bg-brand); color: var(--k-text-on-brand); font-weight: var(--k-weight-semibold); }
2189
+ .k-monthpicker__month:disabled { color: var(--k-text-quaternary); text-decoration: line-through; cursor: not-allowed; }
2190
+ @media (forced-colors: active) {
2191
+ .k-monthpicker__month[aria-pressed="true"] { outline: 2px solid Highlight; }
2192
+ }
2193
+
1887
2194
  /* ورودی عدد با دکمه‌های افزایش و کاهش */
1888
2195
  .k-number .k-input { padding-inline: var(--k-space-1); }
1889
2196
  .k-number .k-input__control { text-align: center; }
@@ -1993,6 +2300,25 @@ html:has(.k-dialog[open]) { overflow: hidden; }
1993
2300
  .k-pagination__summary { color: var(--k-text-tertiary); font-size: var(--k-text-sm); }
1994
2301
  @media (max-width: 36rem) { .k-pagination__pages li:not(:has([aria-current])):not(:first-child):not(:last-child) { display: none; } }
1995
2302
 
2303
+ /* قدرت رمز عبور: نوار چهارقسمتی + فهرست شرط‌ها */
2304
+ .k-strength { display: grid; gap: var(--k-space-2); }
2305
+ .k-strength__bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--k-space-1); }
2306
+ .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); }
2307
+ .k-strength[data-score="1"] .k-strength__bar:nth-child(-n + 1) { background: var(--k-text-error); }
2308
+ .k-strength[data-score="2"] .k-strength__bar:nth-child(-n + 2) { background: var(--k-text-warning); }
2309
+ .k-strength[data-score="3"] .k-strength__bar:nth-child(-n + 3) { background: var(--k-text-success); }
2310
+ .k-strength[data-score="4"] .k-strength__bar { background: var(--k-text-success); }
2311
+ .k-strength__label { color: var(--k-text-tertiary); font-size: var(--k-text-sm); }
2312
+ .k-strength__label strong { color: var(--k-text-secondary); font-weight: var(--k-weight-semibold); }
2313
+ .k-strength__rules { display: grid; gap: var(--k-space-1); margin: 0; padding: 0; list-style: none; }
2314
+ .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); }
2315
+ .k-strength__rule svg { inline-size: 1rem; block-size: 1rem; flex-shrink: 0; }
2316
+ .k-strength__rule[data-met] { color: var(--k-text-success); }
2317
+ @media (forced-colors: active) {
2318
+ .k-strength__bar { border: 1px solid CanvasText; }
2319
+ .k-strength[data-score] .k-strength__bar { forced-color-adjust: none; }
2320
+ }
2321
+
1996
2322
  /* پلاک خودروی ایران — نسبت واقعی ۵۲۰×۱۱۰ میلی‌متر و رنگ بر اساس نوع پلاک
1997
2323
  * ترتیب فیزیکی چپ‌به‌راست: نوار آبی (پرچم و I.R. IRAN) | دو رقم | حرف | سه رقم | «ایران» و کد استان
1998
2324
  * رنگ با data-type: private سفید، taxi/public/agricultural زرد، government قرمز، police سبز، army قهوه‌ای روشن، defense آبی روشن
@@ -3105,4 +3431,43 @@ html:has(.k-dialog[open]) { overflow: hidden; }
3105
3431
  .k-tooltip { border: 1px solid CanvasText; }
3106
3432
  }
3107
3433
 
3434
+ /* درخت (Tree view) — الگوی Tree در WAI-ARIA
3435
+ * <ul role="tree" class="k-tree"><li role="treeitem" aria-expanded="true" class="k-tree__item">…<ul role="group">…</ul></li></ul>
3436
+ */
3437
+ .k-tree, .k-tree [role="group"] { margin: 0; padding: 0; list-style: none; }
3438
+ .k-tree [role="group"] { padding-inline-start: var(--k-tree-indent, 1.25rem); }
3439
+ .k-tree__item { outline: 0; }
3440
+ .k-tree__row {
3441
+ display: flex;
3442
+ align-items: center;
3443
+ gap: var(--k-space-1_5);
3444
+ min-block-size: var(--k-tree-row-height, 2.25rem);
3445
+ padding-inline: var(--k-space-2);
3446
+ border-radius: var(--k-radius-md);
3447
+ color: var(--k-text-secondary);
3448
+ font-size: var(--k-text-sm);
3449
+ font-weight: var(--k-weight-medium);
3450
+ cursor: pointer;
3451
+ user-select: none;
3452
+ }
3453
+ .k-tree__row:hover { background: var(--k-bg-hover); color: var(--k-text-primary); }
3454
+ .k-tree__item:focus-visible > .k-tree__row { box-shadow: var(--k-ring-brand); }
3455
+ .k-tree__item[aria-selected="true"] > .k-tree__row { background: var(--k-bg-active); color: var(--k-text-primary); }
3456
+ .k-tree__item[aria-selected="true"] > .k-tree__row .k-tree__icon { color: var(--k-text-brand); }
3457
+ .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); }
3458
+ /* فلش «بسته» در RTL به چپ اشاره می‌کند */
3459
+ .k-tree__toggle svg { inline-size: 1rem; block-size: 1rem; }
3460
+ [dir="rtl"] .k-tree__toggle svg { scale: -1 1; }
3461
+ .k-tree__item[aria-expanded="true"] > .k-tree__row .k-tree__toggle { rotate: 90deg; }
3462
+ [dir="rtl"] .k-tree__item[aria-expanded="true"] > .k-tree__row .k-tree__toggle { rotate: -90deg; }
3463
+ .k-tree__spacer { flex-shrink: 0; inline-size: 1.25rem; }
3464
+ .k-tree__icon { display: inline-grid; flex-shrink: 0; color: var(--k-text-tertiary); }
3465
+ .k-tree__icon svg { inline-size: 1.125rem; block-size: 1.125rem; }
3466
+ .k-tree__label { flex: 1; min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
3467
+ .k-tree__meta { color: var(--k-text-tertiary); font-size: var(--k-text-xs); }
3468
+ .k-tree__item[aria-disabled="true"] > .k-tree__row { color: var(--k-text-quaternary); cursor: not-allowed; }
3469
+ @media (forced-colors: active) {
3470
+ .k-tree__item[aria-selected="true"] > .k-tree__row { outline: 2px solid Highlight; }
3471
+ }
3472
+
3108
3473
  }
@@ -773,6 +773,18 @@ a.k-breadcrumb__link:hover, button.k-breadcrumb__link:hover { background: var(--
773
773
  .k-breadcrumb__link[aria-current="page"] { outline: 1px solid CanvasText; }
774
774
  }
775
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
+
776
788
  /* دکمه — به سبک Untitled UI: سایهٔ اسکئومورفیک و حلقهٔ فوکوس نرم
777
789
  * <button class="k-btn k-btn--primary k-btn--md">ثبت</button>
778
790
  * گونه‌ها: primary | secondary | tertiary | link | danger | danger-secondary
@@ -1241,6 +1253,176 @@ a.k-btn[aria-disabled="true"]:not([aria-busy="true"]) {
1241
1253
  .k-card--interactive:has(:focus-visible) { outline: 2px solid Highlight; }
1242
1254
  }
1243
1255
 
1256
+ /* نمودارها (BarChart، LineChart) — طبق روش dataviz: نشانه‌های باریک، شبکهٔ کم‌رنگ، رنگ دسته‌ای با ترتیب ثابت
1257
+ * پالت: چهار رنگ اول پالت مرجع، اعتبارسنجی‌شده روی سطح کاشی در هر دو تم (CVD ΔE ≥ ۸)
1258
+ * متغیرها: --k-chart-1..4 --k-chart-height
1259
+ */
1260
+ :root, [data-theme="dark"] {
1261
+ --k-chart-1: #3987e5;
1262
+ --k-chart-2: #d95926;
1263
+ --k-chart-3: #199e70;
1264
+ --k-chart-4: #c98500;
1265
+ }
1266
+ [data-theme="light"] {
1267
+ --k-chart-1: #2a78d6;
1268
+ --k-chart-2: #eb6834;
1269
+ --k-chart-3: #1baf7a;
1270
+ --k-chart-4: #eda100;
1271
+ }
1272
+ .k-chart { position: relative; display: grid; gap: var(--k-space-3); font-size: var(--k-text-xs); }
1273
+ .k-chart__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--k-space-2) var(--k-space-4); }
1274
+ .k-chart__title { margin: 0; color: var(--k-text-primary); font-size: var(--k-text-sm); font-weight: var(--k-weight-semibold); }
1275
+ .k-chart__legend { display: flex; flex-wrap: wrap; gap: var(--k-space-1) var(--k-space-4); margin: 0; padding: 0; list-style: none; color: var(--k-text-secondary); }
1276
+ .k-chart__legend li { display: inline-flex; align-items: center; gap: var(--k-space-1_5); }
1277
+ .k-chart__key { inline-size: 0.875rem; block-size: 2px; border-radius: 1px; background: var(--_c); }
1278
+ .k-chart__plot { position: relative; block-size: var(--k-chart-height, 14rem); }
1279
+ .k-chart__svg { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; overflow: visible; }
1280
+ .k-chart__grid line { stroke: var(--k-border-secondary); stroke-width: 1; shape-rendering: crispEdges; }
1281
+ .k-chart__tick { fill: var(--k-text-tertiary); font-size: 11px; }
1282
+ .k-chart__line { fill: none; stroke: var(--_c); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
1283
+ .k-chart__area { stroke: none; }
1284
+ .k-chart__dot { fill: var(--_c); stroke: var(--k-bg-elevated); stroke-width: 2; }
1285
+ .k-chart__end { fill: var(--k-text-secondary); font-size: 11px; font-weight: var(--k-weight-medium); }
1286
+ .k-chart__cross { stroke: var(--k-border-primary); stroke-width: 1; }
1287
+ .k-chart__hit { fill: transparent; cursor: crosshair; outline: 0; }
1288
+ .k-chart__plot:focus-visible { outline: 2px solid transparent; border-radius: var(--k-radius-md); box-shadow: var(--k-ring-brand); }
1289
+
1290
+ /* ستون‌ها با HTML تا در RTL و هر عرضی درست بچینند */
1291
+ .k-bars { position: absolute; inset: 0 0 1.5rem; display: flex; align-items: flex-end; gap: 2px; padding-inline: var(--k-space-1); }
1292
+ .k-bars__grid { position: absolute; inset: 0 0 1.5rem; display: flex; flex-direction: column-reverse; justify-content: space-between; pointer-events: none; }
1293
+ .k-bars__grid span { position: relative; border-block-start: 1px solid var(--k-border-secondary); }
1294
+ .k-bars__grid span::after { content: attr(data-v); position: absolute; inset-block-start: -0.55rem; inset-inline-end: 100%; padding-inline-end: var(--k-space-1_5); color: var(--k-text-tertiary); white-space: nowrap; }
1295
+ .k-bars__col { position: relative; display: flex; flex: 1; flex-direction: column; justify-content: flex-end; align-items: center; block-size: 100%; outline: 0; }
1296
+ .k-bars__bar { inline-size: min(100%, 24px); min-block-size: 2px; border-radius: 4px 4px 0 0; background: var(--_c, var(--k-bg-brand)); transition: opacity var(--k-duration-fast); }
1297
+ .k-bars:has(.k-bars__col:is(:hover, :focus-visible)) .k-bars__col:not(:hover, :focus-visible) .k-bars__bar { opacity: 0.45; }
1298
+ .k-bars__col:focus-visible .k-bars__bar { box-shadow: var(--k-ring-brand); }
1299
+ .k-bars__label { position: absolute; inset-block-start: calc(100% + 0.4rem); color: var(--k-text-tertiary); white-space: nowrap; }
1300
+ .k-bars__value { margin-block-end: var(--k-space-1); color: var(--k-text-secondary); font-weight: var(--k-weight-semibold); white-space: nowrap; }
1301
+ .k-chart--bar .k-chart__plot { margin-inline-start: 2.5rem; }
1302
+
1303
+ .k-chart__tip {
1304
+ position: absolute;
1305
+ z-index: 2;
1306
+ display: grid;
1307
+ gap: 2px;
1308
+ min-inline-size: 8rem;
1309
+ padding: var(--k-space-2) var(--k-space-3);
1310
+ border: 1px solid var(--k-border-secondary);
1311
+ border-radius: var(--k-radius-md);
1312
+ background: var(--k-bg-elevated);
1313
+ box-shadow: var(--k-shadow-lg);
1314
+ color: var(--k-text-secondary);
1315
+ pointer-events: none;
1316
+ white-space: nowrap;
1317
+ /* با left جای‌گذاری می‌شود، پس در هر جهتی ‎-50%‎ وسط‌چین می‌کند */
1318
+ translate: -50% calc(-100% - 0.625rem);
1319
+ font-size: var(--k-text-xs);
1320
+ animation: k-tip-in 140ms var(--k-ease-standard);
1321
+ }
1322
+ /* زبانهٔ کوچک زیر راهنما */
1323
+ .k-chart__tip::after {
1324
+ content: "";
1325
+ position: absolute;
1326
+ inset-block-start: 100%;
1327
+ left: 50%;
1328
+ inline-size: 0.625rem;
1329
+ block-size: 0.625rem;
1330
+ margin-block-start: -0.3rem;
1331
+ border: 1px solid var(--k-border-secondary);
1332
+ border-block-start: 0;
1333
+ border-inline-start: 0;
1334
+ background: var(--k-bg-elevated);
1335
+ translate: -50% 0;
1336
+ rotate: 45deg;
1337
+ }
1338
+ @keyframes k-tip-in { from { opacity: 0; translate: -50% calc(-100% - 0.25rem); } }
1339
+ .k-chart__tip-title { padding-block-end: 2px; font-weight: var(--k-weight-medium); }
1340
+ .k-chart__tip-row strong { font-size: var(--k-text-sm); }
1341
+ .k-chart__tip-title { color: var(--k-text-tertiary); }
1342
+ .k-chart__tip-row { display: flex; align-items: center; justify-content: space-between; gap: var(--k-space-4); }
1343
+ .k-chart__tip-row strong { color: var(--k-text-primary); font-weight: var(--k-weight-semibold); }
1344
+ .k-chart__tip-row span { display: inline-flex; align-items: center; gap: var(--k-space-1_5); }
1345
+ .k-chart__tip-row i { inline-size: 0.5rem; block-size: 0.5rem; border-radius: 50%; background: var(--_c); }
1346
+ @media (forced-colors: active) {
1347
+ .k-chart__line { stroke: CanvasText; }
1348
+ .k-bars__bar { background: CanvasText; }
1349
+ }
1350
+
1351
+ /* ستون انباشته: فاصلهٔ ۲ پیکسلی بین بخش‌ها، گوشهٔ گرد فقط بالای ستون */
1352
+ .k-bars__stack { display: flex; flex-direction: column-reverse; gap: 2px; inline-size: min(100%, 24px); min-block-size: 2px; border-radius: 4px 4px 0 0; overflow: hidden; transition: opacity var(--k-duration-fast); }
1353
+ .k-bars__seg { flex-basis: 0; min-block-size: 0; background: var(--_c); }
1354
+ .k-bars:has(.k-bars__col:is(:hover, :focus-visible)) .k-bars__col:not(:hover, :focus-visible) .k-bars__stack { opacity: 0.45; }
1355
+ .k-chart__key--box { inline-size: 0.625rem; block-size: 0.625rem; border-radius: 2px; }
1356
+
1357
+ /* فهرست میله‌ای افقی */
1358
+ .k-barlist { display: grid; gap: var(--k-space-1_5); margin: 0; padding: 0; list-style: none; font-size: var(--k-text-sm); }
1359
+ .k-barlist__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--k-space-4); }
1360
+ .k-barlist__track { position: relative; display: flex; align-items: center; min-block-size: 2rem; }
1361
+ .k-barlist__fill { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: var(--k-radius-sm); background: color-mix(in srgb, var(--k-bg-brand) 22%, transparent); }
1362
+ .k-barlist__label { position: relative; padding-inline: var(--k-space-2_5, 0.625rem); color: var(--k-text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
1363
+ a.k-barlist__label:hover { text-decoration: underline; }
1364
+ a.k-barlist__label:focus-visible { outline: 2px solid transparent; border-radius: var(--k-radius-sm); box-shadow: var(--k-ring-brand); }
1365
+ .k-barlist__value { color: var(--k-text-secondary); font-weight: var(--k-weight-semibold); }
1366
+
1367
+ /* سهم از کل */
1368
+ .k-proportion { display: flex; gap: 2px; block-size: 0.75rem; border-radius: var(--k-radius-full); overflow: hidden; }
1369
+ .k-proportion__seg { flex-basis: 0; min-inline-size: 2px; background: var(--_c); }
1370
+ .k-proportion__legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: var(--k-space-2) var(--k-space-4); margin: var(--k-space-1) 0 0; padding: 0; list-style: none; color: var(--k-text-secondary); font-size: var(--k-text-sm); }
1371
+ .k-proportion__legend li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--k-space-1_5) var(--k-space-2); }
1372
+ .k-proportion__legend strong { color: var(--k-text-primary); font-weight: var(--k-weight-semibold); }
1373
+ .k-proportion__abs { grid-column: 2 / -1; margin-block-start: -0.25rem; color: var(--k-text-tertiary); font-size: var(--k-text-xs); }
1374
+
1375
+ .k-sparkline { display: block; inline-size: 100%; block-size: 2rem; overflow: visible; }
1376
+ /* زمان در جهت خواندن، هماهنگ با LineChart */
1377
+ [dir="rtl"] .k-sparkline { scale: -1 1; }
1378
+ @media (forced-colors: active) {
1379
+ .k-proportion__seg, .k-bars__seg, .k-barlist__fill { background: CanvasText; forced-color-adjust: none; }
1380
+ }
1381
+
1382
+ /* ───── حرکت و برجسته‌سازی ───── */
1383
+ .k-bars__col[data-active] .k-bars__label { color: var(--k-text-primary); }
1384
+ .k-barlist__row { transition: opacity var(--k-duration-fast); }
1385
+ .k-barlist:has(.k-barlist__row[data-active]) .k-barlist__row:not([data-active]) { opacity: 0.5; }
1386
+ .k-barlist__row[data-active] .k-barlist__fill { background: color-mix(in srgb, var(--k-bg-brand) 38%, transparent); }
1387
+ .k-barlist__share { margin-inline-start: var(--k-space-1); color: var(--k-text-tertiary); font-weight: var(--k-weight-regular); font-size: var(--k-text-xs); }
1388
+ .k-proportion__wrap { position: relative; }
1389
+ .k-proportion__seg { transition: opacity var(--k-duration-fast); cursor: default; }
1390
+ .k-proportion:has([data-active]) .k-proportion__seg:not([data-active]) { opacity: 0.35; }
1391
+ .k-proportion { block-size: 0.875rem; }
1392
+ .k-heatmap__cell[data-active] { outline: 2px solid var(--k-text-primary); outline-offset: 1px; }
1393
+ .k-chart__plot .k-chart__dot { transition: r var(--k-duration-fast); }
1394
+
1395
+ @media (prefers-reduced-motion: no-preference) {
1396
+ .k-bars__bar, .k-bars__stack { transform-origin: 50% 100%; animation: k-grow 0.7s var(--k-ease-standard) both; animation-delay: var(--_d, 0ms); }
1397
+ .k-barlist__fill { transform-origin: 100% 50%; animation: k-grow-x 0.8s var(--k-ease-standard) both; animation-delay: var(--_d, 0ms); }
1398
+ [dir="ltr"] .k-barlist__fill { transform-origin: 0 50%; }
1399
+ .k-proportion__seg { animation: k-fade 0.6s var(--k-ease-standard) both; }
1400
+ .k-chart__line { stroke-dasharray: 1; animation: k-draw 1.2s var(--k-ease-standard) both; }
1401
+ .k-chart__area { animation: k-fade 1s 0.4s both; }
1402
+ }
1403
+ @keyframes k-grow { from { scale: 1 0; } }
1404
+ @keyframes k-grow-x { from { scale: 0 1; } }
1405
+ @keyframes k-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
1406
+ @keyframes k-fade { from { opacity: 0; } }
1407
+
1408
+ /* نمودار دایره‌ای و دونات */
1409
+ .k-pie__body { display: flex; flex-wrap: wrap; align-items: center; gap: var(--k-space-6); }
1410
+ .k-pie__plot { position: relative; flex-shrink: 0; }
1411
+ .k-pie__svg { inline-size: 100%; block-size: 100%; overflow: visible; }
1412
+ .k-pie__slice { pointer-events: stroke; cursor: default; transition: opacity var(--k-duration-fast), stroke-width var(--k-duration-normal) var(--k-ease-standard); }
1413
+ .k-pie__svg:has([data-active]) .k-pie__slice:not([data-active]) { opacity: 0.35; }
1414
+ .k-pie__center { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 2px; pointer-events: none; text-align: center; }
1415
+ .k-pie__center strong { color: var(--k-text-primary); font-size: var(--k-text-xl); font-weight: var(--k-weight-bold); line-height: 1.2; }
1416
+ .k-pie__center span { max-inline-size: 6rem; color: var(--k-text-tertiary); font-size: var(--k-text-xs); }
1417
+ .k-pie__legend { display: grid; flex: 1 1 12rem; gap: var(--k-space-1); margin: 0; padding: 0; list-style: none; font-size: var(--k-text-sm); }
1418
+ .k-pie__legend li { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: var(--k-space-2) var(--k-space-3); padding: var(--k-space-1_5) var(--k-space-2); border-radius: var(--k-radius-md); color: var(--k-text-secondary); transition: background-color var(--k-duration-fast); }
1419
+ .k-pie__legend li[data-active] { background: var(--k-bg-hover); color: var(--k-text-primary); }
1420
+ .k-pie__legend strong { color: var(--k-text-primary); font-weight: var(--k-weight-semibold); }
1421
+ .k-pie__abs { min-inline-size: 4.5rem; color: var(--k-text-tertiary); font-size: var(--k-text-xs); text-align: end; }
1422
+ @media (prefers-reduced-motion: no-preference) {
1423
+ .k-pie__slice { animation: k-fade 0.6s var(--k-ease-standard) both; animation-delay: var(--_d, 0ms); }
1424
+ }
1425
+
1244
1426
  /* چک‌باکس — روی <input type="checkbox"> بومی، پس کیبورد و صفحه‌خوان خودکار کار می‌کنند
1245
1427
  * <label class="k-check">
1246
1428
  * <input type="checkbox" class="k-checkbox">
@@ -1339,6 +1521,41 @@ a.k-btn[aria-disabled="true"]:not([aria-busy="true"]) {
1339
1521
  .k-checkbox::before { display: none; }
1340
1522
  }
1341
1523
 
1524
+ /* تراشه‌های فیلتر (Chips) — دکمه‌های aria-pressed
1525
+ * <div class="k-chips" role="group" aria-label="دسته‌بندی"><button class="k-chip" aria-pressed="true">…</button></div>
1526
+ */
1527
+ .k-chips { display: flex; flex-wrap: wrap; gap: var(--k-space-2); }
1528
+ .k-chip {
1529
+ display: inline-flex;
1530
+ align-items: center;
1531
+ gap: var(--k-space-1_5);
1532
+ block-size: 2rem;
1533
+ padding-inline: var(--k-space-3);
1534
+ border: 1px solid var(--k-border-primary);
1535
+ border-radius: var(--k-radius-full);
1536
+ background: var(--k-bg-elevated);
1537
+ color: var(--k-text-secondary);
1538
+ font: inherit;
1539
+ font-size: var(--k-text-sm);
1540
+ font-weight: var(--k-weight-medium);
1541
+ white-space: nowrap;
1542
+ cursor: pointer;
1543
+ box-shadow: var(--k-shadow-xs);
1544
+ transition: background-color var(--k-duration-fast), border-color var(--k-duration-fast), color var(--k-duration-fast);
1545
+ }
1546
+ .k-chip:hover { background: var(--k-bg-hover); color: var(--k-text-primary); }
1547
+ .k-chip:focus-visible { outline: 2px solid transparent; box-shadow: var(--k-ring-brand); }
1548
+ .k-chip svg { inline-size: 1rem; block-size: 1rem; }
1549
+ .k-chip[aria-pressed="true"] { border-color: var(--k-border-brand); background: var(--k-bg-brand-subtle); color: var(--k-text-brand); }
1550
+ .k-chip__check { display: none; }
1551
+ .k-chip[aria-pressed="true"] .k-chip__check { display: inline-flex; }
1552
+ .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; }
1553
+ .k-chip[aria-pressed="true"] .k-chip__count { background: color-mix(in srgb, var(--k-text-brand) 18%, transparent); color: var(--k-text-brand); }
1554
+ .k-chip:disabled { color: var(--k-text-quaternary); cursor: not-allowed; }
1555
+ @media (forced-colors: active) {
1556
+ .k-chip[aria-pressed="true"] { border-width: 2px; border-color: Highlight; }
1557
+ }
1558
+
1342
1559
  /* جستجو و انتخاب (Combobox) و پالت فرمان — فهرست گزینه‌ها با الگوی listbox
1343
1560
  * متغیرها: --k-listbox-max-height --k-option-height
1344
1561
  */
@@ -1394,6 +1611,15 @@ a.k-btn[aria-disabled="true"]:not([aria-busy="true"]) {
1394
1611
  .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); }
1395
1612
  .k-command__footer span { display: inline-flex; align-items: center; gap: var(--k-space-1); }
1396
1613
 
1614
+ /* شمارش معکوس */
1615
+ .k-countdown { display: inline-flex; align-items: baseline; gap: var(--k-space-1); color: var(--k-text-secondary); font-weight: var(--k-weight-semibold); }
1616
+ .k-countdown--blocks { gap: var(--k-space-2); }
1617
+ .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); }
1618
+ .k-countdown__num { color: var(--k-text-primary); font-size: var(--k-text-2xl); line-height: 1.1; }
1619
+ .k-countdown__name { color: var(--k-text-tertiary); font-size: var(--k-text-xs); font-weight: var(--k-weight-medium); }
1620
+ .k-countdown__sep { align-self: center; color: var(--k-text-quaternary); }
1621
+ .k-countdown[data-done] { color: var(--k-text-tertiary); }
1622
+
1397
1623
  /* پنجرهٔ گفتگو — روی <dialog> بومی: تلهٔ فوکوس، Esc و غیرفعال شدن پس‌زمینه رایگان
1398
1624
  * اندازه‌ها: k-dialog--sm | k-dialog--md (پیش‌فرض) | k-dialog--lg
1399
1625
  *
@@ -1660,6 +1886,55 @@ html:has(.k-dialog[open]) { overflow: hidden; }
1660
1886
  .k-file__remove { grid-row: span 2; }
1661
1887
  .k-file .k-progress { grid-column: 2 / -1; }
1662
1888
 
1889
+ /* نقشهٔ فعالیت سالانه با ماه‌های شمسی — طیف تک‌رنگ برند از کم‌رنگ به پررنگ */
1890
+ .k-heatmap { --_cell: var(--k-heatmap-cell, 0.75rem); position: relative; display: grid; gap: var(--k-space-2); font-size: var(--k-text-xs); }
1891
+ .k-heatmap__scroll { overflow-x: auto; padding-block-end: var(--k-space-1); scrollbar-width: thin; }
1892
+ .k-heatmap__months { display: grid; grid-auto-flow: column; grid-auto-columns: calc(var(--_cell) + 3px); margin-inline-start: 1.75rem; color: var(--k-text-tertiary); }
1893
+ .k-heatmap__months span { white-space: nowrap; }
1894
+ .k-heatmap__body { display: flex; gap: var(--k-space-1_5); }
1895
+ .k-heatmap__days { display: grid; grid-template-rows: repeat(7, var(--_cell)); gap: 3px; inline-size: 1.25rem; color: var(--k-text-tertiary); line-height: var(--_cell); }
1896
+ .k-heatmap__grid { display: grid; grid-template-rows: repeat(7, var(--_cell)); grid-auto-flow: column; grid-auto-columns: var(--_cell); gap: 3px; }
1897
+ .k-heatmap__cell { border-radius: 2px; background: var(--k-bg-tertiary); }
1898
+ .k-heatmap__cell[data-l="1"] { background: color-mix(in srgb, var(--k-bg-brand) 30%, var(--k-bg-tertiary)); }
1899
+ .k-heatmap__cell[data-l="2"] { background: color-mix(in srgb, var(--k-bg-brand) 55%, var(--k-bg-tertiary)); }
1900
+ .k-heatmap__cell[data-l="3"] { background: color-mix(in srgb, var(--k-bg-brand) 80%, var(--k-bg-tertiary)); }
1901
+ .k-heatmap__cell[data-l="4"] { background: var(--k-bg-brand); }
1902
+ .k-heatmap__cell[data-empty] { background: transparent; }
1903
+ .k-heatmap__cell:hover { outline: 1px solid var(--k-text-secondary); outline-offset: 1px; }
1904
+ .k-heatmap__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--k-space-2); color: var(--k-text-tertiary); }
1905
+ .k-heatmap__scale { display: inline-flex; align-items: center; gap: 3px; }
1906
+ .k-heatmap__scale .k-heatmap__cell { inline-size: var(--_cell); block-size: var(--_cell); }
1907
+ @media (forced-colors: active) {
1908
+ .k-heatmap__cell { border: 1px solid CanvasText; }
1909
+ .k-heatmap__cell[data-l="4"], .k-heatmap__cell[data-l="3"] { background: CanvasText; forced-color-adjust: none; }
1910
+ }
1911
+
1912
+ /* ویرایش درجا: متن معمولی که با کلیک یا Enter به فیلد تبدیل می‌شود */
1913
+ .k-inline-edit { display: inline-flex; align-items: center; gap: var(--k-space-1); max-inline-size: 100%; }
1914
+ .k-inline-edit__view {
1915
+ display: inline-flex;
1916
+ align-items: center;
1917
+ gap: var(--k-space-1_5);
1918
+ min-inline-size: 4rem;
1919
+ margin-inline: calc(var(--k-space-2) * -1);
1920
+ padding: var(--k-space-1) var(--k-space-2);
1921
+ border: 0;
1922
+ border-radius: var(--k-radius-md);
1923
+ background: none;
1924
+ color: inherit;
1925
+ font: inherit;
1926
+ text-align: start;
1927
+ cursor: text;
1928
+ transition: background-color var(--k-duration-fast);
1929
+ }
1930
+ .k-inline-edit__view:hover { background: var(--k-bg-hover); }
1931
+ .k-inline-edit__view:focus-visible { outline: 2px solid transparent; box-shadow: var(--k-ring-brand); }
1932
+ .k-inline-edit__view svg { inline-size: 1rem; block-size: 1rem; color: var(--k-text-quaternary); opacity: 0; transition: opacity var(--k-duration-fast); }
1933
+ .k-inline-edit__view:is(:hover, :focus-visible) svg { opacity: 1; }
1934
+ .k-inline-edit__placeholder { color: var(--k-text-tertiary); }
1935
+ .k-inline-edit .k-input { --_h: 2.25rem; min-inline-size: 12rem; }
1936
+ .k-inline-edit__actions { display: inline-flex; gap: 2px; }
1937
+
1663
1938
  /* ورودی متن
1664
1939
  * <div class="k-input">
1665
1940
  * <span class="k-input__addon">svg یا متن</span>
@@ -1876,6 +2151,38 @@ html:has(.k-dialog[open]) { overflow: hidden; }
1876
2151
  .k-menu__item:focus { outline: 2px solid Highlight; }
1877
2152
  }
1878
2153
 
2154
+ /* منوی راست‌کلیک: جای منو از مختصات نشانگر */
2155
+ .k-context-area { position: relative; }
2156
+ .k-menu--context { position: fixed; inset: auto; inset-block-start: var(--_y); inset-inline-start: auto; left: var(--_x); }
2157
+ /* سبک پیش‌فرض مرورگر برای popover را خنثی می‌کند */
2158
+ .k-menu--context[popover] { margin: 0; padding: var(--k-space-1_5); border: 1px solid var(--k-border-secondary); color: inherit; overflow: visible; }
2159
+ .k-menu--context:popover-open { position: fixed; inset: auto; top: var(--_y); left: var(--_x); }
2160
+
2161
+ /* انتخاب ماه و سال شمسی */
2162
+ .k-monthpicker { display: grid; gap: var(--k-space-3); inline-size: var(--k-monthpicker-width, 18rem); }
2163
+ .k-monthpicker__header { display: flex; align-items: center; justify-content: space-between; gap: var(--k-space-2); }
2164
+ .k-monthpicker__year { color: var(--k-text-primary); font-size: var(--k-text-md); font-weight: var(--k-weight-semibold); }
2165
+ .k-monthpicker__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--k-space-1); }
2166
+ .k-monthpicker__month {
2167
+ block-size: 2.5rem;
2168
+ border: 0;
2169
+ border-radius: var(--k-radius-md);
2170
+ background: transparent;
2171
+ color: var(--k-text-secondary);
2172
+ font: inherit;
2173
+ font-size: var(--k-text-sm);
2174
+ font-weight: var(--k-weight-medium);
2175
+ cursor: pointer;
2176
+ }
2177
+ .k-monthpicker__month:hover { background: var(--k-bg-hover); color: var(--k-text-primary); }
2178
+ .k-monthpicker__month:focus-visible { outline: 2px solid transparent; box-shadow: var(--k-ring-brand); }
2179
+ .k-monthpicker__month[aria-current="date"] { color: var(--k-text-brand); font-weight: var(--k-weight-bold); }
2180
+ .k-monthpicker__month[aria-pressed="true"] { background: var(--k-bg-brand); color: var(--k-text-on-brand); font-weight: var(--k-weight-semibold); }
2181
+ .k-monthpicker__month:disabled { color: var(--k-text-quaternary); text-decoration: line-through; cursor: not-allowed; }
2182
+ @media (forced-colors: active) {
2183
+ .k-monthpicker__month[aria-pressed="true"] { outline: 2px solid Highlight; }
2184
+ }
2185
+
1879
2186
  /* ورودی عدد با دکمه‌های افزایش و کاهش */
1880
2187
  .k-number .k-input { padding-inline: var(--k-space-1); }
1881
2188
  .k-number .k-input__control { text-align: center; }
@@ -1985,6 +2292,25 @@ html:has(.k-dialog[open]) { overflow: hidden; }
1985
2292
  .k-pagination__summary { color: var(--k-text-tertiary); font-size: var(--k-text-sm); }
1986
2293
  @media (max-width: 36rem) { .k-pagination__pages li:not(:has([aria-current])):not(:first-child):not(:last-child) { display: none; } }
1987
2294
 
2295
+ /* قدرت رمز عبور: نوار چهارقسمتی + فهرست شرط‌ها */
2296
+ .k-strength { display: grid; gap: var(--k-space-2); }
2297
+ .k-strength__bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--k-space-1); }
2298
+ .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); }
2299
+ .k-strength[data-score="1"] .k-strength__bar:nth-child(-n + 1) { background: var(--k-text-error); }
2300
+ .k-strength[data-score="2"] .k-strength__bar:nth-child(-n + 2) { background: var(--k-text-warning); }
2301
+ .k-strength[data-score="3"] .k-strength__bar:nth-child(-n + 3) { background: var(--k-text-success); }
2302
+ .k-strength[data-score="4"] .k-strength__bar { background: var(--k-text-success); }
2303
+ .k-strength__label { color: var(--k-text-tertiary); font-size: var(--k-text-sm); }
2304
+ .k-strength__label strong { color: var(--k-text-secondary); font-weight: var(--k-weight-semibold); }
2305
+ .k-strength__rules { display: grid; gap: var(--k-space-1); margin: 0; padding: 0; list-style: none; }
2306
+ .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); }
2307
+ .k-strength__rule svg { inline-size: 1rem; block-size: 1rem; flex-shrink: 0; }
2308
+ .k-strength__rule[data-met] { color: var(--k-text-success); }
2309
+ @media (forced-colors: active) {
2310
+ .k-strength__bar { border: 1px solid CanvasText; }
2311
+ .k-strength[data-score] .k-strength__bar { forced-color-adjust: none; }
2312
+ }
2313
+
1988
2314
  /* پلاک خودروی ایران — نسبت واقعی ۵۲۰×۱۱۰ میلی‌متر و رنگ بر اساس نوع پلاک
1989
2315
  * ترتیب فیزیکی چپ‌به‌راست: نوار آبی (پرچم و I.R. IRAN) | دو رقم | حرف | سه رقم | «ایران» و کد استان
1990
2316
  * رنگ با data-type: private سفید، taxi/public/agricultural زرد، government قرمز، police سبز، army قهوه‌ای روشن، defense آبی روشن
@@ -3097,4 +3423,43 @@ html:has(.k-dialog[open]) { overflow: hidden; }
3097
3423
  .k-tooltip { border: 1px solid CanvasText; }
3098
3424
  }
3099
3425
 
3426
+ /* درخت (Tree view) — الگوی Tree در WAI-ARIA
3427
+ * <ul role="tree" class="k-tree"><li role="treeitem" aria-expanded="true" class="k-tree__item">…<ul role="group">…</ul></li></ul>
3428
+ */
3429
+ .k-tree, .k-tree [role="group"] { margin: 0; padding: 0; list-style: none; }
3430
+ .k-tree [role="group"] { padding-inline-start: var(--k-tree-indent, 1.25rem); }
3431
+ .k-tree__item { outline: 0; }
3432
+ .k-tree__row {
3433
+ display: flex;
3434
+ align-items: center;
3435
+ gap: var(--k-space-1_5);
3436
+ min-block-size: var(--k-tree-row-height, 2.25rem);
3437
+ padding-inline: var(--k-space-2);
3438
+ border-radius: var(--k-radius-md);
3439
+ color: var(--k-text-secondary);
3440
+ font-size: var(--k-text-sm);
3441
+ font-weight: var(--k-weight-medium);
3442
+ cursor: pointer;
3443
+ user-select: none;
3444
+ }
3445
+ .k-tree__row:hover { background: var(--k-bg-hover); color: var(--k-text-primary); }
3446
+ .k-tree__item:focus-visible > .k-tree__row { box-shadow: var(--k-ring-brand); }
3447
+ .k-tree__item[aria-selected="true"] > .k-tree__row { background: var(--k-bg-active); color: var(--k-text-primary); }
3448
+ .k-tree__item[aria-selected="true"] > .k-tree__row .k-tree__icon { color: var(--k-text-brand); }
3449
+ .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); }
3450
+ /* فلش «بسته» در RTL به چپ اشاره می‌کند */
3451
+ .k-tree__toggle svg { inline-size: 1rem; block-size: 1rem; }
3452
+ [dir="rtl"] .k-tree__toggle svg { scale: -1 1; }
3453
+ .k-tree__item[aria-expanded="true"] > .k-tree__row .k-tree__toggle { rotate: 90deg; }
3454
+ [dir="rtl"] .k-tree__item[aria-expanded="true"] > .k-tree__row .k-tree__toggle { rotate: -90deg; }
3455
+ .k-tree__spacer { flex-shrink: 0; inline-size: 1.25rem; }
3456
+ .k-tree__icon { display: inline-grid; flex-shrink: 0; color: var(--k-text-tertiary); }
3457
+ .k-tree__icon svg { inline-size: 1.125rem; block-size: 1.125rem; }
3458
+ .k-tree__label { flex: 1; min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
3459
+ .k-tree__meta { color: var(--k-text-tertiary); font-size: var(--k-text-xs); }
3460
+ .k-tree__item[aria-disabled="true"] > .k-tree__row { color: var(--k-text-quaternary); cursor: not-allowed; }
3461
+ @media (forced-colors: active) {
3462
+ .k-tree__item[aria-selected="true"] > .k-tree__row { outline: 2px solid Highlight; }
3463
+ }
3464
+
3100
3465
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kashi-ui/css",
3
- "version": "0.10.0",
3
+ "version": "0.12.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.10.0"
24
+ "@kashi-ui/tokens": "^0.12.0"
25
25
  },
26
26
  "devDependencies": {
27
27
  "vazirmatn": "^33.0.3"