@ahrowe/ui 0.32.0 → 0.33.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.
Files changed (71) hide show
  1. package/dist/esm/common/card/Card.mjs +1 -1
  2. package/dist/esm/common/card/Card.mjs.map +1 -1
  3. package/dist/esm/common/card/card.types.mjs.map +1 -1
  4. package/dist/esm/common/chip/chip.mjs +1 -1
  5. package/dist/esm/common/chip/chip.mjs.map +1 -1
  6. package/dist/esm/common/chip/chip.types.mjs.map +1 -1
  7. package/dist/esm/common/colorPicker/colorPicker.mjs +1 -1
  8. package/dist/esm/common/colorPicker/colorPicker.mjs.map +1 -1
  9. package/dist/esm/common/confirmModal/confirmModal.mjs +1 -1
  10. package/dist/esm/common/confirmModal/confirmModal.mjs.map +1 -1
  11. package/dist/esm/common/datePicker/components/datePickerMonth/datePickerMonth.mjs +1 -1
  12. package/dist/esm/common/datePicker/components/datePickerMonth/datePickerMonth.mjs.map +1 -1
  13. package/dist/esm/common/datePicker/datePicker.mjs +1 -1
  14. package/dist/esm/common/datePicker/datePicker.mjs.map +1 -1
  15. package/dist/esm/common/drawer/drawer.mjs +1 -1
  16. package/dist/esm/common/drawer/drawer.mjs.map +1 -1
  17. package/dist/esm/common/dropdown/dropdown.mjs +1 -1
  18. package/dist/esm/common/dropdown/dropdown.mjs.map +1 -1
  19. package/dist/esm/common/emptyState/emptyState.mjs +1 -1
  20. package/dist/esm/common/emptyState/emptyState.mjs.map +1 -1
  21. package/dist/esm/common/fab/components/fabBase/fabBase.mjs +1 -1
  22. package/dist/esm/common/fab/components/fabBase/fabBase.mjs.map +1 -1
  23. package/dist/esm/common/fab/fab.mjs +1 -1
  24. package/dist/esm/common/fab/fab.mjs.map +1 -1
  25. package/dist/esm/common/infiniteBlock/infiniteBlock.mjs +1 -1
  26. package/dist/esm/common/infiniteBlock/infiniteBlock.mjs.map +1 -1
  27. package/dist/esm/common/numberInput/numberInput.mjs +1 -1
  28. package/dist/esm/common/numberInput/numberInput.mjs.map +1 -1
  29. package/dist/esm/common/progressBar/progressBar.mjs +1 -1
  30. package/dist/esm/common/progressBar/progressBar.mjs.map +1 -1
  31. package/dist/esm/common/searchInput/searchInput.mjs +1 -1
  32. package/dist/esm/common/searchInput/searchInput.mjs.map +1 -1
  33. package/dist/index.cjs +3 -3
  34. package/dist/index.cjs.map +1 -1
  35. package/dist/types/common/card/card.types.d.ts +6 -1
  36. package/dist/types/common/chip/chip.types.d.ts +6 -1
  37. package/dist/types/common/colorPicker/colorPicker.d.ts +1 -1
  38. package/dist/types/common/colorPicker/colorPicker.types.d.ts +6 -1
  39. package/dist/types/common/configProvider/configProvider.types.d.ts +4 -0
  40. package/dist/types/common/confirmModal/confirmModal.types.d.ts +4 -2
  41. package/dist/types/common/datePicker/components/datePickerMonth/datePickerMonth.d.ts +1 -1
  42. package/dist/types/common/datePicker/components/datePickerMonth/datePickerMonth.types.d.ts +3 -0
  43. package/dist/types/common/datePicker/datePicker.types.d.ts +11 -2
  44. package/dist/types/common/drawer/drawer.d.ts +1 -1
  45. package/dist/types/common/drawer/drawer.types.d.ts +7 -1
  46. package/dist/types/common/dropdown/dropdown.types.d.ts +6 -6
  47. package/dist/types/common/emptyState/emptyState.d.ts +1 -1
  48. package/dist/types/common/emptyState/emptyState.types.d.ts +6 -1
  49. package/dist/types/common/fab/components/fabBase/fabBase.d.ts +1 -1
  50. package/dist/types/common/fab/components/fabBase/fabBase.types.d.ts +3 -1
  51. package/dist/types/common/fab/fab.d.ts +1 -1
  52. package/dist/types/common/fab/fab.types.d.ts +6 -1
  53. package/dist/types/common/infiniteBlock/infiniteBlock.d.ts +1 -1
  54. package/dist/types/common/infiniteBlock/infiniteBlock.types.d.ts +2 -0
  55. package/dist/types/common/numberInput/numberInput.types.d.ts +6 -0
  56. package/dist/types/common/progressBar/progressBar.d.ts +1 -1
  57. package/dist/types/common/progressBar/progressBar.types.d.ts +6 -1
  58. package/dist/types/common/searchInput/searchInput.d.ts +1 -1
  59. package/dist/types/common/searchInput/searchInput.types.d.ts +13 -1
  60. package/docs/Card.md +2 -0
  61. package/docs/Chip.md +2 -0
  62. package/docs/ColorPicker.md +2 -0
  63. package/docs/DatePicker.md +4 -0
  64. package/docs/Drawer.md +2 -0
  65. package/docs/Dropdown.md +2 -0
  66. package/docs/EmptyState.md +2 -0
  67. package/docs/Fab.md +2 -0
  68. package/docs/NumberInput.md +4 -0
  69. package/docs/ProgressBar.md +2 -0
  70. package/docs/SearchInput.md +4 -0
  71. package/package.json +1 -1
@@ -1,12 +1,13 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { ButtonStyleType } from '../button/button.types';
3
- import { HtmlProps } from '../types/slots.types';
3
+ import { HtmlProps, SlotClassNames, SlotStyles } from '../types/slots.types';
4
4
  import { IconAction } from '../types/actions.types';
5
5
  export declare enum CardStyleType {
6
6
  Elevated = "elevated",
7
7
  Outlined = "outlined",
8
8
  Filled = "filled"
9
9
  }
10
+ export type CardSlots = 'root' | 'content';
10
11
  export interface CardProps extends Omit<HtmlProps, 'tabIndex'> {
11
12
  className?: string | undefined;
12
13
  children?: ReactNode;
@@ -17,6 +18,10 @@ export interface CardProps extends Omit<HtmlProps, 'tabIndex'> {
17
18
  style?: React.CSSProperties;
18
19
  autoGap?: boolean;
19
20
  clip?: boolean;
21
+ /** Classes for the inner elements. See `CardSlots`. */
22
+ classNames?: SlotClassNames<CardSlots>;
23
+ /** Inline styles for the inner elements. See `CardSlots`. */
24
+ styles?: SlotStyles<CardSlots>;
20
25
  }
21
26
  export type CardHeaderAction = IconAction;
22
27
  export interface CardHeaderProps {
@@ -1,4 +1,4 @@
1
- import { HtmlProps } from '../types/slots.types';
1
+ import { HtmlProps, SlotClassNames, SlotStyles } from '../types/slots.types';
2
2
  export declare enum ChipStyleType {
3
3
  Default = "default",
4
4
  Primary = "primary",
@@ -11,6 +11,7 @@ export interface ChipLabels {
11
11
  /** The remove button, read out by screen readers (default `Remove`). */
12
12
  remove?: string;
13
13
  }
14
+ export type ChipSlots = 'root' | 'inner' | 'thumbnail' | 'text' | 'removeIcon';
14
15
  export interface ChipProps extends HtmlProps {
15
16
  className?: string;
16
17
  text?: string;
@@ -22,6 +23,10 @@ export interface ChipProps extends HtmlProps {
22
23
  onRemove?: () => void;
23
24
  /** Overrides the text Chip renders of its own. Merged per key. */
24
25
  labels?: ChipLabels;
26
+ /** Classes for the inner elements. See `ChipSlots`. */
27
+ classNames?: SlotClassNames<ChipSlots>;
28
+ /** Inline styles for the inner elements. See `ChipSlots`. */
29
+ styles?: SlotStyles<ChipSlots>;
25
30
  }
26
31
  export interface ChipContainerProps extends HtmlProps {
27
32
  className?: string;
@@ -1,4 +1,4 @@
1
1
  import { ReactElement } from 'react';
2
2
  import { ColorPickerProps } from './colorPicker.types';
3
- declare function ColorPicker({ className, value, onChange, showInput, showAlpha, inline, labels, ...rest }: ColorPickerProps): ReactElement;
3
+ declare function ColorPicker({ className, value, onChange, showInput, showAlpha, inline, labels, style, classNames, styles: slotStyles, ...rest }: ColorPickerProps): ReactElement;
4
4
  export default ColorPicker;
@@ -1,4 +1,5 @@
1
- import { HtmlProps } from '../types/slots.types';
1
+ import { SlotClassNames, SlotStyles, HtmlProps } from '../types/slots.types';
2
+ export type ColorPickerSlots = 'root' | 'swatch' | 'panel' | 'gradient' | 'hueSlider' | 'alphaSlider' | 'hexInput' | 'eyeDropper';
2
3
  /** Text ColorPicker renders of its own, for translating it. */
3
4
  export interface ColorPickerLabels {
4
5
  /** The eyedropper button, read out by screen readers. */
@@ -13,4 +14,8 @@ export interface ColorPickerProps extends Omit<HtmlProps, 'onChange'> {
13
14
  inline?: boolean;
14
15
  /** Overrides the text ColorPicker renders of its own. Merged per key. */
15
16
  labels?: ColorPickerLabels;
17
+ /** Classes for the inner elements. See `ColorPickerSlots`. */
18
+ classNames?: SlotClassNames<ColorPickerSlots>;
19
+ /** Inline styles for the inner elements. See `ColorPickerSlots`. */
20
+ styles?: SlotStyles<ColorPickerSlots>;
16
21
  }
@@ -11,6 +11,7 @@ import { DatePickerProps } from '../datePicker/datePicker.types';
11
11
  import { ColorPickerLabels } from '../colorPicker/colorPicker.types';
12
12
  import { EmptyStateLabels } from '../emptyState/emptyState.types';
13
13
  import { KlipyPickerLabels } from '../klipyPicker/klipyPicker.types';
14
+ import { SearchInputLabels } from '../searchInput/searchInput.types';
14
15
  import { VirtualListLabels } from '../virtualList/virtualList.types';
15
16
  import { ButtonProps } from '../button/button.types';
16
17
  import { ActionButtonsProps } from '../actionButtons/actionButtons.types';
@@ -70,6 +71,9 @@ export interface ComponentDefaults {
70
71
  KlipyPicker?: {
71
72
  labels?: KlipyPickerLabels;
72
73
  };
74
+ SearchInput?: {
75
+ labels?: SearchInputLabels;
76
+ };
73
77
  VirtualList?: {
74
78
  labels?: VirtualListLabels;
75
79
  };
@@ -1,4 +1,5 @@
1
- import { ReactNode } from 'react';
1
+ import { CSSProperties, ReactNode } from 'react';
2
+ import { HtmlProps } from '../types/slots.types';
2
3
  import { ActionButtonsProps } from '../actionButtons';
3
4
  /** Text ConfirmModal renders of its own, for translating it. */
4
5
  export interface ConfirmModalLabels {
@@ -7,9 +8,10 @@ export interface ConfirmModalLabels {
7
8
  /** The dismissing button (default `Cancel`). */
8
9
  cancel?: string;
9
10
  }
10
- export interface ConfirmModalProps {
11
+ export interface ConfirmModalProps extends Omit<HtmlProps<HTMLDivElement>, 'onClose' | 'content' | 'title'> {
11
12
  children?: ReactNode;
12
13
  className?: string;
14
+ style?: CSSProperties;
13
15
  onClose?: (didSubmit: boolean) => void;
14
16
  onConfirm?: () => void | Promise<void>;
15
17
  title?: string;
@@ -1,2 +1,2 @@
1
1
  import { DatePickerMonthProps } from './datePickerMonth.types';
2
- export default function DatePickerMonth({ className, month, year, onSelect, selectionStart, selectionEnd, minDate, maxDate, onNavigateMonth, }: DatePickerMonthProps): import("react").JSX.Element;
2
+ export default function DatePickerMonth({ style, className, month, year, onSelect, selectionStart, selectionEnd, minDate, maxDate, onNavigateMonth, }: DatePickerMonthProps): import("react").JSX.Element;
@@ -1,6 +1,9 @@
1
+ import { CSSProperties } from 'react';
1
2
  export interface DatePickerMonthProps {
2
3
  /** Class on the root element. */
3
4
  className?: string;
5
+ /** Inline style on the root element, forwarded from DatePicker's `calendar` slot. */
6
+ style?: CSSProperties;
4
7
  /** Month to display, 1 to 12. */
5
8
  month?: number;
6
9
  /** Year to display. */
@@ -1,8 +1,17 @@
1
- import { ReactNode } from 'react';
1
+ import { CSSProperties, ReactNode } from 'react';
2
2
  import { FormValidator } from '../../services/formValidation';
3
- export interface DatePickerProps {
3
+ import { HtmlProps, SlotClassNames, SlotStyles } from '../types/slots.types';
4
+ export type DatePickerSlots = 'root' | 'input' | 'header' | 'monthDropdown' | 'yearDropdown' | 'calendar' | 'clearButton';
5
+ /**
6
+ * `onChange` and `onSelect` report a date rather than a DOM event, so the native
7
+ * handlers of those names are dropped instead of being widened to accept both.
8
+ */
9
+ export interface DatePickerProps extends Omit<HtmlProps<HTMLDivElement>, 'onChange' | 'onSelect'> {
4
10
  /** Class on the root element. */
5
11
  className?: string;
12
+ style?: CSSProperties;
13
+ classNames?: SlotClassNames<DatePickerSlots>;
14
+ styles?: SlotStyles<DatePickerSlots>;
6
15
  /** Selected date, controlled. Ignored while a `formValidator` owns the value. */
7
16
  selected?: Date;
8
17
  /** Floating label on the input. */
@@ -1,4 +1,4 @@
1
1
  import { ReactElement } from 'react';
2
2
  import { DrawerProps } from './drawer.types';
3
- declare function Drawer({ className, isOpen, closedWidth, openedWidth, children }: DrawerProps): ReactElement;
3
+ declare function Drawer({ className, isOpen, closedWidth, openedWidth, children, style, classNames, styles: slotStyles, ...rest }: DrawerProps): ReactElement;
4
4
  export default Drawer;
@@ -1,5 +1,11 @@
1
- export interface DrawerProps {
1
+ import { CSSProperties } from 'react';
2
+ import { HtmlProps, SlotClassNames, SlotStyles } from '../types/slots.types';
3
+ export type DrawerSlots = 'root' | 'content' | 'inner';
4
+ export interface DrawerProps extends HtmlProps<HTMLDivElement> {
2
5
  className?: string;
6
+ style?: CSSProperties;
7
+ classNames?: SlotClassNames<DrawerSlots>;
8
+ styles?: SlotStyles<DrawerSlots>;
3
9
  isOpen?: boolean;
4
10
  /** Width of the container when closed. Defaults to 0. Any CSS length value, e.g. '48px'. */
5
11
  closedWidth?: string;
@@ -1,12 +1,13 @@
1
+ import { SlotClassNames, SlotStyles, HtmlProps } from '../types/slots.types';
1
2
  import { ReactNode, Ref } from 'react';
2
3
  import { FormValidator } from '../../services/formValidation';
3
- import { HtmlProps } from '../types/slots.types';
4
4
  import { Presentation } from '../floatingMenu/floatingMenu.types';
5
5
  export interface DropdownItem {
6
6
  key: string | number;
7
7
  label: ReactNode;
8
8
  disabled?: boolean;
9
9
  }
10
+ export type DropdownSlots = 'root' | 'label' | 'field' | 'control' | 'icon' | 'placeholder' | 'list' | 'option';
10
11
  export interface DropdownProps extends Omit<HtmlProps, 'onFocus' | 'onBlur' | 'onMouseEnter' | 'onMouseLeave'> {
11
12
  formValidator?: FormValidator | null;
12
13
  onMouseEnter?: ((event: React.MouseEvent) => void) | null;
@@ -33,15 +34,14 @@ export interface DropdownProps extends Omit<HtmlProps, 'onFocus' | 'onBlur' | 'o
33
34
  /** Where the list opens: anchored to the input (`Default`), pinned to the bottom of the
34
35
  * screen, or the latter only on a small touch screen. */
35
36
  presentation?: Presentation;
36
- inputClassName?: string;
37
- dropDownIconClassName?: string;
38
- dropDownClassName?: string;
39
- labelClassName?: string;
40
- dropDownInputClassName?: string;
41
37
  useMatLabelStyle?: boolean;
42
38
  alwaysFloatLabel?: boolean;
43
39
  placeholder?: string;
44
40
  plainStyle?: boolean;
45
41
  scrollToSelected?: boolean;
46
42
  reactRef?: Ref<HTMLButtonElement>;
43
+ /** Classes for the inner elements. See `DropdownSlots`. */
44
+ classNames?: SlotClassNames<DropdownSlots>;
45
+ /** Inline styles for the inner elements. See `DropdownSlots`. */
46
+ styles?: SlotStyles<DropdownSlots>;
47
47
  }
@@ -1,3 +1,3 @@
1
1
  import { ReactElement } from 'react';
2
2
  import { EmptyStateProps } from './emptyState.types';
3
- export default function EmptyState({ className, icon, children, labels, ...rest }: EmptyStateProps): ReactElement;
3
+ export default function EmptyState({ className, icon, children, labels, style, classNames, styles: slotStyles, ...rest }: EmptyStateProps): ReactElement;
@@ -1,6 +1,7 @@
1
+ import { SlotClassNames, SlotStyles, HtmlProps } from '../types/slots.types';
1
2
  import { ReactNode } from 'react';
2
3
  import { IconContent } from '../types/icon.types';
3
- import { HtmlProps } from '../types/slots.types';
4
+ export type EmptyStateSlots = 'root' | 'icon' | 'text';
4
5
  /** Text EmptyState renders of its own, for translating it. */
5
6
  export interface EmptyStateLabels {
6
7
  /** Shown when no `children` are given. */
@@ -12,4 +13,8 @@ export interface EmptyStateProps extends HtmlProps {
12
13
  children?: ReactNode;
13
14
  /** Overrides the text EmptyState renders of its own. Merged per key. */
14
15
  labels?: EmptyStateLabels;
16
+ /** Classes for the inner elements. See `EmptyStateSlots`. */
17
+ classNames?: SlotClassNames<EmptyStateSlots>;
18
+ /** Inline styles for the inner elements. See `EmptyStateSlots`. */
19
+ styles?: SlotStyles<EmptyStateSlots>;
15
20
  }
@@ -1,3 +1,3 @@
1
1
  import { FabBaseProps } from './fabBase.types';
2
- declare function FabBase({ children, size, className, styleType, onClick, }: FabBaseProps): import("react").JSX.Element;
2
+ declare function FabBase({ style, children, size, className, styleType, onClick, }: FabBaseProps): import("react").JSX.Element;
3
3
  export default FabBase;
@@ -1,10 +1,12 @@
1
- import { ReactNode } from 'react';
1
+ import { CSSProperties, ReactNode } from 'react';
2
2
  import { ButtonStyleType } from '../../../button/button.types';
3
3
  export type FabBaseSize = 'default' | 'mini';
4
4
  export interface FabBaseProps {
5
5
  children?: ReactNode;
6
6
  size?: FabBaseSize;
7
7
  className?: string;
8
+ /** Forwarded from Fab's `button` slot. */
9
+ style?: CSSProperties;
8
10
  styleType?: ButtonStyleType;
9
11
  onClick?: () => void;
10
12
  }
@@ -1,3 +1,3 @@
1
1
  import { FabProps } from './fab.types';
2
- declare function Fab({ children, size, menuEntries, onMenuEntryClicked, onClick, closeMenuOnEntryClicked, ...rest }: FabProps): import("react").JSX.Element;
2
+ declare function Fab({ children, size, menuEntries, onMenuEntryClicked, onClick, closeMenuOnEntryClicked, className, style, classNames, styles: slotStyles, ...rest }: FabProps): import("react").JSX.Element;
3
3
  export default Fab;
@@ -1,12 +1,13 @@
1
+ import { SlotClassNames, SlotStyles, HtmlProps } from '../types/slots.types';
1
2
  import { ReactNode } from 'react';
2
3
  import { IconContent } from '../types/icon.types';
3
- import { HtmlProps } from '../types/slots.types';
4
4
  export type FabSize = 'default' | 'mini';
5
5
  export interface FabMenuEntry {
6
6
  id: string;
7
7
  icon: IconContent;
8
8
  label?: string;
9
9
  }
10
+ export type FabSlots = 'root' | 'backdrop' | 'button' | 'icon' | 'menu' | 'menuEntry' | 'menuEntryLabel';
10
11
  export interface FabProps extends HtmlProps {
11
12
  children?: ReactNode;
12
13
  size?: FabSize;
@@ -14,4 +15,8 @@ export interface FabProps extends HtmlProps {
14
15
  onMenuEntryClicked?: (id: string) => void;
15
16
  onClick?: () => void;
16
17
  closeMenuOnEntryClicked?: boolean;
18
+ /** Classes for the inner elements. See `FabSlots`. */
19
+ classNames?: SlotClassNames<FabSlots>;
20
+ /** Inline styles for the inner elements. See `FabSlots`. */
21
+ styles?: SlotStyles<FabSlots>;
17
22
  }
@@ -1,4 +1,4 @@
1
1
  import { default as React } from 'react';
2
2
  import { InfiniteBlockProps } from './infiniteBlock.types';
3
- declare function InfiniteBlock({ children, onScroll, className, isDataLoading, setHighlightedIndex, }: InfiniteBlockProps): React.JSX.Element;
3
+ declare function InfiniteBlock({ children, onScroll, className, style, isDataLoading, setHighlightedIndex, }: InfiniteBlockProps): React.JSX.Element;
4
4
  export default InfiniteBlock;
@@ -4,6 +4,8 @@ export interface InfiniteBlockProps {
4
4
  /** Called when the user scrolls to the bottom; must return a Promise that resolves when the new data has loaded. */
5
5
  onScroll: () => Promise<void>;
6
6
  className?: string;
7
+ /** Inline style on the scroll container. */
8
+ style?: React.CSSProperties;
7
9
  /** Replaces children with a full-block spinner (initial load). */
8
10
  isDataLoading?: boolean;
9
11
  /** Called with the newly highlighted child index after keyboard navigation. */
@@ -1,6 +1,7 @@
1
1
  import { default as React } from 'react';
2
2
  import { NumericFormatProps } from 'react-number-format';
3
3
  import { FormValidator } from '../../services/formValidation';
4
+ import { SlotClassNames, SlotStyles } from '../types/slots.types';
4
5
  /**
5
6
  * How the stepper buttons are laid out.
6
7
  *
@@ -17,6 +18,7 @@ export interface NumberInputLabels {
17
18
  /** The step-down button, read out by screen readers (default `Decrease`). */
18
19
  decrease?: string;
19
20
  }
21
+ export type NumberInputSlots = 'root' | 'input' | 'arrows' | 'increaseButton' | 'decreaseButton';
20
22
  export interface NumberInputProps extends Omit<NumericFormatProps, 'onValueChange' | 'value' | 'customInput' | 'onChange' | 'step' | 'onKeyDown' | 'min' | 'max'> {
21
23
  value?: number | string;
22
24
  onChange?: (value: number | undefined) => void;
@@ -65,4 +67,8 @@ export interface NumberInputProps extends Omit<NumericFormatProps, 'onValueChang
65
67
  onKeyDown?: (e: React.KeyboardEvent<HTMLInputElement>) => void;
66
68
  /** Overrides the text NumberInput renders of its own. Merged per key. */
67
69
  labels?: NumberInputLabels;
70
+ /** Classes for the inner elements. See `NumberInputSlots`. */
71
+ classNames?: SlotClassNames<NumberInputSlots>;
72
+ /** Inline styles for the inner elements. See `NumberInputSlots`. */
73
+ styles?: SlotStyles<NumberInputSlots>;
68
74
  }
@@ -1,5 +1,5 @@
1
1
  import { ReactElement } from 'react';
2
2
  import { ProgressBarProps } from './progressBar.types';
3
3
  export declare function getContrastColor(hexColor: string): string;
4
- declare function ProgressBar({ className, total, progress, style, ...rest }: ProgressBarProps): ReactElement;
4
+ declare function ProgressBar({ className, total, progress, style, classNames, styles: slotStyles, ...rest }: ProgressBarProps): ReactElement;
5
5
  export default ProgressBar;
@@ -1,13 +1,18 @@
1
- import { HtmlProps } from '../types/slots.types';
1
+ import { SlotClassNames, SlotStyles, HtmlProps } from '../types/slots.types';
2
2
  export interface Progress {
3
3
  amount: number;
4
4
  label?: string;
5
5
  color?: string;
6
6
  class?: string;
7
7
  }
8
+ export type ProgressBarSlots = 'root' | 'fill' | 'label';
8
9
  export interface ProgressBarProps extends HtmlProps {
9
10
  className?: string | undefined;
10
11
  total?: number;
11
12
  progress?: number | Progress | Progress[];
12
13
  style?: React.CSSProperties | undefined;
14
+ /** Classes for the inner elements. See `ProgressBarSlots`. */
15
+ classNames?: SlotClassNames<ProgressBarSlots>;
16
+ /** Inline styles for the inner elements. See `ProgressBarSlots`. */
17
+ styles?: SlotStyles<ProgressBarSlots>;
13
18
  }
@@ -1,3 +1,3 @@
1
1
  import { ReactElement } from 'react';
2
2
  import { SearchInputProps } from './searchInput.types';
3
- export default function SearchInput({ value, onChange, onDebounce, placeholder, label, debounceMs, totalAmount, showAmount, className, width, ...rest }: SearchInputProps): ReactElement;
3
+ export default function SearchInput({ value, onChange, onDebounce, placeholder, label, debounceMs, totalAmount, showAmount, className, width, style, classNames, styles: slotStyles, labels, ...rest }: SearchInputProps): ReactElement;
@@ -1,4 +1,10 @@
1
- import { HtmlProps } from '../types/slots.types';
1
+ import { SlotClassNames, SlotStyles, HtmlProps } from '../types/slots.types';
2
+ export type SearchInputSlots = 'root' | 'input' | 'resultCount';
3
+ /** Text SearchInput renders of its own, for translating it. */
4
+ export interface SearchInputLabels {
5
+ /** The result count, given the number (default `12 results`). */
6
+ results?: (count: number) => string;
7
+ }
2
8
  export interface SearchInputProps extends Omit<HtmlProps, 'onChange'> {
3
9
  value: string;
4
10
  onChange: (value: string) => void;
@@ -10,4 +16,10 @@ export interface SearchInputProps extends Omit<HtmlProps, 'onChange'> {
10
16
  showAmount?: boolean;
11
17
  className?: string;
12
18
  width?: number | string;
19
+ /** Classes for the inner elements. See `SearchInputSlots`. */
20
+ classNames?: SlotClassNames<SearchInputSlots>;
21
+ /** Inline styles for the inner elements. See `SearchInputSlots`. */
22
+ styles?: SlotStyles<SearchInputSlots>;
23
+ /** Overrides the text SearchInput renders of its own. Merged per key. */
24
+ labels?: SearchInputLabels;
13
25
  }
package/docs/Card.md CHANGED
@@ -82,3 +82,5 @@ All sub-components are optional — use only what you need. Stacked sub-componen
82
82
  Card is spaced by its font: the padding, the header's gap and thumbnail, the gap between title and subtitle, and the action row all scale with the theme's text size. The title is `1.125em` — 18px at a 16px base — rather than a fixed size, so it stays proportional to the body text beneath it.
83
83
 
84
84
  `CardMedia` bleeds to the card's edges with a negative margin that has to stay equal to the padding, so change the two together.
85
+
86
+ **Slots:** `root` `content`
package/docs/Chip.md CHANGED
@@ -68,3 +68,5 @@ import { Chip, ChipContainer, ChipStyleType } from '@ahrowe/ui';
68
68
  | `inline` | `boolean` | Inline layout (default wraps) |
69
69
 
70
70
  **Labels:** `remove` — the text this component renders of its own. Pass `labels` to override any of them, on the component or app-wide through `ConfigProvider`; keys merge individually. Type: `ChipLabels`.
71
+
72
+ **Slots:** `root` `inner` `thumbnail` `text` `removeIcon`
@@ -52,3 +52,5 @@ The inline swatch tracks the theme's text size, since it sits beside a label: `-
52
52
  The picker panel deliberately does not. It is a floating control surface with its own fixed layout — a saturation area, sliders and a hex field — and it holds together at a large base font rather than needing to grow with it.
53
53
 
54
54
  **Labels:** `pickFromScreen` — the text this component renders of its own. Pass `labels` to override any of them, on the component or app-wide through `ConfigProvider`; they merge per key. Type: `ColorPickerLabels`.
55
+
56
+ **Slots:** `root` `swatch` `panel` `gradient` `hueSlider` `alphaSlider` `hexInput` `eyeDropper`
@@ -80,3 +80,7 @@ const dateValidator = new FormValidator<Date | null>(null);
80
80
  | `showClearButton` | `boolean` | Show a clear/reset button |
81
81
  | `startDate` | `Date` | Range highlight start |
82
82
  | `endDate` | `Date` | Range highlight end |
83
+
84
+ **Slots:** `root` `input` `header` `monthDropdown` `yearDropdown` `calendar` `clearButton`
85
+
86
+ The root also takes the full native attribute set (`id`, `data-*`, `aria-*`, `title`, event handlers). `onChange` and `onSelect` report a `Date`, so the native handlers of those names are not available.
package/docs/Drawer.md CHANGED
@@ -62,3 +62,5 @@ function Example() {
62
62
  - It's an **inline** element with `height: 100%` and a `width` transition — place it in a flex/grid layout next to your main content; it doesn't overlay.
63
63
  - When `openedWidth` is omitted, the open width tracks the content's `scrollWidth` via a `ResizeObserver`, so it grows/shrinks with dynamic content.
64
64
  - For a full-screen overlay dialog instead, use `Modal`; for a collapsing scroll header, see `Overscroll`.
65
+
66
+ **Slots:** `root` `content` `inner`
package/docs/Dropdown.md CHANGED
@@ -65,3 +65,5 @@ const statusValidator = new FormValidator('', [Validators.required()]);
65
65
  The list is rendered through a portal and tracks the trigger across scroll, so it always escapes clipping ancestors (cards, scroll containers, virtualized lists). It flips to open upward automatically when there's no room below, and shifts horizontally to stay within the viewport when the trigger sits near the left or right edge of the screen. It hides (without closing) if the trigger itself scrolls behind a clipping ancestor, reappearing once it's back in view. It also re-measures when its own content changes size while open, so a list that shrinks (e.g. filtered down to fewer entries) stays anchored to the trigger instead of hanging above it.
66
66
 
67
67
  **Bottom sheet:** `presentation={Presentation.Sheet}` drops the anchoring entirely and pins the list to the bottom of the screen instead, full width up to 560px, behind a backdrop, scrolling internally past 70% of the viewport height and lifting itself above an open on-screen keyboard, shrinking to fit the space that leaves rather than running off the top of the screen. Tapping the backdrop closes the list without also pressing whatever sits behind it. It is the same list with the same keyboard handling, so selection, highlighting and infinite scroll are unchanged. `Presentation.Auto` does that only when the pointer is coarse *and* the screen is under 768px wide. The default is `Presentation.Default`. A whole app can opt in with `<ConfigProvider defaultProps={{ Dropdown: { presentation: Presentation.Auto } }}>`, or for every sheet-capable component at once with `<ConfigProvider presentation={Presentation.Auto}>` — see [ConfigProvider.md](ConfigProvider.md).
68
+
69
+ **Slots:** `root` `label` `field` `control` `icon` `placeholder` `list` `option`
@@ -30,3 +30,5 @@ import { faInbox } from '@fortawesome/free-solid-svg-icons';
30
30
  | `className` | `string` | Root element class |
31
31
 
32
32
  **Labels:** `empty` — the text this component renders of its own. Pass `labels` to override it, on the component or app-wide through `ConfigProvider`; keys merge individually. Type: `EmptyStateLabels`.
33
+
34
+ **Slots:** `root` `icon` `text`
package/docs/Fab.md CHANGED
@@ -57,3 +57,5 @@ import { faPlus, faPen, faCamera } from '@fortawesome/free-solid-svg-icons';
57
57
  ```
58
58
 
59
59
  `--fab-icon-size` is independent of `--fab-size`, so enlarging the button does not enlarge the glyph; set both. It applies to the speed-dial entries as well as the main button.
60
+
61
+ **Slots:** `root` `backdrop` `button` `icon` `menu` `menuEntry` `menuEntryLabel`
@@ -126,3 +126,7 @@ const qty = new FormValidator<number | undefined>(undefined, [inRange(10, 100)])
126
126
  **Mobile keyboard layout:** shows the numeric on-screen keyboard automatically (`inputMode="numeric"` when `decimalScale={0}`, `"decimal"` otherwise, so a decimal separator key is available whenever fractional values are allowed). Pass `inputMode` directly to override.
127
127
 
128
128
  **Labels:** `increase` `decrease` — the text this component renders of its own. Pass `labels` to override any of them, on the component or app-wide through `ConfigProvider`; keys merge individually. Type: `NumberInputLabels`.
129
+
130
+ **Slots:** `root` `input` `arrows` `increaseButton` `decreaseButton`
131
+
132
+ With `arrowsLayout='split'` the root is the group around the two buttons and the field; otherwise it is the field itself.
@@ -58,3 +58,5 @@ const theme: Theme = {
58
58
  // Or one-off via style
59
59
  <ProgressBar progress={60} style={{ '--progress-bar-track-color': '#2a2a2a' } as React.CSSProperties} />
60
60
  ```
61
+
62
+ **Slots:** `root` `fill` `label`
@@ -55,3 +55,7 @@ import { SearchInput } from '@ahrowe/ui';
55
55
  | `showAmount` | `boolean` | Show the result count line (default `true`) |
56
56
  | `width` | `number \| string` | Fixed width for the wrapper |
57
57
  | `className` | `string` | Root wrapper class |
58
+
59
+ **Slots:** `root` `input` `resultCount`
60
+
61
+ **Labels:** `results(count)` — the line under the field (default `12 results`). Pass `labels` to override it, on the component or app-wide through `ConfigProvider`. Type: `SearchInputLabels`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ahrowe/ui",
3
- "version": "0.32.0",
3
+ "version": "0.33.0",
4
4
  "description": "A React UI component library with theming, CSS Modules, and TypeScript support",
5
5
  "keywords": [
6
6
  "components",