bord-design-system 0.0.58 → 0.0.59

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.
@@ -1,10 +1,10 @@
1
1
  import type { IBordFiltersBarProps } from './BordFiltersBar.types';
2
2
  import './BordFiltersBar.scss';
3
3
  /**
4
- * Barra de filtros activos: resultados, un chip removible por valor aplicado, "+N más" que expande la barra,
5
- * "Ver menos" (gris, para diferenciarlo de "Limpiar todo") que la recoge y "Limpiar todo". No sabe de inventario:
6
- * recibe los chips ya armados y en orden.
4
+ * Barra de filtros activos que no desplaza la tabla: recogida ocupa una línea y "+N más" la expande hasta dos
5
+ * ("Ver menos", en gris, la recoge); lo que tampoco cabe se ve en un popover solo con esos chips. No sabe de
6
+ * inventario: recibe los chips ya armados y en orden.
7
7
  */
8
- declare const BordFiltersBar: ({ chips, onRemoveChip, onClearAll, resultsLabel, maxVisibleChips, maxChipLabelLength, clearAllLabel, getMoreLabel, showLessLabel, className, }: IBordFiltersBarProps) => import("react/jsx-runtime").JSX.Element | null;
8
+ declare const BordFiltersBar: ({ chips, onRemoveChip, onClearAll, resultsLabel, maxVisibleChips, maxChipLabelLength, clearAllLabel, getMoreLabel, getPopoverTitle, showLessLabel, className, }: IBordFiltersBarProps) => import("react/jsx-runtime").JSX.Element | null;
9
9
  export default BordFiltersBar;
10
10
  //# sourceMappingURL=BordFiltersBar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BordFiltersBar.d.ts","sourceRoot":"","sources":["../../../src/components/BordFiltersBar/BordFiltersBar.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAuB,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACxF,OAAO,uBAAuB,CAAC;AAQ/B;;;;GAIG;AACH,QAAA,MAAM,cAAc,mJAWjB,oBAAoB,mDA8CtB,CAAC;AAEF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"BordFiltersBar.d.ts","sourceRoot":"","sources":["../../../src/components/BordFiltersBar/BordFiltersBar.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAuB,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACxF,OAAO,uBAAuB,CAAC;AAa/B;;;;GAIG;AACH,QAAA,MAAM,cAAc,oKAYjB,oBAAoB,mDAmFtB,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -14,7 +14,7 @@ export interface IBordFiltersBarProps {
14
14
  onClearAll: () => void;
15
15
  /** Texto a la izquierda de los chips, p. ej. "16 resultados:". */
16
16
  resultsLabel?: string;
17
- /** Chips visibles antes de agrupar el resto en "+N más". Por defecto 6. */
17
+ /** Chips visibles con la barra recogida antes de agrupar el resto en "+N más". Por defecto 6; nunca más de una línea. */
18
18
  maxVisibleChips?: number;
19
19
  /** Caracteres máximos de la etiqueta de un chip; el resto se corta con "…". Por defecto 20. */
20
20
  maxChipLabelLength?: number;
@@ -22,6 +22,8 @@ export interface IBordFiltersBarProps {
22
22
  /** Texto del botón que recoge la barra expandida. Por defecto "Ver menos". */
23
23
  showLessLabel?: string;
24
24
  getMoreLabel?: (hiddenCount: number) => string;
25
+ /** Texto accesible del popover con los chips que no caben en dos líneas. Por defecto "N filtros más". */
26
+ getPopoverTitle?: (hiddenCount: number) => string;
25
27
  className?: string;
26
28
  }
27
29
  //# sourceMappingURL=BordFiltersBar.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BordFiltersBar.types.d.ts","sourceRoot":"","sources":["../../../src/components/BordFiltersBar/BordFiltersBar.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gDAAgD,CAAC;AAE/F,MAAM,WAAW,mBAAmB;IAClC,8CAA8C;IAC9C,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,wBAAwB,CAAC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,UAAU,CAAC;CACnB;AAED,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,mBAAmB,EAAE,CAAC;IAC7B,YAAY,EAAE,CAAC,IAAI,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAClD,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,kEAAkE;IAClE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,2EAA2E;IAC3E,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,+FAA+F;IAC/F,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,8EAA8E;IAC9E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,MAAM,CAAC;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
1
+ {"version":3,"file":"BordFiltersBar.types.d.ts","sourceRoot":"","sources":["../../../src/components/BordFiltersBar/BordFiltersBar.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gDAAgD,CAAC;AAE/F,MAAM,WAAW,mBAAmB;IAClC,8CAA8C;IAC9C,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,wBAAwB,CAAC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,UAAU,CAAC;CACnB;AAED,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,mBAAmB,EAAE,CAAC;IAC7B,YAAY,EAAE,CAAC,IAAI,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAClD,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,kEAAkE;IAClE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yHAAyH;IACzH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,+FAA+F;IAC/F,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,8EAA8E;IAC9E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,MAAM,CAAC;IAC/C,yGAAyG;IACzG,eAAe,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,MAAM,CAAC;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
@@ -4,6 +4,6 @@ export declare const toOptions: (labels: string[]) => {
4
4
  value: string;
5
5
  label: string;
6
6
  }[];
7
- /** Los 13 filtros del inventario de Dash, en el orden de la épica, para las stories del panel y la barra. */
7
+ /** Los 14 filtros del inventario de Dash, en el orden de la épica, para las stories del panel y la barra. */
8
8
  export declare const INVENTORY_FILTERS: IBordFiltersSidebarFilter[];
9
9
  //# sourceMappingURL=BordFiltersSidebar.mocks.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BordFiltersSidebar.mocks.d.ts","sourceRoot":"","sources":["../../../src/components/BordFiltersSidebar/BordFiltersSidebar.mocks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAE5E,kFAAkF;AAClF,eAAO,MAAM,SAAS,WAAY,MAAM,EAAE;;;GAAmD,CAAC;AAE9F,6GAA6G;AAC7G,eAAO,MAAM,iBAAiB,EAAE,yBAAyB,EAoGxD,CAAC"}
1
+ {"version":3,"file":"BordFiltersSidebar.mocks.d.ts","sourceRoot":"","sources":["../../../src/components/BordFiltersSidebar/BordFiltersSidebar.mocks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAE5E,kFAAkF;AAClF,eAAO,MAAM,SAAS,WAAY,MAAM,EAAE;;;GAAmD,CAAC;AAE9F,6GAA6G;AAC7G,eAAO,MAAM,iBAAiB,EAAE,yBAAyB,EA0GxD,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { RefObject } from 'react';
2
+ /**
3
+ * Cuántos elementos (de `maxItems`) caben en un contenedor con `flex-wrap` sin pasar de `maxRows` líneas.
4
+ * El componente renderiza esa cantidad y el hook la baja de a uno antes de pintar mientras sobren líneas.
5
+ * @param containerRef Contenedor cuyos hijos directos se miden.
6
+ * @param maxItems Tope de elementos a mostrar si caben todos.
7
+ * @param maxRows Líneas máximas permitidas.
8
+ * @param contentKey Valor que cambia cuando cambia el contenido (para volver a medir desde el tope).
9
+ * @returns `fitCount` y `isSettled`, que es `false` en los renders intermedios de la medición.
10
+ */
11
+ declare const useWrappedRowsLimit: (containerRef: RefObject<HTMLElement>, maxItems: number, maxRows: number, contentKey: string) => {
12
+ fitCount: number;
13
+ isSettled: boolean;
14
+ };
15
+ export default useWrappedRowsLimit;
16
+ //# sourceMappingURL=useWrappedRowsLimit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useWrappedRowsLimit.d.ts","sourceRoot":"","sources":["../../src/hooks/useWrappedRowsLimit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAwC,MAAM,OAAO,CAAC;AAQxE;;;;;;;;GAQG;AACH,QAAA,MAAM,mBAAmB,iBACT,SAAS,CAAC,WAAW,CAAC,YAC1B,MAAM,WACP,MAAM,cACH,MAAM;;;CA+BnB,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
package/dist/index.d.ts CHANGED
@@ -2640,7 +2640,7 @@ interface IBordFiltersBarProps {
2640
2640
  onClearAll: () => void;
2641
2641
  /** Texto a la izquierda de los chips, p. ej. "16 resultados:". */
2642
2642
  resultsLabel?: string;
2643
- /** Chips visibles antes de agrupar el resto en "+N más". Por defecto 6. */
2643
+ /** Chips visibles con la barra recogida antes de agrupar el resto en "+N más". Por defecto 6; nunca más de una línea. */
2644
2644
  maxVisibleChips?: number;
2645
2645
  /** Caracteres máximos de la etiqueta de un chip; el resto se corta con "…". Por defecto 20. */
2646
2646
  maxChipLabelLength?: number;
@@ -2648,15 +2648,17 @@ interface IBordFiltersBarProps {
2648
2648
  /** Texto del botón que recoge la barra expandida. Por defecto "Ver menos". */
2649
2649
  showLessLabel?: string;
2650
2650
  getMoreLabel?: (hiddenCount: number) => string;
2651
+ /** Texto accesible del popover con los chips que no caben en dos líneas. Por defecto "N filtros más". */
2652
+ getPopoverTitle?: (hiddenCount: number) => string;
2651
2653
  className?: string;
2652
2654
  }
2653
2655
 
2654
2656
  /**
2655
- * Barra de filtros activos: resultados, un chip removible por valor aplicado, "+N más" que expande la barra,
2656
- * "Ver menos" (gris, para diferenciarlo de "Limpiar todo") que la recoge y "Limpiar todo". No sabe de inventario:
2657
- * recibe los chips ya armados y en orden.
2657
+ * Barra de filtros activos que no desplaza la tabla: recogida ocupa una línea y "+N más" la expande hasta dos
2658
+ * ("Ver menos", en gris, la recoge); lo que tampoco cabe se ve en un popover solo con esos chips. No sabe de
2659
+ * inventario: recibe los chips ya armados y en orden.
2658
2660
  */
2659
- declare const BordFiltersBar: ({ chips, onRemoveChip, onClearAll, resultsLabel, maxVisibleChips, maxChipLabelLength, clearAllLabel, getMoreLabel, showLessLabel, className, }: IBordFiltersBarProps) => react_jsx_runtime.JSX.Element | null;
2661
+ declare const BordFiltersBar: ({ chips, onRemoveChip, onClearAll, resultsLabel, maxVisibleChips, maxChipLabelLength, clearAllLabel, getMoreLabel, getPopoverTitle, showLessLabel, className, }: IBordFiltersBarProps) => react_jsx_runtime.JSX.Element | null;
2660
2662
 
2661
2663
  /**
2662
2664
  * Props del contenedor que agrupa varios interruptores con espaciado y divisores de diseño.