@foi/design-system 0.0.11 → 0.0.13

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 (109) hide show
  1. package/README.md +141 -1
  2. package/dist/DatePicker.utils-ytCEcs6T.js.map +1 -1
  3. package/dist/{RadioGroup-BL2bdmZx.js → RadioGroup-DCJBoZc-.js} +30 -29
  4. package/dist/RadioGroup-DCJBoZc-.js.map +1 -0
  5. package/dist/{RadioGroup.context-BdRgENJJ.js → RadioGroup.context-QNk2hW_4.js} +4 -4
  6. package/dist/RadioGroup.context-QNk2hW_4.js.map +1 -0
  7. package/dist/{Switch-BS8iwAJ5.js → Switch-JF9P9VJf.js} +464 -447
  8. package/dist/Switch-JF9P9VJf.js.map +1 -0
  9. package/dist/{ThemeProvider-JlN3U_r2.js → ThemeProvider-Q2Hjezbt.js} +2 -2
  10. package/dist/{ThemeProvider-JlN3U_r2.js.map → ThemeProvider-Q2Hjezbt.js.map} +1 -1
  11. package/dist/atoms.mjs +2 -2
  12. package/dist/components/atoms/Button/Button.interface.d.ts +6 -2
  13. package/dist/components/atoms/Button/index.d.ts +1 -1
  14. package/dist/components/atoms/Checkbox/Checkbox.d.ts +4 -1
  15. package/dist/components/atoms/Checkbox/Checkbox.interface.d.ts +1 -1
  16. package/dist/components/atoms/DatePicker/DatePicker.interface.d.ts +4 -0
  17. package/dist/components/atoms/DatePicker/DatePickerMenu/DatePickerMenu.d.ts +0 -2
  18. package/dist/components/atoms/DatePicker/index.d.ts +1 -1
  19. package/dist/components/atoms/IconButton/IconButton.interface.d.ts +6 -2
  20. package/dist/components/atoms/IconButton/index.d.ts +1 -1
  21. package/dist/components/atoms/Input/Input.d.ts +6 -7
  22. package/dist/components/atoms/Input/Input.interface.d.ts +66 -13
  23. package/dist/components/atoms/Input/index.d.ts +1 -1
  24. package/dist/components/atoms/Pagination/Pagination.d.ts +12 -0
  25. package/dist/components/atoms/Pagination/Pagination.emotion.d.ts +2 -0
  26. package/dist/components/atoms/Pagination/Pagination.interface.d.ts +32 -0
  27. package/dist/components/atoms/Pagination/PaginationMenu/PaginationMenu.d.ts +9 -0
  28. package/dist/components/atoms/Pagination/PaginationMenu/PaginationMenu.emotion.d.ts +2 -0
  29. package/dist/components/atoms/Pagination/PaginationMenu/PaginationMenu.interface.d.ts +23 -0
  30. package/dist/components/atoms/Pagination/PaginationMenu/index.d.ts +4 -0
  31. package/dist/components/atoms/Pagination/index.d.ts +4 -0
  32. package/dist/components/atoms/Radio/Radio.d.ts +4 -0
  33. package/dist/components/atoms/Radio/Radio.interface.d.ts +4 -0
  34. package/dist/components/atoms/Radio/RadioGroup.context.d.ts +2 -0
  35. package/dist/components/atoms/Radio/index.d.ts +1 -1
  36. package/dist/components/atoms/Select/Select.interface.d.ts +4 -0
  37. package/dist/components/atoms/Select/SelectMenu/SelectMenu.d.ts +1 -2
  38. package/dist/components/atoms/Select/index.d.ts +1 -1
  39. package/dist/components/atoms/Skeleton/Skeleton.d.ts +10 -0
  40. package/dist/components/atoms/Skeleton/Skeleton.emotion.d.ts +2 -0
  41. package/dist/components/atoms/Skeleton/Skeleton.interface.d.ts +14 -0
  42. package/dist/components/atoms/Skeleton/index.d.ts +2 -0
  43. package/dist/components/atoms/Slider/Slider.interface.d.ts +4 -0
  44. package/dist/components/atoms/Slider/index.d.ts +1 -1
  45. package/dist/components/atoms/Switch/Switch.interface.d.ts +5 -1
  46. package/dist/components/atoms/Switch/index.d.ts +1 -1
  47. package/dist/components/molecules/CheckboxGroup/CheckboxGroup.interface.d.ts +4 -0
  48. package/dist/components/molecules/CheckboxGroup/index.d.ts +1 -1
  49. package/dist/components/molecules/CheckboxTree/CheckboxTree.interface.d.ts +4 -0
  50. package/dist/components/molecules/CheckboxTree/index.d.ts +1 -1
  51. package/dist/components/molecules/Modal/Modal.d.ts +14 -0
  52. package/dist/components/molecules/Modal/Modal.emotion.d.ts +2 -0
  53. package/dist/components/molecules/Modal/Modal.interface.d.ts +42 -0
  54. package/dist/components/molecules/Modal/index.d.ts +5 -0
  55. package/dist/components/molecules/RadioGroup/RadioGroup.interface.d.ts +4 -0
  56. package/dist/components/molecules/RadioGroup/index.d.ts +1 -1
  57. package/dist/components/organisms/DataGrid/DataGrid.d.ts +19 -0
  58. package/dist/components/organisms/DataGrid/DataGrid.emotion.d.ts +2 -0
  59. package/dist/components/organisms/DataGrid/DataGrid.interface.d.ts +124 -0
  60. package/dist/components/organisms/DataGrid/DataGridMenu/DataGridMenu.d.ts +14 -0
  61. package/dist/components/organisms/DataGrid/DataGridMenu/DataGridMenu.emotion.d.ts +2 -0
  62. package/dist/components/organisms/DataGrid/DataGridMenu/DataGridMenu.interface.d.ts +54 -0
  63. package/dist/components/organisms/DataGrid/DataGridMenu/components/DataGridMenuMultiSelect.d.ts +12 -0
  64. package/dist/components/organisms/DataGrid/DataGridMenu/components/DataGridMenuSearch.d.ts +8 -0
  65. package/dist/components/organisms/DataGrid/DataGridMenu/index.d.ts +3 -0
  66. package/dist/components/organisms/DataGrid/DataGridSkeleton/DataGridSkeleton.d.ts +7 -0
  67. package/dist/components/organisms/DataGrid/DataGridSkeleton/index.d.ts +1 -0
  68. package/dist/components/organisms/DataGrid/index.d.ts +4 -0
  69. package/dist/{emotion-react-jsx-runtime.browser.esm-ClrpcFMG.js → emotion-react-jsx-runtime.browser.esm-C4rLUMui.js} +9 -8
  70. package/dist/emotion-react-jsx-runtime.browser.esm-C4rLUMui.js.map +1 -0
  71. package/dist/hocs/ThemeProvider/components/DataGrid.d.ts +20 -0
  72. package/dist/hocs/ThemeProvider/components/DataGridMenu.d.ts +18 -0
  73. package/dist/hocs/ThemeProvider/components/Modal.d.ts +16 -0
  74. package/dist/hocs/ThemeProvider/components/Pagination.d.ts +13 -0
  75. package/dist/hocs/ThemeProvider/components/PaginationMenu.d.ts +24 -0
  76. package/dist/hocs/ThemeProvider/components/index.d.ts +5 -1
  77. package/dist/hocs/ThemeProvider/interfaces/Components.interface.d.ts +6 -1
  78. package/dist/hocs.mjs +1 -1
  79. package/dist/hooks/useOnClickOutside.d.ts +2 -3
  80. package/dist/hooks.mjs +1 -1
  81. package/dist/index.d.ts +6 -0
  82. package/dist/index.mjs +918 -6
  83. package/dist/index.mjs.map +1 -0
  84. package/dist/molecules.mjs +1 -1
  85. package/dist/theme/dark/colors.d.ts +1 -8
  86. package/dist/theme/dark/components/Button.d.ts +37 -0
  87. package/dist/theme/dark/components/DataGrid.d.ts +26 -0
  88. package/dist/theme/dark/components/DataGridMenu.d.ts +20 -0
  89. package/dist/theme/dark/components/Modal.d.ts +20 -0
  90. package/dist/theme/dark/components/Pagination.d.ts +12 -0
  91. package/dist/theme/dark/components/PaginationMenu.d.ts +32 -0
  92. package/dist/theme/dark/components/index.d.ts +132 -0
  93. package/dist/theme/dark/index.d.ts +132 -0
  94. package/dist/theme/index.d.ts +132 -0
  95. package/dist/{theme-D18AZjTt.js → theme-Cxg9jdmX.js} +126 -29
  96. package/dist/theme-Cxg9jdmX.js.map +1 -0
  97. package/dist/theme.mjs +1 -1
  98. package/dist/useStateCallback-B4O93zzK.js +32 -0
  99. package/dist/useStateCallback-B4O93zzK.js.map +1 -0
  100. package/dist/utilities.mjs +4 -5
  101. package/dist/utilities.mjs.map +1 -1
  102. package/package.json +1 -1
  103. package/dist/RadioGroup-BL2bdmZx.js.map +0 -1
  104. package/dist/RadioGroup.context-BdRgENJJ.js.map +0 -1
  105. package/dist/Switch-BS8iwAJ5.js.map +0 -1
  106. package/dist/emotion-react-jsx-runtime.browser.esm-ClrpcFMG.js.map +0 -1
  107. package/dist/theme-D18AZjTt.js.map +0 -1
  108. package/dist/useStateCallback-D9fqdxiO.js +0 -26
  109. package/dist/useStateCallback-D9fqdxiO.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  import React, { type ReactNode, type JSX } from 'react';
2
- import type { EVENTS } from '@hocs/ThemeProvider/components/Input';
3
- export interface ButtonStyleProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
2
+ import type { EVENTS } from '@hocs/ThemeProvider/components/Button';
3
+ export interface ButtonStyleProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'style'> {
4
4
  /** Content rendered inside the button. Can be a string, element, or any React node.
5
5
  * @default 'Click me!'
6
6
  */
@@ -22,6 +22,10 @@ export interface ButtonStyleProps extends React.ButtonHTMLAttributes<HTMLButtonE
22
22
  className?: string;
23
23
  /** Theme override tokens. Pass a partial `EVENTS` object to customise colours. */
24
24
  theme?: EVENTS;
25
+ /** Selects the style variant defined in the theme.
26
+ * @default 'default'
27
+ */
28
+ variant?: string;
25
29
  }
26
30
  export interface ButtonProps extends ButtonStyleProps {
27
31
  /** Theme tokens injected by the ThemeProvider HOC. Do not pass manually. */
@@ -1,3 +1,3 @@
1
1
  import type { ButtonStyleProps } from './Button.interface';
2
- declare const Button: ({ theme, ...rest }: ButtonStyleProps) => import("@emotion/react/jsx-runtime").JSX.Element;
2
+ declare const Button: ({ theme, variant, ...rest }: ButtonStyleProps) => import("@emotion/react/jsx-runtime").JSX.Element;
3
3
  export default Button;
@@ -1,7 +1,10 @@
1
1
  import React from 'react';
2
2
  import type { CheckboxProps, CheckboxBaseProps } from './Checkbox.interface';
3
3
  import { type FieldValues } from 'react-hook-form';
4
- /** @internal Headless presentational layer shared by all checkbox variants. */
4
+ /**
5
+ * Headless presentational layer for the checkbox.
6
+ * Accepts `checked` and `onChecked` directly — use this when you need a controlled checkbox outside of React Hook Form.
7
+ */
5
8
  export declare const CheckboxBase: React.ForwardRefExoticComponent<CheckboxBaseProps & React.RefAttributes<HTMLInputElement>>;
6
9
  declare const Checkbox: <TFieldValues extends FieldValues = FieldValues>(props: CheckboxProps<TFieldValues>) => import("@emotion/react/jsx-runtime").JSX.Element;
7
10
  export default Checkbox;
@@ -28,7 +28,7 @@ export interface CheckboxBaseProps extends Omit<React.InputHTMLAttributes<HTMLIn
28
28
  message?: string;
29
29
  };
30
30
  }
31
- export interface CheckboxStyleProps<TFieldValues extends FieldValues = FieldValues> extends React.InputHTMLAttributes<HTMLInputElement> {
31
+ export interface CheckboxStyleProps<TFieldValues extends FieldValues = FieldValues> extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'style'> {
32
32
  /** RHF field name. Required in standalone mode; optional (ignored) inside CheckboxGroup. */
33
33
  name?: string;
34
34
  /** Text label displayed next to the checkbox. */
@@ -45,6 +45,10 @@ export interface DatePickerStyleProps<TFieldValues extends FieldValues = FieldVa
45
45
  className?: string;
46
46
  /** Theme override tokens. Pass a partial `EVENTS` object to customise colours. */
47
47
  theme?: EVENTS;
48
+ /** Selects the style variant defined in the theme.
49
+ * @default 'default'
50
+ */
51
+ variant?: string;
48
52
  }
49
53
  export interface DatePickerProps<TFieldValues extends FieldValues = FieldValues> extends DatePickerStyleProps<TFieldValues> {
50
54
  /** Theme tokens injected by the ThemeProvider HOC. Do not pass manually. */
@@ -7,8 +7,6 @@ import type { DatePickerMenuProps } from './DatePickerMenu.interface';
7
7
  * scrollable year-picker. Keyboard navigation (arrow keys, Enter, Escape) is
8
8
  * handled by the parent `DatePicker`; this component focuses the active day
9
9
  * button when `focusedElement` changes.
10
- *
11
- * @internal — rendered exclusively by `DatePicker`. Do not use directly.
12
10
  */
13
11
  declare const DatePickerMenu: React.ForwardRefExoticComponent<DatePickerMenuProps & React.RefAttributes<HTMLDivElement>>;
14
12
  export default DatePickerMenu;
@@ -1,4 +1,4 @@
1
1
  import type { DatePickerStyleProps } from './DatePicker.interface';
2
2
  import type { FieldValues } from 'react-hook-form';
3
- declare const DatePicker: <TFieldValues extends FieldValues = FieldValues>({ theme, ...rest }: DatePickerStyleProps<TFieldValues>) => import("@emotion/react/jsx-runtime").JSX.Element;
3
+ declare const DatePicker: <TFieldValues extends FieldValues = FieldValues>({ theme, variant, ...rest }: DatePickerStyleProps<TFieldValues>) => import("@emotion/react/jsx-runtime").JSX.Element;
4
4
  export default DatePicker;
@@ -1,6 +1,6 @@
1
1
  import React, { type JSX } from 'react';
2
- import type { EVENTS } from '@hocs/ThemeProvider/components/Input';
3
- export interface IconButtonStyleProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
2
+ import type { EVENTS } from '@hocs/ThemeProvider/components/IconButton';
3
+ export interface IconButtonStyleProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'style'> {
4
4
  /** The icon element rendered inside the button. */
5
5
  icon: JSX.Element;
6
6
  /** Click handler. Required — IconButton is always interactive. */
@@ -14,6 +14,10 @@ export interface IconButtonStyleProps extends React.ButtonHTMLAttributes<HTMLBut
14
14
  className?: string;
15
15
  /** Theme override tokens. Pass a partial `EVENTS` object to customise colours. */
16
16
  theme?: EVENTS;
17
+ /** Selects the style variant defined in the theme.
18
+ * @default 'default'
19
+ */
20
+ variant?: string;
17
21
  }
18
22
  export interface IconButtonProps extends IconButtonStyleProps {
19
23
  /** Theme tokens injected by the ThemeProvider HOC. Do not pass manually. */
@@ -1,3 +1,3 @@
1
1
  import type { IconButtonStyleProps } from './IconButton.interface';
2
- declare const IconButton: ({ theme, ...rest }: IconButtonStyleProps) => import("@emotion/react/jsx-runtime").JSX.Element;
2
+ declare const IconButton: ({ theme, variant, ...rest }: IconButtonStyleProps) => import("@emotion/react/jsx-runtime").JSX.Element;
3
3
  export default IconButton;
@@ -1,11 +1,10 @@
1
- import type { InputProps } from './Input.interface';
1
+ import type { InputBaseProps, InputProps } from './Input.interface';
2
2
  import { type FieldValues } from 'react-hook-form';
3
3
  /**
4
- * A text input field that lets users enter and edit a single line of text.
5
- *
6
- * Supports floating labels, helper/error text, leading and trailing adornments,
7
- * optional value formatting, and input filtering via `regex`.
8
- * The form value is a `string`.
4
+ * Headless presentational layer shared by all input variants.
5
+ * Handles value rendering, adornments, error display, and formatting.
6
+ * Wrap with the `Input` component (which wires RHF) for form use.
9
7
  */
10
- declare const Input: <TFieldValues extends FieldValues = FieldValues>({ name, label, control, width, disabled, type, regex, hasPadding, format, startAdornment, endAdornment, helperText, showErrorText, style, className, ...rest }: InputProps<TFieldValues>) => import("@emotion/react/jsx-runtime").JSX.Element;
8
+ export declare const InputBase: ({ label, value, onChange, error, style, width, disabled, type, regex, hasPadding, format, startAdornment, endAdornment, helperText, showErrorText, className, onBlur, ...rest }: InputBaseProps) => import("@emotion/react/jsx-runtime").JSX.Element;
9
+ declare const Input: <TFieldValues extends FieldValues = FieldValues>(props: InputProps<TFieldValues>) => import("@emotion/react/jsx-runtime").JSX.Element;
11
10
  export default Input;
@@ -1,30 +1,81 @@
1
1
  import React, { type JSX } from 'react';
2
2
  import type { EVENTS } from '@hocs/ThemeProvider/components/Input';
3
3
  import type { Control, FieldValues } from 'react-hook-form';
4
- export interface InputStyleProps<TFieldValues extends FieldValues = FieldValues> extends React.InputHTMLAttributes<HTMLInputElement> {
4
+ /** Internal props used by InputBase the headless presentational layer. */
5
+ export interface InputBaseProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'style' | 'value'> {
6
+ /** Floating label displayed inside the field border. */
7
+ label: string;
8
+ /** Current value (controlled). */
9
+ value: string;
10
+ /** Callback fired when the value changes. Receives the processed string. */
11
+ onChange: (value: string) => void;
12
+ /** Validation error from RHF (or any external source). */
13
+ error?: {
14
+ message?: string;
15
+ };
16
+ /** Theme tokens injected by the ThemeProvider HOC. Do not pass manually. */
17
+ style?: Record<string, string>;
18
+ /** Controls the rendered width of the field.
19
+ * @default 'medium'
20
+ */
21
+ width?: 'small' | 'medium' | 'large' | 'full';
22
+ /** HTML input type.
23
+ * @default 'text'
24
+ */
25
+ type?: 'text' | 'password' | 'number' | 'email';
26
+ /** Each keystroke is validated against this regex; non-matching chars are ignored. */
27
+ regex?: RegExp;
28
+ /** When `false`, validation error text below the field is hidden.
29
+ * @default true
30
+ */
31
+ showErrorText?: boolean;
32
+ /** When `true`, adds bottom padding below the helper text area.
33
+ * @default false
34
+ */
35
+ hasPadding?: boolean;
36
+ /** Applied to the value on every keystroke before it is stored. */
37
+ format?: (value: string) => string;
38
+ /** Element rendered on the left side of the input. */
39
+ startAdornment?: JSX.Element;
40
+ /** Element rendered on the right side of the input. */
41
+ endAdornment?: JSX.Element;
42
+ /** Helper text displayed below the field when there is no active error. */
43
+ helperText?: string;
44
+ /** Additional CSS class applied to the root element. */
45
+ className?: string;
46
+ /** Prevents all interaction when `true`.
47
+ * @default false
48
+ */
49
+ disabled?: boolean;
50
+ /** Placeholder text shown when the field is empty and has no floating label focus. */
51
+ placeholder?: string;
52
+ }
53
+ export interface InputStyleProps<TFieldValues extends FieldValues = FieldValues> extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'style' | 'onChange' | 'value'> {
5
54
  /** RHF field name. The form value will be a `string`. */
6
55
  name: string;
7
56
  /** Floating label displayed inside the field border. */
8
57
  label: string;
9
- /** RHF control object. */
10
- control: Control<TFieldValues>;
58
+ /** RHF control object. Omit to use controlled mode with `value` + `onValueChange`. */
59
+ control?: Control<TFieldValues>;
60
+ /** Current value for controlled mode (used when `control` is omitted). */
61
+ value?: string;
62
+ /** Callback for controlled mode (used when `control` is omitted). */
63
+ onValueChange?: (value: string) => void;
11
64
  /** Prevents all interaction when `true`.
12
65
  * @default false
13
66
  */
14
67
  disabled?: boolean;
15
- /** Short hint shown inside the field before the user enters a value. */
68
+ /** Placeholder text shown when the field is empty and has no floating label focus. */
16
69
  placeholder?: string;
17
70
  /** Controls the rendered width of the field.
18
71
  * @default 'medium'
19
72
  */
20
73
  width?: 'small' | 'medium' | 'large' | 'full';
21
- /** HTML input type. Use `'password'` to mask the value.
74
+ /** HTML input type.
22
75
  * @default 'text'
23
76
  */
24
77
  type?: 'text' | 'password' | 'number' | 'email';
25
- /** When provided, each keystroke is validated against this regex.
26
- * Characters that do not match are silently ignored.
27
- */
78
+ /** Each keystroke is validated against this regex; non-matching chars are ignored. */
28
79
  regex?: RegExp;
29
80
  /** When `false`, validation error text below the field is hidden.
30
81
  * @default true
@@ -34,13 +85,11 @@ export interface InputStyleProps<TFieldValues extends FieldValues = FieldValues>
34
85
  * @default false
35
86
  */
36
87
  hasPadding?: boolean;
37
- /** A function applied to the value on every keystroke before it is stored.
38
- * Receives the raw string and must return the formatted string.
39
- */
88
+ /** Applied to the value on every keystroke before it is stored. */
40
89
  format?: (value: string) => string;
41
- /** Element rendered on the **left** side of the input (e.g. an icon or a currency symbol). */
90
+ /** Element rendered on the left side of the input. */
42
91
  startAdornment?: JSX.Element;
43
- /** Element rendered on the **right** side of the input (e.g. an action icon). */
92
+ /** Element rendered on the right side of the input. */
44
93
  endAdornment?: JSX.Element;
45
94
  /** Helper text displayed below the field when there is no active error. */
46
95
  helperText?: string;
@@ -48,6 +97,10 @@ export interface InputStyleProps<TFieldValues extends FieldValues = FieldValues>
48
97
  className?: string;
49
98
  /** Theme override tokens. Pass a partial `EVENTS` object to customise colours. */
50
99
  theme?: EVENTS;
100
+ /** Selects the style variant defined in the theme.
101
+ * @default 'default'
102
+ */
103
+ variant?: string;
51
104
  }
52
105
  export interface InputProps<TFieldValues extends FieldValues = FieldValues> extends InputStyleProps<TFieldValues> {
53
106
  /** Theme tokens injected by the ThemeProvider HOC. Do not pass manually. */
@@ -1,4 +1,4 @@
1
1
  import type { InputStyleProps } from './Input.interface';
2
2
  import type { FieldValues } from 'react-hook-form';
3
- declare const Input: <TFieldValues extends FieldValues = FieldValues>({ theme, ...rest }: InputStyleProps<TFieldValues>) => import("@emotion/react/jsx-runtime").JSX.Element;
3
+ declare const Input: <TFieldValues extends FieldValues = FieldValues>({ theme, variant, ...rest }: InputStyleProps<TFieldValues>) => import("@emotion/react/jsx-runtime").JSX.Element;
4
4
  export default Input;
@@ -0,0 +1,12 @@
1
+ import type { PaginationProps } from './Pagination.interface';
2
+ /**
3
+ * A pagination control bar that lets users navigate between pages of data.
4
+ *
5
+ * Displays the current row range (`start–end of total`), first/prev/next/last
6
+ * navigation buttons, and — when `pageSizeOptions` is provided — a rows-per-page
7
+ * dropdown menu.
8
+ *
9
+ * All navigation buttons are disabled while `loading` is `true`.
10
+ */
11
+ declare const Pagination: ({ page, total, pageSize, onPageChange, pageSizeOptions, onPageSizeChange, loading, className, style, }: PaginationProps) => import("@emotion/react/jsx-runtime").JSX.Element;
12
+ export default Pagination;
@@ -0,0 +1,2 @@
1
+ declare const Style: (theme: Record<string, string>) => import("@emotion/utils").SerializedStyles;
2
+ export default Style;
@@ -0,0 +1,32 @@
1
+ export interface PaginationProps {
2
+ /** Zero-based index of the currently active page. */
3
+ page: number;
4
+ /** Total number of rows across all pages (used to compute the page count). */
5
+ total: number;
6
+ /** Number of rows displayed per page. */
7
+ pageSize: number;
8
+ /** Callback fired when the user navigates to a different page. Receives the new zero-based page index. */
9
+ onPageChange: (page: number) => void;
10
+ /** List of page-size choices rendered in the rows-per-page menu.
11
+ * When omitted the rows-per-page control is hidden.
12
+ */
13
+ pageSizeOptions?: number[];
14
+ /** Callback fired when the user selects a new page size. */
15
+ onPageSizeChange?: (pageSize: number) => void;
16
+ /** When `true`, all navigation buttons are disabled to signal a pending fetch.
17
+ * @default false
18
+ */
19
+ loading?: boolean;
20
+ /** Additional CSS class applied to the root element. */
21
+ className?: string;
22
+ /** Theme tokens injected by the ThemeProvider HOC. Do not pass manually. */
23
+ style?: Record<string, string>;
24
+ }
25
+ export interface PaginationStyleProps extends Omit<PaginationProps, 'style'> {
26
+ /** Theme override tokens. */
27
+ theme?: Record<string, Record<string, Record<string, Record<string, string>>>>;
28
+ /** Selects the style variant defined in the theme.
29
+ * @default 'default'
30
+ */
31
+ variant?: string;
32
+ }
@@ -0,0 +1,9 @@
1
+ import type { PaginationMenuProps } from './PaginationMenu.interface';
2
+ /**
3
+ * A floating dropdown that renders a list of page-size options.
4
+ *
5
+ * Rendered inside `<Pagination>` when `pageSizeOptions` is provided.
6
+ * Keyboard focus is controlled externally via `focusedElement`.
7
+ */
8
+ declare const PaginationMenu: ({ options, activeOption, onSelect, focusedElement, style }: PaginationMenuProps) => import("@emotion/react/jsx-runtime").JSX.Element;
9
+ export default PaginationMenu;
@@ -0,0 +1,2 @@
1
+ declare const Style: (theme: Record<string, string>) => import("@emotion/utils").SerializedStyles;
2
+ export default Style;
@@ -0,0 +1,23 @@
1
+ export interface PaginationMenuProps {
2
+ /** List of page-size values to display as selectable options. */
3
+ options: number[];
4
+ /** The currently active page-size value (will be highlighted). */
5
+ activeOption: number;
6
+ /** Callback fired when the user clicks an option. Receives the selected page size. */
7
+ onSelect: (option: number) => void;
8
+ /** Index (0-based) of the option that should receive keyboard focus highlight.
9
+ * Pass `-1` (default) when no item is keyboard-focused.
10
+ * @default -1
11
+ */
12
+ focusedElement?: number;
13
+ /** Theme tokens injected by the ThemeProvider HOC. Do not pass manually. */
14
+ style: Record<string, string>;
15
+ }
16
+ export interface PaginationMenuStyleProps extends Omit<PaginationMenuProps, 'style'> {
17
+ /** Theme override tokens. */
18
+ theme?: Record<string, Record<string, Record<string, Record<string, string>>>>;
19
+ /** Selects the style variant defined in the theme.
20
+ * @default 'default'
21
+ */
22
+ variant?: string;
23
+ }
@@ -0,0 +1,4 @@
1
+ import type { PaginationMenuStyleProps } from './PaginationMenu.interface';
2
+ declare const PaginationMenu: ({ theme, variant, ...rest }: PaginationMenuStyleProps) => import("@emotion/react/jsx-runtime").JSX.Element;
3
+ export default PaginationMenu;
4
+ export type { PaginationMenuProps, PaginationMenuStyleProps } from './PaginationMenu.interface';
@@ -0,0 +1,4 @@
1
+ import type { PaginationStyleProps } from './Pagination.interface';
2
+ declare const Pagination: ({ theme, variant, ...rest }: PaginationStyleProps) => import("@emotion/react/jsx-runtime").JSX.Element;
3
+ export default Pagination;
4
+ export type { PaginationProps, PaginationStyleProps } from './Pagination.interface';
@@ -1,5 +1,9 @@
1
1
  import React from 'react';
2
2
  import type { RadioProps, RadioBaseProps } from './Radio.interface';
3
+ /**
4
+ * Headless presentational layer for the radio button.
5
+ * Accepts `checked` and `onChange` directly — use this when you need a controlled radio outside of React Hook Form.
6
+ */
3
7
  export declare const RadioBase: React.ForwardRefExoticComponent<RadioBaseProps & React.RefAttributes<HTMLInputElement>>;
4
8
  /**
5
9
  * A radio button lets the user select exactly one option from a set.
@@ -40,6 +40,10 @@ export interface RadioStyleProps extends Omit<React.InputHTMLAttributes<HTMLInpu
40
40
  className?: string;
41
41
  /** Theme override tokens. Pass a partial `EVENTS` object to customise colours. */
42
42
  theme?: EVENTS;
43
+ /** Selects the style variant defined in the theme.
44
+ * @default 'default'
45
+ */
46
+ variant?: string;
43
47
  /** Prevents interaction when `true`. Overrides the RadioGroup `disabled` value if set.
44
48
  * @default false
45
49
  */
@@ -11,5 +11,7 @@ export interface RadioGroupContextValue {
11
11
  error?: {
12
12
  message?: string;
13
13
  };
14
+ /** Value of the first non-disabled Radio child — used to implement roving tabindex */
15
+ firstValue: string;
14
16
  }
15
17
  export declare const RadioGroupContext: import("react").Context<RadioGroupContextValue | null>;
@@ -1,3 +1,3 @@
1
1
  import type { RadioStyleProps } from './Radio.interface';
2
- declare const Radio: ({ theme, ...rest }: RadioStyleProps) => import("@emotion/react/jsx-runtime").JSX.Element;
2
+ declare const Radio: ({ theme, variant, ...rest }: RadioStyleProps) => import("@emotion/react/jsx-runtime").JSX.Element;
3
3
  export default Radio;
@@ -48,6 +48,10 @@ export interface SelectStyleProps<TFieldValues extends FieldValues = FieldValues
48
48
  className?: string;
49
49
  /** Theme override tokens. Pass a partial `EVENTS` object to customise colours. */
50
50
  theme?: EVENTS;
51
+ /** Selects the style variant defined in the theme.
52
+ * @default 'default'
53
+ */
54
+ variant?: string;
51
55
  }
52
56
  export interface SelectProps<TFieldValues extends FieldValues = FieldValues> extends SelectStyleProps<TFieldValues> {
53
57
  /** Theme tokens injected by the ThemeProvider HOC. Do not pass manually. */
@@ -1,9 +1,8 @@
1
1
  import React from 'react';
2
2
  import type { SelectMenuProps } from './SelectMenu.interface';
3
3
  /**
4
- * @internal Dropdown list rendered by `<Select>`.
4
+ * Dropdown list rendered by `<Select>`.
5
5
  * Scrolls the focused option into view on keyboard navigation and calls `onChange` on click.
6
- * Not intended for direct use — use `<Select>` instead.
7
6
  */
8
7
  declare const SelectMenu: React.ForwardRefExoticComponent<SelectMenuProps & React.RefAttributes<HTMLDivElement>>;
9
8
  export default SelectMenu;
@@ -1,4 +1,4 @@
1
1
  import type { SelectStyleProps } from './Select.interface';
2
2
  import type { FieldValues } from 'react-hook-form';
3
- declare const Select: <TFieldValues extends FieldValues = FieldValues>({ theme, ...rest }: SelectStyleProps<TFieldValues>) => import("@emotion/react/jsx-runtime").JSX.Element;
3
+ declare const Select: <TFieldValues extends FieldValues = FieldValues>({ theme, variant, ...rest }: SelectStyleProps<TFieldValues>) => import("@emotion/react/jsx-runtime").JSX.Element;
4
4
  export default Select;
@@ -0,0 +1,10 @@
1
+ import type { SkeletonProps } from './Skeleton.interface';
2
+ /**
3
+ * A low-fidelity placeholder that mimics the shape of content while it loads.
4
+ *
5
+ * Use `variant="rectangular"` for text lines, cards, or images and
6
+ * `variant="circular"` for avatars or icon placeholders. Set `width` and
7
+ * `height` to match the real content's dimensions.
8
+ */
9
+ declare const Skeleton: ({ variant, width, height, className }: SkeletonProps) => import("@emotion/react/jsx-runtime").JSX.Element;
10
+ export default Skeleton;
@@ -0,0 +1,2 @@
1
+ declare const Style: import("@emotion/utils").SerializedStyles;
2
+ export default Style;
@@ -0,0 +1,14 @@
1
+ export interface SkeletonProps {
2
+ /** Shape of the skeleton placeholder.
3
+ * - `'rectangular'` — a rounded rectangle (suits text lines, cards, images).
4
+ * - `'circular'` — a full circle (suits avatars, icon placeholders).
5
+ * @default 'rectangular'
6
+ */
7
+ variant?: 'rectangular' | 'circular';
8
+ /** Explicit width of the skeleton element. Accepts any valid CSS width value or a pixel number. */
9
+ width?: string | number;
10
+ /** Explicit height of the skeleton element. Accepts any valid CSS height value or a pixel number. */
11
+ height?: string | number;
12
+ /** Additional CSS class applied to the root element. */
13
+ className?: string;
14
+ }
@@ -0,0 +1,2 @@
1
+ export { default } from './Skeleton';
2
+ export type { SkeletonProps } from './Skeleton.interface';
@@ -52,6 +52,10 @@ export interface SliderStyleProps<TFieldValues extends FieldValues = FieldValues
52
52
  track?: 'normal' | 'inverted';
53
53
  /** Theme override tokens. Pass a partial `EVENTS` object to customise colours. */
54
54
  theme?: EVENTS;
55
+ /** Selects the style variant defined in the theme.
56
+ * @default 'default'
57
+ */
58
+ variant?: string;
55
59
  }
56
60
  export interface SliderProps<TFieldValues extends FieldValues = FieldValues> extends SliderStyleProps<TFieldValues> {
57
61
  /** Theme tokens injected by the ThemeProvider HOC. Do not pass manually. */
@@ -1,4 +1,4 @@
1
1
  import type { SliderStyleProps } from './Slider.interface';
2
2
  import type { FieldValues } from 'react-hook-form';
3
- declare const Slider: <TFieldValues extends FieldValues = FieldValues>({ theme, ...rest }: SliderStyleProps<TFieldValues>) => import("@emotion/react/jsx-runtime").JSX.Element;
3
+ declare const Slider: <TFieldValues extends FieldValues = FieldValues>({ theme, variant, ...rest }: SliderStyleProps<TFieldValues>) => import("@emotion/react/jsx-runtime").JSX.Element;
4
4
  export default Slider;
@@ -1,7 +1,7 @@
1
1
  import React, { type JSX } from 'react';
2
2
  import type { EVENTS } from '@hocs/ThemeProvider/components/Switch';
3
3
  import type { Control, FieldValues } from 'react-hook-form';
4
- export interface SwitchStyleProps<TFieldValues extends FieldValues = FieldValues> extends React.InputHTMLAttributes<HTMLInputElement> {
4
+ export interface SwitchStyleProps<TFieldValues extends FieldValues = FieldValues> extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'style'> {
5
5
  /** RHF field name. The form value will be a `boolean`. */
6
6
  name: string;
7
7
  /** RHF control object. */
@@ -20,6 +20,10 @@ export interface SwitchStyleProps<TFieldValues extends FieldValues = FieldValues
20
20
  helperText?: string;
21
21
  /** Theme override tokens. Pass a partial `EVENTS` object to customise colours. */
22
22
  theme?: EVENTS;
23
+ /** Selects the style variant defined in the theme.
24
+ * @default 'default'
25
+ */
26
+ variant?: string;
23
27
  }
24
28
  export interface SwitchProps<TFieldValues extends FieldValues = FieldValues> extends SwitchStyleProps<TFieldValues> {
25
29
  /** Theme tokens injected by the ThemeProvider HOC. Do not pass manually. */
@@ -1,4 +1,4 @@
1
1
  import type { SwitchStyleProps } from './Switch.interface';
2
2
  import type { FieldValues } from 'react-hook-form';
3
- declare const Switch: <TFieldValues extends FieldValues = FieldValues>({ theme, ...rest }: SwitchStyleProps<TFieldValues>) => import("@emotion/react/jsx-runtime").JSX.Element;
3
+ declare const Switch: <TFieldValues extends FieldValues = FieldValues>({ theme, variant, ...rest }: SwitchStyleProps<TFieldValues>) => import("@emotion/react/jsx-runtime").JSX.Element;
4
4
  export default Switch;
@@ -31,6 +31,10 @@ export interface CheckboxGroupStyleProps<TFieldValues extends FieldValues = Fiel
31
31
  className?: string;
32
32
  /** Theme override tokens. Pass a partial `EVENTS` object to customise colours. */
33
33
  theme?: EVENTS;
34
+ /** Selects the style variant defined in the theme.
35
+ * @default 'default'
36
+ */
37
+ variant?: string;
34
38
  }
35
39
  export interface CheckboxGroupProps<TFieldValues extends FieldValues = FieldValues> extends CheckboxGroupStyleProps<TFieldValues> {
36
40
  /** Theme tokens injected by the ThemeProvider HOC. Do not pass manually. */
@@ -1,4 +1,4 @@
1
1
  import type { CheckboxGroupStyleProps } from './CheckboxGroup.interface';
2
2
  import type { FieldValues } from 'react-hook-form';
3
- declare const CheckboxGroup: <TFieldValues extends FieldValues = FieldValues>({ theme, ...rest }: CheckboxGroupStyleProps<TFieldValues>) => import("@emotion/react/jsx-runtime").JSX.Element;
3
+ declare const CheckboxGroup: <TFieldValues extends FieldValues = FieldValues>({ theme, variant, ...rest }: CheckboxGroupStyleProps<TFieldValues>) => import("@emotion/react/jsx-runtime").JSX.Element;
4
4
  export default CheckboxGroup;
@@ -35,6 +35,10 @@ export interface CheckboxTreeStyleProps<TFieldValues extends FieldValues = Field
35
35
  className?: string;
36
36
  /** Theme override tokens. Pass a partial `EVENTS` object to customise colours. */
37
37
  theme?: EVENTS;
38
+ /** Selects the style variant defined in the theme.
39
+ * @default 'default'
40
+ */
41
+ variant?: string;
38
42
  }
39
43
  export interface CheckboxTreeProps<TFieldValues extends FieldValues = FieldValues> extends CheckboxTreeStyleProps<TFieldValues> {
40
44
  /** Theme tokens injected by the ThemeProvider HOC. Do not pass manually. */
@@ -1,4 +1,4 @@
1
1
  import type { CheckboxTreeStyleProps } from './CheckboxTree.interface';
2
2
  import type { FieldValues } from 'react-hook-form';
3
- declare const CheckboxTree: <TFieldValues extends FieldValues = FieldValues>({ theme, ...rest }: CheckboxTreeStyleProps<TFieldValues>) => import("@emotion/react/jsx-runtime").JSX.Element;
3
+ declare const CheckboxTree: <TFieldValues extends FieldValues = FieldValues>({ theme, variant, ...rest }: CheckboxTreeStyleProps<TFieldValues>) => import("@emotion/react/jsx-runtime").JSX.Element;
4
4
  export default CheckboxTree;
@@ -0,0 +1,14 @@
1
+ import { type FC } from 'react';
2
+ import type { ModalProps } from './Modal.interface';
3
+ /**
4
+ * Generic overlay dialog rendered via a portal into `document.body`.
5
+ *
6
+ * Closes on:
7
+ * - Clicking the × button in the header.
8
+ * - Pressing **Escape** (unless `staticBackdrop` is `true`).
9
+ * - Clicking the semi-transparent backdrop (unless `staticBackdrop` is `true`).
10
+ *
11
+ * Pass `footer` to render action buttons below the body content.
12
+ */
13
+ declare const Modal: FC<ModalProps>;
14
+ export default Modal;
@@ -0,0 +1,2 @@
1
+ declare const Style: (theme: Record<string, string>) => import("@emotion/utils").SerializedStyles;
2
+ export default Style;
@@ -0,0 +1,42 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { EVENTS } from '@hocs/ThemeProvider/components/Modal';
3
+ export interface ModalStyleProps {
4
+ /** Controls visibility of the modal. */
5
+ open: boolean;
6
+ /** Callback fired when the modal requests to close (X button, backdrop click, or Escape). */
7
+ onClose: () => void;
8
+ /** Full content of the header bar (icon, title, etc.). Rendered as-is before the close button.
9
+ * Use `--MODAL-title` class on your title element to apply the themed title styles.
10
+ */
11
+ header?: ReactNode;
12
+ /** When `true`, renders a × close button at the end of the header bar.
13
+ * @default true
14
+ */
15
+ showCloseButton?: boolean;
16
+ /** Width preset.
17
+ * - `'md'` — 480 px (default)
18
+ * - `'lg'` — 720 px
19
+ * @default 'md'
20
+ */
21
+ size?: 'md' | 'lg';
22
+ /** Main content area of the modal. */
23
+ children?: ReactNode;
24
+ /** Content rendered inside the footer row (typically action buttons). */
25
+ footer?: ReactNode;
26
+ /** When `true`, clicking the backdrop or pressing Escape will **not** close the modal.
27
+ * @default false
28
+ */
29
+ staticBackdrop?: boolean;
30
+ /** Additional CSS class applied to the modal panel. */
31
+ className?: string;
32
+ /** Theme override tokens. Pass a partial `EVENTS` object to customise colours. */
33
+ theme?: EVENTS;
34
+ /** Selects the style variant defined in the theme.
35
+ * @default 'default'
36
+ */
37
+ variant?: string;
38
+ }
39
+ export interface ModalProps extends Omit<ModalStyleProps, 'theme' | 'variant'> {
40
+ /** Theme tokens injected by the ThemeProvider HOC. Do not pass manually. */
41
+ style: Record<string, string>;
42
+ }
@@ -0,0 +1,5 @@
1
+ import type { FC } from 'react';
2
+ import type { ModalStyleProps } from './Modal.interface';
3
+ declare const Modal: FC<ModalStyleProps>;
4
+ export default Modal;
5
+ export type { ModalStyleProps, ModalProps } from './Modal.interface';