@hjmds/react 1.4.0 → 1.5.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/styles.css CHANGED
@@ -62,8 +62,12 @@
62
62
  .hjm-text[data-tone="danger"] { color: var(--hjm-color-danger); }
63
63
  .hjm-text[data-tone="inverse"] { color: var(--hjm-color-on-primary); }
64
64
 
65
+ /* Long unbroken copy (URLs, e-mail, identifiers) must wrap inside layout
66
+ containers instead of pushing them past the viewport; found by the 1.5.0
67
+ long-copy scenario proof. overflow-wrap inherits, so text children follow. */
65
68
  .hjm-surface {
66
69
  min-inline-size: 0;
70
+ overflow-wrap: anywhere;
67
71
  border: 1px solid transparent;
68
72
  border-radius: var(--hjm-radius-lg);
69
73
  background: var(--hjm-color-surface);
@@ -235,8 +239,8 @@
235
239
  /* Toggle treatment: aria-pressed already carried the state, so without a paired
236
240
  visual every consumer painted the selected background in product styles. */
237
241
  .hjm-button[data-selected="true"], .hjm-icon-button[data-selected="true"] { color: var(--hjm-color-content-brand); background: var(--hjm-color-surface-accent); border-color: var(--hjm-color-content-brand); }
238
- .hjm-button:active:not(:disabled):not([aria-disabled="true"]), .hjm-icon-button:active:not(:disabled):not([aria-disabled="true"]) { transform: scale(0.98); }
239
- .hjm-button:disabled, .hjm-icon-button:disabled { cursor: not-allowed; opacity: 0.5; }
242
+ .hjm-button:active:not(:disabled):not([aria-disabled="true"]), .hjm-icon-button:active:not(:disabled):not([aria-disabled="true"]) { opacity: var(--hjm-button-pressed-opacity); }
243
+ .hjm-button:disabled, .hjm-icon-button:disabled { cursor: not-allowed; opacity: var(--hjm-button-disabled-opacity); }
240
244
  /* 라벨은 자르지 않고 두 줄까지 접는다(buttonRecipe.label). 잘린 행동 라벨은 무엇을 하는
241
245
  버튼인지 잃고, 무제한 줄바꿈은 하단 CTA 행 같은 남의 레이아웃을 밀어낸다. */
242
246
  .hjm-button__label { min-inline-size: 0; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: var(--hjm-button-label-lines, 2); overflow: hidden; }
@@ -265,7 +269,7 @@
265
269
  .hjm-icon-button[data-size="small"] { inline-size: var(--hjm-control-button-small); block-size: var(--hjm-control-button-small); min-inline-size: 0; min-block-size: 0; }
266
270
  .hjm-icon-button[data-size="small"]::after { content: ""; position: absolute; inset: calc(-1 * var(--hjm-space-xxs)); }
267
271
  .hjm-icon-button[data-size="large"] { inline-size: var(--hjm-control-button-large); block-size: var(--hjm-control-button-large); }
268
- .hjm-link { display: inline-flex; align-items: center; gap: var(--hjm-space-xxs); color: var(--hjm-color-content-brand); text-underline-offset: 0.18em; }
272
+ .hjm-link { display: inline-flex; align-items: center; gap: var(--hjm-space-xxs); max-inline-size: 100%; min-inline-size: 0; overflow-wrap: anywhere; color: var(--hjm-color-content-brand); text-underline-offset: 0.18em; }
269
273
  .hjm-link[data-tone="neutral"] { color: var(--hjm-color-text-body); }
270
274
  .hjm-link[data-variant="standalone"] { min-block-size: var(--hjm-control-min-touch-target); min-inline-size: var(--hjm-control-min-touch-target); justify-content: center; text-decoration: none; }
271
275
  .hjm-link[aria-disabled="true"] { opacity: 0.5; text-decoration: none; }
@@ -278,8 +282,8 @@
278
282
  .hjm-segmented__item:has(input:focus-visible),
279
283
  .hjm-tabs__tab:focus-visible,
280
284
  .hjm-list-row:focus-visible {
281
- outline: 2px solid var(--hjm-color-content-brand);
282
- outline-offset: 2px;
285
+ outline: var(--hjm-focus-width) solid var(--hjm-color-focus);
286
+ outline-offset: var(--hjm-focus-offset);
283
287
  }
284
288
 
285
289
  .hjm-field { display: grid; gap: var(--hjm-space-xs); min-inline-size: 0; }
@@ -289,7 +293,7 @@
289
293
  align-items: center;
290
294
  min-block-size: var(--hjm-control-field-height);
291
295
  padding-inline: var(--hjm-space-md);
292
- border: 1px solid var(--hjm-color-text-muted);
296
+ border: var(--hjm-field-border-width) solid var(--hjm-color-text-muted);
293
297
  border-radius: var(--hjm-radius-md);
294
298
  background: var(--hjm-color-surface);
295
299
  }
@@ -300,9 +304,9 @@
300
304
  unfocused frames differ by 1.06:1 in light and 1.44:1 in dark, so the state change
301
305
  reads as hue only. The wider ring makes it a shape change like every other control.
302
306
  See issue #19. */
303
- .hjm-field[data-state="focused"] .hjm-field__control { border-color: var(--hjm-color-content-brand); box-shadow: 0 0 0 2px var(--hjm-color-content-brand); }
307
+ .hjm-field[data-state="focused"] .hjm-field__control { border-color: var(--hjm-color-content-brand); box-shadow: 0 0 0 var(--hjm-field-focus-ring-width) var(--hjm-color-content-brand); }
304
308
  .hjm-field[data-state="invalid"] .hjm-field__control { border-color: var(--hjm-color-danger); }
305
- .hjm-field[data-state="disabled"] { opacity: 0.6; }
309
+ .hjm-field[data-state="disabled"] { opacity: var(--hjm-field-disabled-opacity); }
306
310
  .hjm-field__input {
307
311
  inline-size: 100%;
308
312
  min-inline-size: 0;
@@ -494,7 +498,7 @@
494
498
  overflow-wrap: anywhere;
495
499
  }
496
500
  .hjm-bottom-navigation__item:hover { background: var(--hjm-color-surface-alt); }
497
- .hjm-bottom-navigation__item:active { background: var(--hjm-color-surface-brand); }
501
+ .hjm-bottom-navigation__item:active { background: var(--hjm-bottom-navigation-pressed-background); }
498
502
  .hjm-bottom-navigation__item:focus-visible {
499
503
  outline: 2px solid var(--hjm-color-content-brand);
500
504
  outline-offset: 2px;
@@ -893,7 +897,7 @@ button.hjm-list-row, a.hjm-list-row { cursor: pointer; }
893
897
  .hjm-list-row__title { color: var(--hjm-color-text-body); font-weight: var(--hjm-font-weight-bold); overflow-wrap: anywhere; }
894
898
  .hjm-list-row__description, .hjm-list-row__trailing { color: var(--hjm-color-text-muted); overflow-wrap: anywhere; }
895
899
 
896
- .hjm-section { display: grid; gap: var(--hjm-space-xs); min-inline-size: 0; }
900
+ .hjm-section { display: grid; gap: var(--hjm-space-xs); min-inline-size: 0; overflow-wrap: anywhere; }
897
901
  .hjm-section__header { display: flex; align-items: center; justify-content: space-between; gap: var(--hjm-space-sm); min-inline-size: 0; }
898
902
  .hjm-section__copy { display: grid; flex: 1 1 auto; gap: var(--hjm-space-xxs); min-inline-size: 0; }
899
903
  .hjm-section__title { margin: 0; color: var(--hjm-color-text-body); font: inherit; font-weight: var(--hjm-font-weight-bold); overflow-wrap: anywhere; }
@@ -929,8 +933,8 @@ button.hjm-list-row, a.hjm-list-row { cursor: pointer; }
929
933
  .hjm-statistic__value { color: var(--hjm-color-text); font-size: calc(var(--hjm-type-title-size) * var(--hjm-text-scale, 1)); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
930
934
  .hjm-statistic__affix, .hjm-statistic__hint { color: var(--hjm-color-text-muted); }
931
935
  .hjm-statistic__trend { display: inline-flex; align-items: center; gap: var(--hjm-space-xxs); font-weight: var(--hjm-font-weight-medium); overflow-wrap: anywhere; }
932
- .hjm-statistic__trend[data-tone="success"] { color: var(--hjm-color-success); }
933
- .hjm-statistic__trend[data-tone="warning"] { color: var(--hjm-color-warning); }
936
+ .hjm-statistic__trend[data-tone="success"] { color: var(--hjm-accent-success); }
937
+ .hjm-statistic__trend[data-tone="warning"] { color: var(--hjm-accent-warning); }
934
938
  .hjm-statistic__trend[data-tone="danger"] { color: var(--hjm-color-danger); }
935
939
  .hjm-statistic-group { display: grid; grid-template-columns: repeat(var(--hjm-statistic-columns), minmax(0, 1fr)); gap: var(--hjm-space-sm); min-inline-size: 0; }
936
940
  @media (max-width: 640px) {
@@ -1594,8 +1598,8 @@ button.hjm-list-row, a.hjm-list-row { cursor: pointer; }
1594
1598
  .hjm-heading {
1595
1599
  margin: 0;
1596
1600
  color: var(--hjm-color-text);
1597
- font-size: var(--hjm-heading-size);
1598
- line-height: var(--hjm-heading-line-height);
1601
+ font-size: calc(var(--hjm-heading-size) * var(--hjm-text-scale, 1));
1602
+ line-height: calc(var(--hjm-heading-line-height) * var(--hjm-text-scale, 1));
1599
1603
  font-weight: var(--hjm-heading-weight);
1600
1604
  overflow-wrap: anywhere;
1601
1605
  }
@@ -1630,8 +1634,8 @@ button.hjm-list-row, a.hjm-list-row { cursor: pointer; }
1630
1634
  min-inline-size: 0;
1631
1635
  flex: 1 1 auto;
1632
1636
  color: var(--hjm-color-text);
1633
- font-size: var(--hjm-top-title-size);
1634
- line-height: var(--hjm-top-title-line-height);
1637
+ font-size: calc(var(--hjm-top-title-size) * var(--hjm-text-scale, 1));
1638
+ line-height: calc(var(--hjm-top-title-line-height) * var(--hjm-text-scale, 1));
1635
1639
  font-weight: var(--hjm-top-title-weight);
1636
1640
  overflow-wrap: anywhere;
1637
1641
  }
@@ -1815,11 +1819,11 @@ button.hjm-list-row, a.hjm-list-row { cursor: pointer; }
1815
1819
  max-inline-size: calc(100vw - (2 * var(--hjm-space-md)));
1816
1820
  max-block-size: calc(100dvh - (2 * var(--hjm-space-md)));
1817
1821
  overflow: auto;
1818
- border: 1px solid var(--hjm-color-border);
1819
- border-radius: var(--hjm-radius-lg);
1822
+ border: var(--hjm-dialog-border-width) solid var(--hjm-dialog-border);
1823
+ border-radius: var(--hjm-dialog-radius);
1820
1824
  color: var(--hjm-color-text);
1821
- background: var(--hjm-color-surface);
1822
- box-shadow: 0 16px 48px rgb(0 0 0 / 28%);
1825
+ background: var(--hjm-dialog-background);
1826
+ box-shadow: var(--hjm-dialog-shadow);
1823
1827
  }
1824
1828
  .hjm-dialog { inline-size: min(36rem, 100%); }
1825
1829
  .hjm-dialog[data-size="small"] { inline-size: min(28rem, 100%); }
@@ -1912,6 +1916,10 @@ button.hjm-list-row, a.hjm-list-row { cursor: pointer; }
1912
1916
  .hjm-sheet-positioner[data-placement="end"] { justify-content: flex-end; }
1913
1917
  .hjm-sheet {
1914
1918
  inline-size: min(28rem, 100%);
1919
+ border: var(--hjm-sheet-border-width) solid var(--hjm-sheet-border);
1920
+ border-radius: var(--hjm-sheet-radius);
1921
+ background: var(--hjm-sheet-background);
1922
+ box-shadow: var(--hjm-sheet-shadow);
1915
1923
  display: flex;
1916
1924
  flex-direction: column;
1917
1925
  overflow: hidden;
@@ -1927,8 +1935,8 @@ button.hjm-list-row, a.hjm-list-row { cursor: pointer; }
1927
1935
  overscroll-behavior: contain;
1928
1936
  }
1929
1937
  .hjm-sheet[data-placement="bottom"] {
1930
- inline-size: min(48rem, 100%);
1931
- max-block-size: min(88dvh, 48rem);
1938
+ inline-size: min(var(--hjm-sheet-max-width), 100%);
1939
+ max-block-size: var(--hjm-sheet-max-height);
1932
1940
  border-end-start-radius: 0;
1933
1941
  border-end-end-radius: 0;
1934
1942
  }
@@ -1951,10 +1959,10 @@ button.hjm-list-row, a.hjm-list-row { cursor: pointer; }
1951
1959
  cursor: pointer;
1952
1960
  }
1953
1961
  .hjm-sheet__handle:focus-visible { outline: 2px solid var(--hjm-color-focus); outline-offset: -2px; border-radius: var(--hjm-radius-full); }
1954
- .hjm-sheet__handle-bar { inline-size: 2.25rem; block-size: 0.25rem; border-radius: var(--hjm-radius-full); background: var(--hjm-color-border-control); }
1955
- .hjm-sheet[data-detent="medium"] { block-size: 60dvh; }
1956
- .hjm-sheet[data-detent="large"] { block-size: 85dvh; }
1957
- .hjm-sheet[data-detent="full"] { block-size: 100dvh; }
1962
+ .hjm-sheet__handle-bar { inline-size: var(--hjm-sheet-handle-width); block-size: var(--hjm-sheet-handle-height); border-radius: var(--hjm-radius-full); background: var(--hjm-sheet-handle-color); }
1963
+ .hjm-sheet[data-detent="medium"] { block-size: var(--hjm-sheet-size-medium); }
1964
+ .hjm-sheet[data-detent="large"] { block-size: var(--hjm-sheet-size-large); }
1965
+ .hjm-sheet[data-detent="full"] { block-size: var(--hjm-sheet-size-full); }
1958
1966
  .hjm-sheet[data-placement="start"],
1959
1967
  .hjm-sheet[data-placement="end"] {
1960
1968
  block-size: calc(100dvh - (2 * var(--hjm-space-md)));
@@ -2309,7 +2317,7 @@ button.hjm-list-row, a.hjm-list-row { cursor: pointer; }
2309
2317
  .hjm-steps__indicator { flex: 0 0 auto; inline-size: 1.5rem; block-size: 1.5rem; display: grid; place-items: center; border: 1px solid var(--hjm-color-border); border-radius: 50%; color: var(--hjm-color-text-muted); background: var(--hjm-color-surface); font-size: var(--hjm-type-label-size); font-weight: var(--hjm-font-weight-bold); }
2310
2318
  .hjm-steps__connector { flex: 1 1 auto; block-size: 1px; background: var(--hjm-color-border); }
2311
2319
  .hjm-steps__step[data-status="current"] .hjm-steps__indicator { border: 2px solid var(--hjm-color-content-brand); color: var(--hjm-color-content-brand); }
2312
- .hjm-steps__step[data-status="complete"] .hjm-steps__indicator { border-color: var(--hjm-color-success); color: var(--hjm-color-success); background: var(--hjm-color-surface-alt); }
2320
+ .hjm-steps__step[data-status="complete"] .hjm-steps__indicator { border-color: var(--hjm-accent-success); color: var(--hjm-accent-success); background: var(--hjm-color-surface-alt); }
2313
2321
  .hjm-steps__step[data-status="complete"] .hjm-steps__connector { background: var(--hjm-color-content-brand); }
2314
2322
  .hjm-steps__step[data-status="error"] .hjm-steps__indicator { border: 2px solid var(--hjm-color-danger); color: var(--hjm-color-danger); background: var(--hjm-color-danger-fill); }
2315
2323
  .hjm-steps__copy { min-inline-size: 0; display: grid; gap: var(--hjm-space-xxs); padding-inline-end: var(--hjm-space-sm); }
@@ -2335,7 +2343,7 @@ button.hjm-list-row, a.hjm-list-row { cursor: pointer; }
2335
2343
  .hjm-upload-item .hjm-progress__copy > span { min-inline-size: 0; unicode-bidi: plaintext; }
2336
2344
  .hjm-upload-item .hjm-progress__copy > span:first-child { flex: 0 0 auto; white-space: nowrap; }
2337
2345
  .hjm-upload-item .hjm-progress__copy > span:last-child:not(:first-child) { flex: 1 1 10rem; overflow-wrap: anywhere; text-align: end; }
2338
- .hjm-upload-item[data-status="success"] .hjm-upload-item__status { color: var(--hjm-color-success); }
2346
+ .hjm-upload-item[data-status="success"] .hjm-upload-item__status { color: var(--hjm-accent-success); }
2339
2347
  .hjm-upload-item[data-status="error"] .hjm-upload-item__status { color: var(--hjm-color-danger); }
2340
2348
  .hjm-upload-item__action { flex: 0 0 auto; min-inline-size: var(--hjm-control-min-touch-target); min-block-size: var(--hjm-control-min-touch-target); margin-inline-start: auto; padding-inline: var(--hjm-space-sm); border: 0; color: var(--hjm-color-content-brand); background: transparent; font: inherit; font-weight: var(--hjm-font-weight-bold); white-space: nowrap; word-break: keep-all; cursor: pointer; }
2341
2349
  .hjm-upload-item__action[data-action="cancel"] { color: var(--hjm-color-danger); }
@@ -2359,7 +2367,7 @@ button.hjm-list-row, a.hjm-list-row { cursor: pointer; }
2359
2367
  .hjm-toast-viewport[data-placement$="-start"] { margin-inline-start: 0; }
2360
2368
  .hjm-toast-viewport[data-placement$="-end"] { margin-inline-end: 0; }
2361
2369
  /* Cards stay narrow on desktop too; keep close/action rows explicit (docs/toast.md). */
2362
- .hjm-toast { position: relative; min-inline-size: 0; min-block-size: 3.5rem; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--hjm-space-sm); padding: var(--hjm-space-md); overflow: hidden; border: 1px solid var(--hjm-color-border); border-radius: var(--hjm-radius-md); color: var(--hjm-color-text); background: var(--hjm-color-bg); box-shadow: 0 8px 24px rgb(0 0 0 / 18%); pointer-events: auto; }
2370
+ .hjm-toast { position: relative; min-inline-size: 0; min-block-size: 3.5rem; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--hjm-space-sm); padding: var(--hjm-space-md); overflow: hidden; border: var(--hjm-toast-border-width) solid var(--hjm-toast-border); border-radius: var(--hjm-toast-radius); color: var(--hjm-color-text); background: var(--hjm-toast-background); box-shadow: var(--hjm-toast-shadow); pointer-events: auto; }
2363
2371
  .hjm-toast__tone-mark { position: absolute; inset-block: 0; inset-inline-start: 0; inline-size: 2px; background: var(--hjm-color-text-muted); }
2364
2372
  .hjm-toast[data-tone="info"] .hjm-toast__tone-mark, .hjm-toast[data-tone="info"] .hjm-toast__icon { color: var(--hjm-accent-info); background-color: var(--hjm-accent-info); }
2365
2373
  .hjm-toast[data-tone="success"] .hjm-toast__tone-mark, .hjm-toast[data-tone="success"] .hjm-toast__icon { color: var(--hjm-accent-success); background-color: var(--hjm-accent-success); }
@@ -2370,7 +2378,7 @@ button.hjm-list-row, a.hjm-list-row { cursor: pointer; }
2370
2378
  .hjm-toast__action, .hjm-toast__close { min-block-size: var(--hjm-control-min-touch-target); border: 0; color: var(--hjm-color-content-brand); background: transparent; font: inherit; font-weight: var(--hjm-font-weight-bold); cursor: pointer; }
2371
2379
  .hjm-toast__close { grid-column: 3; grid-row: 1; align-self: start; inline-size: var(--hjm-control-min-touch-target); color: var(--hjm-color-text-muted); }
2372
2380
  .hjm-toast__action { grid-column: 2 / -1; grid-row: 2; justify-self: start; max-inline-size: 100%; overflow-wrap: anywhere; text-align: start; }
2373
- .hjm-toast[data-state="closing"] { opacity: 0; transform: translateY(var(--hjm-space-xs)); transition: opacity 160ms ease, transform 160ms ease; }
2381
+ .hjm-toast[data-state="closing"] { opacity: 0; transform: translateY(var(--hjm-space-xs)); transition: opacity var(--hjm-toast-exit-duration) var(--hjm-toast-exit-easing), transform var(--hjm-toast-exit-duration) var(--hjm-toast-exit-easing); }
2374
2382
 
2375
2383
  .hjm-dialog__close:focus-visible,
2376
2384
  .hjm-menu__item:focus-visible,