@kenlo/kdls-design-system 2.12.2 → 2.17.0

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.
@@ -36,8 +36,10 @@ export interface BottomSheetProps {
36
36
  options?: BottomSheetOption[];
37
37
  /** Selects multiple options at once — renders a checkbox per row. `value`/`onChange` become string[], and changes are only committed when the Apply button (footer) is pressed */
38
38
  multiple?: boolean;
39
- /** Shows a pinned "Selecionar todos" checkbox above the list. Requires multiple */
39
+ /** Shows a "Selecionar todos" action — a pinned checkbox row above the list by default, or a footer link with selectAllPlacement="footer". Requires multiple */
40
40
  showSelectAll?: boolean;
41
+ /** Where the "Selecionar todos" action sits: 'header' = checkbox row above the list | 'footer' = link in the automatic footer, opposite Aplicar. Requires showSelectAll; falls back to 'header' when a custom footer is passed */
42
+ selectAllPlacement?: 'header' | 'footer';
41
43
  /** Selected value(s), controlled. Single select: string | null. Multiple: string[] */
42
44
  value?: string | string[] | null;
43
45
  /** Initial value(s) in uncontrolled mode — same shape as value; ignored when value is passed */
@@ -29,6 +29,10 @@ export interface CheckboxProps {
29
29
  name?: string;
30
30
  /** Marks the field as required — asterisk on the label and aria-required on the box */
31
31
  required?: boolean;
32
+ /** Accessible name when there is no visible label (e.g. a row-selection box) — replaces the label as the name screen readers announce */
33
+ 'aria-label'?: string;
34
+ /** Id of the visible element that names the checkbox (e.g. the row's title) */
35
+ 'aria-labelledby'?: string;
32
36
  /** Additional CSS classes */
33
37
  className?: string;
34
38
  }
@@ -37,6 +37,8 @@ interface DatePickerBase {
37
37
  includeTimes?: Date[];
38
38
  /** Month/year shown initially when there's no selected value */
39
39
  defaultViewDate?: Date;
40
+ /** Overrides the calendar's z-index, which otherwise follows where it opens: the page, or above an open Drawer, Modal or BottomSheet */
41
+ zIndex?: number;
40
42
  /** Disables all interaction */
41
43
  disabled?: boolean;
42
44
  /** Shows a spinner on the trigger and blocks interaction — use while data is loading */
@@ -2,6 +2,8 @@ import React from 'react';
2
2
  import './Floating.css';
3
3
  export type FloatingPlacement = 'top' | 'topLeft' | 'topRight' | 'right' | 'rightTop' | 'rightBottom' | 'bottom' | 'bottomLeft' | 'bottomRight' | 'left' | 'leftTop' | 'leftBottom';
4
4
  export type FloatingTriggerMode = 'click' | 'hover' | 'focus' | 'contextMenu';
5
+ /** True inside an open Drawer, Modal or BottomSheet — set by them around their content */
6
+ export declare const OverlayContext: React.Context<boolean>;
5
7
  export interface FloatingProps {
6
8
  children: React.ReactNode;
7
9
  content: React.ReactNode | ((activePlacement: FloatingPlacement) => React.ReactNode);
@@ -15,7 +17,10 @@ export interface FloatingProps {
15
17
  defaultOpen?: boolean;
16
18
  destroyOnClose?: boolean;
17
19
  getPopupContainer?: () => HTMLElement;
20
+ /** Wins over every automatic layer */
18
21
  zIndex?: number;
22
+ /** Layer at page level — inside a Drawer, Modal or BottomSheet the panel goes above it instead */
23
+ baseZIndex?: number;
19
24
  matchTriggerWidth?: boolean;
20
25
  className?: string;
21
26
  openClassName?: string;
@@ -0,0 +1 @@
1
+ export {};
@@ -34,6 +34,10 @@ interface SelectBase {
34
34
  searchable?: boolean;
35
35
  /** Search field placeholder */
36
36
  searchPlaceholder?: string;
37
+ /** Text shown in the trigger when every option is selected, instead of "first option +N" — requires multiple */
38
+ allSelectedLabel?: string;
39
+ /** Where the "Selecionar todos" action sits: 'header' = checkbox row above the list | 'footer' = link in the footer, opposite Aplicar. Requires showSelectAll */
40
+ selectAllPlacement?: 'header' | 'footer';
37
41
  /** When false, disables the frontend filter — dev controls the options via onSearch + options */
38
42
  filterOption?: boolean;
39
43
  /** Callback fired on every change in the search field */
@@ -42,7 +46,7 @@ interface SelectBase {
42
46
  loading?: boolean;
43
47
  /** Callback fired when scrolling the list — use for infinite scroll */
44
48
  onMenuScroll?: (e: React.UIEvent<HTMLUListElement>) => void;
45
- /** Shows a "Select all" checkbox as the list's first row — requires multiple */
49
+ /** Shows a "Selecionar todos" action — a checkbox row above the list by default, or a footer link with selectAllPlacement="footer". Requires multiple */
46
50
  showSelectAll?: boolean;
47
51
  /** Shows a spinner on the trigger and blocks interaction — use while the initial options are loading from the API */
48
52
  isLoading?: boolean;
@@ -12,6 +12,8 @@ export interface ToggleItem {
12
12
  iconRight?: IconElement;
13
13
  /** Disables only this item */
14
14
  disabled?: boolean;
15
+ /** Accessible name of this item — required in practice when it shows only an icon, which otherwise has no name */
16
+ 'aria-label'?: string;
15
17
  }
16
18
  export interface ToggleProps {
17
19
  /** List of options — minimum 2 items */
@@ -26,6 +28,10 @@ export interface ToggleProps {
26
28
  onChange?: (value: string) => void;
27
29
  /** Disables all items */
28
30
  disabled?: boolean;
31
+ /** Accessible name of the group — use when no visible title names the options */
32
+ 'aria-label'?: string;
33
+ /** Id of the visible element that names the group — prefer it over aria-label when that title is on screen */
34
+ 'aria-labelledby'?: string;
29
35
  /** Additional CSS classes */
30
36
  className?: string;
31
37
  }
@@ -8,6 +8,8 @@ export interface TooltipProps {
8
8
  children?: React.ReactNode;
9
9
  /** Tooltip position relative to the trigger. Automatically flips to the opposite side when there's no space in the requested direction. */
10
10
  placement?: TooltipPosition;
11
+ /** Width of the trigger's wrapper, only with `children`: 'hug' = fits the trigger, inline | 'fill' = takes the full width of the parent and stretches the trigger to it — use when the trigger is a full-width row, such as a Card. Has no effect without `children`: the default info icon keeps its own size. */
12
+ width?: 'hug' | 'fill';
11
13
  /** Additional CSS class applied to the trigger's wrapper. */
12
14
  className?: string;
13
15
  }