@typlog/ui 0.12.3 → 0.13.1

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/addons.js CHANGED
@@ -324,11 +324,10 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
324
324
  color: "gray",
325
325
  onClick: withModifiers(reset, ["prevent"])
326
326
  }, {
327
- default: withCtx(() => _cache[5] || (_cache[5] = [
327
+ default: withCtx(() => [..._cache[5] || (_cache[5] = [
328
328
  createTextVNode(" Back ", -1)
329
- ])),
330
- _: 1,
331
- __: [5]
329
+ ])]),
330
+ _: 1
332
331
  }),
333
332
  shouldDisplay.value === "search" ? (openBlock(), createBlock(unref(TextField), {
334
333
  key: 0,
@@ -387,9 +386,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
387
386
  page: page.value,
388
387
  "onUpdate:page": _cache[4] || (_cache[4] = ($event) => page.value = $event),
389
388
  total: allIcons.value.length,
390
- perpage: _ctx.perpage,
391
- size: "2"
392
- }, null, 8, ["page", "total", "perpage"])
389
+ "items-per-page": __props.perpage
390
+ }, null, 8, ["page", "total", "items-per-page"])
393
391
  ])) : createCommentVNode("", true)
394
392
  ]);
395
393
  };
@@ -482,7 +480,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
482
480
  return openBlock(), createElementBlock("div", {
483
481
  ref_key: "element",
484
482
  ref: element,
485
- class: normalizeClass(["ui-Turnstile", `r-size-${_ctx.size}`])
483
+ class: normalizeClass(["ui-Turnstile", `r-size-${__props.size}`])
486
484
  }, null, 2);
487
485
  };
488
486
  }
package/components.css CHANGED
@@ -267,22 +267,29 @@
267
267
  .ui-Card:where(.r-variant-soft):where(:any-link, button, label):where(:hover) {
268
268
  border-color: var(--gray-a5);
269
269
  }
270
+ @layer components {
270
271
  .ui-Button {
271
- display: inline-flex;
272
- align-items: center;
273
- justify-content: center;
274
- flex-shrink: 0;
275
- -webkit-user-select: none;
276
- -moz-user-select: none;
277
- user-select: none;
278
- vertical-align: top;
279
- font-style: normal;
280
- font-weight: var(--button-font-weight);
281
- text-align: center;
282
- white-space: nowrap;
283
- height: var(--button-height);
284
- padding-left: var(--button-padding-x);
285
- padding-right: var(--button-padding-x);
272
+ display: inline-flex;
273
+ align-items: center;
274
+ justify-content: center;
275
+ flex-shrink: 0;
276
+ -webkit-user-select: none;
277
+ -moz-user-select: none;
278
+ user-select: none;
279
+ vertical-align: top;
280
+ font-style: normal;
281
+ font-weight: var(--button-font-weight);
282
+ text-align: center;
283
+ white-space: nowrap;
284
+ height: var(--button-height);
285
+ padding-left: var(--button-padding-x);
286
+ padding-right: var(--button-padding-x);
287
+ gap: var(--button-gap);
288
+ font-size: var(--button-font-size);
289
+ line-height: var(--button-line-height);
290
+ letter-spacing: var(--button-letter-spacing);
291
+ border-radius: var(--button-radius);
292
+ }
286
293
  }
287
294
  .ui-Button:where(.r-variant-ghost) {
288
295
  --button-font-weight: var(--font-weight-regular);
@@ -290,15 +297,15 @@
290
297
  .ui-Button:where(:not(.r-variant-ghost)) {
291
298
  --button-font-weight: var(--font-weight-medium);
292
299
  }
293
- .ui-Button:where([data-disabled]) {
300
+ .ui-Button:where(:disabled, [data-disabled]) {
294
301
  cursor: not-allowed;
295
302
  }
296
303
  .ui-Button:where(.r-size-1) {
297
- gap: var(--space-1);
298
- font-size: var(--font-size-1);
299
- line-height: var(--line-height-1);
300
- letter-spacing: var(--letter-spacing-1);
301
- border-radius: max(var(--radius-1), var(--radius-full));
304
+ --button-gap: var(--space-1);
305
+ --button-font-size: var(--font-size-1);
306
+ --button-line-height: var(--line-height-1);
307
+ --button-letter-spacing: var(--letter-spacing-1);
308
+ --button-radius: max(var(--radius-1), var(--radius-full));
302
309
  --button-height: var(--space-5);
303
310
  --button-padding-x: var(--space-2);
304
311
  }
@@ -306,44 +313,44 @@
306
313
  --button-ghost-padding-y: var(--space-1);
307
314
  }
308
315
  .ui-Button:where(.r-size-2) {
309
- gap: var(--space-2);
310
- font-size: var(--font-size-2);
311
- line-height: var(--line-height-2);
312
- letter-spacing: var(--letter-spacing-2);
313
- border-radius: max(var(--radius-2), var(--radius-full));
316
+ --button-gap: var(--space-2);
317
+ --button-font-size: var(--font-size-2);
318
+ --button-line-height: var(--line-height-2);
319
+ --button-letter-spacing: var(--letter-spacing-2);
320
+ --button-radius: max(var(--radius-2), var(--radius-full));
314
321
  --button-height: var(--space-6);
315
322
  --button-padding-x: var(--space-3);
316
323
  }
317
324
  .ui-Button:where(.r-size-2):where(.r-variant-ghost) {
318
- gap: var(--space-1);
325
+ --button-gap: var(--space-1);
319
326
  --button-padding-x: var(--space-2);
320
327
  --button-ghost-padding-y: var(--space-1);
321
328
  }
322
329
  .ui-Button:where(.r-size-3) {
323
- gap: var(--space-3);
324
- font-size: var(--font-size-3);
325
- line-height: var(--line-height-3);
326
- letter-spacing: var(--letter-spacing-3);
327
- border-radius: max(var(--radius-3), var(--radius-full));
330
+ --button-gap: var(--space-3);
331
+ --button-font-size: var(--font-size-3);
332
+ --button-line-height: var(--line-height-3);
333
+ --button-letter-spacing: var(--letter-spacing-3);
334
+ --button-radius: max(var(--radius-3), var(--radius-full));
328
335
  --button-height: var(--space-7);
329
336
  --button-padding-x: var(--space-4);
330
337
  }
331
338
  .ui-Button:where(.r-size-3):where(.r-variant-ghost) {
332
- gap: var(--space-2);
339
+ --button-gap: var(--space-2);
333
340
  --button-padding-x: var(--space-3);
334
341
  --button-ghost-padding-y: calc(var(--space-1) * 1.5);
335
342
  }
336
343
  .ui-Button:where(.r-size-4) {
337
- gap: var(--space-3);
338
- font-size: var(--font-size-4);
339
- line-height: var(--line-height-4);
340
- letter-spacing: var(--letter-spacing-4);
341
- border-radius: max(var(--radius-4), var(--radius-full));
344
+ --button-gap: var(--space-3);
345
+ --button-font-size: var(--font-size-4);
346
+ --button-line-height: var(--line-height-4);
347
+ --button-letter-spacing: var(--letter-spacing-4);
348
+ --button-radius: max(var(--radius-4), var(--radius-full));
342
349
  --button-height: var(--space-8);
343
350
  --button-padding-x: var(--space-5);
344
351
  }
345
352
  .ui-Button:where(.r-size-4):where(.r-variant-ghost) {
346
- gap: var(--space-2);
353
+ --button-gap: var(--space-2);
347
354
  --button-padding-x: var(--space-4);
348
355
  --button-ghost-padding-y: var(--space-2);
349
356
  }
@@ -384,7 +391,7 @@
384
391
  filter: var(--button-solid-high-contrast-hover-filter);
385
392
  }
386
393
  }
387
- .ui-Button:where(.r-variant-solid):where([data-disabled]) {
394
+ .ui-Button:where(.r-variant-solid):where(:disabled, [data-disabled]) {
388
395
  color: var(--gray-a8);
389
396
  background-color: var(--gray-a3);
390
397
  outline: none;
@@ -413,7 +420,7 @@
413
420
  .ui-Button:where(.r-variant-soft):where(:active) {
414
421
  background-color: var(--accent-a5);
415
422
  }
416
- .ui-Button:where(.r-variant-soft):where([data-disabled]) {
423
+ .ui-Button:where(.r-variant-soft):where(:disabled, [data-disabled]) {
417
424
  color: var(--gray-a8);
418
425
  background-color: var(--gray-a3);
419
426
  }
@@ -432,7 +439,7 @@
432
439
  .ui-Button:where(.r-variant-ghost):where(:active) {
433
440
  background-color: var(--accent-a4);
434
441
  }
435
- .ui-Button:where(.r-variant-ghost):where([data-disabled]) {
442
+ .ui-Button:where(.r-variant-ghost):where(:disabled, [data-disabled]) {
436
443
  color: var(--gray-a8);
437
444
  background-color: transparent;
438
445
  }
@@ -459,10 +466,10 @@
459
466
  outline: 2px solid var(--focus-8);
460
467
  outline-offset: 2px;
461
468
  }
462
- .ui-Button:where(.r-variant-classic):where(:active:not([data-disabled])) {
469
+ .ui-Button:where(.r-variant-classic):where(:active:not(:disabled, [data-disabled])) {
463
470
  box-shadow: var(--shadow-1);
464
471
  }
465
- .ui-Button:where(.r-variant-classic):where([data-disabled]) {
472
+ .ui-Button:where(.r-variant-classic):where(:disabled, [data-disabled]) {
466
473
  color: var(--gray-a10);
467
474
  background-color: var(--gray-a2);
468
475
  }
@@ -488,7 +495,7 @@
488
495
  .ui-Button:where(.r-variant-outline):where(:active) {
489
496
  background-color: var(--accent-a4);
490
497
  }
491
- .ui-Button:where(.r-variant-outline):where([data-disabled]) {
498
+ .ui-Button:where(.r-variant-outline):where(:disabled, [data-disabled]) {
492
499
  color: var(--gray-a8);
493
500
  box-shadow: inset 0 0 0 1px var(--gray-a7);
494
501
  background-color: transparent;
@@ -515,7 +522,7 @@
515
522
  .ui-Button:where(.r-variant-surface):where(:active) {
516
523
  background-color: var(--accent-a4);
517
524
  }
518
- .ui-Button:where(.r-variant-surface):where([data-disabled]) {
525
+ .ui-Button:where(.r-variant-surface):where(:disabled, [data-disabled]) {
519
526
  color: var(--gray-a8);
520
527
  box-shadow: inset 0 0 0 1px var(--gray-a6);
521
528
  background-color: var(--gray-a2);
@@ -1255,6 +1262,9 @@ to {
1255
1262
  cursor: not-allowed;
1256
1263
  }
1257
1264
  .ui-SwitchThumb {
1265
+ display: inline-flex;
1266
+ justify-content: center;
1267
+ align-items: center;
1258
1268
  background-color: white;
1259
1269
  position: absolute;
1260
1270
  left: var(--switch-thumb-inset);
@@ -3789,24 +3799,33 @@ to {
3789
3799
  padding-inline: var(--collapsible-padding-x);
3790
3800
  }
3791
3801
 
3792
- .ui-Pagination {
3802
+ .ui-PaginationList {
3793
3803
  display: flex;
3794
3804
  align-items: center;
3795
- }
3796
- .ui-Pagination:where(.r-size-1) {
3797
3805
  gap: var(--space-1);
3798
3806
  }
3799
- .ui-Pagination:where(.r-size-2) {
3800
- gap: var(--space-2);
3807
+ .ui-PaginationList .ui-Button {
3808
+ height: var(--button-height);
3809
+ width: var(--button-height);
3810
+ padding: 0;
3801
3811
  }
3802
- .ui-Pagination:where(.r-size-3) {
3803
- gap: var(--space-3);
3812
+ .ui-PaginationRoot:where(.r-variant-ghost):where([data-accent-color="gray"]) :where(.ui-Button) {
3813
+ color: var(--accent-12);
3814
+ }
3815
+
3816
+ /** selected on ghost -> outline */
3817
+ .ui-PaginationRoot:where(.r-variant-ghost) :where(.ui-Button[data-selected]) {
3818
+ box-shadow: inset 0 0 0 1px var(--accent-a6);
3819
+ }
3820
+ .ui-PaginationRoot:where(.r-variant-soft, .r-variant-surface, .r-variant-outline) :where(.ui-Button[data-selected]) {
3821
+ background-color: var(--accent-9);
3822
+ color: var(--accent-contrast);
3804
3823
  }
3805
- .ui-Pagination:where(.r-size-4) {
3806
- gap: var(--space-4);
3824
+ .ui-PaginationRoot:where([data-accent-color="gray"]):where(.r-variant-soft, .r-variant-surface, .r-variant-outline) :where(.ui-Button[data-selected]) {
3825
+ background-color: var(--accent-12);
3807
3826
  }
3808
- .ui-Pagination:where(.r-variant-ghost) {
3809
- gap: 0;
3827
+ .ui-PaginationRoot:where(.r-variant-surface, .r-variant-outline) :where(.ui-Button[data-selected]) {
3828
+ box-shadow: none;
3810
3829
  }
3811
3830
 
3812
3831
  .ui-root {
@@ -3948,10 +3967,10 @@ to {
3948
3967
  .ui-ToastItem:where([data-swipe-direction="right"]) {
3949
3968
  --toast-item-swipe-to-x: calc(100% + var(--toast-x-position))
3950
3969
  }
3951
- .ui-ToastItem:where([data-swipe-direction="top"]) {
3970
+ .ui-ToastItem:where([data-swipe-direction="up"]) {
3952
3971
  --toast-item-swipe-to-y: calc(0 - 100% - var(--toast-y-position))
3953
3972
  }
3954
- .ui-ToastItem:where([data-swipe-direction="bottom"]) {
3973
+ .ui-ToastItem:where([data-swipe-direction="down"]) {
3955
3974
  --toast-item-swipe-to-y: calc(100% + var(--toast-y-position))
3956
3975
  }
3957
3976
  .ui-ToastItem:where([data-state="closed"]),
@@ -4045,6 +4064,9 @@ to {
4045
4064
  .ui-ToastViewport:where([data-x-position="right"]) {
4046
4065
  right: var(--toast-x-position);
4047
4066
  }
4067
+ .ui-ToastViewport:where([data-x-position="center"]) {
4068
+ left: calc(50% - var(--toast-width) / 2);
4069
+ }
4048
4070
  .ui-ToastViewport:where([data-y-position="top"]) {
4049
4071
  top: var(--toast-y-position);
4050
4072
  }