@selectwin/kit 0.1.164 → 0.1.165

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.
@@ -15,14 +15,21 @@ type SelectPageOwnProps = {
15
15
  /** Custom node in the header action area (e.g. an "Ações" overflow menu on detail
16
16
  * pages). Rendered after primary/secondary buttons. */
17
17
  headerActions?: ReactNode;
18
- backAction?: {
19
- onAction: () => void;
20
- content?: string;
21
- };
18
+ /** Para onde volta. Sem ele, vale o do `SelectPageBackProvider`; `null` = sem botão. */
19
+ backAction?: SelectPageBack | null;
22
20
  /** Os níveis de CIMA da página, sobre o título ("Club › Cursos"); o título é o nível atual. */
23
21
  breadcrumbs?: SelectBreadcrumbItem[];
24
22
  children: ReactNode;
25
23
  };
24
+ export interface SelectPageBack {
25
+ onAction: () => void;
26
+ content?: string;
27
+ }
28
+ /** O voltar das páginas que não dizem o seu (ex.: a tela anterior do app). */
29
+ export declare function SelectPageBackProvider({ value, children }: {
30
+ value: SelectPageBack | null;
31
+ children: ReactNode;
32
+ }): import("react").JSX.Element;
26
33
  export type SelectPageProps = SelectPageOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectPageOwnProps>;
27
34
  export declare const SelectPage: import('react').ForwardRefExoticComponent<SelectPageOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof SelectPageOwnProps> & import('react').RefAttributes<HTMLDivElement>>;
28
35
  export {};
package/dist/index.d.ts CHANGED
@@ -51,7 +51,7 @@ export { SelectPasswordStrength, passwordScore, type SelectPasswordRule } from '
51
51
  export { SelectLoader, type SelectLoaderProps } from './SelectLoader';
52
52
  export { SelectText } from './SelectText';
53
53
  export { SelectBox, SelectStack, SelectInline, SelectGrid } from './SelectLayout';
54
- export { SelectPage } from './SelectPage';
54
+ export { SelectPage, SelectPageBackProvider } from './SelectPage';
55
55
  export { SelectFormLayout } from './SelectFormLayout';
56
56
  export { SelectSkeleton } from './SelectSkeleton';
57
57
  export { SelectIcon } from './SelectIcon';
@@ -268,7 +268,7 @@ export type { SelectKeyValuePair, SelectKeyValueEditorProps } from './SelectKeyV
268
268
  export type { SelectBankAccount, SelectBankOption } from './SelectBankAccountField';
269
269
  export type { SelectSpace } from './spacing';
270
270
  export type { SelectTextVariant, SelectTextTone, SelectFontWeight } from './SelectText';
271
- export type { SelectPageAction } from './SelectPage';
271
+ export type { SelectPageAction, SelectPageBack } from './SelectPage';
272
272
  export type { SelectIconTone, SelectIconSize } from './SelectIcon';
273
273
  export type { SelectPlacement } from './positioning';
274
274
  export type { SelectAction, SelectActionSection } from './SelectActionList';