@konomi-app/ui 5.8.0 → 5.10.3

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
@@ -673,8 +673,9 @@ updateItemStatus_fn = function(key, itemKey, status) {
673
673
 
674
674
  // src/overlay-dialog.ts
675
675
  import { LitElement, html, nothing } from "lit";
676
- import { customElement, property, state } from "lit/decorators.js";
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);
813
+ }
814
+ }
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);
810
822
  }
811
823
  }
812
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
  }
@@ -1219,6 +1260,26 @@ var overlayStyles = css`
1219
1260
  animation: spin 1.2s infinite linear;
1220
1261
  }
1221
1262
 
1263
+ .task-item[data-status='active'] .task-icon .mini-spinner {
1264
+ animation:
1265
+ spin 1.2s infinite linear,
1266
+ queue-spinner-pulse 2s infinite ease-in-out;
1267
+ }
1268
+
1269
+ @keyframes queue-spinner-pulse {
1270
+ 0%,
1271
+ 100% {
1272
+ box-shadow:
1273
+ inset 0 0 0 1px var(--dialog-spinner-track),
1274
+ 0 0 0 0 color-mix(in srgb, var(--dialog-accent, #3b82f6) 40%, transparent);
1275
+ }
1276
+ 50% {
1277
+ box-shadow:
1278
+ inset 0 0 0 1px var(--dialog-spinner-track),
1279
+ 0 0 0 4px color-mix(in srgb, var(--dialog-accent, #3b82f6) 0%, transparent);
1280
+ }
1281
+ }
1282
+
1222
1283
  .task-icon .mini-spinner-half {
1223
1284
  position: absolute;
1224
1285
  left: 50%;
@@ -1240,6 +1301,23 @@ var overlayStyles = css`
1240
1301
  box-shadow: inset 0 0 0 1px var(--dialog-spinner-arc);
1241
1302
  }
1242
1303
 
1304
+ @keyframes task-icon-pop {
1305
+ from {
1306
+ transform: scale(0.4);
1307
+ opacity: 0;
1308
+ }
1309
+ to {
1310
+ transform: scale(1);
1311
+ opacity: 1;
1312
+ }
1313
+ }
1314
+
1315
+ .task-item[data-status='done'] .task-icon svg,
1316
+ .task-item[data-status='error'] .task-icon svg,
1317
+ .task-item[data-status='skipped'] .task-icon svg {
1318
+ animation: task-icon-pop 400ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
1319
+ }
1320
+
1243
1321
  .task-label {
1244
1322
  color: #6b7280;
1245
1323
  transition: color 250ms ease;
@@ -1275,21 +1353,80 @@ var overlayStyles = css`
1275
1353
  color: #9ca3af;
1276
1354
  }
1277
1355
 
1356
+ /* ─── Queue layout & progress ─── */
1357
+
1358
+ .queue-layout {
1359
+ display: flex;
1360
+ align-items: stretch;
1361
+ gap: 10px;
1362
+ width: 100%;
1363
+ }
1364
+
1365
+ .queue-layout .task-list {
1366
+ flex: 1;
1367
+ }
1368
+
1369
+ .queue-progress-v {
1370
+ display: flex;
1371
+ flex-direction: column;
1372
+ align-items: center;
1373
+ flex-shrink: 0;
1374
+ width: 14px;
1375
+ animation: task-item-enter 300ms cubic-bezier(0.16, 1, 0.3, 1) both;
1376
+ }
1377
+
1378
+ .queue-progress-track-v {
1379
+ flex: 1;
1380
+ width: 2px;
1381
+ background: rgba(156, 163, 175, 0.2);
1382
+ border-radius: 1px;
1383
+ position: relative;
1384
+ overflow: hidden;
1385
+ }
1386
+
1387
+ .queue-progress-fill-v {
1388
+ position: absolute;
1389
+ top: 0;
1390
+ left: 0;
1391
+ right: 0;
1392
+ background: var(--dialog-accent, #3b82f6);
1393
+ border-radius: 1px;
1394
+ transition: height 600ms cubic-bezier(0.4, 0, 0.2, 1);
1395
+ }
1396
+
1397
+ .queue-progress-count-v {
1398
+ font-size: 10px;
1399
+ font-weight: 500;
1400
+ color: #9ca3af;
1401
+ margin-top: 5px;
1402
+ writing-mode: vertical-rl;
1403
+ letter-spacing: 0.04em;
1404
+ font-variant-numeric: tabular-nums;
1405
+ line-height: 1;
1406
+ }
1407
+
1278
1408
  /* ─── Queue ellipsis ─── */
1279
1409
 
1280
1410
  .queue-ellipsis {
1411
+ display: flex;
1412
+ flex-direction: row;
1413
+ align-items: center;
1414
+ gap: 8px;
1415
+ list-style: none;
1416
+ }
1417
+
1418
+ .queue-ellipsis-dots {
1281
1419
  display: flex;
1282
1420
  flex-direction: column;
1283
1421
  align-items: center;
1422
+ justify-content: center;
1284
1423
  gap: 3px;
1424
+ width: 24px;
1285
1425
  padding: 4px 0;
1286
- /* アイコン列 (24px) の中央に配置: (24px - 4px dot) / 2 = 10px */
1287
- padding-left: 10px;
1288
- align-self: flex-start;
1289
- list-style: none;
1426
+ flex-shrink: 0;
1290
1427
  }
1291
1428
 
1292
- .queue-ellipsis span {
1429
+ .queue-ellipsis-dots span {
1293
1430
  display: block;
1294
1431
  width: 4px;
1295
1432
  height: 4px;
@@ -1297,6 +1434,16 @@ var overlayStyles = css`
1297
1434
  background-color: #d1d5db;
1298
1435
  }
1299
1436
 
1437
+ .queue-ellipsis-badge {
1438
+ font-size: 11px;
1439
+ font-weight: 500;
1440
+ color: #9ca3af;
1441
+ background: rgba(156, 163, 175, 0.12);
1442
+ border-radius: 10px;
1443
+ padding: 2px 7px;
1444
+ letter-spacing: 0.01em;
1445
+ }
1446
+
1300
1447
  /* ─── Steps indicator ─── */
1301
1448
 
1302
1449
  .steps-header {
@@ -1462,13 +1609,13 @@ var overlayStyles = css`
1462
1609
  }
1463
1610
 
1464
1611
  .form-error {
1465
- font-size: 12px;
1612
+ font-size: 13px;
1466
1613
  color: var(--dialog-form-error-color);
1467
1614
  min-height: 1em;
1468
1615
  }
1469
1616
 
1470
1617
  .form-hint {
1471
- font-size: 12px;
1618
+ font-size: 13px;
1472
1619
  color: var(--dialog-form-hint-color);
1473
1620
  }
1474
1621
 
@@ -1520,7 +1667,7 @@ var overlayStyles = css`
1520
1667
  }
1521
1668
 
1522
1669
  .step-form-counter {
1523
- font-size: 12px;
1670
+ font-size: 13px;
1524
1671
  color: var(--dialog-form-hint-color);
1525
1672
  text-align: center;
1526
1673
  margin: 0 0 4px;
@@ -1553,7 +1700,9 @@ var overlayStyles = css`
1553
1700
  border: 1px solid var(--dialog-form-input-border);
1554
1701
  background: transparent;
1555
1702
  color: var(--dialog-text-color);
1556
- transition: background-color 120ms ease, border-color 120ms ease;
1703
+ transition:
1704
+ background-color 120ms ease,
1705
+ border-color 120ms ease;
1557
1706
  }
1558
1707
 
1559
1708
  .btn-prev:hover {
@@ -1800,23 +1949,40 @@ var OverlayDialog = class extends LitElement {
1800
1949
  const total = items.length;
1801
1950
  const { start, end } = this._getQueueWindow(items);
1802
1951
  const visible = items.slice(start, end + 1);
1952
+ const finishedStatuses = /* @__PURE__ */ new Set(["done", "skipped", "error"]);
1953
+ const doneCount = items.filter((i) => finishedStatuses.has(i.status)).length;
1954
+ const pct = total > 0 ? Math.round(doneCount / total * 100) : 0;
1955
+ const topHidden = start;
1956
+ const bottomHidden = total - 1 - end;
1803
1957
  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(
1958
+ <div class="queue-layout">
1959
+ <div class="queue-progress-v">
1960
+ <div class="queue-progress-track-v">
1961
+ <div class="queue-progress-fill-v" style="height: ${pct}%"></div>
1962
+ </div>
1963
+ <span class="queue-progress-count-v">${doneCount}/${total}</span>
1964
+ </div>
1965
+ <ul class="task-list">
1966
+ ${topHidden > 0 ? html`<li class="queue-ellipsis" aria-hidden="true">
1967
+ <div class="queue-ellipsis-dots"><span></span><span></span><span></span></div>
1968
+ <span class="queue-ellipsis-badge">+${topHidden}</span>
1969
+ </li>` : nothing}
1970
+ ${repeat(
1971
+ visible,
1972
+ (item) => item.key,
1809
1973
  (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
- `
1974
+ <li class="task-item" data-status=${item.status}>
1975
+ <span class="task-icon">${this._renderTaskIcon(item.status)}</span>
1976
+ <span class="task-label" data-status=${item.status}>${item.label}</span>
1977
+ </li>
1978
+ `
1815
1979
  )}
1816
- ${end < total - 1 ? html`<li class="queue-ellipsis" aria-hidden="true">
1817
- <span></span><span></span><span></span>
1818
- </li>` : nothing}
1819
- </ul>
1980
+ ${bottomHidden > 0 ? html`<li class="queue-ellipsis" aria-hidden="true">
1981
+ <div class="queue-ellipsis-dots"><span></span><span></span><span></span></div>
1982
+ <span class="queue-ellipsis-badge">+${bottomHidden}</span>
1983
+ </li>` : nothing}
1984
+ </ul>
1985
+ </div>
1820
1986
  `;
1821
1987
  }
1822
1988
  _renderStepsHeader(items) {
@@ -2166,9 +2332,9 @@ __decorateClass([
2166
2332
  __decorateClass([
2167
2333
  state()
2168
2334
  ], OverlayDialog.prototype, "_isClosing", 2);
2169
- OverlayDialog = __decorateClass([
2170
- customElement("overlay-dialog")
2171
- ], OverlayDialog);
2335
+ if (!customElements.get("overlay-dialog")) {
2336
+ customElements.define("overlay-dialog", OverlayDialog);
2337
+ }
2172
2338
 
2173
2339
  // src/dialog.ts
2174
2340
  var _controller, _element, _DialogSingleton_instances, ensureElement_fn;
@@ -2517,8 +2683,8 @@ enforceMaxVisible_fn = function() {
2517
2683
 
2518
2684
  // src/toast/toast-container.ts
2519
2685
  import { LitElement as LitElement2, html as html2, nothing as nothing2 } from "lit";
2520
- import { customElement as customElement2, property as property2, state as state2 } from "lit/decorators.js";
2521
- import { repeat } from "lit/directives/repeat.js";
2686
+ import { property as property2, state as state2 } from "lit/decorators.js";
2687
+ import { repeat as repeat2 } from "lit/directives/repeat.js";
2522
2688
 
2523
2689
  // src/toast/styles.ts
2524
2690
  import { css as css2 } from "lit";
@@ -3156,7 +3322,7 @@ var ToastContainer = class extends LitElement2 {
3156
3322
  const s = this._state;
3157
3323
  return html2`
3158
3324
  <div class="container" data-position=${s.position} role="region" aria-label="通知">
3159
- ${repeat(
3325
+ ${repeat2(
3160
3326
  s.items,
3161
3327
  (item) => item.id,
3162
3328
  (item) => this._renderToast(item)
@@ -3172,9 +3338,9 @@ __decorateClass([
3172
3338
  __decorateClass([
3173
3339
  state2()
3174
3340
  ], ToastContainer.prototype, "_state", 2);
3175
- ToastContainer = __decorateClass([
3176
- customElement2("toast-container")
3177
- ], ToastContainer);
3341
+ if (!customElements.get("toast-container")) {
3342
+ customElements.define("toast-container", ToastContainer);
3343
+ }
3178
3344
 
3179
3345
  // src/toast/toast.ts
3180
3346
  var _controller2, _element2, _ToastSingleton_instances, ensureElement_fn2;