@kashi-ui/css 0.26.0 → 1.0.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.
@@ -26,7 +26,7 @@
26
26
  background: var(--k-border-primary);
27
27
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m8 5 5 5-5 5'/%3E%3C/svg%3E") center / contain no-repeat;
28
28
  }
29
- [dir="rtl"] .k-breadcrumb li + li::before { transform: scaleX(-1); }
29
+ .k-breadcrumb li + li:dir(rtl)::before { transform: scaleX(-1); }
30
30
  .k-breadcrumb--slash li + li::before {
31
31
  content: "/";
32
32
  inline-size: auto;
@@ -159,7 +159,7 @@ a.k-btn[aria-disabled="true"]:not([aria-busy="true"]) {
159
159
  .k-btn svg { inline-size: 1.25em; block-size: 1.25em; flex-shrink: 0; }
160
160
 
161
161
  /* آیکون‌های جهت‌دار (فلش و…) در RTL آینه می‌شوند */
162
- [dir="rtl"] .k-btn [data-k-mirror] { transform: scaleX(-1); }
162
+ .k-btn [data-k-mirror]:dir(rtl) { transform: scaleX(-1); }
163
163
 
164
164
  /* در حال بارگذاری */
165
165
  .k-btn[aria-busy="true"] {
@@ -40,7 +40,7 @@
40
40
  font-weight: var(--k-weight-semibold);
41
41
  cursor: pointer;
42
42
  }
43
- [dir="ltr"] .k-calendar__select { background-position: right var(--k-space-1_5) center; }
43
+ .k-calendar__select:dir(ltr) { background-position: right var(--k-space-1_5) center; }
44
44
  .k-calendar__select:hover { background-color: var(--k-bg-hover); }
45
45
  .k-calendar__select:focus-visible { outline: 2px solid transparent; border-color: var(--k-border-brand); box-shadow: var(--k-ring-brand); }
46
46
  .k-calendar__select option { background: var(--k-bg-elevated); color: var(--k-text-primary); }
@@ -119,7 +119,7 @@ a.k-barlist__label:focus-visible { outline: 2px solid transparent; border-radius
119
119
 
120
120
  .k-sparkline { display: block; inline-size: 100%; block-size: 2rem; overflow: visible; }
121
121
  /* زمان در جهت خواندن، هماهنگ با LineChart */
122
- [dir="rtl"] .k-sparkline { scale: -1 1; }
122
+ .k-sparkline:dir(rtl) { scale: -1 1; }
123
123
  @media (forced-colors: active) {
124
124
  .k-proportion__seg, .k-bars__seg, .k-barlist__fill { background: CanvasText; forced-color-adjust: none; }
125
125
  }
@@ -140,7 +140,7 @@ a.k-barlist__label:focus-visible { outline: 2px solid transparent; border-radius
140
140
  @media (prefers-reduced-motion: no-preference) {
141
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
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%; }
143
+ .k-barlist__fill:dir(ltr) { transform-origin: 0 50%; }
144
144
  .k-proportion__seg { animation: k-fade 0.6s var(--k-ease-standard) both; }
145
145
  .k-chart__line { stroke-dasharray: 1; animation: k-draw 1.2s var(--k-ease-standard) both; }
146
146
  .k-chart__area { animation: k-fade 1s 0.4s both; }
@@ -86,8 +86,8 @@
86
86
  .k-dialog--end[open] { animation: k-drawer-end var(--k-duration-slow) var(--k-ease-standard); }
87
87
  @keyframes k-drawer-start { from { translate: 100% 0; } }
88
88
  @keyframes k-drawer-end { from { translate: -100% 0; } }
89
- [dir="ltr"] .k-dialog--start[open] { animation-name: k-drawer-end; }
90
- [dir="ltr"] .k-dialog--end[open] { animation-name: k-drawer-start; }
89
+ .k-dialog--start[open]:dir(ltr) { animation-name: k-drawer-end; }
90
+ .k-dialog--end[open]:dir(ltr) { animation-name: k-drawer-start; }
91
91
 
92
92
  .k-dialog--bottom {
93
93
  inline-size: min(var(--k-dialog-width, 40rem), 100vw);
@@ -11,6 +11,9 @@
11
11
  /* ستون تنها با عرض فیلد کوچک می‌شود؛ وگرنه input در ستون باریک (مثل «پلاک») از فیلد بیرون می‌زند */
12
12
  grid-template-columns: minmax(0, 1fr);
13
13
  gap: var(--k-field-gap, var(--k-space-1_5));
14
+ /* فیلدهای کنار هم در یک ردیف (grid یا flex) هم‌قد کشیده می‌شوند؛ وقتی یکی خطا یا راهنما دارد،
15
+ جای اضافه نباید بین برچسب و کادر پخش شود، تا کادرهای ردیف از بالا هم‌تراز بمانند */
16
+ align-content: start;
14
17
  min-inline-size: 0;
15
18
  }
16
19
 
@@ -102,7 +102,11 @@
102
102
  direction: rtl;
103
103
  text-align: start;
104
104
  }
105
- [dir="ltr"] .k-input__control:is([type="email"], [type="url"], [type="tel"], [type="number"], [type="password"]):placeholder-shown {
105
+ /* در صفحه یا بخش چپ‌به‌راست (مثلاً رابط انگلیسی) همین فیلدها از چپ شروع می‌شوند؛ :dir جهت خود قاب را می‌سنجد، نه صفحه را */
106
+ .k-input:dir(ltr) .k-input__control:is([type="email"], [type="url"], [type="tel"], [type="number"], [type="password"], [dir="ltr"]) {
107
+ text-align: start;
108
+ }
109
+ .k-input:dir(ltr) .k-input__control:is([type="email"], [type="url"], [type="tel"], [type="number"], [type="password"]):placeholder-shown {
106
110
  direction: ltr;
107
111
  }
108
112
 
@@ -33,7 +33,7 @@
33
33
  animation: k-progress-indeterminate 1.4s var(--k-ease-standard) infinite;
34
34
  }
35
35
  @keyframes k-progress-indeterminate { from { translate: 120% 0; } to { translate: -260% 0; } }
36
- [dir="ltr"] .k-progress:not([aria-valuenow]) .k-progress__bar { animation-direction: reverse; }
36
+ .k-progress:not([aria-valuenow]) .k-progress__bar:dir(ltr) { animation-direction: reverse; }
37
37
 
38
38
  /* حلقهٔ پیشرفت */
39
39
  .k-progress-ring {
@@ -51,7 +51,7 @@
51
51
  .k-progress-ring.k-progress--warning { --_c: var(--k-text-warning); }
52
52
  .k-progress-ring.k-progress--error { --_c: var(--k-text-error); }
53
53
  .k-progress-ring svg { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; rotate: -90deg; }
54
- [dir="rtl"] .k-progress-ring svg { scale: -1 1; rotate: 90deg; }
54
+ .k-progress-ring svg:dir(rtl) { scale: -1 1; rotate: 90deg; }
55
55
  .k-progress-ring circle { fill: none; stroke-width: 4; }
56
56
  .k-progress-ring__track { stroke: var(--k-bg-tertiary); }
57
57
  .k-progress-ring__bar { stroke: var(--_c); stroke-linecap: round; transition: stroke-dashoffset var(--k-duration-slow) var(--k-ease-standard); }
@@ -29,7 +29,7 @@
29
29
  translate: -50% -50%;
30
30
  transition: background-color var(--k-duration-fast), border-color var(--k-duration-fast);
31
31
  }
32
- [dir="rtl"] .k-splitter__handle::after { translate: 50% -50%; }
32
+ .k-splitter__handle:dir(rtl)::after { translate: 50% -50%; }
33
33
  .k-splitter--vertical .k-splitter__handle::after { inline-size: 2rem; block-size: 6px; }
34
34
  .k-splitter__handle:is(:hover, [data-dragging])::after { border-color: var(--k-border-brand); background: var(--k-bg-brand); }
35
35
  .k-splitter__handle:focus-visible::after { box-shadow: var(--k-ring-brand); border-color: var(--k-border-brand); }
@@ -105,8 +105,8 @@
105
105
  .k-tabs--line .k-tabs__indicator { top: auto; bottom: -1px; block-size: 2px; border-radius: 2px; background: var(--k-tabs-indicator, var(--k-border-brand)); }
106
106
  .k-tabs--line .k-tabs__list[data-indicator] { overflow-y: hidden; }
107
107
  .k-tabs--vertical.k-tabs--line .k-tabs__indicator { inset-inline: auto; left: auto; top: var(--_iy); bottom: auto; inline-size: 2px; block-size: var(--_ih); }
108
- [dir="rtl"] .k-tabs--vertical.k-tabs--line .k-tabs__indicator { right: -1px; }
109
- [dir="ltr"] .k-tabs--vertical.k-tabs--line .k-tabs__indicator { left: -1px; }
108
+ .k-tabs--vertical.k-tabs--line .k-tabs__indicator:dir(rtl) { right: -1px; }
109
+ .k-tabs--vertical.k-tabs--line .k-tabs__indicator:dir(ltr) { left: -1px; }
110
110
  /* قرصی و چندبخشی: پس‌زمینهٔ زبانهٔ فعال می‌لغزد */
111
111
  .k-tabs--pill .k-tabs__list[data-indicator] .k-tabs__tab[aria-selected="true"] { background: transparent; }
112
112
  .k-tabs--pill .k-tabs__indicator { border-radius: var(--k-tab-radius, var(--k-radius-md)); background: var(--k-bg-brand-subtle); }
@@ -71,7 +71,7 @@
71
71
  transform-origin: var(--_origin, right);
72
72
  animation: k-toast-progress linear forwards;
73
73
  }
74
- [dir="ltr"] .k-toast__progress { --_origin: left; }
74
+ .k-toast__progress:dir(ltr) { --_origin: left; }
75
75
  .k-toast:is(:hover, :focus-within) .k-toast__progress { animation-play-state: paused; }
76
76
  @keyframes k-toast-progress { to { scale: 0 1; } }
77
77
 
@@ -25,7 +25,7 @@
25
25
  pointer-events: auto;
26
26
  animation: k-tip-in var(--k-duration-fast) var(--k-ease-standard);
27
27
  }
28
- [dir="ltr"] .k-tooltip { translate: -50% 0; }
28
+ .k-tooltip:dir(ltr) { translate: -50% 0; }
29
29
  .k-tooltip[hidden] { display: none; }
30
30
  .k-tooltip--bottom { inset-block: calc(100% + 8px) auto; }
31
31
 
@@ -39,10 +39,10 @@
39
39
  border: 5px solid transparent;
40
40
  border-block-start-color: var(--k-tooltip-bg, var(--k-text-primary));
41
41
  }
42
- [dir="ltr"] .k-tooltip::after { translate: -50% 0; }
42
+ .k-tooltip:dir(ltr)::after { translate: -50% 0; }
43
43
  .k-tooltip--bottom::after { inset-block: auto 100%; border-block-start-color: transparent; border-block-end-color: var(--k-tooltip-bg, var(--k-text-primary)); }
44
44
  @keyframes k-tip-in { from { opacity: 0; translate: 50% 3px; } }
45
- [dir="ltr"] .k-tooltip { animation-name: k-tip-in-ltr; }
45
+ .k-tooltip:dir(ltr) { animation-name: k-tip-in-ltr; }
46
46
  @keyframes k-tip-in-ltr { from { opacity: 0; translate: -50% 3px; } }
47
47
 
48
48
  /* کنار عنصر */
@@ -24,9 +24,9 @@
24
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
25
  /* فلش «بسته» در RTL به چپ اشاره می‌کند */
26
26
  .k-tree__toggle svg { inline-size: 1rem; block-size: 1rem; }
27
- [dir="rtl"] .k-tree__toggle svg { scale: -1 1; }
27
+ .k-tree__toggle svg:dir(rtl) { scale: -1 1; }
28
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; }
29
+ .k-tree__item[aria-expanded="true"] > .k-tree__row .k-tree__toggle:dir(rtl) { rotate: -90deg; }
30
30
  .k-tree__spacer { flex-shrink: 0; inline-size: 1.25rem; }
31
31
  .k-tree__icon { display: inline-grid; flex-shrink: 0; color: var(--k-text-tertiary); }
32
32
  .k-tree__icon svg { inline-size: 1.125rem; block-size: 1.125rem; }
package/dist/kashi.css CHANGED
@@ -868,7 +868,7 @@
868
868
  background: var(--k-border-primary);
869
869
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m8 5 5 5-5 5'/%3E%3C/svg%3E") center / contain no-repeat;
870
870
  }
871
- [dir="rtl"] .k-breadcrumb li + li::before { transform: scaleX(-1); }
871
+ .k-breadcrumb li + li:dir(rtl)::before { transform: scaleX(-1); }
872
872
  .k-breadcrumb--slash li + li::before {
873
873
  content: "/";
874
874
  inline-size: auto;
@@ -1092,7 +1092,7 @@ a.k-btn[aria-disabled="true"]:not([aria-busy="true"]) {
1092
1092
  .k-btn svg { inline-size: 1.25em; block-size: 1.25em; flex-shrink: 0; }
1093
1093
 
1094
1094
  /* آیکون‌های جهت‌دار (فلش و…) در RTL آینه می‌شوند */
1095
- [dir="rtl"] .k-btn [data-k-mirror] { transform: scaleX(-1); }
1095
+ .k-btn [data-k-mirror]:dir(rtl) { transform: scaleX(-1); }
1096
1096
 
1097
1097
  /* در حال بارگذاری */
1098
1098
  .k-btn[aria-busy="true"] {
@@ -1162,7 +1162,7 @@ a.k-btn[aria-disabled="true"]:not([aria-busy="true"]) {
1162
1162
  font-weight: var(--k-weight-semibold);
1163
1163
  cursor: pointer;
1164
1164
  }
1165
- [dir="ltr"] .k-calendar__select { background-position: right var(--k-space-1_5) center; }
1165
+ .k-calendar__select:dir(ltr) { background-position: right var(--k-space-1_5) center; }
1166
1166
  .k-calendar__select:hover { background-color: var(--k-bg-hover); }
1167
1167
  .k-calendar__select:focus-visible { outline: 2px solid transparent; border-color: var(--k-border-brand); box-shadow: var(--k-ring-brand); }
1168
1168
  .k-calendar__select option { background: var(--k-bg-elevated); color: var(--k-text-primary); }
@@ -1551,7 +1551,7 @@ a.k-barlist__label:focus-visible { outline: 2px solid transparent; border-radius
1551
1551
 
1552
1552
  .k-sparkline { display: block; inline-size: 100%; block-size: 2rem; overflow: visible; }
1553
1553
  /* زمان در جهت خواندن، هماهنگ با LineChart */
1554
- [dir="rtl"] .k-sparkline { scale: -1 1; }
1554
+ .k-sparkline:dir(rtl) { scale: -1 1; }
1555
1555
  @media (forced-colors: active) {
1556
1556
  .k-proportion__seg, .k-bars__seg, .k-barlist__fill { background: CanvasText; forced-color-adjust: none; }
1557
1557
  }
@@ -1572,7 +1572,7 @@ a.k-barlist__label:focus-visible { outline: 2px solid transparent; border-radius
1572
1572
  @media (prefers-reduced-motion: no-preference) {
1573
1573
  .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); }
1574
1574
  .k-barlist__fill { transform-origin: 100% 50%; animation: k-grow-x 0.8s var(--k-ease-standard) both; animation-delay: var(--_d, 0ms); }
1575
- [dir="ltr"] .k-barlist__fill { transform-origin: 0 50%; }
1575
+ .k-barlist__fill:dir(ltr) { transform-origin: 0 50%; }
1576
1576
  .k-proportion__seg { animation: k-fade 0.6s var(--k-ease-standard) both; }
1577
1577
  .k-chart__line { stroke-dasharray: 1; animation: k-draw 1.2s var(--k-ease-standard) both; }
1578
1578
  .k-chart__area { animation: k-fade 1s 0.4s both; }
@@ -1983,8 +1983,8 @@ a.k-barlist__label:focus-visible { outline: 2px solid transparent; border-radius
1983
1983
  .k-dialog--end[open] { animation: k-drawer-end var(--k-duration-slow) var(--k-ease-standard); }
1984
1984
  @keyframes k-drawer-start { from { translate: 100% 0; } }
1985
1985
  @keyframes k-drawer-end { from { translate: -100% 0; } }
1986
- [dir="ltr"] .k-dialog--start[open] { animation-name: k-drawer-end; }
1987
- [dir="ltr"] .k-dialog--end[open] { animation-name: k-drawer-start; }
1986
+ .k-dialog--start[open]:dir(ltr) { animation-name: k-drawer-end; }
1987
+ .k-dialog--end[open]:dir(ltr) { animation-name: k-drawer-start; }
1988
1988
 
1989
1989
  .k-dialog--bottom {
1990
1990
  inline-size: min(var(--k-dialog-width, 40rem), 100vw);
@@ -2086,6 +2086,9 @@ html:has(.k-dialog[open]) { overflow: hidden; }
2086
2086
  /* ستون تنها با عرض فیلد کوچک می‌شود؛ وگرنه input در ستون باریک (مثل «پلاک») از فیلد بیرون می‌زند */
2087
2087
  grid-template-columns: minmax(0, 1fr);
2088
2088
  gap: var(--k-field-gap, var(--k-space-1_5));
2089
+ /* فیلدهای کنار هم در یک ردیف (grid یا flex) هم‌قد کشیده می‌شوند؛ وقتی یکی خطا یا راهنما دارد،
2090
+ جای اضافه نباید بین برچسب و کادر پخش شود، تا کادرهای ردیف از بالا هم‌تراز بمانند */
2091
+ align-content: start;
2089
2092
  min-inline-size: 0;
2090
2093
  }
2091
2094
 
@@ -2317,7 +2320,11 @@ html:has(.k-dialog[open]) { overflow: hidden; }
2317
2320
  direction: rtl;
2318
2321
  text-align: start;
2319
2322
  }
2320
- [dir="ltr"] .k-input__control:is([type="email"], [type="url"], [type="tel"], [type="number"], [type="password"]):placeholder-shown {
2323
+ /* در صفحه یا بخش چپ‌به‌راست (مثلاً رابط انگلیسی) همین فیلدها از چپ شروع می‌شوند؛ :dir جهت خود قاب را می‌سنجد، نه صفحه را */
2324
+ .k-input:dir(ltr) .k-input__control:is([type="email"], [type="url"], [type="tel"], [type="number"], [type="password"], [dir="ltr"]) {
2325
+ text-align: start;
2326
+ }
2327
+ .k-input:dir(ltr) .k-input__control:is([type="email"], [type="url"], [type="tel"], [type="number"], [type="password"]):placeholder-shown {
2321
2328
  direction: ltr;
2322
2329
  }
2323
2330
 
@@ -2989,7 +2996,7 @@ html:has(.k-dialog[open]) { overflow: hidden; }
2989
2996
  animation: k-progress-indeterminate 1.4s var(--k-ease-standard) infinite;
2990
2997
  }
2991
2998
  @keyframes k-progress-indeterminate { from { translate: 120% 0; } to { translate: -260% 0; } }
2992
- [dir="ltr"] .k-progress:not([aria-valuenow]) .k-progress__bar { animation-direction: reverse; }
2999
+ .k-progress:not([aria-valuenow]) .k-progress__bar:dir(ltr) { animation-direction: reverse; }
2993
3000
 
2994
3001
  /* حلقهٔ پیشرفت */
2995
3002
  .k-progress-ring {
@@ -3007,7 +3014,7 @@ html:has(.k-dialog[open]) { overflow: hidden; }
3007
3014
  .k-progress-ring.k-progress--warning { --_c: var(--k-text-warning); }
3008
3015
  .k-progress-ring.k-progress--error { --_c: var(--k-text-error); }
3009
3016
  .k-progress-ring svg { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; rotate: -90deg; }
3010
- [dir="rtl"] .k-progress-ring svg { scale: -1 1; rotate: 90deg; }
3017
+ .k-progress-ring svg:dir(rtl) { scale: -1 1; rotate: 90deg; }
3011
3018
  .k-progress-ring circle { fill: none; stroke-width: 4; }
3012
3019
  .k-progress-ring__track { stroke: var(--k-bg-tertiary); }
3013
3020
  .k-progress-ring__bar { stroke: var(--_c); stroke-linecap: round; transition: stroke-dashoffset var(--k-duration-slow) var(--k-ease-standard); }
@@ -3398,7 +3405,7 @@ html:has(.k-dialog[open]) { overflow: hidden; }
3398
3405
  translate: -50% -50%;
3399
3406
  transition: background-color var(--k-duration-fast), border-color var(--k-duration-fast);
3400
3407
  }
3401
- [dir="rtl"] .k-splitter__handle::after { translate: 50% -50%; }
3408
+ .k-splitter__handle:dir(rtl)::after { translate: 50% -50%; }
3402
3409
  .k-splitter--vertical .k-splitter__handle::after { inline-size: 2rem; block-size: 6px; }
3403
3410
  .k-splitter__handle:is(:hover, [data-dragging])::after { border-color: var(--k-border-brand); background: var(--k-bg-brand); }
3404
3411
  .k-splitter__handle:focus-visible::after { box-shadow: var(--k-ring-brand); border-color: var(--k-border-brand); }
@@ -3774,8 +3781,8 @@ html:has(.k-dialog[open]) { overflow: hidden; }
3774
3781
  .k-tabs--line .k-tabs__indicator { top: auto; bottom: -1px; block-size: 2px; border-radius: 2px; background: var(--k-tabs-indicator, var(--k-border-brand)); }
3775
3782
  .k-tabs--line .k-tabs__list[data-indicator] { overflow-y: hidden; }
3776
3783
  .k-tabs--vertical.k-tabs--line .k-tabs__indicator { inset-inline: auto; left: auto; top: var(--_iy); bottom: auto; inline-size: 2px; block-size: var(--_ih); }
3777
- [dir="rtl"] .k-tabs--vertical.k-tabs--line .k-tabs__indicator { right: -1px; }
3778
- [dir="ltr"] .k-tabs--vertical.k-tabs--line .k-tabs__indicator { left: -1px; }
3784
+ .k-tabs--vertical.k-tabs--line .k-tabs__indicator:dir(rtl) { right: -1px; }
3785
+ .k-tabs--vertical.k-tabs--line .k-tabs__indicator:dir(ltr) { left: -1px; }
3779
3786
  /* قرصی و چندبخشی: پس‌زمینهٔ زبانهٔ فعال می‌لغزد */
3780
3787
  .k-tabs--pill .k-tabs__list[data-indicator] .k-tabs__tab[aria-selected="true"] { background: transparent; }
3781
3788
  .k-tabs--pill .k-tabs__indicator { border-radius: var(--k-tab-radius, var(--k-radius-md)); background: var(--k-bg-brand-subtle); }
@@ -3915,7 +3922,7 @@ html:has(.k-dialog[open]) { overflow: hidden; }
3915
3922
  transform-origin: var(--_origin, right);
3916
3923
  animation: k-toast-progress linear forwards;
3917
3924
  }
3918
- [dir="ltr"] .k-toast__progress { --_origin: left; }
3925
+ .k-toast__progress:dir(ltr) { --_origin: left; }
3919
3926
  .k-toast:is(:hover, :focus-within) .k-toast__progress { animation-play-state: paused; }
3920
3927
  @keyframes k-toast-progress { to { scale: 0 1; } }
3921
3928
 
@@ -3953,7 +3960,7 @@ html:has(.k-dialog[open]) { overflow: hidden; }
3953
3960
  pointer-events: auto;
3954
3961
  animation: k-tip-in var(--k-duration-fast) var(--k-ease-standard);
3955
3962
  }
3956
- [dir="ltr"] .k-tooltip { translate: -50% 0; }
3963
+ .k-tooltip:dir(ltr) { translate: -50% 0; }
3957
3964
  .k-tooltip[hidden] { display: none; }
3958
3965
  .k-tooltip--bottom { inset-block: calc(100% + 8px) auto; }
3959
3966
 
@@ -3967,10 +3974,10 @@ html:has(.k-dialog[open]) { overflow: hidden; }
3967
3974
  border: 5px solid transparent;
3968
3975
  border-block-start-color: var(--k-tooltip-bg, var(--k-text-primary));
3969
3976
  }
3970
- [dir="ltr"] .k-tooltip::after { translate: -50% 0; }
3977
+ .k-tooltip:dir(ltr)::after { translate: -50% 0; }
3971
3978
  .k-tooltip--bottom::after { inset-block: auto 100%; border-block-start-color: transparent; border-block-end-color: var(--k-tooltip-bg, var(--k-text-primary)); }
3972
3979
  @keyframes k-tip-in { from { opacity: 0; translate: 50% 3px; } }
3973
- [dir="ltr"] .k-tooltip { animation-name: k-tip-in-ltr; }
3980
+ .k-tooltip:dir(ltr) { animation-name: k-tip-in-ltr; }
3974
3981
  @keyframes k-tip-in-ltr { from { opacity: 0; translate: -50% 3px; } }
3975
3982
 
3976
3983
  /* کنار عنصر */
@@ -4042,9 +4049,9 @@ html:has(.k-dialog[open]) { overflow: hidden; }
4042
4049
  .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); }
4043
4050
  /* فلش «بسته» در RTL به چپ اشاره می‌کند */
4044
4051
  .k-tree__toggle svg { inline-size: 1rem; block-size: 1rem; }
4045
- [dir="rtl"] .k-tree__toggle svg { scale: -1 1; }
4052
+ .k-tree__toggle svg:dir(rtl) { scale: -1 1; }
4046
4053
  .k-tree__item[aria-expanded="true"] > .k-tree__row .k-tree__toggle { rotate: 90deg; }
4047
- [dir="rtl"] .k-tree__item[aria-expanded="true"] > .k-tree__row .k-tree__toggle { rotate: -90deg; }
4054
+ .k-tree__item[aria-expanded="true"] > .k-tree__row .k-tree__toggle:dir(rtl) { rotate: -90deg; }
4048
4055
  .k-tree__spacer { flex-shrink: 0; inline-size: 1.25rem; }
4049
4056
  .k-tree__icon { display: inline-grid; flex-shrink: 0; color: var(--k-text-tertiary); }
4050
4057
  .k-tree__icon svg { inline-size: 1.125rem; block-size: 1.125rem; }
@@ -860,7 +860,7 @@
860
860
  background: var(--k-border-primary);
861
861
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m8 5 5 5-5 5'/%3E%3C/svg%3E") center / contain no-repeat;
862
862
  }
863
- [dir="rtl"] .k-breadcrumb li + li::before { transform: scaleX(-1); }
863
+ .k-breadcrumb li + li:dir(rtl)::before { transform: scaleX(-1); }
864
864
  .k-breadcrumb--slash li + li::before {
865
865
  content: "/";
866
866
  inline-size: auto;
@@ -1084,7 +1084,7 @@ a.k-btn[aria-disabled="true"]:not([aria-busy="true"]) {
1084
1084
  .k-btn svg { inline-size: 1.25em; block-size: 1.25em; flex-shrink: 0; }
1085
1085
 
1086
1086
  /* آیکون‌های جهت‌دار (فلش و…) در RTL آینه می‌شوند */
1087
- [dir="rtl"] .k-btn [data-k-mirror] { transform: scaleX(-1); }
1087
+ .k-btn [data-k-mirror]:dir(rtl) { transform: scaleX(-1); }
1088
1088
 
1089
1089
  /* در حال بارگذاری */
1090
1090
  .k-btn[aria-busy="true"] {
@@ -1154,7 +1154,7 @@ a.k-btn[aria-disabled="true"]:not([aria-busy="true"]) {
1154
1154
  font-weight: var(--k-weight-semibold);
1155
1155
  cursor: pointer;
1156
1156
  }
1157
- [dir="ltr"] .k-calendar__select { background-position: right var(--k-space-1_5) center; }
1157
+ .k-calendar__select:dir(ltr) { background-position: right var(--k-space-1_5) center; }
1158
1158
  .k-calendar__select:hover { background-color: var(--k-bg-hover); }
1159
1159
  .k-calendar__select:focus-visible { outline: 2px solid transparent; border-color: var(--k-border-brand); box-shadow: var(--k-ring-brand); }
1160
1160
  .k-calendar__select option { background: var(--k-bg-elevated); color: var(--k-text-primary); }
@@ -1543,7 +1543,7 @@ a.k-barlist__label:focus-visible { outline: 2px solid transparent; border-radius
1543
1543
 
1544
1544
  .k-sparkline { display: block; inline-size: 100%; block-size: 2rem; overflow: visible; }
1545
1545
  /* زمان در جهت خواندن، هماهنگ با LineChart */
1546
- [dir="rtl"] .k-sparkline { scale: -1 1; }
1546
+ .k-sparkline:dir(rtl) { scale: -1 1; }
1547
1547
  @media (forced-colors: active) {
1548
1548
  .k-proportion__seg, .k-bars__seg, .k-barlist__fill { background: CanvasText; forced-color-adjust: none; }
1549
1549
  }
@@ -1564,7 +1564,7 @@ a.k-barlist__label:focus-visible { outline: 2px solid transparent; border-radius
1564
1564
  @media (prefers-reduced-motion: no-preference) {
1565
1565
  .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); }
1566
1566
  .k-barlist__fill { transform-origin: 100% 50%; animation: k-grow-x 0.8s var(--k-ease-standard) both; animation-delay: var(--_d, 0ms); }
1567
- [dir="ltr"] .k-barlist__fill { transform-origin: 0 50%; }
1567
+ .k-barlist__fill:dir(ltr) { transform-origin: 0 50%; }
1568
1568
  .k-proportion__seg { animation: k-fade 0.6s var(--k-ease-standard) both; }
1569
1569
  .k-chart__line { stroke-dasharray: 1; animation: k-draw 1.2s var(--k-ease-standard) both; }
1570
1570
  .k-chart__area { animation: k-fade 1s 0.4s both; }
@@ -1975,8 +1975,8 @@ a.k-barlist__label:focus-visible { outline: 2px solid transparent; border-radius
1975
1975
  .k-dialog--end[open] { animation: k-drawer-end var(--k-duration-slow) var(--k-ease-standard); }
1976
1976
  @keyframes k-drawer-start { from { translate: 100% 0; } }
1977
1977
  @keyframes k-drawer-end { from { translate: -100% 0; } }
1978
- [dir="ltr"] .k-dialog--start[open] { animation-name: k-drawer-end; }
1979
- [dir="ltr"] .k-dialog--end[open] { animation-name: k-drawer-start; }
1978
+ .k-dialog--start[open]:dir(ltr) { animation-name: k-drawer-end; }
1979
+ .k-dialog--end[open]:dir(ltr) { animation-name: k-drawer-start; }
1980
1980
 
1981
1981
  .k-dialog--bottom {
1982
1982
  inline-size: min(var(--k-dialog-width, 40rem), 100vw);
@@ -2078,6 +2078,9 @@ html:has(.k-dialog[open]) { overflow: hidden; }
2078
2078
  /* ستون تنها با عرض فیلد کوچک می‌شود؛ وگرنه input در ستون باریک (مثل «پلاک») از فیلد بیرون می‌زند */
2079
2079
  grid-template-columns: minmax(0, 1fr);
2080
2080
  gap: var(--k-field-gap, var(--k-space-1_5));
2081
+ /* فیلدهای کنار هم در یک ردیف (grid یا flex) هم‌قد کشیده می‌شوند؛ وقتی یکی خطا یا راهنما دارد،
2082
+ جای اضافه نباید بین برچسب و کادر پخش شود، تا کادرهای ردیف از بالا هم‌تراز بمانند */
2083
+ align-content: start;
2081
2084
  min-inline-size: 0;
2082
2085
  }
2083
2086
 
@@ -2309,7 +2312,11 @@ html:has(.k-dialog[open]) { overflow: hidden; }
2309
2312
  direction: rtl;
2310
2313
  text-align: start;
2311
2314
  }
2312
- [dir="ltr"] .k-input__control:is([type="email"], [type="url"], [type="tel"], [type="number"], [type="password"]):placeholder-shown {
2315
+ /* در صفحه یا بخش چپ‌به‌راست (مثلاً رابط انگلیسی) همین فیلدها از چپ شروع می‌شوند؛ :dir جهت خود قاب را می‌سنجد، نه صفحه را */
2316
+ .k-input:dir(ltr) .k-input__control:is([type="email"], [type="url"], [type="tel"], [type="number"], [type="password"], [dir="ltr"]) {
2317
+ text-align: start;
2318
+ }
2319
+ .k-input:dir(ltr) .k-input__control:is([type="email"], [type="url"], [type="tel"], [type="number"], [type="password"]):placeholder-shown {
2313
2320
  direction: ltr;
2314
2321
  }
2315
2322
 
@@ -2981,7 +2988,7 @@ html:has(.k-dialog[open]) { overflow: hidden; }
2981
2988
  animation: k-progress-indeterminate 1.4s var(--k-ease-standard) infinite;
2982
2989
  }
2983
2990
  @keyframes k-progress-indeterminate { from { translate: 120% 0; } to { translate: -260% 0; } }
2984
- [dir="ltr"] .k-progress:not([aria-valuenow]) .k-progress__bar { animation-direction: reverse; }
2991
+ .k-progress:not([aria-valuenow]) .k-progress__bar:dir(ltr) { animation-direction: reverse; }
2985
2992
 
2986
2993
  /* حلقهٔ پیشرفت */
2987
2994
  .k-progress-ring {
@@ -2999,7 +3006,7 @@ html:has(.k-dialog[open]) { overflow: hidden; }
2999
3006
  .k-progress-ring.k-progress--warning { --_c: var(--k-text-warning); }
3000
3007
  .k-progress-ring.k-progress--error { --_c: var(--k-text-error); }
3001
3008
  .k-progress-ring svg { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; rotate: -90deg; }
3002
- [dir="rtl"] .k-progress-ring svg { scale: -1 1; rotate: 90deg; }
3009
+ .k-progress-ring svg:dir(rtl) { scale: -1 1; rotate: 90deg; }
3003
3010
  .k-progress-ring circle { fill: none; stroke-width: 4; }
3004
3011
  .k-progress-ring__track { stroke: var(--k-bg-tertiary); }
3005
3012
  .k-progress-ring__bar { stroke: var(--_c); stroke-linecap: round; transition: stroke-dashoffset var(--k-duration-slow) var(--k-ease-standard); }
@@ -3390,7 +3397,7 @@ html:has(.k-dialog[open]) { overflow: hidden; }
3390
3397
  translate: -50% -50%;
3391
3398
  transition: background-color var(--k-duration-fast), border-color var(--k-duration-fast);
3392
3399
  }
3393
- [dir="rtl"] .k-splitter__handle::after { translate: 50% -50%; }
3400
+ .k-splitter__handle:dir(rtl)::after { translate: 50% -50%; }
3394
3401
  .k-splitter--vertical .k-splitter__handle::after { inline-size: 2rem; block-size: 6px; }
3395
3402
  .k-splitter__handle:is(:hover, [data-dragging])::after { border-color: var(--k-border-brand); background: var(--k-bg-brand); }
3396
3403
  .k-splitter__handle:focus-visible::after { box-shadow: var(--k-ring-brand); border-color: var(--k-border-brand); }
@@ -3766,8 +3773,8 @@ html:has(.k-dialog[open]) { overflow: hidden; }
3766
3773
  .k-tabs--line .k-tabs__indicator { top: auto; bottom: -1px; block-size: 2px; border-radius: 2px; background: var(--k-tabs-indicator, var(--k-border-brand)); }
3767
3774
  .k-tabs--line .k-tabs__list[data-indicator] { overflow-y: hidden; }
3768
3775
  .k-tabs--vertical.k-tabs--line .k-tabs__indicator { inset-inline: auto; left: auto; top: var(--_iy); bottom: auto; inline-size: 2px; block-size: var(--_ih); }
3769
- [dir="rtl"] .k-tabs--vertical.k-tabs--line .k-tabs__indicator { right: -1px; }
3770
- [dir="ltr"] .k-tabs--vertical.k-tabs--line .k-tabs__indicator { left: -1px; }
3776
+ .k-tabs--vertical.k-tabs--line .k-tabs__indicator:dir(rtl) { right: -1px; }
3777
+ .k-tabs--vertical.k-tabs--line .k-tabs__indicator:dir(ltr) { left: -1px; }
3771
3778
  /* قرصی و چندبخشی: پس‌زمینهٔ زبانهٔ فعال می‌لغزد */
3772
3779
  .k-tabs--pill .k-tabs__list[data-indicator] .k-tabs__tab[aria-selected="true"] { background: transparent; }
3773
3780
  .k-tabs--pill .k-tabs__indicator { border-radius: var(--k-tab-radius, var(--k-radius-md)); background: var(--k-bg-brand-subtle); }
@@ -3907,7 +3914,7 @@ html:has(.k-dialog[open]) { overflow: hidden; }
3907
3914
  transform-origin: var(--_origin, right);
3908
3915
  animation: k-toast-progress linear forwards;
3909
3916
  }
3910
- [dir="ltr"] .k-toast__progress { --_origin: left; }
3917
+ .k-toast__progress:dir(ltr) { --_origin: left; }
3911
3918
  .k-toast:is(:hover, :focus-within) .k-toast__progress { animation-play-state: paused; }
3912
3919
  @keyframes k-toast-progress { to { scale: 0 1; } }
3913
3920
 
@@ -3945,7 +3952,7 @@ html:has(.k-dialog[open]) { overflow: hidden; }
3945
3952
  pointer-events: auto;
3946
3953
  animation: k-tip-in var(--k-duration-fast) var(--k-ease-standard);
3947
3954
  }
3948
- [dir="ltr"] .k-tooltip { translate: -50% 0; }
3955
+ .k-tooltip:dir(ltr) { translate: -50% 0; }
3949
3956
  .k-tooltip[hidden] { display: none; }
3950
3957
  .k-tooltip--bottom { inset-block: calc(100% + 8px) auto; }
3951
3958
 
@@ -3959,10 +3966,10 @@ html:has(.k-dialog[open]) { overflow: hidden; }
3959
3966
  border: 5px solid transparent;
3960
3967
  border-block-start-color: var(--k-tooltip-bg, var(--k-text-primary));
3961
3968
  }
3962
- [dir="ltr"] .k-tooltip::after { translate: -50% 0; }
3969
+ .k-tooltip:dir(ltr)::after { translate: -50% 0; }
3963
3970
  .k-tooltip--bottom::after { inset-block: auto 100%; border-block-start-color: transparent; border-block-end-color: var(--k-tooltip-bg, var(--k-text-primary)); }
3964
3971
  @keyframes k-tip-in { from { opacity: 0; translate: 50% 3px; } }
3965
- [dir="ltr"] .k-tooltip { animation-name: k-tip-in-ltr; }
3972
+ .k-tooltip:dir(ltr) { animation-name: k-tip-in-ltr; }
3966
3973
  @keyframes k-tip-in-ltr { from { opacity: 0; translate: -50% 3px; } }
3967
3974
 
3968
3975
  /* کنار عنصر */
@@ -4034,9 +4041,9 @@ html:has(.k-dialog[open]) { overflow: hidden; }
4034
4041
  .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); }
4035
4042
  /* فلش «بسته» در RTL به چپ اشاره می‌کند */
4036
4043
  .k-tree__toggle svg { inline-size: 1rem; block-size: 1rem; }
4037
- [dir="rtl"] .k-tree__toggle svg { scale: -1 1; }
4044
+ .k-tree__toggle svg:dir(rtl) { scale: -1 1; }
4038
4045
  .k-tree__item[aria-expanded="true"] > .k-tree__row .k-tree__toggle { rotate: 90deg; }
4039
- [dir="rtl"] .k-tree__item[aria-expanded="true"] > .k-tree__row .k-tree__toggle { rotate: -90deg; }
4046
+ .k-tree__item[aria-expanded="true"] > .k-tree__row .k-tree__toggle:dir(rtl) { rotate: -90deg; }
4040
4047
  .k-tree__spacer { flex-shrink: 0; inline-size: 1.25rem; }
4041
4048
  .k-tree__icon { display: inline-grid; flex-shrink: 0; color: var(--k-text-tertiary); }
4042
4049
  .k-tree__icon svg { inline-size: 1.125rem; block-size: 1.125rem; }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kashi-ui/css",
3
- "version": "0.26.0",
3
+ "version": "1.0.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.26.0"
24
+ "@kashi-ui/tokens": "^1.0.0"
25
25
  },
26
26
  "devDependencies": {
27
27
  "vazirmatn": "^33.0.3"