@khipu/design-system 0.2.0-alpha.137 → 0.2.0-alpha.138

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.
@@ -13,7 +13,7 @@
13
13
  *
14
14
  * AUTO-GENERATED FILE - DO NOT EDIT MANUALLY
15
15
  * Source: design-system/src/tokens/tokens.json
16
- * Generated: 2026-07-23T18:28:08.951Z
16
+ * Generated: 2026-07-27T20:34:20.864Z
17
17
  *
18
18
  * To regenerate:
19
19
  * cd design-system && npm run tokens:generate
@@ -15,7 +15,7 @@
15
15
  *
16
16
  * AUTO-GENERATED FILE - DO NOT EDIT MANUALLY
17
17
  * Source: design-system/src/tokens/tokens.json
18
- * Generated: 2026-07-23T18:28:08.951Z
18
+ * Generated: 2026-07-27T20:34:20.864Z
19
19
  *
20
20
  * To regenerate:
21
21
  * cd design-system && npm run tokens:generate
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@khipu/design-system/beercss",
3
- "version": "0.2.0-alpha.137",
3
+ "version": "0.2.0-alpha.138",
4
4
  "description": "Khipu BeerCSS bundle with Material Design 3 and Khipu customizations",
5
- "buildDate": "2026-07-23T18:28:11.447Z",
5
+ "buildDate": "2026-07-27T20:34:23.707Z",
6
6
  "includes": {
7
7
  "beercss": "4.0.1",
8
8
  "khipu-tokens": "latest",
@@ -19,8 +19,8 @@
19
19
  },
20
20
  "scopeClass": ".kds-theme-root",
21
21
  "cdn": {
22
- "css": "https://cdn.jsdelivr.net/npm/@khipu/design-system@0.2.0-alpha.137/dist/beercss/khipu-beercss.min.css",
23
- "cssScoped": "https://cdn.jsdelivr.net/npm/@khipu/design-system@0.2.0-alpha.137/dist/beercss/khipu-beercss.scoped.min.css",
24
- "js": "https://cdn.jsdelivr.net/npm/@khipu/design-system@0.2.0-alpha.137/dist/beercss/khipu-beercss.min.js"
22
+ "css": "https://cdn.jsdelivr.net/npm/@khipu/design-system@0.2.0-alpha.138/dist/beercss/khipu-beercss.min.css",
23
+ "cssScoped": "https://cdn.jsdelivr.net/npm/@khipu/design-system@0.2.0-alpha.138/dist/beercss/khipu-beercss.scoped.min.css",
24
+ "js": "https://cdn.jsdelivr.net/npm/@khipu/design-system@0.2.0-alpha.138/dist/beercss/khipu-beercss.min.js"
25
25
  }
26
26
  }
package/dist/index.d.mts CHANGED
@@ -3794,16 +3794,23 @@ declare const KdsBillAttachments: React__default.ForwardRefExoticComponent<KdsBi
3794
3794
  declare const runAfterPointerGesture: (callback: () => void) => void;
3795
3795
 
3796
3796
  /**
3797
- * Scroll + focus al primer campo inválido de un formulario.
3797
+ * Scroll al primer campo inválido de un formulario. NUNCA toma el foco.
3798
+ *
3799
+ * El foco se quitó a propósito: la guía corre en cada blur del formulario, así que
3800
+ * tomarlo devolvía al usuario al campo con error cada vez que salía de un campo y
3801
+ * dejaba inutilizables los demás controles (select, checkbox, campos ya válidos).
3802
+ * El scroll solo, sin robar el foco, mantiene el formulario fluido.
3798
3803
  *
3799
3804
  * El scroll se aplica sobre el ancestro scrolleable real del campo (en la app el
3800
3805
  * scroller es el body con height:100vh, no el window). El centrado usa la porción
3801
3806
  * visible: con el teclado virtual abierto visualViewport se achica (el layout
3802
3807
  * viewport no), así que centrar contra él deja el campo visible sobre el teclado.
3803
- * Además se re-centra una vez cuando el viewport cambia (apertura del teclado
3804
- * gatillada por el propio focus).
3808
+ * Además se re-centra una vez si el viewport cambia justo después (el teclado
3809
+ * cerrándose al salir del campo anterior desplaza el centro recién calculado).
3805
3810
  */
3806
3811
  declare const centerFieldInViewport: (field: HTMLElement) => void;
3812
+ declare const scrollToFirstInvalidField: (form: HTMLFormElement) => void;
3813
+ /** @deprecated Ya no toma el foco: usa scrollToFirstInvalidField. */
3807
3814
  declare const focusFirstInvalidField: (form: HTMLFormElement) => void;
3808
3815
  /**
3809
3816
  * Trigger en el blur de los campos: el submit vive deshabilitado hasta que el form
@@ -3811,13 +3818,14 @@ declare const focusFirstInvalidField: (form: HTMLFormElement) => void;
3811
3818
  * (p.ej. al marcar el checkbox de términos con un campo vacío).
3812
3819
  *
3813
3820
  * La guía NO puede correr con un timer fijo: el blur llega en el mousedown y el
3814
- * toggle del checkbox recién en el click (mouseup) si el gesto dura más que el
3815
- * timer, robar el foco a mitad de gesto deja el checkbox sin marcar. Por eso se
3816
- * ancla al fin del click que causó el blur (más un tick para que corran onChange
3817
- * y el re-render), con fallback por timer para blur de teclado (Tab).
3821
+ * toggle del checkbox recién en el click (mouseup) EN LAS MISMAS COORDENADAS si
3822
+ * el gesto dura más que el timer, scrollear a mitad de gesto mueve el destino y el
3823
+ * checkbox queda sin marcar. Por eso se ancla al fin del click que causó el blur
3824
+ * (más un tick para que corran onChange y el re-render), con fallback por timer
3825
+ * para blur de teclado (Tab).
3818
3826
  *
3819
- * Guard anti-trampa: si el foco pasó a OTRO campo de texto del form (el usuario va
3820
- * a escribir ahí), no se le roba el foco.
3827
+ * Guard: si el foco pasó a OTRO campo de texto del form (el usuario va a escribir
3828
+ * ahí), no se scrollea mover el viewport lejos del caret es igual de molesto.
3821
3829
  */
3822
3830
  declare const guideToFirstInvalidFieldOnBlur: (form: HTMLFormElement) => void;
3823
3831
 
@@ -4040,4 +4048,4 @@ declare function formatDate(iso?: string): string;
4040
4048
  */
4041
4049
  declare function formatTime(iso?: string): string;
4042
4050
 
4043
- export { type Colors, type ExpandPanelProps, type ExpandToggleProps, KdsAccordion, KdsAccordionDetails, type KdsAccordionDetailsProps, type KdsAccordionProps, KdsAccordionSummary, type KdsAccordionSummaryProps, KdsAlert, type KdsAlertProps, type KdsAlertSeverity, KdsBankList, type KdsBankListProps, KdsBankModal, type KdsBankModalProps, KdsBankRow, type KdsBankRowProps, KdsBillAttachment, type KdsBillAttachmentProps, KdsBillAttachments, type KdsBillAttachmentsProps, KdsBottomSheet, type KdsBottomSheetProps, KdsButton, type KdsButtonProps, type KdsButtonSize, type KdsButtonVariant, KdsCard, KdsCardBody, KdsCardFooter, KdsCardHeader, KdsCardPlan, type KdsCardPlanProps, type KdsCardProps, type KdsCardSectionProps, KdsCardSelector, type KdsCardSelectorProps, type KdsCardVariant, KdsCheckbox, type KdsCheckboxProps, KdsChip, type KdsChipColor, type KdsChipProps, KdsCopyButton, type KdsCopyButtonProps, KdsCopyRow, type KdsCopyRowProps, KdsCopyableTable, type KdsCopyableTableProps, type KdsCopyableTableRow, KdsCountdown, type KdsCountdownProps, KdsDivider, type KdsDividerProps, KdsEmptyState, type KdsEmptyStateProps, KdsExpandPanel, type KdsExpandPanelProps, KdsFab, type KdsFabPosition, type KdsFabProps, KdsInvoiceMerchant, type KdsInvoiceMerchantProps, KdsInvoiceSticky, type KdsInvoiceStickyProps, KdsLinearProgress, type KdsLinearProgressProps, KdsMerchantTile, type KdsMerchantTileProps, KdsMontoRow, type KdsMontoRowProps, KdsPaymentTotal, type KdsPaymentTotalProps, type KdsPaymentTotalVariant, KdsQrRow, type KdsQrRowProps, KdsRadioGroup, type KdsRadioGroupProps, type KdsRadioOption, type KdsRecapItem, KdsRecapList, type KdsRecapListProps, KdsSearchField, type KdsSearchFieldProps, KdsSectionNote, type KdsSectionNoteProps, KdsSecureFooter, type KdsSecureFooterProps, KdsSecureLoader, type KdsSecureLoaderProps, KdsSegmentedTabs, type KdsSegmentedTabsProps, KdsSelect, type KdsSelectOption, type KdsSelectProps, KdsSnackbar, type KdsSnackbarProps, type KdsSnackbarType, KdsSpinner, type KdsSpinnerProps, type KdsSpinnerSize, KdsStatusBlock, type KdsStatusBlockProps, type KdsStatusType, KdsStepper, type KdsStepperProps, KdsTab, KdsTabPanel, type KdsTabPanelProps, type KdsTabProps, KdsTabs, type KdsTabsProps, KdsTextField, type KdsTextFieldProps, KdsThemeProvider, type KdsThemeProviderProps, KdsTooltip, type KdsTooltipPlacement, type KdsTooltipProps, KdsTypography, type KdsTypographyProps, type KdsTypographyVariant, LIGHT_LOGO_LUMINANCE_THRESHOLD, type LogoBackdrop, type ThemeMode, type Tokens, type TokensByMode, type Typography as TypographyTokens, type UseExpandToggleOptions, type UseExpandToggleResult, type UseHideOnScrollOptions, type UseHideOnScrollResult, type UseStickyInvoiceCollapseOptions, borderRadius, breakpoints, centerFieldInViewport, colors, colorsByMode, focusFirstInvalidField, fontFamilies, fontSizes, fontWeights, formatDate, formatDateTime, formatTime, getContrastColor, guideToFirstInvalidFieldOnBlur, letterSpacings, lighten, lineHeights, measureLogoLuminance, pickLogoBackdrop, runAfterPointerGesture, semanticSpacing, shadows, spacing, tokens, tokensByMode, transitions, typography, useAutoHide, useCopyToClipboard, useCountdown, useExpandToggle, useHideOnScroll, useLogoBackdrop, useMediaQuery, useStickyInvoiceCollapse, useTabsKeyboard, zIndex };
4051
+ export { type Colors, type ExpandPanelProps, type ExpandToggleProps, KdsAccordion, KdsAccordionDetails, type KdsAccordionDetailsProps, type KdsAccordionProps, KdsAccordionSummary, type KdsAccordionSummaryProps, KdsAlert, type KdsAlertProps, type KdsAlertSeverity, KdsBankList, type KdsBankListProps, KdsBankModal, type KdsBankModalProps, KdsBankRow, type KdsBankRowProps, KdsBillAttachment, type KdsBillAttachmentProps, KdsBillAttachments, type KdsBillAttachmentsProps, KdsBottomSheet, type KdsBottomSheetProps, KdsButton, type KdsButtonProps, type KdsButtonSize, type KdsButtonVariant, KdsCard, KdsCardBody, KdsCardFooter, KdsCardHeader, KdsCardPlan, type KdsCardPlanProps, type KdsCardProps, type KdsCardSectionProps, KdsCardSelector, type KdsCardSelectorProps, type KdsCardVariant, KdsCheckbox, type KdsCheckboxProps, KdsChip, type KdsChipColor, type KdsChipProps, KdsCopyButton, type KdsCopyButtonProps, KdsCopyRow, type KdsCopyRowProps, KdsCopyableTable, type KdsCopyableTableProps, type KdsCopyableTableRow, KdsCountdown, type KdsCountdownProps, KdsDivider, type KdsDividerProps, KdsEmptyState, type KdsEmptyStateProps, KdsExpandPanel, type KdsExpandPanelProps, KdsFab, type KdsFabPosition, type KdsFabProps, KdsInvoiceMerchant, type KdsInvoiceMerchantProps, KdsInvoiceSticky, type KdsInvoiceStickyProps, KdsLinearProgress, type KdsLinearProgressProps, KdsMerchantTile, type KdsMerchantTileProps, KdsMontoRow, type KdsMontoRowProps, KdsPaymentTotal, type KdsPaymentTotalProps, type KdsPaymentTotalVariant, KdsQrRow, type KdsQrRowProps, KdsRadioGroup, type KdsRadioGroupProps, type KdsRadioOption, type KdsRecapItem, KdsRecapList, type KdsRecapListProps, KdsSearchField, type KdsSearchFieldProps, KdsSectionNote, type KdsSectionNoteProps, KdsSecureFooter, type KdsSecureFooterProps, KdsSecureLoader, type KdsSecureLoaderProps, KdsSegmentedTabs, type KdsSegmentedTabsProps, KdsSelect, type KdsSelectOption, type KdsSelectProps, KdsSnackbar, type KdsSnackbarProps, type KdsSnackbarType, KdsSpinner, type KdsSpinnerProps, type KdsSpinnerSize, KdsStatusBlock, type KdsStatusBlockProps, type KdsStatusType, KdsStepper, type KdsStepperProps, KdsTab, KdsTabPanel, type KdsTabPanelProps, type KdsTabProps, KdsTabs, type KdsTabsProps, KdsTextField, type KdsTextFieldProps, KdsThemeProvider, type KdsThemeProviderProps, KdsTooltip, type KdsTooltipPlacement, type KdsTooltipProps, KdsTypography, type KdsTypographyProps, type KdsTypographyVariant, LIGHT_LOGO_LUMINANCE_THRESHOLD, type LogoBackdrop, type ThemeMode, type Tokens, type TokensByMode, type Typography as TypographyTokens, type UseExpandToggleOptions, type UseExpandToggleResult, type UseHideOnScrollOptions, type UseHideOnScrollResult, type UseStickyInvoiceCollapseOptions, borderRadius, breakpoints, centerFieldInViewport, colors, colorsByMode, focusFirstInvalidField, fontFamilies, fontSizes, fontWeights, formatDate, formatDateTime, formatTime, getContrastColor, guideToFirstInvalidFieldOnBlur, letterSpacings, lighten, lineHeights, measureLogoLuminance, pickLogoBackdrop, runAfterPointerGesture, scrollToFirstInvalidField, semanticSpacing, shadows, spacing, tokens, tokensByMode, transitions, typography, useAutoHide, useCopyToClipboard, useCountdown, useExpandToggle, useHideOnScroll, useLogoBackdrop, useMediaQuery, useStickyInvoiceCollapse, useTabsKeyboard, zIndex };
package/dist/index.d.ts CHANGED
@@ -3794,16 +3794,23 @@ declare const KdsBillAttachments: React__default.ForwardRefExoticComponent<KdsBi
3794
3794
  declare const runAfterPointerGesture: (callback: () => void) => void;
3795
3795
 
3796
3796
  /**
3797
- * Scroll + focus al primer campo inválido de un formulario.
3797
+ * Scroll al primer campo inválido de un formulario. NUNCA toma el foco.
3798
+ *
3799
+ * El foco se quitó a propósito: la guía corre en cada blur del formulario, así que
3800
+ * tomarlo devolvía al usuario al campo con error cada vez que salía de un campo y
3801
+ * dejaba inutilizables los demás controles (select, checkbox, campos ya válidos).
3802
+ * El scroll solo, sin robar el foco, mantiene el formulario fluido.
3798
3803
  *
3799
3804
  * El scroll se aplica sobre el ancestro scrolleable real del campo (en la app el
3800
3805
  * scroller es el body con height:100vh, no el window). El centrado usa la porción
3801
3806
  * visible: con el teclado virtual abierto visualViewport se achica (el layout
3802
3807
  * viewport no), así que centrar contra él deja el campo visible sobre el teclado.
3803
- * Además se re-centra una vez cuando el viewport cambia (apertura del teclado
3804
- * gatillada por el propio focus).
3808
+ * Además se re-centra una vez si el viewport cambia justo después (el teclado
3809
+ * cerrándose al salir del campo anterior desplaza el centro recién calculado).
3805
3810
  */
3806
3811
  declare const centerFieldInViewport: (field: HTMLElement) => void;
3812
+ declare const scrollToFirstInvalidField: (form: HTMLFormElement) => void;
3813
+ /** @deprecated Ya no toma el foco: usa scrollToFirstInvalidField. */
3807
3814
  declare const focusFirstInvalidField: (form: HTMLFormElement) => void;
3808
3815
  /**
3809
3816
  * Trigger en el blur de los campos: el submit vive deshabilitado hasta que el form
@@ -3811,13 +3818,14 @@ declare const focusFirstInvalidField: (form: HTMLFormElement) => void;
3811
3818
  * (p.ej. al marcar el checkbox de términos con un campo vacío).
3812
3819
  *
3813
3820
  * La guía NO puede correr con un timer fijo: el blur llega en el mousedown y el
3814
- * toggle del checkbox recién en el click (mouseup) si el gesto dura más que el
3815
- * timer, robar el foco a mitad de gesto deja el checkbox sin marcar. Por eso se
3816
- * ancla al fin del click que causó el blur (más un tick para que corran onChange
3817
- * y el re-render), con fallback por timer para blur de teclado (Tab).
3821
+ * toggle del checkbox recién en el click (mouseup) EN LAS MISMAS COORDENADAS si
3822
+ * el gesto dura más que el timer, scrollear a mitad de gesto mueve el destino y el
3823
+ * checkbox queda sin marcar. Por eso se ancla al fin del click que causó el blur
3824
+ * (más un tick para que corran onChange y el re-render), con fallback por timer
3825
+ * para blur de teclado (Tab).
3818
3826
  *
3819
- * Guard anti-trampa: si el foco pasó a OTRO campo de texto del form (el usuario va
3820
- * a escribir ahí), no se le roba el foco.
3827
+ * Guard: si el foco pasó a OTRO campo de texto del form (el usuario va a escribir
3828
+ * ahí), no se scrollea mover el viewport lejos del caret es igual de molesto.
3821
3829
  */
3822
3830
  declare const guideToFirstInvalidFieldOnBlur: (form: HTMLFormElement) => void;
3823
3831
 
@@ -4040,4 +4048,4 @@ declare function formatDate(iso?: string): string;
4040
4048
  */
4041
4049
  declare function formatTime(iso?: string): string;
4042
4050
 
4043
- export { type Colors, type ExpandPanelProps, type ExpandToggleProps, KdsAccordion, KdsAccordionDetails, type KdsAccordionDetailsProps, type KdsAccordionProps, KdsAccordionSummary, type KdsAccordionSummaryProps, KdsAlert, type KdsAlertProps, type KdsAlertSeverity, KdsBankList, type KdsBankListProps, KdsBankModal, type KdsBankModalProps, KdsBankRow, type KdsBankRowProps, KdsBillAttachment, type KdsBillAttachmentProps, KdsBillAttachments, type KdsBillAttachmentsProps, KdsBottomSheet, type KdsBottomSheetProps, KdsButton, type KdsButtonProps, type KdsButtonSize, type KdsButtonVariant, KdsCard, KdsCardBody, KdsCardFooter, KdsCardHeader, KdsCardPlan, type KdsCardPlanProps, type KdsCardProps, type KdsCardSectionProps, KdsCardSelector, type KdsCardSelectorProps, type KdsCardVariant, KdsCheckbox, type KdsCheckboxProps, KdsChip, type KdsChipColor, type KdsChipProps, KdsCopyButton, type KdsCopyButtonProps, KdsCopyRow, type KdsCopyRowProps, KdsCopyableTable, type KdsCopyableTableProps, type KdsCopyableTableRow, KdsCountdown, type KdsCountdownProps, KdsDivider, type KdsDividerProps, KdsEmptyState, type KdsEmptyStateProps, KdsExpandPanel, type KdsExpandPanelProps, KdsFab, type KdsFabPosition, type KdsFabProps, KdsInvoiceMerchant, type KdsInvoiceMerchantProps, KdsInvoiceSticky, type KdsInvoiceStickyProps, KdsLinearProgress, type KdsLinearProgressProps, KdsMerchantTile, type KdsMerchantTileProps, KdsMontoRow, type KdsMontoRowProps, KdsPaymentTotal, type KdsPaymentTotalProps, type KdsPaymentTotalVariant, KdsQrRow, type KdsQrRowProps, KdsRadioGroup, type KdsRadioGroupProps, type KdsRadioOption, type KdsRecapItem, KdsRecapList, type KdsRecapListProps, KdsSearchField, type KdsSearchFieldProps, KdsSectionNote, type KdsSectionNoteProps, KdsSecureFooter, type KdsSecureFooterProps, KdsSecureLoader, type KdsSecureLoaderProps, KdsSegmentedTabs, type KdsSegmentedTabsProps, KdsSelect, type KdsSelectOption, type KdsSelectProps, KdsSnackbar, type KdsSnackbarProps, type KdsSnackbarType, KdsSpinner, type KdsSpinnerProps, type KdsSpinnerSize, KdsStatusBlock, type KdsStatusBlockProps, type KdsStatusType, KdsStepper, type KdsStepperProps, KdsTab, KdsTabPanel, type KdsTabPanelProps, type KdsTabProps, KdsTabs, type KdsTabsProps, KdsTextField, type KdsTextFieldProps, KdsThemeProvider, type KdsThemeProviderProps, KdsTooltip, type KdsTooltipPlacement, type KdsTooltipProps, KdsTypography, type KdsTypographyProps, type KdsTypographyVariant, LIGHT_LOGO_LUMINANCE_THRESHOLD, type LogoBackdrop, type ThemeMode, type Tokens, type TokensByMode, type Typography as TypographyTokens, type UseExpandToggleOptions, type UseExpandToggleResult, type UseHideOnScrollOptions, type UseHideOnScrollResult, type UseStickyInvoiceCollapseOptions, borderRadius, breakpoints, centerFieldInViewport, colors, colorsByMode, focusFirstInvalidField, fontFamilies, fontSizes, fontWeights, formatDate, formatDateTime, formatTime, getContrastColor, guideToFirstInvalidFieldOnBlur, letterSpacings, lighten, lineHeights, measureLogoLuminance, pickLogoBackdrop, runAfterPointerGesture, semanticSpacing, shadows, spacing, tokens, tokensByMode, transitions, typography, useAutoHide, useCopyToClipboard, useCountdown, useExpandToggle, useHideOnScroll, useLogoBackdrop, useMediaQuery, useStickyInvoiceCollapse, useTabsKeyboard, zIndex };
4051
+ export { type Colors, type ExpandPanelProps, type ExpandToggleProps, KdsAccordion, KdsAccordionDetails, type KdsAccordionDetailsProps, type KdsAccordionProps, KdsAccordionSummary, type KdsAccordionSummaryProps, KdsAlert, type KdsAlertProps, type KdsAlertSeverity, KdsBankList, type KdsBankListProps, KdsBankModal, type KdsBankModalProps, KdsBankRow, type KdsBankRowProps, KdsBillAttachment, type KdsBillAttachmentProps, KdsBillAttachments, type KdsBillAttachmentsProps, KdsBottomSheet, type KdsBottomSheetProps, KdsButton, type KdsButtonProps, type KdsButtonSize, type KdsButtonVariant, KdsCard, KdsCardBody, KdsCardFooter, KdsCardHeader, KdsCardPlan, type KdsCardPlanProps, type KdsCardProps, type KdsCardSectionProps, KdsCardSelector, type KdsCardSelectorProps, type KdsCardVariant, KdsCheckbox, type KdsCheckboxProps, KdsChip, type KdsChipColor, type KdsChipProps, KdsCopyButton, type KdsCopyButtonProps, KdsCopyRow, type KdsCopyRowProps, KdsCopyableTable, type KdsCopyableTableProps, type KdsCopyableTableRow, KdsCountdown, type KdsCountdownProps, KdsDivider, type KdsDividerProps, KdsEmptyState, type KdsEmptyStateProps, KdsExpandPanel, type KdsExpandPanelProps, KdsFab, type KdsFabPosition, type KdsFabProps, KdsInvoiceMerchant, type KdsInvoiceMerchantProps, KdsInvoiceSticky, type KdsInvoiceStickyProps, KdsLinearProgress, type KdsLinearProgressProps, KdsMerchantTile, type KdsMerchantTileProps, KdsMontoRow, type KdsMontoRowProps, KdsPaymentTotal, type KdsPaymentTotalProps, type KdsPaymentTotalVariant, KdsQrRow, type KdsQrRowProps, KdsRadioGroup, type KdsRadioGroupProps, type KdsRadioOption, type KdsRecapItem, KdsRecapList, type KdsRecapListProps, KdsSearchField, type KdsSearchFieldProps, KdsSectionNote, type KdsSectionNoteProps, KdsSecureFooter, type KdsSecureFooterProps, KdsSecureLoader, type KdsSecureLoaderProps, KdsSegmentedTabs, type KdsSegmentedTabsProps, KdsSelect, type KdsSelectOption, type KdsSelectProps, KdsSnackbar, type KdsSnackbarProps, type KdsSnackbarType, KdsSpinner, type KdsSpinnerProps, type KdsSpinnerSize, KdsStatusBlock, type KdsStatusBlockProps, type KdsStatusType, KdsStepper, type KdsStepperProps, KdsTab, KdsTabPanel, type KdsTabPanelProps, type KdsTabProps, KdsTabs, type KdsTabsProps, KdsTextField, type KdsTextFieldProps, KdsThemeProvider, type KdsThemeProviderProps, KdsTooltip, type KdsTooltipPlacement, type KdsTooltipProps, KdsTypography, type KdsTypographyProps, type KdsTypographyVariant, LIGHT_LOGO_LUMINANCE_THRESHOLD, type LogoBackdrop, type ThemeMode, type Tokens, type TokensByMode, type Typography as TypographyTokens, type UseExpandToggleOptions, type UseExpandToggleResult, type UseHideOnScrollOptions, type UseHideOnScrollResult, type UseStickyInvoiceCollapseOptions, borderRadius, breakpoints, centerFieldInViewport, colors, colorsByMode, focusFirstInvalidField, fontFamilies, fontSizes, fontWeights, formatDate, formatDateTime, formatTime, getContrastColor, guideToFirstInvalidFieldOnBlur, letterSpacings, lighten, lineHeights, measureLogoLuminance, pickLogoBackdrop, runAfterPointerGesture, scrollToFirstInvalidField, semanticSpacing, shadows, spacing, tokens, tokensByMode, transitions, typography, useAutoHide, useCopyToClipboard, useCountdown, useExpandToggle, useHideOnScroll, useLogoBackdrop, useMediaQuery, useStickyInvoiceCollapse, useTabsKeyboard, zIndex };
package/dist/index.js CHANGED
@@ -105,6 +105,7 @@ __export(index_exports, {
105
105
  measureLogoLuminance: () => measureLogoLuminance,
106
106
  pickLogoBackdrop: () => pickLogoBackdrop,
107
107
  runAfterPointerGesture: () => runAfterPointerGesture,
108
+ scrollToFirstInvalidField: () => scrollToFirstInvalidField,
108
109
  semanticSpacing: () => semanticSpacing,
109
110
  shadows: () => shadows,
110
111
  spacing: () => spacing,
@@ -2864,7 +2865,7 @@ var runAfterPointerGesture = (callback) => {
2864
2865
  window.setTimeout(run, KEYBOARD_FALLBACK_MS);
2865
2866
  };
2866
2867
 
2867
- // src/utils/focusFirstInvalidField.ts
2868
+ // src/utils/scrollToFirstInvalidField.ts
2868
2869
  var RECENTER_WINDOW_MS = 1500;
2869
2870
  var getScrollParent = (field) => {
2870
2871
  let node = field.parentElement;
@@ -2903,12 +2904,11 @@ var isInvalidField = (element) => {
2903
2904
  const field = element;
2904
2905
  return typeof field.willValidate === "boolean" && field.willValidate && !field.validity.valid;
2905
2906
  };
2906
- var focusFirstInvalidField = (form) => {
2907
+ var scrollToFirstInvalidField = (form) => {
2907
2908
  const firstInvalid = Array.from(form.elements).find(isInvalidField);
2908
2909
  if (!firstInvalid) {
2909
2910
  return;
2910
2911
  }
2911
- firstInvalid.focus({ preventScroll: true });
2912
2912
  centerFieldInViewport(firstInvalid);
2913
2913
  const viewport = window.visualViewport;
2914
2914
  if (viewport) {
@@ -2917,6 +2917,7 @@ var focusFirstInvalidField = (form) => {
2917
2917
  window.setTimeout(() => viewport.removeEventListener("resize", recenter), RECENTER_WINDOW_MS);
2918
2918
  }
2919
2919
  };
2920
+ var focusFirstInvalidField = scrollToFirstInvalidField;
2920
2921
  var isTextEntryElement = (element) => {
2921
2922
  if (!element) {
2922
2923
  return false;
@@ -2937,7 +2938,7 @@ var guideToFirstInvalidFieldOnBlur = (form) => {
2937
2938
  return;
2938
2939
  }
2939
2940
  if (!form.checkValidity()) {
2940
- focusFirstInvalidField(form);
2941
+ scrollToFirstInvalidField(form);
2941
2942
  }
2942
2943
  });
2943
2944
  };
@@ -3209,6 +3210,7 @@ function useMediaQuery(query) {
3209
3210
  measureLogoLuminance,
3210
3211
  pickLogoBackdrop,
3211
3212
  runAfterPointerGesture,
3213
+ scrollToFirstInvalidField,
3212
3214
  semanticSpacing,
3213
3215
  shadows,
3214
3216
  spacing,
package/dist/index.mjs CHANGED
@@ -2737,7 +2737,7 @@ var runAfterPointerGesture = (callback) => {
2737
2737
  window.setTimeout(run, KEYBOARD_FALLBACK_MS);
2738
2738
  };
2739
2739
 
2740
- // src/utils/focusFirstInvalidField.ts
2740
+ // src/utils/scrollToFirstInvalidField.ts
2741
2741
  var RECENTER_WINDOW_MS = 1500;
2742
2742
  var getScrollParent = (field) => {
2743
2743
  let node = field.parentElement;
@@ -2776,12 +2776,11 @@ var isInvalidField = (element) => {
2776
2776
  const field = element;
2777
2777
  return typeof field.willValidate === "boolean" && field.willValidate && !field.validity.valid;
2778
2778
  };
2779
- var focusFirstInvalidField = (form) => {
2779
+ var scrollToFirstInvalidField = (form) => {
2780
2780
  const firstInvalid = Array.from(form.elements).find(isInvalidField);
2781
2781
  if (!firstInvalid) {
2782
2782
  return;
2783
2783
  }
2784
- firstInvalid.focus({ preventScroll: true });
2785
2784
  centerFieldInViewport(firstInvalid);
2786
2785
  const viewport = window.visualViewport;
2787
2786
  if (viewport) {
@@ -2790,6 +2789,7 @@ var focusFirstInvalidField = (form) => {
2790
2789
  window.setTimeout(() => viewport.removeEventListener("resize", recenter), RECENTER_WINDOW_MS);
2791
2790
  }
2792
2791
  };
2792
+ var focusFirstInvalidField = scrollToFirstInvalidField;
2793
2793
  var isTextEntryElement = (element) => {
2794
2794
  if (!element) {
2795
2795
  return false;
@@ -2810,7 +2810,7 @@ var guideToFirstInvalidFieldOnBlur = (form) => {
2810
2810
  return;
2811
2811
  }
2812
2812
  if (!form.checkValidity()) {
2813
- focusFirstInvalidField(form);
2813
+ scrollToFirstInvalidField(form);
2814
2814
  }
2815
2815
  });
2816
2816
  };
@@ -3081,6 +3081,7 @@ export {
3081
3081
  measureLogoLuminance,
3082
3082
  pickLogoBackdrop,
3083
3083
  runAfterPointerGesture,
3084
+ scrollToFirstInvalidField,
3084
3085
  semanticSpacing,
3085
3086
  shadows,
3086
3087
  spacing,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@khipu/design-system",
3
- "version": "0.2.0-alpha.137",
3
+ "version": "0.2.0-alpha.138",
4
4
  "description": "Khipu Design System - UI components and design tokens for the Khipu payment platform",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",