@esperanca-ui/componentes 2.14.17 → 2.14.18

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
@@ -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>
@@ -166,6 +167,7 @@ export function TopQuickActions() {
166
167
 
167
168
  - `Background` entrega a superficie e os patterns. 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.
@@ -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
  );