@handijit/ui 1.0.0 → 2.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.
Files changed (174) hide show
  1. package/README.md +485 -571
  2. package/build/base.css +1 -1
  3. package/build/charts.cjs +1 -1
  4. package/build/charts.cjs.map +1 -1
  5. package/build/charts.css +1 -1
  6. package/build/charts.js +350 -349
  7. package/build/charts.js.map +1 -1
  8. package/build/chat.cjs +3 -3
  9. package/build/chat.cjs.map +1 -1
  10. package/build/chat.css +1 -1
  11. package/build/chat.js +344 -343
  12. package/build/chat.js.map +1 -1
  13. package/build/components/Accordion/style.css +1 -1
  14. package/build/components/Alert/style.css +1 -1
  15. package/build/components/Avatar/style.css +1 -1
  16. package/build/components/Badge/index.cjs +1 -1
  17. package/build/components/Badge/index.cjs.map +1 -1
  18. package/build/components/Badge/index.d.ts +8 -13
  19. package/build/components/Badge/index.js +1 -1
  20. package/build/components/Badge/index.js.map +1 -1
  21. package/build/components/Badge/style.css +1 -1
  22. package/build/components/BottomSheet/style.css +1 -1
  23. package/build/components/Breadcrumb/style.css +1 -1
  24. package/build/components/Button/index.cjs +1 -1
  25. package/build/components/Button/index.cjs.map +1 -1
  26. package/build/components/Button/index.js +2 -2
  27. package/build/components/Button/index.js.map +1 -1
  28. package/build/components/Button/style.css +1 -1
  29. package/build/components/Card/style.css +1 -1
  30. package/build/components/Carousel/style.css +1 -1
  31. package/build/components/Checkbox/style.css +1 -1
  32. package/build/components/Chip/style.css +1 -1
  33. package/build/components/ChipGroup/style.css +1 -1
  34. package/build/components/CodeBadge/style.css +1 -1
  35. package/build/components/Combobox/index.cjs +1 -1
  36. package/build/components/Combobox/index.cjs.map +1 -1
  37. package/build/components/Combobox/index.js +51 -51
  38. package/build/components/Combobox/index.js.map +1 -1
  39. package/build/components/Combobox/style.css +1 -1
  40. package/build/components/CommandPalette/style.css +1 -1
  41. package/build/components/CopyField/style.css +1 -1
  42. package/build/components/DataTable/style.css +1 -1
  43. package/build/components/DateField/index.d.ts +1 -1
  44. package/build/components/DateField/style.css +1 -1
  45. package/build/components/Directory/style.css +1 -1
  46. package/build/components/Disclosure/style.css +1 -1
  47. package/build/components/Divider/style.css +1 -1
  48. package/build/components/Drawer/style.css +1 -1
  49. package/build/components/EmptyState/style.css +1 -1
  50. package/build/components/Field/style.css +1 -1
  51. package/build/components/FileUpload/style.css +1 -1
  52. package/build/components/FilterBar/style.css +1 -1
  53. package/build/components/IconButton/index.cjs +1 -1
  54. package/build/components/IconButton/index.cjs.map +1 -1
  55. package/build/components/IconButton/index.d.ts +2 -2
  56. package/build/components/IconButton/index.js +1 -1
  57. package/build/components/IconButton/index.js.map +1 -1
  58. package/build/components/IconButton/style.css +1 -1
  59. package/build/components/Input/index.d.ts +1 -1
  60. package/build/components/Input/style.css +1 -1
  61. package/build/components/Kbd/style.css +1 -1
  62. package/build/components/Menu/style.css +1 -1
  63. package/build/components/Modal/style.css +1 -1
  64. package/build/components/PageHeader/style.css +1 -1
  65. package/build/components/Pagination/style.css +1 -1
  66. package/build/components/Panel/style.css +1 -1
  67. package/build/components/PasswordInput/style.css +1 -1
  68. package/build/components/Popover/style.css +1 -1
  69. package/build/components/Price/style.css +1 -1
  70. package/build/components/Progress/style.css +1 -1
  71. package/build/components/PromptDialog/style.css +1 -1
  72. package/build/components/QuantityStepper/style.css +1 -1
  73. package/build/components/Radio/style.css +1 -1
  74. package/build/components/RadioCard/style.css +1 -1
  75. package/build/components/RangeSlider/style.css +1 -1
  76. package/build/components/Rating/style.css +1 -1
  77. package/build/components/RatingInput/style.css +1 -1
  78. package/build/components/ScrollArea/style.css +1 -1
  79. package/build/components/SectionHeader/style.css +1 -1
  80. package/build/components/SegmentedControl/style.css +1 -1
  81. package/build/components/Select/index.cjs +1 -1
  82. package/build/components/Select/index.cjs.map +1 -1
  83. package/build/components/Select/index.js +28 -28
  84. package/build/components/Select/index.js.map +1 -1
  85. package/build/components/Select/style.css +1 -1
  86. package/build/components/Skeleton/style.css +1 -1
  87. package/build/components/Spinner/style.css +1 -1
  88. package/build/components/Stat/style.css +1 -1
  89. package/build/components/StatusDot/style.css +1 -1
  90. package/build/components/Steps/style.css +1 -1
  91. package/build/components/SummaryCard/style.css +1 -1
  92. package/build/components/Switch/index.d.ts +1 -1
  93. package/build/components/Switch/style.css +1 -1
  94. package/build/components/Table/style.css +1 -1
  95. package/build/components/TableCheckbox/style.css +1 -1
  96. package/build/components/Tabs/style.css +1 -1
  97. package/build/components/TagInput/style.css +1 -1
  98. package/build/components/TextLink/style.css +1 -1
  99. package/build/components/Textarea/style.css +1 -1
  100. package/build/components/Tile/style.css +1 -1
  101. package/build/components/Timeline/style.css +1 -1
  102. package/build/components/Toast/style.css +1 -1
  103. package/build/components/Tooltip/style.css +1 -1
  104. package/build/constants/breakpoint.constants.cjs +1 -1
  105. package/build/constants/breakpoint.constants.cjs.map +1 -1
  106. package/build/constants/breakpoint.constants.d.ts +13 -8
  107. package/build/constants/breakpoint.constants.js +7 -5
  108. package/build/constants/breakpoint.constants.js.map +1 -1
  109. package/build/enums/ui-size.enum.cjs.map +1 -1
  110. package/build/enums/ui-size.enum.d.ts +5 -2
  111. package/build/enums/ui-size.enum.js.map +1 -1
  112. package/build/enums/ui-variant.enum.cjs +1 -1
  113. package/build/enums/ui-variant.enum.cjs.map +1 -1
  114. package/build/enums/ui-variant.enum.d.ts +13 -13
  115. package/build/enums/ui-variant.enum.js +1 -1
  116. package/build/enums/ui-variant.enum.js.map +1 -1
  117. package/build/helpers/theme.helper.cjs +1 -23
  118. package/build/helpers/theme.helper.cjs.map +1 -1
  119. package/build/helpers/theme.helper.d.ts +13 -44
  120. package/build/helpers/theme.helper.js +31 -69
  121. package/build/helpers/theme.helper.js.map +1 -1
  122. package/build/hooks/useUiTheme.cjs +1 -1
  123. package/build/hooks/useUiTheme.cjs.map +1 -1
  124. package/build/hooks/useUiTheme.d.ts +4 -1
  125. package/build/hooks/useUiTheme.js +34 -28
  126. package/build/hooks/useUiTheme.js.map +1 -1
  127. package/build/hooks/useUiTokens.cjs +1 -1
  128. package/build/hooks/useUiTokens.cjs.map +1 -1
  129. package/build/hooks/useUiTokens.d.ts +8 -8
  130. package/build/hooks/useUiTokens.js +24 -27
  131. package/build/hooks/useUiTokens.js.map +1 -1
  132. package/build/index.cjs +1 -1
  133. package/build/index.d.ts +3 -5
  134. package/build/index.js +194 -202
  135. package/build/index.js.map +1 -1
  136. package/build/scss/_index.scss +4 -3
  137. package/build/scss/_mixins.scss +264 -146
  138. package/build/scss/_variables.scss +216 -24
  139. package/build/styles.css +67 -67
  140. package/build/theme/UiProvider.cjs +1 -1
  141. package/build/theme/UiProvider.cjs.map +1 -1
  142. package/build/theme/UiProvider.d.ts +10 -9
  143. package/build/theme/UiProvider.js +7 -25
  144. package/build/theme/UiProvider.js.map +1 -1
  145. package/build/theme/UiThemeScript.cjs +1 -1
  146. package/build/theme/UiThemeScript.cjs.map +1 -1
  147. package/build/theme/UiThemeScript.d.ts +13 -10
  148. package/build/theme/UiThemeScript.js +2 -2
  149. package/build/theme/UiThemeScript.js.map +1 -1
  150. package/build/theme/context.js +2 -2
  151. package/build/types/charts/core/palette.d.ts +6 -8
  152. package/build/types/chat/Legend/index.d.ts +3 -2
  153. package/build/types/theme.type.d.ts +6 -48
  154. package/build/types/types/theme.type.d.ts +6 -48
  155. package/package.json +10 -10
  156. package/build/scss/_colors.generated.scss +0 -119
  157. package/build/scss/_metrics.generated.scss +0 -49
  158. package/build/theme/initUi.cjs +0 -2
  159. package/build/theme/initUi.cjs.map +0 -1
  160. package/build/theme/initUi.d.ts +0 -7
  161. package/build/theme/initUi.js +0 -10
  162. package/build/theme/initUi.js.map +0 -1
  163. package/build/theme/palette.cjs +0 -2
  164. package/build/theme/palette.cjs.map +0 -1
  165. package/build/theme/palette.d.ts +0 -219
  166. package/build/theme/palette.js +0 -148
  167. package/build/theme/palette.js.map +0 -1
  168. package/build/theme/tokens.cjs +0 -2
  169. package/build/theme/tokens.cjs.map +0 -1
  170. package/build/theme/tokens.d.ts +0 -225
  171. package/build/theme/tokens.js +0 -384
  172. package/build/theme/tokens.js.map +0 -1
  173. package/build/types/theme/palette.d.ts +0 -219
  174. package/build/types/theme/tokens.d.ts +0 -225
@@ -2,25 +2,25 @@
2
2
  @use 'variables' as *;
3
3
 
4
4
  @mixin for-mobile {
5
- @media (max-width: #{$breakpoint-mobile}) {
5
+ @media (max-width: #{$breakpoint-sm}) {
6
6
  @content;
7
7
  }
8
8
  }
9
9
 
10
10
  @mixin for-tablet-portrait {
11
- @media (max-width: #{$breakpoint-tablet-portrait}) {
11
+ @media (max-width: #{$breakpoint-md}) {
12
12
  @content;
13
13
  }
14
14
  }
15
15
 
16
16
  @mixin for-tablet {
17
- @media (max-width: #{$breakpoint-tablet}) {
17
+ @media (max-width: #{$breakpoint-lg}) {
18
18
  @content;
19
19
  }
20
20
  }
21
21
 
22
22
  @mixin for-desktop-up {
23
- @media (min-width: #{$breakpoint-tablet + 1px}) {
23
+ @media (min-width: #{$breakpoint-lg + 1px}) {
24
24
  @content;
25
25
  }
26
26
  }
@@ -51,8 +51,8 @@
51
51
  }
52
52
 
53
53
  transition:
54
- opacity $duration $ease-out,
55
- translate $duration $ease-out,
54
+ opacity $duration $ease-standard,
55
+ translate $duration $ease-standard,
56
56
  overlay $duration allow-discrete,
57
57
  display $duration allow-discrete;
58
58
 
@@ -79,25 +79,13 @@
79
79
  }
80
80
  }
81
81
 
82
- // Koyu temaya özgü kural — açık seçim ve sistem tercihi, `_tokens.generated.scss` ile AYNI seçiciler.
83
- // ⚠ Tema alt ağaca kapsamlandırılamaz (bkz. CLAUDE.md "Marka şeridi"); bu yalnızca KÖKE bakar.
84
- @mixin for-dark {
85
- :root[data-ui-theme='dark'] & {
86
- @content;
87
- }
88
-
89
- @media (prefers-color-scheme: dark) {
90
- :root:not([data-ui-theme]) & {
91
- @content;
92
- }
93
- }
94
- }
95
-
96
- @mixin interactive-surface($rest: transparent, $hover: $surface-2, $pressed: $surface-3) {
82
+ // The defaults are state layers: a transparent row darkens (light) or lightens (dark) on ANY
83
+ // surface, a floating one included. A row with a fill of its own passes its own three colours.
84
+ @mixin interactive-surface($rest: transparent, $hover: $state-hover, $pressed: $state-pressed) {
97
85
  background-color: $rest;
98
86
  transition:
99
- background-color $duration-fast $ease-out,
100
- translate $duration-instant $ease-out;
87
+ background-color $duration-fast $ease-standard,
88
+ translate $duration-fast $ease-standard;
101
89
 
102
90
  &:hover:not(:disabled):not([aria-disabled='true']) {
103
91
  background-color: $hover;
@@ -121,7 +109,7 @@
121
109
  &::backdrop {
122
110
  opacity: 0;
123
111
  transition:
124
- opacity $duration $ease-out,
112
+ opacity $duration $ease-standard,
125
113
  overlay $duration allow-discrete,
126
114
  display $duration allow-discrete;
127
115
  }
@@ -154,8 +142,15 @@
154
142
  padding-right: max(#{$padding}, env(safe-area-inset-right, 0px));
155
143
  }
156
144
 
145
+ // Written by `useSheetViewport` while a sheet is open: the visual viewport's height and the part of
146
+ // the layout viewport the on-screen keyboard covers. Component-private, not theme values.
147
+ $sheet-height: var(--ui-sheet-height, 100dvh);
148
+ $sheet-inset-bottom: var(--ui-sheet-inset-bottom, 0px);
157
149
  $sheet-lift: #{'max(env(safe-area-inset-bottom, 0px), var(--ui-sheet-inset-bottom, 0px))'};
158
150
 
151
+ // Height of the application's sticky header; the application sets `--ui-header-height`.
152
+ $header-offset: var(--ui-header-height, 0px);
153
+
159
154
  @mixin safe-bottom($padding: $space-3) {
160
155
  padding-bottom: max(#{$padding}, calc(env(safe-area-inset-bottom, 0px) - #{$sheet-lift}));
161
156
  }
@@ -182,16 +177,16 @@ $sheet-lift: #{'max(env(safe-area-inset-bottom, 0px), var(--ui-sheet-inset-botto
182
177
  display: flex;
183
178
  flex-direction: column;
184
179
  gap: $gap;
185
- padding-block: $space-6 $space-9;
180
+ padding-block: $space-6 $space-16;
186
181
 
187
182
  @include for-tablet {
188
183
  gap: $space-5;
189
- padding-block: $space-5 $space-8;
184
+ padding-block: $space-5 $space-12;
190
185
  }
191
186
 
192
187
  @include for-mobile {
193
188
  gap: $space-4;
194
- padding-block: $space-4 $space-7;
189
+ padding-block: $space-4 $space-10;
195
190
  }
196
191
  }
197
192
 
@@ -232,30 +227,30 @@ $sheet-lift: #{'max(env(safe-area-inset-bottom, 0px), var(--ui-sheet-inset-botto
232
227
 
233
228
  // ⚠ Kart ve panel DURURKEN gölge taşımaz: derinliği renk bloğu (krem sayfa / açık kart) ve
234
229
  // kenarlık kurar. Gölge yalnızca geçici katmanda, kipsel yüzeyde ve tıklanabilir kartın hover'ında.
235
- @mixin card($interactive: false, $radius: $radius-lg) {
236
- background-color: $surface;
230
+ @mixin card($interactive: false, $radius: $radius-md) {
231
+ background-color: $bg-surface;
237
232
  border: 1px solid $border;
238
233
  border-radius: $radius;
239
234
 
240
235
  @include for-mobile {
241
- border-radius: $radius-md;
236
+ border-radius: $radius-sm;
242
237
  }
243
238
 
244
239
  @if $interactive {
245
240
  transition:
246
- border-color $duration-fast $ease-out,
247
- box-shadow $duration-fast $ease-out,
248
- transform $duration-fast $ease-out;
241
+ border-color $duration-fast $ease-standard,
242
+ box-shadow $duration-fast $ease-standard,
243
+ transform $duration-fast $ease-standard;
249
244
 
250
245
  &:hover {
251
246
  border-color: $border-strong;
252
- box-shadow: $shadow-md;
247
+ box-shadow: $shadow-2;
253
248
  transform: translateY(-2px);
254
249
  }
255
250
 
256
251
  &:active {
257
252
  transform: translateY(0);
258
- box-shadow: $shadow-xs;
253
+ box-shadow: $shadow-1;
259
254
  }
260
255
 
261
256
  @include reduced-motion {
@@ -269,7 +264,7 @@ $sheet-lift: #{'max(env(safe-area-inset-bottom, 0px), var(--ui-sheet-inset-botto
269
264
  }
270
265
  }
271
266
 
272
- @mixin bottom-sheet($max-height: 88dvh, $duration: $duration-normal) {
267
+ @mixin bottom-sheet($max-height: 88dvh, $duration: $duration-base) {
273
268
  display: flex;
274
269
  flex-direction: column;
275
270
  position: fixed;
@@ -283,16 +278,18 @@ $sheet-lift: #{'max(env(safe-area-inset-bottom, 0px), var(--ui-sheet-inset-botto
283
278
  margin: 0;
284
279
  padding: 0;
285
280
  border: none;
286
- border-radius: $radius-xl $radius-xl 0 0;
287
- background-color: $surface;
281
+ border-radius: $radius-lg $radius-lg 0 0;
282
+ background-color: $bg-overlay;
288
283
  color: $text;
289
- box-shadow: $shadow-xl;
284
+ box-shadow: $shadow-3;
290
285
  overflow: hidden;
291
- animation: $anim-slide-up $duration $ease-out;
286
+ animation: $anim-slide-up $duration $ease-standard;
287
+
288
+ @include focus-ring($focus, -2px);
292
289
 
293
290
  &::backdrop {
294
291
  background-color: $scrim;
295
- animation: $anim-fade-in $duration $ease-out;
292
+ animation: $anim-fade-in $duration $ease-standard;
296
293
  }
297
294
 
298
295
  @include reduced-motion {
@@ -304,14 +301,14 @@ $sheet-lift: #{'max(env(safe-area-inset-bottom, 0px), var(--ui-sheet-inset-botto
304
301
  }
305
302
  }
306
303
 
307
- @mixin panel($radius: $radius-lg) {
308
- background-color: $surface;
304
+ @mixin panel($radius: $radius-md) {
305
+ background-color: $bg-surface;
309
306
  border: 1px solid $border;
310
307
  border-radius: $radius;
311
308
  overflow: hidden;
312
309
 
313
310
  @include for-mobile {
314
- border-radius: $radius-md;
311
+ border-radius: $radius-sm;
315
312
  }
316
313
  }
317
314
 
@@ -321,7 +318,7 @@ $sheet-lift: #{'max(env(safe-area-inset-bottom, 0px), var(--ui-sheet-inset-botto
321
318
  justify-content: space-between;
322
319
  padding: $space-4 $space-5;
323
320
  border-bottom: 1px solid $border;
324
- background-color: $surface;
321
+ background-color: $bg-surface;
325
322
 
326
323
  @include for-mobile {
327
324
  padding: $space-3 $space-4;
@@ -340,82 +337,88 @@ $sheet-lift: #{'max(env(safe-area-inset-bottom, 0px), var(--ui-sheet-inset-botto
340
337
 
341
338
  @mixin tint($tone: neutral) {
342
339
  @if $tone == success {
343
- background-color: $ok-bg;
344
- border: 1px solid $ok-line;
345
- color: $ok-fg;
340
+ background-color: $success-bg;
341
+ border: 1px solid $success-line;
342
+ color: $success-fg;
346
343
  } @else if $tone == warning {
347
- background-color: $warn-bg;
348
- border: 1px solid $warn-line;
349
- color: $warn-fg;
344
+ background-color: $warning-bg;
345
+ border: 1px solid $warning-line;
346
+ color: $warning-fg;
350
347
  } @else if $tone == danger {
351
- background-color: $bad-bg;
352
- border: 1px solid $bad-line;
353
- color: $bad-fg;
354
- } @else if $tone == oem {
355
- background-color: $oem-bg;
356
- border: 1px solid $oem-line;
357
- color: $oem-fg;
358
- } @else if $tone == alt {
359
- background-color: $alt-bg;
360
- border: 1px solid $alt-line;
361
- color: $alt-fg;
348
+ background-color: $danger-bg;
349
+ border: 1px solid $danger-line;
350
+ color: $danger-fg;
362
351
  } @else if $tone == info {
363
- // Bilgi NÖTR: anlamı ikon taşır (1.4.1). 4.x'te yeşil rol tintiydi ve Alert'in varsayılan tonu
364
- // olduğu için yeşili her uyarıya taşıyordu.
365
- background-color: $selected-tint;
366
- border: 1px solid $border-strong;
367
- color: $text;
352
+ background-color: $info-bg;
353
+ border: 1px solid $info-line;
354
+ color: $info-fg;
355
+ } @else if $tone == highlight {
356
+ // Turquoise is a fill: the line is mixed from it, the text uses the readable `highlight-text`.
357
+ background-color: $highlight-soft;
358
+ border: 1px solid color-mix(in srgb, #{$highlight} 45%, transparent);
359
+ color: $highlight-text;
360
+ } @else if $tone == neutral {
361
+ background-color: $bg-raised;
362
+ border: 1px solid $border;
363
+ color: $text-2;
368
364
  } @else {
369
- background-color: $off-bg;
370
- border: 1px solid $off-line;
371
- color: $off-fg;
365
+ @error 'tint(): unknown tone `#{$tone}`. Valid: success, warning, danger, info, highlight, neutral.';
372
366
  }
373
367
  }
374
368
 
375
- @mixin heading($step: xl, $weight: $weight-semibold) {
376
- $index: list.index($font-steps, $step);
377
-
378
- @if $index == null {
379
- @error 'heading(): bilinmeyen kademe `#{$step}`. Gecerli olanlar: #{$font-steps}.';
369
+ // A whole design type role: family, size, line height, weight, letter spacing and stretch.
370
+ // Roles: display, h1, h2, h3, h4, lead, body, small, caption, code.
371
+ @mixin type($role: body) {
372
+ @if list.index($type-roles, $role) == null {
373
+ @error 'type(): unknown role `#{$role}`. Valid: #{$type-roles}.';
380
374
  }
381
375
 
382
- $lg-index: list.index($font-steps, lg);
383
- $xxl-index: list.index($font-steps, 2xl);
384
-
385
- font-size: var(--ui-font-size-#{$step});
386
- font-weight: $weight;
387
- line-height: $leading-tight;
388
- color: $text;
389
-
390
- @if $index >= $lg-index {
391
- font-family: $font-heading;
376
+ @if list.index((display, h1, h2, h3, h4), $role) != null {
377
+ font-family: $font-display;
378
+ } @else if $role == code {
379
+ font-family: $font-mono;
392
380
  } @else {
393
- font-family: $font-ui;
394
- line-height: $leading-snug;
381
+ font-family: $font-body;
395
382
  }
396
383
 
397
- @if $index >= $xxl-index {
398
- letter-spacing: $tracking-tight;
399
- } @else if $index >= $lg-index {
400
- letter-spacing: $tracking-snug;
401
- } @else {
402
- letter-spacing: normal;
384
+ font-size: var(--hd-type-#{$role}-size);
385
+ font-weight: var(--hd-type-#{$role}-weight);
386
+ font-stretch: var(--hd-type-#{$role}-stretch);
387
+ line-height: var(--hd-type-#{$role}-line-height);
388
+ letter-spacing: var(--hd-type-#{$role}-letter-spacing);
389
+ }
390
+
391
+ // A heading in one of the design heading roles, in the text colour.
392
+ @mixin heading($role: h3) {
393
+ @if list.index((display, h1, h2, h3, h4), $role) == null {
394
+ @error 'heading(): `#{$role}` is not a heading role. Valid: display, h1, h2, h3, h4.';
403
395
  }
396
+
397
+ @include type($role);
398
+
399
+ color: $text;
404
400
  }
405
401
 
406
- @mixin page-title {
407
- font-family: $font-heading;
408
- font-size: clamp(#{$font-size-2xl}, 2.2vw + 1rem, #{$font-size-3xl});
409
- font-weight: $weight-bold;
410
- line-height: $leading-tight;
411
- letter-spacing: $tracking-tight;
402
+ // The title of a block inside a surface (panel, dialog, sheet): body size in the body font. The
403
+ // smallest heading role (h4, 18px) is too loud next to 13-15px content.
404
+ @mixin block-title {
405
+ font-family: $font-body;
406
+ font-size: $font-size-body;
407
+ font-weight: $weight-semibold;
408
+ line-height: $leading-snug;
409
+ letter-spacing: normal;
412
410
  color: $text;
411
+ }
412
+
413
+ @mixin page-title {
414
+ @include heading(h2);
415
+
413
416
  text-wrap: balance;
414
417
  }
415
418
 
416
419
  @mixin overline {
417
- font-family: $font-ui;
418
- font-size: $font-size-2xs;
420
+ font-family: $font-body;
421
+ font-size: $font-size-caption;
419
422
  font-weight: $weight-semibold;
420
423
  letter-spacing: $tracking-wide;
421
424
  text-transform: uppercase;
@@ -423,28 +426,28 @@ $sheet-lift: #{'max(env(safe-area-inset-bottom, 0px), var(--ui-sheet-inset-botto
423
426
  }
424
427
 
425
428
  @mixin label {
426
- font-family: $font-ui;
427
- font-size: $font-size-sm;
429
+ font-family: $font-body;
430
+ font-size: $font-size-small;
428
431
  font-weight: $weight-medium;
429
432
  line-height: $leading-snug;
430
433
  color: $text;
431
434
  }
432
435
 
433
- @mixin muted($size: $font-size-sm) {
436
+ @mixin muted($size: $font-size-small) {
434
437
  font-size: $size;
435
438
  line-height: $leading-normal;
436
439
  color: $text-2;
437
440
  }
438
441
 
439
- @mixin technical-text($size: $font-size-sm) {
442
+ @mixin technical-text($size: $font-size-small) {
440
443
  font-family: $font-mono;
441
444
  font-size: $size;
442
445
  letter-spacing: 0.02em;
443
446
  font-variant-numeric: tabular-nums;
444
447
  }
445
448
 
446
- @mixin money($size: $font-size-lg) {
447
- font-family: $font-heading;
449
+ @mixin money($size: $font-size-h4) {
450
+ font-family: $font-display;
448
451
  font-size: $size;
449
452
  font-weight: $weight-bold;
450
453
  font-variant-numeric: tabular-nums;
@@ -462,17 +465,117 @@ $sheet-lift: #{'max(env(safe-area-inset-bottom, 0px), var(--ui-sheet-inset-botto
462
465
 
463
466
  // Odak halkası: kalınlık ve dış pay tüketicinin ezebildiği bileşen değişkenleri (6.0). Site halkayı
464
467
  // öğenin kendi yüzeyine çekmek istiyorsa `--ui-ring-offset: -2px` yazar; sınıf başına ezme gerekmez.
465
- @mixin focus-ring-shape($color: $ring-color, $offset: 2px) {
468
+ @mixin focus-ring-shape($color: $focus, $offset: 2px) {
466
469
  outline: var(--ui-ring-width, 2px) solid $color;
467
470
  outline-offset: var(--ui-ring-offset, #{$offset});
468
471
  }
469
472
 
470
- @mixin focus-ring($color: $ring-color, $offset: 2px) {
473
+ @mixin focus-ring($color: $focus, $offset: 2px) {
471
474
  &:focus-visible {
472
475
  @include focus-ring-shape($color, $offset);
473
476
  }
474
477
  }
475
478
 
479
+ // A checkbox or a radio DRAWN with the theme. The native control keeps the browser's own greys in
480
+ // the dark theme and only takes the checked fill from `accent-color`. The mark is a clip-path, not
481
+ // an image: nothing here needs `img-src data:` in a Content-Security-Policy.
482
+ // Forced colours: the native control comes back, it already follows the system palette.
483
+ @mixin choice-control($shape: check) {
484
+ appearance: none;
485
+ display: inline-grid;
486
+ place-content: center;
487
+ flex-shrink: 0;
488
+ width: 18px;
489
+ height: 18px;
490
+ margin: 0;
491
+ border: 1.5px solid $text-3;
492
+ border-radius: $radius-xs;
493
+ background-color: $bg-surface;
494
+ cursor: pointer;
495
+ transition:
496
+ background-color $duration-fast $ease-standard,
497
+ border-color $duration-fast $ease-standard;
498
+
499
+ @if $shape == radio {
500
+ border-radius: $radius-pill;
501
+ }
502
+
503
+ &::before {
504
+ content: '';
505
+ width: 10px;
506
+ height: 10px;
507
+ background-color: $on-primary;
508
+ scale: 0;
509
+ transition: scale $duration-fast $ease-standard;
510
+
511
+ @if $shape == radio {
512
+ width: 8px;
513
+ height: 8px;
514
+ border-radius: $radius-pill;
515
+ } @else {
516
+ clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
517
+ }
518
+ }
519
+
520
+ &:hover:not(:disabled) {
521
+ border-color: $text-2;
522
+ }
523
+
524
+ &:checked,
525
+ &:indeterminate {
526
+ background-color: $primary;
527
+ border-color: $primary;
528
+
529
+ &::before {
530
+ scale: 1;
531
+ }
532
+
533
+ &:hover:not(:disabled) {
534
+ background-color: $primary-hover;
535
+ border-color: $primary-hover;
536
+ }
537
+ }
538
+
539
+ @if $shape != radio {
540
+ &:indeterminate::before {
541
+ clip-path: inset(40% 5%);
542
+ }
543
+ }
544
+
545
+ &:disabled {
546
+ background-color: $bg-disabled;
547
+ border-color: $border-strong;
548
+ cursor: not-allowed;
549
+ }
550
+
551
+ // A passive checked control gives the role colour back; the MARK carries the choice.
552
+ &:checked:disabled,
553
+ &:indeterminate:disabled {
554
+ background-color: $text-disabled;
555
+ border-color: transparent;
556
+
557
+ &::before {
558
+ background-color: $bg-surface;
559
+ }
560
+ }
561
+
562
+ @include reduced-motion {
563
+ transition: none;
564
+
565
+ &::before {
566
+ transition: none;
567
+ }
568
+ }
569
+
570
+ @media (forced-colors: active) {
571
+ appearance: auto;
572
+
573
+ &::before {
574
+ display: none;
575
+ }
576
+ }
577
+ }
578
+
476
579
  @mixin tap-target($size: $tap-target-size) {
477
580
  position: relative;
478
581
 
@@ -506,7 +609,7 @@ $sheet-lift: #{'max(env(safe-area-inset-bottom, 0px), var(--ui-sheet-inset-botto
506
609
  }
507
610
 
508
611
  @mixin passive-surface {
509
- background-color: $surface-2;
612
+ background-color: $bg-raised;
510
613
  border-color: $border;
511
614
  cursor: not-allowed;
512
615
 
@@ -517,18 +620,30 @@ $sheet-lift: #{'max(env(safe-area-inset-bottom, 0px), var(--ui-sheet-inset-botto
517
620
 
518
621
  @mixin input-base {
519
622
  width: 100%;
520
- font-family: $font-ui;
521
- font-size: $font-size-control;
623
+ font-family: $font-body;
624
+ font-size: $font-size-body;
522
625
  line-height: $leading-snug;
523
626
  color: $text;
524
- background-color: $surface;
627
+ background-color: $bg-surface;
525
628
  border: 1px solid $border-strong;
526
- border-radius: $radius-md;
527
- padding: $space-3 $space-4;
528
- min-height: $tap-target-size;
629
+ border-radius: $radius-sm;
630
+ padding: $space-2 $space-3;
631
+ // The height of a MEDIUM button: a field and a button on one row share one line.
632
+ min-height: 40px;
633
+
634
+ // A finger needs the full tap target, and iOS Safari zooms into a field smaller than 16px.
635
+ @include for-mobile {
636
+ min-height: $tap-target-size;
637
+ font-size: $font-size-control;
638
+ }
639
+
640
+ @include for-touch {
641
+ min-height: $tap-target-size;
642
+ font-size: $font-size-control;
643
+ }
529
644
  transition:
530
- border-color $duration-fast $ease-out,
531
- box-shadow $duration-fast $ease-out;
645
+ border-color $duration-fast $ease-standard,
646
+ box-shadow $duration-fast $ease-standard;
532
647
 
533
648
  // Yer tutucu rengi ayrı bir değişken: `text-3` metin rengine yakın temalarda boş alan dolu
534
649
  // görünüyordu (6.0; tüketici `--ui-placeholder` yazar).
@@ -546,8 +661,8 @@ $sheet-lift: #{'max(env(safe-area-inset-bottom, 0px), var(--ui-sheet-inset-botto
546
661
 
547
662
  &:focus {
548
663
  outline: none;
549
- border-color: $ring-color;
550
- box-shadow: $ring;
664
+ border-color: $focus;
665
+ box-shadow: $focus-halo;
551
666
  }
552
667
 
553
668
  &:disabled {
@@ -558,7 +673,7 @@ $sheet-lift: #{'max(env(safe-area-inset-bottom, 0px), var(--ui-sheet-inset-botto
558
673
  border-color: $danger-solid;
559
674
 
560
675
  &:focus {
561
- box-shadow: $ring-danger;
676
+ box-shadow: $danger-halo;
562
677
  }
563
678
  }
564
679
 
@@ -567,26 +682,33 @@ $sheet-lift: #{'max(env(safe-area-inset-bottom, 0px), var(--ui-sheet-inset-botto
567
682
  }
568
683
  }
569
684
 
570
- // YOGUN OLCU (`size="sm"`): arac cubugu ve filtre seridi icin 36px — `Button` SMALL ile ayni
571
- // yukseklik, yani ayni seritteki dugme, secim ve girdi tek hizada durur. `input-base`ten SONRA
572
- // gelir. 5.5'e kadar yalniz `Select`te vardi: `DateField` 44px'te kaliyor ve `Select sm` ile ayni
573
- // seritte 36 / 45,7px'lik kutular cikiyordu (olculdu: bir backtest panelinin ust cubugu, Chrome).
685
+ // DENSE SIZE (`size="sm"`): 32px — the height of a SMALL button, so a button, a select and a field
686
+ // in one toolbar or filter bar share one line. Comes AFTER `input-base`.
574
687
  //
575
- // `$is-text-entry`: metin girdisi dar ekranda ve dokunmatikte `font-size-control`a (>= 16px)
576
- // doner — iOS Safari 16px altindaki girdiye odaklaninca sayfayi buyutur ve geri kucultmez.
577
- // `Select` tetikleyicisi bir dugme; odakta buyutme yok, o yuzden bayrak onda kapali.
688
+ // `$is-text-entry`: a text field goes back to `font-size-control` (>= 16px) on a narrow or touch
689
+ // screen — iOS Safari zooms the page when a focused field is smaller and never zooms back. A
690
+ // `Select` trigger is a button: no zoom on focus, so the flag is off there.
578
691
  @mixin input-sm($is-text-entry: false) {
579
- min-height: 36px;
692
+ min-height: 32px;
580
693
  padding-block: 0;
581
694
  padding-inline: $space-3;
582
- font-size: $font-size-sm;
695
+ font-size: $font-size-small;
696
+
697
+ // The dense size stays dense on a phone too; `input-base` raised the box there.
698
+ @include for-mobile {
699
+ min-height: 32px;
700
+ font-size: $font-size-small;
583
701
 
584
- @if $is-text-entry {
585
- @include for-mobile {
702
+ @if $is-text-entry {
586
703
  font-size: $font-size-control;
587
704
  }
705
+ }
706
+
707
+ @include for-touch {
708
+ min-height: 32px;
709
+ font-size: $font-size-small;
588
710
 
589
- @include for-touch {
711
+ @if $is-text-entry {
590
712
  font-size: $font-size-control;
591
713
  }
592
714
  }
@@ -597,17 +719,17 @@ $sheet-lift: #{'max(env(safe-area-inset-bottom, 0px), var(--ui-sheet-inset-botto
597
719
  flex-wrap: wrap;
598
720
  align-items: flex-end;
599
721
  gap: $space-3;
600
- background-color: $surface;
722
+ background-color: $bg-surface;
601
723
  border: 1px solid $border;
602
- border-radius: $radius-md;
724
+ border-radius: $radius-sm;
603
725
  padding: $space-3;
604
726
  }
605
727
 
606
728
  @mixin data-table {
607
729
  width: 100%;
608
730
  border-collapse: collapse;
609
- font-family: $font-ui;
610
- font-size: $font-size-sm;
731
+ font-family: $font-body;
732
+ font-size: $font-size-small;
611
733
 
612
734
  th,
613
735
  td {
@@ -618,14 +740,14 @@ $sheet-lift: #{'max(env(safe-area-inset-bottom, 0px), var(--ui-sheet-inset-botto
618
740
  }
619
741
 
620
742
  thead th {
621
- background-color: $surface-2;
743
+ background-color: $bg-raised;
622
744
  font-weight: $weight-semibold;
623
745
  color: $text-2;
624
746
  white-space: nowrap;
625
747
  }
626
748
 
627
749
  tbody tr:hover {
628
- background-color: $surface-inset;
750
+ background-color: $bg-inset;
629
751
  }
630
752
  }
631
753
 
@@ -693,16 +815,12 @@ $sheet-lift: #{'max(env(safe-area-inset-bottom, 0px), var(--ui-sheet-inset-botto
693
815
  }
694
816
  }
695
817
 
818
+ // `bg-inset` is a WELL — near black in the dark theme, where a placeholder would read as a hole.
696
819
  @mixin skeleton {
697
- background: linear-gradient(
698
- 90deg,
699
- var(--ui-skeleton-a) 0%,
700
- var(--ui-skeleton-b) 50%,
701
- var(--ui-skeleton-a) 100%
702
- );
820
+ background: linear-gradient(90deg, #{$bg-disabled} 0%, #{$border} 50%, #{$bg-disabled} 100%);
703
821
  background-size: 200% 100%;
704
822
  animation: $anim-shimmer $duration-shimmer ease-in-out infinite;
705
- border-radius: $radius-sm;
823
+ border-radius: $radius-xs;
706
824
 
707
825
  @include reduced-motion {
708
826
  animation: none;