@konomi-app/ui 5.5.0 → 5.7.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/dist/index.cjs CHANGED
@@ -2425,7 +2425,12 @@ var ToastController = class {
2425
2425
  const isLeavingLoading = item.type === "loading" && rest.type != null && rest.type !== "loading";
2426
2426
  if (newDuration !== void 0) {
2427
2427
  __privateMethod(this, _ToastController_instances, clearTimer_fn2).call(this, id);
2428
- __privateMethod(this, _ToastController_instances, updateItem_fn).call(this, id, { ...rest, duration: newDuration, remainingMs: newDuration, paused: false });
2428
+ __privateMethod(this, _ToastController_instances, updateItem_fn).call(this, id, {
2429
+ ...rest,
2430
+ duration: newDuration,
2431
+ remainingMs: newDuration,
2432
+ paused: false
2433
+ });
2429
2434
  if (newDuration > 0) {
2430
2435
  __privateMethod(this, _ToastController_instances, startTimer_fn).call(this, id, newDuration);
2431
2436
  }
@@ -2556,13 +2561,14 @@ var toastStyles = import_lit3.css`
2556
2561
  /* Container */
2557
2562
  --toast-gap: 12px;
2558
2563
  --toast-padding: 16px;
2564
+ --toast-min-width: 360px;
2559
2565
  --toast-max-width: 420px;
2560
2566
 
2561
2567
  /* Card */
2562
2568
  --toast-card-bg: #fff;
2563
2569
  --toast-card-border: #f3f4f6;
2564
2570
  --toast-card-shadow: 0 4px 12px rgb(0 0 0 / 0.08), 0 1px 3px rgb(0 0 0 / 0.06);
2565
- --toast-card-radius: 8px;
2571
+ --toast-card-radius: 4px;
2566
2572
  --toast-card-padding: 14px 16px;
2567
2573
 
2568
2574
  /* Colors (inherit from dialog when available) */
@@ -2599,6 +2605,7 @@ var toastStyles = import_lit3.css`
2599
2605
  padding: var(--toast-padding);
2600
2606
  pointer-events: none;
2601
2607
  max-height: 100vh;
2608
+ min-width: var(--toast-min-width);
2602
2609
  max-width: var(--toast-max-width);
2603
2610
  box-sizing: border-box;
2604
2611
  }
@@ -2638,6 +2645,7 @@ var toastStyles = import_lit3.css`
2638
2645
  @media (max-width: 639px) {
2639
2646
  .container {
2640
2647
  max-width: 100%;
2648
+ min-width: 0;
2641
2649
  width: 100%;
2642
2650
  left: 0;
2643
2651
  right: 0;
@@ -2730,21 +2738,29 @@ var toastStyles = import_lit3.css`
2730
2738
  pointer-events: none;
2731
2739
  }
2732
2740
 
2733
- /* Type-based left accent */
2734
- .toast-card[data-type='success'] {
2735
- border-left: 3px solid var(--toast-success);
2741
+ /* Type-based top stripe */
2742
+ .toast-card::before {
2743
+ content: '';
2744
+ position: absolute;
2745
+ bottom: 0;
2746
+ left: 0;
2747
+ right: 0;
2748
+ height: 2px;
2736
2749
  }
2737
- .toast-card[data-type='error'] {
2738
- border-left: 3px solid var(--toast-error);
2750
+ .toast-card[data-type='success']::before {
2751
+ background: var(--toast-success);
2739
2752
  }
2740
- .toast-card[data-type='warning'] {
2741
- border-left: 3px solid var(--toast-warning);
2753
+ .toast-card[data-type='error']::before {
2754
+ background: var(--toast-error);
2742
2755
  }
2743
- .toast-card[data-type='info'] {
2744
- border-left: 3px solid var(--toast-info);
2756
+ .toast-card[data-type='warning']::before {
2757
+ background: var(--toast-warning);
2745
2758
  }
2746
- .toast-card[data-type='loading'] {
2747
- border-left: 3px solid var(--toast-loading);
2759
+ .toast-card[data-type='info']::before {
2760
+ background: var(--toast-info);
2761
+ }
2762
+ .toast-card[data-type='loading']::before {
2763
+ background: var(--toast-loading);
2748
2764
  }
2749
2765
 
2750
2766
  /* ─── Animations ─── */
@@ -2875,6 +2891,10 @@ var toastStyles = import_lit3.css`
2875
2891
  line-height: 1.4;
2876
2892
  }
2877
2893
 
2894
+ .toast-message[data-titled] {
2895
+ font-weight: 600;
2896
+ }
2897
+
2878
2898
  .toast-description {
2879
2899
  font-size: 13px;
2880
2900
  color: #6b7280;
@@ -2895,8 +2915,6 @@ var toastStyles = import_lit3.css`
2895
2915
  color: var(--toast-info);
2896
2916
  cursor: pointer;
2897
2917
  align-self: flex-start;
2898
- text-decoration: underline;
2899
- text-underline-offset: 2px;
2900
2918
  transition: color 150ms ease;
2901
2919
  }
2902
2920
 
@@ -3108,7 +3126,7 @@ var ToastContainer = class extends import_lit4.LitElement {
3108
3126
  <div class="toast-body">
3109
3127
  <span class="toast-icon icon-${item.type}"> ${this._renderIcon(item.type)} </span>
3110
3128
  <div class="toast-text">
3111
- <p class="toast-message">${item.message}</p>
3129
+ <p class="toast-message" ?data-titled=${!!item.description}>${item.message}</p>
3112
3130
  ${item.description ? import_lit4.html`<p class="toast-description">${item.description}</p>` : import_lit4.nothing}
3113
3131
  ${item.action ? import_lit4.html`<button
3114
3132
  class="toast-action-btn"
@@ -3121,11 +3139,7 @@ var ToastContainer = class extends import_lit4.LitElement {
3121
3139
  </button>` : import_lit4.nothing}
3122
3140
  </div>
3123
3141
  <div class="toast-close-wrap">
3124
- ${item.duration > 0 && item.type !== "loading" ? import_lit4.html`<svg
3125
- class="toast-timer-ring"
3126
- viewBox="0 0 24 24"
3127
- aria-hidden="true"
3128
- >
3142
+ ${item.duration > 0 && item.type !== "loading" ? import_lit4.html`<svg class="toast-timer-ring" viewBox="0 0 24 24" aria-hidden="true">
3129
3143
  <circle class="toast-timer-track" cx="12" cy="12" r="10" />
3130
3144
  <circle
3131
3145
  class="toast-timer-fill"