@selectwin/kit 0.1.178 → 0.1.180

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.
@@ -6,7 +6,13 @@ type SelectLineChartOwnProps = {
6
6
  height?: number;
7
7
  format?: (n: number) => string;
8
8
  area?: boolean;
9
+ /**
10
+ * Ocupa a altura que sobra no pai (0.1.180): `height` vira o PISO e o gráfico cresce até o fim da coluna — o card
11
+ * do gráfico ao lado de um card mais alto fecha sem faixa branca embaixo. O pai precisa ser uma coluna flex que
12
+ * estica (ex.: `SelectStack fill growLast`, com o gráfico por último); fora dela, fica na altura `height`.
13
+ */
14
+ fill?: boolean;
9
15
  };
10
16
  export type SelectLineChartProps = SelectLineChartOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectLineChartOwnProps>;
11
- export declare function SelectLineChart({ series, labels, height, format, area, className, ...rest }: SelectLineChartProps): import("react").JSX.Element;
17
+ export declare function SelectLineChart({ series, labels, height: baseHeight, format, area, fill, className, style, ...rest }: SelectLineChartProps): import("react").JSX.Element;
12
18
  export {};
@@ -9,6 +9,19 @@ export declare function SelectValueVisibilityProvider({ children }: {
9
9
  }): import("react").JSX.Element;
10
10
  /** Tolerant: no provider → a no-op default (values render unblurred). */
11
11
  export declare function useSelectValueVisibility(): ValueVisibility;
12
+ /**
13
+ * Marks the calling component as a maskable value while it is mounted (and `active`). SelectSensitiveValue
14
+ * — and so SelectMoney — already does it; call this only in a component that masks on its own by reading
15
+ * `hidden` (e.g. a chart that hides its money axis). No provider → no-op.
16
+ */
17
+ export declare function useSelectSensitiveValueMark(active?: boolean): void;
18
+ /**
19
+ * True while at least one maskable value is mounted under the provider — the eye ("ocultar valores")
20
+ * only means something then. It flips on mount/unmount: a page swapping its skeleton for data, or a
21
+ * route change, can flip it for a moment, so a header that hides on `false` should wait a beat
22
+ * before hiding. The `hidden` preference itself is untouched. No provider → always false.
23
+ */
24
+ export declare function useSelectHasSensitiveValues(): boolean;
12
25
  type SelectSensitiveValueOwnProps = {
13
26
  children: ReactNode;
14
27
  label?: string;
@@ -3,8 +3,17 @@
3
3
  export declare function useChartSize(height: number): {
4
4
  ref: import('react').RefObject<HTMLDivElement>;
5
5
  width: number;
6
+ boxHeight: number;
6
7
  height: number;
7
8
  };
9
+ /**
10
+ * Recuo esquerdo do plot na medida do MAIOR rótulo do eixo Y (0.1.180). O recuo fixo de 48px cabia "R$ 8 mil", mas
11
+ * "R$ 500,00" e "R$ 1,5 mil" vazavam para a esquerda do SVG e encostavam na borda do card, fora do alinhamento do
12
+ * resto do conteúdo. Agora o rótulo mais largo começa no x=0 do gráfico — na mesma linha do que está acima dele.
13
+ * Mede com o canvas (a fonte do eixo: 500, 0.6875rem, na família do próprio gráfico — `el`, a caixa dele; o `body` do
14
+ * app pode ter outra); sem canvas (teste), estima pela contagem de caracteres.
15
+ */
16
+ export declare function yAxisPad(labels: string[], el?: Element | null): number;
8
17
  /** Live pixel width of a ref'd element, for viewBox SVGs whose box is sized in rem (so it
9
18
  * scales with the fluid root): feeding the measured px back into the geometry keeps the
10
19
  * viewBox 1:1 with the rendered px, so px-positioned HTML overlays (tooltips) stay aligned.
package/dist/index.d.ts CHANGED
@@ -119,7 +119,7 @@ export { SelectTagSelect } from './SelectTagSelect';
119
119
  export { SelectSurface } from './SelectSurface';
120
120
  export { SelectToastProvider, useSelectToast } from './SelectToast';
121
121
  export { SelectPreviewFrame } from './SelectPreviewFrame';
122
- export { SelectMoney, SelectSensitiveValue, SelectMetricDelta, SelectHideMoneyToggle, SelectValueVisibilityProvider, useSelectValueVisibility, } from './SelectMoney';
122
+ export { SelectMoney, SelectSensitiveValue, SelectMetricDelta, SelectHideMoneyToggle, SelectValueVisibilityProvider, useSelectValueVisibility, useSelectHasSensitiveValues, useSelectSensitiveValueMark, } from './SelectMoney';
123
123
  export { SelectBalanceCard } from './SelectBalanceCard';
124
124
  export { SelectFeeBreakdown } from './SelectFeeBreakdown';
125
125
  export { SelectKpiCard } from './SelectKpiCard';