@manakind/manuia-ui 0.11.0 → 0.11.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.
@@ -23,6 +23,7 @@
23
23
 
24
24
  & .mui-category-card__meta {
25
25
  display: flex;
26
+ flex-wrap: wrap;
26
27
  align-items: flex-start;
27
28
  justify-content: space-between;
28
29
  gap: var(--semantic-space-gap);
@@ -14,6 +14,7 @@
14
14
  display: grid;
15
15
  grid-template-columns: minmax(0, 1fr);
16
16
  gap: var(--semantic-space-gap-tight);
17
+ overflow-wrap: anywhere;
17
18
 
18
19
  & .mui-focus-item__card {
19
20
  --ds-card-padding: var(--semantic-space-padding);
@@ -22,12 +23,12 @@
22
23
  }
23
24
 
24
25
  /*
25
- * Categories are capped at 40% of the row so long names wrap in their
26
- * share instead of squeezing the title, as on GoalListItem.
26
+ * Categories and the toggle are capped so a long name or label wraps in
27
+ * its share instead of squeezing the title, as on GoalListItem.
27
28
  */
28
29
  & .mui-focus-item__row {
29
30
  display: grid;
30
- grid-template-columns: minmax(0, 1fr) fit-content(40%) auto;
31
+ grid-template-columns: minmax(0, 1fr) fit-content(40%) fit-content(30%);
31
32
  grid-template-areas: "main categories toggle";
32
33
  align-items: center;
33
34
  gap: var(--semantic-space-gap) var(--semantic-space-gap-relaxed);
@@ -43,8 +44,6 @@
43
44
 
44
45
  & .mui-focus-item__title {
45
46
  --ds-card-text: var(--ds-card-text-muted);
46
-
47
- overflow-wrap: anywhere;
48
47
  }
49
48
 
50
49
  & .mui-focus-item__details {
@@ -59,15 +58,10 @@
59
58
 
60
59
  & .mui-focus-item__kind {
61
60
  display: inline-flex;
61
+ flex-wrap: wrap;
62
62
  align-items: center;
63
63
  gap: var(--semantic-space-gap-tight);
64
64
  font-weight: var(--primitives-font-weight-semibold);
65
- white-space: nowrap;
66
- }
67
-
68
- /* Details are product data (a project name), so they may break anywhere. */
69
- & .mui-focus-item__detail {
70
- overflow-wrap: anywhere;
71
65
  }
72
66
 
73
67
  & .mui-focus-item__actions {
@@ -80,10 +74,6 @@
80
74
  font-size: var(--primitives-font-size-sm);
81
75
  }
82
76
 
83
- & .mui-focus-item__action {
84
- overflow-wrap: anywhere;
85
- }
86
-
87
77
  & .mui-focus-item__categories {
88
78
  grid-area: categories;
89
79
  justify-content: flex-end;
@@ -96,7 +86,7 @@
96
86
 
97
87
  @container mui-focus-item (max-width: 36rem) {
98
88
  & .mui-focus-item__row {
99
- grid-template-columns: minmax(0, 1fr) auto;
89
+ grid-template-columns: minmax(0, 1fr) fit-content(50%);
100
90
  grid-template-areas:
101
91
  "main toggle"
102
92
  "categories categories";
@@ -298,12 +298,13 @@
298
298
  */
299
299
  & .mui-goal-card__type {
300
300
  display: inline-flex;
301
+ flex-wrap: wrap;
302
+ max-width: 100%;
301
303
  align-items: center;
302
304
  gap: var(--component-goal-card-chip-gap);
303
305
  color: var(--mui-tier-badge-text, var(--semantic-color-text-muted));
304
306
  font-size: var(--component-goal-card-chip-font-size);
305
307
  font-weight: var(--primitives-font-weight-semibold);
306
- white-space: nowrap;
307
308
  }
308
309
 
309
310
  & .mui-goal-card__categories {
@@ -7,6 +7,7 @@
7
7
  margin: 0;
8
8
  padding: 0;
9
9
  list-style: none;
10
+ overflow-wrap: anywhere;
10
11
 
11
12
  & .mui-goal-categories__item {
12
13
  display: inline-flex;
@@ -14,7 +15,6 @@
14
15
  gap: var(--semantic-space-gap-tight);
15
16
  color: var(--semantic-color-text-muted);
16
17
  font-size: var(--primitives-font-size-sm);
17
- white-space: nowrap;
18
18
  }
19
19
 
20
20
  /*
@@ -15,6 +15,7 @@
15
15
  display: grid;
16
16
  grid-template-columns: minmax(0, 1fr);
17
17
  gap: var(--semantic-space-gap-tight);
18
+ overflow-wrap: anywhere;
18
19
 
19
20
  /* Through the contract keys ui-core reads, so no specificity contest with `.ds-card`. */
20
21
  & .mui-goal-list-item__card {
@@ -24,14 +25,14 @@
24
25
  }
25
26
 
26
27
  /*
27
- * The categories' track is capped: left at `auto` it grows to their
28
- * one-line width, and a goal with three long categories squeezed its own
29
- * title into a sliver that the details then painted over. Capped, they
30
- * wrap inside their share and the title keeps the rest.
28
+ * The categories' and status's tracks are capped: left at `auto` a track
29
+ * grows to its one-line width, and a goal with three long categories, or
30
+ * a status label too long to break, squeezed its own title into a sliver.
31
+ * Capped, they wrap inside their share and the title keeps the rest.
31
32
  */
32
33
  & .mui-goal-list-item__row {
33
34
  display: grid;
34
- grid-template-columns: minmax(0, 1fr) fit-content(40%) auto;
35
+ grid-template-columns: minmax(0, 1fr) fit-content(40%) fit-content(30%);
35
36
  grid-template-areas: "main categories status";
36
37
  align-items: center;
37
38
  gap: var(--semantic-space-gap) var(--semantic-space-gap-relaxed);
@@ -48,8 +49,6 @@
48
49
  /* As on GoalCard: size and grouping mark the heading, not colour. */
49
50
  & .mui-goal-list-item__title {
50
51
  --ds-card-text: var(--ds-card-text-muted);
51
-
52
- overflow-wrap: anywhere;
53
52
  }
54
53
 
55
54
  & .mui-goal-list-item__details {
@@ -64,14 +63,10 @@
64
63
 
65
64
  & .mui-goal-list-item__type {
66
65
  display: inline-flex;
66
+ flex-wrap: wrap;
67
67
  align-items: center;
68
68
  gap: var(--semantic-space-gap-tight);
69
69
  font-weight: var(--primitives-font-weight-semibold);
70
- white-space: nowrap;
71
- }
72
-
73
- & .mui-goal-list-item__detail {
74
- white-space: nowrap;
75
70
  }
76
71
 
77
72
  /* GoalCard's small-caps label, so the two views name their details alike. */
@@ -97,7 +92,7 @@
97
92
  */
98
93
  @container mui-goal-list-item (max-width: 36rem) {
99
94
  & .mui-goal-list-item__row {
100
- grid-template-columns: minmax(0, 1fr) auto;
95
+ grid-template-columns: minmax(0, 1fr) fit-content(50%);
101
96
  grid-template-areas:
102
97
  "main status"
103
98
  "categories categories";
@@ -17,6 +17,7 @@
17
17
  display: inline-flex;
18
18
  align-items: center;
19
19
  flex-shrink: 0;
20
+ max-width: 100%;
20
21
  gap: var(--semantic-space-gap-tight);
21
22
  margin: 0;
22
23
  padding: 0 var(--semantic-space-gap-tight);
@@ -38,6 +39,11 @@
38
39
  outline-offset: 3px;
39
40
  }
40
41
 
42
+ /* A Badge never gives way in a row, but inside the capped trigger it must, or the chevron goes. */
43
+ & .mui-goal-status-menu__badge {
44
+ flex-shrink: 1;
45
+ }
46
+
41
47
  & .mui-goal-status-menu__indicator {
42
48
  color: var(--semantic-color-text-muted);
43
49
  transform: rotate(90deg);
@@ -25,7 +25,7 @@ const STATUS_ITEMS = GOAL_STATUSES.map((status) => ({
25
25
  * status and what pressing it does, which also names the menu it opens.
26
26
  */
27
27
  export function GoalStatusMenu({ status, statusIcon, onStatusChange, indicator = FallbackChevronRight, itemIndicator, labelClassName, className, }) {
28
- const badge = (_jsx(Badge, { variant: STATUS_VARIANT[status], appearance: "plain", icon: statusIcon, labelClassName: cx('mui-goal-status-menu__label', labelClassName), "aria-label": status, className: onStatusChange ? undefined : className, children: status }));
28
+ const badge = (_jsx(Badge, { variant: STATUS_VARIANT[status], appearance: "plain", icon: statusIcon, labelClassName: cx('mui-goal-status-menu__label', labelClassName), "aria-label": status, className: onStatusChange ? 'mui-goal-status-menu__badge' : className, children: status }));
29
29
  if (!onStatusChange)
30
30
  return badge;
31
31
  return (_jsx(Menu, { label: "Status", items: STATUS_ITEMS, value: status, onValueChange: onStatusChange, itemIndicator: itemIndicator, trigger: _jsxs("button", { type: "button", className: cx('mui-goal-status-menu', className), "aria-label": `Status: ${status}. Change status`, children: [badge, _jsx(Icon, { source: indicator, size: "sm", decorative: true, className: "mui-goal-status-menu__indicator" })] }) }));
@@ -1 +1 @@
1
- {"version":3,"file":"goal-status-menu.js","sourceRoot":"","sources":["../../src/goal-status-menu/goal-status-menu.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,KAAK,EACL,EAAE,EACF,oBAAoB,EACpB,IAAI,EAEJ,IAAI,GAEL,MAAM,mBAAmB,CAAC;AAC3B,OAAO,wBAAwB,CAAC;AAEhC,+EAA+E;AAC/E,MAAM,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,GAC3C,IACK,GAEX,CACH,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"goal-status-menu.js","sourceRoot":"","sources":["../../src/goal-status-menu/goal-status-menu.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,KAAK,EACL,EAAE,EACF,oBAAoB,EACpB,IAAI,EAEJ,IAAI,GAEL,MAAM,mBAAmB,CAAC;AAC3B,OAAO,wBAAwB,CAAC;AAEhC,+EAA+E;AAC/E,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,aAAa,EAAE,aAAa,EAAE,WAAW,CAAU,CAAC;AAIlF,MAAM,cAAc,GAAqD;IACvE,aAAa,EAAE,OAAO;IACtB,aAAa,EAAE,MAAM;IACrB,SAAS,EAAE,SAAS;CACrB,CAAC;AAEF,MAAM,YAAY,GAA2B,aAAa,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAC1E,KAAK,EAAE,MAAM;IACb,KAAK,EAAE,MAAM;CACd,CAAC,CAAC,CAAC;AAsCJ;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,cAAc,CAAC,EAC7B,MAAM,EACN,UAAU,EACV,cAAc,EACd,SAAS,GAAG,oBAAoB,EAChC,aAAa,EACb,cAAc,EACd,SAAS,GACW;IACpB,MAAM,KAAK,GAAG,CACZ,KAAC,KAAK,IACJ,OAAO,EAAE,cAAc,CAAC,MAAM,CAAC,EAC/B,UAAU,EAAC,OAAO,EAClB,IAAI,EAAE,UAAU,EAChB,cAAc,EAAE,EAAE,CAAC,6BAA6B,EAAE,cAAc,CAAC,gBACrD,MAAM,EAClB,SAAS,EAAE,cAAc,CAAC,CAAC,CAAC,6BAA6B,CAAC,CAAC,CAAC,SAAS,YAEpE,MAAM,GACD,CACT,CAAC;IAEF,IAAI,CAAC,cAAc;QAAE,OAAO,KAAK,CAAC;IAElC,OAAO,CACL,KAAC,IAAI,IACH,KAAK,EAAC,QAAQ,EACd,KAAK,EAAE,YAAY,EACnB,KAAK,EAAE,MAAM,EACb,aAAa,EAAE,cAAc,EAC7B,aAAa,EAAE,aAAa,EAC5B,OAAO,EACL,kBACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,EAAE,CAAC,sBAAsB,EAAE,SAAS,CAAC,gBACpC,WAAW,MAAM,iBAAiB,aAE7C,KAAK,EACN,KAAC,IAAI,IACH,MAAM,EAAE,SAAS,EACjB,IAAI,EAAC,IAAI,EACT,UAAU,QACV,SAAS,EAAC,iCAAiC,GAC3C,IACK,GAEX,CACH,CAAC;AACJ,CAAC"}
@@ -7,5 +7,17 @@ export interface GoalTabTriggerProps extends ComponentProps<typeof TabsTrigger>
7
7
  /** How many goals fall in this timeframe. */
8
8
  count: number;
9
9
  }
10
+ /**
11
+ * A Manuia timeframe tab with its goal count.
12
+ *
13
+ * Composes `ui-core`'s `TabsTrigger` and `Badge`. The pairing is product
14
+ * specific — "a tab that carries a count of the things behind it" is a Manuia
15
+ * pattern, so it lives here rather than widening `TabsTrigger`.
16
+ *
17
+ * The count badge carries an `aria-label`, because a bare number announced
18
+ * after the label tells a screen reader user nothing. Tabs with no goals are
19
+ * rendered in a lighter weight, but they stay reachable — the count itself is
20
+ * the information.
21
+ */
10
22
  export declare function GoalTabTrigger({ label, count, className, ...props }: GoalTabTriggerProps): import("react/jsx-runtime").JSX.Element;
11
23
  //# sourceMappingURL=goal-tab-trigger.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"goal-tab-trigger.d.ts","sourceRoot":"","sources":["../../src/goal-tab-trigger/goal-tab-trigger.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,wBAAwB,CAAC;AAEhC,MAAM,WAAW,mBAAoB,SAAQ,cAAc,CAAC,OAAO,WAAW,CAAC;IAC7E,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,KAAK,EAAE,MAAM,CAAC;CACf;AA4BD,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,mBAAmB,2CAmBxF"}
1
+ {"version":3,"file":"goal-tab-trigger.d.ts","sourceRoot":"","sources":["../../src/goal-tab-trigger/goal-tab-trigger.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,wBAAwB,CAAC;AAEhC,MAAM,WAAW,mBAAoB,SAAQ,cAAc,CAAC,OAAO,WAAW,CAAC;IAC7E,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,KAAK,EAAE,MAAM,CAAC;CACf;AAQD;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,mBAAmB,2CAmBxF"}
@@ -1,6 +1,11 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Badge, cx, TabsTrigger } from '@manakind/ui-core';
3
3
  import './goal-tab-trigger.css';
4
+ /**
5
+ * Cap the visible count at `99+` to bound the badge width.
6
+ * The badge's `aria-label` retains the full count.
7
+ */
8
+ const MAX_DISPLAYED_COUNT = 99;
4
9
  /**
5
10
  * A Manuia timeframe tab with its goal count.
6
11
  *
@@ -13,19 +18,6 @@ import './goal-tab-trigger.css';
13
18
  * rendered in a lighter weight, but they stay reachable — the count itself is
14
19
  * the information.
15
20
  */
16
- /**
17
- * Counts stop rendering their true value here and switch to `99+`.
18
- *
19
- * The cap bounds how wide the badge can get: without it a five-digit count
20
- * would stretch the tab arbitrarily. At `99+` the badge widens from a circle
21
- * into a pill, which is what every other library does with this case and
22
- * costs nothing structurally — the height is pinned, so nothing reflows and
23
- * the tab strip keeps its nested radii.
24
- *
25
- * The cap is display only. The `aria-label` always announces the real
26
- * number, so nothing is hidden from a screen reader.
27
- */
28
- const MAX_DISPLAYED_COUNT = 99;
29
21
  export function GoalTabTrigger({ label, count, className, ...props }) {
30
22
  const hasGoals = count > 0;
31
23
  const overflows = count > MAX_DISPLAYED_COUNT;
@@ -1 +1 @@
1
- {"version":3,"file":"goal-tab-trigger.js","sourceRoot":"","sources":["../../src/goal-tab-trigger/goal-tab-trigger.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAE3D,OAAO,wBAAwB,CAAC;AAShC;;;;;;;;;;;GAWG;AACH;;;;;;;;;;;GAWG;AACH,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAE/B,MAAM,UAAU,cAAc,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,KAAK,EAAuB;IACvF,MAAM,QAAQ,GAAG,KAAK,GAAG,CAAC,CAAC;IAC3B,MAAM,SAAS,GAAG,KAAK,GAAG,mBAAmB,CAAC;IAE9C,OAAO,CACL,MAAC,WAAW,IACV,SAAS,EAAE,EAAE,CAAC,sBAAsB,EAAE,CAAC,QAAQ,IAAI,6BAA6B,EAAE,SAAS,CAAC,KACxF,KAAK,aAET,yBAAO,KAAK,GAAQ,EACpB,KAAC,KAAK,IACJ,KAAK,EAAC,QAAQ,EACd,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,gBAC7B,GAAG,KAAK,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE,YAEvD,SAAS,CAAC,CAAC,CAAC,GAAG,mBAAmB,GAAG,CAAC,CAAC,CAAC,KAAK,GACxC,IACI,CACf,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"goal-tab-trigger.js","sourceRoot":"","sources":["../../src/goal-tab-trigger/goal-tab-trigger.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAE3D,OAAO,wBAAwB,CAAC;AAShC;;;GAGG;AACH,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAE/B;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,cAAc,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,KAAK,EAAuB;IACvF,MAAM,QAAQ,GAAG,KAAK,GAAG,CAAC,CAAC;IAC3B,MAAM,SAAS,GAAG,KAAK,GAAG,mBAAmB,CAAC;IAE9C,OAAO,CACL,MAAC,WAAW,IACV,SAAS,EAAE,EAAE,CAAC,sBAAsB,EAAE,CAAC,QAAQ,IAAI,6BAA6B,EAAE,SAAS,CAAC,KACxF,KAAK,aAET,yBAAO,KAAK,GAAQ,EACpB,KAAC,KAAK,IACJ,KAAK,EAAC,QAAQ,EACd,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,gBAC7B,GAAG,KAAK,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE,YAEvD,SAAS,CAAC,CAAC,CAAC,GAAG,mBAAmB,GAAG,CAAC,CAAC,CAAC,KAAK,GACxC,IACI,CACf,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@manakind/manuia-ui",
3
- "version": "0.11.0",
3
+ "version": "0.11.4",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "dependencies": {
40
40
  "@manakind/manuia-tokens": "0.10.0",
41
- "@manakind/ui-core": "0.11.0"
41
+ "@manakind/ui-core": "0.11.3"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "react": "^19.0.0",