@manakind/manuia-ui 0.7.0 → 0.9.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.
|
@@ -7,6 +7,15 @@
|
|
|
7
7
|
*/
|
|
8
8
|
container: mui-goal-list-item / inline-size;
|
|
9
9
|
|
|
10
|
+
/*
|
|
11
|
+
* A message passed as children sits under the row, inside the same item.
|
|
12
|
+
* The track is pinned to the item's width: left `auto`, a word too long
|
|
13
|
+
* to break in the message would widen the whole row past the list.
|
|
14
|
+
*/
|
|
15
|
+
display: grid;
|
|
16
|
+
grid-template-columns: minmax(0, 1fr);
|
|
17
|
+
gap: var(--semantic-space-gap-tight);
|
|
18
|
+
|
|
10
19
|
/* Through the contract keys ui-core reads, so no specificity contest with `.ds-card`. */
|
|
11
20
|
& .mui-goal-list-item__card {
|
|
12
21
|
--ds-card-padding: var(--semantic-space-padding);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type IconSource } from '@manakind/ui-core';
|
|
2
|
-
import type { ElementType } from 'react';
|
|
2
|
+
import type { ElementType, ReactNode } from 'react';
|
|
3
3
|
import type { GoalLinkProps, GoalMilestone, GoalType } from '../goal-card';
|
|
4
4
|
import { type GoalCategory } from '../goal-categories';
|
|
5
5
|
import { type GoalStatus } from '../goal-status-menu';
|
|
@@ -49,6 +49,12 @@ export interface GoalListItemProps {
|
|
|
49
49
|
titleAs?: 'h2' | 'h3' | 'h4';
|
|
50
50
|
/** Extra class names on the `<li>`. */
|
|
51
51
|
className?: string;
|
|
52
|
+
/**
|
|
53
|
+
* A message about this goal, shown under the row inside the same `<li>`:
|
|
54
|
+
* an `Alert` after a failed status change, say. Kept in the item so the
|
|
55
|
+
* list's item count stays the number of goals.
|
|
56
|
+
*/
|
|
57
|
+
children?: ReactNode;
|
|
52
58
|
}
|
|
53
59
|
/**
|
|
54
60
|
* One Manuia goal as a compact row, for the list view. Render it inside a
|
|
@@ -65,5 +71,5 @@ export interface GoalListItemProps {
|
|
|
65
71
|
* then status. Narrow, the categories drop below and the status stays beside
|
|
66
72
|
* the title.
|
|
67
73
|
*/
|
|
68
|
-
export declare function GoalListItem({ title, type, status, statusIcon, onStatusChange, statusMenuIndicator, statusMenuItemIndicator, periodLabel, categories, maxVisibleCategories, milestones, targetDate, typeIcon, href, linkComponent: LinkComponent, titleAs, className, }: GoalListItemProps): import("react/jsx-runtime").JSX.Element;
|
|
74
|
+
export declare function GoalListItem({ title, type, status, statusIcon, onStatusChange, statusMenuIndicator, statusMenuItemIndicator, periodLabel, categories, maxVisibleCategories, milestones, targetDate, typeIcon, href, linkComponent: LinkComponent, titleAs, className, children, }: GoalListItemProps): import("react/jsx-runtime").JSX.Element;
|
|
69
75
|
//# sourceMappingURL=goal-list-item.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"goal-list-item.d.ts","sourceRoot":"","sources":["../../src/goal-list-item/goal-list-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuC,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACzF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"goal-list-item.d.ts","sourceRoot":"","sources":["../../src/goal-list-item/goal-list-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuC,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACzF,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC3E,OAAO,EAAkB,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,EAAE,KAAK,UAAU,EAAkB,MAAM,qBAAqB,CAAC;AACtE,OAAO,sBAAsB,CAAC;AAE9B,MAAM,WAAW,iBAAiB;IAChC,0FAA0F;IAC1F,KAAK,EAAE,MAAM,CAAC;I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T,EAAE,iBAAiB,2CA+DnB"}
|
|
@@ -18,9 +18,9 @@ import './goal-list-item.css';
|
|
|
18
18
|
* then status. Narrow, the categories drop below and the status stays beside
|
|
19
19
|
* the title.
|
|
20
20
|
*/
|
|
21
|
-
export function GoalListItem({ title, type, status, statusIcon, onStatusChange, statusMenuIndicator, statusMenuItemIndicator, periodLabel, categories = [], maxVisibleCategories = 2, milestones, targetDate, typeIcon, href, linkComponent: LinkComponent = 'a', titleAs = 'h3', className, }) {
|
|
21
|
+
export function GoalListItem({ title, type, status, statusIcon, onStatusChange, statusMenuIndicator, statusMenuItemIndicator, periodLabel, categories = [], maxVisibleCategories = 2, milestones, targetDate, typeIcon, href, linkComponent: LinkComponent = 'a', titleAs = 'h3', className, children, }) {
|
|
22
22
|
const completed = milestones?.filter((m) => m.completed).length ?? 0;
|
|
23
23
|
const total = milestones?.length ?? 0;
|
|
24
|
-
return (
|
|
24
|
+
return (_jsxs("li", { className: cx('mui-goal-list-item', className), children: [_jsx(Card, { interactive: Boolean(href), className: "mui-goal-list-item__card", children: _jsxs("div", { className: "mui-goal-list-item__row", children: [_jsxs("div", { className: "mui-goal-list-item__main", children: [_jsx(CardTitle, { as: titleAs, className: "mui-goal-list-item__title", children: href ? (_jsx(CardLink, { asChild: true, children: _jsx(LinkComponent, { href: href, children: title }) })) : (title) }), _jsxs("p", { className: "mui-goal-list-item__details", children: [_jsxs("span", { className: "mui-goal-list-item__type", children: [typeIcon && _jsx(Icon, { source: typeIcon, size: "sm", decorative: true }), type, periodLabel && (_jsxs("span", { className: "mui-goal-list-item__period", children: [' ', _jsx("span", { "aria-hidden": "true", children: "\u00B7" }), " ", periodLabel] }))] }), total > 0 && (_jsxs("span", { className: "mui-goal-list-item__detail", children: [_jsx("span", { className: "mui-goal-list-item__detail-label", children: "Milestones" }), " ", completed, ' ', "of ", total] })), targetDate && (_jsxs("span", { className: "mui-goal-list-item__detail", children: [_jsx("span", { className: "mui-goal-list-item__detail-label", children: "Target:" }), " ", targetDate] }))] })] }), _jsx(GoalCategories, { className: "mui-goal-list-item__categories", categories: categories, maxVisible: maxVisibleCategories }), _jsx(GoalStatusMenu, { className: "mui-goal-list-item__status", status: status, statusIcon: statusIcon, onStatusChange: onStatusChange, indicator: statusMenuIndicator, itemIndicator: statusMenuItemIndicator })] }) }), children] }));
|
|
25
25
|
}
|
|
26
26
|
//# sourceMappingURL=goal-list-item.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"goal-list-item.js","sourceRoot":"","sources":["../../src/goal-list-item/goal-list-item.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,EAAE,IAAI,EAAmB,MAAM,mBAAmB,CAAC;AAGzF,OAAO,EAAE,cAAc,EAAqB,MAAM,oBAAoB,CAAC;AACvE,OAAO,EAAmB,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"goal-list-item.js","sourceRoot":"","sources":["../../src/goal-list-item/goal-list-item.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,EAAE,IAAI,EAAmB,MAAM,mBAAmB,CAAC;AAGzF,OAAO,EAAE,cAAc,EAAqB,MAAM,oBAAoB,CAAC;AACvE,OAAO,EAAmB,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,sBAAsB,CAAC;AAuD9B;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,YAAY,CAAC,EAC3B,KAAK,EACL,IAAI,EACJ,MAAM,EACN,UAAU,EACV,cAAc,EACd,mBAAmB,EACnB,uBAAuB,EACvB,WAAW,EACX,UAAU,GAAG,EAAE,EACf,oBAAoB,GAAG,CAAC,EACxB,UAAU,EACV,UAAU,EACV,QAAQ,EACR,IAAI,EACJ,aAAa,EAAE,aAAa,GAAG,GAAG,EAClC,OAAO,GAAG,IA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AAE,UAAU,IACxE,CACR,IACC,IACA,EAEN,KAAC,cAAc,IACb,SAAS,EAAC,gCAAgC,EAC1C,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,oBAAoB,GAChC,EAEF,KAAC,cAAc,IACb,SAAS,EAAC,4BAA4B,EACtC,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,UAAU,EACtB,cAAc,EAAE,cAAc,EAC9B,SAAS,EAAE,mBAAmB,EAC9B,aAAa,EAAE,uBAAuB,GACtC,IACE,GACD,EACN,QAAQ,IACN,CACN,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@manakind/manuia-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.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.
|
|
41
|
-
"@manakind/ui-core": "0.
|
|
40
|
+
"@manakind/manuia-tokens": "0.8.0",
|
|
41
|
+
"@manakind/ui-core": "0.8.0"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"react": "^19.0.0",
|