@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.d.cts CHANGED
@@ -295,9 +295,9 @@ interface ToastItem {
295
295
  id: string;
296
296
  /** アイコン・色を決定するビジュアルタイプ */
297
297
  type: ToastType;
298
- /** 主メッセージ */
298
+ /** 主メッセージ (description 指定時はタイトルとして太字表示) */
299
299
  message: string;
300
- /** 補足説明 (省略可) */
300
+ /** 補足説明 (省略可)。指定時は message が太字タイトルになる */
301
301
  description: string;
302
302
  /** アクションボタン (省略可) */
303
303
  action: ToastAction | null;
package/dist/index.d.ts CHANGED
@@ -295,9 +295,9 @@ interface ToastItem {
295
295
  id: string;
296
296
  /** アイコン・色を決定するビジュアルタイプ */
297
297
  type: ToastType;
298
- /** 主メッセージ */
298
+ /** 主メッセージ (description 指定時はタイトルとして太字表示) */
299
299
  message: string;
300
- /** 補足説明 (省略可) */
300
+ /** 補足説明 (省略可)。指定時は message が太字タイトルになる */
301
301
  description: string;
302
302
  /** アクションボタン (省略可) */
303
303
  action: ToastAction | null;
package/dist/index.js CHANGED
@@ -2397,7 +2397,12 @@ var ToastController = class {
2397
2397
  const isLeavingLoading = item.type === "loading" && rest.type != null && rest.type !== "loading";
2398
2398
  if (newDuration !== void 0) {
2399
2399
  __privateMethod(this, _ToastController_instances, clearTimer_fn2).call(this, id);
2400
- __privateMethod(this, _ToastController_instances, updateItem_fn).call(this, id, { ...rest, duration: newDuration, remainingMs: newDuration, paused: false });
2400
+ __privateMethod(this, _ToastController_instances, updateItem_fn).call(this, id, {
2401
+ ...rest,
2402
+ duration: newDuration,
2403
+ remainingMs: newDuration,
2404
+ paused: false
2405
+ });
2401
2406
  if (newDuration > 0) {
2402
2407
  __privateMethod(this, _ToastController_instances, startTimer_fn).call(this, id, newDuration);
2403
2408
  }
@@ -2528,13 +2533,14 @@ var toastStyles = css2`
2528
2533
  /* Container */
2529
2534
  --toast-gap: 12px;
2530
2535
  --toast-padding: 16px;
2536
+ --toast-min-width: 360px;
2531
2537
  --toast-max-width: 420px;
2532
2538
 
2533
2539
  /* Card */
2534
2540
  --toast-card-bg: #fff;
2535
2541
  --toast-card-border: #f3f4f6;
2536
2542
  --toast-card-shadow: 0 4px 12px rgb(0 0 0 / 0.08), 0 1px 3px rgb(0 0 0 / 0.06);
2537
- --toast-card-radius: 8px;
2543
+ --toast-card-radius: 4px;
2538
2544
  --toast-card-padding: 14px 16px;
2539
2545
 
2540
2546
  /* Colors (inherit from dialog when available) */
@@ -2571,6 +2577,7 @@ var toastStyles = css2`
2571
2577
  padding: var(--toast-padding);
2572
2578
  pointer-events: none;
2573
2579
  max-height: 100vh;
2580
+ min-width: var(--toast-min-width);
2574
2581
  max-width: var(--toast-max-width);
2575
2582
  box-sizing: border-box;
2576
2583
  }
@@ -2610,6 +2617,7 @@ var toastStyles = css2`
2610
2617
  @media (max-width: 639px) {
2611
2618
  .container {
2612
2619
  max-width: 100%;
2620
+ min-width: 0;
2613
2621
  width: 100%;
2614
2622
  left: 0;
2615
2623
  right: 0;
@@ -2702,21 +2710,29 @@ var toastStyles = css2`
2702
2710
  pointer-events: none;
2703
2711
  }
2704
2712
 
2705
- /* Type-based left accent */
2706
- .toast-card[data-type='success'] {
2707
- border-left: 3px solid var(--toast-success);
2713
+ /* Type-based top stripe */
2714
+ .toast-card::before {
2715
+ content: '';
2716
+ position: absolute;
2717
+ bottom: 0;
2718
+ left: 0;
2719
+ right: 0;
2720
+ height: 2px;
2708
2721
  }
2709
- .toast-card[data-type='error'] {
2710
- border-left: 3px solid var(--toast-error);
2722
+ .toast-card[data-type='success']::before {
2723
+ background: var(--toast-success);
2711
2724
  }
2712
- .toast-card[data-type='warning'] {
2713
- border-left: 3px solid var(--toast-warning);
2725
+ .toast-card[data-type='error']::before {
2726
+ background: var(--toast-error);
2714
2727
  }
2715
- .toast-card[data-type='info'] {
2716
- border-left: 3px solid var(--toast-info);
2728
+ .toast-card[data-type='warning']::before {
2729
+ background: var(--toast-warning);
2717
2730
  }
2718
- .toast-card[data-type='loading'] {
2719
- border-left: 3px solid var(--toast-loading);
2731
+ .toast-card[data-type='info']::before {
2732
+ background: var(--toast-info);
2733
+ }
2734
+ .toast-card[data-type='loading']::before {
2735
+ background: var(--toast-loading);
2720
2736
  }
2721
2737
 
2722
2738
  /* ─── Animations ─── */
@@ -2847,6 +2863,10 @@ var toastStyles = css2`
2847
2863
  line-height: 1.4;
2848
2864
  }
2849
2865
 
2866
+ .toast-message[data-titled] {
2867
+ font-weight: 600;
2868
+ }
2869
+
2850
2870
  .toast-description {
2851
2871
  font-size: 13px;
2852
2872
  color: #6b7280;
@@ -2867,8 +2887,6 @@ var toastStyles = css2`
2867
2887
  color: var(--toast-info);
2868
2888
  cursor: pointer;
2869
2889
  align-self: flex-start;
2870
- text-decoration: underline;
2871
- text-underline-offset: 2px;
2872
2890
  transition: color 150ms ease;
2873
2891
  }
2874
2892
 
@@ -3080,7 +3098,7 @@ var ToastContainer = class extends LitElement2 {
3080
3098
  <div class="toast-body">
3081
3099
  <span class="toast-icon icon-${item.type}"> ${this._renderIcon(item.type)} </span>
3082
3100
  <div class="toast-text">
3083
- <p class="toast-message">${item.message}</p>
3101
+ <p class="toast-message" ?data-titled=${!!item.description}>${item.message}</p>
3084
3102
  ${item.description ? html2`<p class="toast-description">${item.description}</p>` : nothing2}
3085
3103
  ${item.action ? html2`<button
3086
3104
  class="toast-action-btn"
@@ -3093,11 +3111,7 @@ var ToastContainer = class extends LitElement2 {
3093
3111
  </button>` : nothing2}
3094
3112
  </div>
3095
3113
  <div class="toast-close-wrap">
3096
- ${item.duration > 0 && item.type !== "loading" ? html2`<svg
3097
- class="toast-timer-ring"
3098
- viewBox="0 0 24 24"
3099
- aria-hidden="true"
3100
- >
3114
+ ${item.duration > 0 && item.type !== "loading" ? html2`<svg class="toast-timer-ring" viewBox="0 0 24 24" aria-hidden="true">
3101
3115
  <circle class="toast-timer-track" cx="12" cy="12" r="10" />
3102
3116
  <circle
3103
3117
  class="toast-timer-fill"