@medway-ui/core 1.28.0 → 1.29.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/README.md
CHANGED
|
@@ -130,15 +130,19 @@ PRs que não mudam nada publicável (docs, chore de CI, etc.) simplesmente não
|
|
|
130
130
|
### O que acontece depois do merge de uma PR de feature
|
|
131
131
|
|
|
132
132
|
Ao mergear na `main`, o workflow `.github/workflows/release.yml` roda para cada um dos 3 pacotes.
|
|
133
|
-
Ele olha os commits
|
|
134
|
-
changeset automaticamente (arquivo em `.changeset/`, `native/.changeset/` ou `notes-core/.changeset/`)
|
|
133
|
+
Ele olha os commits desde o último bump de `version` daquele pacote na `main` e, se algum deles tocou os
|
|
134
|
+
arquivos do pacote, gera um changeset automaticamente (arquivo em `.changeset/`, `native/.changeset/` ou `notes-core/.changeset/`)
|
|
135
135
|
com o tipo de bump inferido da mensagem de commit. A partir daí:
|
|
136
136
|
|
|
137
|
-
- **Se
|
|
137
|
+
- **Se a versão do `package.json` já está no npm**: aplica o bump de versão (`changeset version`), atualiza o
|
|
138
138
|
`CHANGELOG.md`, commita isso numa branch própria do pacote (`changeset-release/core`,
|
|
139
139
|
`changeset-release/native` ou `changeset-release/notes-core`) e abre (ou atualiza) uma PR
|
|
140
140
|
**"chore: version @medway-ui/<pacote>"** direto contra `main`.
|
|
141
|
-
- **Se não
|
|
141
|
+
- **Se a versão do `package.json` ainda não está no npm** (a PR de versão já foi mergeada): builda e
|
|
142
|
+
publica o pacote no npm e cria a tag.
|
|
143
|
+
|
|
144
|
+
Depois de publicar, o workflow espera a versão aparecer no npm e comenta em cada PR incluída no release
|
|
145
|
+
("Esta alteração foi publicada em `pacote@versão`"), marcando o autor.
|
|
142
146
|
|
|
143
147
|
Ou seja, cada release passa por 2 PRs: a da mudança em si, e depois a de versão — ambas contra
|
|
144
148
|
`main`, revisadas e aprovadas normalmente, sem nenhuma branch intermediária protegida e sem
|
|
@@ -147,6 +151,12 @@ nenhuma exceção de bypass. Só `main` tem proteção de branch (exige PR antes
|
|
|
147
151
|
`@medway-ui/notes-core` é sempre processado antes de `core` e `native` (ambos o declaram como
|
|
148
152
|
peerDependency).
|
|
149
153
|
|
|
154
|
+
### Limitações conhecidas
|
|
155
|
+
|
|
156
|
+
- A PR de versão é aberta com o token de um GitHub App (`RELEASE_APP_ID` como variável e
|
|
157
|
+
`RELEASE_APP_PRIVATE_KEY` como secret, ambos na org), e não com o `GITHUB_TOKEN`, que não dispara outros
|
|
158
|
+
workflows. Por isso o check `Build` roda nela e pode ser obrigatório no ruleset.
|
|
159
|
+
|
|
150
160
|
### Quando um dev ainda quer escrever o changelog à mão
|
|
151
161
|
|
|
152
162
|
Rodar `yarn changeset` (ou `cd native && yarn changeset` / `cd notes-core && npm run changeset`)
|
|
@@ -2,13 +2,14 @@ import { type ComponentProps, type ReactNode } from "react";
|
|
|
2
2
|
import { type VariantProps } from "class-variance-authority";
|
|
3
3
|
declare const tileVariants: (props?: ({
|
|
4
4
|
variant?: "regular" | "go" | "cm" | "cir" | "ped" | "prev" | null | undefined;
|
|
5
|
+
size?: "default" | "compact" | null | undefined;
|
|
5
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
7
|
interface TileProps extends ComponentProps<"div">, VariantProps<typeof tileVariants> {
|
|
7
8
|
asChild?: boolean;
|
|
8
9
|
disabled?: boolean;
|
|
9
10
|
inactive?: boolean;
|
|
10
11
|
}
|
|
11
|
-
declare function Tile({ className, variant, asChild, disabled, inactive, ...props }: TileProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function Tile({ className, variant, size, asChild, disabled, inactive, ...props }: TileProps): import("react/jsx-runtime").JSX.Element;
|
|
12
13
|
declare function TileIcon({ className, icon, ...props }: ComponentProps<"div"> & {
|
|
13
14
|
icon?: ReactNode;
|
|
14
15
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tile.d.ts","sourceRoot":"","sources":["../../src/components/Tile.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAoB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9E,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAKlE,QAAA,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"Tile.d.ts","sourceRoot":"","sources":["../../src/components/Tile.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAoB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9E,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAKlE,QAAA,MAAM,YAAY;;;8EAuBjB,CAAC;AAEF,UAAU,SACR,SAAQ,cAAc,CAAC,KAAK,CAAC,EAC3B,YAAY,CAAC,OAAO,YAAY,CAAC;IACnC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,iBAAS,IAAI,CAAC,EACZ,SAAS,EACT,OAAmB,EACnB,IAAgB,EAChB,OAAe,EACf,QAAgB,EAChB,QAAgB,EAChB,GAAG,KAAK,EACT,EAAE,SAAS,2CAyBX;AAED,iBAAS,QAAQ,CAAC,EAChB,SAAS,EACT,IAAI,EACJ,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,KAAK,CAAC,GAAG;IACzB,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB,2CAaA;AAED,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,KAAK,CAAC,2CAWhE;AAED,iBAAS,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,GAAG,CAAC,2CAWpE;AAED,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,eAAe,EAAE,YAAY,EAAE,CAAC;AACpE,YAAY,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -2,13 +2,14 @@ import { type ComponentProps, type ReactNode } from "react";
|
|
|
2
2
|
import { type VariantProps } from "class-variance-authority";
|
|
3
3
|
declare const tileVariants: (props?: ({
|
|
4
4
|
variant?: "regular" | "go" | "cm" | "cir" | "ped" | "prev" | null | undefined;
|
|
5
|
+
size?: "default" | "compact" | null | undefined;
|
|
5
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
7
|
interface TileProps extends ComponentProps<"div">, VariantProps<typeof tileVariants> {
|
|
7
8
|
asChild?: boolean;
|
|
8
9
|
disabled?: boolean;
|
|
9
10
|
inactive?: boolean;
|
|
10
11
|
}
|
|
11
|
-
declare function Tile({ className, variant, asChild, disabled, inactive, ...props }: TileProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function Tile({ className, variant, size, asChild, disabled, inactive, ...props }: TileProps): import("react/jsx-runtime").JSX.Element;
|
|
12
13
|
declare function TileIcon({ className, icon, ...props }: ComponentProps<"div"> & {
|
|
13
14
|
icon?: ReactNode;
|
|
14
15
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tile.d.ts","sourceRoot":"","sources":["../../src/components/Tile.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAoB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9E,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAKlE,QAAA,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"Tile.d.ts","sourceRoot":"","sources":["../../src/components/Tile.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAoB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9E,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAKlE,QAAA,MAAM,YAAY;;;8EAuBjB,CAAC;AAEF,UAAU,SACR,SAAQ,cAAc,CAAC,KAAK,CAAC,EAC3B,YAAY,CAAC,OAAO,YAAY,CAAC;IACnC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,iBAAS,IAAI,CAAC,EACZ,SAAS,EACT,OAAmB,EACnB,IAAgB,EAChB,OAAe,EACf,QAAgB,EAChB,QAAgB,EAChB,GAAG,KAAK,EACT,EAAE,SAAS,2CAyBX;AAED,iBAAS,QAAQ,CAAC,EAChB,SAAS,EACT,IAAI,EACJ,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,KAAK,CAAC,GAAG;IACzB,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB,2CAaA;AAED,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,KAAK,CAAC,2CAWhE;AAED,iBAAS,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,GAAG,CAAC,2CAWpE;AAED,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,eAAe,EAAE,YAAY,EAAE,CAAC;AACpE,YAAY,EAAE,SAAS,EAAE,CAAC"}
|
package/dist/components/Tile.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
"use client";
|
|
3
|
-
"use strict";var
|
|
3
|
+
"use strict";var l=require("react/jsx-runtime"),N=require("radix-ui"),j=require("class-variance-authority"),k=require("@medway-ui/icons"),n=require("../lib/utils.js"),z=Object.defineProperty,O=Object.defineProperties,w=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertySymbols,g=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable,b=(r,e,a)=>e in r?z(r,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[e]=a,s=(r,e)=>{for(var a in e||(e={}))g.call(e,a)&&b(r,a,e[a]);if(o)for(var a of o(e))p.call(e,a)&&b(r,a,e[a]);return r},v=(r,e)=>O(r,w(e)),d=(r,e)=>{var a={};for(var t in r)g.call(r,t)&&e.indexOf(t)<0&&(a[t]=r[t]);if(r!=null&&o)for(var t of o(r))e.indexOf(t)<0&&p.call(r,t)&&(a[t]=r[t]);return a};const m=j.cva("group/tile relative flex border cursor-default data-[disabled=true]:pointer-events-none",{variants:{variant:{regular:"bg-surface-card border-gray-stroke-muted text-primary-foreground fill-primary-foreground data-[clickable=true]:hover:border-gray-stroke data-[inactive=true]:bg-surface-page data-[disabled=true]:bg-surface-page data-[disabled=true]:text-gray-foreground-muted data-[disabled=true]:fill-gray-foreground-muted",cm:"border-transparent bg-cm-background-fill text-cm-foreground-onfill fill-cm-foreground-onfill data-[disabled=true]:opacity-70 data-[inactive=true]:[filter:brightness(.8)]",go:"border-transparent bg-go-background-fill text-go-foreground-onfill fill-go-foreground-onfill data-[disabled=true]:opacity-70 data-[inactive=true]:[filter:brightness(.8)]",cir:"border-transparent bg-cir-background-fill text-cir-foreground-onfill fill-cir-foreground-onfill data-[disabled=true]:opacity-70 data-[inactive=true]:[filter:brightness(.8)]",ped:"border-transparent bg-ped-background-fill text-ped-foreground-onfill fill-ped-foreground-onfill data-[disabled=true]:opacity-70 data-[inactive=true]:[filter:brightness(.8)]",prev:"border-transparent bg-prev-background-fill text-prev-foreground-onfill fill-prev-foreground-onfill data-[disabled=true]:opacity-70 data-[inactive=true]:[filter:brightness(.8)]"},size:{default:"flex-col justify-center gap-1 rounded-lg px-5 py-4",compact:"w-fit flex-row items-center gap-3 rounded-pill px-3.5 py-2.5"}},defaultVariants:{variant:"regular",size:"default"}});function P(r){var e=r,{className:a,variant:t="regular",size:i="default",asChild:x=!1,disabled:c=!1,inactive:y=!1}=e,u=d(e,["className","variant","size","asChild","disabled","inactive"]);const h=x?N.Slot.Slot:"div",f=!!u.onClick&&!c;return l.jsxs(h,v(s({"data-slot":"tile","data-variant":t,"data-size":i,"data-inactive":y,"data-disabled":c,"data-clickable":f,"aria-disabled":c,className:n.cn(m({variant:t,size:i,className:a}),f&&"cursor-pointer")},u),{children:[u.children,f&&i==="default"&&l.jsx(k.EditPencil,{className:"absolute right-5 top-4 size-5 opacity-0 transition-opacity group-hover/tile:opacity-100"})]}))}function q(r){var e=r,{className:a,icon:t}=e,i=d(e,["className","icon"]);return l.jsx("div",v(s({"data-slot":"tile-icon",className:n.cn("flex shrink-0 items-center mb-2 last:mb-0 group-data-[size=compact]/tile:mb-0 [&>svg]:size-5",a)},i),{children:t}))}function T(r){var e=r,{className:a}=e,t=d(e,["className"]);return l.jsx("div",s({"data-slot":"tile-title",className:n.cn("max-w-full truncate text-xs font-medium leading-xs group-data-[variant=regular]/tile:text-gray-foreground-muted group-data-[size=compact]/tile:sr-only",a)},t))}function V(r){var e=r,{className:a}=e,t=d(e,["className"]);return l.jsx("span",s({"data-slot":"tile-description",className:n.cn("max-w-full truncate text-sm font-semibold leading-sm",a)},t))}exports.Tile=P,exports.TileDescription=V,exports.TileIcon=q,exports.TileTitle=T,exports.tileVariants=m;
|
|
4
4
|
//# sourceMappingURL=Tile.js.map
|
package/dist/components/Tile.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
"use client";
|
|
3
|
-
import{jsxs as
|
|
3
|
+
import{jsxs as N,jsx as l}from"react/jsx-runtime";import{Slot as k}from"radix-ui";import{cva as z}from"class-variance-authority";import{EditPencil as O}from"@medway-ui/icons";import{cn as o}from"../lib/utils.mjs";var j=Object.defineProperty,w=Object.defineProperties,P=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,p=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable,b=(a,e,r)=>e in a?j(a,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[e]=r,d=(a,e)=>{for(var r in e||(e={}))p.call(e,r)&&b(a,r,e[r]);if(n)for(var r of n(e))g.call(e,r)&&b(a,r,e[r]);return a},m=(a,e)=>w(a,P(e)),s=(a,e)=>{var r={};for(var t in a)p.call(a,t)&&e.indexOf(t)<0&&(r[t]=a[t]);if(a!=null&&n)for(var t of n(a))e.indexOf(t)<0&&g.call(a,t)&&(r[t]=a[t]);return r};const v=z("group/tile relative flex border cursor-default data-[disabled=true]:pointer-events-none",{variants:{variant:{regular:"bg-surface-card border-gray-stroke-muted text-primary-foreground fill-primary-foreground data-[clickable=true]:hover:border-gray-stroke data-[inactive=true]:bg-surface-page data-[disabled=true]:bg-surface-page data-[disabled=true]:text-gray-foreground-muted data-[disabled=true]:fill-gray-foreground-muted",cm:"border-transparent bg-cm-background-fill text-cm-foreground-onfill fill-cm-foreground-onfill data-[disabled=true]:opacity-70 data-[inactive=true]:[filter:brightness(.8)]",go:"border-transparent bg-go-background-fill text-go-foreground-onfill fill-go-foreground-onfill data-[disabled=true]:opacity-70 data-[inactive=true]:[filter:brightness(.8)]",cir:"border-transparent bg-cir-background-fill text-cir-foreground-onfill fill-cir-foreground-onfill data-[disabled=true]:opacity-70 data-[inactive=true]:[filter:brightness(.8)]",ped:"border-transparent bg-ped-background-fill text-ped-foreground-onfill fill-ped-foreground-onfill data-[disabled=true]:opacity-70 data-[inactive=true]:[filter:brightness(.8)]",prev:"border-transparent bg-prev-background-fill text-prev-foreground-onfill fill-prev-foreground-onfill data-[disabled=true]:opacity-70 data-[inactive=true]:[filter:brightness(.8)]"},size:{default:"flex-col justify-center gap-1 rounded-lg px-5 py-4",compact:"w-fit flex-row items-center gap-3 rounded-pill px-3.5 py-2.5"}},defaultVariants:{variant:"regular",size:"default"}});function T(a){var e=a,{className:r,variant:t="regular",size:i="default",asChild:y=!1,disabled:c=!1,inactive:x=!1}=e,u=s(e,["className","variant","size","asChild","disabled","inactive"]);const h=y?k.Slot:"div",f=!!u.onClick&&!c;return N(h,m(d({"data-slot":"tile","data-variant":t,"data-size":i,"data-inactive":x,"data-disabled":c,"data-clickable":f,"aria-disabled":c,className:o(v({variant:t,size:i,className:r}),f&&"cursor-pointer")},u),{children:[u.children,f&&i==="default"&&l(O,{className:"absolute right-5 top-4 size-5 opacity-0 transition-opacity group-hover/tile:opacity-100"})]}))}function C(a){var e=a,{className:r,icon:t}=e,i=s(e,["className","icon"]);return l("div",m(d({"data-slot":"tile-icon",className:o("flex shrink-0 items-center mb-2 last:mb-0 group-data-[size=compact]/tile:mb-0 [&>svg]:size-5",r)},i),{children:t}))}function E(a){var e=a,{className:r}=e,t=s(e,["className"]);return l("div",d({"data-slot":"tile-title",className:o("max-w-full truncate text-xs font-medium leading-xs group-data-[variant=regular]/tile:text-gray-foreground-muted group-data-[size=compact]/tile:sr-only",r)},t))}function S(a){var e=a,{className:r}=e,t=s(e,["className"]);return l("span",d({"data-slot":"tile-description",className:o("max-w-full truncate text-sm font-semibold leading-sm",r)},t))}export{T as Tile,S as TileDescription,C as TileIcon,E as TileTitle,v as tileVariants};
|
|
4
4
|
//# sourceMappingURL=Tile.mjs.map
|