@konce-pt/styles 0.11.2 → 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.
package/components.css CHANGED
@@ -1552,6 +1552,9 @@
1552
1552
  overflow: hidden;
1553
1553
  background: var(--kpt-color-surface);
1554
1554
  }
1555
+ .kpt-button-group--invalid {
1556
+ border-color: var(--kpt-form-field-border-error, var(--kpt-color-danger));
1557
+ }
1555
1558
  .kpt-button-group__item {
1556
1559
  appearance: none;
1557
1560
  border: 0;
@@ -2102,6 +2105,18 @@
2102
2105
  .kpt-context-menu__area {
2103
2106
  display: contents;
2104
2107
  }
2108
+ .kpt-context-menu__layer {
2109
+ position: fixed;
2110
+ inset: 0;
2111
+ width: auto;
2112
+ height: auto;
2113
+ margin: 0;
2114
+ padding: 0;
2115
+ border: 0;
2116
+ background: transparent;
2117
+ overflow: visible;
2118
+ color: inherit;
2119
+ }
2105
2120
  .kpt-context-menu__backdrop {
2106
2121
  position: fixed;
2107
2122
  inset: 0;
@@ -2322,12 +2337,43 @@
2322
2337
  font-size: var(--kpt-font-size-xs, 0.75rem);
2323
2338
  color: var(--kpt-color-on-surface-muted);
2324
2339
  }
2325
- .kpt-data-table__th--sortable {
2340
+ .kpt-data-table__th--sortable:hover {
2341
+ color: var(--kpt-color-on-surface);
2342
+ }
2343
+ .kpt-data-table__sort-btn {
2344
+ display: inline-flex;
2345
+ align-items: center;
2346
+ padding: 0;
2347
+ border: 0;
2348
+ background: none;
2349
+ font: inherit;
2350
+ color: inherit;
2351
+ text-align: inherit;
2326
2352
  cursor: pointer;
2353
+ border-radius: var(--kpt-radius-sm, 0.25rem);
2327
2354
  }
2328
- .kpt-data-table__th--sortable:hover {
2355
+ .kpt-data-table__sort-btn:focus-visible {
2356
+ outline: var(--kpt-border-width-medium, 2px) solid var(--kpt-color-focus-ring);
2357
+ outline-offset: 2px;
2358
+ }
2359
+ .kpt-data-table__caption {
2360
+ caption-side: top;
2361
+ padding-block: var(--kpt-space-2, 0.5rem);
2362
+ text-align: start;
2363
+ font-weight: var(--kpt-font-weight-semibold, 600);
2329
2364
  color: var(--kpt-color-on-surface);
2330
2365
  }
2366
+ .kpt-data-table__live {
2367
+ position: absolute;
2368
+ width: 1px;
2369
+ height: 1px;
2370
+ margin: -1px;
2371
+ padding: 0;
2372
+ overflow: hidden;
2373
+ clip-path: inset(50%);
2374
+ white-space: nowrap;
2375
+ border: 0;
2376
+ }
2331
2377
  .kpt-data-table__cell--editable {
2332
2378
  cursor: pointer;
2333
2379
  }
@@ -2365,15 +2411,31 @@
2365
2411
  box-shadow: inset 2px 0 0 0 var(--kpt-color-primary);
2366
2412
  }
2367
2413
  .kpt-data-table__grip {
2414
+ display: inline-flex;
2415
+ align-items: center;
2368
2416
  margin-inline-end: 0.4em;
2417
+ padding: 0;
2418
+ border: 0;
2419
+ background: none;
2420
+ color: inherit;
2369
2421
  opacity: 0.45;
2422
+ cursor: inherit;
2423
+ border-radius: var(--kpt-radius-sm, 0.25rem);
2424
+ }
2425
+ .kpt-data-table__grip:hover, .kpt-data-table__grip:focus-visible {
2426
+ opacity: 1;
2427
+ }
2428
+ .kpt-data-table__grip:focus-visible {
2429
+ outline: var(--kpt-border-width-medium, 2px) solid var(--kpt-color-focus-ring);
2430
+ outline-offset: 1px;
2370
2431
  }
2371
2432
  .kpt-data-table__checkbox {
2372
2433
  width: 1px;
2373
2434
  white-space: nowrap;
2374
2435
  text-align: center;
2375
2436
  }
2376
- .kpt-data-table__checkbox input[type=checkbox] {
2437
+ .kpt-data-table__checkbox input[type=checkbox],
2438
+ .kpt-data-table__checkbox input[type=radio] {
2377
2439
  appearance: none;
2378
2440
  -webkit-appearance: none;
2379
2441
  position: relative;
@@ -2388,7 +2450,8 @@
2388
2450
  background: var(--kpt-form-field-bg);
2389
2451
  transition: background-color var(--kpt-motion-duration-fast, 120ms) var(--kpt-motion-easing-standard), border-color var(--kpt-motion-duration-fast, 120ms) var(--kpt-motion-easing-standard);
2390
2452
  }
2391
- .kpt-data-table__checkbox input[type=checkbox]::after {
2453
+ .kpt-data-table__checkbox input[type=checkbox]::after,
2454
+ .kpt-data-table__checkbox input[type=radio]::after {
2392
2455
  content: "";
2393
2456
  position: absolute;
2394
2457
  inset: 0;
@@ -2398,24 +2461,38 @@
2398
2461
  -webkit-mask: no-repeat center/0.85rem;
2399
2462
  mask: no-repeat center/0.85rem;
2400
2463
  }
2401
- .kpt-data-table__checkbox input[type=checkbox]:checked, .kpt-data-table__checkbox input[type=checkbox]:indeterminate {
2464
+ .kpt-data-table__checkbox input[type=checkbox]:checked, .kpt-data-table__checkbox input[type=checkbox]:indeterminate,
2465
+ .kpt-data-table__checkbox input[type=radio]:checked,
2466
+ .kpt-data-table__checkbox input[type=radio]:indeterminate {
2402
2467
  background: var(--kpt-color-primary);
2403
2468
  border-color: var(--kpt-color-primary);
2404
2469
  }
2405
- .kpt-data-table__checkbox input[type=checkbox]:checked::after {
2470
+ .kpt-data-table__checkbox input[type=checkbox]:checked::after,
2471
+ .kpt-data-table__checkbox input[type=radio]:checked::after {
2406
2472
  opacity: 1;
2407
2473
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M13 4.5 6.5 11 3 7.5' fill='none' stroke='%23000' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
2408
2474
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M13 4.5 6.5 11 3 7.5' fill='none' stroke='%23000' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
2409
2475
  }
2410
- .kpt-data-table__checkbox input[type=checkbox]:indeterminate::after {
2476
+ .kpt-data-table__checkbox input[type=checkbox]:indeterminate::after,
2477
+ .kpt-data-table__checkbox input[type=radio]:indeterminate::after {
2411
2478
  opacity: 1;
2412
2479
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8h9' fill='none' stroke='%23000' stroke-width='2.25' stroke-linecap='round'/%3E%3C/svg%3E");
2413
2480
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8h9' fill='none' stroke='%23000' stroke-width='2.25' stroke-linecap='round'/%3E%3C/svg%3E");
2414
2481
  }
2415
- .kpt-data-table__checkbox input[type=checkbox]:focus-visible {
2482
+ .kpt-data-table__checkbox input[type=checkbox]:focus-visible,
2483
+ .kpt-data-table__checkbox input[type=radio]:focus-visible {
2416
2484
  outline: var(--kpt-border-width-medium, 2px) solid var(--kpt-color-focus-ring);
2417
2485
  outline-offset: 2px;
2418
2486
  }
2487
+ .kpt-data-table__checkbox input[type=radio] {
2488
+ border-radius: 50%;
2489
+ }
2490
+ .kpt-data-table__checkbox input[type=radio]:checked::after {
2491
+ -webkit-mask-image: none;
2492
+ mask-image: none;
2493
+ inset: 25%;
2494
+ border-radius: 50%;
2495
+ }
2419
2496
  .kpt-data-table__expander {
2420
2497
  width: 2.5rem;
2421
2498
  min-width: 2.5rem;
@@ -2472,6 +2549,13 @@
2472
2549
  .kpt-data-table__row--selected {
2473
2550
  background: var(--kpt-table-row-selected) !important;
2474
2551
  }
2552
+ .kpt-data-table__row--clickable {
2553
+ cursor: pointer;
2554
+ }
2555
+ .kpt-data-table__row--clickable:focus-visible {
2556
+ outline: var(--kpt-border-width-medium, 2px) solid var(--kpt-color-focus-ring);
2557
+ outline-offset: -2px;
2558
+ }
2475
2559
  .kpt-data-table__row--expanded {
2476
2560
  background: var(--kpt-table-row-hover);
2477
2561
  }
@@ -2645,6 +2729,9 @@
2645
2729
  opacity: 0.6;
2646
2730
  background: var(--kpt-color-surface-variant);
2647
2731
  }
2732
+ .kpt-date-range.kpt-date-range--readonly {
2733
+ cursor: default;
2734
+ }
2648
2735
  .kpt-date-range__placeholder {
2649
2736
  color: var(--kpt-form-field-placeholder);
2650
2737
  }
@@ -2862,6 +2949,8 @@
2862
2949
  font-variant-numeric: tabular-nums;
2863
2950
  }
2864
2951
  .kpt-clock__seg {
2952
+ display: inline-block;
2953
+ user-select: none;
2865
2954
  border: 0;
2866
2955
  background: none;
2867
2956
  padding: 0.1rem 0.4rem;
@@ -2875,6 +2964,10 @@
2875
2964
  color: var(--kpt-color-primary);
2876
2965
  background: var(--kpt-color-muted);
2877
2966
  }
2967
+ .kpt-clock__seg:focus-visible {
2968
+ outline: var(--kpt-border-width-medium, 2px) solid var(--kpt-color-focus-ring);
2969
+ outline-offset: 2px;
2970
+ }
2878
2971
  .kpt-clock__colon {
2879
2972
  font-size: var(--kpt-font-size-2xl, 1.5rem);
2880
2973
  font-weight: var(--kpt-font-weight-semibold, 600);
@@ -3015,6 +3108,9 @@
3015
3108
  opacity: 0.6;
3016
3109
  background: var(--kpt-color-surface-variant);
3017
3110
  }
3111
+ .kpt-datepicker.kpt-datepicker--readonly {
3112
+ cursor: default;
3113
+ }
3018
3114
  .kpt-datepicker__placeholder {
3019
3115
  color: var(--kpt-form-field-placeholder);
3020
3116
  }
@@ -3045,6 +3141,17 @@
3045
3141
  color: var(--kpt-color-on-surface);
3046
3142
  font-size: var(--kpt-font-size-sm, 0.875rem);
3047
3143
  }
3144
+ .kpt-calendar__live {
3145
+ position: absolute;
3146
+ width: 1px;
3147
+ height: 1px;
3148
+ margin: -1px;
3149
+ padding: 0;
3150
+ overflow: hidden;
3151
+ clip-path: inset(50%);
3152
+ white-space: nowrap;
3153
+ border: 0;
3154
+ }
3048
3155
  .kpt-calendar__header {
3049
3156
  display: flex;
3050
3157
  align-items: center;
@@ -4226,6 +4333,12 @@
4226
4333
  .kpt-input-otp--invalid .kpt-input-otp__cell {
4227
4334
  border-color: var(--kpt-form-field-border-error);
4228
4335
  }
4336
+ .kpt-input-otp__sep {
4337
+ align-self: center;
4338
+ color: var(--kpt-color-text-muted);
4339
+ font-size: var(--kpt-font-size-lg, 1.125rem);
4340
+ user-select: none;
4341
+ }
4229
4342
  }
4230
4343
 
4231
4344
  /* src/lib/knob/knob.component.scss */
@@ -5080,9 +5193,13 @@
5080
5193
  color: var(--kpt-color-on-surface);
5081
5194
  cursor: pointer;
5082
5195
  }
5083
- .kpt-pick-list__controls button:hover {
5196
+ .kpt-pick-list__controls button:hover:not([aria-disabled=true]) {
5084
5197
  background: var(--kpt-color-muted);
5085
5198
  }
5199
+ .kpt-pick-list__controls button[aria-disabled=true] {
5200
+ opacity: 0.5;
5201
+ cursor: not-allowed;
5202
+ }
5086
5203
  .kpt-pick-list__controls button .kpt-icon-host + .kpt-icon-host {
5087
5204
  margin-left: -0.5rem;
5088
5205
  }
@@ -5662,6 +5779,13 @@
5662
5779
  max-height: 20rem;
5663
5780
  overflow-y: auto;
5664
5781
  }
5782
+ .kpt-rich-text__style-panel:focus {
5783
+ outline: none;
5784
+ }
5785
+ .kpt-rich-text__style-panel:focus-visible .kpt-rich-text__style-opt.is-active {
5786
+ outline: var(--kpt-border-width-medium, 2px) solid var(--kpt-color-focus-ring);
5787
+ outline-offset: -2px;
5788
+ }
5665
5789
  .kpt-rich-text__style-opt {
5666
5790
  padding: 0.35rem 0.6rem;
5667
5791
  border-radius: var(--kpt-radius-sm, 0.25rem);
@@ -5796,6 +5920,10 @@
5796
5920
  border-radius: var(--kpt-radius-md, 0.5rem);
5797
5921
  box-shadow: var(--kpt-elevation-3);
5798
5922
  }
5923
+ .kpt-rt-grid:focus-visible {
5924
+ outline: var(--kpt-border-width-medium, 2px) solid var(--kpt-color-focus-ring);
5925
+ outline-offset: 2px;
5926
+ }
5799
5927
  .kpt-rt-grid {
5800
5928
  display: flex;
5801
5929
  flex-direction: column;
@@ -6033,6 +6161,9 @@
6033
6161
  .kpt-select.kpt-select--invalid {
6034
6162
  border-color: var(--kpt-form-field-border-error);
6035
6163
  }
6164
+ .kpt-select.kpt-select--readonly {
6165
+ cursor: default;
6166
+ }
6036
6167
  .kpt-select.kpt-select--disabled {
6037
6168
  cursor: not-allowed;
6038
6169
  opacity: 0.6;
@@ -7648,6 +7779,17 @@
7648
7779
  stroke-dashoffset: 0;
7649
7780
  }
7650
7781
  }
7782
+ .kpt-chart__sr {
7783
+ position: absolute;
7784
+ width: 1px;
7785
+ height: 1px;
7786
+ margin: -1px;
7787
+ padding: 0;
7788
+ overflow: hidden;
7789
+ clip-path: inset(50%);
7790
+ white-space: nowrap;
7791
+ border: 0;
7792
+ }
7651
7793
  }
7652
7794
 
7653
7795
  /* chat/src/lib/chat-composer.component.scss */
package/index.css CHANGED
@@ -143,6 +143,30 @@
143
143
  }
144
144
  }
145
145
  @layer kpt.components {
146
+ .kpt-tooltip {
147
+ position: fixed;
148
+ z-index: var(--kpt-z-tooltip, 1400);
149
+ max-width: 16rem;
150
+ margin: 0;
151
+ padding: 0.35rem 0.6rem;
152
+ border: 0;
153
+ border-radius: var(--kpt-radius-sm, 0.25rem);
154
+ font-size: var(--kpt-font-size-xs, 0.75rem);
155
+ line-height: 1.4;
156
+ background: var(--kpt-color-on-surface);
157
+ color: var(--kpt-color-surface);
158
+ box-shadow: var(--kpt-elevation-2);
159
+ opacity: 0;
160
+ transition: opacity var(--kpt-motion-duration-fast, 120ms) var(--kpt-motion-easing-standard, ease);
161
+ }
162
+ .kpt-tooltip[data-visible] {
163
+ opacity: 1;
164
+ }
165
+ @media (prefers-reduced-motion: reduce) {
166
+ .kpt-tooltip {
167
+ transition: none;
168
+ }
169
+ }
146
170
  .kpt-rich-content ul,
147
171
  .kpt-rich-content ol {
148
172
  padding-inline-start: 1.5rem;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@konce-pt/styles",
3
- "version": "0.11.2",
3
+ "version": "0.12.0",
4
4
  "description": "Base CSS for Koncept UI — reset, cascade @layer ordering and neutral light/dark theme (SCSS source).",
5
5
  "license": "MIT",
6
6
  "author": "konce.pt",
@@ -52,13 +52,14 @@
52
52
  "src"
53
53
  ],
54
54
  "peerDependencies": {
55
- "@konce-pt/tokens": "0.11.2"
55
+ "@konce-pt/tokens": "0.12.0"
56
56
  },
57
57
  "devDependencies": {
58
58
  "sass": "^1.77.0"
59
59
  },
60
60
  "scripts": {
61
61
  "build": "sass src/index.scss:index.css --no-source-map --style=expanded && node scripts/build-components.mjs",
62
+ "lint": "eslint .",
62
63
  "clean": "node -e \"require('fs').rmSync('index.css',{force:true});require('fs').rmSync('components.css',{force:true})\""
63
64
  }
64
65
  }
package/src/index.scss CHANGED
@@ -203,6 +203,30 @@
203
203
  }
204
204
 
205
205
  @layer kpt.components {
206
+ // Dymek `kptTooltip` / `KptTooltip` (oba porty). Element powstaje w JS poza drzewem komponentu,
207
+ // więc jego styl mieszka tutaj, w warstwie — aplikacja nadpisuje go bez `!important`. Inline
208
+ // zostają tylko `position: fixed` i współrzędne, bez których dymek nie stanąłby przy hoście.
209
+ .kpt-tooltip {
210
+ position: fixed;
211
+ z-index: var(--kpt-z-tooltip, 1400);
212
+ max-width: 16rem;
213
+ margin: 0;
214
+ padding: 0.35rem 0.6rem;
215
+ border: 0;
216
+ border-radius: var(--kpt-radius-sm, 0.25rem);
217
+ font-size: var(--kpt-font-size-xs, 0.75rem);
218
+ line-height: 1.4;
219
+ background: var(--kpt-color-on-surface);
220
+ color: var(--kpt-color-surface);
221
+ box-shadow: var(--kpt-elevation-2);
222
+ opacity: 0;
223
+ transition: opacity var(--kpt-motion-duration-fast, 120ms) var(--kpt-motion-easing-standard, ease);
224
+
225
+ &[data-visible] { opacity: 1; }
226
+
227
+ @media (prefers-reduced-motion: reduce) { transition: none; }
228
+ }
229
+
206
230
  // Treść zapisana w `kpt-rich-text` i renderowana poza edytorem — HTML z `value` nie niesie klas,
207
231
  // więc opakuj go w `.kpt-rich-content`, żeby listy wyglądały tak samo jak w edytorze.
208
232
  // Znaczniki cyklują co 3 poziomy (przeglądarka robi to sama tylko dla `ul`), do 6. poziomu —