@konomi-app/ui 5.8.1 → 5.10.4

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.js CHANGED
@@ -675,6 +675,7 @@ updateItemStatus_fn = function(key, itemKey, status) {
675
675
  import { LitElement, html, nothing } from "lit";
676
676
  import { property, state } from "lit/decorators.js";
677
677
  import { keyed } from "lit/directives/keyed.js";
678
+ import { repeat } from "lit/directives/repeat.js";
678
679
  import { unsafeHTML } from "lit/directives/unsafe-html.js";
679
680
 
680
681
  // src/styles.ts
@@ -686,8 +687,8 @@ var overlayStyles = css`
686
687
  'Yu Gothic Medium', '游ゴシック', YuGothic, 'メイリオ', 'Hiragino Kaku Gothic ProN', Meiryo,
687
688
  sans-serif;
688
689
  --dialog-text-color: #356;
689
- --dialog-font-size: 14px;
690
- --dialog-font-size-desktop: 16px;
690
+ --dialog-font-size: 15px;
691
+ --dialog-font-size-desktop: 17px;
691
692
  --dialog-z-index: 1000;
692
693
  --dialog-backdrop-color: rgb(255 255 255 / 0.73);
693
694
  --dialog-backdrop-blur: 4px;
@@ -699,6 +700,7 @@ var overlayStyles = css`
699
700
  --dialog-card-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
700
701
  --dialog-card-radius: 4px;
701
702
  --dialog-card-width: 400px;
703
+ --dialog-alert-width: 480px;
702
704
  --dialog-card-min-height: 200px;
703
705
  --dialog-card-padding: 24px;
704
706
  --dialog-card-padding-desktop: 32px;
@@ -719,7 +721,7 @@ var overlayStyles = css`
719
721
  /* Button */
720
722
  --dialog-btn-radius: 6px;
721
723
  --dialog-btn-padding: 8px 24px;
722
- --dialog-btn-font-size: 14px;
724
+ --dialog-btn-font-size: 15px;
723
725
 
724
726
  /* Spinner */
725
727
  --dialog-spinner-size: 60px;
@@ -732,14 +734,14 @@ var overlayStyles = css`
732
734
  --dialog-form-gap: 16px;
733
735
  --dialog-form-columns: 1;
734
736
  --dialog-form-label-color: #374151;
735
- --dialog-form-label-size: 13px;
737
+ --dialog-form-label-size: 14px;
736
738
  --dialog-form-label-weight: 500;
737
739
  --dialog-form-input-bg: #fff;
738
740
  --dialog-form-input-border: #d1d5db;
739
741
  --dialog-form-input-border-focus: var(--dialog-primary);
740
742
  --dialog-form-input-radius: 6px;
741
743
  --dialog-form-input-padding: 8px 12px;
742
- --dialog-form-input-font-size: 14px;
744
+ --dialog-form-input-font-size: 15px;
743
745
  --dialog-form-error-color: var(--dialog-error);
744
746
  --dialog-form-hint-color: #9ca3af;
745
747
  --dialog-form-required-color: var(--dialog-error);
@@ -807,9 +809,27 @@ var overlayStyles = css`
807
809
  max-width: 90vw;
808
810
  border-radius: var(--dialog-card-radius);
809
811
  padding: var(--dialog-card-padding-desktop);
812
+ transition: width 360ms cubic-bezier(0.16, 1, 0.3, 1);
810
813
  }
811
814
  }
812
815
 
816
+ /* ─── Alert / Confirm specific sizing ─── */
817
+
818
+ @media (min-width: 640px) {
819
+ .card[data-type='alert'],
820
+ .card[data-type='confirm'] {
821
+ width: var(--dialog-alert-width);
822
+ }
823
+ }
824
+
825
+ .card[data-type='alert'] .label,
826
+ .card[data-type='confirm'] .label {
827
+ font-size: 22px;
828
+ font-weight: 700;
829
+ color: #0f172a;
830
+ letter-spacing: -0.01em;
831
+ }
832
+
813
833
  /* ─── Card Open / Close Animations ─── */
814
834
 
815
835
  @keyframes card-enter {
@@ -1032,9 +1052,9 @@ var overlayStyles = css`
1032
1052
  /* ─── Text ─── */
1033
1053
 
1034
1054
  .dialog-title {
1035
- font-size: 18px;
1055
+ font-size: 20px;
1036
1056
  font-weight: 600;
1037
- color: #374151;
1057
+ color: #1f2937;
1038
1058
  text-align: center;
1039
1059
  margin: 0 0 16px;
1040
1060
  word-break: break-word;
@@ -1044,29 +1064,29 @@ var overlayStyles = css`
1044
1064
  }
1045
1065
 
1046
1066
  .label {
1047
- font-size: 16px;
1048
- font-weight: 400;
1049
- color: #1f2937;
1067
+ font-size: 17px;
1068
+ font-weight: 500;
1069
+ color: #111827;
1050
1070
  text-align: center;
1051
1071
  margin: 0;
1052
1072
  word-break: break-word;
1053
1073
  }
1054
1074
 
1055
1075
  .description {
1056
- font-size: 14px;
1057
- color: #6b7280;
1076
+ font-size: 15px;
1077
+ color: #4b5563;
1058
1078
  text-align: center;
1059
1079
  margin: 0;
1060
1080
  word-break: break-word;
1061
- line-height: 1.6;
1081
+ line-height: 1.65;
1062
1082
  }
1063
1083
 
1064
1084
  .html-content {
1065
- font-size: 14px;
1066
- color: #6b7280;
1085
+ font-size: 15px;
1086
+ color: #4b5563;
1067
1087
  text-align: center;
1068
1088
  word-break: break-word;
1069
- line-height: 1.6;
1089
+ line-height: 1.65;
1070
1090
  width: 100%;
1071
1091
  }
1072
1092
 
@@ -1166,10 +1186,31 @@ var overlayStyles = css`
1166
1186
  display: flex;
1167
1187
  align-items: center;
1168
1188
  gap: 12px;
1169
- font-size: 14px;
1189
+ font-size: 15px;
1190
+ border-radius: 6px;
1191
+ transition: background 200ms ease;
1170
1192
  animation: task-item-enter 300ms cubic-bezier(0.16, 1, 0.3, 1) both;
1171
1193
  }
1172
1194
 
1195
+ .task-item[data-status='active'] {
1196
+ }
1197
+
1198
+ @keyframes task-item-enter-below {
1199
+ from {
1200
+ opacity: 0;
1201
+ transform: translateY(8px);
1202
+ }
1203
+ to {
1204
+ opacity: 1;
1205
+ transform: translateY(0);
1206
+ }
1207
+ }
1208
+
1209
+ /* Queue items slide in from below (steps keep the left-slide default) */
1210
+ .task-item[data-status] {
1211
+ animation-name: task-item-enter-below;
1212
+ }
1213
+
1173
1214
  .task-item:nth-child(1) {
1174
1215
  animation-delay: 40ms;
1175
1216
  }
@@ -1240,6 +1281,23 @@ var overlayStyles = css`
1240
1281
  box-shadow: inset 0 0 0 1px var(--dialog-spinner-arc);
1241
1282
  }
1242
1283
 
1284
+ @keyframes task-icon-pop {
1285
+ from {
1286
+ transform: scale(0.4);
1287
+ opacity: 0;
1288
+ }
1289
+ to {
1290
+ transform: scale(1);
1291
+ opacity: 1;
1292
+ }
1293
+ }
1294
+
1295
+ .task-item[data-status='done'] .task-icon svg,
1296
+ .task-item[data-status='error'] .task-icon svg,
1297
+ .task-item[data-status='skipped'] .task-icon svg {
1298
+ animation: task-icon-pop 400ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
1299
+ }
1300
+
1243
1301
  .task-label {
1244
1302
  color: #6b7280;
1245
1303
  transition: color 250ms ease;
@@ -1275,21 +1333,80 @@ var overlayStyles = css`
1275
1333
  color: #9ca3af;
1276
1334
  }
1277
1335
 
1336
+ /* ─── Queue layout & progress ─── */
1337
+
1338
+ .queue-layout {
1339
+ display: flex;
1340
+ align-items: stretch;
1341
+ gap: 10px;
1342
+ width: 100%;
1343
+ }
1344
+
1345
+ .queue-layout .task-list {
1346
+ flex: 1;
1347
+ }
1348
+
1349
+ .queue-progress-v {
1350
+ display: flex;
1351
+ flex-direction: column;
1352
+ align-items: center;
1353
+ flex-shrink: 0;
1354
+ width: 14px;
1355
+ animation: task-item-enter 300ms cubic-bezier(0.16, 1, 0.3, 1) both;
1356
+ }
1357
+
1358
+ .queue-progress-track-v {
1359
+ flex: 1;
1360
+ width: 2px;
1361
+ background: rgba(156, 163, 175, 0.2);
1362
+ border-radius: 1px;
1363
+ position: relative;
1364
+ overflow: hidden;
1365
+ }
1366
+
1367
+ .queue-progress-fill-v {
1368
+ position: absolute;
1369
+ top: 0;
1370
+ left: 0;
1371
+ right: 0;
1372
+ background: var(--dialog-accent, #3b82f6);
1373
+ border-radius: 1px;
1374
+ transition: height 600ms cubic-bezier(0.4, 0, 0.2, 1);
1375
+ }
1376
+
1377
+ .queue-progress-count-v {
1378
+ font-size: 10px;
1379
+ font-weight: 500;
1380
+ color: #9ca3af;
1381
+ margin-top: 5px;
1382
+ writing-mode: vertical-rl;
1383
+ letter-spacing: 0.04em;
1384
+ font-variant-numeric: tabular-nums;
1385
+ line-height: 1;
1386
+ }
1387
+
1278
1388
  /* ─── Queue ellipsis ─── */
1279
1389
 
1280
1390
  .queue-ellipsis {
1391
+ display: flex;
1392
+ flex-direction: row;
1393
+ align-items: center;
1394
+ gap: 8px;
1395
+ list-style: none;
1396
+ }
1397
+
1398
+ .queue-ellipsis-dots {
1281
1399
  display: flex;
1282
1400
  flex-direction: column;
1283
1401
  align-items: center;
1402
+ justify-content: center;
1284
1403
  gap: 3px;
1404
+ width: 24px;
1285
1405
  padding: 4px 0;
1286
- /* アイコン列 (24px) の中央に配置: (24px - 4px dot) / 2 = 10px */
1287
- padding-left: 10px;
1288
- align-self: flex-start;
1289
- list-style: none;
1406
+ flex-shrink: 0;
1290
1407
  }
1291
1408
 
1292
- .queue-ellipsis span {
1409
+ .queue-ellipsis-dots span {
1293
1410
  display: block;
1294
1411
  width: 4px;
1295
1412
  height: 4px;
@@ -1297,6 +1414,16 @@ var overlayStyles = css`
1297
1414
  background-color: #d1d5db;
1298
1415
  }
1299
1416
 
1417
+ .queue-ellipsis-badge {
1418
+ font-size: 11px;
1419
+ font-weight: 500;
1420
+ color: #9ca3af;
1421
+ background: rgba(156, 163, 175, 0.12);
1422
+ border-radius: 10px;
1423
+ padding: 2px 7px;
1424
+ letter-spacing: 0.01em;
1425
+ }
1426
+
1300
1427
  /* ─── Steps indicator ─── */
1301
1428
 
1302
1429
  .steps-header {
@@ -1462,13 +1589,13 @@ var overlayStyles = css`
1462
1589
  }
1463
1590
 
1464
1591
  .form-error {
1465
- font-size: 12px;
1592
+ font-size: 13px;
1466
1593
  color: var(--dialog-form-error-color);
1467
1594
  min-height: 1em;
1468
1595
  }
1469
1596
 
1470
1597
  .form-hint {
1471
- font-size: 12px;
1598
+ font-size: 13px;
1472
1599
  color: var(--dialog-form-hint-color);
1473
1600
  }
1474
1601
 
@@ -1520,7 +1647,7 @@ var overlayStyles = css`
1520
1647
  }
1521
1648
 
1522
1649
  .step-form-counter {
1523
- font-size: 12px;
1650
+ font-size: 13px;
1524
1651
  color: var(--dialog-form-hint-color);
1525
1652
  text-align: center;
1526
1653
  margin: 0 0 4px;
@@ -1553,7 +1680,9 @@ var overlayStyles = css`
1553
1680
  border: 1px solid var(--dialog-form-input-border);
1554
1681
  background: transparent;
1555
1682
  color: var(--dialog-text-color);
1556
- transition: background-color 120ms ease, border-color 120ms ease;
1683
+ transition:
1684
+ background-color 120ms ease,
1685
+ border-color 120ms ease;
1557
1686
  }
1558
1687
 
1559
1688
  .btn-prev:hover {
@@ -1800,23 +1929,40 @@ var OverlayDialog = class extends LitElement {
1800
1929
  const total = items.length;
1801
1930
  const { start, end } = this._getQueueWindow(items);
1802
1931
  const visible = items.slice(start, end + 1);
1932
+ const finishedStatuses = /* @__PURE__ */ new Set(["done", "skipped", "error"]);
1933
+ const doneCount = items.filter((i) => finishedStatuses.has(i.status)).length;
1934
+ const pct = total > 0 ? Math.round(doneCount / total * 100) : 0;
1935
+ const topHidden = start;
1936
+ const bottomHidden = total - 1 - end;
1803
1937
  return html`
1804
- <ul class="task-list">
1805
- ${start > 0 ? html`<li class="queue-ellipsis" aria-hidden="true">
1806
- <span></span><span></span><span></span>
1807
- </li>` : nothing}
1808
- ${visible.map(
1938
+ <div class="queue-layout">
1939
+ <div class="queue-progress-v">
1940
+ <div class="queue-progress-track-v">
1941
+ <div class="queue-progress-fill-v" style="height: ${pct}%"></div>
1942
+ </div>
1943
+ <span class="queue-progress-count-v">${doneCount}/${total}</span>
1944
+ </div>
1945
+ <ul class="task-list">
1946
+ ${topHidden > 0 ? html`<li class="queue-ellipsis" aria-hidden="true">
1947
+ <div class="queue-ellipsis-dots"><span></span><span></span><span></span></div>
1948
+ <span class="queue-ellipsis-badge">+${topHidden}</span>
1949
+ </li>` : nothing}
1950
+ ${repeat(
1951
+ visible,
1952
+ (item) => item.key,
1809
1953
  (item) => html`
1810
- <li class="task-item">
1811
- <span class="task-icon">${this._renderTaskIcon(item.status)}</span>
1812
- <span class="task-label" data-status=${item.status}>${item.label}</span>
1813
- </li>
1814
- `
1954
+ <li class="task-item" data-status=${item.status}>
1955
+ <span class="task-icon">${this._renderTaskIcon(item.status)}</span>
1956
+ <span class="task-label" data-status=${item.status}>${item.label}</span>
1957
+ </li>
1958
+ `
1815
1959
  )}
1816
- ${end < total - 1 ? html`<li class="queue-ellipsis" aria-hidden="true">
1817
- <span></span><span></span><span></span>
1818
- </li>` : nothing}
1819
- </ul>
1960
+ ${bottomHidden > 0 ? html`<li class="queue-ellipsis" aria-hidden="true">
1961
+ <div class="queue-ellipsis-dots"><span></span><span></span><span></span></div>
1962
+ <span class="queue-ellipsis-badge">+${bottomHidden}</span>
1963
+ </li>` : nothing}
1964
+ </ul>
1965
+ </div>
1820
1966
  `;
1821
1967
  }
1822
1968
  _renderStepsHeader(items) {
@@ -2518,7 +2664,7 @@ enforceMaxVisible_fn = function() {
2518
2664
  // src/toast/toast-container.ts
2519
2665
  import { LitElement as LitElement2, html as html2, nothing as nothing2 } from "lit";
2520
2666
  import { property as property2, state as state2 } from "lit/decorators.js";
2521
- import { repeat } from "lit/directives/repeat.js";
2667
+ import { repeat as repeat2 } from "lit/directives/repeat.js";
2522
2668
 
2523
2669
  // src/toast/styles.ts
2524
2670
  import { css as css2 } from "lit";
@@ -3156,7 +3302,7 @@ var ToastContainer = class extends LitElement2 {
3156
3302
  const s = this._state;
3157
3303
  return html2`
3158
3304
  <div class="container" data-position=${s.position} role="region" aria-label="通知">
3159
- ${repeat(
3305
+ ${repeat2(
3160
3306
  s.items,
3161
3307
  (item) => item.id,
3162
3308
  (item) => this._renderToast(item)