@manakind/manuia-ui 0.14.0 → 0.16.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.
Files changed (39) hide show
  1. package/dist/action-item/action-item.css +178 -0
  2. package/dist/action-item/action-item.css.d.ts +2 -0
  3. package/dist/action-item/action-item.d.ts +89 -0
  4. package/dist/action-item/action-item.d.ts.map +1 -0
  5. package/dist/action-item/action-item.js +41 -0
  6. package/dist/action-item/action-item.js.map +1 -0
  7. package/dist/action-item/index.d.ts +3 -0
  8. package/dist/action-item/index.d.ts.map +1 -0
  9. package/dist/action-item/index.js +2 -0
  10. package/dist/action-item/index.js.map +1 -0
  11. package/dist/action-list/action-list.css +10 -0
  12. package/dist/action-list/action-list.css.d.ts +2 -0
  13. package/dist/action-list/action-list.d.ts +19 -0
  14. package/dist/action-list/action-list.d.ts.map +1 -0
  15. package/dist/action-list/action-list.js +18 -0
  16. package/dist/action-list/action-list.js.map +1 -0
  17. package/dist/action-list/index.d.ts +3 -0
  18. package/dist/action-list/index.d.ts.map +1 -0
  19. package/dist/action-list/index.js +2 -0
  20. package/dist/action-list/index.js.map +1 -0
  21. package/dist/category-card/category-card.css +1 -1
  22. package/dist/focus-item/focus-item.css +11 -6
  23. package/dist/focus-list/focus-list.css +1 -1
  24. package/dist/goal-card/goal-card.css +6 -1
  25. package/dist/goal-card/goal-card.d.ts.map +1 -1
  26. package/dist/goal-card/goal-card.js +1 -10
  27. package/dist/goal-card/goal-card.js.map +1 -1
  28. package/dist/goal-list/goal-list.css +1 -1
  29. package/dist/goal-list-item/goal-list-item.css +11 -7
  30. package/dist/goal-status-menu/goal-status-menu.css +0 -45
  31. package/dist/goal-status-menu/goal-status-menu.d.ts +1 -6
  32. package/dist/goal-status-menu/goal-status-menu.d.ts.map +1 -1
  33. package/dist/goal-status-menu/goal-status-menu.js +4 -4
  34. package/dist/goal-status-menu/goal-status-menu.js.map +1 -1
  35. package/dist/index.d.ts +2 -0
  36. package/dist/index.d.ts.map +1 -1
  37. package/dist/index.js +2 -0
  38. package/dist/index.js.map +1 -1
  39. package/package.json +3 -3
@@ -0,0 +1,178 @@
1
+ @layer components {
2
+ .mui-action-item {
3
+ /*
4
+ * The row lays out by its own width, as FocusItem does, so a list in a
5
+ * narrow column collapses the same way a list on a phone does.
6
+ */
7
+ container: mui-action-item / inline-size;
8
+
9
+ /*
10
+ * The second line sits well clear of the facts: the gap the column
11
+ * already holds plus this margin, 24px.
12
+ */
13
+ --mui-action-item-footer-space: var(--semantic-space-gap-relaxed);
14
+ display: grid;
15
+ grid-template-columns: minmax(0, 1fr);
16
+ gap: var(--semantic-space-gap-tight);
17
+ overflow-wrap: anywhere;
18
+
19
+ & .mui-action-item__card {
20
+ --ds-card-padding: var(--semantic-space-padding);
21
+ --ds-card-title-font-size: var(--primitives-font-size-md);
22
+ --ds-card-title-font-weight: var(--primitives-font-weight-medium);
23
+ }
24
+
25
+ /* A selected row carries a second border in the strong primary, as a chosen card does. */
26
+ &.mui-action-item--selected .mui-action-item__card {
27
+ --ds-card-border: var(--semantic-color-action-primary-strong);
28
+ box-shadow: 0 0 0 1px var(--semantic-color-action-primary-strong);
29
+ }
30
+
31
+ /*
32
+ * Toggle, main, controls, checkbox, in a flex row rather than a grid: the
33
+ * toggle, controls and checkbox are each optional, and an absent flex
34
+ * item leaves no track and no gap behind. The controls are capped so a
35
+ * long label in them wraps in its share instead of squeezing the title.
36
+ */
37
+ & .mui-action-item__row {
38
+ display: flex;
39
+ align-items: start;
40
+ gap: var(--semantic-space-gap) var(--semantic-space-gap-relaxed);
41
+ }
42
+
43
+ /*
44
+ * The rhythm groups the card: the title, then its facts held close
45
+ * together, then the controls set apart from both.
46
+ */
47
+ & .mui-action-item__main {
48
+ display: flex;
49
+ flex: 1 1 0;
50
+ flex-direction: column;
51
+ gap: var(--semantic-space-gap);
52
+ min-width: 0;
53
+ }
54
+
55
+ /* Set on what follows the title, so a title with nothing under it keeps no space. */
56
+ & .mui-action-item__title + :is(.mui-action-item__details, .mui-action-item__categories) {
57
+ margin-block-start: var(--semantic-space-gap);
58
+ }
59
+
60
+ &.mui-action-item--completed .mui-action-item__title {
61
+ --ds-card-text: var(--ds-card-text-muted);
62
+ text-decoration: line-through;
63
+ }
64
+
65
+ & .mui-action-item__details {
66
+ display: flex;
67
+ flex-wrap: wrap;
68
+ align-items: center;
69
+ gap: var(--semantic-space-gap) var(--semantic-space-gap-relaxed);
70
+ margin: 0;
71
+ color: var(--semantic-color-text-muted);
72
+ font-size: var(--primitives-font-size-xs);
73
+ }
74
+
75
+ & .mui-action-item__detail {
76
+ display: inline-flex;
77
+ flex-wrap: wrap;
78
+ align-items: center;
79
+ gap: var(--semantic-space-gap-tight);
80
+ }
81
+
82
+ & .mui-action-item__secondary {
83
+ display: flex;
84
+ flex-wrap: wrap;
85
+ align-items: center;
86
+ gap: var(--semantic-space-gap);
87
+ margin-block-start: var(--mui-action-item-footer-space);
88
+ }
89
+
90
+ & .mui-action-item__controls {
91
+ display: flex;
92
+ flex: 0 1 auto;
93
+ flex-wrap: wrap;
94
+ align-items: center;
95
+ justify-content: flex-end;
96
+ gap: var(--semantic-space-gap);
97
+ max-width: 40%;
98
+ }
99
+
100
+ /*
101
+ * Narrow: the row wraps. The toggle, the title and the checkbox keep the
102
+ * first line. The details and categories follow, lined up under the title
103
+ * rather than the toggle, so the text keeps one left edge. The second
104
+ * line and the controls make a footer across the card's full width, the
105
+ * controls at its end, so a phone spends no line on two icon buttons.
106
+ */
107
+ @container mui-action-item (max-width: 36rem) {
108
+ & .mui-action-item__row {
109
+ --mui-action-item-indent: 0px;
110
+ flex-wrap: wrap;
111
+ row-gap: var(--semantic-space-gap);
112
+ }
113
+
114
+ /*
115
+ * A zero-height full line ahead of everything ordered after the title's
116
+ * line. The title's flex basis is 0, so without it a row with no
117
+ * details or categories pulls the footer up beside the title. Its
118
+ * negative margin takes back the row gap its empty line adds.
119
+ */
120
+ & .mui-action-item__row::before {
121
+ content: "";
122
+ flex: 0 0 100%;
123
+ order: 1;
124
+ margin-block-start: calc(-1 * var(--semantic-space-gap));
125
+ }
126
+
127
+ & .mui-action-item__row:has(> .mui-action-item__complete) {
128
+ --mui-action-item-indent: calc(
129
+ var(--ds-button-size-md-icon-only-size) +
130
+ var(--semantic-space-gap-relaxed)
131
+ );
132
+ }
133
+
134
+ & .mui-action-item__main {
135
+ display: contents;
136
+ }
137
+
138
+ & .mui-action-item__title {
139
+ flex: 1 1 0;
140
+ align-self: center;
141
+ min-width: 0;
142
+ }
143
+
144
+ /* Ordered after the checkbox, which the DOM puts last, so the checkbox wraps onto the title's line. */
145
+ & .mui-action-item__details,
146
+ & .mui-action-item__categories,
147
+ & .mui-action-item__secondary,
148
+ & .mui-action-item__controls {
149
+ order: 1;
150
+ max-width: none;
151
+ }
152
+
153
+ /* Basis plus margin make a full line each, indented under the title. */
154
+ & .mui-action-item__details,
155
+ & .mui-action-item__categories {
156
+ flex: 0 0 calc(100% - var(--mui-action-item-indent));
157
+ margin-inline-start: var(--mui-action-item-indent);
158
+ }
159
+
160
+ & .mui-action-item__secondary {
161
+ flex: 1 1 auto;
162
+ align-self: center;
163
+ }
164
+
165
+ & .mui-action-item__controls {
166
+ flex: 0 1 auto;
167
+ align-self: center;
168
+ max-width: 100%;
169
+ margin-block-start: var(--mui-action-item-footer-space);
170
+ margin-inline-start: auto;
171
+ }
172
+
173
+ & .mui-action-item__select {
174
+ align-self: center;
175
+ }
176
+ }
177
+ }
178
+ }
@@ -0,0 +1,2 @@
1
+ /* AUTOGENERATED: types for the stylesheet beside it. */
2
+ export {};
@@ -0,0 +1,89 @@
1
+ import { type BadgeVariant, type IconSource } from '@manakind/ui-core';
2
+ import type { ComponentProps, ReactNode } from 'react';
3
+ import { type GoalCategory } from '../goal-categories';
4
+ import './action-item.css';
5
+ /** One fact about the action, shown after the title: its project, outcome, effort, duration. */
6
+ export interface ActionItemDetail {
7
+ /** Pre-formatted text, such as "Website relaunch" or "30 min". */
8
+ label: string;
9
+ /** Glyph before the text, supplied by the product. */
10
+ icon?: IconSource;
11
+ }
12
+ /** How the note reads: an aside, or a warning the user should act on. The two Badge variants it maps to. */
13
+ export type ActionItemNoteTone = Extract<BadgeVariant, 'muted' | 'warning'>;
14
+ export interface ActionItemProps extends Omit<ComponentProps<'li'>, 'title' | 'children' | 'className'> {
15
+ /** The action's description. Rendered as the row's heading. */
16
+ title: string;
17
+ /** Whether the action is done. Strikes the title and presses the completion toggle. */
18
+ completed: boolean;
19
+ /**
20
+ * Called with the new state when the completion toggle is pressed. Without
21
+ * it, or without `completeIcon`, the row has no toggle and the struck
22
+ * title alone says the action is done.
23
+ */
24
+ onCompletedChange?: (completed: boolean) => void;
25
+ /** Glyph on the completion toggle, supplied by the product. */
26
+ completeIcon?: IconSource;
27
+ /** Facts shown after the title, each with an optional glyph. */
28
+ details?: ActionItemDetail[];
29
+ /** Categories the action belongs to, as dotted text. */
30
+ categories?: GoalCategory[];
31
+ /** How many categories to show before collapsing into `+N more`. Defaults to 2, as on `GoalListItem`. */
32
+ maxVisibleCategories?: number;
33
+ /**
34
+ * A short pre-formatted status beside the details: the days it was done,
35
+ * or how long it has waited unscheduled. `noteTone` says how it reads.
36
+ */
37
+ note?: string;
38
+ /** `muted` (default) for an aside; `warning` for a note the user should act on, such as a stale action. */
39
+ noteTone?: ActionItemNoteTone;
40
+ /**
41
+ * Whether the row is selected for a bulk change. With `onSelectedChange`
42
+ * the row carries a checkbox named "Select …" and, when selected, a ring;
43
+ * without the handler neither is shown.
44
+ */
45
+ selected?: boolean;
46
+ /** Called with the new state when the selection checkbox changes. Without it the row has no checkbox. */
47
+ onSelectedChange?: (selected: boolean) => void;
48
+ /**
49
+ * The product's controls that act on this row, placed at its end: a focus
50
+ * toggle, an edit button. They render as given; the row only places them.
51
+ */
52
+ controls?: ReactNode;
53
+ /**
54
+ * The product's second line under the details: the control that
55
+ * schedules the action, a delete button for a stale one. Rendered as given.
56
+ */
57
+ secondary?: ReactNode;
58
+ /** Heading level for the title. Defaults to `h3`; match the surrounding outline. */
59
+ titleAs?: 'h2' | 'h3' | 'h4';
60
+ /** Extra class names on the `<li>`. */
61
+ className?: string;
62
+ /**
63
+ * A message about this action, shown under the row inside the same `<li>`:
64
+ * an `Alert` after a failed change, say. Kept in the item so the list's
65
+ * item count stays the number of actions.
66
+ */
67
+ children?: ReactNode;
68
+ }
69
+ /**
70
+ * One Manuia action as a row. Render it inside an `ActionList`: it is the
71
+ * `<li>`.
72
+ *
73
+ * The row leads with a round completion toggle, then the title over its
74
+ * details, categories and the product's second line, then the product's
75
+ * controls and, when the list allows a bulk change, a selection checkbox.
76
+ * The toggle is a pressed/unpressed button named "Complete …" in both
77
+ * states, so a screen reader hears the state change rather than a different
78
+ * control; it has no pending state, for `FocusItem`'s reason, so the product
79
+ * keeps its change idempotent.
80
+ *
81
+ * Wide, the row reads left to right. Narrow, the toggle, the title and the
82
+ * checkbox share the first line; the details and categories follow, lined up
83
+ * under the title, and the second line and the controls share a footer
84
+ * across the full width. Attributes other than the props land
85
+ * on the `<li>`: a virtualised list gives each row `aria-setsize` and
86
+ * `aria-posinset`, so the count a screen reader hears is the whole list's.
87
+ */
88
+ export declare function ActionItem({ title, completed, onCompletedChange, completeIcon, details, categories, maxVisibleCategories, note, noteTone, selected, onSelectedChange, controls, secondary, titleAs, className, children, ...listItemProps }: ActionItemProps): import("react/jsx-runtime").JSX.Element;
89
+ //# sourceMappingURL=action-item.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"action-item.d.ts","sourceRoot":"","sources":["../../src/action-item/action-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,YAAY,EAOjB,KAAK,UAAU,EAChB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,EAAkB,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,mBAAmB,CAAC;AAE3B,gGAAgG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CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,SAAS,EACT,iBAAiB,EACjB,YAAY,EACZ,OAAY,EACZ,UAAe,EACf,oBAAwB,EACxB,IAAI,EACJ,QAAkB,EAClB,QAAgB,EAChB,gBAAgB,EAChB,QAAQ,EACR,SAAS,EACT,OAAc,EACd,SAAS,EACT,QAAQ,EACR,GAAG,aAAa,EACjB,EAAE,eAAe,2CAmFjB"}
@@ -0,0 +1,41 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Badge, Card, CardTitle, Checkbox, cx, Icon, IconButton, } from '@manakind/ui-core';
3
+ import { GoalCategories } from '../goal-categories';
4
+ import './action-item.css';
5
+ /**
6
+ * One Manuia action as a row. Render it inside an `ActionList`: it is the
7
+ * `<li>`.
8
+ *
9
+ * The row leads with a round completion toggle, then the title over its
10
+ * details, categories and the product's second line, then the product's
11
+ * controls and, when the list allows a bulk change, a selection checkbox.
12
+ * The toggle is a pressed/unpressed button named "Complete …" in both
13
+ * states, so a screen reader hears the state change rather than a different
14
+ * control; it has no pending state, for `FocusItem`'s reason, so the product
15
+ * keeps its change idempotent.
16
+ *
17
+ * Wide, the row reads left to right. Narrow, the toggle, the title and the
18
+ * checkbox share the first line; the details and categories follow, lined up
19
+ * under the title, and the second line and the controls share a footer
20
+ * across the full width. Attributes other than the props land
21
+ * on the `<li>`: a virtualised list gives each row `aria-setsize` and
22
+ * `aria-posinset`, so the count a screen reader hears is the whole list's.
23
+ */
24
+ export function ActionItem({ title, completed, onCompletedChange, completeIcon, details = [], categories = [], maxVisibleCategories = 2, note, noteTone = 'muted', selected = false, onSelectedChange, controls, secondary, titleAs = 'h3', className, children, ...listItemProps }) {
25
+ const selectable = onSelectedChange !== undefined;
26
+ const toggle = completeIcon && onCompletedChange ? (_jsx(IconButton, { className: "mui-action-item__complete", variant: completed ? 'primary' : 'secondary', size: "md", icon: completeIcon, "aria-pressed": completed, "aria-label": `Complete ${title}`, onClick: () => onCompletedChange(!completed) })) : null;
27
+ /*
28
+ * A detail's key is its label and its rank among equal labels: a project
29
+ * and an outcome may share a name, and a key that only held the label
30
+ * would collide.
31
+ */
32
+ const seen = new Map();
33
+ const detailRows = details.map((detail) => {
34
+ const rank = seen.get(detail.label) ?? 0;
35
+ seen.set(detail.label, rank + 1);
36
+ return (_jsxs("span", { className: "mui-action-item__detail", children: [detail.icon && _jsx(Icon, { source: detail.icon, size: "sm", decorative: true }), detail.label] }, `${detail.label}-${rank}`));
37
+ });
38
+ const detailList = details.length > 0 || note ? (_jsxs("p", { className: "mui-action-item__details", children: [detailRows, note && (_jsx(Badge, { variant: noteTone, className: "mui-action-item__note", children: note }))] })) : null;
39
+ return (_jsxs("li", { ...listItemProps, className: cx('mui-action-item', completed && 'mui-action-item--completed', selectable && selected && 'mui-action-item--selected', className), children: [_jsx(Card, { className: "mui-action-item__card", children: _jsxs("div", { className: "mui-action-item__row", children: [toggle, _jsxs("div", { className: "mui-action-item__main", children: [_jsx(CardTitle, { as: titleAs, className: "mui-action-item__title", children: title }), detailList, _jsx(GoalCategories, { className: "mui-action-item__categories", categories: categories, maxVisible: maxVisibleCategories }), secondary && _jsx("div", { className: "mui-action-item__secondary", children: secondary })] }), controls && _jsx("div", { className: "mui-action-item__controls", children: controls }), selectable && (_jsx(Checkbox, { className: "mui-action-item__select", "aria-label": `Select ${title}`, checked: selected, onCheckedChange: onSelectedChange }))] }) }), children] }));
40
+ }
41
+ //# sourceMappingURL=action-item.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"action-item.js","sourceRoot":"","sources":["../../src/action-item/action-item.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,KAAK,EAEL,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,EAAE,EACF,IAAI,EACJ,UAAU,GAEX,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,cAAc,EAAqB,MA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ACN,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ export type { ActionItemDetail, ActionItemNoteTone, ActionItemProps } from './action-item';
2
+ export { ActionItem } from './action-item';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/action-item/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAC3F,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { ActionItem } from './action-item';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/action-item/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,10 @@
1
+ @layer components {
2
+ .mui-action-list {
3
+ display: flex;
4
+ flex-direction: column;
5
+ gap: var(--semantic-space-gap-relaxed);
6
+ margin: 0;
7
+ padding: 0;
8
+ list-style: none;
9
+ }
10
+ }
@@ -0,0 +1,2 @@
1
+ /* AUTOGENERATED: types for the stylesheet beside it. */
2
+ export {};
@@ -0,0 +1,19 @@
1
+ import type { ComponentProps } from 'react';
2
+ import './action-list.css';
3
+ export interface ActionListProps extends ComponentProps<'ul'> {
4
+ /** `ActionItem`s. Each renders its own `<li>`. */
5
+ children?: ComponentProps<'ul'>['children'];
6
+ }
7
+ /**
8
+ * A `<ul>` of `ActionItem` rows: the actions of a day, a block or a project.
9
+ *
10
+ * A real list, so a screen reader announces how many items there are. Name it
11
+ * with `aria-label` or `aria-labelledby` when the heading above it doesn't
12
+ * already say what it lists. Loading and empty states belong to the product,
13
+ * outside the list: an empty `<ul>` is a list of none. A list that renders
14
+ * only a window of its rows gives each `ActionItem` `aria-setsize` and
15
+ * `aria-posinset`, and keeps its spacers as padding on the `<ul>`, so the
16
+ * count stays the whole list's and no spacer becomes an item.
17
+ */
18
+ export declare function ActionList({ className, children, ...props }: ActionListProps): import("react/jsx-runtime").JSX.Element;
19
+ //# sourceMappingURL=action-list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"action-list.d.ts","sourceRoot":"","sources":["../../src/action-list/action-list.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,mBAAmB,CAAC;AAE3B,MAAM,WAAW,eAAgB,SAAQ,cAAc,CAAC,IAAI,CAAC;IAC3D,kDAAkD;IAClD,QAAQ,CAAC,EAAE,cAAc,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC,CAAC;CAC7C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,2CAM5E"}
@@ -0,0 +1,18 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cx } from '@manakind/ui-core';
3
+ import './action-list.css';
4
+ /**
5
+ * A `<ul>` of `ActionItem` rows: the actions of a day, a block or a project.
6
+ *
7
+ * A real list, so a screen reader announces how many items there are. Name it
8
+ * with `aria-label` or `aria-labelledby` when the heading above it doesn't
9
+ * already say what it lists. Loading and empty states belong to the product,
10
+ * outside the list: an empty `<ul>` is a list of none. A list that renders
11
+ * only a window of its rows gives each `ActionItem` `aria-setsize` and
12
+ * `aria-posinset`, and keeps its spacers as padding on the `<ul>`, so the
13
+ * count stays the whole list's and no spacer becomes an item.
14
+ */
15
+ export function ActionList({ className, children, ...props }) {
16
+ return (_jsx("ul", { className: cx('mui-action-list', className), ...props, children: children }));
17
+ }
18
+ //# sourceMappingURL=action-list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"action-list.js","sourceRoot":"","sources":["../../src/action-list/action-list.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAC;AAEvC,OAAO,mBAAmB,CAAC;AAO3B;;;;;;;;;;GAUG;AACH,MAAM,UAAU,UAAU,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAmB;IAC3E,OAAO,CACL,aAAI,SAAS,EAAE,EAAE,CAAC,iBAAiB,EAAE,SAAS,CAAC,KAAM,KAAK,YACvD,QAAQ,GACN,CACN,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ export type { ActionListProps } from './action-list';
2
+ export { ActionList } from './action-list';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/action-list/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { ActionList } from './action-list';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/action-list/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC"}
@@ -104,7 +104,7 @@
104
104
  color: var(--semantic-color-text-muted);
105
105
  font-size: var(--primitives-font-size-xs);
106
106
  font-weight: var(--primitives-font-weight-semibold);
107
- letter-spacing: 0.15em;
107
+ letter-spacing: var(--semantic-letter-spacing-label);
108
108
  line-height: var(--primitives-line-height-tight);
109
109
  text-transform: uppercase;
110
110
  }
@@ -35,11 +35,12 @@
35
35
  gap: var(--semantic-space-gap) var(--semantic-space-gap-relaxed);
36
36
  }
37
37
 
38
+ /* The title, then its facts and actions held close together, as on ActionItem. */
38
39
  & .mui-focus-item__main {
39
40
  grid-area: main;
40
41
  display: flex;
41
42
  flex-direction: column;
42
- gap: var(--semantic-space-gap-tight);
43
+ gap: var(--semantic-space-gap);
43
44
  min-width: 0;
44
45
  }
45
46
 
@@ -47,11 +48,16 @@
47
48
  --ds-card-text: var(--ds-card-text-muted);
48
49
  }
49
50
 
51
+ /* Set on what follows the title, as on ActionItem. */
52
+ & .mui-focus-item__title + .mui-focus-item__details {
53
+ margin-block-start: var(--semantic-space-gap);
54
+ }
55
+
50
56
  & .mui-focus-item__details {
51
57
  display: flex;
52
58
  flex-wrap: wrap;
53
59
  align-items: center;
54
- gap: var(--semantic-space-gap-tight) var(--semantic-space-gap-relaxed);
60
+ gap: var(--semantic-space-gap) var(--semantic-space-gap-relaxed);
55
61
  margin: 0;
56
62
  color: var(--semantic-color-text-muted);
57
63
  font-size: var(--primitives-font-size-xs);
@@ -68,11 +74,11 @@
68
74
  & .mui-focus-item__actions {
69
75
  display: flex;
70
76
  flex-direction: column;
71
- gap: var(--semantic-space-gap-tight);
77
+ gap: var(--semantic-space-gap);
72
78
  margin: 0;
73
79
  padding-inline-start: var(--semantic-space-padding);
74
80
  color: var(--semantic-color-text-muted);
75
- font-size: var(--primitives-font-size-sm);
81
+ font-size: var(--primitives-font-size-xs);
76
82
  }
77
83
 
78
84
  & .mui-focus-item__categories {
@@ -91,7 +97,7 @@
91
97
  grid-template-columns: minmax(0, 1fr) fit-content(clamp(50%, 8rem, 60%));
92
98
  grid-template-areas: none;
93
99
  align-items: start;
94
- row-gap: var(--semantic-space-gap-tight);
100
+ row-gap: var(--semantic-space-gap);
95
101
  }
96
102
 
97
103
  & .mui-focus-item__main {
@@ -113,7 +119,6 @@
113
119
 
114
120
  & .mui-focus-item__categories {
115
121
  justify-content: flex-start;
116
- margin-block-start: calc(var(--semantic-space-gap) - var(--semantic-space-gap-tight));
117
122
  }
118
123
  }
119
124
  }
@@ -2,7 +2,7 @@
2
2
  .mui-focus-list {
3
3
  display: flex;
4
4
  flex-direction: column;
5
- gap: var(--semantic-space-gap);
5
+ gap: var(--semantic-space-gap-relaxed);
6
6
  margin: 0;
7
7
  padding: 0;
8
8
  list-style: none;
@@ -262,6 +262,8 @@
262
262
  height: var(--mui-tier-emblem-size);
263
263
  border-radius: var(--semantic-radius-pill);
264
264
  color: var(--mui-tier-emblem-icon);
265
+ /* The glyph is sized by its tier, through the icon's own contract key. */
266
+ --ds-icon-size-md: var(--mui-tier-emblem-glyph-size);
265
267
  /*
266
268
  * Rare has no mid stop; its fallback is the sRGB midpoint, which draws
267
269
  * exactly the two-stop gradient. `in srgb` pins the space so that a
@@ -456,7 +458,7 @@
456
458
  & .mui-goal-card__milestones-label {
457
459
  font-weight: var(--primitives-font-weight-semibold);
458
460
  font-size: var(--primitives-font-size-xs);
459
- letter-spacing: 0.15em;
461
+ letter-spacing: var(--semantic-letter-spacing-label);
460
462
  line-height: var(--primitives-line-height-tight);
461
463
  text-transform: uppercase;
462
464
  }
@@ -484,6 +486,7 @@
484
486
  --mui-tier-emblem-to: var(--component-goal-card-legendary-emblem-to);
485
487
  --mui-tier-emblem-icon: var(--component-goal-card-legendary-emblem-icon);
486
488
  --mui-tier-emblem-size: var(--component-goal-card-legendary-emblem-size);
489
+ --mui-tier-emblem-glyph-size: var(--component-goal-card-legendary-emblem-glyph-size);
487
490
  --mui-tier-emblem-ring-color: var(--mui-tier-accent);
488
491
  --mui-tier-emblem-ring-width: 2px;
489
492
  --mui-tier-emblem-ring-alpha: 50%;
@@ -518,6 +521,7 @@
518
521
  --mui-tier-emblem-to: var(--component-goal-card-epic-emblem-to);
519
522
  --mui-tier-emblem-icon: var(--component-goal-card-epic-emblem-icon);
520
523
  --mui-tier-emblem-size: var(--component-goal-card-epic-emblem-size);
524
+ --mui-tier-emblem-glyph-size: var(--component-goal-card-epic-emblem-glyph-size);
521
525
  --mui-tier-emblem-ring-color: var(--mui-tier-accent);
522
526
  --mui-tier-emblem-ring-width: 1px;
523
527
  --mui-tier-emblem-ring-alpha: 40%;
@@ -551,6 +555,7 @@
551
555
  --mui-tier-emblem-to: var(--component-goal-card-rare-emblem-to);
552
556
  --mui-tier-emblem-icon: var(--component-goal-card-rare-emblem-icon);
553
557
  --mui-tier-emblem-size: var(--component-goal-card-rare-emblem-size);
558
+ --mui-tier-emblem-glyph-size: var(--component-goal-card-rare-emblem-glyph-size);
554
559
  --mui-tier-emblem-ring-color: var(--component-goal-card-rare-emblem-ring-color);
555
560
  --mui-tier-emblem-ring-width: 1px;
556
561
  --mui-tier-emblem-ring-alpha: 40%;
@@ -1 +1 @@
1
- {"version":3,"file":"goal-card.d.ts","sourceRoot":"","sources":["../../src/goal-card/goal-card.tsx"],"names":[],"mappings":"AAAA,OAAO,EASL,KAAK,UAAU,EAEhB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAkB,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,EAAE,KAAK,UAAU,EAAkB,MAAM,qBAAqB,CAAC;AACtE,OAAO,iBAAiB,CAAC;AAEzB,uDAAuD;AACvD,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,WAAW,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEhF,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,MAAM,WAAW,aAAa;IAC5B,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gDAAgD;IAChD,IAAI,EAAE,QAAQ,CAAC;IACf,yCAAyC;IACzC,MAAM,EAAE,UAAU,CAAC;IACnB;;;;;;;;OAQG;IACH,UAA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
3
3
  import { GoalCategories } from '../goal-categories';
4
4
  import { GoalStatusMenu } from '../goal-status-menu';
5
5
  import './goal-card.css';
6
- /**
7
- * Emblem glyph size per tier, mirroring the product (20 / 16 / 14). The ring
8
- * around it is sized in CSS from the tier tokens; this is the icon inside it.
9
- */
10
- const TIER_EMBLEM_ICON_SIZE = {
11
- '5 Year': 'lg',
12
- '1 Year': 'md',
13
- Quarterly: 'sm',
14
- };
15
6
  /** Maps a timeframe to its CSS tier modifier. */
16
7
  const TIER_CLASS = {
17
8
  '5 Year': 'legendary',
@@ -59,7 +50,7 @@ export function GoalCard({ title, description, type, status, statusIcon, onStatu
59
50
  * treatment stays entirely in `goal-card.css` — one place to read what a
60
51
  * tier looks like, and no second definition here to drift from it.
61
52
  */
62
- return (_jsxs(Card, { interactive: Boolean(href), className: cx('mui-goal-card', `mui-goal-card--${TIER_CLASS[type]}`, className), children: [_jsx("span", { className: "mui-goal-card__ornament", "aria-hidden": "true" }), _jsxs("span", { className: "mui-goal-card__corners", "aria-hidden": "true", children: [_jsx("span", {}), _jsx("span", {}), _jsx("span", {}), _jsx("span", {})] }), _jsxs(CardHeader, { className: "mui-goal-card__header", children: [_jsxs("div", { className: "mui-goal-card__meta", children: [_jsxs("span", { className: "mui-goal-card__meta-start", children: [emblemIcon && (_jsx("span", { className: "mui-goal-card__emblem", "aria-hidden": "true", children: _jsx(Icon, { source: emblemIcon, size: TIER_EMBLEM_ICON_SIZE[type] ?? 'md', decorative: true }) })), _jsxs("span", { className: "mui-goal-card__type", children: [typeIcon && _jsx(Icon, { source: typeIcon, size: "sm", decorative: true }), type, periodLabel && (_jsxs("span", { className: "mui-goal-card__period", children: [' ', _jsx("span", { "aria-hidden": "true", children: "\u00B7" }), " ", periodLabel] }))] })] }), _jsx(GoalStatusMenu, { labelClassName: "mui-goal-card__status-label", status: status, statusIcon: statusIcon, onStatusChange: onStatusChange, indicator: statusMenuIndicator, itemIndicator: statusMenuItemIndicator })] }), _jsx(GoalCategories, { className: "mui-goal-card__categories", categories: categories, maxVisible: maxVisibleCategories }), _jsx(CardTitle, { as: titleAs, className: "mui-goal-card__title", children: href ? (_jsx(CardLink, { asChild: true, children: _jsx(LinkComponent, { href: href, children: title }) })) : (title) }), _jsx("span", { className: "mui-goal-card__divider", "aria-hidden": "true" })] }), _jsxs(CardContent, { className: "mui-goal-card__content", children: [_jsx("p", { className: "mui-goal-card__description", children: description || 'No description provided.' }), total > 0 && (_jsxs("div", { className: "mui-goal-card__milestones", children: [_jsx(Progress, { size: "sm", value: completed, max: total, label: _jsx("span", { className: "mui-goal-card__milestones-label", children: "Milestones" }), valueText: `${completed} of ${total}` }), _jsx("ul", { className: "mui-goal-card__milestone-list", children: milestones?.map((milestone) => (_jsxs("li", { className: cx('mui-goal-card__milestone', milestone.completed && 'mui-goal-card__milestone--done'), children: [_jsx("span", { className: "mui-goal-card__milestone-marker", "aria-hidden": "true", children: milestone.completed && milestoneIcon && (_jsx(Icon, { source: milestoneIcon, size: "sm", decorative: true })) }), _jsx("span", { className: "mui-goal-card__milestone-title", children: milestone.title }), milestone.convertedToGoal && (_jsx("span", { className: "mui-goal-card__milestone-converted", children: _jsx(Icon, { source: milestoneConvertedIcon, size: "sm", label: "Converted to a goal" }) }))] }, milestone.id))) })] })), targetDate && (_jsxs("p", { className: "mui-goal-card__target", children: [_jsx("span", { className: "mui-goal-card__target-label", children: "Target:" }), " ", targetDate] }))] })] }));
53
+ return (_jsxs(Card, { interactive: Boolean(href), className: cx('mui-goal-card', `mui-goal-card--${TIER_CLASS[type]}`, className), children: [_jsx("span", { className: "mui-goal-card__ornament", "aria-hidden": "true" }), _jsxs("span", { className: "mui-goal-card__corners", "aria-hidden": "true", children: [_jsx("span", {}), _jsx("span", {}), _jsx("span", {}), _jsx("span", {})] }), _jsxs(CardHeader, { className: "mui-goal-card__header", children: [_jsxs("div", { className: "mui-goal-card__meta", children: [_jsxs("span", { className: "mui-goal-card__meta-start", children: [emblemIcon && (_jsx("span", { className: "mui-goal-card__emblem", "aria-hidden": "true", children: _jsx(Icon, { source: emblemIcon, size: "md", decorative: true }) })), _jsxs("span", { className: "mui-goal-card__type", children: [typeIcon && _jsx(Icon, { source: typeIcon, size: "sm", decorative: true }), type, periodLabel && (_jsxs("span", { className: "mui-goal-card__period", children: [' ', _jsx("span", { "aria-hidden": "true", children: "\u00B7" }), " ", periodLabel] }))] })] }), _jsx(GoalStatusMenu, { labelClassName: "mui-goal-card__status-label", status: status, statusIcon: statusIcon, onStatusChange: onStatusChange, indicator: statusMenuIndicator, itemIndicator: statusMenuItemIndicator })] }), _jsx(GoalCategories, { className: "mui-goal-card__categories", categories: categories, maxVisible: maxVisibleCategories }), _jsx(CardTitle, { as: titleAs, className: "mui-goal-card__title", children: href ? (_jsx(CardLink, { asChild: true, children: _jsx(LinkComponent, { href: href, children: title }) })) : (title) }), _jsx("span", { className: "mui-goal-card__divider", "aria-hidden": "true" })] }), _jsxs(CardContent, { className: "mui-goal-card__content", children: [_jsx("p", { className: "mui-goal-card__description", children: description || 'No description provided.' }), total > 0 && (_jsxs("div", { className: "mui-goal-card__milestones", children: [_jsx(Progress, { size: "sm", value: completed, max: total, label: _jsx("span", { className: "mui-goal-card__milestones-label", children: "Milestones" }), valueText: `${completed} of ${total}` }), _jsx("ul", { className: "mui-goal-card__milestone-list", children: milestones?.map((milestone) => (_jsxs("li", { className: cx('mui-goal-card__milestone', milestone.completed && 'mui-goal-card__milestone--done'), children: [_jsx("span", { className: "mui-goal-card__milestone-marker", "aria-hidden": "true", children: milestone.completed && milestoneIcon && (_jsx(Icon, { source: milestoneIcon, size: "sm", decorative: true })) }), _jsx("span", { className: "mui-goal-card__milestone-title", children: milestone.title }), milestone.convertedToGoal && (_jsx("span", { className: "mui-goal-card__milestone-converted", children: _jsx(Icon, { source: milestoneConvertedIcon, size: "sm", label: "Converted to a goal" }) }))] }, milestone.id))) })] })), targetDate && (_jsxs("p", { className: "mui-goal-card__target", children: [_jsx("span", { className: "mui-goal-card__target-label", children: "Target:" }), " ", targetDate] }))] })] }));
63
54
  }
64
55
  /*
65
56
  * Fallback glyph, inlined because this package is public and may not
@@ -1 +1 @@
1
- {"version":3,"file":"goal-card.js","sourceRoot":"","sources":["../../src/goal-card/goal-card.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,IAAI,EACJ,WAAW,EACX,UAAU,EACV,QAAQ,EACR,SAAS,EACT,EAAE,EACF,IAAI,EAGJ,QAAQ,GACT,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,cAAc,EAAqB,MAAM,oBAAoB,CAAC;AACvE,OAAO,EAAmB,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,iBAAiB,CAAC;AAiHzB;;;GAGG;AACH,MAAM,qBAAqB,GAAwC;IACjE,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,IAAI;IACd,SAAS,EAAE,IAAI;CAChB,CAAC;AAEF,iDAAiD;AACjD,MAAM,UAAU,GAA6B;IAC3C,QAAQ,EAAE,WAAW;IACrB,QAAQ,EAAE,MAAM;IAChB,SAAS,EAAE,MAAM;IACjB,OAAO,EAAE,QAAQ;IACjB,MAAM,EAAE,OAAO;CAChB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,UAAU,QAAQ,CAAC,EACvB,KAAK,EACL,WAAW,EACX,IAAI,EACJ,MAAM,EACN,UAAU,EACV,cAAc,EACd,mBAAmB,EACnB,uBAAuB,EACvB,IAAI,EACJ,aAAa,EAAE,aAAa,GAAG,GAAG,EAClC,WAAW,EACX,UAAU,GAAG,EAAE,EACf,oBAAoB,GAAG,CAAC,EACxB,UAAU,EACV,UAAU,EACV,QAAQ,EACR,aAAa,EACb,sBAAsB,GAAG,cAAc,EACvC,UAAU,EACV,OAAO,GAAG,IAAI,EACd,SAAS,GACK;IACd,MAAM,SAAS,GAAG,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC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C,CAC9B,cAEE,SAAS,EAAE,EAAE,CACX,0BAA0B,EAC1B,SAAS,CAAC,SAAS,IAAI,gCAAgC,CACxD,aAED,eAAM,SAAS,EAAC,iCAAiC,iBAAa,MAAM,YACjE,SAAS,CAAC,SAAS,IAAI,aAAa,IAAI,CACvC,KAAC,IAAI,IAAC,MAAM,EAAE,aAAa,EAAE,IAAI,EAAC,IAAI,EAAC,UAAU,SAAG,CACrD,GACI,EACP,eAAM,SAAS,EAAC,gCAAgC,YAAE,SAAS,CAAC,KAAK,GAAQ,EACxE,SAAS,CAAC,eAAe,IAAI,CAC5B,eAAM,SAAS,EAAC,oCAAoC,YAClD,KAAC,IAAI,IAAC,MAAM,EAAE,sBAAsB,EAAE,IAAI,EAAC,IAAI,EAAC,KAAK,EAAC,qBAAqB,GAAG,GACzE,CACR,KAhBI,SAAS,CAAC,EAAE,CAiBd,CACN,CAAC,GACC,IACD,CACP,EAEA,UAAU,IAAI,CACb,aAAG,SAAS,EAAC,uBAAuB,aAClC,eAAM,SAAS,EAAC,6BAA6B,wBAAe,OAAE,UAAU,IACtE,CACL,IACW,IACT,CACR,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,cAAc,GAAe,CAAC,KAAK,EAAE,EAAE,CAAC,CAC5C,6BAAiB,MAAM,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,KAAK,KAAK,YAC/D,eACE,CAAC,EAAC,oBAAoB,EACtB,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,WAAW,EAAC,KAAK,EACjB,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,GACtB,GACE,CACP,CAAC;AACF,cAAc,CAAC,WAAW,GAAG,wBAAwB,CAAC"}
@@ -2,7 +2,7 @@
2
2
  .mui-goal-list {
3
3
  display: flex;
4
4
  flex-direction: column;
5
- gap: var(--semantic-space-gap);
5
+ gap: var(--semantic-space-gap-relaxed);
6
6
  margin: 0;
7
7
  padding: 0;
8
8
  list-style: none;
@@ -29,7 +29,7 @@
29
29
  * grows to its one-line width, and a goal with three long categories, or
30
30
  * a status label too long to break, squeezed its own title into a sliver.
31
31
  * Capped, they wrap inside their share and the title keeps the rest.
32
- * Narrow, the status's cap is 8rem where half the row is less: half of a
32
+ * Narrow, the status's cap is 8.5rem where half the row is less: half of a
33
33
  * phone's row is narrower than "Not Started" with its chevron, and the
34
34
  * label wrapped. It stops at 60%, so the title always keeps the rest.
35
35
  */
@@ -45,7 +45,7 @@
45
45
  grid-area: main;
46
46
  display: flex;
47
47
  flex-direction: column;
48
- gap: var(--semantic-space-gap-tight);
48
+ gap: var(--semantic-space-gap);
49
49
  min-width: 0;
50
50
  }
51
51
 
@@ -54,11 +54,16 @@
54
54
  --ds-card-text: var(--ds-card-text-muted);
55
55
  }
56
56
 
57
+ /* Set on what follows the title, as on ActionItem. */
58
+ & .mui-goal-list-item__title + .mui-goal-list-item__details {
59
+ margin-block-start: var(--semantic-space-gap);
60
+ }
61
+
57
62
  & .mui-goal-list-item__details {
58
63
  display: flex;
59
64
  flex-wrap: wrap;
60
65
  align-items: center;
61
- gap: var(--semantic-space-gap-tight) var(--semantic-space-gap-relaxed);
66
+ gap: var(--semantic-space-gap) var(--semantic-space-gap-relaxed);
62
67
  margin: 0;
63
68
  color: var(--semantic-color-text-muted);
64
69
  font-size: var(--primitives-font-size-xs);
@@ -75,7 +80,7 @@
75
80
  /* GoalCard's small-caps label, so the two views name their details alike. */
76
81
  & .mui-goal-list-item__detail-label {
77
82
  font-weight: var(--primitives-font-weight-semibold);
78
- letter-spacing: 0.15em;
83
+ letter-spacing: var(--semantic-letter-spacing-label);
79
84
  text-transform: uppercase;
80
85
  }
81
86
 
@@ -97,10 +102,10 @@
97
102
  */
98
103
  @container mui-goal-list-item (max-width: 36rem) {
99
104
  & .mui-goal-list-item__row {
100
- grid-template-columns: minmax(0, 1fr) fit-content(clamp(50%, 8rem, 60%));
105
+ grid-template-columns: minmax(0, 1fr) fit-content(clamp(50%, 8.5rem, 60%));
101
106
  grid-template-areas: none;
102
107
  align-items: start;
103
- row-gap: var(--semantic-space-gap-tight);
108
+ row-gap: var(--semantic-space-gap);
104
109
  }
105
110
 
106
111
  & .mui-goal-list-item__main {
@@ -121,7 +126,6 @@
121
126
 
122
127
  & .mui-goal-list-item__categories {
123
128
  justify-content: flex-start;
124
- margin-block-start: calc(var(--semantic-space-gap) - var(--semantic-space-gap-tight));
125
129
  }
126
130
  }
127
131
  }
@@ -1,9 +1,4 @@
1
1
  @layer components {
2
- /*
3
- * A bare button around the plain status badge. The badge keeps its own look;
4
- * the button adds only what says "this opens something": the chevron, a fill
5
- * on hover, and the focus ring.
6
- */
7
2
  /*
8
3
  * The trigger raises itself above a host card's stretched link (ui-core's
9
4
  * CardLink), so it keeps its own clicks wherever it sits. Only the trigger:
@@ -14,51 +9,11 @@
14
9
  .mui-goal-status-menu {
15
10
  position: relative;
16
11
  z-index: 1;
17
- display: inline-flex;
18
- align-items: center;
19
12
  flex-shrink: 0;
20
- max-width: 100%;
21
- gap: var(--semantic-space-gap-tight);
22
- margin: 0;
23
- padding: 0 var(--semantic-space-gap-tight);
24
- border: 0;
25
- border-radius: var(--semantic-radius-interactive);
26
- background-color: transparent;
27
- color: inherit;
28
- font: inherit;
29
- cursor: pointer;
30
- transition: background-color 150ms cubic-bezier(0, 0, 0.2, 1);
31
-
32
- &:hover,
33
- &[data-state="open"] {
34
- background-color: var(--semantic-color-surface-muted);
35
- }
36
-
37
- &:focus-visible {
38
- outline: 2px solid var(--semantic-color-focus-ring);
39
- outline-offset: 3px;
40
- }
41
13
 
42
14
  /* A Badge never gives way in a row, but inside the capped trigger it must, or the chevron goes. */
43
15
  & .mui-goal-status-menu__badge {
44
16
  flex-shrink: 1;
45
17
  }
46
-
47
- & .mui-goal-status-menu__indicator {
48
- color: var(--semantic-color-text-muted);
49
- transform: rotate(90deg);
50
- transition: transform 150ms cubic-bezier(0, 0, 0.2, 1);
51
- }
52
-
53
- &[data-state="open"] .mui-goal-status-menu__indicator {
54
- transform: rotate(-90deg);
55
- }
56
- }
57
- }
58
-
59
- @media (prefers-reduced-motion: reduce) {
60
- .mui-goal-status-menu,
61
- .mui-goal-status-menu .mui-goal-status-menu__indicator {
62
- transition: none;
63
18
  }
64
19
  }
@@ -20,12 +20,7 @@ export interface GoalStatusMenuProps {
20
20
  * Without it the badge is a plain, non-interactive status.
21
21
  */
22
22
  onStatusChange?: (status: GoalStatus) => void;
23
- /**
24
- * Glyph after the badge saying it opens a menu. Must point RIGHT, as
25
- * Select's indicator does: the component turns it down while closed and
26
- * up while open, so one glyph serves both states.
27
- * Defaults to a plain built-in chevron.
28
- */
23
+ /** Glyph after the badge saying it opens a menu. Must point RIGHT; see `MenuTrigger`'s `indicator`. */
29
24
  indicator?: IconSource;
30
25
  /** Glyph marking the current status in the menu. Defaults to Menu's built-in check. */
31
26
  itemIndicator?: IconSource;
@@ -1 +1 @@
1
- {"version":3,"file":"goal-status-menu.d.ts","sourceRoot":"","sources":["../../src/goal-status-menu/goal-status-menu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,UAAU,EAGhB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,wBAAwB,CAAC;AAEhC,+EAA+E;AAC/E,eAAO,MAAM,aAAa,sDAAuD,CAAC;AAElF,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAaxD,MAAM,WAAW,mBAAmB;IAClC,mDAAmD;IACnD,MAAM,EAAE,UAAU,CAAC;IACnB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;IAC9C;;;;;OAKG;IACH,SAAS,CAAC,EAAE,UAAU,CAAC;IACvB,uFAAuF;IACvF,aAAa,CAAC,EAAE,UAAU,CAAC;IAC3B;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,yFAAyF;IACzF,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAAC,EAC7B,MAAM,EACN,UAAU,EACV,cAAc,EACd,SAAgC,EAChC,aAAa,EACb,cAAc,EACd,SAAS,GACV,EAAE,mBAAmB,2CAwCrB"}
1
+ {"version":3,"file":"goal-status-menu.d.ts","sourceRoot":"","sources":["../../src/goal-status-menu/goal-status-menu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,UAAU,EAAoC,MAAM,mBAAmB,CAAC;AACjG,OAAO,wBAAwB,CAAC;AAEhC,+EAA+E;AAC/E,eAAO,MAAM,aAAa,sDAAuD,CAAC;AAElF,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAaxD,MAAM,WAAW,mBAAmB;IAClC,mDAAmD;IACnD,MAAM,EAAE,UAAU,CAAC;IACnB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;IAC9C,uGAAuG;IACvG,SAAS,CAAC,EAAE,UAAU,CAAC;IACvB,uFAAuF;IACvF,aAAa,CAAC,EAAE,UAAU,CAAC;IAC3B;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,yFAAyF;IACzF,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAAC,EAC7B,MAAM,EACN,UAAU,EACV,cAAc,EACd,SAAS,EACT,aAAa,EACb,cAAc,EACd,SAAS,GACV,EAAE,mBAAmB,2CAkCrB"}
@@ -1,5 +1,5 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Badge, cx, FallbackChevronRight, Icon, Menu, } from '@manakind/ui-core';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Badge, cx, Menu, MenuTrigger } from '@manakind/ui-core';
3
3
  import './goal-status-menu.css';
4
4
  /** A Manuia goal's progress states, in the order a goal moves through them. */
5
5
  export const GOAL_STATUSES = ['Not Started', 'In Progress', 'Completed'];
@@ -24,10 +24,10 @@ const STATUS_ITEMS = GOAL_STATUSES.map((status) => ({
24
24
  * The trigger is named "Status: In Progress. Change status": the current
25
25
  * status and what pressing it does, which also names the menu it opens.
26
26
  */
27
- export function GoalStatusMenu({ status, statusIcon, onStatusChange, indicator = FallbackChevronRight, itemIndicator, labelClassName, className, }) {
27
+ export function GoalStatusMenu({ status, statusIcon, onStatusChange, indicator, itemIndicator, labelClassName, className, }) {
28
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
- 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" })] }) }));
31
+ return (_jsx(Menu, { label: "Status", items: STATUS_ITEMS, value: status, onValueChange: onStatusChange, itemIndicator: itemIndicator, trigger: _jsx(MenuTrigger, { indicator: indicator, className: cx('mui-goal-status-menu', className), "aria-label": `Status: ${status}. Change status`, children: badge }) }));
32
32
  }
33
33
  //# sourceMappingURL=goal-status-menu.js.map
@@ -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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AAC,IAAI,IACH,MAAM,EAAE,SAAS,EACjB,IAAI,EAAC,IAAI,EACT,UAAU,QACV,SAAS,EAAC,iCAAiC,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,EAAE,KAAK,EAAE,EAAE,EAAmB,IAAI,EAAiB,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACjG,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;AAiCJ;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,cAAc,CAAC,EAC7B,MAAM,EACN,UAAU,EACV,cAAc,EACd,SAAS,EACT,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,KAAC,WAAW,IACV,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,EAAE,CAAC,sBAAsB,EAAE,SAAS,CAAC,gBACpC,WAAW,MAAM,iBAAiB,YAE7C,KAAK,GACM,GAEhB,CACH,CAAC;AACJ,CAAC"}
package/dist/index.d.ts CHANGED
@@ -9,6 +9,8 @@
9
9
  * `.storybook/preview.ts` for the canonical setup.
10
10
  */
11
11
  export * from '@manakind/ui-core';
12
+ export * from './action-item';
13
+ export * from './action-list';
12
14
  export * from './category-card';
13
15
  export * from './focus-item';
14
16
  export * from './focus-list';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC"}
package/dist/index.js CHANGED
@@ -9,6 +9,8 @@
9
9
  * `.storybook/preview.ts` for the canonical setup.
10
10
  */
11
11
  export * from '@manakind/ui-core';
12
+ export * from './action-item';
13
+ export * from './action-list';
12
14
  export * from './category-card';
13
15
  export * from './focus-item';
14
16
  export * from './focus-list';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@manakind/manuia-ui",
3
- "version": "0.14.0",
3
+ "version": "0.16.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -37,8 +37,8 @@
37
37
  "vr": "playwright test"
38
38
  },
39
39
  "dependencies": {
40
- "@manakind/manuia-tokens": "0.13.0",
41
- "@manakind/ui-core": "0.15.0"
40
+ "@manakind/manuia-tokens": "0.15.0",
41
+ "@manakind/ui-core": "0.16.0"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "react": "^19.0.0",