@selectwin/kit 0.1.86 → 0.1.88

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.
@@ -34,10 +34,17 @@ export interface SelectBuilderWorkspaceProps {
34
34
  searchable?: boolean;
35
35
  /** O palco: normalmente um `<SelectPreviewFrame fill />`. */
36
36
  preview?: ReactNode;
37
+ /**
38
+ * Como o palco acomoda o `preview`. `fill` (padrão) estica o filho até as bordas — é o que
39
+ * uma pré-visualização em iframe quer. `document` é para um palco de LEITURA (o resumo do
40
+ * builder de pixels: não há página para mostrar, há o que acontece numa venda): a coluna rola
41
+ * sozinha e o conteúdo fica numa largura de leitura, centrado, em vez de esticar por 60rem.
42
+ */
43
+ previewLayout?: 'fill' | 'document';
37
44
  /** Controles extras no centro da barra (ex.: alternador de dispositivo). */
38
45
  toolbar?: ReactNode;
39
46
  /** Selo de "alterações não salvas" na barra. */
40
47
  dirty?: boolean;
41
48
  dirtyLabel?: string;
42
49
  }
43
- export declare function SelectBuilderWorkspace({ title, subtitle, backTo, onSave, saving, saveLabel, saveDisabled, cancelTo, error, sections, activeId, onActiveChange, searchable, preview, toolbar, dirty, dirtyLabel, }: SelectBuilderWorkspaceProps): import("react").JSX.Element;
50
+ export declare function SelectBuilderWorkspace({ title, subtitle, backTo, onSave, saving, saveLabel, saveDisabled, cancelTo, error, sections, activeId, onActiveChange, searchable, preview, previewLayout, toolbar, dirty, dirtyLabel, }: SelectBuilderWorkspaceProps): import("react").JSX.Element;
@@ -1,9 +1,16 @@
1
1
  import { ComponentPropsWithoutRef } from 'react';
2
2
  /** 0–4 score from length thresholds + lower/upper/digit/symbol variety. */
3
3
  export declare function passwordScore(pw: string): number;
4
+ /** One requirement of the password policy — the caller owns the policy, the kit only draws it. */
5
+ export interface SelectPasswordRule {
6
+ label: string;
7
+ met: boolean;
8
+ }
4
9
  type SelectPasswordStrengthOwnProps = {
5
10
  value: string;
11
+ /** Requirements checklist under the meter (e.g. "12 a 32 caracteres", "Número"). */
12
+ rules?: SelectPasswordRule[];
6
13
  };
7
14
  export type SelectPasswordStrengthProps = SelectPasswordStrengthOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectPasswordStrengthOwnProps>;
8
- export declare const SelectPasswordStrength: import('react').ForwardRefExoticComponent<SelectPasswordStrengthOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "value"> & import('react').RefAttributes<HTMLDivElement>>;
15
+ export declare const SelectPasswordStrength: import('react').ForwardRefExoticComponent<SelectPasswordStrengthOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof SelectPasswordStrengthOwnProps> & import('react').RefAttributes<HTMLDivElement>>;
9
16
  export {};
package/dist/index.d.ts CHANGED
@@ -40,7 +40,7 @@ export { SelectIdentityFooter } from './SelectIdentityFooter';
40
40
  export { SelectOtpInput } from './SelectOtpInput';
41
41
  export { SelectBackLink } from './SelectBackLink';
42
42
  export { SelectResendButton } from './SelectResendButton';
43
- export { SelectPasswordStrength, passwordScore } from './SelectPasswordStrength';
43
+ export { SelectPasswordStrength, passwordScore, type SelectPasswordRule } from './SelectPasswordStrength';
44
44
  export { SelectLoader, type SelectLoaderProps } from './SelectLoader';
45
45
  export { SelectText } from './SelectText';
46
46
  export { SelectBox, SelectStack, SelectInline, SelectGrid } from './SelectLayout';