@wellingtonhlc/shared-ui 0.24.20 → 0.25.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 +39 -109
- package/dist/components/Page.d.ts.map +1 -1
- package/dist/components/Page.js +11 -3
- package/dist/components/SelectionField.d.ts +39 -0
- package/dist/components/SelectionField.d.ts.map +1 -0
- package/dist/components/SelectionField.js +85 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/styles.css +146 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -43,19 +43,6 @@ Este pacote foi desenhado para oferecer infraestrutura visual generica:
|
|
|
43
43
|
- helpers sem dependencia de dominio;
|
|
44
44
|
- composicao por slots quando o componente possui partes internas.
|
|
45
45
|
|
|
46
|
-
## Scripts
|
|
47
|
-
|
|
48
|
-
| Comando | Uso |
|
|
49
|
-
|---------|-----|
|
|
50
|
-
| `npm run typecheck` | Valida tipos sem emitir arquivos. |
|
|
51
|
-
| `npm run test` | Executa testes de contrato e acessibilidade com Vitest, Testing Library e axe. |
|
|
52
|
-
| `npm run check:storybook-static` | Confere se o Storybook estatico gerado possui artefatos e stories publicas. |
|
|
53
|
-
| `npm run check` | Gate local completo: typecheck, testes, build, Storybook, smoke do Storybook estatico e `npm pack --dry-run`. |
|
|
54
|
-
| `npm run build` | Compila TypeScript e copia assets para `dist`. |
|
|
55
|
-
| `npm run prepack` | Executado automaticamente antes de empacotar/publicar. |
|
|
56
|
-
| `npm run storybook` | Sobe o Storybook local. |
|
|
57
|
-
| `npm run build-storybook` | Gera build estatico do Storybook. |
|
|
58
|
-
|
|
59
46
|
## Validacao de Page Actions
|
|
60
47
|
|
|
61
48
|
O pacote publica o CLI `shared-ui-check-page-actions` para validar o contrato de actions em uma aplicacao.
|
|
@@ -159,25 +146,8 @@ Telas podem limitar o contrato localmente:
|
|
|
159
146
|
|
|
160
147
|
Acoes auxiliares podem ser passadas por `helpContent`, `metaActions` ou por componentes
|
|
161
148
|
marcados como meta. Em barras verticais, o grupo meta e renderizado em modo compacto
|
|
162
|
-
para preservar
|
|
163
|
-
para acessibilidade e tooltip.
|
|
164
|
-
|
|
165
|
-
## Storybook
|
|
166
|
-
|
|
167
|
-
O Storybook esta na linha `10.4.6` (`storybook`, `@storybook/react-vite`, `@storybook/addon-docs` e `@storybook/addon-a11y`).
|
|
168
|
-
|
|
169
|
-
Use o Storybook para validar estados visuais antes de publicar mudancas no pacote:
|
|
170
|
-
|
|
171
|
-
```bash
|
|
172
|
-
npm run storybook
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
Antes de publicar ou consumir localmente uma alteracao visual, gere tambem a build estatica:
|
|
176
|
-
|
|
177
|
-
```bash
|
|
178
|
-
npm run build-storybook
|
|
179
|
-
npm run check:storybook-static
|
|
180
|
-
```
|
|
149
|
+
e alinhado na borda externa da barra para preservar leitura visual; as labels continuam
|
|
150
|
+
obrigatorias no contrato e sao usadas para acessibilidade e tooltip.
|
|
181
151
|
|
|
182
152
|
## Exportacoes
|
|
183
153
|
|
|
@@ -216,7 +186,7 @@ Componentes disponiveis na API publica:
|
|
|
216
186
|
| Layout | `AppShell`, `Page`, `Sidebar`, `Card`, `StatCard` |
|
|
217
187
|
| Acoes | `Button`, `ActionPrimitives`, `AppShellActions`, `ConfirmationDialog` |
|
|
218
188
|
| Feedback | `Badge`, `EmptyState`, `PageMessage`, `Tooltip`, `CopyableField` |
|
|
219
|
-
| Formularios | `FieldControl`, `FieldGroup`, `TextField`, `TextareaField`, `SelectField`, `DateField`, `DecimalField`, `MultiSelectField`, `PasswordInput`, `Switch`, `RadioGroup` |
|
|
189
|
+
| Formularios | `FieldControl`, `FieldGroup`, `TextField`, `TextareaField`, `SelectField`, `SelectionField`, `DateField`, `DecimalField`, `MultiSelectField`, `PasswordInput`, `Switch`, `RadioGroup` |
|
|
220
190
|
| Consulta | `Filter`, `Workspace` |
|
|
221
191
|
| Dados | `Table`, `Pagination`, `TabsUnderlined` |
|
|
222
192
|
| Controle de renderizacao | `RenderIf`, `RenderCase` |
|
|
@@ -269,6 +239,42 @@ Pontos de validacao:
|
|
|
269
239
|
- Use `showColorSelector={false}` ou `showAppearanceSelector={false}` quando o consumidor precisar exibir apenas uma parte do controle.
|
|
270
240
|
- A story `AppearanceStates` mostra as tres aparencias ja selecionadas para validacao visual rapida.
|
|
271
241
|
|
|
242
|
+
## SelectionField
|
|
243
|
+
|
|
244
|
+
`SelectionField` padroniza campos de selecao que exibem um registro, abrem uma busca externa e permitem limpar o valor selecionado. O componente nao gerencia modal nem estado interno do registro; o consumidor controla `value`, `onClick` e `onClear`.
|
|
245
|
+
|
|
246
|
+
Contrato minimo:
|
|
247
|
+
|
|
248
|
+
```tsx
|
|
249
|
+
import { SelectionField, type SelectionDisplayValue } from '@wellingtonhlc/shared-ui';
|
|
250
|
+
import { UserCheck } from 'lucide-react';
|
|
251
|
+
|
|
252
|
+
const value: SelectionDisplayValue = {
|
|
253
|
+
title: 'Registro selecionado',
|
|
254
|
+
subtitle: 'Descricao complementar',
|
|
255
|
+
meta: 'COD-1024',
|
|
256
|
+
};
|
|
257
|
+
|
|
258
|
+
<SelectionField
|
|
259
|
+
label="Registro"
|
|
260
|
+
value={value}
|
|
261
|
+
icon={<UserCheck />}
|
|
262
|
+
clearable
|
|
263
|
+
size="sm"
|
|
264
|
+
selectTooltip="Selecionar registro"
|
|
265
|
+
clearTooltip="Limpar registro"
|
|
266
|
+
onClick={openSearch}
|
|
267
|
+
onClear={clearSelection}
|
|
268
|
+
/>;
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
Pontos de validacao:
|
|
272
|
+
|
|
273
|
+
- `size` segue a mesma escala visual dos campos base (`xs`, `sm`, `md`, `lg`).
|
|
274
|
+
- Use `triggerSlot` quando o consumidor precisar injetar um botao proprio para abrir a selecao.
|
|
275
|
+
- `clearable` exibe a acao de limpar somente quando ha `value` e `onClear`.
|
|
276
|
+
- `shortcutHint` pode exibir atalhos de teclado, como `F1`.
|
|
277
|
+
|
|
272
278
|
## Filter
|
|
273
279
|
|
|
274
280
|
`Filter.Root` organiza filtros compactos, ocupando apenas o espaço necessário. Quando houver muitos filtros, somente o corpo do painel rola e as ações continuam visíveis.
|
|
@@ -313,79 +319,3 @@ Exports removidos:
|
|
|
313
319
|
- `SearchFilter`: use `Filter`.
|
|
314
320
|
- `SearchWorkspace`: componha layout no consumidor ou com componentes genéricos.
|
|
315
321
|
- `TabsUnderline` e `UnderlinedTabs`: use `TabsUnderlined`.
|
|
316
|
-
|
|
317
|
-
## Versionamento
|
|
318
|
-
|
|
319
|
-
Este pacote segue SemVer, mesmo antes da v1:
|
|
320
|
-
|
|
321
|
-
- `patch`: correcoes internas sem alteracao de contrato.
|
|
322
|
-
- `minor`: novos componentes, novas props opcionais ou novas variantes compativeis.
|
|
323
|
-
- `major` ou `minor` com destaque pre-v1: remocao/renomeacao de API publica ou mudanca que exige migracao nos consumidores.
|
|
324
|
-
|
|
325
|
-
Tabela de historico:
|
|
326
|
-
|
|
327
|
-
| Versao | Data | Tipo | Resumo | Validacao |
|
|
328
|
-
|--------|------|------|--------|-----------|
|
|
329
|
-
| `0.24.20` | 2026-06-20 | Patch | Mantem acoes meta em modo compacto quando `Page.Actions` esta na vertical, preservando label para acessibilidade e tooltip. | `npm run check`. |
|
|
330
|
-
| `0.24.11` | 2026-06-20 | Patch | Mantem o botao de ajuda antes das acoes da pagina para evitar que fique oculto em barras horizontais com overflow. | `npm run check`. |
|
|
331
|
-
| `0.24.10` | 2026-06-20 | Patch | Documenta o uso de `Page.ActionsProvider`, preferencias de posicao, slots e consumo pos-publicacao com `@latest`. | `npm run check`. |
|
|
332
|
-
| `0.24.9` | 2026-06-20 | Patch | Estabiliza o pacote publicado de `Page.Actions` movel para consumo em aplicacoes React. | `npm run typecheck`; `npm run build`; builds de consumidores. |
|
|
333
|
-
| `0.24.8` | 2026-06-20 | Patch | Corrige a renderizacao de `Page.Actions` em slots clonando o componente com marcador interno de slot. | `npm run typecheck`; `npm run test`; `npm run build`. |
|
|
334
|
-
| `0.24.7` | 2026-06-20 | Minor pre-v1 | Adiciona `Page.ActionsProvider`, `Page.ActionsSlot`, posicoes `left/top/right/bottom`, ajuda contextual e movimentacao de acoes por preferencia do consumidor. | `npm run check`. |
|
|
335
|
-
| `0.24.3` | 2026-06-18 | Patch | Amplia testes de contrato para exports publicos, adiciona gate axe e smoke do Storybook estatico ao `check`. | `npm run test`; `npm run check`. |
|
|
336
|
-
| `0.24.2` | 2026-06-18 | Patch | Alinha metadados e documentacao do pacote npm publico, mantendo o contrato generico e sem regra de negocio. | `npm run build`; `npm run build-storybook`; `npm pack --dry-run`. |
|
|
337
|
-
| `0.24.0` | 2026-06-17 | Minor pre-v1 | Adiciona `Workspace` e corrige a composicao de `Filter` para consultas com painel de filtros e area de resultados. | `npm run build`; build de consumidor. |
|
|
338
|
-
| `0.21.0` | 2026-06-17 | Minor pre-v1 | Adiciona stories para `Modal`, `Card`, `PageMessage`, `EmptyState`, `StatCard`, `SelectField`, `TextareaField`, `DateField`, `DecimalField`, `RadioGroup`, `MultiSelectField`, `TabsUnderlined`, `Tooltip`, `CopyableField`, `FieldGroup`, `FieldSkeleton`, `FieldValidationError`, `NavCard`, `Sidebar` e `AppShell`. | `npm run build`; `npm run build-storybook`. |
|
|
339
|
-
| `0.1.17` | 2026-06-16 | Minor pre-v1 | Remove a variante ambigua `default` de `Button`; adiciona variants semanticas `information` e `warning`; `ConfirmationDialog` usa `information`, `question`, `warning` e `destructive` com botao principal na cor da variant; Storybook passou a gerar tokens semanticos de tema. | `npm run build`; `npm run build-storybook`; builds de consumidores. |
|
|
340
|
-
| `0.1.16` | 2026-06-16 | Patch | Consolida ajustes visuais recentes do pacote para consumo em aplicacoes React. | `npm run build`; `npm run build-storybook`; validacao em consumidor. |
|
|
341
|
-
| `0.1.15` | 2026-06-16 | Patch | Corrige a hierarquia de z-index de `Modal` e `ConfirmationDialog` para o overlay cobrir sidebar e flyouts. | `npm run build`; `npm run build-storybook`. |
|
|
342
|
-
| `0.1.14` | 2026-06-16 | Minor pre-v1 | Adiciona `icon` e `iconPosition` ao `TextField` e ajusta o offset lateral dos icones internos. | `npm run build`; `npm run build-storybook`. |
|
|
343
|
-
| `0.1.13` | 2026-06-16 | Minor pre-v1 | Refina o visual do `Pagination`, remove botoes circulares e adiciona `size="sm" | "md" | "lg"`. | `npm run build`; `npm run build-storybook`. |
|
|
344
|
-
| `0.1.12` | 2026-06-16 | Minor pre-v1 | Adiciona variantes explicitas ao `TextField` e corrige alinhamento de icones internos com `startAdornment` e `endAdornment`. | `npm run build`; `npm run build-storybook`. |
|
|
345
|
-
| `0.1.11` | 2026-06-16 | Patch | Reequilibra variantes de `Button`, separando `default` de `primary` e usando cores explicitas para estados de marca e semanticos. | `npm run build`; `npm run build-storybook`. |
|
|
346
|
-
| `0.1.10` | 2026-06-16 | Patch | Reequilibra `Badge` `default`, `primary` e `muted` com estilos distintos e cor de texto explicita para `primary`. | `npm run build`; `npm run build-storybook`. |
|
|
347
|
-
| `0.1.9` | 2026-06-16 | Patch | Garante estilos distintos para `Badge` `default`, `primary` e `muted`, e normaliza alias legado `active` para `success`. | `npm run build`; `npm run build-storybook`. |
|
|
348
|
-
| `0.1.8` | 2026-06-16 | Minor pre-v1 | Adiciona `Switch display="inline"` para linhas compactas com label integrado e alinhamento previsivel. | `npm run build`; `npm run build-storybook`; build de consumidor. |
|
|
349
|
-
| `0.1.7` | 2026-06-16 | Minor pre-v1 | Adiciona props de customizacao dos botoes de aparencia em `ThemePreferencesSelector`. | `npm run build`; build de consumidor. |
|
|
350
|
-
| `0.1.6` | 2026-06-16 | Patch | Forca o destaque da aparencia selecionada por CSS explicito em `[aria-pressed='true']`. | `npm run build`; `npm run build-storybook`; build de consumidor. |
|
|
351
|
-
| `0.1.5` | 2026-06-16 | Patch | Aplica o destaque da aparencia selecionada por estilo inline para evitar perda por ordem/geracao de CSS nos consumidores. | `npm run build`; `npm run build-storybook`; build de consumidor. |
|
|
352
|
-
| `0.1.4` | 2026-06-16 | Patch | Usa estado `data-selected` no `ThemePreferencesSelector` para manter o destaque da aparencia selecionada nos consumidores. | `npm run build`; `npm run build-storybook`. |
|
|
353
|
-
| `0.1.3` | 2026-06-16 | Patch | Atualiza Storybook para `10.4.6`, documenta `ThemePreferencesSelector` e reforca o destaque visual da aparencia selecionada. | `npm run build`; `npm run build-storybook`. |
|
|
354
|
-
| `0.1.0` | 2026-06-15 | Breaking pre-v1 | Define `Filter.Root`/`Filter.Footer` como contrato final de filtros e remove aliases públicos provisórios. | `npm run build`; builds de consumidores. |
|
|
355
|
-
| `0.0.7` | 2026-06-14 | Breaking pre-v1 | Publica API composicional `SearchWorkspace.Root` e `SearchFilter.Root`/`SearchFilter.Footer` para consultas com filtros compactos. | Pendente antes da publicacao. |
|
|
356
|
-
| `0.0.5` | 2026-06-14 | Minor pre-v1 | Adiciona `Table.Root isFramed`, `fill`, `viewportClassName` e `wrapperProps` para controlar frame e ocupacao de espaco sem classes ad-hoc. | `npm run build`. |
|
|
357
|
-
| `0.0.4` | 2026-06-14 | Minor pre-v1 | Adiciona `Table.Row isInteractive` para controlar cursor de linhas interativas, com padrao `true`. | `npm run build`. |
|
|
358
|
-
| `0.0.3` | 2026-06-14 | Breaking pre-v1 | Define API final de `Card` por slots explicitos; remove `<Card>` chamavel, `Card.Content` e `CardContentProps`. | `npm run build`; builds de consumidores. |
|
|
359
|
-
| `0.0.2` | 2026-06-14 | Minor pre-v1 | Publica pacote no npm publico com novos slots de `Card` ainda retrocompativeis. | `npm run build`. |
|
|
360
|
-
| `0.0.0` | 2026-06-14 | Inicial | Publicacao inicial do pacote `@wellingtonhlc/shared-ui`. | Build do pacote. |
|
|
361
|
-
|
|
362
|
-
## Publicacao
|
|
363
|
-
|
|
364
|
-
Validacao e publicacao npm:
|
|
365
|
-
|
|
366
|
-
```bash
|
|
367
|
-
npm run build
|
|
368
|
-
npm run check
|
|
369
|
-
npm pack --dry-run
|
|
370
|
-
npm publish --access public --registry=https://registry.npmjs.org/
|
|
371
|
-
```
|
|
372
|
-
|
|
373
|
-
Quando o npm exigir OTP:
|
|
374
|
-
|
|
375
|
-
```bash
|
|
376
|
-
npm publish --access public --registry=https://registry.npmjs.org/ --otp CODIGO_OTP
|
|
377
|
-
```
|
|
378
|
-
|
|
379
|
-
Depois de publicar, atualize a aplicacao consumidora:
|
|
380
|
-
|
|
381
|
-
```bash
|
|
382
|
-
npm install @wellingtonhlc/shared-ui@latest
|
|
383
|
-
npm run build
|
|
384
|
-
```
|
|
385
|
-
|
|
386
|
-
Se o consumidor estiver com dev server Vite em execucao, reinicie com cache limpo:
|
|
387
|
-
|
|
388
|
-
```powershell
|
|
389
|
-
Remove-Item -Recurse -Force node_modules\.vite -ErrorAction SilentlyContinue
|
|
390
|
-
npm run dev -- --force
|
|
391
|
-
```
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Page.d.ts","sourceRoot":"","sources":["../../src/components/Page.tsx"],"names":[],"mappings":"AAAA,OAAO,EAUL,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAEf,OAAO,EAIL,KAAK,0BAA0B,EAC/B,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,6BAA6B,EACnC,MAAM,oBAAoB,CAAC;AAI5B,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,OAAO,CAAC;AACtE,MAAM,MAAM,gBAAgB,GAAG,gBAAgB,CAAC;AAChD,MAAM,MAAM,eAAe,GAAG,eAAe,CAAC;AAE9C,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,mBAAmB,CAAC;IAC/B,eAAe,CAAC,EAAE,mBAAmB,CAAC;IACtC,cAAc,CAAC,EAAE,mBA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AE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,+BAM/D;AAED,iBAAS,WAAW,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,+BAM3E;AAED,iBAAS,MAAM,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,eAAe,+BAexE;AAED,eAAO,MAAM,IAAI;;;;;;;;;;;CAWhB,CAAC"}
|
package/dist/components/Page.js
CHANGED
|
@@ -73,6 +73,12 @@ function resolvePageActionsShowLabels(props, preferences) {
|
|
|
73
73
|
function resolvePageActionsShowLabelsChange(props, preferences) {
|
|
74
74
|
return props.onShowLabelsChange ?? preferences?.onShowLabelsChange;
|
|
75
75
|
}
|
|
76
|
+
function getVerticalMetaAlignment(position) {
|
|
77
|
+
return position === 'left' ? 'items-start' : 'items-end';
|
|
78
|
+
}
|
|
79
|
+
function getVerticalMetaJustification(position) {
|
|
80
|
+
return position === 'left' ? 'justify-start' : 'justify-end';
|
|
81
|
+
}
|
|
76
82
|
function useIsMobile() {
|
|
77
83
|
const [isMobile, setIsMobile] = useState(false);
|
|
78
84
|
useEffect(() => {
|
|
@@ -247,14 +253,16 @@ function Actions({ align = 'start', __fromSlot = false, children, className, def
|
|
|
247
253
|
function handleToggleLabels() {
|
|
248
254
|
effectiveOnShowLabelsChange?.(!effectiveShowLabels);
|
|
249
255
|
}
|
|
250
|
-
const
|
|
256
|
+
const verticalMetaAlignment = getVerticalMetaAlignment(effectivePosition);
|
|
257
|
+
const verticalMetaJustification = getVerticalMetaJustification(effectivePosition);
|
|
258
|
+
const helpButton = helpVisible ? (_jsx("div", { className: cn('flex shrink-0', isVertical && 'w-full', isVertical && verticalMetaJustification), children: _jsx(Tooltip, { className: cn('max-w-[22rem] px-3 py-2', helpClassName), content: helpContent, delayDuration: 120, openOnClick: true, side: getHelpSide(effectivePosition), children: _jsx(ActionButtonPrimitive, { "aria-label": helpLabel, icon: _jsx(CircleHelpIcon, { "aria-hidden": "true" }), tooltip: helpLabel }) }) })) : null;
|
|
251
259
|
const labelToggleButton = canToggleLabels ? (_jsx(ActionButtonPrimitive, { "aria-pressed": effectiveShowLabels, "aria-label": effectiveShowLabels ? 'Ocultar labels das acoes' : 'Mostrar labels das acoes', icon: effectiveShowLabels ? _jsx(CaptionsOffIcon, { "aria-hidden": "true" }) : _jsx(CaptionsIcon, { "aria-hidden": "true" }), tooltip: effectiveShowLabels ? 'Ocultar labels das acoes' : 'Mostrar labels das acoes', onClick: handleToggleLabels })) : null;
|
|
252
|
-
const moveButton = canMove ? (_jsxs("div", { className: cn('relative flex shrink-0', isVertical && 'w-full
|
|
260
|
+
const moveButton = canMove ? (_jsxs("div", { className: cn('relative flex shrink-0', isVertical && 'w-full', isVertical && verticalMetaJustification), children: [_jsx(ActionButtonPrimitive, { "aria-haspopup": "menu", "aria-label": "Mover barra de acoes", "aria-expanded": isMenuOpen, className: cn('touch-none [&]:cursor-grab [&_*]:cursor-grab active:[&]:cursor-grabbing active:[&_*]:cursor-grabbing', isDragging && '[&]:cursor-grabbing [&_*]:cursor-grabbing'), icon: _jsx(GripVerticalIcon, { "aria-hidden": "true" }), tooltip: "Mover barra de acoes", onClick: handleMoveMenuToggle, onKeyDown: handleMoveKeyDown, onPointerCancel: handleMovePointerCancel, onPointerDown: handleMovePointerDown, onPointerMove: handleMovePointerMove, onPointerUp: handleMovePointerUp }), isMenuOpen ? (_jsx("div", { role: "menu", className: cn('border-app-border bg-surface text-foreground absolute z-40 min-w-36 rounded-md border p-1 text-xs shadow-lg', isVertical && effectivePosition === 'left' && 'left-full top-0 ml-2', isVertical && effectivePosition === 'right' && 'right-full top-0 mr-2', !isVertical && 'right-0 top-full mt-2'), children: effectiveAllowedPositions.map((nextPosition) => (_jsx(PageActionsMoveOption, { active: nextPosition === effectivePosition, label: positionLabels[nextPosition], onSelect: handleSelectPosition, position: nextPosition }, nextPosition))) })) : null] })) : null;
|
|
253
261
|
const actions = (_jsxs("div", { className: cn('flex min-h-0 min-w-0 gap-2', isVertical ? 'h-full w-full flex-col' : 'w-full items-center'), children: [_jsx(PageActionsRenderContext.Provider, { value: { showLabels: effectiveShowLabels }, children: _jsx(ActionGroupPrimitive, { align: align, size: size, className: cn('min-w-0 flex-1', isVertical
|
|
254
262
|
? cn('min-h-0 flex-col content-start [&>[data-action-separator=true]]:h-px [&>[data-action-separator=true]]:min-h-0 [&>[data-action-separator=true]]:w-full [&>[data-action-separator=true]]:self-auto', effectiveShowLabels
|
|
255
263
|
? 'w-full items-stretch [&>button]:w-full [&>button]:justify-start [&>div]:w-full [&>div>button]:w-full [&>div>button]:justify-start'
|
|
256
264
|
: 'w-auto items-center')
|
|
257
|
-
: 'overflow-x-auto overflow-y-hidden', alignClasses[align]), children: mainChildren }) }), _jsx(PageActionsRenderContext.Provider, { value: { showLabels: !isVertical && effectiveShowLabels }, children: _jsxs("div", { className: cn('flex shrink-0 gap-2', isVertical ? 'w-full flex-col
|
|
265
|
+
: 'overflow-x-auto overflow-y-hidden', alignClasses[align]), children: mainChildren }) }), _jsx(PageActionsRenderContext.Provider, { value: { showLabels: !isVertical && effectiveShowLabels }, children: _jsxs("div", { className: cn('flex shrink-0 gap-2', isVertical ? cn('w-full flex-col', verticalMetaAlignment) : 'ml-auto items-center'), children: [helpButton, metaActions, metaChildren, labelToggleButton, moveButton] }) })] }));
|
|
258
266
|
return (_jsxs("div", { className: cn('flex min-w-0', positionClasses[effectivePosition], isVertical ? 'flex-col' : 'items-center', className), children: [actions, isDragging ? _jsx(PageActionsDropZones, { activePosition: dragTarget ?? effectivePosition, allowedPositions: effectiveAllowedPositions }) : null] }));
|
|
259
267
|
}
|
|
260
268
|
function PageActionsDropZones({ activePosition, allowedPositions }) {
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type FormControlSize, type FormControlVariant } from './form-control-helpers';
|
|
3
|
+
export interface SelectionDisplayValue {
|
|
4
|
+
title: string;
|
|
5
|
+
subtitle?: string | null;
|
|
6
|
+
meta?: string | null;
|
|
7
|
+
}
|
|
8
|
+
export type SelectionFieldSize = FormControlSize;
|
|
9
|
+
export type SelectionFieldVariant = FormControlVariant;
|
|
10
|
+
type SelectionTriggerProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
11
|
+
tooltip?: string;
|
|
12
|
+
};
|
|
13
|
+
export interface SelectionFieldProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'children' | 'className' | 'disabled' | 'required' | 'value'> {
|
|
14
|
+
label?: string;
|
|
15
|
+
description?: string;
|
|
16
|
+
value?: SelectionDisplayValue | null;
|
|
17
|
+
placeholder?: string;
|
|
18
|
+
icon?: React.ReactNode;
|
|
19
|
+
emptyIcon?: React.ReactNode;
|
|
20
|
+
triggerSlot?: React.ReactElement<SelectionTriggerProps>;
|
|
21
|
+
clearable?: boolean;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
loading?: boolean;
|
|
24
|
+
required?: boolean;
|
|
25
|
+
errorMessage?: string;
|
|
26
|
+
size?: SelectionFieldSize;
|
|
27
|
+
variant?: SelectionFieldVariant;
|
|
28
|
+
shortcutHint?: string;
|
|
29
|
+
selectTooltip?: string;
|
|
30
|
+
clearTooltip?: string;
|
|
31
|
+
className?: string;
|
|
32
|
+
controlClassName?: string;
|
|
33
|
+
labelClassName?: string;
|
|
34
|
+
labelPosition?: 'top' | 'right' | 'bottom' | 'left';
|
|
35
|
+
onClear?: () => void;
|
|
36
|
+
}
|
|
37
|
+
export declare function SelectionField({ label, description, value, placeholder, icon, emptyIcon, triggerSlot, clearable, disabled, loading, required, errorMessage, size, variant, shortcutHint, selectTooltip, clearTooltip, className, controlClassName, labelClassName, labelPosition, onClear, onClick, title: triggerTitle, type, ...triggerButtonProps }: SelectionFieldProps): React.JSX.Element;
|
|
38
|
+
export {};
|
|
39
|
+
//# sourceMappingURL=SelectionField.d.ts.map
|
|
@@ -0,0 +1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M,CAAC;IACtB,IAAI,CAAC,EAAE,kBAAkB,CAAC;IAC1B,OAAO,CAAC,EAAE,qBAAqB,CAAC;IAChC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IACpD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAuDD,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,WAAW,EACX,KAAK,EACL,WAAqC,EACrC,IAAI,EACJ,SAAS,EACT,WAAW,EACX,SAAiB,EACjB,QAAgB,EAChB,OAAe,EACf,QAAgB,EAChB,YAAY,EACZ,IAAW,EACX,OAAmB,EACnB,YAAY,EACZ,aAA4B,EAC5B,YAA+B,EAC/B,SAAS,EACT,gBAAgB,EAChB,cAAc,EACd,aAAqB,EACrB,OAAO,EACP,OAAO,EACP,KAAK,EAAE,YAAY,EACnB,IAAe,EACf,GAAG,kBAAkB,EACtB,EAAE,mBAAmB,qBAmKrB"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { cn } from '../utils/cn';
|
|
4
|
+
import { controlClasses } from './form-control-helpers';
|
|
5
|
+
import { FieldControl } from './FieldControl';
|
|
6
|
+
import { Search, X } from 'lucide-react';
|
|
7
|
+
const controlSizeClass = {
|
|
8
|
+
xs: '!h-7 !pr-0.5 !py-0 text-xs',
|
|
9
|
+
sm: '!h-9 !pr-1 !py-0 text-sm',
|
|
10
|
+
md: '!h-12 !pr-1.5 !py-0 text-md',
|
|
11
|
+
lg: '!h-14 !pr-2 !py-0 text-base',
|
|
12
|
+
};
|
|
13
|
+
const controlLeadingPaddingClass = {
|
|
14
|
+
xs: '!pl-2',
|
|
15
|
+
sm: '!pl-3',
|
|
16
|
+
md: '!pl-4',
|
|
17
|
+
lg: '!pl-6',
|
|
18
|
+
};
|
|
19
|
+
const controlIconPaddingClass = {
|
|
20
|
+
xs: '!pl-0.5',
|
|
21
|
+
sm: '!pl-1',
|
|
22
|
+
md: '!pl-1.5',
|
|
23
|
+
lg: '!pl-2',
|
|
24
|
+
};
|
|
25
|
+
const controlGapClass = {
|
|
26
|
+
xs: 'gap-0.5',
|
|
27
|
+
sm: 'gap-1',
|
|
28
|
+
md: 'gap-1.5',
|
|
29
|
+
lg: 'gap-2',
|
|
30
|
+
};
|
|
31
|
+
const iconSizeClass = {
|
|
32
|
+
xs: '[&>svg]:size-3.5',
|
|
33
|
+
sm: '[&>svg]:size-4',
|
|
34
|
+
md: '[&>svg]:size-[1.125rem]',
|
|
35
|
+
lg: '[&>svg]:size-5',
|
|
36
|
+
};
|
|
37
|
+
const actionSizeClass = {
|
|
38
|
+
xs: '!size-6 !min-h-6 !min-w-6 !p-0 [&>svg]:size-3.5',
|
|
39
|
+
sm: '!size-7 !min-h-7 !min-w-7 !p-0 [&>svg]:size-4',
|
|
40
|
+
md: '!size-9 !min-h-9 !min-w-9 !p-0 [&>svg]:size-[1.125rem]',
|
|
41
|
+
lg: '!size-10 !min-h-10 !min-w-10 !p-0 [&>svg]:size-5',
|
|
42
|
+
};
|
|
43
|
+
const textGapClass = {
|
|
44
|
+
xs: 'gap-0',
|
|
45
|
+
sm: 'gap-0',
|
|
46
|
+
md: 'gap-1',
|
|
47
|
+
lg: 'gap-1',
|
|
48
|
+
};
|
|
49
|
+
function stopPropagation(event) {
|
|
50
|
+
event.stopPropagation();
|
|
51
|
+
}
|
|
52
|
+
export function SelectionField({ label, description, value, placeholder = 'Selecione um registro', icon, emptyIcon, triggerSlot, clearable = false, disabled = false, loading = false, required = false, errorMessage, size = 'sm', variant = 'default', shortcutHint, selectTooltip = 'Selecionar', clearTooltip = 'Limpar selecao', className, controlClassName, labelClassName, labelPosition = 'top', onClear, onClick, title: triggerTitle, type = 'button', ...triggerButtonProps }) {
|
|
53
|
+
const hasValue = !!value;
|
|
54
|
+
const resolvedIcon = hasValue ? icon : emptyIcon ?? icon;
|
|
55
|
+
const title = value?.title ?? placeholder;
|
|
56
|
+
const subtitle = value?.subtitle;
|
|
57
|
+
const meta = value?.meta;
|
|
58
|
+
const generatedDescriptionId = React.useId().replace(/:/g, '');
|
|
59
|
+
const describedById = description ? `${generatedDescriptionId}-description` : undefined;
|
|
60
|
+
const showClear = clearable && hasValue && !disabled && !loading && !!onClear;
|
|
61
|
+
function handleClear(event) {
|
|
62
|
+
event.stopPropagation();
|
|
63
|
+
onClear?.();
|
|
64
|
+
}
|
|
65
|
+
const triggerClassName = cn('inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-transparent text-foreground-muted transition-colors', 'hover:bg-[color-mix(in_srgb,var(--brand)_10%,transparent)] hover:text-[color-mix(in_srgb,var(--brand)_86%,var(--foreground))]', 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/30 disabled:pointer-events-none disabled:opacity-50', actionSizeClass[size]);
|
|
66
|
+
const selectionTrigger = triggerSlot
|
|
67
|
+
? React.cloneElement(triggerSlot, {
|
|
68
|
+
'aria-label': triggerSlot.props['aria-label'] ?? selectTooltip,
|
|
69
|
+
className: cn(triggerClassName, triggerSlot.props.className),
|
|
70
|
+
disabled: disabled || loading || triggerSlot.props.disabled,
|
|
71
|
+
title: triggerSlot.props.title ?? triggerSlot.props.tooltip ?? selectTooltip,
|
|
72
|
+
type: triggerSlot.props.type ?? 'button',
|
|
73
|
+
onClick: triggerSlot.props.onClick,
|
|
74
|
+
})
|
|
75
|
+
: (_jsx("button", { ...triggerButtonProps, type: type, "aria-label": triggerButtonProps['aria-label'] ?? selectTooltip, className: triggerClassName, disabled: disabled || loading, title: triggerTitle ?? selectTooltip, onClick: onClick, children: _jsx(Search, { "aria-hidden": "true" }) }));
|
|
76
|
+
return (_jsx(FieldControl, { label: label, labelClassName: labelClassName, labelPosition: labelPosition, wrapperClassName: className, errorMessage: errorMessage, hasValidation: !!description, size: size, disabled: disabled || loading, children: ({ controlId, describedBy, errorMessage: controlError }) => {
|
|
77
|
+
const ariaDescribedBy = cn(describedBy, describedById);
|
|
78
|
+
return (_jsxs("div", { children: [_jsxs("div", { id: controlId, "aria-describedby": ariaDescribedBy || undefined, "aria-disabled": disabled || loading || undefined, "aria-invalid": !!controlError || undefined, className: controlClasses({
|
|
79
|
+
errorMessage: controlError,
|
|
80
|
+
disabled: disabled || loading,
|
|
81
|
+
variant,
|
|
82
|
+
extra: cn('group flex items-center overflow-hidden', !hasValue && 'border-dashed bg-[color-mix(in_srgb,var(--brand)_5%,var(--surface))]', hasValue && 'bg-surface', disabled || loading ? 'cursor-not-allowed' : 'cursor-default', size === 'lg' ? 'rounded-lg' : 'rounded-md', controlSizeClass[size], controlGapClass[size], resolvedIcon ? controlIconPaddingClass[size] : controlLeadingPaddingClass[size], controlClassName),
|
|
83
|
+
}), "data-empty": !hasValue || undefined, "data-loading": loading || undefined, children: [resolvedIcon ? (_jsx("span", { className: cn('inline-flex shrink-0 items-center justify-center rounded-md text-foreground-muted', !hasValue && 'text-[color-mix(in_srgb,var(--brand)_72%,var(--foreground-muted))]', actionSizeClass[size], iconSizeClass[size]), "aria-hidden": "true", children: resolvedIcon })) : null, _jsxs("div", { className: cn('min-w-0 flex-1 text-left', textGapClass[size]), children: [_jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [_jsxs("span", { className: cn('min-w-0 truncate font-semibold', hasValue ? 'text-foreground' : 'text-foreground-muted'), children: [title, required && !hasValue ? _jsx("span", { "aria-hidden": "true", children: " *" }) : null] }), meta ? (_jsx("span", { className: "border-app-border bg-background text-foreground-muted shrink-0 rounded border px-1.5 py-0.5 font-mono text-[0.65rem] leading-none", children: meta })) : null] }), subtitle ? (_jsx("p", { className: cn('text-foreground-muted truncate text-xs font-medium', (size === 'xs' || size === 'sm') && 'sr-only'), children: subtitle })) : null] }), shortcutHint ? (_jsx("kbd", { className: "border-app-border bg-background text-foreground-muted hidden shrink-0 rounded border px-1.5 py-1 font-mono text-[0.65rem] leading-none sm:inline-flex", children: shortcutHint })) : null, showClear ? (_jsx("button", { type: "button", "aria-label": clearTooltip, className: cn('inline-flex cursor-pointer shrink-0 items-center justify-center rounded-md border border-transparent bg-transparent text-foreground-muted transition-colors', 'hover:bg-[color-mix(in_srgb,var(--destructive)_10%,transparent)] hover:text-[var(--destructive)]', 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--destructive)]/25', actionSizeClass[size]), title: clearTooltip, onClick: handleClear, children: _jsx(X, { "aria-hidden": "true" }) })) : null, _jsx("span", { onClick: stopPropagation, children: selectionTrigger })] }), description ? (_jsx("p", { id: describedById, className: "mt-1 text-xs font-medium text-foreground-muted", children: description })) : null] }));
|
|
84
|
+
} }));
|
|
85
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export { RenderCase, type RenderCaseChildProps, type RenderCaseRootProps } from
|
|
|
18
18
|
export { RenderIf, type RenderIfProps } from './components/RenderIf';
|
|
19
19
|
export { SelectField, type SelectFieldProps, type ValidValues } from './components/SelectField';
|
|
20
20
|
export { SearchField, type SearchFieldProps } from './components/SearchField';
|
|
21
|
+
export { SelectionField, type SelectionDisplayValue, type SelectionFieldProps, type SelectionFieldSize, type SelectionFieldVariant, } from './components/SelectionField';
|
|
21
22
|
export { Switch, type SwitchProps } from './components/Switch';
|
|
22
23
|
export { TextareaField, type TextareaFieldProps } from './components/TextareaField';
|
|
23
24
|
export { DateField, type DateFieldProps } from './components/DateField';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO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,EACJ,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,SAAS,EACd,KAAK,gBAAgB,EACrB,KAAK,WAAW,GACjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,KAAK,YAAY,EAAE,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC9G,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -18,6 +18,7 @@ export { RenderCase } from './components/RenderCase';
|
|
|
18
18
|
export { RenderIf } from './components/RenderIf';
|
|
19
19
|
export { SelectField } from './components/SelectField';
|
|
20
20
|
export { SearchField } from './components/SearchField';
|
|
21
|
+
export { SelectionField, } from './components/SelectionField';
|
|
21
22
|
export { Switch } from './components/Switch';
|
|
22
23
|
export { TextareaField } from './components/TextareaField';
|
|
23
24
|
export { DateField } from './components/DateField';
|
package/dist/styles.css
CHANGED
|
@@ -607,6 +607,7 @@ h2.react-datepicker__current-month {
|
|
|
607
607
|
--container-sm: 24rem;
|
|
608
608
|
--container-md: 28rem;
|
|
609
609
|
--container-lg: 32rem;
|
|
610
|
+
--container-xl: 36rem;
|
|
610
611
|
--text-xs: 0.75rem;
|
|
611
612
|
--text-xs--line-height: calc(1 / 0.75);
|
|
612
613
|
--text-sm: 0.875rem;
|
|
@@ -1005,6 +1006,9 @@ h2.react-datepicker__current-month {
|
|
|
1005
1006
|
.mt-px {
|
|
1006
1007
|
margin-top: 1px;
|
|
1007
1008
|
}
|
|
1009
|
+
.mr-2 {
|
|
1010
|
+
margin-right: calc(var(--spacing) * 2);
|
|
1011
|
+
}
|
|
1008
1012
|
.mr-auto {
|
|
1009
1013
|
margin-right: auto;
|
|
1010
1014
|
}
|
|
@@ -1065,6 +1069,22 @@ h2.react-datepicker__current-month {
|
|
|
1065
1069
|
.table {
|
|
1066
1070
|
display: table;
|
|
1067
1071
|
}
|
|
1072
|
+
.\!size-6 {
|
|
1073
|
+
width: calc(var(--spacing) * 6) !important;
|
|
1074
|
+
height: calc(var(--spacing) * 6) !important;
|
|
1075
|
+
}
|
|
1076
|
+
.\!size-7 {
|
|
1077
|
+
width: calc(var(--spacing) * 7) !important;
|
|
1078
|
+
height: calc(var(--spacing) * 7) !important;
|
|
1079
|
+
}
|
|
1080
|
+
.\!size-9 {
|
|
1081
|
+
width: calc(var(--spacing) * 9) !important;
|
|
1082
|
+
height: calc(var(--spacing) * 9) !important;
|
|
1083
|
+
}
|
|
1084
|
+
.\!size-10 {
|
|
1085
|
+
width: calc(var(--spacing) * 10) !important;
|
|
1086
|
+
height: calc(var(--spacing) * 10) !important;
|
|
1087
|
+
}
|
|
1068
1088
|
.size-3 {
|
|
1069
1089
|
width: calc(var(--spacing) * 3);
|
|
1070
1090
|
height: calc(var(--spacing) * 3);
|
|
@@ -1105,6 +1125,18 @@ h2.react-datepicker__current-month {
|
|
|
1105
1125
|
width: calc(var(--spacing) * 14);
|
|
1106
1126
|
height: calc(var(--spacing) * 14);
|
|
1107
1127
|
}
|
|
1128
|
+
.\!h-7 {
|
|
1129
|
+
height: calc(var(--spacing) * 7) !important;
|
|
1130
|
+
}
|
|
1131
|
+
.\!h-9 {
|
|
1132
|
+
height: calc(var(--spacing) * 9) !important;
|
|
1133
|
+
}
|
|
1134
|
+
.\!h-12 {
|
|
1135
|
+
height: calc(var(--spacing) * 12) !important;
|
|
1136
|
+
}
|
|
1137
|
+
.\!h-14 {
|
|
1138
|
+
height: calc(var(--spacing) * 14) !important;
|
|
1139
|
+
}
|
|
1108
1140
|
.h-1\.5 {
|
|
1109
1141
|
height: calc(var(--spacing) * 1.5);
|
|
1110
1142
|
}
|
|
@@ -1198,6 +1230,18 @@ h2.react-datepicker__current-month {
|
|
|
1198
1230
|
.max-h-\[calc\(100vh-12rem\)\] {
|
|
1199
1231
|
max-height: calc(100vh - 12rem);
|
|
1200
1232
|
}
|
|
1233
|
+
.\!min-h-6 {
|
|
1234
|
+
min-height: calc(var(--spacing) * 6) !important;
|
|
1235
|
+
}
|
|
1236
|
+
.\!min-h-7 {
|
|
1237
|
+
min-height: calc(var(--spacing) * 7) !important;
|
|
1238
|
+
}
|
|
1239
|
+
.\!min-h-9 {
|
|
1240
|
+
min-height: calc(var(--spacing) * 9) !important;
|
|
1241
|
+
}
|
|
1242
|
+
.\!min-h-10 {
|
|
1243
|
+
min-height: calc(var(--spacing) * 10) !important;
|
|
1244
|
+
}
|
|
1201
1245
|
.min-h-0 {
|
|
1202
1246
|
min-height: calc(var(--spacing) * 0);
|
|
1203
1247
|
}
|
|
@@ -1390,9 +1434,24 @@ h2.react-datepicker__current-month {
|
|
|
1390
1434
|
.max-w-sm {
|
|
1391
1435
|
max-width: var(--container-sm);
|
|
1392
1436
|
}
|
|
1437
|
+
.max-w-xl {
|
|
1438
|
+
max-width: var(--container-xl);
|
|
1439
|
+
}
|
|
1393
1440
|
.max-w-xs {
|
|
1394
1441
|
max-width: var(--container-xs);
|
|
1395
1442
|
}
|
|
1443
|
+
.\!min-w-6 {
|
|
1444
|
+
min-width: calc(var(--spacing) * 6) !important;
|
|
1445
|
+
}
|
|
1446
|
+
.\!min-w-7 {
|
|
1447
|
+
min-width: calc(var(--spacing) * 7) !important;
|
|
1448
|
+
}
|
|
1449
|
+
.\!min-w-9 {
|
|
1450
|
+
min-width: calc(var(--spacing) * 9) !important;
|
|
1451
|
+
}
|
|
1452
|
+
.\!min-w-10 {
|
|
1453
|
+
min-width: calc(var(--spacing) * 10) !important;
|
|
1454
|
+
}
|
|
1396
1455
|
.min-w-0 {
|
|
1397
1456
|
min-width: calc(var(--spacing) * 0);
|
|
1398
1457
|
}
|
|
@@ -1493,6 +1552,9 @@ h2.react-datepicker__current-month {
|
|
|
1493
1552
|
.animate-pulse {
|
|
1494
1553
|
animation: var(--animate-pulse);
|
|
1495
1554
|
}
|
|
1555
|
+
.cursor-default {
|
|
1556
|
+
cursor: default;
|
|
1557
|
+
}
|
|
1496
1558
|
.cursor-not-allowed {
|
|
1497
1559
|
cursor: not-allowed;
|
|
1498
1560
|
}
|
|
@@ -1819,6 +1881,12 @@ h2.react-datepicker__current-month {
|
|
|
1819
1881
|
.\!bg-transparent {
|
|
1820
1882
|
background-color: transparent !important;
|
|
1821
1883
|
}
|
|
1884
|
+
.bg-\[color-mix\(in_srgb\,var\(--brand\)_5\%\,var\(--surface\)\)\] {
|
|
1885
|
+
background-color: var(--brand);
|
|
1886
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1887
|
+
background-color: color-mix(in srgb,var(--brand) 5%,var(--surface));
|
|
1888
|
+
}
|
|
1889
|
+
}
|
|
1822
1890
|
.bg-\[color-mix\(in_srgb\,var\(--brand\)_10\%\,var\(--surface\)\)\] {
|
|
1823
1891
|
background-color: var(--brand);
|
|
1824
1892
|
@supports (color: color-mix(in lab, red, red)) {
|
|
@@ -1990,6 +2058,9 @@ h2.react-datepicker__current-month {
|
|
|
1990
2058
|
.fill-surface {
|
|
1991
2059
|
fill: var(--color-surface);
|
|
1992
2060
|
}
|
|
2061
|
+
.\!p-0 {
|
|
2062
|
+
padding: calc(var(--spacing) * 0) !important;
|
|
2063
|
+
}
|
|
1993
2064
|
.p-0 {
|
|
1994
2065
|
padding: calc(var(--spacing) * 0);
|
|
1995
2066
|
}
|
|
@@ -2041,6 +2112,9 @@ h2.react-datepicker__current-month {
|
|
|
2041
2112
|
.px-6 {
|
|
2042
2113
|
padding-inline: calc(var(--spacing) * 6);
|
|
2043
2114
|
}
|
|
2115
|
+
.\!py-0 {
|
|
2116
|
+
padding-block: calc(var(--spacing) * 0) !important;
|
|
2117
|
+
}
|
|
2044
2118
|
.py-0 {
|
|
2045
2119
|
padding-block: calc(var(--spacing) * 0);
|
|
2046
2120
|
}
|
|
@@ -2083,6 +2157,18 @@ h2.react-datepicker__current-month {
|
|
|
2083
2157
|
.pt-5 {
|
|
2084
2158
|
padding-top: calc(var(--spacing) * 5);
|
|
2085
2159
|
}
|
|
2160
|
+
.\!pr-0\.5 {
|
|
2161
|
+
padding-right: calc(var(--spacing) * 0.5) !important;
|
|
2162
|
+
}
|
|
2163
|
+
.\!pr-1 {
|
|
2164
|
+
padding-right: calc(var(--spacing) * 1) !important;
|
|
2165
|
+
}
|
|
2166
|
+
.\!pr-1\.5 {
|
|
2167
|
+
padding-right: calc(var(--spacing) * 1.5) !important;
|
|
2168
|
+
}
|
|
2169
|
+
.\!pr-2 {
|
|
2170
|
+
padding-right: calc(var(--spacing) * 2) !important;
|
|
2171
|
+
}
|
|
2086
2172
|
.pr-1 {
|
|
2087
2173
|
padding-right: calc(var(--spacing) * 1);
|
|
2088
2174
|
}
|
|
@@ -2107,6 +2193,27 @@ h2.react-datepicker__current-month {
|
|
|
2107
2193
|
.pb-4 {
|
|
2108
2194
|
padding-bottom: calc(var(--spacing) * 4);
|
|
2109
2195
|
}
|
|
2196
|
+
.\!pl-0\.5 {
|
|
2197
|
+
padding-left: calc(var(--spacing) * 0.5) !important;
|
|
2198
|
+
}
|
|
2199
|
+
.\!pl-1 {
|
|
2200
|
+
padding-left: calc(var(--spacing) * 1) !important;
|
|
2201
|
+
}
|
|
2202
|
+
.\!pl-1\.5 {
|
|
2203
|
+
padding-left: calc(var(--spacing) * 1.5) !important;
|
|
2204
|
+
}
|
|
2205
|
+
.\!pl-2 {
|
|
2206
|
+
padding-left: calc(var(--spacing) * 2) !important;
|
|
2207
|
+
}
|
|
2208
|
+
.\!pl-3 {
|
|
2209
|
+
padding-left: calc(var(--spacing) * 3) !important;
|
|
2210
|
+
}
|
|
2211
|
+
.\!pl-4 {
|
|
2212
|
+
padding-left: calc(var(--spacing) * 4) !important;
|
|
2213
|
+
}
|
|
2214
|
+
.\!pl-6 {
|
|
2215
|
+
padding-left: calc(var(--spacing) * 6) !important;
|
|
2216
|
+
}
|
|
2110
2217
|
.pl-4 {
|
|
2111
2218
|
padding-left: calc(var(--spacing) * 4);
|
|
2112
2219
|
}
|
|
@@ -2174,6 +2281,9 @@ h2.react-datepicker__current-month {
|
|
|
2174
2281
|
font-size: var(--text-xs);
|
|
2175
2282
|
line-height: var(--tw-leading, var(--text-xs--line-height));
|
|
2176
2283
|
}
|
|
2284
|
+
.text-\[0\.65rem\] {
|
|
2285
|
+
font-size: 0.65rem;
|
|
2286
|
+
}
|
|
2177
2287
|
.text-\[0\.625rem\] {
|
|
2178
2288
|
font-size: 0.625rem;
|
|
2179
2289
|
}
|
|
@@ -2296,6 +2406,12 @@ h2.react-datepicker__current-month {
|
|
|
2296
2406
|
color: color-mix(in srgb,var(--brand) 72%,var(--foreground));
|
|
2297
2407
|
}
|
|
2298
2408
|
}
|
|
2409
|
+
.text-\[color-mix\(in_srgb\,var\(--brand\)_72\%\,var\(--foreground-muted\)\)\] {
|
|
2410
|
+
color: var(--brand);
|
|
2411
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
2412
|
+
color: color-mix(in srgb,var(--brand) 72%,var(--foreground-muted));
|
|
2413
|
+
}
|
|
2414
|
+
}
|
|
2299
2415
|
.text-\[color-mix\(in_srgb\,var\(--brand\)_82\%\,var\(--foreground\)\)\] {
|
|
2300
2416
|
color: var(--brand);
|
|
2301
2417
|
@supports (color: color-mix(in lab, red, red)) {
|
|
@@ -2862,6 +2978,16 @@ h2.react-datepicker__current-month {
|
|
|
2862
2978
|
}
|
|
2863
2979
|
}
|
|
2864
2980
|
}
|
|
2981
|
+
.hover\:bg-\[color-mix\(in_srgb\,var\(--destructive\)_10\%\,transparent\)\] {
|
|
2982
|
+
&:hover {
|
|
2983
|
+
@media (hover: hover) {
|
|
2984
|
+
background-color: var(--destructive);
|
|
2985
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
2986
|
+
background-color: color-mix(in srgb,var(--destructive) 10%,transparent);
|
|
2987
|
+
}
|
|
2988
|
+
}
|
|
2989
|
+
}
|
|
2990
|
+
}
|
|
2865
2991
|
.hover\:bg-\[color-mix\(in_srgb\,var\(--destructive\)_12\%\,transparent\)\] {
|
|
2866
2992
|
&:hover {
|
|
2867
2993
|
@media (hover: hover) {
|
|
@@ -3019,6 +3145,13 @@ h2.react-datepicker__current-month {
|
|
|
3019
3145
|
}
|
|
3020
3146
|
}
|
|
3021
3147
|
}
|
|
3148
|
+
.hover\:text-\[var\(--destructive\)\] {
|
|
3149
|
+
&:hover {
|
|
3150
|
+
@media (hover: hover) {
|
|
3151
|
+
color: var(--destructive);
|
|
3152
|
+
}
|
|
3153
|
+
}
|
|
3154
|
+
}
|
|
3022
3155
|
.hover\:text-amber-700 {
|
|
3023
3156
|
&:hover {
|
|
3024
3157
|
@media (hover: hover) {
|
|
@@ -3183,6 +3316,14 @@ h2.react-datepicker__current-month {
|
|
|
3183
3316
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
3184
3317
|
}
|
|
3185
3318
|
}
|
|
3319
|
+
.focus-visible\:ring-\[var\(--destructive\)\]\/25 {
|
|
3320
|
+
&:focus-visible {
|
|
3321
|
+
--tw-ring-color: var(--destructive);
|
|
3322
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
3323
|
+
--tw-ring-color: color-mix(in oklab, var(--destructive) 25%, transparent);
|
|
3324
|
+
}
|
|
3325
|
+
}
|
|
3326
|
+
}
|
|
3186
3327
|
.focus-visible\:ring-brand\/30 {
|
|
3187
3328
|
&:focus-visible {
|
|
3188
3329
|
--tw-ring-color: var(--color-brand);
|
|
@@ -3493,6 +3634,11 @@ h2.react-datepicker__current-month {
|
|
|
3493
3634
|
min-width: 6.75rem;
|
|
3494
3635
|
}
|
|
3495
3636
|
}
|
|
3637
|
+
.sm\:inline-flex {
|
|
3638
|
+
@media (width >= 40rem) {
|
|
3639
|
+
display: inline-flex;
|
|
3640
|
+
}
|
|
3641
|
+
}
|
|
3496
3642
|
.sm\:flex-row {
|
|
3497
3643
|
@media (width >= 40rem) {
|
|
3498
3644
|
flex-direction: row;
|