@cupcodev/ui 6.1.1 → 7.0.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 +22 -0
- package/dist/index.cjs +2319 -1721
- package/dist/index.d.cts +23 -2
- package/dist/index.d.ts +23 -2
- package/dist/index.js +1586 -1012
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/styles/dock.css +14 -7
- package/styles/global.css +0 -1
package/README.md
CHANGED
|
@@ -105,6 +105,28 @@ export default function Example() {
|
|
|
105
105
|
|
|
106
106
|
Todos os componentes Cupcode e shadcn/ui base são reexportados de `@cupcodev/ui`.
|
|
107
107
|
|
|
108
|
+
### Contrato de API (Source of Truth do DS)
|
|
109
|
+
|
|
110
|
+
Para manter layout/CSS 100% padronizado nos apps consumidores:
|
|
111
|
+
|
|
112
|
+
1. Sempre importe os estilos globais do pacote uma única vez no bootstrap:
|
|
113
|
+
|
|
114
|
+
```ts
|
|
115
|
+
import "@cupcodev/ui/styles.css";
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
2. Use os componentes canonicos do DS no import principal:
|
|
119
|
+
- `Tabs`, `TabsList`, `TabsTrigger`, `TabsContent` (versao Cupcode)
|
|
120
|
+
- `Tooltip`, `TooltipProvider`, `TooltipTrigger`, `TooltipContent` (versao Cupcode)
|
|
121
|
+
- `Skeleton` e `SkeletonText` (versao Cupcode)
|
|
122
|
+
|
|
123
|
+
3. Se realmente precisar do comportamento visual bruto do shadcn, use os exports `Primitive*`:
|
|
124
|
+
- `PrimitiveTabs`, `PrimitiveTabsList`, `PrimitiveTabsTrigger`, `PrimitiveTabsContent`
|
|
125
|
+
- `PrimitiveTooltip`, `PrimitiveTooltipProvider`, `PrimitiveTooltipTrigger`, `PrimitiveTooltipContent`
|
|
126
|
+
- `PrimitiveSkeleton`
|
|
127
|
+
|
|
128
|
+
Assim evitamos drift visual entre apps e garantimos o DS como fonte unica de verdade.
|
|
129
|
+
|
|
108
130
|
### MainNavbar sem router obrigatório
|
|
109
131
|
|
|
110
132
|
`MainNavbar` não depende de `react-router-dom`. Para integração SPA, passe `pathname` e `onNavigate`.
|