@medway-ui/core 1.31.1 → 1.32.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/COMPONENTS.md +1 -1
- package/COMPONENTS_SUMMARY.md +1 -1
- package/dist/COMPONENTS.md +1 -1
- package/dist/COMPONENTS_SUMMARY.md +1 -1
- package/dist/components/CardWeek.d.mts +1 -1
- package/dist/components/CardWeek.d.mts.map +1 -1
- package/dist/components/CardWeek.d.ts +1 -1
- package/dist/components/CardWeek.d.ts.map +1 -1
- package/dist/components/CardWeek.js +1 -1
- package/dist/components/CardWeek.mjs +1 -1
- package/package.json +1 -1
package/COMPONENTS.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# @medway-ui/core — Component Reference
|
|
2
2
|
|
|
3
3
|
> **Auto-generated — do not edit manually.**
|
|
4
|
-
> Package `@medway-ui/core` · v1.
|
|
4
|
+
> Package `@medway-ui/core` · v1.32.0 · Generated 2026-10-09
|
|
5
5
|
|
|
6
6
|
All components require React 18+ and are client components (`"use client"`).
|
|
7
7
|
|
package/COMPONENTS_SUMMARY.md
CHANGED
package/dist/COMPONENTS.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# @medway-ui/core — Component Reference
|
|
2
2
|
|
|
3
3
|
> **Auto-generated — do not edit manually.**
|
|
4
|
-
> Package `@medway-ui/core` · v1.
|
|
4
|
+
> Package `@medway-ui/core` · v1.32.0 · Generated 2026-10-09
|
|
5
5
|
|
|
6
6
|
All components require React 18+ and are client components (`"use client"`).
|
|
7
7
|
|
|
@@ -17,7 +17,7 @@ declare function CardWeek({ className, done, postponed, skipped, ...props }: Car
|
|
|
17
17
|
declare function CardWeekBreadcrumb({ className, children, tag, tagIcon, ...props }: CardWeekBreadcrumbProps): import("react/jsx-runtime").JSX.Element;
|
|
18
18
|
declare function CardWeekContainer({ className, ...props }: ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
19
19
|
declare function CardWeekHeader({ className, ...props }: ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
20
|
-
declare
|
|
20
|
+
declare const CardWeekTitle: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
21
21
|
declare function CardWeekDescription({ className, ...props }: ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
22
22
|
declare function CardWeekTags({ className, ...props }: ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
23
23
|
declare function CardWeekProgressCircle({ className, value, ...progressProps }: ProgressCircleProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardWeek.d.ts","sourceRoot":"","sources":["../../src/components/CardWeek.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"CardWeek.d.ts","sourceRoot":"","sources":["../../src/components/CardWeek.tsx"],"names":[],"mappings":"AAEA,OAAO,EAOL,KAAK,cAAc,EAEnB,KAAK,YAAY,EAClB,MAAM,OAAO,CAAC;AAGf,OAAO,EAAY,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAEL,mBAAmB,EACpB,MAAM,6BAA6B,CAAC;AAYrC,UAAU,aAAc,SAAQ,cAAc,CAAC,KAAK,CAAC;IACnD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,UAAU,uBAAwB,SAAQ,cAAc,CAAC,KAAK,CAAC;IAC7D,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB;AAED,UAAU,iBAAkB,SAAQ,cAAc,CAAC,KAAK,CAAC;IACvD,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AASD,iBAAS,QAAQ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cAAc,CAAC,KAAK,CAAC,kDA6CrE;AAED,iBAAS,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,KAAK,CAAC,2CAWtE;AAED,OAAO,EACL,QAAQ,EACR,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,sBAAsB,EACtB,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,aAAa,GACd,CAAC;AACF,YAAY,EAAE,uBAAuB,EAAE,aAAa,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -17,7 +17,7 @@ declare function CardWeek({ className, done, postponed, skipped, ...props }: Car
|
|
|
17
17
|
declare function CardWeekBreadcrumb({ className, children, tag, tagIcon, ...props }: CardWeekBreadcrumbProps): import("react/jsx-runtime").JSX.Element;
|
|
18
18
|
declare function CardWeekContainer({ className, ...props }: ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
19
19
|
declare function CardWeekHeader({ className, ...props }: ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
20
|
-
declare
|
|
20
|
+
declare const CardWeekTitle: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
21
21
|
declare function CardWeekDescription({ className, ...props }: ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
22
22
|
declare function CardWeekTags({ className, ...props }: ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
23
23
|
declare function CardWeekProgressCircle({ className, value, ...progressProps }: ProgressCircleProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardWeek.d.ts","sourceRoot":"","sources":["../../src/components/CardWeek.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"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S,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,KAAK,CAAC,2CAWnE;AAED,iBAAS,sBAAsB,CAAC,EAC9B,SAAS,EACT,KAAK,EACL,GAAG,aAAa,EACjB,EAAE,mBAAmB,2CASrB;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,KAAK,EACL,kBAAkB,EAClB,GAAG,KAAK,EACT,EAAE,aAAa,2CAmBf;AAED,iBAAS,cAAc,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,KAAK,CAAC,2CAQrE;AAED,iBAAS,eAAe,CAAC,EACvB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,KAAK,CAAC,2CAUvB;AAED,iBAAS,YAAY,CAAC,EACpB,SAAS,EACT,QAAQ,EACR,MAAM,EACN,GAAG,KAAK,EACT,EAAE,iBAAiB,2CAenB;AAED,iBAAS,cAAc,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,KAAK,CAAC,kDA6CrE;AAED,iBAAS,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,KAAK,CAAC,2CAWtE;AAED,OAAO,EACL,QAAQ,EACR,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,sBAAsB,EACtB,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,aAAa,GACd,CAAC;AACF,YAAY,EAAE,uBAAuB,EAAE,aAAa,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
"use client";
|
|
3
|
-
"use strict";var
|
|
3
|
+
"use strict";var t=require("react/jsx-runtime"),m=require("react"),N=require("./Breadcrumb.js"),q=require("./Progress.js"),z=require("./ProgressCircle.js"),R=require("./Tag.js"),p=require("./Tooltip.js"),B=require("../hooks/use-composed-refs.js"),o=require("../lib/utils.js"),k=require("@medway-ui/icons"),H=Object.defineProperty,D=Object.defineProperties,I=Object.getOwnPropertyDescriptors,v=Object.getOwnPropertySymbols,h=Object.prototype.hasOwnProperty,b=Object.prototype.propertyIsEnumerable,j=(r,e,a)=>e in r?H(r,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[e]=a,d=(r,e)=>{for(var a in e||(e={}))h.call(e,a)&&j(r,a,e[a]);if(v)for(var a of v(e))b.call(e,a)&&j(r,a,e[a]);return r},x=(r,e)=>D(r,I(e)),i=(r,e)=>{var a={};for(var s in r)h.call(r,s)&&e.indexOf(s)<0&&(a[s]=r[s]);if(r!=null&&v)for(var s of v(r))e.indexOf(s)<0&&b.call(r,s)&&(a[s]=r[s]);return a};const f=m.createContext(null);function S(r){var e=r,{className:a,done:s,postponed:n,skipped:c}=e,l=i(e,["className","done","postponed","skipped"]);const u=m.useMemo(()=>({done:s,postponed:n,skipped:c}),[s,n,c]);return t.jsx(f.Provider,{value:u,children:t.jsx("div",d({"data-slot":"card-week",className:o.cn("flex flex-col overflow-hidden rounded-xl border border-gray-stroke-muted text-gray-foreground-muted",a)},l))})}function A(r){var e=r,{className:a,children:s,tag:n,tagIcon:c}=e,l=i(e,["className","children","tag","tagIcon"]);return t.jsxs("div",x(d({"data-slot":"card-week-breadcrumb",className:o.cn("flex min-h-12 min-w-0 items-center gap-4 bg-primary-background-soft-muted px-6 py-3",a)},l),{children:[t.jsx(N.Breadcrumb,{className:"min-w-0 flex-1 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:t.jsx(N.BreadcrumbList,{className:"w-max flex-nowrap gap-1.5 whitespace-nowrap text-xs",children:s})}),n&&t.jsx(R.Tag,{variant:"regular-soft",icon:c,children:n})]}))}function E(r){var e=r,{className:a}=e,s=i(e,["className"]);return t.jsx("div",d({"data-slot":"card-week-container",className:o.cn("flex flex-1 flex-col gap-5 bg-surface-card px-6 py-5",a)},s))}function F(r){var e=r,{className:a}=e,s=i(e,["className"]);return t.jsx("div",d({"data-slot":"card-week-header",className:o.cn("flex items-start justify-between gap-4 [&.border-b]:pb-6 [&>*]:min-w-0",a)},s))}const L=m.forwardRef(function(r,e){var a=r,{className:s,children:n}=a,c=i(a,["className","children"]);const l=m.useContext(f),u=l==null?void 0:l.done,C=l==null?void 0:l.postponed,y=l==null?void 0:l.skipped,w=m.useRef(null),W=B.useComposedRefs(e,w),[T,P]=m.useState(!1);return t.jsx(p.TooltipProvider,{children:t.jsxs(p.Tooltip,{open:T,onOpenChange:O=>{const g=w.current;P(O&&!!g&&g.scrollHeight>g.clientHeight+1)},children:[t.jsx(p.TooltipTrigger,{asChild:!0,children:t.jsx("div",x(d({ref:W,"data-slot":"card-week-title",className:o.cn("line-clamp-2 break-words text-lg font-semibold leading-lg text-primary-foreground",(u||C||y)&&"text-primary-foreground-muted line-through",s)},c),{children:n}))}),t.jsx(p.TooltipContent,{side:"top",className:"max-w-xs break-words",children:n})]})})});function M(r){var e=r,{className:a}=e,s=i(e,["className"]);const n=m.useContext(f),c=n==null?void 0:n.done,l=n==null?void 0:n.postponed,u=n==null?void 0:n.skipped;return t.jsx("div",d({"data-slot":"card-week-description",className:o.cn("text-xs font-semibold leading-xs text-gray-foreground",(c||l||u)&&"text-gray-foreground-muted",a)},s))}function U(r){var e=r,{className:a}=e,s=i(e,["className"]);return t.jsx("div",d({"data-slot":"card-week-tags",className:o.cn("flex flex-wrap items-center gap-2 [[data-slot=card-week-header]:not(:has([data-slot=card-week-progress]))+&]:mt-6",a)},s))}function X(r){var e=r,{className:a,value:s}=e,n=i(e,["className","value"]);return t.jsx("div",{"data-slot":"card-week-progress-circle",className:o.cn("ml-auto flex shrink-0 justify-end",a),children:t.jsx(z.ProgressCircle,d({size:104,value:s},n))})}function Y(r){var e=r,{className:a,value:s,indicatorClassName:n}=e,c=i(e,["className","value","indicatorClassName"]);const l=m.useContext(f),u=l==null?void 0:l.done;return t.jsx("div",{"data-slot":"card-week-progress",className:o.cn("flex flex-1",a),children:t.jsx(q.Progress,x(d({},c),{value:u?100:s,indicatorClassName:o.cn(u&&"bg-secondary-stroke-emphasis",n)}))})}function Z(r){var e=r,{className:a}=e,s=i(e,["className"]);return t.jsx("div",d({"data-slot":"card-week-footer",className:o.cn("mt-auto flex flex-col gap-2",a)},s))}function _(r){var e=r,{className:a,children:s}=e,n=i(e,["className","children"]);return t.jsx("div",x(d({"data-slot":"card-week-content",className:o.cn("flex min-w-0 flex-col text-xs font-medium",a)},n),{children:s}))}function $(r){var e=r,{className:a,children:s,isTime:n}=e,c=i(e,["className","children","isTime"]);return t.jsxs("div",x(d({"data-slot":"card-week-text",className:o.cn("flex min-w-0 items-center gap-1.5",n?"text-secondary-foreground":"text-gray-foreground-muted",a)},c),{children:[n&&t.jsx(k.TimeRemaining,{size:16}),t.jsx("span",{className:"min-w-0 break-words",children:s})]}))}function G(r){var e=r,{className:a}=e,s=i(e,["className"]);const n=m.useContext(f),c=n==null?void 0:n.done,l=n==null?void 0:n.postponed,u=n==null?void 0:n.skipped;return!c&&!l&&!u?null:l||u?t.jsxs("div",x(d({"data-slot":"card-week-status",className:o.cn("ml-auto flex min-w-0 max-w-full items-center gap-1.5",a)},s),{children:[t.jsx("div",{className:"flex size-4 shrink-0 items-center justify-center rounded-full bg-yellow-24 text-feedback-warning-foreground",children:t.jsx(k.Check,{size:12,strokeWidth:1.67})}),t.jsx("div",{className:"min-w-0 break-words font-semibold text-feedback-warning-foreground",children:l?"Adiado":"Pulado"})]})):t.jsxs("div",x(d({"data-slot":"card-week-status",className:o.cn("ml-auto flex min-w-0 max-w-full items-center gap-1.5",a)},s),{children:[t.jsx("div",{className:"flex size-4 shrink-0 items-center justify-center rounded-full bg-secondary-background-soft text-secondary-foreground",children:t.jsx(k.Check,{size:12,strokeWidth:1.67})}),t.jsx("div",{className:"min-w-0 break-words font-semibold text-secondary-foreground",children:"Conclu\xEDdo"})]}))}function J(r){var e=r,{className:a}=e,s=i(e,["className"]);return t.jsx("div",d({"data-slot":"card-week-actions",className:o.cn("flex flex-wrap items-center justify-end gap-2 pt-4 max-[500px]:flex-col max-[500px]:flex-nowrap max-[500px]:items-stretch max-[500px]:[&_[data-slot=button]]:w-full",a)},s))}exports.CardWeek=S,exports.CardWeekActions=J,exports.CardWeekBreadcrumb=A,exports.CardWeekContainer=E,exports.CardWeekContent=_,exports.CardWeekDescription=M,exports.CardWeekFooter=Z,exports.CardWeekHeader=F,exports.CardWeekProgress=Y,exports.CardWeekProgressCircle=X,exports.CardWeekStatus=G,exports.CardWeekTags=U,exports.CardWeekText=$,exports.CardWeekTitle=L;
|
|
4
4
|
//# sourceMappingURL=CardWeek.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
"use client";
|
|
3
|
-
import{jsx as o,jsxs as
|
|
3
|
+
import{jsx as o,jsxs as f}from"react/jsx-runtime";import{createContext as P,forwardRef as $,useContext as x,useRef as z,useState as R,useMemo as H}from"react";import{Breadcrumb as B,BreadcrumbList as D}from"./Breadcrumb.mjs";import{Progress as I}from"./Progress.mjs";import{ProgressCircle as S}from"./ProgressCircle.mjs";import{Tag as A}from"./Tag.mjs";import{TooltipProvider as E,Tooltip as F,TooltipTrigger as L,TooltipContent as M}from"./Tooltip.mjs";import{useComposedRefs as U}from"../hooks/use-composed-refs.mjs";import{cn as n}from"../lib/utils.mjs";import{Check as h,TimeRemaining as X}from"@medway-ui/icons";var Y=Object.defineProperty,Z=Object.defineProperties,_=Object.getOwnPropertyDescriptors,v=Object.getOwnPropertySymbols,k=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable,b=(a,e,r)=>e in a?Y(a,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[e]=r,d=(a,e)=>{for(var r in e||(e={}))k.call(e,r)&&b(a,r,e[r]);if(v)for(var r of v(e))N.call(e,r)&&b(a,r,e[r]);return a},u=(a,e)=>Z(a,_(e)),c=(a,e)=>{var r={};for(var s in a)k.call(a,s)&&e.indexOf(s)<0&&(r[s]=a[s]);if(a!=null&&v)for(var s of v(a))e.indexOf(s)<0&&N.call(a,s)&&(r[s]=a[s]);return r};const p=P(null);function q(a){var e=a,{className:r,done:s,postponed:t,skipped:i}=e,l=c(e,["className","done","postponed","skipped"]);const m=H(()=>({done:s,postponed:t,skipped:i}),[s,t,i]);return o(p.Provider,{value:m,children:o("div",d({"data-slot":"card-week",className:n("flex flex-col overflow-hidden rounded-xl border border-gray-stroke-muted text-gray-foreground-muted",r)},l))})}function G(a){var e=a,{className:r,children:s,tag:t,tagIcon:i}=e,l=c(e,["className","children","tag","tagIcon"]);return f("div",u(d({"data-slot":"card-week-breadcrumb",className:n("flex min-h-12 min-w-0 items-center gap-4 bg-primary-background-soft-muted px-6 py-3",r)},l),{children:[o(B,{className:"min-w-0 flex-1 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:o(D,{className:"w-max flex-nowrap gap-1.5 whitespace-nowrap text-xs",children:s})}),t&&o(A,{variant:"regular-soft",icon:i,children:t})]}))}function J(a){var e=a,{className:r}=e,s=c(e,["className"]);return o("div",d({"data-slot":"card-week-container",className:n("flex flex-1 flex-col gap-5 bg-surface-card px-6 py-5",r)},s))}function K(a){var e=a,{className:r}=e,s=c(e,["className"]);return o("div",d({"data-slot":"card-week-header",className:n("flex items-start justify-between gap-4 [&.border-b]:pb-6 [&>*]:min-w-0",r)},s))}const Q=$(function(a,e){var r=a,{className:s,children:t}=r,i=c(r,["className","children"]);const l=x(p),m=l==null?void 0:l.done,C=l==null?void 0:l.postponed,y=l==null?void 0:l.skipped,w=z(null),W=U(e,w),[O,j]=R(!1);return o(E,{children:f(F,{open:O,onOpenChange:T=>{const g=w.current;j(T&&!!g&&g.scrollHeight>g.clientHeight+1)},children:[o(L,{asChild:!0,children:o("div",u(d({ref:W,"data-slot":"card-week-title",className:n("line-clamp-2 break-words text-lg font-semibold leading-lg text-primary-foreground",(m||C||y)&&"text-primary-foreground-muted line-through",s)},i),{children:t}))}),o(M,{side:"top",className:"max-w-xs break-words",children:t})]})})});function V(a){var e=a,{className:r}=e,s=c(e,["className"]);const t=x(p),i=t==null?void 0:t.done,l=t==null?void 0:t.postponed,m=t==null?void 0:t.skipped;return o("div",d({"data-slot":"card-week-description",className:n("text-xs font-semibold leading-xs text-gray-foreground",(i||l||m)&&"text-gray-foreground-muted",r)},s))}function ee(a){var e=a,{className:r}=e,s=c(e,["className"]);return o("div",d({"data-slot":"card-week-tags",className:n("flex flex-wrap items-center gap-2 [[data-slot=card-week-header]:not(:has([data-slot=card-week-progress]))+&]:mt-6",r)},s))}function ae(a){var e=a,{className:r,value:s}=e,t=c(e,["className","value"]);return o("div",{"data-slot":"card-week-progress-circle",className:n("ml-auto flex shrink-0 justify-end",r),children:o(S,d({size:104,value:s},t))})}function re(a){var e=a,{className:r,value:s,indicatorClassName:t}=e,i=c(e,["className","value","indicatorClassName"]);const l=x(p),m=l==null?void 0:l.done;return o("div",{"data-slot":"card-week-progress",className:n("flex flex-1",r),children:o(I,u(d({},i),{value:m?100:s,indicatorClassName:n(m&&"bg-secondary-stroke-emphasis",t)}))})}function se(a){var e=a,{className:r}=e,s=c(e,["className"]);return o("div",d({"data-slot":"card-week-footer",className:n("mt-auto flex flex-col gap-2",r)},s))}function te(a){var e=a,{className:r,children:s}=e,t=c(e,["className","children"]);return o("div",u(d({"data-slot":"card-week-content",className:n("flex min-w-0 flex-col text-xs font-medium",r)},t),{children:s}))}function oe(a){var e=a,{className:r,children:s,isTime:t}=e,i=c(e,["className","children","isTime"]);return f("div",u(d({"data-slot":"card-week-text",className:n("flex min-w-0 items-center gap-1.5",t?"text-secondary-foreground":"text-gray-foreground-muted",r)},i),{children:[t&&o(X,{size:16}),o("span",{className:"min-w-0 break-words",children:s})]}))}function le(a){var e=a,{className:r}=e,s=c(e,["className"]);const t=x(p),i=t==null?void 0:t.done,l=t==null?void 0:t.postponed,m=t==null?void 0:t.skipped;return!i&&!l&&!m?null:l||m?f("div",u(d({"data-slot":"card-week-status",className:n("ml-auto flex min-w-0 max-w-full items-center gap-1.5",r)},s),{children:[o("div",{className:"flex size-4 shrink-0 items-center justify-center rounded-full bg-yellow-24 text-feedback-warning-foreground",children:o(h,{size:12,strokeWidth:1.67})}),o("div",{className:"min-w-0 break-words font-semibold text-feedback-warning-foreground",children:l?"Adiado":"Pulado"})]})):f("div",u(d({"data-slot":"card-week-status",className:n("ml-auto flex min-w-0 max-w-full items-center gap-1.5",r)},s),{children:[o("div",{className:"flex size-4 shrink-0 items-center justify-center rounded-full bg-secondary-background-soft text-secondary-foreground",children:o(h,{size:12,strokeWidth:1.67})}),o("div",{className:"min-w-0 break-words font-semibold text-secondary-foreground",children:"Conclu\xEDdo"})]}))}function ne(a){var e=a,{className:r}=e,s=c(e,["className"]);return o("div",d({"data-slot":"card-week-actions",className:n("flex flex-wrap items-center justify-end gap-2 pt-4 max-[500px]:flex-col max-[500px]:flex-nowrap max-[500px]:items-stretch max-[500px]:[&_[data-slot=button]]:w-full",r)},s))}export{q as CardWeek,ne as CardWeekActions,G as CardWeekBreadcrumb,J as CardWeekContainer,te as CardWeekContent,V as CardWeekDescription,se as CardWeekFooter,K as CardWeekHeader,re as CardWeekProgress,ae as CardWeekProgressCircle,le as CardWeekStatus,ee as CardWeekTags,oe as CardWeekText,Q as CardWeekTitle};
|
|
4
4
|
//# sourceMappingURL=CardWeek.mjs.map
|