@wellingtonhlc/shared-ui 0.24.0 → 0.24.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.
@@ -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,+BAE/D;AAED,iBAAS,UAAU,CAAC,EAClB,KAAiB,EACjB,WAAqE,EACrE,QAAQ,EACR,SAAS,EACT,aAAa,EACb,gBAAgB,EAChB,kBAAuB,GACxB,EAAE,eAAe,+BA8BjB;AAED,eAAO,MAAM,MAAM;;;CAGlB,CAAC"}
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,kBAAuB,GACxB,EAAE,eAAe,+BAiCjB;AAED,eAAO,MAAM,MAAM;;;CAGlB,CAAC"}
@@ -10,7 +10,11 @@ function FilterRoot({ title = 'Filtros', description = 'Refine os critérios ant
10
10
  const childrenArray = Children.toArray(children);
11
11
  const footerChildren = childrenArray.filter(child => isValidElement(child) && child.type === FilterFooter);
12
12
  const contentChildren = childrenArray.filter(child => !(isValidElement(child) && child.type === FilterFooter));
13
- return (_jsxs(Card.Root, { className: cn('flex min-h-0 w-full flex-col overflow-hidden xl:h-full', 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] }) })] }));
13
+ return (
14
+ // Altura natural (content) por padrao — seguro em pilhas verticais (nao empurra irmaos).
15
+ // O preenchimento da coluna e a rolagem interna sao impostos pelo container
16
+ // (ex.: `Workspace.Root` forca o filho a `h-full`/`min-h-0`; em grids o item estica).
17
+ _jsxs(Card.Root, { className: cn('flex 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] }) })] }));
14
18
  }
15
19
  export const Filter = {
16
20
  Root: FilterRoot,
@@ -4,7 +4,7 @@ import { Card } from './Card';
4
4
  import { EmptyState } from './EmptyState';
5
5
  import { RenderCase } from './RenderCase';
6
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", 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." }) }) })] }) })] }));
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
8
  }
9
9
  export const Workspace = {
10
10
  Root: WorkspaceRoot,
package/dist/styles.css CHANGED
@@ -3522,11 +3522,6 @@ h2.react-datepicker__current-month {
3522
3522
  width: calc(var(--spacing) * 72);
3523
3523
  }
3524
3524
  }
3525
- .xl\:h-full {
3526
- @media (width >= 80rem) {
3527
- height: 100%;
3528
- }
3529
- }
3530
3525
  .xl\:grid-cols-\[320px_minmax\(0\,1fr\)\] {
3531
3526
  @media (width >= 80rem) {
3532
3527
  grid-template-columns: 320px minmax(0,1fr);
@@ -3822,6 +3817,20 @@ h2.react-datepicker__current-month {
3822
3817
  padding-block: calc(var(--spacing) * 2);
3823
3818
  }
3824
3819
  }
3820
+ .xl\:\[\&\>\*\]\:h-full {
3821
+ @media (width >= 80rem) {
3822
+ &>* {
3823
+ height: 100%;
3824
+ }
3825
+ }
3826
+ }
3827
+ .xl\:\[\&\>\*\]\:min-h-0 {
3828
+ @media (width >= 80rem) {
3829
+ &>* {
3830
+ min-height: calc(var(--spacing) * 0);
3831
+ }
3832
+ }
3833
+ }
3825
3834
  .\[\&\>\[role\=separator\]\]\:h-px {
3826
3835
  &>[role=separator] {
3827
3836
  height: 1px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wellingtonhlc/shared-ui",
3
- "version": "0.24.0",
3
+ "version": "0.24.1",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",