@wellingtonhlc/shared-ui 0.25.9 → 0.26.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -345,7 +345,7 @@ Pontos de validacao:
345
345
  - `clearable` exibe a acao de limpar somente quando ha `value` e `onClear`.
346
346
  - `shortcutHint` pode exibir atalhos de teclado, como `F1`.
347
347
 
348
- ## Filter
348
+ ## Filter (contrato legado)
349
349
 
350
350
  `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.
351
351
 
@@ -374,6 +374,20 @@ Padrões do painel:
374
374
  - Use `Filter.Footer` para manter botões sempre visíveis no rodapé do painel.
375
375
  - Em interfaces densas, campos dentro do painel devem preferir `size="sm"` e nao devem usar formato `rounded-full`.
376
376
 
377
+ ## Filter atual
378
+
379
+ `Filter.Root` usa descrição vazia por padrão e rola apenas o viewport dos campos. Informe `onSubmit` e `onClear` para obter as ações automáticas `Pesquisar` e `Redefinir`; o submit cria um único `<form>` interno. `submitLabel`, `clearLabel`, `isSubmitting`, `actionsDisabled` e `fieldsClassName` são opcionais. Um `Filter.Footer` explícito substitui as ações automáticas e continua indicado para formulários externos.
380
+
381
+ `Filter.Visibility` oferece estado controlado ou não controlado. `Filter.Trigger` aceita o botão padrão ou clona um `Page.ActionButton` via `triggerSlot`, preservando seu estilo e handler. Dentro de `Workspace.Root`, o estado fechado recolhe a coluna de filtros.
382
+
383
+ `Workspace.Root appearance="joined"` compõe filtros e resultados sem gap em uma moldura única. O padrão continua `separated`; `Table.Root` permanece responsável por viewport, moldura e paginação.
384
+
385
+ ```tsx
386
+ <Filter.Root onSubmit={handleSearch} onClear={handleClear} isSubmitting={isLoading}>
387
+ <TextField label="Buscar" size="sm" />
388
+ </Filter.Root>
389
+ ```
390
+
377
391
  ## Contrato publico 0.1.0
378
392
 
379
393
  A API pública pré-v1 foi limpa para evitar compatibilidade artificial em produção.
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React from "react";
2
2
  export interface CopyableFieldProps extends React.HTMLAttributes<HTMLElement> {
3
3
  value?: string | number | null;
4
4
  children: React.ReactNode;
@@ -1 +1 @@
1
- {"version":3,"file":"CopyableField.d.ts","sourceRoot":"","sources":["../../src/components/CopyableField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,MAAM,WAAW,kBAAmB,SAAQ,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC;IAC3E,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAC/B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,aAAa,wFAuGxB,CAAC"}
1
+ {"version":3,"file":"CopyableField.d.ts","sourceRoot":"","sources":["../../src/components/CopyableField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,MAAM,WAAW,kBAAmB,SAAQ,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC;IAC3E,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAC/B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,aAAa,wFAuHzB,CAAC"}
@@ -1,12 +1,12 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import React from 'react';
3
- import { Slot } from '@radix-ui/react-slot';
4
- import { ClipboardCheckIcon, ClipboardIcon } from 'lucide-react';
5
- import { toast } from 'sonner';
6
- import { cn } from '../utils/cn';
7
- export const CopyableField = React.forwardRef(function CopyableField({ asChild = false, children, className, errorMessage = 'Nao foi possivel copiar o valor.', onClick, onKeyDown, successMessage = 'Valor copiado.', title = 'Clique para copiar', value, ...props }, ref) {
8
- const Component = asChild ? Slot : 'span';
9
- const copyValue = value === null || value === undefined ? '' : String(value);
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import React from "react";
3
+ import { Slot } from "@radix-ui/react-slot";
4
+ import { ClipboardCheckIcon, ClipboardIcon } from "lucide-react";
5
+ import { toast } from "sonner";
6
+ import { cn } from "../utils/cn";
7
+ export const CopyableField = React.forwardRef(function CopyableField({ asChild = false, children, className, errorMessage = "Nao foi possivel copiar o valor.", onClick, onKeyDown, successMessage = "Valor copiado.", title = "Clique para copiar", value, ...props }, ref) {
8
+ const Component = asChild ? Slot : "span";
9
+ const copyValue = value === null || value === undefined ? "" : String(value);
10
10
  const canCopy = copyValue.trim().length > 0;
11
11
  const [copied, setCopied] = React.useState(false);
12
12
  const feedbackTimerRef = React.useRef(null);
@@ -49,12 +49,12 @@ export const CopyableField = React.forwardRef(function CopyableField({ asChild =
49
49
  onKeyDown?.(event);
50
50
  if (event.defaultPrevented)
51
51
  return;
52
- if (event.key === 'Enter' || event.key === ' ') {
52
+ if (event.key === "Enter" || event.key === " ") {
53
53
  event.preventDefault();
54
54
  void copy();
55
55
  }
56
56
  }
57
- return (_jsxs(Component, { ref: ref, role: canCopy ? 'button' : undefined, tabIndex: canCopy ? 0 : -1, title: canCopy ? title : undefined, "aria-disabled": !canCopy, "aria-label": canCopy && copied ? 'Copiado' : undefined, "data-copied": copied ? 'true' : undefined, className: cn(canCopy &&
58
- 'group/copyable relative cursor-pointer rounded-md border border-transparent focus-visible:outline-none', className), onClick: handleClick, onKeyDown: handleKeyDown, ...props, children: [children, canCopy && !asChild ? (_jsx("span", { "aria-hidden": "true", className: cn('border-app-border bg-[color-mix(in_srgb,var(--foreground-muted)_3%,var(--background-secondary))] text-foreground-muted pointer-events-none absolute top-1/2 right-0 inline-flex size-6 translate-x-[calc(100%+0.25rem)] -translate-y-1/2 items-center justify-center rounded-md border opacity-0 shadow-sm transition-[opacity,color,border-color,background-color] duration-150 group-hover/copyable:opacity-100 group-focus-visible/copyable:opacity-100', copied &&
59
- 'bg-[color-mix(in_srgb,var(--brand)_9%,var(--background-secondary))] text-brand opacity-100'), children: copied ? _jsx(ClipboardCheckIcon, { className: "size-3.5" }) : _jsx(ClipboardIcon, { className: "size-3.5" }) })) : null] }));
57
+ return (_jsx(Component, { ref: ref, role: canCopy ? "button" : undefined, tabIndex: canCopy ? 0 : -1, title: canCopy ? title : undefined, "aria-disabled": !canCopy, "aria-label": canCopy && copied ? "Copiado" : undefined, "data-copied": copied ? "true" : undefined, className: cn(canCopy &&
58
+ "group/copyable relative cursor-pointer rounded-md border border-transparent focus-visible:outline-none", className), onClick: handleClick, onKeyDown: handleKeyDown, ...props, children: asChild ? (children) : (_jsxs(_Fragment, { children: [children, canCopy ? (_jsx("span", { "aria-hidden": "true", className: cn("border-app-border bg-[color-mix(in_srgb,var(--foreground-muted)_3%,var(--background-secondary))] text-foreground-muted pointer-events-none absolute top-1/2 right-0 inline-flex size-6 translate-x-[calc(100%+0.25rem)] -translate-y-1/2 items-center justify-center rounded-md border opacity-0 shadow-sm transition-[opacity,color,border-color,background-color] duration-150 group-hover/copyable:opacity-100 group-focus-visible/copyable:opacity-100", copied &&
59
+ "bg-[color-mix(in_srgb,var(--brand)_9%,var(--background-secondary))] text-brand opacity-100"), children: copied ? (_jsx(ClipboardCheckIcon, { className: "size-3.5" })) : (_jsx(ClipboardIcon, { className: "size-3.5" })) })) : null] })) }));
60
60
  });
@@ -1,22 +1,51 @@
1
- import { type ReactNode } from "react";
1
+ import { type FormEvent, type ReactElement, type ReactNode } from 'react';
2
+ import { type ActionButtonPrimitiveProps } from './ActionPrimitives';
2
3
  export interface FilterRootProps {
3
- title?: string;
4
- description?: string;
4
+ title?: ReactNode;
5
+ description?: ReactNode;
5
6
  children: ReactNode;
6
7
  className?: string;
7
8
  bodyClassName?: string;
8
9
  contentClassName?: string;
9
10
  maxHeightClassName?: string;
11
+ onSubmit?: (event: FormEvent<HTMLFormElement>) => void;
12
+ onClear?: () => void;
13
+ submitLabel?: ReactNode;
14
+ clearLabel?: ReactNode;
15
+ isSubmitting?: boolean;
16
+ actionsDisabled?: boolean;
17
+ fieldsClassName?: string;
10
18
  }
11
19
  export interface FilterFooterProps {
12
20
  children: ReactNode;
13
21
  className?: string;
14
22
  }
23
+ export interface FilterVisibilityProps {
24
+ children: ReactNode;
25
+ defaultOpen?: boolean;
26
+ open?: boolean;
27
+ onOpenChange?: (open: boolean) => void;
28
+ className?: string;
29
+ }
30
+ export interface FilterTriggerProps extends Omit<ActionButtonPrimitiveProps, 'children'> {
31
+ triggerSlot?: ReactElement;
32
+ label?: ReactNode;
33
+ }
34
+ interface FilterVisibilityContextValue {
35
+ open: boolean;
36
+ setOpen: (open: boolean) => void;
37
+ contentId: string;
38
+ }
39
+ export declare const FilterVisibilityContext: import("react").Context<FilterVisibilityContextValue | null>;
15
40
  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;
41
+ declare function FilterVisibility({ children, defaultOpen, open: controlledOpen, onOpenChange, className }: FilterVisibilityProps): import("react").JSX.Element;
42
+ declare function FilterTrigger({ triggerSlot, label, onClick, ...props }: FilterTriggerProps): import("react").JSX.Element;
43
+ declare function FilterRoot({ title, description, children, className, bodyClassName, contentClassName, maxHeightClassName, onSubmit, onClear, submitLabel, clearLabel, isSubmitting, actionsDisabled, fieldsClassName, }: FilterRootProps): import("react").JSX.Element;
17
44
  export declare const Filter: {
18
45
  Root: typeof FilterRoot;
19
46
  Footer: typeof FilterFooter;
47
+ Visibility: typeof FilterVisibility;
48
+ Trigger: typeof FilterTrigger;
20
49
  };
21
50
  export {};
22
51
  //# sourceMappingURL=Filter.d.ts.map
@@ -1 +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,+BAM/D;AAED,iBAAS,UAAU,CAAC,EAClB,KAAiB,EACjB,WAAqE,EACrE,QAAQ,EACR,SAAS,EACT,aAAa,EACb,gBAAgB,EAChB,kBAAuB,GACxB,EAAE,eAAe,+BAsCjB;AAED,eAAO,MAAM,MAAM;;;CAGlB,CAAC"}
1
+ {"version":3,"file":"Filter.d.ts","sourceRoot":"","sources":["../../src/components/Filter.tsx"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,SAAS,EAEd,KAAK,YAAY,EACjB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAKf,OAAO,EAAyB,KAAK,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAK5F,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAA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AAI,EAAE,cAAc,EAAE,YAAY,EAAE,SAAS,EAAE,EAAE,qBAAqB,+BAiB/H;AAED,iBAAS,aAAa,CAAC,EAAE,WAAW,EAAE,KAAiB,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,+BAmB/F;AAuBD,iBAAS,UAAU,CAAC,EAClB,KAAiB,EACjB,WAAgB,EAChB,QAAQ,EACR,SAAS,EACT,aAAa,EACb,gBAAgB,EAChB,kBAAuB,EACvB,QAAQ,EACR,OAAO,EACP,WAAW,EACX,UAAU,EACV,YAAoB,EACpB,eAAuB,EACvB,eAAe,GAChB,EAAE,eAAe,+BAoDjB;AAED,eAAO,MAAM,MAAM;;;;;CAKlB,CAAC"}
@@ -1,18 +1,68 @@
1
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";
2
+ import { Children, cloneElement, createContext, isValidElement, useContext, useId, useState, } from 'react';
3
+ import { FilterIcon } from 'lucide-react';
4
+ import { cn } from '../utils/cn';
5
+ import { ActionButtonPrimitive } from './ActionPrimitives';
6
+ import { Button } from './Button';
7
+ import { Card } from './Card';
8
+ import { RenderIf } from './RenderIf';
9
+ export const FilterVisibilityContext = createContext(null);
6
10
  function FilterFooter({ children, className }) {
7
- return (_jsx("div", { className: cn("border-app-border shrink-0 border-t pt-3", className), children: children }));
11
+ return (_jsx("div", { className: cn('border-app-border flex shrink-0 items-center justify-end gap-2 border-t px-4 py-3', className), children: children }));
8
12
  }
9
- function FilterRoot({ title = "Filtros", description = "Refine os critérios antes de consultar os resultados.", children, className, bodyClassName, contentClassName, maxHeightClassName = "", }) {
13
+ function FilterVisibility({ children, defaultOpen = true, open: controlledOpen, onOpenChange, className }) {
14
+ const [uncontrolledOpen, setUncontrolledOpen] = useState(defaultOpen);
15
+ const open = controlledOpen ?? uncontrolledOpen;
16
+ const contentId = useId();
17
+ function setOpen(nextOpen) {
18
+ if (controlledOpen === undefined)
19
+ setUncontrolledOpen(nextOpen);
20
+ onOpenChange?.(nextOpen);
21
+ }
22
+ return (_jsx(FilterVisibilityContext.Provider, { value: { contentId, open, setOpen }, children: _jsx("div", { className: cn('contents', className), "data-state": open ? 'open' : 'closed', children: children }) }));
23
+ }
24
+ function FilterTrigger({ triggerSlot, label = 'Filtros', onClick, ...props }) {
25
+ const visibility = useContext(FilterVisibilityContext);
26
+ function handleClick(event) {
27
+ onClick?.(event);
28
+ if (!event.defaultPrevented)
29
+ visibility?.setOpen(!visibility.open);
30
+ }
31
+ const triggerProps = {
32
+ ...props,
33
+ 'aria-controls': visibility?.contentId,
34
+ 'aria-expanded': visibility?.open,
35
+ 'data-state': visibility?.open ?? true ? 'open' : 'closed',
36
+ onClick: handleClick,
37
+ };
38
+ if (triggerSlot)
39
+ return cloneElement(triggerSlot, triggerProps);
40
+ return _jsx(ActionButtonPrimitive, { ...triggerProps, label: label });
41
+ }
42
+ function FilterActions({ clearLabel, submitLabel, onClear, onSubmit, isSubmitting, actionsDisabled }) {
43
+ function handleClear() {
44
+ onClear?.();
45
+ }
46
+ return (_jsxs(FilterFooter, { children: [_jsx(RenderIf, { when: Boolean(onClear), children: _jsx(Button, { type: "button", variant: "outline", size: "sm", onClick: handleClear, disabled: actionsDisabled, children: clearLabel ?? 'Redefinir' }) }), _jsx(RenderIf, { when: Boolean(onSubmit), children: _jsx(Button, { type: "submit", size: "sm", className: "flex-1", isLoading: isSubmitting, disabled: actionsDisabled, children: submitLabel ?? 'Pesquisar' }) })] }));
47
+ }
48
+ function FilterRoot({ title = 'Filtros', description = '', children, className, bodyClassName, contentClassName, maxHeightClassName = '', onSubmit, onClear, submitLabel, clearLabel, isSubmitting = false, actionsDisabled = false, fieldsClassName, }) {
49
+ const visibility = useContext(FilterVisibilityContext);
50
+ const isOpen = visibility?.open ?? true;
10
51
  const childrenArray = Children.toArray(children);
52
+ const hasExplicitFooter = childrenArray.some((child) => isValidElement(child) && child.type === FilterFooter);
11
53
  const footerChildren = childrenArray.filter((child) => isValidElement(child) && child.type === FilterFooter);
12
54
  const contentChildren = childrenArray.filter((child) => !(isValidElement(child) && child.type === FilterFooter));
13
- return (_jsxs(Card.Root, { className: cn("flex h-full w-full min-w-0 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("flex min-h-0 flex-1 flex-col", bodyClassName), children: _jsxs("div", { className: "flex min-h-0 flex-1 flex-col gap-3", children: [_jsx("div", { className: cn("min-h-0 flex-1 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] }) })] }));
55
+ const hasAutomaticActions = Boolean(onSubmit || onClear);
56
+ function handleSubmit(event) {
57
+ event.preventDefault();
58
+ onSubmit?.(event);
59
+ }
60
+ const bodyContent = (_jsxs("div", { className: "flex min-h-0 flex-1 flex-col gap-3", children: [_jsx("div", { className: cn('min-h-0 flex-1 overflow-y-auto [scrollbar-gutter:stable]', contentClassName), children: _jsxs("div", { className: cn('flex flex-col gap-1 py-3 pl-4 pr-1', fieldsClassName), children: [description ? _jsx("p", { className: "text-foreground-muted text-xs leading-5", children: description }) : null, contentChildren] }) }), hasExplicitFooter ? footerChildren : null, !hasExplicitFooter && hasAutomaticActions ? (_jsx(FilterActions, { actionsDisabled: actionsDisabled, clearLabel: clearLabel, isSubmitting: isSubmitting, onClear: onClear, onSubmit: onSubmit, submitLabel: submitLabel })) : null] }));
61
+ return (_jsxs(Card.Root, { id: visibility?.contentId, className: cn('flex h-full w-full min-w-0 flex-col overflow-hidden', maxHeightClassName, className), "data-slot": "filter-root", "data-state": isOpen ? 'open' : 'closed', children: [_jsxs(Card.Title, { children: [_jsx(FilterIcon, { className: "text-primary h-4 w-4" }), title] }), _jsx(Card.Body, { density: "none", className: cn('flex min-h-0 flex-1 flex-col', bodyClassName), children: onSubmit ? _jsx("form", { className: "flex min-h-0 flex-1 flex-col", onSubmit: handleSubmit, children: bodyContent }) : bodyContent })] }));
14
62
  }
15
63
  export const Filter = {
16
64
  Root: FilterRoot,
17
65
  Footer: FilterFooter,
66
+ Visibility: FilterVisibility,
67
+ Trigger: FilterTrigger,
18
68
  };
@@ -52,7 +52,7 @@ function ModalRoot({ allowExternalFocus = false, centered = false, children, cla
52
52
  return (_jsx(DialogPrimitive.Root, { ...props, children: _jsxs(DialogPrimitive.Portal, { children: [_jsx(DialogPrimitive.Overlay, { className: cn('fixed inset-0 z-[100] bg-black/50 backdrop-blur-[2px] data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0', overlayClassName) }), _jsxs(DialogPrimitive.Content, { onFocusOutside: allowExternalFocus ? (event) => event.preventDefault() : undefined, style: {
53
53
  width: widthVariants[size],
54
54
  ...(!centered && offset ? { top: `${offset}px` } : {}),
55
- }, className: cn('fixed z-[110] grid max-h-[95vh] gap-4', hasFooter ? 'grid-rows-[auto_minmax(0,1fr)_auto]' : 'grid-rows-[auto_minmax(0,1fr)]', 'rounded-xl duration-200', density === 'default' && 'gap-4 p-6', density === 'compact' && 'gap-2.5 p-4', variant === 'default' && 'border-app-border bg-background-secondary text-foreground border shadow-lg', variant === 'elevated' && 'border-app-border bg-surface text-foreground border shadow-2xl', centered ? 'left-[50%] top-[50%] -translate-x-1/2 -translate-y-1/2' : 'left-[50%] top-[2.5%] -translate-x-1/2', sizeVariants[size], minHeightVariants[size], 'data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95', className), children: [children, showCloseButton ? (_jsxs(DialogPrimitive.Close, { className: cn('absolute right-4 top-4 inline-flex h-8 w-8 items-center justify-center rounded-md', 'text-foreground-muted hover:bg-background hover:text-foreground cursor-pointer transition-colors', 'focus:ring-brand/50 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none'), children: [_jsx(XIcon, { className: "size-4" }), _jsx("span", { className: "sr-only", children: "Fechar" })] })) : null] })] }) }));
55
+ }, className: cn('fixed z-[110] grid max-h-[95vh]', hasFooter ? 'grid-rows-[auto_minmax(0,1fr)_auto]' : 'grid-rows-[auto_minmax(0,1fr)]', 'rounded-xl duration-200', density === 'default' && 'p-6', density === 'compact' && 'p-4', variant === 'default' && 'border-app-border bg-background-secondary text-foreground border shadow-lg', variant === 'elevated' && 'border-app-border bg-surface text-foreground border shadow-2xl', centered ? 'left-[50%] top-[50%] -translate-x-1/2 -translate-y-1/2' : 'left-[50%] top-[2.5%] -translate-x-1/2', sizeVariants[size], minHeightVariants[size], 'data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95', className), children: [children, showCloseButton ? (_jsxs(DialogPrimitive.Close, { className: cn('absolute right-4 top-4 inline-flex h-8 w-8 items-center justify-center rounded-md', 'text-foreground-muted hover:bg-background hover:text-foreground cursor-pointer transition-colors', 'focus:ring-brand/50 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none'), children: [_jsx(XIcon, { className: "size-4" }), _jsx("span", { className: "sr-only", children: "Fechar" })] })) : null] })] }) }));
56
56
  }
57
57
  function ModalHeader({ className, density = 'default', separated = false, ...props }) {
58
58
  return (_jsx("div", { "data-slot": "modal-header", className: cn('flex flex-col text-center sm:text-left', density === 'default' && 'gap-1.5 [&_[data-slot=modal-description]]:text-sm [&_[data-slot=modal-title]]:text-lg', density === 'compact' && 'gap-0.5 [&_[data-slot=modal-description]]:text-xs [&_[data-slot=modal-title]]:text-base', separated && density === 'default' && 'border-app-border border-b pb-4', separated && density === 'compact' && 'border-app-border border-b pb-2', className), ...props }));
@@ -1 +1 @@
1
- {"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../src/components/Table.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACtB,MAAM,OAAO,CAAC;AAIf,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,UAAU,cAAe,SAAQ,mBAAmB,CAAC,gBAAgB,CAAC;IACpE,MAAM,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IAC5B,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAChC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,cAAc,CAAC,cAAc,CAAC,CAAC;CAC/C;AA2ED,UAAU,aAAc,SAAQ,cAAc,CAAC,mBAAmB,CAAC;IACjE,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAmDD,UAAU,gBAAiB,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC;IACxE,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,QAAQ,CAAC;IACzC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAkBD,eAAO,MAAM,KAAK;;;;;;;;;;;CAWjB,CAAC"}
1
+ {"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../src/components/Table.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACtB,MAAM,OAAO,CAAC;AAIf,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,UAAU,cAAe,SAAQ,mBAAmB,CAAC,gBAAgB,CAAC;IACpE,MAAM,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IAC5B,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAChC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,cAAc,CAAC,cAAc,CAAC,CAAC;CAC/C;AA4ED,UAAU,aAAc,SAAQ,cAAc,CAAC,mBAAmB,CAAC;IACjE,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAmDD,UAAU,gBAAiB,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC;IACxE,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,QAAQ,CAAC;IACzC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAkBD,eAAO,MAAM,KAAK;;;;;;;;;;;CAWjB,CAAC"}
@@ -8,7 +8,7 @@ const Root = forwardRef(({ children, chrome = 'default', className, density = 'd
8
8
  const tableChildren = childNodes.filter((child) => !isValidElement(child) || child.type !== Pagination);
9
9
  const paginationChildren = childNodes.filter((child) => isValidElement(child) && child.type === Pagination);
10
10
  const { className: wrapperPropsClassName, ...resolvedWrapperProps } = wrapperProps ?? {};
11
- return (_jsxs("div", { ...resolvedWrapperProps, className: cn('bg-surface flex w-full min-w-0 flex-col overflow-hidden', fill && 'h-full min-h-0 grow', isFramed && 'border-app-border rounded-[var(--radius)] border', isFramed && chrome === 'default' && 'shadow-[0_4px_6px_-1px_rgb(0_0_0/0.07),0_2px_4px_-2px_rgb(0_0_0/0.05)]', density === 'compact' && '[&_td]:py-2 [&_th]:py-2', wrapperPropsClassName, wrapperClassName), children: [_jsx("div", { className: cn('min-h-0 flex-1 overflow-auto', viewportClassName), children: _jsx("table", { ref: ref, className: cn('w-full border-separate border-spacing-0 caption-bottom text-sm text-foreground', className), ...props, children: tableChildren }) }), paginationChildren.length > 0 && (_jsx("div", { className: cn('border-app-border bg-surface shrink-0 border-t px-3 py-2', density === 'compact' && 'px-3 py-2'), children: paginationChildren }))] }));
11
+ return (_jsxs("div", { ...resolvedWrapperProps, "data-slot": "table-root", className: cn('bg-surface flex w-full min-w-0 flex-col overflow-hidden', fill && 'h-full min-h-0 grow', isFramed && 'border-app-border rounded-[var(--radius)] border', isFramed && chrome === 'default' && 'shadow-[0_4px_6px_-1px_rgb(0_0_0/0.07),0_2px_4px_-2px_rgb(0_0_0/0.05)]', density === 'compact' && '[&_td]:py-2 [&_th]:py-2', wrapperPropsClassName, wrapperClassName), children: [_jsx("div", { className: cn('min-h-0 flex-1 overflow-auto', viewportClassName), children: _jsx("table", { ref: ref, className: cn('w-full border-separate border-spacing-0 caption-bottom text-sm text-foreground', className), ...props, children: tableChildren }) }), paginationChildren.length > 0 && (_jsx("div", { className: cn('border-app-border bg-surface shrink-0 border-t px-3 py-2', density === 'compact' && 'px-3 py-2'), children: paginationChildren }))] }));
12
12
  });
13
13
  Root.displayName = 'Table.Root';
14
14
  const Header = forwardRef(({ className, ...props }, ref) => _jsx("thead", { ref: ref, className: cn('bg-background-secondary', className), ...props }));
@@ -19,7 +19,7 @@ const Footer = forwardRef(({ className, ...props }, ref) => (_jsx("tfoot", { ref
19
19
  Footer.displayName = 'Table.Footer';
20
20
  const Row = forwardRef(({ className, isInteractive = true, ...props }, ref) => (_jsx("tr", { ref: ref, className: cn('transition-colors hover:bg-[color-mix(in_srgb,var(--brand)_5%,transparent)] last:[&>td]:border-b-0', isInteractive && 'cursor-pointer', className), ...props })));
21
21
  Row.displayName = 'Table.Row';
22
- const Head = forwardRef(({ className, ...props }, ref) => (_jsx("th", { ref: ref, className: cn('border-app-border bg-background-secondary sticky top-0 z-[2] whitespace-nowrap border-b px-3 py-2.5 text-left align-middle text-xs font-extrabold tracking-[0.045em] text-foreground-muted uppercase', className), ...props })));
22
+ const Head = forwardRef(({ className, ...props }, ref) => (_jsx("th", { ref: ref, className: cn('border-app-border bg-background-secondary sticky top-0 z-[2] h-10 whitespace-nowrap border-b px-3 py-2.5 text-left align-middle text-xs font-extrabold tracking-[0.045em] text-foreground-muted uppercase', className), ...props })));
23
23
  Head.displayName = 'Table.Head';
24
24
  const Cell = forwardRef(({ className, ...props }, ref) => (_jsx("td", { ref: ref, className: cn('border-app-border border-b px-3 py-2.5 align-middle text-foreground', className), ...props })));
25
25
  Cell.displayName = 'Table.Cell';
@@ -5,8 +5,9 @@ export interface WorkspaceRootProps {
5
5
  /** Conteudo de resultados exibido a direita (tabela, lista, etc.). */
6
6
  children: ReactNode;
7
7
  className?: string;
8
+ appearance?: 'separated' | 'joined';
8
9
  }
9
- declare function WorkspaceRoot({ filters, children, className }: WorkspaceRootProps): import("react").JSX.Element;
10
+ declare function WorkspaceRoot({ filters, children, className, appearance }: WorkspaceRootProps): import("react").JSX.Element;
10
11
  export declare const Workspace: {
11
12
  Root: typeof WorkspaceRoot;
12
13
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Workspace.d.ts","sourceRoot":"","sources":["../../src/components/Workspace.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAOvC,MAAM,WAAW,kBAAkB;IACjC,iEAAiE;IACjE,OAAO,EAAE,SAAS,CAAC;IACnB,sEAAsE;IACtE,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,iBAAS,aAAa,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,kBAAkB,+BA4B1E;AAED,eAAO,MAAM,SAAS;;CAErB,CAAC"}
1
+ {"version":3,"file":"Workspace.d.ts","sourceRoot":"","sources":["../../src/components/Workspace.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AASnD,MAAM,WAAW,kBAAkB;IACjC,iEAAiE;IACjE,OAAO,EAAE,SAAS,CAAC;IACnB,sEAAsE;IACtE,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,WAAW,GAAG,QAAQ,CAAC;CACrC;AAED,iBAAS,aAAa,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAwB,EAAE,EAAE,kBAAkB,+BAsCpG;AAED,eAAO,MAAM,SAAS;;CAErB,CAAC"}
@@ -1,10 +1,18 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useContext } from 'react';
2
3
  import { cn } from '../utils/cn';
3
4
  import { Card } from './Card';
4
5
  import { EmptyState } from './EmptyState';
6
+ import { FilterVisibilityContext } from './Filter';
5
7
  import { RenderCase } from './RenderCase';
6
- function WorkspaceRoot({ filters, children, className }) {
7
- return (_jsxs("div", { className: cn('grid min-h-0 flex-1 gap-3 xl:grid-cols-[320px_minmax(0,1fr)] xl:grid-rows-[minmax(0,1fr)]', className), children: [_jsx("aside", { className: "min-h-0 xl:self-stretch xl:[&>*]:h-full xl:[&>*]:min-h-0", 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: "flex flex-1 items-center justify-center bg-surface/60 p-8 shadow-sm", children: _jsx(EmptyState, { title: "Nenhum resultado", description: "Ajuste os filtros e pesquise novamente." }) }) })] }) })] }));
8
+ import { RenderIf } from './RenderIf';
9
+ function WorkspaceRoot({ filters, children, className, appearance = 'separated' }) {
10
+ const visibility = useContext(FilterVisibilityContext);
11
+ const isJoined = appearance === 'joined';
12
+ const isFilterOpen = visibility?.open ?? true;
13
+ return (_jsxs("div", { className: cn('grid min-h-0 flex-1 xl:grid-rows-[minmax(0,1fr)]', isJoined
14
+ ? 'gap-0 overflow-hidden rounded-[var(--radius)] border border-app-border [&_[data-slot=filter-root]]:rounded-none [&_[data-slot=filter-root]]:border-0 [&_[data-slot=filter-root]]:!border-r [&_[data-slot=filter-root]]:!border-app-border [&_[data-slot=table-root]]:rounded-none [&_[data-slot=table-root]]:border-0'
15
+ : 'gap-3', isFilterOpen ? 'xl:grid-cols-[280px_minmax(0,1fr)]' : 'xl:grid-cols-[minmax(0,1fr)]', className), children: [_jsx(RenderIf, { when: isFilterOpen, children: _jsx("aside", { className: "min-h-0 xl:self-stretch xl:[&>*]:h-full xl:[&>*]:min-h-0", 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: "flex flex-1 items-center justify-center bg-surface/60 p-8 shadow-sm", children: _jsx(EmptyState, { title: "Nenhum resultado", description: "Ajuste os filtros e pesquise novamente." }) }) })] }) })] }));
8
16
  }
9
17
  export const Workspace = {
10
18
  Root: WorkspaceRoot,
package/dist/index.d.ts CHANGED
@@ -27,7 +27,7 @@ export { Pagination, type PaginationProps, type PaginationSize } from './compone
27
27
  export { Page, type PageActionButtonProps, type PageActionsAlign, type PageActionsElement, type PageActionsHelpContentProps, type PageActionsPreferences, type PageActionsPosition, type PageActionsProps, type PageActionsSeparatorProps, type PageActionsSize, type PageDescriptionProps, type PageTitleProps, } from './components/Page';
28
28
  export { PageMessage, type PageMessageProps, type PageMessageVariant } from './components/PageMessage';
29
29
  export { PasswordInput, type PasswordInputProps } from './components/PasswordInput';
30
- export { Filter, type FilterFooterProps, type FilterRootProps } from './components/Filter';
30
+ export { Filter, FilterVisibilityContext, type FilterFooterProps, type FilterRootProps, type FilterTriggerProps, type FilterVisibilityProps, } from './components/Filter';
31
31
  export { Workspace, type WorkspaceRootProps } from './components/Workspace';
32
32
  export { Sidebar, type SidebarRootProps } from './components/Sidebar';
33
33
  export { Table } from './components/Table';
@@ -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,EACL,QAAQ,EACR,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,GACzB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,wBAAwB,EACxB,KAAK,yBAAyB,EAC9B,KAAK,2BAA2B,EAChC,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,6BAA6B,GACnC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC/E,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpG,OAAO,EACL,kBAAkB,EAClB,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAC5B,KAAK,yBAAyB,EAC9B,KAAK,8BAA8B,GACpC,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACpF,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,KAAK,eAAe,EAAE,MAAM,yBAAyB,CAAC;AACxF,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,KAAK,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACnG,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACjF,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,4BAA4B,CA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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
@@ -27,7 +27,7 @@ export { Pagination } from './components/Pagination';
27
27
  export { Page, } from './components/Page';
28
28
  export { PageMessage } from './components/PageMessage';
29
29
  export { PasswordInput } from './components/PasswordInput';
30
- export { Filter } from './components/Filter';
30
+ export { Filter, FilterVisibilityContext, } from './components/Filter';
31
31
  export { Workspace } from './components/Workspace';
32
32
  export { Sidebar } from './components/Sidebar';
33
33
  export { Table } from './components/Table';
package/dist/styles.css CHANGED
@@ -2187,9 +2187,6 @@ h2.react-datepicker__current-month {
2187
2187
  .pt-2 {
2188
2188
  padding-top: calc(var(--spacing) * 2);
2189
2189
  }
2190
- .pt-3 {
2191
- padding-top: calc(var(--spacing) * 3);
2192
- }
2193
2190
  .pt-4 {
2194
2191
  padding-top: calc(var(--spacing) * 4);
2195
2192
  }
@@ -2835,6 +2832,9 @@ h2.react-datepicker__current-month {
2835
2832
  -webkit-user-select: none;
2836
2833
  user-select: none;
2837
2834
  }
2835
+ .\[scrollbar-gutter\:stable\] {
2836
+ scrollbar-gutter: stable;
2837
+ }
2838
2838
  .group-hover\:translate-x-0\.5 {
2839
2839
  &:is(:where(.group):hover *) {
2840
2840
  @media (hover: hover) {
@@ -3833,9 +3833,14 @@ h2.react-datepicker__current-month {
3833
3833
  width: calc(var(--spacing) * 72);
3834
3834
  }
3835
3835
  }
3836
- .xl\:grid-cols-\[320px_minmax\(0\,1fr\)\] {
3836
+ .xl\:grid-cols-\[280px_minmax\(0\,1fr\)\] {
3837
+ @media (width >= 80rem) {
3838
+ grid-template-columns: 280px minmax(0,1fr);
3839
+ }
3840
+ }
3841
+ .xl\:grid-cols-\[minmax\(0\,1fr\)\] {
3837
3842
  @media (width >= 80rem) {
3838
- grid-template-columns: 320px minmax(0,1fr);
3843
+ grid-template-columns: minmax(0,1fr);
3839
3844
  }
3840
3845
  }
3841
3846
  .xl\:grid-rows-\[minmax\(0\,1fr\)\] {
@@ -4098,6 +4103,28 @@ h2.react-datepicker__current-month {
4098
4103
  }
4099
4104
  }
4100
4105
  }
4106
+ .\[\&_\[data-slot\=filter-root\]\]\:rounded-none {
4107
+ & [data-slot=filter-root] {
4108
+ border-radius: 0;
4109
+ }
4110
+ }
4111
+ .\[\&_\[data-slot\=filter-root\]\]\:border-0 {
4112
+ & [data-slot=filter-root] {
4113
+ border-style: var(--tw-border-style);
4114
+ border-width: 0px;
4115
+ }
4116
+ }
4117
+ .\[\&_\[data-slot\=filter-root\]\]\:\!border-r {
4118
+ & [data-slot=filter-root] {
4119
+ border-right-style: var(--tw-border-style) !important;
4120
+ border-right-width: 1px !important;
4121
+ }
4122
+ }
4123
+ .\[\&_\[data-slot\=filter-root\]\]\:\!border-app-border {
4124
+ & [data-slot=filter-root] {
4125
+ border-color: var(--color-app-border) !important;
4126
+ }
4127
+ }
4101
4128
  .\[\&_\[data-slot\=modal-description\]\]\:text-sm {
4102
4129
  & [data-slot=modal-description] {
4103
4130
  font-size: var(--text-sm);
@@ -4122,6 +4149,17 @@ h2.react-datepicker__current-month {
4122
4149
  line-height: var(--tw-leading, var(--text-lg--line-height));
4123
4150
  }
4124
4151
  }
4152
+ .\[\&_\[data-slot\=table-root\]\]\:rounded-none {
4153
+ & [data-slot=table-root] {
4154
+ border-radius: 0;
4155
+ }
4156
+ }
4157
+ .\[\&_\[data-slot\=table-root\]\]\:border-0 {
4158
+ & [data-slot=table-root] {
4159
+ border-style: var(--tw-border-style);
4160
+ border-width: 0px;
4161
+ }
4162
+ }
4125
4163
  .\[\&_svg\]\:size-3\.5 {
4126
4164
  & svg {
4127
4165
  width: calc(var(--spacing) * 3.5);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wellingtonhlc/shared-ui",
3
- "version": "0.25.9",
3
+ "version": "0.26.1",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",