@manakind/ui-core 0.11.0 → 0.11.1

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.
@@ -18,6 +18,7 @@
18
18
  */
19
19
  border: 1px solid var(--_alert-border);
20
20
  border-radius: var(--ds-alert-radius);
21
+ overflow-wrap: anywhere;
21
22
  background-color: var(--_alert-bg);
22
23
  color: var(--_alert-text);
23
24
  font-size: var(--ds-alert-font-size);
@@ -52,8 +53,6 @@
52
53
  flex-direction: column;
53
54
  gap: var(--ds-alert-body-gap);
54
55
  min-width: 0;
55
- /* A word longer than the alert is wide (a URL, a quoted title) breaks instead of spilling out. */
56
- overflow-wrap: anywhere;
57
56
  }
58
57
 
59
58
  & .ds-alert__title {
@@ -13,11 +13,12 @@
13
13
  /*
14
14
  * A badge is almost always placed inside a flex row (a tab trigger, a card
15
15
  * header). The default `flex-shrink: 1` let it collapse below its own
16
- * content, and because the text is `nowrap` that showed up as clipped
17
- * digits rather than as a wrap — a three-digit count lost its last digit.
18
- * A badge is a small label; it should never be the thing that gives.
16
+ * content — a three-digit count lost its last digit. A badge is a small
17
+ * label; it should never be the thing that gives. It wraps only when its
18
+ * label is wider than the whole container.
19
19
  */
20
20
  flex-shrink: 0;
21
+ max-width: 100%;
21
22
  gap: var(--ds-badge-gap);
22
23
  /*
23
24
  * An explicit min-height rather than letting the box fall out of the
@@ -45,7 +46,7 @@
45
46
  font-size: var(--ds-badge-font-size);
46
47
  font-weight: var(--ds-badge-font-weight);
47
48
  line-height: inherit;
48
- white-space: nowrap;
49
+ overflow-wrap: anywhere;
49
50
 
50
51
  /*
51
52
  * A circle at one and two digits — the counts this shape is for — and a
@@ -9,6 +9,8 @@
9
9
  line-height: inherit;
10
10
  cursor: pointer;
11
11
  border: 1px solid transparent;
12
+ max-width: 100%;
13
+ overflow-wrap: anywhere;
12
14
 
13
15
  /*
14
16
  * For `asChild` on a link. A `<button>` is border-box and undecorated by
@@ -8,6 +8,7 @@
8
8
  background-color: var(--ds-card-bg);
9
9
  color: var(--ds-card-text);
10
10
  border: 1px solid var(--ds-card-border);
11
+ overflow-wrap: anywhere;
11
12
 
12
13
  & .ds-card__header {
13
14
  display: flex;
@@ -35,6 +36,7 @@
35
36
 
36
37
  & .ds-card__footer {
37
38
  display: flex;
39
+ flex-wrap: wrap;
38
40
  align-items: center;
39
41
  gap: var(--ds-card-gap);
40
42
  }
@@ -54,6 +54,7 @@
54
54
  background-color: var(--ds-dialog-bg);
55
55
  box-shadow: var(--ds-dialog-shadow);
56
56
  color: var(--ds-dialog-text);
57
+ overflow-wrap: anywhere;
57
58
 
58
59
  /*
59
60
  * The panel takes focus only as the focus trap's fallback, when nothing
@@ -4,6 +4,7 @@
4
4
  flex-direction: column;
5
5
  align-items: stretch;
6
6
  gap: var(--ds-field-gap);
7
+ overflow-wrap: anywhere;
7
8
 
8
9
  & .ds-field__label {
9
10
  display: inline-flex;
@@ -8,6 +8,15 @@
8
8
  border: 1px solid var(--ds-menu-content-border);
9
9
  border-radius: var(--ds-menu-content-radius);
10
10
  background-color: var(--ds-menu-content-bg);
11
+ /*
12
+ * As wide as its longest item, so a short label never wraps early, but no
13
+ * wider than the room Zag measures beside the trigger: past that an item
14
+ * wraps instead of pushing the menu off screen.
15
+ */
16
+ box-sizing: border-box;
17
+ inline-size: max-content;
18
+ max-inline-size: var(--available-width);
19
+ overflow-wrap: anywhere;
11
20
  /*
12
21
  * The `popup` stacking layer (ds-config/scripts/stacking.ts), as Select's
13
22
  * listbox: Zag copies this onto the positioner, a sibling of the page in
@@ -51,7 +60,6 @@
51
60
  calc(var(--ds-menu-content-radius) - var(--ds-menu-content-padding) - 1px)
52
61
  );
53
62
  color: var(--ds-menu-item-text);
54
- white-space: nowrap;
55
63
  cursor: pointer;
56
64
 
57
65
  &[data-highlighted] {
@@ -4,9 +4,12 @@
4
4
  flex-direction: column;
5
5
  gap: var(--ds-progress-gap);
6
6
  width: 100%;
7
+ overflow-wrap: anywhere;
7
8
 
9
+ /* Wraps, so a long label takes a line of its own instead of squeezing the value. */
8
10
  & .ds-progress__header {
9
11
  display: flex;
12
+ flex-wrap: wrap;
10
13
  align-items: center;
11
14
  justify-content: space-between;
12
15
  gap: var(--ds-progress-gap);
@@ -27,6 +27,7 @@
27
27
  background-color: var(--ds-select-content-bg);
28
28
  max-height: 20rem;
29
29
  overflow-y: auto;
30
+ overflow-wrap: anywhere;
30
31
  /*
31
32
  * Zag copies this onto the positioner, which is a sibling of the page in
32
33
  * `<body>`. Without it the listbox ranks as `auto` and any positioned page
@@ -109,6 +110,7 @@
109
110
  display: flex;
110
111
  flex-direction: column;
111
112
  gap: var(--ds-select-content-padding);
113
+ overflow-wrap: anywhere;
112
114
 
113
115
  & .ds-select__label {
114
116
  color: var(--ds-select-label-text);
@@ -26,6 +26,8 @@
26
26
  gap: var(--ds-switch-label-gap);
27
27
  color: var(--ds-switch-label-text);
28
28
  font-size: var(--_switch-font-size);
29
+ max-width: 100%;
30
+ overflow-wrap: anywhere;
29
31
  cursor: pointer;
30
32
 
31
33
  &[data-disabled] {
@@ -9,6 +9,7 @@
9
9
  * the chance to scroll.
10
10
  */
11
11
  min-inline-size: 0;
12
+ overflow-wrap: anywhere;
12
13
 
13
14
  /*
14
15
  * Derived so an inset child never curves more than its container.
@@ -106,8 +107,10 @@
106
107
  * list by the ring's overhang, and takes that back with a negative margin
107
108
  * to leave the list exactly where it was.
108
109
  */
110
+ /* Sideways only, which is also what tells the long-words test it scrolls. */
109
111
  & .ds-tabs__scroller {
110
112
  overflow-x: auto;
113
+ overflow-y: hidden;
111
114
  margin: calc(-1 * var(--_tabs-ring-overhang));
112
115
  padding: var(--_tabs-ring-overhang);
113
116
  scroll-padding-inline: var(--_tabs-ring-reach);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@manakind/ui-core",
3
- "version": "0.11.0",
3
+ "version": "0.11.1",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "repository": {