@aspprev/versi-ds 0.5.6 → 0.5.9

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
@@ -170,45 +170,32 @@ O servidor usa a porta `6006`. Para a configuração standalone:
170
170
  npm run storybook:standalone
171
171
  ```
172
172
 
173
- A árvore da documentação é organizada assim:
173
+ A árvore da documentação usa os nomes técnicos abaixo; a interface apresenta rótulos em português:
174
174
 
175
175
  ```text
176
176
  Getting Started
177
- ├── Introduction
178
- ├── Installation
179
- ├── Usage
180
- └── Contributing
177
+ Introduction · Installation · Usage · Contributing
181
178
 
182
179
  Foundations
183
- ├── Overview
184
- ├── Colors
185
- ├── Typography
186
- ├── Spacing
187
- └── Shadows
180
+ Overview · Colors · Typography · Spacing · Shadows · Borders · Icons
188
181
 
189
182
  Components
190
- ├── Actions
191
- ├── Forms
192
- ├── Feedback
193
- ├── Data Display
194
- ├── Documents
195
- ├── Navigation
196
- ├── Overlay
197
- ├── Layout
198
- └── Accessibility
183
+ Overview (catálogo com busca)
184
+ Actions · Forms · Feedback · Data Display · Documents
185
+ Navigation · Overlay · Layout · Accessibility · Utilities
199
186
 
200
187
  Patterns
201
- ├── Forms
202
- └── Feedback
188
+ Overview · Forms · Feedback · Data/Table · Documents/UploadFlow
189
+ Forms/FormStates · Forms/ValidationStates · Forms/FormValidation
203
190
 
204
191
  Themes
205
- ├── Overview
206
- ├── Comparison
207
- └── ThemeLab
192
+ Overview · Comparison · ThemeLab
208
193
 
209
194
  Guidelines
210
- ├── Accessibility
211
- └── Usage
195
+ Accessibility · Usage · ComponentChoice · Compatibility
196
+
197
+ Laboratory
198
+ Forms/PlaceholderComparison · Forms/ValidationLayout
212
199
  ```
213
200
 
214
201
  A toolbar permite comparar esquema de cores, preset, contraste, escala de fonte e movimento reduzido. O addon de acessibilidade permanece disponível para inspeção manual e os testes automatizados usam Axe nos cenários visuais.
@@ -217,6 +204,7 @@ A toolbar permite comparar esquema de cores, preset, contraste, escala de fonte
217
204
 
218
205
  ```bash
219
206
  npm run tokens:check
207
+ npm run check:generated
220
208
  npm run typecheck
221
209
  npm test
222
210
  npm run build
@@ -226,7 +214,7 @@ npm run check:package
226
214
  npm run prepack
227
215
  ```
228
216
 
229
- O script `prepack` valida tokens, governança, segurança, lint, TypeScript, build, tamanho e conteúdo do pacote.
217
+ O script `prepack` valida tokens e bandeiras geradas, governança, segurança, lint, TypeScript, build, tamanho e conteúdo do pacote. `npm run lint -- --max-warnings=0` cobre fontes, histórias, testes, scripts, configurações e o piloto, preservando o snapshot auditado de terceiros fora da análise de estilo.
230
218
 
231
219
  Os workflows compartilham as validações de segurança, pacote e consumidores.
232
220
  Consulte [segurança do build e compatibilidade](docs/SEGURANCA-BUILD-COMPATIBILIDADE.md)
@@ -254,12 +242,17 @@ const root = document.documentElement;
254
242
  root.dataset.colorScheme = "dark";
255
243
  root.dataset.dsTheme = "azul1";
256
244
  root.dataset.contrast = "high";
245
+ root.dataset.contrastTheme = "dark";
257
246
  root.dataset.fontScale = "large";
258
247
  root.dataset.motion = "reduce";
259
248
  ```
260
249
 
261
250
  Os valores válidos estão documentados em **Themes/Overview** no Storybook. Prefira tokens semânticos, como `--surface-page`, `--content-primary`, `--border-default` e `--focus-ring`, em vez de copiar valores de uma paleta.
262
251
 
252
+ As identidades de cliente `basf`, `funssest`, `maisprevidencia`, `aceprev`, `cibrius`, `serpros` e `einvest` oferecem claro, escuro e alto contraste claro/escuro. Os presets legados continuam disponíveis. Consulte o [guia de integração e diferenças dos snapshots](docs/temas-clientes/INTEGRACAO.md) e **Temas → Clientes** no Storybook. As paletas são propostas para revisão visual.
253
+
254
+ As entradas raiz e `/core` exportam `CLIENT_THEMES`, `LEGACY_THEMES`, `DESIGN_SYSTEM_THEMES` e os tipos `ClientTheme` e `DesignSystemTheme` para construir seletores no consumidor.
255
+
263
256
  ## Contribuição
264
257
 
265
258
  Ao criar ou alterar um componente:
package/dist/charts.js CHANGED
@@ -12,7 +12,7 @@ import {
12
12
  normalizeTimeSeriesTooltipColor,
13
13
  resolveInteractiveDonutColors,
14
14
  resolveRelativeDonutSelection
15
- } from "./chunk-HKCVDOGK.js";
15
+ } from "./chunk-YEUOULSF.js";
16
16
  export {
17
17
  InteractiveDonutChart,
18
18
  LazyApexChart,
@@ -93,11 +93,11 @@ var VARIANT_STYLES = {
93
93
  flat: {
94
94
  disabled: `cursor-not-allowed border-disabled bg-surface-disabled text-content-disabled`,
95
95
  default: {
96
- primary: `bg-action-primary text-action-primary-content hover:bg-action-primary-hover active:bg-action-primary-active`,
97
- secondary: `bg-action-secondary text-action-secondary-content hover:bg-action-secondary-hover active:bg-action-secondary-active`,
96
+ primary: `bg-action-primary text-action-primary-content hover:bg-action-primary-hover hover:text-action-primary-content-hover active:bg-action-primary-active active:text-action-primary-content-active`,
97
+ secondary: `bg-action-secondary text-action-secondary-content hover:bg-action-secondary-hover hover:text-action-secondary-content-hover active:bg-action-secondary-active active:text-action-secondary-content-active`,
98
98
  tertiary: `bg-action-tertiary text-action-tertiary-content opacity-100 hover:bg-action-tertiary-hover active:bg-action-tertiary-active`,
99
- danger: `bg-action-danger text-action-danger-content hover:bg-action-danger-hover active:bg-action-danger-active`,
100
- warning: `bg-action-warning text-action-warning-content hover:bg-action-warning-hover active:bg-action-warning-active`
99
+ danger: `bg-action-danger text-action-danger-content hover:bg-action-danger-hover hover:text-action-danger-content-hover active:bg-action-danger-active active:text-action-danger-content-active`,
100
+ warning: `bg-action-warning text-action-warning-content hover:bg-action-warning-hover hover:text-action-warning-content-hover active:bg-action-warning-active active:text-action-warning-content-active`
101
101
  }
102
102
  },
103
103
  outline: {
@@ -1361,7 +1361,7 @@ var Slider = ({
1361
1361
  ]
1362
1362
  }
1363
1363
  ),
1364
- ticks.map((tick, idx) => {
1364
+ ticks.map((_tick, idx) => {
1365
1365
  return /* @__PURE__ */ jsx19(
1366
1366
  "div",
1367
1367
  {
@@ -1626,6 +1626,7 @@ function PageHeading({
1626
1626
  }
1627
1627
 
1628
1628
  // src/components/page-tabs/PageTabsHeader.tsx
1629
+ import { useRef as useRef3 } from "react";
1629
1630
  import { jsx as jsx24, jsxs as jsxs14 } from "react/jsx-runtime";
1630
1631
  function PageTabsHeader({
1631
1632
  title,
@@ -1635,6 +1636,9 @@ function PageTabsHeader({
1635
1636
  className = "",
1636
1637
  size = "default"
1637
1638
  }) {
1639
+ const tabRefs = useRef3(/* @__PURE__ */ new Map());
1640
+ const enabledTabs = tabs.filter((tab) => !tab.disabled);
1641
+ const entryTab = enabledTabs.find((tab) => tab.id === activeTab)?.id ?? enabledTabs[0]?.id;
1638
1642
  return /* @__PURE__ */ jsxs14(
1639
1643
  "div",
1640
1644
  {
@@ -1645,24 +1649,41 @@ function PageTabsHeader({
1645
1649
  "nav",
1646
1650
  {
1647
1651
  "aria-label": title,
1648
- className: "flex w-auto flex-row flex-nowrap items-end gap-3 overflow-x-auto tablet:w-fit tablet:shrink-0 tablet:justify-end tablet:overflow-visible",
1649
- children: /* @__PURE__ */ jsx24("div", { role: "tablist", className: "flex flex-nowrap items-end gap-3", children: tabs.map((tab) => {
1652
+ className: "flex w-auto flex-row flex-nowrap items-end gap-3 overflow-x-auto p-1 tablet:w-fit tablet:shrink-0 tablet:justify-end tablet:overflow-visible",
1653
+ children: /* @__PURE__ */ jsx24("div", { role: "tablist", "aria-label": title, className: "flex flex-nowrap items-end gap-3", children: tabs.map((tab) => {
1650
1654
  const Icon = tab.icon;
1651
1655
  const isActive = activeTab === tab.id;
1652
1656
  return /* @__PURE__ */ jsxs14(
1653
1657
  "button",
1654
1658
  {
1655
1659
  type: "button",
1660
+ ref: (element) => {
1661
+ if (element) tabRefs.current.set(tab.id, element);
1662
+ else tabRefs.current.delete(tab.id);
1663
+ },
1656
1664
  role: "tab",
1665
+ tabIndex: tab.id === entryTab ? 0 : -1,
1657
1666
  "aria-selected": isActive,
1658
1667
  "aria-current": isActive ? "page" : void 0,
1659
1668
  disabled: tab.disabled,
1660
1669
  onClick: () => onTabChange(tab.id),
1661
- className: `inline-flex items-center gap-1 whitespace-nowrap border-b-[3px] transition-colors duration-200 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-1 disabled:cursor-not-allowed disabled:opacity-50 tablet:px-1 ${size === "small" ? "px-0.5 py-0 text-sm" : "p-0.5 text-base"} ${isActive ? "border-primary-1 font-semibold text-primary-1" : "border-transparent text-content-secondary hover:text-content-muted"}`,
1670
+ onKeyDown: (event) => {
1671
+ if (!["ArrowLeft", "ArrowRight", "Home", "End"].includes(event.key)) return;
1672
+ event.preventDefault();
1673
+ const index = enabledTabs.findIndex((item) => item.id === tab.id);
1674
+ const rtl = getComputedStyle(event.currentTarget).direction === "rtl";
1675
+ const forward = event.key === (rtl ? "ArrowLeft" : "ArrowRight");
1676
+ const targetIndex = event.key === "Home" ? 0 : event.key === "End" ? enabledTabs.length - 1 : (index + (forward ? 1 : -1) + enabledTabs.length) % enabledTabs.length;
1677
+ const target = enabledTabs[targetIndex];
1678
+ if (!target) return;
1679
+ tabRefs.current.get(target.id)?.focus();
1680
+ onTabChange(target.id);
1681
+ },
1682
+ className: `inline-flex items-center gap-1 whitespace-nowrap border-b-[3px] transition-colors duration-200 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus-ring disabled:cursor-not-allowed disabled:opacity-50 tablet:px-1 ${size === "small" ? "px-0.5 py-0 text-sm" : "p-0.5 text-base"} ${isActive ? "border-content-link font-semibold text-content-link" : "border-transparent text-content-secondary hover:text-content-muted"}`,
1662
1683
  children: [
1663
1684
  Icon && /* @__PURE__ */ jsx24(Icon, { "aria-hidden": "true", className: "h-4 w-4 shrink-0" }),
1664
1685
  /* @__PURE__ */ jsx24("span", { children: tab.label }),
1665
- tab.notification !== void 0 && tab.notification !== null && /* @__PURE__ */ jsx24("span", { className: "inline-flex min-h-4 min-w-4 items-center justify-center rounded-full bg-feedback-danger-strong px-1 text-2xs font-bold text-action-tertiary-content", children: tab.notification })
1686
+ tab.notification !== void 0 && tab.notification !== null && /* @__PURE__ */ jsx24("span", { className: "inline-flex min-h-4 min-w-4 items-center justify-center rounded-full bg-feedback-danger-strong px-1 text-2xs font-bold text-feedback-danger-on-strong", children: tab.notification })
1666
1687
  ]
1667
1688
  },
1668
1689
  tab.id
@@ -1812,8 +1833,8 @@ import classNames12 from "classnames";
1812
1833
  import { jsx as jsx27 } from "react/jsx-runtime";
1813
1834
  var COLOR_STYLES = {
1814
1835
  primary: {
1815
- outline: "border-primary-1 text-primary-1",
1816
- soft: "border-primary-1 bg-primary-5 text-primary-2",
1836
+ outline: "border-status-primary-outline-border text-status-primary-outline-foreground",
1837
+ soft: "border-status-primary-outline-border bg-status-primary-soft-background text-status-primary-soft-foreground",
1817
1838
  solid: "border-action-primary bg-action-primary text-action-primary-content"
1818
1839
  },
1819
1840
  blue: {
@@ -2060,7 +2081,7 @@ import React4, { useEffect as useEffect8, useId as useId3, useMemo as useMemo2,
2060
2081
  import {
2061
2082
  useEffect as useEffect7,
2062
2083
  useId as useId2,
2063
- useRef as useRef4,
2084
+ useRef as useRef5,
2064
2085
  useState as useState3
2065
2086
  } from "react";
2066
2087
  import {
@@ -2074,7 +2095,7 @@ import {
2074
2095
 
2075
2096
  // src/components/table/components/filter/FilterView.tsx
2076
2097
  import cs3 from "classnames";
2077
- import { useEffect as useEffect6, useRef as useRef3 } from "react";
2098
+ import { useEffect as useEffect6, useRef as useRef4 } from "react";
2078
2099
  import { jsx as jsx30, jsxs as jsxs17 } from "react/jsx-runtime";
2079
2100
  function FilterView({
2080
2101
  id,
@@ -2095,7 +2116,7 @@ function FilterView({
2095
2116
  const handleControlChange = (control, event) => {
2096
2117
  onControlChange?.(control, event.target.value);
2097
2118
  };
2098
- const containerRef = useRef3(null);
2119
+ const containerRef = useRef4(null);
2099
2120
  useEffect6(() => {
2100
2121
  if (!containerRef.current) return;
2101
2122
  containerRef.current.style.maxHeight = maxHeight ? `${maxHeight}px` : "";
@@ -2138,7 +2159,7 @@ function FilterView({
2138
2159
  {
2139
2160
  className: cs3(
2140
2161
  "min-h-6 flex items-start gap-2 px-3 py-0.5 cursor-pointer rounded",
2141
- control.value === option.value ? "bg-primary-5 text-primary-1" : "text-content-primary"
2162
+ control.value === option.value ? "bg-selection-background text-selection-content" : "text-content-primary"
2142
2163
  ),
2143
2164
  children: [
2144
2165
  /* @__PURE__ */ jsx30(
@@ -2184,7 +2205,7 @@ function FilterView({
2184
2205
  {
2185
2206
  className: cs3(
2186
2207
  "min-h-10 flex items-start gap-2 px-3 py-1 cursor-pointer rounded",
2187
- optionChecked === option.value ? "bg-primary-5 text-primary-1" : "text-content-primary"
2208
+ optionChecked === option.value ? "bg-selection-background text-selection-content" : "text-content-primary"
2188
2209
  ),
2189
2210
  children: [
2190
2211
  /* @__PURE__ */ jsx30(
@@ -2288,11 +2309,11 @@ function TableView({
2288
2309
  const [filterMaxHeight, setFilterMaxHeight] = useState3();
2289
2310
  const [filterCoords, setFilterCoords] = useState3(null);
2290
2311
  const [tableWidth, setTableWidth] = useState3();
2291
- const scrollContainerRef = useRef4(null);
2292
- const tableWrapperRef = useRef4(null);
2293
- const headerCellRefs = useRef4([]);
2294
- const filterTriggerRefs = useRef4([]);
2295
- const filterRef = useRef4(null);
2312
+ const scrollContainerRef = useRef5(null);
2313
+ const tableWrapperRef = useRef5(null);
2314
+ const headerCellRefs = useRef5([]);
2315
+ const filterTriggerRefs = useRef5([]);
2316
+ const filterRef = useRef5(null);
2296
2317
  useEffect7(() => {
2297
2318
  const wrapper = tableWrapperRef.current;
2298
2319
  if (!wrapper) return;
@@ -3241,6 +3262,34 @@ function useContainerBreakpoint(ref, options = {}) {
3241
3262
  return current;
3242
3263
  }
3243
3264
 
3265
+ // src/theme-presets.ts
3266
+ var LEGACY_THEMES = [
3267
+ "default",
3268
+ "azul1",
3269
+ "azul2",
3270
+ "azul3",
3271
+ "laranja1",
3272
+ "laranja2",
3273
+ "verde1",
3274
+ "verde2",
3275
+ "verde3",
3276
+ "verde4",
3277
+ "rosa1"
3278
+ ];
3279
+ var CLIENT_THEMES = [
3280
+ { id: "basf", label: "BASF" },
3281
+ { id: "funssest", label: "FUNSSEST" },
3282
+ { id: "maisprevidencia", label: "Mais Previd\xEAncia" },
3283
+ { id: "aceprev", label: "ACEPREV" },
3284
+ { id: "cibrius", label: "Cibrius" },
3285
+ { id: "serpros", label: "SERPROS" },
3286
+ { id: "einvest", label: "E-Invest" }
3287
+ ];
3288
+ var DESIGN_SYSTEM_THEMES = [
3289
+ ...LEGACY_THEMES,
3290
+ ...CLIENT_THEMES.map((theme) => theme.id)
3291
+ ];
3292
+
3244
3293
  export {
3245
3294
  LoadingDotsView_default,
3246
3295
  Button_default,
@@ -3280,6 +3329,9 @@ export {
3280
3329
  Table_default,
3281
3330
  MobileCardTable_default,
3282
3331
  resolveContainerBreakpoint,
3283
- useContainerBreakpoint
3332
+ useContainerBreakpoint,
3333
+ LEGACY_THEMES,
3334
+ CLIENT_THEMES,
3335
+ DESIGN_SYSTEM_THEMES
3284
3336
  };
3285
- //# sourceMappingURL=chunk-2KJU6VM4.js.map
3337
+ //# sourceMappingURL=chunk-2XE4FX42.js.map