@wellingtonhlc/shared-ui 0.0.9 → 0.1.2
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 +32 -22
- package/dist/components/ActionPrimitives.d.ts.map +1 -1
- package/dist/components/ActionPrimitives.js +4 -3
- package/dist/components/Filter.d.ts +22 -0
- package/dist/components/Filter.d.ts.map +1 -0
- package/dist/components/Filter.js +18 -0
- package/dist/components/Modal.d.ts +0 -12
- package/dist/components/Modal.d.ts.map +1 -1
- package/dist/components/Modal.js +0 -1
- package/dist/components/NavCard.d.ts +15 -0
- package/dist/components/NavCard.d.ts.map +1 -0
- package/dist/components/NavCard.js +13 -0
- package/dist/components/RadioGroup.d.ts +0 -3
- package/dist/components/RadioGroup.d.ts.map +1 -1
- package/dist/components/RadioGroup.js +0 -1
- package/dist/components/RenderCase.d.ts +6 -12
- package/dist/components/RenderCase.d.ts.map +1 -1
- package/dist/components/RenderCase.js +0 -1
- package/dist/components/RenderIf.d.ts +0 -1
- package/dist/components/RenderIf.d.ts.map +1 -1
- package/dist/components/RenderIf.js +0 -1
- package/dist/components/Switch.d.ts +0 -1
- package/dist/components/Switch.d.ts.map +1 -1
- package/dist/components/Switch.js +0 -1
- package/dist/components/TabsUnderlined.d.ts +0 -2
- package/dist/components/TabsUnderlined.d.ts.map +1 -1
- package/dist/components/TabsUnderlined.js +0 -2
- package/dist/index.d.ts +8 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -8
- package/dist/styles.css +34 -23
- package/dist/utils/cn.d.ts.map +1 -1
- package/dist/utils/cn.js +31 -1
- package/package.json +2 -2
- package/dist/components/FormControl.d.ts +0 -17
- package/dist/components/FormControl.d.ts.map +0 -1
- package/dist/components/FormControl.js +0 -72
- package/dist/components/FormValidationError.d.ts +0 -8
- package/dist/components/FormValidationError.d.ts.map +0 -1
- package/dist/components/FormValidationError.js +0 -7
- package/dist/components/Input.d.ts +0 -19
- package/dist/components/Input.d.ts.map +0 -1
- package/dist/components/Input.js +0 -41
- package/dist/components/QueryWorkspace.d.ts +0 -18
- package/dist/components/QueryWorkspace.d.ts.map +0 -1
- package/dist/components/QueryWorkspace.js +0 -15
- package/dist/components/SearchWorkspace.d.ts +0 -31
- package/dist/components/SearchWorkspace.d.ts.map +0 -1
- package/dist/components/SearchWorkspace.js +0 -26
- package/dist/components/Select.d.ts +0 -24
- package/dist/components/Select.d.ts.map +0 -1
- package/dist/components/Select.js +0 -26
- package/dist/components/Textarea.d.ts +0 -8
- package/dist/components/Textarea.d.ts.map +0 -1
- package/dist/components/Textarea.js +0 -12
package/README.md
CHANGED
|
@@ -86,39 +86,32 @@ Componentes disponiveis na API publica:
|
|
|
86
86
|
|
|
87
87
|
| Grupo | Componentes |
|
|
88
88
|
|-------|-------------|
|
|
89
|
-
| Layout | `AppShell`, `Page`, `Sidebar`, `Card`, `StatCard
|
|
89
|
+
| Layout | `AppShell`, `Page`, `Sidebar`, `Card`, `StatCard` |
|
|
90
90
|
| Acoes | `Button`, `ActionPrimitives`, `AppShellActions`, `ConfirmationDialog` |
|
|
91
91
|
| Feedback | `Badge`, `EmptyState`, `PageMessage`, `Tooltip`, `CopyableField` |
|
|
92
92
|
| Formularios | `FieldControl`, `FieldGroup`, `TextField`, `TextareaField`, `SelectField`, `DateField`, `DecimalField`, `MultiSelectField`, `PasswordInput`, `Switch`, `RadioGroup` |
|
|
93
|
+
| Consulta | `Filter` |
|
|
93
94
|
| Dados | `Table`, `Pagination`, `TabsUnderlined` |
|
|
94
95
|
| Controle de renderizacao | `RenderIf`, `RenderCase` |
|
|
95
96
|
| Tema | `ThemePreferencesSelector` |
|
|
96
97
|
|
|
97
|
-
##
|
|
98
|
+
## Filter
|
|
98
99
|
|
|
99
|
-
`
|
|
100
|
-
|
|
101
|
-
Use `SearchFilter.Root` para manter 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.
|
|
100
|
+
`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.
|
|
102
101
|
|
|
103
102
|
```tsx
|
|
104
|
-
import { Button,
|
|
103
|
+
import { Button, Filter, TextField } from '@wellingtonhlc/shared-ui';
|
|
105
104
|
|
|
106
|
-
export function
|
|
105
|
+
export function CustomersFilters() {
|
|
107
106
|
return (
|
|
108
|
-
<
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
</SearchFilter.Footer>
|
|
117
|
-
</SearchFilter.Root>
|
|
118
|
-
}
|
|
119
|
-
>
|
|
120
|
-
{/* tabela ou lista de resultados */}
|
|
121
|
-
</SearchWorkspace.Root>
|
|
107
|
+
<Filter.Root description="Refine os critérios antes de consultar os resultados.">
|
|
108
|
+
<TextField label="Buscar" size="sm" />
|
|
109
|
+
<Filter.Footer>
|
|
110
|
+
<Button type="submit" size="sm">
|
|
111
|
+
Pesquisar
|
|
112
|
+
</Button>
|
|
113
|
+
</Filter.Footer>
|
|
114
|
+
</Filter.Root>
|
|
122
115
|
);
|
|
123
116
|
}
|
|
124
117
|
```
|
|
@@ -128,9 +121,25 @@ Padrões do painel:
|
|
|
128
121
|
- Usa `h-fit` e `w-fit` por padrão, sem ocupar a altura inteira da tela.
|
|
129
122
|
- Limita a altura com `maxHeightClassName`; o default é `max-h-[calc(100vh-12rem)]`.
|
|
130
123
|
- Aplica rolagem apenas na área de filtros.
|
|
131
|
-
- Use `
|
|
124
|
+
- Use `Filter.Footer` para manter botões sempre visíveis no rodapé do painel.
|
|
132
125
|
- Em telas administrativas, campos internos devem preferir `size="sm"` e não devem usar formato `rounded-full`.
|
|
133
126
|
|
|
127
|
+
## Contrato público 0.1.0
|
|
128
|
+
|
|
129
|
+
A API pública pré-v1 foi limpa para evitar compatibilidade artificial em produção.
|
|
130
|
+
|
|
131
|
+
Exports removidos:
|
|
132
|
+
|
|
133
|
+
- `ActionBar`: use `Page.Actions`, `Page.ActionButton` e `Page.ActionsSeparator`.
|
|
134
|
+
- `Dialog`: use `Modal`.
|
|
135
|
+
- `ChoiceGroup`: use `RadioGroup`.
|
|
136
|
+
- `ConditionalCase`: use `RenderCase`.
|
|
137
|
+
- `ConditionalRender`: use `RenderIf`.
|
|
138
|
+
- `ToggleSwitch`: use `Switch`.
|
|
139
|
+
- `SearchFilter`: use `Filter`.
|
|
140
|
+
- `SearchWorkspace`: componha layout no consumidor ou com componentes genéricos.
|
|
141
|
+
- `TabsUnderline` e `UnderlinedTabs`: use `TabsUnderlined`.
|
|
142
|
+
|
|
134
143
|
## Padroes de implementacao
|
|
135
144
|
|
|
136
145
|
- Exporte sempre o componente e seus tipos publicos em `src/index.ts`.
|
|
@@ -154,6 +163,7 @@ Tabela de historico:
|
|
|
154
163
|
|
|
155
164
|
| Versao | Data | Tipo | Resumo | Validacao |
|
|
156
165
|
|--------|------|------|--------|-----------|
|
|
166
|
+
| `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 `EloDesk.CRM` e `EloDesk.CRM.Portal`. |
|
|
157
167
|
| `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. |
|
|
158
168
|
| `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`. |
|
|
159
169
|
| `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`. |
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionPrimitives.d.ts","sourceRoot":"","sources":["../../src/components/ActionPrimitives.tsx"],"names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BAAqB,0HA6CjC,CAAC;AAIF,eAAO,MAAM,mBAAmB,wHAI/B,CAAC"}
|
|
@@ -17,9 +17,10 @@ export const ActionButtonPrimitive = forwardRef(({ children, className, disabled
|
|
|
17
17
|
const hasText = Boolean(content);
|
|
18
18
|
const isDisabled = disabled || loading;
|
|
19
19
|
return (_jsxs("button", { ref: ref, type: type, "aria-label": tooltip, title: tooltip, disabled: isDisabled, className: cn('inline-flex cursor-pointer select-none items-center justify-center border font-bold transition-[background-color,border-color,color,box-shadow,transform,opacity] duration-150 active:translate-y-px disabled:translate-y-0 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[color-mix(in_srgb,var(--brand)_36%,transparent)] disabled:cursor-not-allowed disabled:opacity-60', variantClasses[variant],
|
|
20
|
-
//
|
|
21
|
-
//
|
|
22
|
-
|
|
20
|
+
// Forma visual consistente: cantos arredondados (rounded-md) com e sem texto.
|
|
21
|
+
// Botoes so-icone (IconButtonPrimitive) ficam quadrados; botoes com texto
|
|
22
|
+
// recebem padding horizontal. A forma vem do pacote, nao do consumidor.
|
|
23
|
+
'rounded-md', hasText ? 'min-h-8 gap-1.5 px-3 text-[0.8125rem]' : 'size-8 p-0', loading && 'cursor-wait opacity-75', className), ...props, children: [icon && _jsx("span", { className: "inline-flex shrink-0 items-center justify-center [&_svg]:size-4", children: icon }), hasText && _jsx("span", { className: "whitespace-nowrap", children: content })] }));
|
|
23
24
|
});
|
|
24
25
|
ActionButtonPrimitive.displayName = 'ActionButtonPrimitive';
|
|
25
26
|
export const IconButtonPrimitive = forwardRef(({ 'aria-label': ariaLabel, tooltip, ...props }, ref) => (_jsx(ActionButtonPrimitive, { ref: ref, "aria-label": ariaLabel, tooltip: tooltip ?? ariaLabel, ...props })));
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export interface FilterRootProps {
|
|
3
|
+
title?: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
bodyClassName?: string;
|
|
8
|
+
contentClassName?: string;
|
|
9
|
+
maxHeightClassName?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface FilterFooterProps {
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
declare function FilterFooter({ children, className }: FilterFooterProps): import("react").JSX.Element;
|
|
16
|
+
declare function FilterRoot({ title, description, children, className, bodyClassName, contentClassName, maxHeightClassName, }: FilterRootProps): import("react").JSX.Element;
|
|
17
|
+
export declare const Filter: {
|
|
18
|
+
Root: typeof FilterRoot;
|
|
19
|
+
Footer: typeof FilterFooter;
|
|
20
|
+
};
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=Filter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Filter.d.ts","sourceRoot":"","sources":["../../src/components/Filter.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAOjE,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,iBAAS,YAAY,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,iBAAiB,+BAE/D;AAED,iBAAS,UAAU,CAAC,EAClB,KAAiB,EACjB,WAAqE,EACrE,QAAQ,EACR,SAAS,EACT,aAAa,EACb,gBAAgB,EAChB,kBAAgD,GACjD,EAAE,eAAe,+BA4BjB;AAED,eAAO,MAAM,MAAM;;;CAGlB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Children, isValidElement } from 'react';
|
|
3
|
+
import { FilterIcon } from 'lucide-react';
|
|
4
|
+
import { cn } from '../utils/cn';
|
|
5
|
+
import { Card } from './Card';
|
|
6
|
+
function FilterFooter({ children, className }) {
|
|
7
|
+
return _jsx("div", { className: cn('border-app-border shrink-0 border-t pt-3', className), children: children });
|
|
8
|
+
}
|
|
9
|
+
function FilterRoot({ title = 'Filtros', description = 'Refine os critérios antes de consultar os resultados.', children, className, bodyClassName, contentClassName, maxHeightClassName = 'max-h-[calc(100vh-12rem)]', }) {
|
|
10
|
+
const childrenArray = Children.toArray(children);
|
|
11
|
+
const footerChildren = childrenArray.filter(child => isValidElement(child) && child.type === FilterFooter);
|
|
12
|
+
const contentChildren = childrenArray.filter(child => !(isValidElement(child) && child.type === FilterFooter));
|
|
13
|
+
return (_jsxs(Card.Root, { className: cn('flex h-fit w-fit min-w-52 flex-col overflow-hidden', maxHeightClassName, className), children: [_jsxs(Card.Title, { children: [_jsx(FilterIcon, { className: "text-primary h-4 w-4" }), title] }), _jsx(Card.Body, { className: cn('min-h-0', bodyClassName), children: _jsxs("div", { className: "flex min-h-0 flex-col gap-3", children: [_jsx("div", { className: cn('min-h-0 overflow-y-auto', contentClassName), children: _jsxs("div", { className: "flex flex-col gap-1", children: [_jsx("p", { className: "text-foreground-muted text-xs leading-5", children: description }), contentChildren] }) }), footerChildren] }) })] }));
|
|
14
|
+
}
|
|
15
|
+
export const Filter = {
|
|
16
|
+
Root: FilterRoot,
|
|
17
|
+
Footer: FilterFooter,
|
|
18
|
+
};
|
|
@@ -44,17 +44,5 @@ export declare const Modal: {
|
|
|
44
44
|
Portal: React.FC<DialogPrimitive.DialogPortalProps>;
|
|
45
45
|
createTrigger: typeof createTrigger;
|
|
46
46
|
};
|
|
47
|
-
export declare const Dialog: {
|
|
48
|
-
Root: typeof ModalRoot;
|
|
49
|
-
Header: typeof ModalHeader;
|
|
50
|
-
Body: typeof ModalBody;
|
|
51
|
-
Footer: typeof ModalFooter;
|
|
52
|
-
Title: typeof ModalTitle;
|
|
53
|
-
Description: typeof ModalDescription;
|
|
54
|
-
Trigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
55
|
-
Close: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
56
|
-
Portal: React.FC<DialogPrimitive.DialogPortalProps>;
|
|
57
|
-
createTrigger: typeof createTrigger;
|
|
58
|
-
};
|
|
59
47
|
export {};
|
|
60
48
|
//# sourceMappingURL=Modal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../src/components/Modal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAK1D,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;AAClE,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,UAAU,CAAC;AAClD,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,SAAS,CAAC;AAEjD,MAAM,WAAW,cAAe,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC;IACvF,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB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AAE,OAAO,CAAC;CACrB;AAgDD,iBAAS,aAAa,CAAC,OAAO,EAAE,KAAK,CAAC,SAAS,EAAE,OAAO,EAAE;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,IAAI,CAAA;CAAE,4UAW9F;AAED,iBAAS,SAAS,CAAC,EACjB,kBAA0B,EAC1B,QAAgB,EAChB,QAAQ,EACR,SAAS,EACT,gBAAgB,EAChB,MAAM,EACN,eAAsB,EACtB,IAAW,EACX,OAAmB,EACnB,GAAG,KAAK,EACT,EAAE,cAAc,qBAoDhB;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,OAAmB,EAAE,SAAiB,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,qBActG;AAED,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,OAAmB,EAAE,eAAuB,EAAE,UAAkB,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,qBAc3H;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,OAAmB,EAAE,SAAgB,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,qBAcrG;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,qBAE9F;AAED,iBAAS,gBAAgB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,WAAW,CAAC,qBAE1G;AAED,eAAO,MAAM,KAAK;;;;;;;;;;;CAWjB,CAAC"}
|
package/dist/components/Modal.js
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type ButtonHTMLAttributes, type ReactNode } from 'react';
|
|
2
|
+
export interface NavCardProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'title'> {
|
|
3
|
+
title: ReactNode;
|
|
4
|
+
description?: ReactNode;
|
|
5
|
+
icon?: ReactNode;
|
|
6
|
+
/** Oculta a seta de navegacao a direita. */
|
|
7
|
+
hideArrow?: boolean;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Card/botao navegavel generico: titulo, descricao e icone opcionais, com seta a
|
|
11
|
+
* direita que desliza no hover/focus. Sem regra de dominio — use para atalhos,
|
|
12
|
+
* itens de listas navegaveis e acessos rapidos.
|
|
13
|
+
*/
|
|
14
|
+
export declare const NavCard: import("react").ForwardRefExoticComponent<NavCardProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
15
|
+
//# sourceMappingURL=NavCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NavCard.d.ts","sourceRoot":"","sources":["../../src/components/NavCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,oBAAoB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAK9E,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC1F,KAAK,EAAE,SAAS,CAAC;IACjB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,4CAA4C;IAC5C,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;;GAIG;AACH,eAAO,MAAM,OAAO,4GAoCnB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { ArrowRightIcon } from 'lucide-react';
|
|
4
|
+
import { cn } from '../utils/cn';
|
|
5
|
+
/**
|
|
6
|
+
* Card/botao navegavel generico: titulo, descricao e icone opcionais, com seta a
|
|
7
|
+
* direita que desliza no hover/focus. Sem regra de dominio — use para atalhos,
|
|
8
|
+
* itens de listas navegaveis e acessos rapidos.
|
|
9
|
+
*/
|
|
10
|
+
export const NavCard = forwardRef(({ className, description, hideArrow = false, icon, title, type = 'button', ...props }, ref) => {
|
|
11
|
+
return (_jsxs("button", { ref: ref, type: type, className: cn('group border-app-border bg-background hover:bg-surface flex w-full cursor-pointer items-center gap-3 rounded-lg border px-3 py-3 text-left transition-colors', 'hover:border-[color-mix(in_srgb,var(--brand)_44%,var(--app-border))] hover:shadow-[0_14px_26px_-20px_color-mix(in_srgb,var(--brand)_45%,#000)]', 'focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[color-mix(in_srgb,var(--brand)_36%,transparent)] focus-visible:outline-none', className), ...props, children: [icon && (_jsx("span", { className: "text-foreground-muted group-hover:text-brand inline-flex shrink-0 items-center justify-center transition-colors [&_svg]:size-5", children: icon })), _jsxs("span", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [_jsx("span", { className: "text-foreground line-clamp-2 text-sm leading-snug font-medium", children: title }), description && (_jsx("span", { className: "text-foreground-muted truncate text-xs", children: description }))] }), !hideArrow && (_jsx(ArrowRightIcon, { "aria-hidden": "true", className: "text-foreground-muted/50 group-hover:text-brand size-4 shrink-0 transition-transform duration-150 group-hover:translate-x-0.5" }))] }));
|
|
12
|
+
});
|
|
13
|
+
NavCard.displayName = 'NavCard';
|
|
@@ -27,8 +27,5 @@ declare function RadioGroupRoot<TFieldValues extends FieldValues = FieldValues>(
|
|
|
27
27
|
export declare const RadioGroup: typeof RadioGroupRoot & {
|
|
28
28
|
Item: typeof Item;
|
|
29
29
|
};
|
|
30
|
-
export declare const ChoiceGroup: typeof RadioGroupRoot & {
|
|
31
|
-
Item: typeof Item;
|
|
32
|
-
};
|
|
33
30
|
export {};
|
|
34
31
|
//# sourceMappingURL=RadioGroup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../../src/components/RadioGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAGL,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MAAM,UAAU;;CAA0C,CAAC"}
|
|
@@ -1,26 +1,20 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export interface
|
|
2
|
+
export interface RenderCaseChildProps {
|
|
3
3
|
when?: boolean;
|
|
4
4
|
children: React.ReactNode;
|
|
5
5
|
}
|
|
6
|
-
export interface
|
|
6
|
+
export interface RenderCaseRootProps {
|
|
7
7
|
children: React.ReactNode;
|
|
8
8
|
}
|
|
9
|
-
declare function Root({ children }:
|
|
10
|
-
declare function If({ children }:
|
|
11
|
-
declare function ElseIf({ children }:
|
|
12
|
-
declare function Else({ children }: Omit<
|
|
9
|
+
declare function Root({ children }: RenderCaseRootProps): React.JSX.Element | null;
|
|
10
|
+
declare function If({ children }: RenderCaseChildProps): React.JSX.Element;
|
|
11
|
+
declare function ElseIf({ children }: RenderCaseChildProps): React.JSX.Element;
|
|
12
|
+
declare function Else({ children }: Omit<RenderCaseChildProps, 'when'>): React.JSX.Element;
|
|
13
13
|
export declare const RenderCase: {
|
|
14
14
|
Root: typeof Root;
|
|
15
15
|
If: typeof If;
|
|
16
16
|
ElseIf: typeof ElseIf;
|
|
17
17
|
Else: typeof Else;
|
|
18
18
|
};
|
|
19
|
-
export declare const ConditionalCase: {
|
|
20
|
-
Root: typeof Root;
|
|
21
|
-
If: typeof If;
|
|
22
|
-
ElseIf: typeof ElseIf;
|
|
23
|
-
Else: typeof Else;
|
|
24
|
-
};
|
|
25
19
|
export {};
|
|
26
20
|
//# sourceMappingURL=RenderCase.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RenderCase.d.ts","sourceRoot":"","sources":["../../src/components/RenderCase.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"RenderCase.d.ts","sourceRoot":"","sources":["../../src/components/RenderCase.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,oBAAoB;IACnC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,iBAAS,IAAI,CAAC,EAAE,QAAQ,EAAE,EAAE,mBAAmB,4BAgB9C;AAED,iBAAS,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE,oBAAoB,qBAE7C;AAED,iBAAS,MAAM,CAAC,EAAE,QAAQ,EAAE,EAAE,oBAAoB,qBAEjD;AAED,iBAAS,IAAI,CAAC,EAAE,QAAQ,EAAE,EAAE,IAAI,CAAC,oBAAoB,EAAE,MAAM,CAAC,qBAE7D;AAED,eAAO,MAAM,UAAU;;;;;CAKtB,CAAC"}
|
|
@@ -7,5 +7,4 @@ export interface RenderIfProps {
|
|
|
7
7
|
as?: React.ElementType;
|
|
8
8
|
}
|
|
9
9
|
export declare function RenderIf({ as: Component, children, className, fallback, when }: RenderIfProps): React.JSX.Element | null;
|
|
10
|
-
export declare const ConditionalRender: typeof RenderIf;
|
|
11
10
|
//# sourceMappingURL=RenderIf.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RenderIf.d.ts","sourceRoot":"","sources":["../../src/components/RenderIf.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;CACxB;AAED,wBAAgB,QAAQ,CAAC,EAAE,EAAE,EAAE,SAAiB,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAe,EAAE,IAAI,EAAE,EAAE,aAAa,4BAO5G
|
|
1
|
+
{"version":3,"file":"RenderIf.d.ts","sourceRoot":"","sources":["../../src/components/RenderIf.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;CACxB;AAED,wBAAgB,QAAQ,CAAC,EAAE,EAAE,EAAE,SAAiB,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAe,EAAE,IAAI,EAAE,EAAE,aAAa,4BAO5G"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../src/components/Switch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAGL,KAAK,WAAW,EAGjB,MAAM,iBAAiB,CAAC;AAKzB,MAAM,WAAW,WAAW,CAAC,YAAY,SAAS,WAAW,GAAG,WAAW,CACzE,SAAQ,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,UAAU,CAAC;IACvE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IACpD,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACjC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AA0HD,wBAAgB,MAAM,CAAC,YAAY,SAAS,WAAW,GAAG,WAAW,EAAE,KAAK,EAAE,WAAW,CAAC,YAAY,CAAC,qBAMtG;yBANe,MAAM
|
|
1
|
+
{"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../src/components/Switch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAGL,KAAK,WAAW,EAGjB,MAAM,iBAAiB,CAAC;AAKzB,MAAM,WAAW,WAAW,CAAC,YAAY,SAAS,WAAW,GAAG,WAAW,CACzE,SAAQ,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,UAAU,CAAC;IACvE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IACpD,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACjC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AA0HD,wBAAgB,MAAM,CAAC,YAAY,SAAS,WAAW,GAAG,WAAW,EAAE,KAAK,EAAE,WAAW,CAAC,YAAY,CAAC,qBAMtG;yBANe,MAAM"}
|
|
@@ -16,6 +16,4 @@ export interface TabsUnderlinedProps {
|
|
|
16
16
|
contentClassName?: string;
|
|
17
17
|
}
|
|
18
18
|
export declare function TabsUnderlined({ className, contentClassName, defaultValue, items, listClassName, onValueChange, triggerClassName, value, }: TabsUnderlinedProps): import("react").JSX.Element;
|
|
19
|
-
export declare const TabsUnderline: typeof TabsUnderlined;
|
|
20
|
-
export declare const UnderlinedTabs: typeof TabsUnderlined;
|
|
21
19
|
//# sourceMappingURL=TabsUnderlined.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabsUnderlined.d.ts","sourceRoot":"","sources":["../../src/components/TabsUnderlined.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAK1D,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,iBAAiB,EAAE,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,wBAAgB,cAAc,CAAC,EAC7B,SAAS,EACT,gBAAgB,EAChB,YAAY,EACZ,KAAK,EACL,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,KAAK,GACN,EAAE,mBAAmB,+BA8BrB
|
|
1
|
+
{"version":3,"file":"TabsUnderlined.d.ts","sourceRoot":"","sources":["../../src/components/TabsUnderlined.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAK1D,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,iBAAiB,EAAE,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,wBAAgB,cAAc,CAAC,EAC7B,SAAS,EACT,gBAAgB,EAChB,YAAY,EACZ,KAAK,EACL,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,KAAK,GACN,EAAE,mBAAmB,+BA8BrB"}
|
|
@@ -16,5 +16,3 @@ export function TabsUnderlined({ className, contentClassName, defaultValue, item
|
|
|
16
16
|
function TabTrigger({ children, className, value }) {
|
|
17
17
|
return (_jsx(Tabs.Trigger, { value: value, className: cn('text-foreground-muted hover:text-foreground focus-visible:ring-brand/50 data-[state=active]:border-app-border data-[state=active]:border-b-surface data-[state=active]:text-foreground -mb-px inline-flex cursor-pointer items-center border border-t-0 border-transparent px-3 py-2 text-sm font-medium transition-colors first:border-l-0 focus:outline-none focus-visible:ring-2', className), children: children }));
|
|
18
18
|
}
|
|
19
|
-
export const TabsUnderline = TabsUnderlined;
|
|
20
|
-
export const UnderlinedTabs = TabsUnderlined;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export { cn } from './utils/cn';
|
|
2
|
-
export { ActionBar, type ActionBarButtonProps, type ActionBarVariant } from './components/ActionBar';
|
|
3
2
|
export { AppShell, type AppShellContentMode, type AppShellMainProps, type AppShellOverlayProps, type AppShellOverlayVariant } from './components/AppShell';
|
|
4
3
|
export { AppShellActionButton, AppShellActions, AppShellActionsSeparator, type AppShellActionButtonProps, type AppShellActionButtonVariant, type AppShellActionsAlign, type AppShellActionsProps, type AppShellActionsRegion, type AppShellActionsSeparatorProps, } from './components/AppShellActions';
|
|
5
4
|
export { Badge, type BadgeProps, type BadgeVariant } from './components/Badge';
|
|
@@ -11,15 +10,15 @@ export { EmptyState, type EmptyStateProps, type EmptyStateVariant } from './comp
|
|
|
11
10
|
export { FieldControl, type FieldControlProps } from './components/FieldControl';
|
|
12
11
|
export { FieldSkeleton, type FieldSkeletonProps } from './components/FieldSkeleton';
|
|
13
12
|
export { FieldValidationError } from './components/FieldValidationError';
|
|
14
|
-
export { Modal,
|
|
13
|
+
export { Modal, type ModalBodyProps, type ModalDensity, type ModalRootProps, type ModalSectionProps, type ModalSize, type ModalVariant } from './components/Modal';
|
|
15
14
|
export { MultiSelectField, type MultiSelectFieldProps, type MultiSelectOption } from './components/MultiSelectField';
|
|
16
15
|
export { TextField, type TextFieldProps } from './components/TextField';
|
|
17
|
-
export { RadioGroup,
|
|
18
|
-
export { RenderCase,
|
|
19
|
-
export { RenderIf,
|
|
16
|
+
export { RadioGroup, type RadioGroupItemProps, type RadioGroupProps } from './components/RadioGroup';
|
|
17
|
+
export { RenderCase, type RenderCaseChildProps, type RenderCaseRootProps } from './components/RenderCase';
|
|
18
|
+
export { RenderIf, type RenderIfProps } from './components/RenderIf';
|
|
20
19
|
export { SelectField, type SelectFieldProps, type ValidValues } from './components/SelectField';
|
|
21
20
|
export { SearchField, type SearchFieldProps } from './components/SearchField';
|
|
22
|
-
export { Switch,
|
|
21
|
+
export { Switch, type SwitchProps } from './components/Switch';
|
|
23
22
|
export { TextareaField, type TextareaFieldProps } from './components/TextareaField';
|
|
24
23
|
export { DateField, type DateFieldProps } from './components/DateField';
|
|
25
24
|
export { DecimalField, type DecimalFieldProps } from './components/DecimalField';
|
|
@@ -27,13 +26,14 @@ export { Pagination, type PaginationProps } from './components/Pagination';
|
|
|
27
26
|
export { Page } from './components/Page';
|
|
28
27
|
export { PageMessage, type PageMessageProps, type PageMessageVariant } from './components/PageMessage';
|
|
29
28
|
export { PasswordInput, type PasswordInputProps } from './components/PasswordInput';
|
|
30
|
-
export {
|
|
29
|
+
export { Filter, type FilterFooterProps, type FilterRootProps } from './components/Filter';
|
|
31
30
|
export { Sidebar, type SidebarRootProps } from './components/Sidebar';
|
|
32
31
|
export { Table } from './components/Table';
|
|
33
|
-
export { TabsUnderlined,
|
|
32
|
+
export { TabsUnderlined, type TabsUnderlinedProps, type UnderlinedTabItem } from './components/TabsUnderlined';
|
|
34
33
|
export { Tooltip, type TooltipProps, type TooltipSide } from './components/Tooltip';
|
|
35
34
|
export { ThemePreferencesSelector, type ThemeAppearance, type ThemeColorOption, type ThemePreferencesSelectorProps, type ThemePreferencesValue, } from './components/ThemePreferencesSelector';
|
|
36
35
|
export * from './components/ActionPrimitives';
|
|
37
36
|
export { Card, type CardActionsProps, type CardBodyProps, type CardDensity, type CardDescriptionProps, type CardHeaderProps, type CardProps, type CardToolbarProps, type CardVariant, } from './components/Card';
|
|
38
37
|
export { StatCard, type StatCardProps, type StatCardSize, type StatCardVariant } from './components/StatCard';
|
|
38
|
+
export { NavCard, type NavCardProps } from './components/NavCard';
|
|
39
39
|
//# sourceMappingURL=index.d.ts.map
|
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,EAAE,EAAE,EAAE,MAAM,YAAY,CAAC;AAChC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAC;AAChC,OAAO,EAAE,QAAQ,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AO,EAAE,KAAK,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,KAAK,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAC/G,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACpF,OAAO,EACL,wBAAwB,EACxB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,6BAA6B,EAClC,KAAK,qBAAqB,GAC3B,MAAM,uCAAuC,CAAC;AAC/C,cAAc,+BAA+B,CAAC;AAC9C,OAAO,EACL,IAAI,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
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export { cn } from './utils/cn';
|
|
2
|
-
export { ActionBar } from './components/ActionBar';
|
|
3
2
|
export { AppShell } from './components/AppShell';
|
|
4
3
|
export { AppShellActionButton, AppShellActions, AppShellActionsSeparator, } from './components/AppShellActions';
|
|
5
4
|
export { Badge } from './components/Badge';
|
|
@@ -11,15 +10,15 @@ export { EmptyState } from './components/EmptyState';
|
|
|
11
10
|
export { FieldControl } from './components/FieldControl';
|
|
12
11
|
export { FieldSkeleton } from './components/FieldSkeleton';
|
|
13
12
|
export { FieldValidationError } from './components/FieldValidationError';
|
|
14
|
-
export { Modal
|
|
13
|
+
export { Modal } from './components/Modal';
|
|
15
14
|
export { MultiSelectField } from './components/MultiSelectField';
|
|
16
15
|
export { TextField } from './components/TextField';
|
|
17
|
-
export { RadioGroup
|
|
18
|
-
export { RenderCase
|
|
19
|
-
export { RenderIf
|
|
16
|
+
export { RadioGroup } from './components/RadioGroup';
|
|
17
|
+
export { RenderCase } from './components/RenderCase';
|
|
18
|
+
export { RenderIf } from './components/RenderIf';
|
|
20
19
|
export { SelectField } from './components/SelectField';
|
|
21
20
|
export { SearchField } from './components/SearchField';
|
|
22
|
-
export { Switch
|
|
21
|
+
export { Switch } from './components/Switch';
|
|
23
22
|
export { TextareaField } from './components/TextareaField';
|
|
24
23
|
export { DateField } from './components/DateField';
|
|
25
24
|
export { DecimalField } from './components/DecimalField';
|
|
@@ -27,12 +26,13 @@ export { Pagination } from './components/Pagination';
|
|
|
27
26
|
export { Page } from './components/Page';
|
|
28
27
|
export { PageMessage } from './components/PageMessage';
|
|
29
28
|
export { PasswordInput } from './components/PasswordInput';
|
|
30
|
-
export {
|
|
29
|
+
export { Filter } from './components/Filter';
|
|
31
30
|
export { Sidebar } from './components/Sidebar';
|
|
32
31
|
export { Table } from './components/Table';
|
|
33
|
-
export { TabsUnderlined
|
|
32
|
+
export { TabsUnderlined } from './components/TabsUnderlined';
|
|
34
33
|
export { Tooltip } from './components/Tooltip';
|
|
35
34
|
export { ThemePreferencesSelector, } from './components/ThemePreferencesSelector';
|
|
36
35
|
export * from './components/ActionPrimitives';
|
|
37
36
|
export { Card, } from './components/Card';
|
|
38
37
|
export { StatCard } from './components/StatCard';
|
|
38
|
+
export { NavCard } from './components/NavCard';
|
package/dist/styles.css
CHANGED
|
@@ -657,6 +657,7 @@ h2.react-datepicker__current-month {
|
|
|
657
657
|
--tracking-tight: -0.025em;
|
|
658
658
|
--tracking-wide: 0.025em;
|
|
659
659
|
--leading-tight: 1.25;
|
|
660
|
+
--leading-snug: 1.375;
|
|
660
661
|
--leading-relaxed: 1.625;
|
|
661
662
|
--radius-md: 0.375rem;
|
|
662
663
|
--radius-lg: 0.5rem;
|
|
@@ -992,6 +993,12 @@ h2.react-datepicker__current-month {
|
|
|
992
993
|
.ml-auto {
|
|
993
994
|
margin-left: auto;
|
|
994
995
|
}
|
|
996
|
+
.line-clamp-2 {
|
|
997
|
+
overflow: hidden;
|
|
998
|
+
display: -webkit-box;
|
|
999
|
+
-webkit-box-orient: vertical;
|
|
1000
|
+
-webkit-line-clamp: 2;
|
|
1001
|
+
}
|
|
995
1002
|
.block {
|
|
996
1003
|
display: block;
|
|
997
1004
|
}
|
|
@@ -1749,9 +1756,6 @@ h2.react-datepicker__current-month {
|
|
|
1749
1756
|
.p-6 {
|
|
1750
1757
|
padding: calc(var(--spacing) * 6);
|
|
1751
1758
|
}
|
|
1752
|
-
.p-8 {
|
|
1753
|
-
padding: calc(var(--spacing) * 8);
|
|
1754
|
-
}
|
|
1755
1759
|
.px-1\.5 {
|
|
1756
1760
|
padding-inline: calc(var(--spacing) * 1.5);
|
|
1757
1761
|
}
|
|
@@ -1845,12 +1849,21 @@ h2.react-datepicker__current-month {
|
|
|
1845
1849
|
.text-center {
|
|
1846
1850
|
text-align: center;
|
|
1847
1851
|
}
|
|
1852
|
+
.text-end {
|
|
1853
|
+
text-align: end;
|
|
1854
|
+
}
|
|
1855
|
+
.text-justify {
|
|
1856
|
+
text-align: justify;
|
|
1857
|
+
}
|
|
1848
1858
|
.text-left {
|
|
1849
1859
|
text-align: left;
|
|
1850
1860
|
}
|
|
1851
1861
|
.text-right {
|
|
1852
1862
|
text-align: right;
|
|
1853
1863
|
}
|
|
1864
|
+
.text-start {
|
|
1865
|
+
text-align: start;
|
|
1866
|
+
}
|
|
1854
1867
|
.align-middle {
|
|
1855
1868
|
vertical-align: middle;
|
|
1856
1869
|
}
|
|
@@ -1925,6 +1938,10 @@ h2.react-datepicker__current-month {
|
|
|
1925
1938
|
--tw-leading: var(--leading-relaxed);
|
|
1926
1939
|
line-height: var(--leading-relaxed);
|
|
1927
1940
|
}
|
|
1941
|
+
.leading-snug {
|
|
1942
|
+
--tw-leading: var(--leading-snug);
|
|
1943
|
+
line-height: var(--leading-snug);
|
|
1944
|
+
}
|
|
1928
1945
|
.leading-tight {
|
|
1929
1946
|
--tw-leading: var(--leading-tight);
|
|
1930
1947
|
line-height: var(--leading-tight);
|
|
@@ -2243,6 +2260,14 @@ h2.react-datepicker__current-month {
|
|
|
2243
2260
|
-webkit-user-select: none;
|
|
2244
2261
|
user-select: none;
|
|
2245
2262
|
}
|
|
2263
|
+
.group-hover\:translate-x-0\.5 {
|
|
2264
|
+
&:is(:where(.group):hover *) {
|
|
2265
|
+
@media (hover: hover) {
|
|
2266
|
+
--tw-translate-x: calc(var(--spacing) * 0.5);
|
|
2267
|
+
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
2268
|
+
}
|
|
2269
|
+
}
|
|
2270
|
+
}
|
|
2246
2271
|
.first\:border-l-0 {
|
|
2247
2272
|
&:first-child {
|
|
2248
2273
|
border-left-style: var(--tw-border-style);
|
|
@@ -2769,26 +2794,6 @@ h2.react-datepicker__current-month {
|
|
|
2769
2794
|
width: calc(var(--spacing) * 72);
|
|
2770
2795
|
}
|
|
2771
2796
|
}
|
|
2772
|
-
.xl\:sticky {
|
|
2773
|
-
@media (width >= 80rem) {
|
|
2774
|
-
position: sticky;
|
|
2775
|
-
}
|
|
2776
|
-
}
|
|
2777
|
-
.xl\:top-0 {
|
|
2778
|
-
@media (width >= 80rem) {
|
|
2779
|
-
top: calc(var(--spacing) * 0);
|
|
2780
|
-
}
|
|
2781
|
-
}
|
|
2782
|
-
.xl\:grid-cols-\[320px_minmax\(0\,1fr\)\] {
|
|
2783
|
-
@media (width >= 80rem) {
|
|
2784
|
-
grid-template-columns: 320px minmax(0,1fr);
|
|
2785
|
-
}
|
|
2786
|
-
}
|
|
2787
|
-
.xl\:self-start {
|
|
2788
|
-
@media (width >= 80rem) {
|
|
2789
|
-
align-self: flex-start;
|
|
2790
|
-
}
|
|
2791
|
-
}
|
|
2792
2797
|
.dark\:border-amber-500\/30 {
|
|
2793
2798
|
@media (prefers-color-scheme: dark) {
|
|
2794
2799
|
border-color: color-mix(in srgb, oklch(76.9% 0.188 70.08) 30%, transparent);
|
|
@@ -3069,6 +3074,12 @@ h2.react-datepicker__current-month {
|
|
|
3069
3074
|
height: calc(var(--spacing) * 4);
|
|
3070
3075
|
}
|
|
3071
3076
|
}
|
|
3077
|
+
.\[\&_svg\]\:size-5 {
|
|
3078
|
+
& svg {
|
|
3079
|
+
width: calc(var(--spacing) * 5);
|
|
3080
|
+
height: calc(var(--spacing) * 5);
|
|
3081
|
+
}
|
|
3082
|
+
}
|
|
3072
3083
|
.\[\&_td\]\:py-2 {
|
|
3073
3084
|
& td {
|
|
3074
3085
|
padding-block: calc(var(--spacing) * 2);
|
package/dist/utils/cn.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cn.d.ts","sourceRoot":"","sources":["../../src/utils/cn.ts"],"names":[],"mappings":"AAAA,wBAAgB,EAAE,CAAC,GAAG,OAAO,EAAE,KAAK,CAAC,MAAM,GAAG,KAAK,GAAG,IAAI,GAAG,SAAS,CAAC,
|
|
1
|
+
{"version":3,"file":"cn.d.ts","sourceRoot":"","sources":["../../src/utils/cn.ts"],"names":[],"mappings":"AAAA,wBAAgB,EAAE,CAAC,GAAG,OAAO,EAAE,KAAK,CAAC,MAAM,GAAG,KAAK,GAAG,IAAI,GAAG,SAAS,CAAC,UAsBtE"}
|
package/dist/utils/cn.js
CHANGED
|
@@ -1,3 +1,33 @@
|
|
|
1
1
|
export function cn(...classes) {
|
|
2
|
-
|
|
2
|
+
const tokens = classes
|
|
3
|
+
.filter((className) => typeof className === 'string' && className.length > 0)
|
|
4
|
+
.flatMap((className) => className.split(/\s+/))
|
|
5
|
+
.filter(Boolean);
|
|
6
|
+
const resolvedTokens = [];
|
|
7
|
+
for (const token of tokens) {
|
|
8
|
+
const conflictGroup = getConflictGroup(token);
|
|
9
|
+
if (conflictGroup) {
|
|
10
|
+
const index = resolvedTokens.findIndex((item) => getConflictGroup(item) === conflictGroup);
|
|
11
|
+
if (index >= 0) {
|
|
12
|
+
resolvedTokens.splice(index, 1);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
resolvedTokens.push(token);
|
|
16
|
+
}
|
|
17
|
+
return resolvedTokens.join(' ');
|
|
18
|
+
}
|
|
19
|
+
function getConflictGroup(token) {
|
|
20
|
+
const parts = token.split(':');
|
|
21
|
+
const utility = parts[parts.length - 1];
|
|
22
|
+
const variantPrefix = parts.slice(0, -1).join(':');
|
|
23
|
+
const normalizedUtility = utility?.startsWith('!') ? utility.slice(1) : utility;
|
|
24
|
+
if (normalizedUtility === 'text-left' ||
|
|
25
|
+
normalizedUtility === 'text-center' ||
|
|
26
|
+
normalizedUtility === 'text-right' ||
|
|
27
|
+
normalizedUtility === 'text-justify' ||
|
|
28
|
+
normalizedUtility === 'text-start' ||
|
|
29
|
+
normalizedUtility === 'text-end') {
|
|
30
|
+
return `${variantPrefix}:text-align`;
|
|
31
|
+
}
|
|
32
|
+
return null;
|
|
3
33
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wellingtonhlc/shared-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
"scripts": {
|
|
31
|
-
"build": "tsc -p tsconfig.json && node scripts/copy-assets.mjs",
|
|
31
|
+
"build": "node scripts/clean-dist.mjs && tsc -p tsconfig.json && node scripts/copy-assets.mjs",
|
|
32
32
|
"prepack": "npm run build",
|
|
33
33
|
"storybook": "storybook dev -p 6006",
|
|
34
34
|
"build-storybook": "storybook build"
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type FormControlRenderProps, type FormControlSize } from './form-control-helpers';
|
|
3
|
-
export interface FormControlProps {
|
|
4
|
-
label?: string;
|
|
5
|
-
id?: string;
|
|
6
|
-
labelClassName?: string;
|
|
7
|
-
wrapperClassName?: string;
|
|
8
|
-
errorMessage?: string | undefined;
|
|
9
|
-
hasValidation?: boolean;
|
|
10
|
-
roundedFull?: boolean;
|
|
11
|
-
size?: FormControlSize;
|
|
12
|
-
labelPosition?: 'top' | 'right' | 'bottom' | 'left';
|
|
13
|
-
disabled?: boolean;
|
|
14
|
-
children?: React.ReactNode | ((props: FormControlRenderProps) => React.ReactNode);
|
|
15
|
-
}
|
|
16
|
-
export declare const FormControl: React.FC<FormControlProps>;
|
|
17
|
-
//# sourceMappingURL=FormControl.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FormControl.d.ts","sourceRoot":"","sources":["../../src/components/FormControl.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAEL,KAAK,sBAAsB,EAC3B,KAAK,eAAe,EAErB,MAAM,wBAAwB,CAAC;AAGhC,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,aAAa,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IACpD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,KAAK,EAAE,sBAAsB,KAAK,KAAK,CAAC,SAAS,CAAC,CAAC;CACnF;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAmHlD,CAAC"}
|
|
@@ -1,72 +0,0 @@
|
|
|
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 { fieldWrapper, labelBase, } from './form-control-helpers';
|
|
5
|
-
import { FormValidationError } from './FormValidationError';
|
|
6
|
-
export const FormControl = ({ label, id, wrapperClassName, labelClassName = '', labelPosition = 'top', errorMessage, roundedFull = false, size = 'sm', disabled = false, hasValidation = false, children, }) => {
|
|
7
|
-
const generatedId = React.useId().replace(/:/g, '');
|
|
8
|
-
const componentId = id ?? `fc-${generatedId}`;
|
|
9
|
-
const errorId = `${componentId}-error`;
|
|
10
|
-
const describedBy = errorMessage ? errorId : undefined;
|
|
11
|
-
const scopeClass = 'fc-placeholder-scope';
|
|
12
|
-
const roundedClass = roundedFull ? 'fc-rounded-full' : '';
|
|
13
|
-
const isHorizontal = labelPosition === 'left' || labelPosition === 'right';
|
|
14
|
-
const labelSizeClassMap = {
|
|
15
|
-
xs: 'text-[10px] mb-0.5',
|
|
16
|
-
sm: 'text-xs',
|
|
17
|
-
md: 'text-sm',
|
|
18
|
-
lg: 'text-base',
|
|
19
|
-
};
|
|
20
|
-
const mergedLabelClassName = cn(labelBase, 'font-medium transition-colors', isHorizontal && 'mb-0', errorMessage ? 'text-red-600 dark:text-red-400' : 'text-foreground-muted', disabled && 'cursor-not-allowed opacity-70', labelClassName, labelSizeClassMap[size ?? 'sm']);
|
|
21
|
-
let flexDirection = 'flex-col';
|
|
22
|
-
let labelOrder = 0;
|
|
23
|
-
let inputOrder = 1;
|
|
24
|
-
if (labelPosition === 'left') {
|
|
25
|
-
flexDirection = 'flex-row items-center';
|
|
26
|
-
labelOrder = 0;
|
|
27
|
-
inputOrder = 1;
|
|
28
|
-
}
|
|
29
|
-
else if (labelPosition === 'right') {
|
|
30
|
-
flexDirection = 'flex-row items-center';
|
|
31
|
-
labelOrder = 1;
|
|
32
|
-
inputOrder = 0;
|
|
33
|
-
}
|
|
34
|
-
else if (labelPosition === 'bottom') {
|
|
35
|
-
flexDirection = 'flex-col';
|
|
36
|
-
labelOrder = 1;
|
|
37
|
-
inputOrder = 0;
|
|
38
|
-
}
|
|
39
|
-
const renderProps = {
|
|
40
|
-
controlId: componentId,
|
|
41
|
-
errorId,
|
|
42
|
-
describedBy,
|
|
43
|
-
errorMessage,
|
|
44
|
-
disabled,
|
|
45
|
-
label,
|
|
46
|
-
roundedFull,
|
|
47
|
-
size,
|
|
48
|
-
};
|
|
49
|
-
const renderedChildren = typeof children === 'function' ? children(renderProps) : children;
|
|
50
|
-
return (_jsxs("div", { className: cn(fieldWrapper, wrapperClassName, scopeClass, roundedClass), "data-disabled": disabled || undefined, "data-invalid": !!errorMessage || undefined, children: [_jsx("style", { children: `
|
|
51
|
-
.${scopeClass} input,
|
|
52
|
-
.${scopeClass} textarea,
|
|
53
|
-
.${scopeClass} select { color: var(--foreground); }
|
|
54
|
-
.${scopeClass} input::placeholder,
|
|
55
|
-
.${scopeClass} textarea::placeholder,
|
|
56
|
-
.${scopeClass} select::placeholder { color: var(--muted-foreground); opacity: 0.34; }
|
|
57
|
-
.dark .${scopeClass} input::placeholder,
|
|
58
|
-
.dark .${scopeClass} textarea::placeholder,
|
|
59
|
-
.dark .${scopeClass} select::placeholder { color: var(--muted-foreground); opacity: 0.50; }
|
|
60
|
-
.${scopeClass} input::-webkit-input-placeholder,
|
|
61
|
-
.${scopeClass} textarea::-webkit-input-placeholder { color: var(--muted-foreground); opacity: 0.34; }
|
|
62
|
-
.dark .${scopeClass} input::-webkit-input-placeholder,
|
|
63
|
-
.dark .${scopeClass} textarea::-webkit-input-placeholder { color: var(--muted-foreground); opacity: 0.50; }
|
|
64
|
-
.${roundedClass} input,
|
|
65
|
-
.${roundedClass} textarea,
|
|
66
|
-
.${roundedClass} select { border-radius: 9999px; padding: 0.375rem 1rem; min-height: 2rem; }
|
|
67
|
-
.${roundedClass} input::placeholder,
|
|
68
|
-
.${roundedClass} textarea::placeholder,
|
|
69
|
-
.${roundedClass} select::placeholder { opacity: 0.5; }
|
|
70
|
-
` }), _jsxs("div", { className: cn('flex gap-2', flexDirection), children: [label && labelOrder === 0 && (_jsx("label", { htmlFor: componentId, className: mergedLabelClassName, style: { order: labelOrder }, children: label })), _jsx("div", { style: { order: inputOrder }, className: isHorizontal ? 'flex-1' : undefined, children: renderedChildren }), label && labelOrder === 1 && (_jsx("label", { htmlFor: componentId, className: mergedLabelClassName, style: { order: labelOrder }, children: label }))] }), _jsx(FormValidationError, { id: errorId, message: errorMessage, hasValidation: hasValidation })] }));
|
|
71
|
-
};
|
|
72
|
-
FormControl.displayName = 'FormControl';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
interface FormValidationErrorProps {
|
|
2
|
-
id?: string;
|
|
3
|
-
message?: string | null;
|
|
4
|
-
hasValidation?: boolean;
|
|
5
|
-
}
|
|
6
|
-
export declare function FormValidationError({ id, message, hasValidation }: FormValidationErrorProps): import("react").JSX.Element | null;
|
|
7
|
-
export {};
|
|
8
|
-
//# sourceMappingURL=FormValidationError.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FormValidationError.d.ts","sourceRoot":"","sources":["../../src/components/FormValidationError.tsx"],"names":[],"mappings":"AAEA,UAAU,wBAAwB;IAChC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,aAAqB,EAAE,EAAE,wBAAwB,sCAkBnG"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from '../utils/cn';
|
|
3
|
-
export function FormValidationError({ id, message, hasValidation = false }) {
|
|
4
|
-
if (!hasValidation && !message)
|
|
5
|
-
return null;
|
|
6
|
-
return (_jsx("p", { id: id, className: cn('mt-px text-left text-[11px] leading-[14px] transition-opacity duration-200 select-none', hasValidation ? 'min-h-[14px]' : 'min-h-0', message ? 'text-red-600 opacity-100 dark:text-red-400' : 'opacity-0'), "aria-live": "polite", "aria-atomic": "true", role: message ? 'alert' : undefined, children: message ?? '' }));
|
|
7
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
3
|
-
wrapperClassName?: string;
|
|
4
|
-
labelClassName?: string;
|
|
5
|
-
label?: string;
|
|
6
|
-
errorMessage?: string;
|
|
7
|
-
error?: string;
|
|
8
|
-
helperText?: string;
|
|
9
|
-
hasValidation?: boolean;
|
|
10
|
-
roundedFull?: boolean;
|
|
11
|
-
size?: 'xs' | 'sm' | 'md' | 'lg';
|
|
12
|
-
labelPosition?: 'top' | 'right' | 'bottom' | 'left';
|
|
13
|
-
children?: React.ReactNode;
|
|
14
|
-
endAdornment?: React.ReactNode;
|
|
15
|
-
}
|
|
16
|
-
export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
17
|
-
export declare const FormInput: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
18
|
-
export declare const TextField: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
19
|
-
//# sourceMappingURL=Input.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../src/components/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC3F,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACjC,aAAa,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IACpD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAChC;AAED,eAAO,MAAM,KAAK,qFA+FjB,CAAC;AAGF,eAAO,MAAM,SAAS,qFAAQ,CAAC;AAC/B,eAAO,MAAM,SAAS,qFAAQ,CAAC"}
|
package/dist/components/Input.js
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
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 { FormControl } from './FormControl';
|
|
6
|
-
export const Input = React.forwardRef(({ label, errorMessage, error, id, className, wrapperClassName, labelClassName = '', labelPosition = 'top', children, endAdornment, roundedFull = false, size = 'sm', placeholder, disabled = false, helperText, ...props }, ref) => {
|
|
7
|
-
const componentId = id || props.name;
|
|
8
|
-
const adornment = children ?? endAdornment;
|
|
9
|
-
const hasChildren = !!adornment;
|
|
10
|
-
const resolvedError = errorMessage ?? error;
|
|
11
|
-
const sizeMap = {
|
|
12
|
-
xs: 'h-7 text-xs',
|
|
13
|
-
sm: 'h-9 text-sm',
|
|
14
|
-
md: 'h-12 text-md',
|
|
15
|
-
lg: 'h-14 text-base',
|
|
16
|
-
};
|
|
17
|
-
const roundedClass = roundedFull ? 'rounded-full' : size === 'lg' ? 'rounded-lg' : 'rounded-md';
|
|
18
|
-
const sizeClass = `${sizeMap[size ?? 'sm']} ${roundedClass}`;
|
|
19
|
-
const paddingClass = {
|
|
20
|
-
xs: 'px-2',
|
|
21
|
-
sm: 'px-3',
|
|
22
|
-
md: 'px-4',
|
|
23
|
-
lg: 'px-6',
|
|
24
|
-
};
|
|
25
|
-
const rightPaddingMap = {
|
|
26
|
-
xs: 'pr-8',
|
|
27
|
-
sm: 'pr-10',
|
|
28
|
-
md: 'pr-12',
|
|
29
|
-
lg: 'pr-14',
|
|
30
|
-
};
|
|
31
|
-
return (_jsx(FormControl, { label: label, id: componentId, labelClassName: labelClassName, labelPosition: labelPosition, wrapperClassName: wrapperClassName, errorMessage: resolvedError, hasValidation: !!helperText || props['aria-invalid'] === true, roundedFull: roundedFull, size: size, disabled: disabled, children: ({ controlId, describedBy, errorMessage: controlError, disabled: controlDisabled, label: controlLabel }) => (_jsxs("div", { className: cn('relative', hasChildren && 'min-h-[2.5rem]'), children: [_jsx("input", { ref: ref, ...props, id: controlId, disabled: controlDisabled, placeholder: placeholder ?? controlLabel, "aria-invalid": !!controlError, "aria-describedby": describedBy, className: controlClasses({
|
|
32
|
-
errorMessage: controlError,
|
|
33
|
-
disabled: controlDisabled,
|
|
34
|
-
extra: cn(className, 'truncate', roundedFull
|
|
35
|
-
? cn('rounded-full', paddingClass[size ?? 'sm'], sizeClass, hasChildren && rightPaddingMap[size ?? 'sm'])
|
|
36
|
-
: cn(paddingClass[size ?? 'sm'], sizeClass, hasChildren && rightPaddingMap[size ?? 'sm'])),
|
|
37
|
-
}) }), hasChildren && _jsx("div", { className: "absolute inset-y-0 -top-1 right-0 flex items-center", children: adornment }), helperText && !controlError ? (_jsx("p", { className: "mt-1 text-xs font-medium text-foreground-muted", children: helperText })) : null] })) }));
|
|
38
|
-
});
|
|
39
|
-
Input.displayName = 'Input';
|
|
40
|
-
export const FormInput = Input;
|
|
41
|
-
export const TextField = Input;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
export interface QueryWorkspaceProps {
|
|
3
|
-
filters: ReactNode;
|
|
4
|
-
children: ReactNode;
|
|
5
|
-
className?: string;
|
|
6
|
-
}
|
|
7
|
-
export interface QueryFiltersPanelProps {
|
|
8
|
-
title?: string;
|
|
9
|
-
description?: string;
|
|
10
|
-
children: ReactNode;
|
|
11
|
-
}
|
|
12
|
-
declare function QueryWorkspaceRoot({ filters, children, className }: QueryWorkspaceProps): import("react").JSX.Element;
|
|
13
|
-
declare function QueryFiltersPanel({ title, description, children, }: QueryFiltersPanelProps): import("react").JSX.Element;
|
|
14
|
-
export declare const QueryWorkspace: typeof QueryWorkspaceRoot & {
|
|
15
|
-
FiltersPanel: typeof QueryFiltersPanel;
|
|
16
|
-
};
|
|
17
|
-
export {};
|
|
18
|
-
//# sourceMappingURL=QueryWorkspace.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"QueryWorkspace.d.ts","sourceRoot":"","sources":["../../src/components/QueryWorkspace.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AASvC,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,SAAS,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,sBAAsB;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,iBAAS,kBAAkB,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,mBAAmB,+BAuBhF;AAED,iBAAS,iBAAiB,CAAC,EACzB,KAAiB,EACjB,WAAqE,EACrE,QAAQ,GACT,EAAE,sBAAsB,+BAexB;AAED,eAAO,MAAM,cAAc;;CAEzB,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { FilterIcon } from 'lucide-react';
|
|
3
|
-
import { cn } from '../utils/cn';
|
|
4
|
-
import { Card } from './Card';
|
|
5
|
-
import { EmptyState } from './EmptyState';
|
|
6
|
-
import { RenderCase } from './RenderCase';
|
|
7
|
-
function QueryWorkspaceRoot({ filters, children, className }) {
|
|
8
|
-
return (_jsxs("div", { className: cn('grid min-h-0 flex-1 gap-3 xl:grid-cols-[320px_minmax(0,1fr)]', className), children: [_jsx("aside", { className: "min-h-0 xl:sticky xl:top-0 xl:self-start", children: filters }), _jsx("section", { className: "flex min-h-0 flex-1 flex-col", children: _jsxs(RenderCase.Root, { children: [_jsx(RenderCase.If, { when: Boolean(children && (Array.isArray(children) ? children.length > 0 : true)), children: children }), _jsx(RenderCase.Else, { children: _jsx(Card.Root, { className: "bg-surface/60 flex flex-1 items-center justify-center p-8 shadow-sm", children: _jsx(EmptyState, { title: "Nenhum resultado", description: "Ajuste os filtros e pesquise novamente." }) }) })] }) })] }));
|
|
9
|
-
}
|
|
10
|
-
function QueryFiltersPanel({ title = 'Filtros', description = 'Refine os critérios antes de consultar os resultados.', children, }) {
|
|
11
|
-
return (_jsxs(Card.Root, { className: "w-fit min-w-52", children: [_jsxs(Card.Title, { children: [_jsx(FilterIcon, { className: "text-primary h-4 w-4" }), title] }), _jsx(Card.Body, { children: _jsxs("div", { className: "flex flex-col gap-1", children: [_jsx("p", { className: "text-foreground-muted text-xs leading-5", children: description }), children] }) })] }));
|
|
12
|
-
}
|
|
13
|
-
export const QueryWorkspace = Object.assign(QueryWorkspaceRoot, {
|
|
14
|
-
FiltersPanel: QueryFiltersPanel,
|
|
15
|
-
});
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { type ReactNode } from 'react';
|
|
2
|
-
export interface SearchWorkspaceRootProps {
|
|
3
|
-
filters: ReactNode;
|
|
4
|
-
children: ReactNode;
|
|
5
|
-
className?: string;
|
|
6
|
-
}
|
|
7
|
-
export interface SearchFilterRootProps {
|
|
8
|
-
title?: string;
|
|
9
|
-
description?: string;
|
|
10
|
-
children: ReactNode;
|
|
11
|
-
className?: string;
|
|
12
|
-
bodyClassName?: string;
|
|
13
|
-
contentClassName?: string;
|
|
14
|
-
maxHeightClassName?: string;
|
|
15
|
-
}
|
|
16
|
-
export interface SearchFilterFooterProps {
|
|
17
|
-
children: ReactNode;
|
|
18
|
-
className?: string;
|
|
19
|
-
}
|
|
20
|
-
declare function SearchWorkspaceRoot({ filters, children, className }: SearchWorkspaceRootProps): import("react").JSX.Element;
|
|
21
|
-
declare function SearchFilterFooter({ children, className }: SearchFilterFooterProps): import("react").JSX.Element;
|
|
22
|
-
declare function SearchFilterRoot({ title, description, children, className, bodyClassName, contentClassName, maxHeightClassName, }: SearchFilterRootProps): import("react").JSX.Element;
|
|
23
|
-
export declare const SearchWorkspace: {
|
|
24
|
-
Root: typeof SearchWorkspaceRoot;
|
|
25
|
-
};
|
|
26
|
-
export declare const SearchFilter: {
|
|
27
|
-
Root: typeof SearchFilterRoot;
|
|
28
|
-
Footer: typeof SearchFilterFooter;
|
|
29
|
-
};
|
|
30
|
-
export {};
|
|
31
|
-
//# sourceMappingURL=SearchWorkspace.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SearchWorkspace.d.ts","sourceRoot":"","sources":["../../src/components/SearchWorkspace.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AASjE,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,SAAS,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,qBAAqB;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,iBAAS,mBAAmB,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,wBAAwB,+BAuBtF;AAED,iBAAS,kBAAkB,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,uBAAuB,+BAE3E;AAED,iBAAS,gBAAgB,CAAC,EACxB,KAAiB,EACjB,WAAqE,EACrE,QAAQ,EACR,SAAS,EACT,aAAa,EACb,gBAAgB,EAChB,kBAAgD,GACjD,EAAE,qBAAqB,+BA4BvB;AAED,eAAO,MAAM,eAAe;;CAE3B,CAAC;AAEF,eAAO,MAAM,YAAY;;;CAGxB,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Children, isValidElement } from 'react';
|
|
3
|
-
import { FilterIcon } from 'lucide-react';
|
|
4
|
-
import { cn } from '../utils/cn';
|
|
5
|
-
import { Card } from './Card';
|
|
6
|
-
import { EmptyState } from './EmptyState';
|
|
7
|
-
import { RenderCase } from './RenderCase';
|
|
8
|
-
function SearchWorkspaceRoot({ filters, children, className }) {
|
|
9
|
-
return (_jsxs("div", { className: cn('grid min-h-0 flex-1 gap-3 xl:grid-cols-[320px_minmax(0,1fr)]', className), children: [_jsx("aside", { className: "min-h-0 xl:sticky xl:top-0 xl:self-start", children: filters }), _jsx("section", { className: "flex min-h-0 flex-1 flex-col", children: _jsxs(RenderCase.Root, { children: [_jsx(RenderCase.If, { when: Boolean(children && (Array.isArray(children) ? children.length > 0 : true)), children: children }), _jsx(RenderCase.Else, { children: _jsx(Card.Root, { className: "bg-surface/60 flex flex-1 items-center justify-center p-8 shadow-sm", children: _jsx(EmptyState, { title: "Nenhum resultado", description: "Ajuste os filtros e pesquise novamente." }) }) })] }) })] }));
|
|
10
|
-
}
|
|
11
|
-
function SearchFilterFooter({ children, className }) {
|
|
12
|
-
return _jsx("div", { className: cn('border-app-border shrink-0 border-t pt-3', className), children: children });
|
|
13
|
-
}
|
|
14
|
-
function SearchFilterRoot({ title = 'Filtros', description = 'Refine os critérios antes de consultar os resultados.', children, className, bodyClassName, contentClassName, maxHeightClassName = 'max-h-[calc(100vh-12rem)]', }) {
|
|
15
|
-
const childrenArray = Children.toArray(children);
|
|
16
|
-
const footerChildren = childrenArray.filter(child => isValidElement(child) && child.type === SearchFilterFooter);
|
|
17
|
-
const contentChildren = childrenArray.filter(child => !(isValidElement(child) && child.type === SearchFilterFooter));
|
|
18
|
-
return (_jsxs(Card.Root, { className: cn('flex h-fit w-fit min-w-52 flex-col overflow-hidden', maxHeightClassName, className), children: [_jsxs(Card.Title, { children: [_jsx(FilterIcon, { className: "text-primary h-4 w-4" }), title] }), _jsx(Card.Body, { className: cn('min-h-0', bodyClassName), children: _jsxs("div", { className: "flex min-h-0 flex-col gap-3", children: [_jsx("div", { className: cn('min-h-0 overflow-y-auto', contentClassName), children: _jsxs("div", { className: "flex flex-col gap-1", children: [_jsx("p", { className: "text-foreground-muted text-xs leading-5", children: description }), contentChildren] }) }), footerChildren] }) })] }));
|
|
19
|
-
}
|
|
20
|
-
export const SearchWorkspace = {
|
|
21
|
-
Root: SearchWorkspaceRoot,
|
|
22
|
-
};
|
|
23
|
-
export const SearchFilter = {
|
|
24
|
-
Root: SearchFilterRoot,
|
|
25
|
-
Footer: SearchFilterFooter,
|
|
26
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface ValidValues {
|
|
3
|
-
label: string;
|
|
4
|
-
value: string | number | null | undefined;
|
|
5
|
-
}
|
|
6
|
-
export interface SelectProps extends Omit<React.SelectHTMLAttributes<HTMLSelectElement>, 'size'> {
|
|
7
|
-
isLoading?: boolean;
|
|
8
|
-
wrapperClassName?: string;
|
|
9
|
-
labelClassName?: string;
|
|
10
|
-
label?: string;
|
|
11
|
-
errorMessage?: string;
|
|
12
|
-
error?: string;
|
|
13
|
-
options?: ValidValues[];
|
|
14
|
-
hasValidation?: boolean;
|
|
15
|
-
size?: 'xs' | 'sm' | 'md' | 'lg';
|
|
16
|
-
labelPosition?: 'top' | 'right' | 'bottom' | 'left';
|
|
17
|
-
roundedFull?: boolean;
|
|
18
|
-
defaultValue?: number | string;
|
|
19
|
-
hideEmptyOption?: boolean;
|
|
20
|
-
}
|
|
21
|
-
export declare const Select: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLSelectElement>>;
|
|
22
|
-
export declare const FormSelect: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLSelectElement>>;
|
|
23
|
-
export declare const SelectField: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLSelectElement>>;
|
|
24
|
-
//# sourceMappingURL=Select.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../src/components/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CAC3C;AAED,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC9F,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;IACxB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACjC,aAAa,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IACpD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,eAAO,MAAM,MAAM,uFAsFlB,CAAC;AAGF,eAAO,MAAM,UAAU,uFAAS,CAAC;AACjC,eAAO,MAAM,WAAW,uFAAS,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
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 { InputSkeleton } from './FieldSkeleton';
|
|
5
|
-
import { controlClasses } from './form-control-helpers';
|
|
6
|
-
import { FormControl } from './FormControl';
|
|
7
|
-
export const Select = React.forwardRef(({ isLoading, label, errorMessage, error, id, className, wrapperClassName = '', labelClassName = '', labelPosition = 'top', options: validValues, roundedFull = false, size = 'sm', defaultValue, hideEmptyOption = false, disabled = false, children, ...props }, ref) => {
|
|
8
|
-
const componentId = id || props.name;
|
|
9
|
-
const resolvedError = errorMessage ?? error;
|
|
10
|
-
const sizeMap = {
|
|
11
|
-
xs: 'h-7 text-xs px-2',
|
|
12
|
-
sm: 'h-9 text-sm px-3',
|
|
13
|
-
md: 'h-12 text-sm px-4',
|
|
14
|
-
lg: 'h-14 text-base px-6',
|
|
15
|
-
};
|
|
16
|
-
const roundedClass = roundedFull ? 'rounded-full' : size === 'lg' ? 'rounded-lg' : 'rounded-md';
|
|
17
|
-
const sizeClass = `${sizeMap[size ?? 'sm']} ${roundedClass}`;
|
|
18
|
-
return (_jsx(InputSkeleton, { className: wrapperClassName, isLoading: isLoading ?? false, hasLabel: !!label, labelPosition: labelPosition, size: size, children: _jsx(FormControl, { label: label, id: componentId, labelClassName: labelClassName, labelPosition: labelPosition, wrapperClassName: wrapperClassName, errorMessage: resolvedError, roundedFull: roundedFull, size: size, disabled: disabled, children: ({ controlId, describedBy, errorMessage: controlError, disabled: controlDisabled }) => (_jsxs("div", { className: "relative", children: [_jsxs("select", { ref: ref, ...props, id: controlId, disabled: controlDisabled, "aria-invalid": !!controlError, "aria-describedby": describedBy, className: controlClasses({
|
|
19
|
-
errorMessage: controlError,
|
|
20
|
-
disabled: controlDisabled,
|
|
21
|
-
extra: cn(className, 'appearance-none pr-10', roundedFull && 'min-h-[2rem] px-4 py-1.5', sizeClass),
|
|
22
|
-
}), defaultValue: defaultValue, children: [!hideEmptyOption && !children && (_jsx("option", { value: "", children: "Selecione..." }, "")), children, validValues?.map((opt) => (_jsx("option", { value: opt.value ?? '', children: opt.label }, opt.value ?? '')))] }), _jsx("div", { className: "pointer-events-none absolute top-1/2 right-3 -translate-y-1/2", children: _jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": true, focusable: "false", className: "text-foreground-muted/90", children: _jsx("path", { d: "M6 9l6 6 6-6", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }) })] })) }) }));
|
|
23
|
-
});
|
|
24
|
-
Select.displayName = 'Select';
|
|
25
|
-
export const FormSelect = Select;
|
|
26
|
-
export const SelectField = Select;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type TextareaHTMLAttributes } from 'react';
|
|
2
|
-
export interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
3
|
-
label?: string;
|
|
4
|
-
helperText?: string;
|
|
5
|
-
error?: string;
|
|
6
|
-
}
|
|
7
|
-
export declare const Textarea: import("react").ForwardRefExoticComponent<TextareaProps & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
8
|
-
//# sourceMappingURL=Textarea.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../src/components/Textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,sBAAsB,EAAE,MAAM,OAAO,CAAC;AAIhE,MAAM,WAAW,aAAc,SAAQ,sBAAsB,CAAC,mBAAmB,CAAC;IAChF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,QAAQ,+GAmCpB,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from 'react';
|
|
3
|
-
import { cn } from '../utils/cn';
|
|
4
|
-
export const Textarea = forwardRef(({ className, disabled, error, helperText, id, label, ...props }, ref) => {
|
|
5
|
-
const textareaId = id ?? props.name;
|
|
6
|
-
const describedBy = [
|
|
7
|
-
helperText ? `${textareaId}-helper` : undefined,
|
|
8
|
-
error ? `${textareaId}-error` : undefined,
|
|
9
|
-
].filter(Boolean).join(' ') || undefined;
|
|
10
|
-
return (_jsxs("label", { className: cn('elodesk-field', disabled && 'elodesk-field-disabled'), children: [label && _jsx("span", { className: "elodesk-field-label", children: label }), _jsx("span", { className: cn('elodesk-input-frame', error && 'elodesk-input-frame-error'), children: _jsx("textarea", { ref: ref, id: textareaId, className: cn('elodesk-input', 'min-h-20 resize-none py-2', className), disabled: disabled, "aria-invalid": error ? true : undefined, "aria-describedby": describedBy, ...props }) }), helperText && (_jsx("span", { id: `${textareaId}-helper`, className: "elodesk-field-helper", children: helperText })), error && (_jsx("span", { id: `${textareaId}-error`, className: "elodesk-field-error", children: error }))] }));
|
|
11
|
-
});
|
|
12
|
-
Textarea.displayName = 'Textarea';
|