@aspprev/versi-ds 0.4.9 → 0.5.3

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/dist/core.d.ts CHANGED
@@ -284,11 +284,11 @@ declare function PageTabsHeader({ title, tabs, activeTab, onTabChange, className
284
284
  type OptionalValuePolicy = "hide" | "placeholder";
285
285
 
286
286
  declare const COLUMN_STYLES: {
287
- readonly 1: "grid-cols-1";
288
- readonly 2: "grid-cols-1 mobile:grid-cols-2";
289
- readonly 3: "grid-cols-1 mobile:grid-cols-2 tablet:grid-cols-3";
290
- readonly 4: "grid-cols-1 mobile:grid-cols-2 desktop:grid-cols-4";
291
- readonly 6: "grid-cols-1 mobile:grid-cols-2 tablet:grid-cols-3 desktop:grid-cols-6";
287
+ readonly 1: "versi-info-grid--1";
288
+ readonly 2: "versi-info-grid--2";
289
+ readonly 3: "versi-info-grid--3";
290
+ readonly 4: "versi-info-grid--4";
291
+ readonly 6: "versi-info-grid--6";
292
292
  };
293
293
  interface InfoGridProps extends ComponentProps<"dl"> {
294
294
  columns?: keyof typeof COLUMN_STYLES;
@@ -314,23 +314,35 @@ interface FilterBarProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"
314
314
  declare function FilterBar({ filters, actions, columns, className, actionClassName, ...rest }: FilterBarProps): React.JSX.Element;
315
315
 
316
316
  type StatusDomain = "generic" | "beneficiary" | "document" | "loan" | "benefit" | "signature" | "participation" | "claim" | "payment" | "protocol" | "request";
317
+ type StatusBadgeColor = "primary" | "blue" | "green" | "orange" | "yellow" | "red" | "slate" | "black";
318
+ /** @deprecated Use StatusBadgeColor in new status maps. */
317
319
  type StatusTone = "info" | "warning" | "success" | "danger" | "neutral";
318
320
  type StatusAppearance = "outline" | "soft" | "solid";
319
- interface ResolvedStatusAppearance {
321
+ interface StatusAppearanceConfig {
322
+ color: StatusBadgeColor;
323
+ appearance: StatusAppearance;
324
+ }
325
+ /** Legacy map value accepted so existing consumers can migrate incrementally. */
326
+ interface LegacyStatusAppearanceConfig {
320
327
  tone: StatusTone;
321
328
  appearance: StatusAppearance;
322
329
  }
323
- /**
324
- * Map owned by the consuming application. Keys are normalized with
325
- * `normalizeStatus` before lookup, so accented and differently-cased labels
326
- * can be used safely by consumers.
327
- */
328
- type StatusAppearanceMap = Readonly<Record<string, ResolvedStatusAppearance>>;
330
+ type StatusAppearanceMap = Readonly<Record<string, StatusAppearanceConfig | LegacyStatusAppearanceConfig>>;
329
331
  interface StatusResolverOptions {
330
332
  map?: StatusAppearanceMap;
331
- fallback?: ResolvedStatusAppearance;
333
+ color?: StatusBadgeColor;
334
+ tone?: StatusTone;
335
+ appearance?: StatusAppearance;
336
+ fallback?: StatusAppearanceConfig;
332
337
  }
338
+ type ResolvedStatusAppearance = StatusAppearanceConfig;
333
339
  declare const normalizeStatus: (status: unknown) => string;
340
+ /**
341
+ * Resolves only consumer configuration. Status names intentionally have no
342
+ * built-in business mapping in the Design System.
343
+ *
344
+ * Precedence: statusMap, explicit color, legacy tone, fallback.
345
+ */
334
346
  declare const resolveStatusAppearance: (status: unknown, domain?: StatusDomain, options?: StatusResolverOptions) => ResolvedStatusAppearance;
335
347
 
336
348
  declare const SIZE_STYLES: {
@@ -339,6 +351,7 @@ declare const SIZE_STYLES: {
339
351
  };
340
352
  interface StatusBadgeProps extends Omit<HTMLAttributes<HTMLSpanElement>, "children"> {
341
353
  children: ReactNode;
354
+ color?: StatusBadgeColor;
342
355
  tone?: StatusTone;
343
356
  appearance?: StatusAppearance;
344
357
  size?: keyof typeof SIZE_STYLES;
@@ -346,18 +359,19 @@ interface StatusBadgeProps extends Omit<HTMLAttributes<HTMLSpanElement>, "childr
346
359
  /** Adds a non-color status announcement for assistive technology. */
347
360
  statusLabel?: string;
348
361
  }
349
- declare function StatusBadge({ children, tone, appearance, size, overflow, statusLabel, className, title, ...rest }: StatusBadgeProps): React.JSX.Element;
350
- declare const getStatusBadgeClassName: (tone: StatusTone, appearance: StatusAppearance) => string;
362
+ declare function StatusBadge({ children, color, tone, appearance, size, overflow, statusLabel, className, title, ...rest }: StatusBadgeProps): React.JSX.Element;
363
+ declare const getStatusBadgeClassName: (colorOrTone: StatusBadgeColor | StatusTone, appearance: StatusAppearance) => string;
351
364
 
352
- interface DomainStatusBadgeProps extends Omit<ComponentProps<typeof StatusBadge>, "children" | "tone" | "appearance"> {
365
+ interface DomainStatusBadgeProps extends Omit<ComponentProps<typeof StatusBadge>, "children"> {
353
366
  status?: string | null;
354
367
  domain?: StatusDomain;
355
368
  empty?: "hide" | "placeholder";
356
369
  placeholder?: string;
357
370
  /** Optional consumer-owned map for statuses specific to a product domain. */
358
371
  statusMap?: StatusAppearanceMap;
372
+ fallback?: StatusAppearanceConfig;
359
373
  }
360
- declare function DomainStatusBadge({ status, domain, empty, placeholder, statusMap, ...rest }: DomainStatusBadgeProps): React.JSX.Element | null;
374
+ declare function DomainStatusBadge({ status, domain, empty, placeholder, statusMap, fallback, color, tone, appearance, ...rest }: DomainStatusBadgeProps): React.JSX.Element | null;
361
375
 
362
376
  interface SkipLinkProps {
363
377
  targetId?: string;
@@ -531,4 +545,4 @@ interface UseContainerBreakpointOptions {
531
545
  declare function resolveContainerBreakpoint(width: number, breakpoints?: ContainerBreakpointMap): ContainerBreakpoint;
532
546
  declare function useContainerBreakpoint<TElement extends HTMLElement = HTMLElement>(ref: RefObject<TElement | null>, options?: UseContainerBreakpointOptions): ContainerBreakpoint;
533
547
 
534
- export { Avatar, type AvatarProps, type BoxProps, type Breakpoint, Button, type ButtonProps, CheckBox, type CheckBoxProps, Checkbox, type CheckboxProps, CircularLoading, type CircularLoadingProps, type ContainerBreakpoint, type ContainerBreakpointMap, Divider, DomainStatusBadge, type DomainStatusBadgeProps, FilterBar, type FilterBarProps, FocusNavigationMode, FormActions, type FormActionsProps, FormErrorNavigation, FormGrid, type FormGridProps, type IFilterControl, type IFilterOption, type IFilterProps, type IHeaderItem, type IMobileCardTableExpandableConfig, type IMobileCardTableHeader, type ITableColumnConfig, type ITableExpandableConfig, type ITablePaginationProps, IconProvider, type IconProviderProps, InfoGrid, type InfoGridProps, InfoItem, type InfoItemProps, InputSlider, type InputSliderProps, LoadingDots, type LoadingDotsProps, MobileCardTable, type MobileCardTableProps, ModalCardView as ModalCard, type ModalCardProps, NoticeView as Notice, type OptionalValuePolicy, PageHeading, type PageHeadingBackAction, type PageHeadingProps, PageState, type PageStateProps, type PageStateVariant, type PageTabItem, PageTabsHeader, type PageTabsHeaderProps, PaginationView as Pagination, type PaginationProps, type PaginationSize, type PaginationVariant, IconProvider as PortalIconProvider, type ResolvedStatusAppearance, SkipLink, type SkipLinkProps, Slider, type SliderProps, type StatusAppearance, type StatusAppearanceMap, StatusBadge, type StatusBadgeProps, type StatusDomain, type StatusResolverOptions, type StatusTone, Surface, type SurfaceProps, Table, type TableDensity, type TableHeaderVariant, type TableOverflowMode, type TableProps, type TableRowVariant, TextGroup, type TextGroupProps, ThemedImage, type ThemedImageProps, Tooltip, type TooltipProps, Typography, Typography as TypographyComponent, type TypographyProps, type TypographySemanticRole, type UseContainerBreakpointOptions, breakpoints, findFirstInvalidField, getBreakpoint, getStatusBadgeClassName, normalizeStatus, resolveContainerBreakpoint, resolveStatusAppearance, useBreakpoint, useContainerBreakpoint };
548
+ export { Avatar, type AvatarProps, type BoxProps, type Breakpoint, Button, type ButtonProps, CheckBox, type CheckBoxProps, Checkbox, type CheckboxProps, CircularLoading, type CircularLoadingProps, type ContainerBreakpoint, type ContainerBreakpointMap, Divider, DomainStatusBadge, type DomainStatusBadgeProps, FilterBar, type FilterBarProps, FocusNavigationMode, FormActions, type FormActionsProps, FormErrorNavigation, FormGrid, type FormGridProps, type IFilterControl, type IFilterOption, type IFilterProps, type IHeaderItem, type IMobileCardTableExpandableConfig, type IMobileCardTableHeader, type ITableColumnConfig, type ITableExpandableConfig, type ITablePaginationProps, IconProvider, type IconProviderProps, InfoGrid, type InfoGridProps, InfoItem, type InfoItemProps, InputSlider, type InputSliderProps, type LegacyStatusAppearanceConfig, LoadingDots, type LoadingDotsProps, MobileCardTable, type MobileCardTableProps, ModalCardView as ModalCard, type ModalCardProps, NoticeView as Notice, type OptionalValuePolicy, PageHeading, type PageHeadingBackAction, type PageHeadingProps, PageState, type PageStateProps, type PageStateVariant, type PageTabItem, PageTabsHeader, type PageTabsHeaderProps, PaginationView as Pagination, type PaginationProps, type PaginationSize, type PaginationVariant, IconProvider as PortalIconProvider, type ResolvedStatusAppearance, SkipLink, type SkipLinkProps, Slider, type SliderProps, type StatusAppearance, type StatusAppearanceConfig, type StatusAppearanceMap, StatusBadge, type StatusBadgeColor, type StatusBadgeProps, type StatusDomain, type StatusResolverOptions, type StatusTone, Surface, type SurfaceProps, Table, type TableDensity, type TableHeaderVariant, type TableOverflowMode, type TableProps, type TableRowVariant, TextGroup, type TextGroupProps, ThemedImage, type ThemedImageProps, Tooltip, type TooltipProps, Typography, Typography as TypographyComponent, type TypographyProps, type TypographySemanticRole, type UseContainerBreakpointOptions, breakpoints, findFirstInvalidField, getBreakpoint, getStatusBadgeClassName, normalizeStatus, resolveContainerBreakpoint, resolveStatusAppearance, useBreakpoint, useContainerBreakpoint };
package/dist/core.js CHANGED
@@ -39,7 +39,7 @@ import {
39
39
  resolveStatusAppearance,
40
40
  typography_default,
41
41
  useContainerBreakpoint
42
- } from "./chunk-RMWSF4YF.js";
42
+ } from "./chunk-7GTKG537.js";
43
43
  import {
44
44
  DocumentItem
45
45
  } from "./chunk-2XXVEFFY.js";
@@ -2,7 +2,7 @@ import {
2
2
  COUNTRY_OPTIONS,
3
3
  filterCountryOptions,
4
4
  getCountryOptions
5
- } from "./chunk-7IY43S3Y.js";
5
+ } from "./chunk-IS7ACRMB.js";
6
6
 
7
7
  // src/countries-browser.ts
8
8
  var countryFlagUrls = {
package/dist/countries.js CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  COUNTRY_OPTIONS,
3
3
  filterCountryOptions,
4
4
  getCountryOptions
5
- } from "./chunk-7IY43S3Y.js";
5
+ } from "./chunk-IS7ACRMB.js";
6
6
 
7
7
  // src/data/country-flags.json
8
8
  var country_flags_default = {
package/dist/forms.d.ts CHANGED
@@ -116,7 +116,7 @@ type InputPhoneProps = {
116
116
  countryList?: CountryListFilter;
117
117
  disabled?: boolean;
118
118
  className?: string;
119
- /** Exibe as bandeiras do país. O padrão é true. */
119
+ /** Exibe a bandeira no input. A lista de países sempre mantém as bandeiras. Padrão: true. */
120
120
  showFlags?: boolean;
121
121
  };
122
122
  declare function buildPhonePayload(phoneValue: PhoneValue | Partial<PhoneValue> | null | undefined): string;
@@ -210,7 +210,7 @@ type SelectCountryProps = Omit<React__default.ComponentProps<typeof InputSelect>
210
210
  options?: SelectCountryOption[];
211
211
  /** Use `all` (padrao), `include` ou `exclude` com codigos ISO-2. */
212
212
  countryList?: CountryListFilter;
213
- /** Exibe as bandeiras dos países. O padrão é true. */
213
+ /** Exibe a bandeira no campo. A lista de países sempre mantém as bandeiras. Padrão: true. */
214
214
  showFlags?: boolean;
215
215
  };
216
216
  declare function SelectCountry({ options, countryList, searchable, searchPlaceholder, noOptionsText, defaultValue, onChange, className, showFlags, ...props }: SelectCountryProps): React__default.JSX.Element;
package/dist/forms.js CHANGED
@@ -17,9 +17,9 @@ import {
17
17
  buildPhonePayload,
18
18
  datePicker_default,
19
19
  parsePhonePayload
20
- } from "./chunk-47GMEVB5.js";
20
+ } from "./chunk-2CPV3WH5.js";
21
21
  import "./chunk-MMTKCHRP.js";
22
- import "./chunk-7IY43S3Y.js";
22
+ import "./chunk-IS7ACRMB.js";
23
23
  export {
24
24
  CountrySelect,
25
25
  datePicker_default as DatePicker,
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { Avatar, AvatarProps, BoxProps, Breakpoint, Button, ButtonProps, CheckBox, CheckBoxProps, Checkbox, CheckboxProps, CircularLoading, CircularLoadingProps, ContainerBreakpoint, ContainerBreakpointMap, Divider, DomainStatusBadge, DomainStatusBadgeProps, FilterBar, FilterBarProps, FocusNavigationMode, FormActions, FormActionsProps, FormErrorNavigation, FormGrid, FormGridProps, IFilterControl, IFilterOption, IFilterProps, IHeaderItem, IMobileCardTableExpandableConfig, IMobileCardTableHeader, ITableColumnConfig, ITableExpandableConfig, ITablePaginationProps, IconProvider, IconProviderProps, InfoGrid, InfoGridProps, InfoItem, InfoItemProps, InputSlider, InputSliderProps, LoadingDots, LoadingDotsProps, MobileCardTable, MobileCardTableProps, ModalCard, ModalCardProps, Notice, OptionalValuePolicy, PageHeading, PageHeadingBackAction, PageHeadingProps, PageState, PageStateProps, PageStateVariant, PageTabItem, PageTabsHeader, PageTabsHeaderProps, Pagination, PaginationProps, PaginationSize, PaginationVariant, IconProvider as PortalIconProvider, ResolvedStatusAppearance, SkipLink, SkipLinkProps, Slider, SliderProps, StatusAppearance, StatusAppearanceMap, StatusBadge, StatusBadgeProps, StatusDomain, StatusResolverOptions, StatusTone, Surface, SurfaceProps, Table, TableDensity, TableHeaderVariant, TableOverflowMode, TableProps, TableRowVariant, TextGroup, TextGroupProps, ThemedImage, ThemedImageProps, Tooltip, TooltipProps, Typography, Typography as TypographyComponent, TypographyProps, TypographySemanticRole, UseContainerBreakpointOptions, breakpoints, findFirstInvalidField, getBreakpoint, getStatusBadgeClassName, normalizeStatus, resolveContainerBreakpoint, resolveStatusAppearance, useBreakpoint, useContainerBreakpoint } from './core.js';
1
+ export { Avatar, AvatarProps, BoxProps, Breakpoint, Button, ButtonProps, CheckBox, CheckBoxProps, Checkbox, CheckboxProps, CircularLoading, CircularLoadingProps, ContainerBreakpoint, ContainerBreakpointMap, Divider, DomainStatusBadge, DomainStatusBadgeProps, FilterBar, FilterBarProps, FocusNavigationMode, FormActions, FormActionsProps, FormErrorNavigation, FormGrid, FormGridProps, IFilterControl, IFilterOption, IFilterProps, IHeaderItem, IMobileCardTableExpandableConfig, IMobileCardTableHeader, ITableColumnConfig, ITableExpandableConfig, ITablePaginationProps, IconProvider, IconProviderProps, InfoGrid, InfoGridProps, InfoItem, InfoItemProps, InputSlider, InputSliderProps, LegacyStatusAppearanceConfig, LoadingDots, LoadingDotsProps, MobileCardTable, MobileCardTableProps, ModalCard, ModalCardProps, Notice, OptionalValuePolicy, PageHeading, PageHeadingBackAction, PageHeadingProps, PageState, PageStateProps, PageStateVariant, PageTabItem, PageTabsHeader, PageTabsHeaderProps, Pagination, PaginationProps, PaginationSize, PaginationVariant, IconProvider as PortalIconProvider, ResolvedStatusAppearance, SkipLink, SkipLinkProps, Slider, SliderProps, StatusAppearance, StatusAppearanceConfig, StatusAppearanceMap, StatusBadge, StatusBadgeColor, StatusBadgeProps, StatusDomain, StatusResolverOptions, StatusTone, Surface, SurfaceProps, Table, TableDensity, TableHeaderVariant, TableOverflowMode, TableProps, TableRowVariant, TextGroup, TextGroupProps, ThemedImage, ThemedImageProps, Tooltip, TooltipProps, Typography, Typography as TypographyComponent, TypographyProps, TypographySemanticRole, UseContainerBreakpointOptions, breakpoints, findFirstInvalidField, getBreakpoint, getStatusBadgeClassName, normalizeStatus, resolveContainerBreakpoint, resolveStatusAppearance, useBreakpoint, useContainerBreakpoint } from './core.js';
2
2
  export { AccessibilityColorScheme, AccessibilityFontScale, AccessibilityHighContrastTheme, AccessibilityPreferences, AccessibilityPreferencesPanel, AccessibilityPreferencesPanelProps, ContrastPreference, ContrastPreferenceProps, DEFAULT_ACCESSIBILITY_PREFERENCES, FontSizePreference, FontSizePreferenceProps, HighContrastToggle, HighContrastToggleProps, InputSwitch, InputSwitchProps, Modal, ModalProps, ReadingPreferences, ReadingPreferencesProps, ThemePreference, ThemePreferenceProps } from './overlays.js';
3
3
  export { CountrySelect, CountrySelectOption, CountrySelectProps, DatePicker, DatePickerNavigationVariant, DatePickerProps, DatePickerSelectionMode, Datepicker, DatepickerNavigationVariant, DatepickerProps, Input, InputFormatter, InputMask, InputPhone, InputPhoneCountryOption, InputPhoneProps, InputPhoneValue, InputProps, InputSelect, InputSelectOption, InputSelectProps, InputStandalone, InputStandaloneProps, MultiSelect, MultiSelectOption, MultiSelectProps, MultiSelectViewProps, OtpCodeInput, OtpCodeInputHandle, OtpCodeInputMask, OtpCodeInputProps, PhoneCountryOption, PhoneInput, PhoneInputProps, PhoneValue, RadioCardGroup, RadioCardGroupProps, RadioCardOption, RadioGroup, RadioGroupProps, SelectCountry, SelectCountryOption, SelectCountryProps, SelectMulti, SelectMultiOption, SelectMultiProps, SelectMultiViewProps, TextArea, TextAreaProps, buildPhonePayload, parsePhonePayload } from './forms.js';
4
4
  export { BoletoBarCode, BoletoBarCodeProps, FileDropzone, FileDropzoneProps, FileList, FileListProps, FileRejection, FileRejectionContext, FileUploadItem, FileUploadItemStatus, FileUploadProgress, FileUploadProgressProps, FileUploadProgressStatus, FileValidationMessage, FileValidationOptions, FileValidationReason, FileValidationResult, FileViewer, FileViewerProps, FileViewerSource, FileViewerSourceInput, QRCode, QRCodeErrorCorrectionLevel, QRCodeProps, validateFiles } from './documents.js';
package/dist/index.js CHANGED
@@ -53,7 +53,7 @@ import {
53
53
  resolveStatusAppearance,
54
54
  typography_default,
55
55
  useContainerBreakpoint
56
- } from "./chunk-RMWSF4YF.js";
56
+ } from "./chunk-7GTKG537.js";
57
57
  import {
58
58
  BoletoBarCode,
59
59
  FileDropzone_default,
@@ -84,14 +84,14 @@ import {
84
84
  buildPhonePayload,
85
85
  datePicker_default,
86
86
  parsePhonePayload
87
- } from "./chunk-47GMEVB5.js";
87
+ } from "./chunk-2CPV3WH5.js";
88
88
  import {
89
89
  Tooltip_default,
90
90
  breakpoints,
91
91
  getBreakpoint,
92
92
  useBreakpoint
93
93
  } from "./chunk-MMTKCHRP.js";
94
- import "./chunk-7IY43S3Y.js";
94
+ import "./chunk-IS7ACRMB.js";
95
95
  import {
96
96
  AccessibilityPreferencesPanel,
97
97
  ContrastPreference,
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@aspprev/versi-ds",
3
- "version": "0.4.9",
3
+ "version": "0.5.3",
4
4
  "files": [
5
5
  "DocumentItem-BU0J2QGP.d.ts",
6
6
  "charts.d.ts",
7
7
  "charts.js",
8
+ "chunk-2CPV3WH5.js",
8
9
  "chunk-2XXVEFFY.js",
9
- "chunk-47GMEVB5.js",
10
- "chunk-7IY43S3Y.js",
10
+ "chunk-7GTKG537.js",
11
11
  "chunk-CVTBM4I6.js",
12
12
  "chunk-HKCVDOGK.js",
13
+ "chunk-IS7ACRMB.js",
13
14
  "chunk-MMTKCHRP.js",
14
- "chunk-RMWSF4YF.js",
15
15
  "chunk-ZPY72ILO.js",
16
16
  "core.d.ts",
17
17
  "core.js",