@esperanca-ui/componentes 2.14.17 → 2.14.19

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/COMPONENTS.md CHANGED
@@ -67,7 +67,7 @@ const sections = [
67
67
 
68
68
  export function WorkspaceShell() {
69
69
  return (
70
- <Background pattern="dots">
70
+ <Background variant="solid" pattern="dots">
71
71
  <div className="esp-shell esp-shell-density-comfortable">
72
72
  <Sidebar
73
73
  surface="glass"
@@ -134,6 +134,7 @@ Classes disponiveis:
134
134
  - `esp-quick-action-text`: texto que participa da expansao no hover
135
135
 
136
136
  Essas classes cuidam do visual do botao. Para o layout do topo, prefira usar as classes publicas `esp-shell-actions` e `esp-shell-header`.
137
+ Para headers mais densos, `Button size="xs"` reduz quick actions e botoes de texto sem criar outra variante de componente.
137
138
 
138
139
  Exemplo:
139
140
 
@@ -145,16 +146,16 @@ import { FiBell, FiPlus, FiSearch } from 'react-icons/fi';
145
146
  export function TopQuickActions() {
146
147
  return (
147
148
  <div style={{ display: 'flex', justifyContent: 'flex-end', gap: 8 }}>
148
- <Button variant="ghost" size="sm" className="esp-quick-action esp-quick-action-expand" aria-label="Buscar">
149
+ <Button variant="ghost" size="xs" className="esp-quick-action esp-quick-action-expand" aria-label="Buscar">
149
150
  <FiSearch />
150
151
  <span className="esp-quick-action-text">Buscar</span>
151
152
  </Button>
152
153
 
153
- <Button variant="ghost" size="sm" className="esp-quick-action esp-quick-action-outline" aria-label="Novo projeto">
154
+ <Button variant="ghost" size="xs" className="esp-quick-action esp-quick-action-outline" aria-label="Novo projeto">
154
155
  <FiPlus />
155
156
  </Button>
156
157
 
157
- <Button variant="ghost" size="sm" className="esp-quick-action esp-quick-action-soft" aria-label="Notificacoes">
158
+ <Button variant="ghost" size="xs" className="esp-quick-action esp-quick-action-soft" aria-label="Notificacoes">
158
159
  <FiBell />
159
160
  </Button>
160
161
  </div>
@@ -164,8 +165,9 @@ export function TopQuickActions() {
164
165
 
165
166
  ## Notas de Integracao
166
167
 
167
- - `Background` entrega a superficie e os patterns. Blobs borrados, cards glass e outros adornos dos exemplos continuam sendo estilos da aplicacao consumidora.
168
+ - `Background` entrega a superficie e os patterns. Use `variant="solid"` quando quiser um fundo neutro, sem blooms nem gradientes decorativos do preset. Blobs borrados, cards glass e outros adornos dos exemplos continuam sendo estilos da aplicacao consumidora.
168
169
  - `PageHeader` aceita qualquer `actions`, mas o layout do grupo de acoes continua sendo responsabilidade do app.
170
+ - `PageHeader` agora aceita `variant="page" | "section"` para trocar a escala do titulo e da descricao sem criar outro componente para subtitulos de area.
169
171
  - `Tabs` foi pensado para dois niveis: navegacao contextual (`Resumo`, `Timeline`, `Gantt`, `Calendario`) e troca de modo (`Dia`, `Semana`, `Mes`).
170
172
  - `Sidebar` agora expõe `surface="default" | "soft" | "glass"` como API publica para definir a superficie do menu lateral.
171
173
  - Itens do `Sidebar` aceitam `children` para submenu nativo. Em desktop o grupo abre no hover; em mobile o mesmo item funciona como toggle por clique.
@@ -187,7 +189,7 @@ export function TopQuickActions() {
187
189
 
188
190
  | Componente | Import | Uso minimo |
189
191
  | --- | --- | --- |
190
- | `Background` | `import { Background } from '@esperanca-ui/componentes'` | `<Background pattern="dots" />` |
192
+ | `Background` | `import { Background } from '@esperanca-ui/componentes'` | `<Background variant="solid" pattern="dots" />` |
191
193
  | `Button` | `import { Button } from '@esperanca-ui/componentes'` | `<Button>Salvar</Button>` |
192
194
  | `Card` | `import { Card } from '@esperanca-ui/componentes'` | `<Card><Card.Body>Conteudo</Card.Body></Card>` |
193
195
  | `MetricCard` | `import { MetricCard } from '@esperanca-ui/componentes'` | `<MetricCard value="42" title="Ativos" />` |
@@ -202,7 +204,7 @@ export function TopQuickActions() {
202
204
  | `BarChart` | `import { BarChart } from '@esperanca-ui/componentes'` | `<BarChart data={data} series={series} xAxisLabel="Mes" yAxisLabel="Valor" yAxisTickWidth={112} axisFontSize={11} valueLabelFontSize={10} valueLabelFontWeight={600} showValueLabels enableUserPreferences />` |
203
205
  | `Loading` | `import { Loading } from '@esperanca-ui/componentes'` | `<Loading variant="spinner" />` ou `<Loading fullScreen text="Validando acesso" />` |
204
206
  | `Modal` | `import { Modal } from '@esperanca-ui/componentes'` | `<Modal isOpen={open} onClose={...}>...</Modal>` |
205
- | `PageHeader` | `import { PageHeader } from '@esperanca-ui/componentes'` | `<PageHeader title="Clientes" />` |
207
+ | `PageHeader` | `import { PageHeader } from '@esperanca-ui/componentes'` | `<PageHeader title="Clientes" />` ou `<PageHeader variant="section" title="Filtros" />` |
206
208
  | `Tabs` | `import { Tabs } from '@esperanca-ui/componentes'` | `<Tabs items={items} variant="underline" />` |
207
209
  | `Portal` | `import { Portal } from '@esperanca-ui/componentes'` | `<Portal><div>Overlay</div></Portal>` |
208
210
  | `Radio` | `import { Radio } from '@esperanca-ui/componentes'` | `<Radio label="Opcao A" />` |
@@ -19815,7 +19815,7 @@ function x2({
19815
19815
  return /* @__PURE__ */ m("div", { className: "dt-root", children: /* @__PURE__ */ U("div", { className: `dt-panel${n === "glass" ? " dt-glass" : ""}`, children: [
19816
19816
  /* @__PURE__ */ U("div", { className: "dt-header", children: [
19817
19817
  /* @__PURE__ */ U("div", { className: "dt-search", children: [
19818
- /* @__PURE__ */ m(ko, { className: "dt-search-icon" }),
19818
+ /* @__PURE__ */ m("span", { className: "dt-search-icon", "aria-hidden": "true", children: /* @__PURE__ */ m(ko, {}) }),
19819
19819
  /* @__PURE__ */ m("input", { type: "text", placeholder: "Pesquisar...", value: k, onChange: (Q) => W(Q.target.value), className: "dt-search-input" })
19820
19820
  ] }),
19821
19821
  /* @__PURE__ */ U("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
@@ -20658,45 +20658,47 @@ const y2 = bt(function({
20658
20658
  const S2 = ({
20659
20659
  title: e,
20660
20660
  description: t,
20661
- inverted: r = !1,
20662
- actions: n,
20663
- breadcrumbs: a,
20664
- tabs: i,
20665
- sticky: s = !1,
20666
- className: o,
20667
- style: c,
20668
- ...l
20661
+ variant: r = "page",
20662
+ inverted: n = !1,
20663
+ actions: a,
20664
+ breadcrumbs: i,
20665
+ tabs: s,
20666
+ sticky: o = !1,
20667
+ className: c,
20668
+ style: l,
20669
+ ...f
20669
20670
  }) => {
20670
- const f = Pe(null), [u, h] = Oe(!1);
20671
+ const u = Pe(null), [h, p] = Oe(!1);
20671
20672
  return Fe(() => {
20672
- if (!s)
20673
+ if (!o)
20673
20674
  return;
20674
- const p = () => {
20675
- h(window.scrollY > 0);
20675
+ const g = () => {
20676
+ p(window.scrollY > 0);
20676
20677
  };
20677
- return window.addEventListener("scroll", p, { passive: !0 }), () => window.removeEventListener("scroll", p);
20678
- }, [s]), /* @__PURE__ */ U(
20678
+ return window.addEventListener("scroll", g, { passive: !0 }), () => window.removeEventListener("scroll", g);
20679
+ }, [o]), /* @__PURE__ */ U(
20679
20680
  "header",
20680
20681
  {
20681
- ref: f,
20682
+ ref: u,
20682
20683
  className: Ae(
20683
20684
  "esp-page-header",
20684
- s && "esp-page-header-sticky",
20685
- u && "esp-page-header-scrolled",
20686
- o
20685
+ `esp-page-header-variant-${r}`,
20686
+ o && "esp-page-header-sticky",
20687
+ h && "esp-page-header-scrolled",
20688
+ c
20687
20689
  ),
20688
- style: c,
20689
- ...l,
20690
+ style: l,
20691
+ ...f,
20690
20692
  children: [
20691
- a && /* @__PURE__ */ m("div", { className: "esp-page-header-breadcrumbs", children: a }),
20693
+ i && /* @__PURE__ */ m("div", { className: "esp-page-header-breadcrumbs", children: i }),
20692
20694
  /* @__PURE__ */ U("div", { className: "esp-page-header-row", children: [
20693
- /* @__PURE__ */ U("div", { className: Ae("esp-page-header-content", r && "esp-page-header-inverted"), children: [
20695
+ /* @__PURE__ */ U("div", { className: Ae("esp-page-header-content", n && "esp-page-header-inverted"), children: [
20694
20696
  /* @__PURE__ */ m("h1", { className: "esp-page-header-title", children: e }),
20695
20697
  t && /* @__PURE__ */ m("p", { className: "esp-page-header-description", children: t })
20696
20698
  ] }),
20697
- n && /* @__PURE__ */ m("div", { className: "esp-page-header-actions", children: n })
20699
+ a && /* @__PURE__ */ m("div", { className: "esp-page-header-actions", children: a })
20698
20700
  ] }),
20699
- i && /* @__PURE__ */ m("div", { className: "esp-page-header-tabs", children: i })
20701
+ s && /* @__PURE__ */ m("div", { className: "esp-page-header-tabs", children: s })
20700
20702
  ]
20701
20703
  }
20702
20704
  );
@@ -22965,20 +22967,21 @@ const t2 = 24 * 60 * 60 * 1e3, r2 = (e) => /^\d{4}-\d{2}-\d{2}$/.test(e), ra = (
22965
22967
  });
22966
22968
  function k2({
22967
22969
  theme: e,
22968
- gradient: t,
22969
- pattern: r = "none",
22970
- opacity: n,
22971
- blendMode: a,
22972
- fullScreen: i = !0,
22973
- children: s,
22974
- className: o,
22975
- style: c
22970
+ variant: t = "decorated",
22971
+ gradient: r,
22972
+ pattern: n = "none",
22973
+ opacity: a,
22974
+ blendMode: i,
22975
+ fullScreen: s = !0,
22976
+ children: o,
22977
+ className: c,
22978
+ style: l
22976
22979
  }) {
22977
- const l = {
22978
- ...c,
22979
- ...t ? { background: t } : {},
22980
- ...n !== void 0 ? { opacity: n } : {},
22981
- ...a ? { mixBlendMode: a } : {}
22980
+ const f = {
22981
+ ...l,
22982
+ ...r ? { background: r } : {},
22983
+ ...a !== void 0 ? { opacity: a } : {},
22984
+ ...i ? { mixBlendMode: i } : {}
22982
22985
  };
22983
22986
  return /* @__PURE__ */ m(
22984
22987
  "div",
@@ -22986,12 +22989,13 @@ function k2({
22986
22989
  className: Ae(
22987
22990
  "bg-wrap",
22988
22991
  e && `bg-wrap--${e}`,
22989
- !i && "bg-wrap--auto",
22990
- r !== "none" && `bg-pattern-${r}`,
22991
- o
22992
+ t === "solid" && "bg-wrap--solid",
22993
+ !s && "bg-wrap--auto",
22994
+ n !== "none" && `bg-pattern-${n}`,
22995
+ c
22992
22996
  ),
22993
- style: l,
22994
- children: s
22997
+ style: f,
22998
+ children: o
22995
22999
  }
22996
23000
  );
22997
23001
  }