@foi/design-system 0.0.10 → 0.0.12

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 (83) hide show
  1. package/README.md +104 -51
  2. package/dist/DatePicker.utils-ytCEcs6T.js.map +1 -1
  3. package/dist/{RadioGroup-BGdJ2fTN.js → RadioGroup-CdW6yS38.js} +16 -16
  4. package/dist/RadioGroup-CdW6yS38.js.map +1 -0
  5. package/dist/{RadioGroup.context-DJLdImVO.js → RadioGroup.context-BdRgENJJ.js} +7 -7
  6. package/dist/{RadioGroup.context-DJLdImVO.js.map → RadioGroup.context-BdRgENJJ.js.map} +1 -1
  7. package/dist/{Switch-BBGFtWQt.js → Switch-C7wjcrjU.js} +36 -36
  8. package/dist/Switch-C7wjcrjU.js.map +1 -0
  9. package/dist/{ThemeProvider-DtW2BY15.js → ThemeProvider-JlN3U_r2.js} +2 -2
  10. package/dist/{ThemeProvider-DtW2BY15.js.map → ThemeProvider-JlN3U_r2.js.map} +1 -1
  11. package/dist/atoms.mjs +2 -2
  12. package/dist/components/atoms/Button/Button.interface.d.ts +5 -1
  13. package/dist/components/atoms/Button/index.d.ts +1 -1
  14. package/dist/components/atoms/Checkbox/Checkbox.interface.d.ts +5 -1
  15. package/dist/components/atoms/Checkbox/index.d.ts +1 -1
  16. package/dist/components/atoms/DatePicker/DatePicker.interface.d.ts +4 -0
  17. package/dist/components/atoms/DatePicker/index.d.ts +1 -1
  18. package/dist/components/atoms/IconButton/IconButton.interface.d.ts +5 -1
  19. package/dist/components/atoms/IconButton/index.d.ts +1 -1
  20. package/dist/components/atoms/Input/Input.interface.d.ts +5 -1
  21. package/dist/components/atoms/Input/index.d.ts +1 -1
  22. package/dist/components/atoms/Radio/Radio.interface.d.ts +4 -0
  23. package/dist/components/atoms/Radio/index.d.ts +1 -1
  24. package/dist/components/atoms/Select/Select.interface.d.ts +4 -0
  25. package/dist/components/atoms/Select/index.d.ts +1 -1
  26. package/dist/components/atoms/Slider/Slider.interface.d.ts +4 -0
  27. package/dist/components/atoms/Slider/index.d.ts +1 -1
  28. package/dist/components/atoms/Switch/Switch.interface.d.ts +5 -1
  29. package/dist/components/atoms/Switch/index.d.ts +1 -1
  30. package/dist/components/molecules/CheckboxGroup/CheckboxGroup.interface.d.ts +4 -0
  31. package/dist/components/molecules/CheckboxGroup/index.d.ts +1 -1
  32. package/dist/components/molecules/CheckboxTree/CheckboxTree.interface.d.ts +4 -0
  33. package/dist/components/molecules/CheckboxTree/index.d.ts +1 -1
  34. package/dist/components/molecules/RadioGroup/RadioGroup.interface.d.ts +4 -0
  35. package/dist/components/molecules/RadioGroup/index.d.ts +1 -1
  36. package/dist/{emotion-react-jsx-runtime.browser.esm-BFNmScj4.js → emotion-react-jsx-runtime.browser.esm-ClrpcFMG.js} +169 -167
  37. package/dist/emotion-react-jsx-runtime.browser.esm-ClrpcFMG.js.map +1 -0
  38. package/dist/hocs/ThemeProvider/ThemeProvider.interface.d.ts +2 -2
  39. package/dist/hocs/ThemeProvider/components/Button.d.ts +17 -27
  40. package/dist/hocs/ThemeProvider/components/Checkbox.d.ts +23 -45
  41. package/dist/hocs/ThemeProvider/components/CheckboxGroup.d.ts +11 -14
  42. package/dist/hocs/ThemeProvider/components/CheckboxTree.d.ts +11 -14
  43. package/dist/hocs/ThemeProvider/components/DatePicker.d.ts +23 -45
  44. package/dist/hocs/ThemeProvider/components/DatePickerMenu.d.ts +17 -27
  45. package/dist/hocs/ThemeProvider/components/IconButton.d.ts +20 -28
  46. package/dist/hocs/ThemeProvider/components/Input.d.ts +23 -45
  47. package/dist/hocs/ThemeProvider/components/Radio.d.ts +23 -45
  48. package/dist/hocs/ThemeProvider/components/RadioGroup.d.ts +11 -14
  49. package/dist/hocs/ThemeProvider/components/Select.d.ts +23 -45
  50. package/dist/hocs/ThemeProvider/components/SelectMenu.d.ts +16 -24
  51. package/dist/hocs/ThemeProvider/components/Slider.d.ts +15 -26
  52. package/dist/hocs/ThemeProvider/components/Switch.d.ts +18 -30
  53. package/dist/hocs/ThemeProvider/createComponentStyles.d.ts +2 -1
  54. package/dist/hocs/ThemeProvider/useThemeProvider.hook.d.ts +1 -1
  55. package/dist/hocs.mjs +1 -1
  56. package/dist/index.mjs +5 -5
  57. package/dist/molecules.mjs +1 -1
  58. package/dist/theme/dark/colors.d.ts +0 -8
  59. package/dist/theme/dark/components/Button.d.ts +29 -27
  60. package/dist/theme/dark/components/Checkbox.d.ts +117 -54
  61. package/dist/theme/dark/components/CheckboxGroup.d.ts +13 -11
  62. package/dist/theme/dark/components/CheckboxTree.d.ts +12 -10
  63. package/dist/theme/dark/components/DatePicker.d.ts +53 -51
  64. package/dist/theme/dark/components/DatePickerMenu.d.ts +24 -22
  65. package/dist/theme/dark/components/IconButton.d.ts +24 -22
  66. package/dist/theme/dark/components/Input.d.ts +53 -51
  67. package/dist/theme/dark/components/Radio.d.ts +56 -54
  68. package/dist/theme/dark/components/RadioGroup.d.ts +13 -11
  69. package/dist/theme/dark/components/Select.d.ts +53 -51
  70. package/dist/theme/dark/components/SelectMenu.d.ts +23 -21
  71. package/dist/theme/dark/components/Slider.d.ts +41 -39
  72. package/dist/theme/dark/components/Switch.d.ts +49 -47
  73. package/dist/theme/dark/components/index.d.ts +567 -478
  74. package/dist/theme/dark/index.d.ts +567 -478
  75. package/dist/theme/index.d.ts +567 -478
  76. package/dist/{theme-DEqiATmv.js → theme-D18AZjTt.js} +112 -61
  77. package/dist/theme-D18AZjTt.js.map +1 -0
  78. package/dist/theme.mjs +1 -1
  79. package/package.json +1 -1
  80. package/dist/RadioGroup-BGdJ2fTN.js.map +0 -1
  81. package/dist/Switch-BBGFtWQt.js.map +0 -1
  82. package/dist/emotion-react-jsx-runtime.browser.esm-BFNmScj4.js.map +0 -1
  83. package/dist/theme-DEqiATmv.js.map +0 -1
@@ -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;
@@ -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. */
@@ -53,6 +53,10 @@ export interface CheckboxStyleProps<TFieldValues extends FieldValues = FieldValu
53
53
  className?: string;
54
54
  /** Theme override tokens. Pass a partial `EVENTS` object to customise colours. */
55
55
  theme?: EVENTS;
56
+ /** Selects the style variant defined in the theme.
57
+ * @default 'default'
58
+ */
59
+ variant?: string;
56
60
  /** Controlled mode — callback fired when the checked state changes.
57
61
  * Use this prop together with the `checked` attribute instead of RHF `control`.
58
62
  */
@@ -1,4 +1,4 @@
1
1
  import type { CheckboxStyleProps } from './Checkbox.interface';
2
2
  import type { FieldValues } from 'react-hook-form';
3
- declare const Checkbox: <TFieldValues extends FieldValues = FieldValues>({ theme, ...rest }: CheckboxStyleProps<TFieldValues>) => import("@emotion/react/jsx-runtime").JSX.Element;
3
+ declare const Checkbox: <TFieldValues extends FieldValues = FieldValues>({ theme, variant, ...rest }: CheckboxStyleProps<TFieldValues>) => import("@emotion/react/jsx-runtime").JSX.Element;
4
4
  export default 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. */
@@ -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
2
  import type { EVENTS } from '@hocs/ThemeProvider/components/Input';
3
- export interface IconButtonStyleProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
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,7 +1,7 @@
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
+ export interface InputStyleProps<TFieldValues extends FieldValues = FieldValues> extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'style'> {
5
5
  /** RHF field name. The form value will be a `string`. */
6
6
  name: string;
7
7
  /** Floating label displayed inside the field border. */
@@ -48,6 +48,10 @@ export interface InputStyleProps<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 InputProps<TFieldValues extends FieldValues = FieldValues> extends InputStyleProps<TFieldValues> {
53
57
  /** 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;
@@ -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
  */
@@ -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,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;
@@ -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;
@@ -31,6 +31,10 @@ export interface RadioGroupStyleProps<TFieldValues extends FieldValues = FieldVa
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 RadioGroupProps<TFieldValues extends FieldValues = FieldValues> extends RadioGroupStyleProps<TFieldValues> {
36
40
  /** Theme tokens injected by the ThemeProvider HOC. Do not pass manually. */
@@ -1,4 +1,4 @@
1
1
  import type { RadioGroupStyleProps } from './RadioGroup.interface';
2
2
  import type { FieldValues } from 'react-hook-form';
3
- declare const RadioGroup: <TFieldValues extends FieldValues = FieldValues>({ theme, ...rest }: RadioGroupStyleProps<TFieldValues>) => import("@emotion/react/jsx-runtime").JSX.Element;
3
+ declare const RadioGroup: <TFieldValues extends FieldValues = FieldValues>({ theme, variant, ...rest }: RadioGroupStyleProps<TFieldValues>) => import("@emotion/react/jsx-runtime").JSX.Element;
4
4
  export default RadioGroup;