@raspberrypifoundation/design-system-react 2.7.1 → 2.7.2

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 (54) hide show
  1. package/CHANGELOG.md +9 -3
  2. package/dist/design-system-react.js +619 -695
  3. package/dist/design-system-react.umd.cjs +13 -13
  4. package/dist/types/lib/main.d.ts +7 -0
  5. package/dist/types/lib/main.d.ts.map +1 -1
  6. package/dist/types/src/components/Form/Fieldset/FieldSet.types.d.ts +16 -0
  7. package/dist/types/src/components/Form/Fieldset/FieldSet.types.d.ts.map +1 -0
  8. package/dist/types/src/components/Form/Fieldset/Fieldset.spec.d.ts.map +1 -1
  9. package/dist/types/src/components/Form/Fieldset/index.d.ts +3 -19
  10. package/dist/types/src/components/Form/Fieldset/index.d.ts.map +1 -1
  11. package/dist/types/src/components/Form/InputField/InputField.types.d.ts +16 -0
  12. package/dist/types/src/components/Form/InputField/InputField.types.d.ts.map +1 -0
  13. package/dist/types/src/components/Form/InputField/index.d.ts +3 -19
  14. package/dist/types/src/components/Form/InputField/index.d.ts.map +1 -1
  15. package/dist/types/src/components/Form/InputLabel/InputLabel.spec.d.ts.map +1 -1
  16. package/dist/types/src/components/Form/InputLabel/InputLabel.types.d.ts +11 -0
  17. package/dist/types/src/components/Form/InputLabel/InputLabel.types.d.ts.map +1 -0
  18. package/dist/types/src/components/Form/InputLabel/index.d.ts +3 -15
  19. package/dist/types/src/components/Form/InputLabel/index.d.ts.map +1 -1
  20. package/dist/types/src/components/Form/RadioInput/RadioInput.spec.d.ts.map +1 -1
  21. package/dist/types/src/components/Form/RadioInput/RadioInput.types.d.ts +19 -0
  22. package/dist/types/src/components/Form/RadioInput/RadioInput.types.d.ts.map +1 -0
  23. package/dist/types/src/components/Form/RadioInput/index.d.ts +3 -23
  24. package/dist/types/src/components/Form/RadioInput/index.d.ts.map +1 -1
  25. package/dist/types/src/components/Form/SearchInput/SearchInput.types.d.ts +1 -1
  26. package/dist/types/src/components/Form/SearchInput/SearchInput.types.d.ts.map +1 -1
  27. package/dist/types/src/components/Form/SelectInput/SelectInput.spec.d.ts.map +1 -1
  28. package/dist/types/src/components/Form/SelectInput/SelectInput.types.d.ts +30 -0
  29. package/dist/types/src/components/Form/SelectInput/SelectInput.types.d.ts.map +1 -0
  30. package/dist/types/src/components/Form/SelectInput/index.d.ts +4 -29
  31. package/dist/types/src/components/Form/SelectInput/index.d.ts.map +1 -1
  32. package/dist/types/src/components/Form/TextInput/TextInput.spec.d.ts.map +1 -1
  33. package/dist/types/src/components/Form/TextInput/TextInput.types.d.ts +21 -0
  34. package/dist/types/src/components/Form/TextInput/TextInput.types.d.ts.map +1 -0
  35. package/dist/types/src/components/Form/TextInput/index.d.ts +4 -25
  36. package/dist/types/src/components/Form/TextInput/index.d.ts.map +1 -1
  37. package/dist/types/src/components/Form/TextareaInput/TextareaInput.spec.d.ts.map +1 -1
  38. package/dist/types/src/components/Form/TextareaInput/TextareaInput.types.d.ts +23 -0
  39. package/dist/types/src/components/Form/TextareaInput/TextareaInput.types.d.ts.map +1 -0
  40. package/dist/types/src/components/Form/TextareaInput/index.d.ts +3 -27
  41. package/dist/types/src/components/Form/TextareaInput/index.d.ts.map +1 -1
  42. package/dist/types/src/stories/forms/Fieldset.stories.d.ts +17 -55
  43. package/dist/types/src/stories/forms/Fieldset.stories.d.ts.map +1 -1
  44. package/dist/types/src/stories/forms/InputLabel.stories.d.ts +13 -24
  45. package/dist/types/src/stories/forms/InputLabel.stories.d.ts.map +1 -1
  46. package/dist/types/src/stories/forms/RadioInput.stories.d.ts +27 -49
  47. package/dist/types/src/stories/forms/RadioInput.stories.d.ts.map +1 -1
  48. package/dist/types/src/stories/forms/SelectInput.stories.d.ts +25 -51
  49. package/dist/types/src/stories/forms/SelectInput.stories.d.ts.map +1 -1
  50. package/dist/types/src/stories/forms/TextInput.stories.d.ts +17 -36
  51. package/dist/types/src/stories/forms/TextInput.stories.d.ts.map +1 -1
  52. package/dist/types/src/stories/forms/TextareaInput.stories.d.ts +25 -51
  53. package/dist/types/src/stories/forms/TextareaInput.stories.d.ts.map +1 -1
  54. package/package.json +2 -1
@@ -1,31 +1,6 @@
1
- export function SelectInput({ id, label, name, options, disabled, error, fullWidth, hint, onChange, placeholder, value, }: {
2
- id: any;
3
- label: any;
4
- name: any;
5
- options: any;
6
- disabled?: boolean | undefined;
7
- error?: string | undefined;
8
- fullWidth?: boolean | undefined;
9
- hint?: string | undefined;
10
- onChange?: (() => void) | undefined;
11
- placeholder?: string | undefined;
12
- value?: string | undefined;
13
- }): import("react/jsx-runtime").JSX.Element;
14
- export namespace SelectInput {
15
- namespace propTypes {
16
- let disabled: PropTypes.Requireable<boolean>;
17
- let error: PropTypes.Requireable<string>;
18
- let fullWidth: PropTypes.Requireable<boolean>;
19
- let hint: PropTypes.Requireable<NonNullable<string | object | null | undefined>>;
20
- let label: PropTypes.Validator<NonNullable<NonNullable<string | object | null | undefined>>>;
21
- let id: PropTypes.Validator<string>;
22
- let name: PropTypes.Validator<string>;
23
- let onChange: PropTypes.Requireable<(...args: any[]) => any>;
24
- let options: PropTypes.Validator<any[]>;
25
- let placeholder: PropTypes.Requireable<string>;
26
- let value: PropTypes.Requireable<string>;
27
- }
28
- }
1
+ import "@/components/MaterialSymbols";
2
+ import "./SelectInput.scss";
3
+ import type { SelectInputProps } from "./SelectInput.types";
4
+ export declare const SelectInput: ({ id, label, name, options, disabled, error, fullWidth, hint, onChange, placeholder, value, }: SelectInputProps) => import("react/jsx-runtime").JSX.Element;
29
5
  export default SelectInput;
30
- import PropTypes from "prop-types";
31
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/SelectInput/index.jsx"],"names":[],"mappings":"AAOO;;;;;;;;;;;;4CA4CN;;;;;;;;;;;;;;;;;sBAlDqB,YAAY"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/SelectInput/index.tsx"],"names":[],"mappings":"AAAA,OAAO,8BAA8B,CAAC;AAItC,OAAO,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,eAAO,MAAM,WAAW,GAAI,+FAYzB,gBAAgB,4CA+BlB,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"TextInput.spec.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/TextInput/TextInput.spec.jsx"],"names":[],"mappings":""}
1
+ {"version":3,"file":"TextInput.spec.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/TextInput/TextInput.spec.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,21 @@
1
+ export type TextInputProps = {
2
+ /** Whether the input is disabled */
3
+ disabled?: boolean;
4
+ /** Error message to display */
5
+ error?: string;
6
+ /** Whether the input is full width */
7
+ fullWidth?: boolean;
8
+ /** The text content of the label hint */
9
+ hint?: string;
10
+ /** The input label text content */
11
+ label: string;
12
+ /** The text input field ID */
13
+ id: string;
14
+ /** Name attribute for the text input */
15
+ name: string;
16
+ /** Callback function when text input state changes */
17
+ onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
18
+ /** Value attribute for the text input */
19
+ value: string;
20
+ };
21
+ //# sourceMappingURL=TextInput.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextInput.types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/TextInput/TextInput.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG;IAC3B,oCAAoC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,+BAA+B;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sCAAsC;IACtC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,yCAAyC;IACzC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mCAAmC;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,8BAA8B;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,wCAAwC;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,sDAAsD;IACtD,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAChE,yCAAyC;IACzC,KAAK,EAAE,MAAM,CAAC;CACf,CAAC"}
@@ -1,27 +1,6 @@
1
- export function TextInput({ id, label, name, value, disabled, error, fullWidth, hint, onChange, }: {
2
- id: any;
3
- label: any;
4
- name: any;
5
- value: any;
6
- disabled?: boolean | undefined;
7
- error?: string | undefined;
8
- fullWidth?: boolean | undefined;
9
- hint?: string | undefined;
10
- onChange?: (() => void) | undefined;
11
- }): import("react/jsx-runtime").JSX.Element;
12
- export namespace TextInput {
13
- namespace propTypes {
14
- let disabled: PropTypes.Requireable<boolean>;
15
- let error: PropTypes.Requireable<string>;
16
- let fullWidth: PropTypes.Requireable<boolean>;
17
- let hint: PropTypes.Requireable<NonNullable<string | object | null | undefined>>;
18
- let label: PropTypes.Validator<NonNullable<NonNullable<string | object | null | undefined>>>;
19
- let id: PropTypes.Validator<string>;
20
- let name: PropTypes.Validator<string>;
21
- let onChange: PropTypes.Requireable<(...args: any[]) => any>;
22
- let value: PropTypes.Validator<string>;
23
- }
24
- }
1
+ import "@/components/MaterialSymbols";
2
+ import "./TextInput.scss";
3
+ import type { TextInputProps } from "./TextInput.types";
4
+ export declare const TextInput: ({ id, label, name, value, disabled, error, fullWidth, hint, onChange, }: TextInputProps) => import("react/jsx-runtime").JSX.Element;
25
5
  export default TextInput;
26
- import PropTypes from "prop-types";
27
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/TextInput/index.jsx"],"names":[],"mappings":"AAOO;;;;;;;;;;4CA+BN;;;;;;;;;;;;;;;sBArCqB,YAAY"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/TextInput/index.tsx"],"names":[],"mappings":"AAAA,OAAO,8BAA8B,CAAC;AAItC,OAAO,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD,eAAO,MAAM,SAAS,GAAI,yEAUvB,cAAc,4CAqBhB,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"TextareaInput.spec.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/TextareaInput/TextareaInput.spec.jsx"],"names":[],"mappings":""}
1
+ {"version":3,"file":"TextareaInput.spec.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/TextareaInput/TextareaInput.spec.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,23 @@
1
+ export type TextareaInputProps = {
2
+ /** Whether the input is disabled */
3
+ disabled?: boolean;
4
+ /** Whether the input is read-only */
5
+ readOnly?: boolean;
6
+ /** Error message to display */
7
+ error?: string;
8
+ /** Whether the input is full width */
9
+ fullWidth?: boolean;
10
+ /** The text content of the label hint */
11
+ hint?: string;
12
+ /** The input label text content */
13
+ label: string;
14
+ /** The textarea input field ID */
15
+ id: string;
16
+ /** Name attribute for the textarea input */
17
+ name: string;
18
+ /** Callback function when textarea input state changes */
19
+ onChange?: (event: React.ChangeEvent<HTMLTextAreaElement>) => void;
20
+ /** Value attribute for the textarea input */
21
+ value: string;
22
+ };
23
+ //# sourceMappingURL=TextareaInput.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextareaInput.types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/TextareaInput/TextareaInput.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG;IAC/B,oCAAoC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,+BAA+B;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sCAAsC;IACtC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,yCAAyC;IACzC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mCAAmC;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,kCAAkC;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,4CAA4C;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAC;IACnE,6CAA6C;IAC7C,KAAK,EAAE,MAAM,CAAC;CACf,CAAC"}
@@ -1,29 +1,5 @@
1
- export function TextareaInput({ id, label, name, value, disabled, readOnly, error, fullWidth, hint, onChange, }: {
2
- id: any;
3
- label: any;
4
- name: any;
5
- value: any;
6
- disabled?: boolean | undefined;
7
- readOnly?: boolean | undefined;
8
- error?: string | undefined;
9
- fullWidth?: boolean | undefined;
10
- hint?: string | undefined;
11
- onChange?: (() => void) | undefined;
12
- }): import("react/jsx-runtime").JSX.Element;
13
- export namespace TextareaInput {
14
- namespace propTypes {
15
- let disabled: PropTypes.Requireable<boolean>;
16
- let readOnly: PropTypes.Requireable<boolean>;
17
- let error: PropTypes.Requireable<string>;
18
- let fullWidth: PropTypes.Requireable<boolean>;
19
- let hint: PropTypes.Requireable<NonNullable<string | object | null | undefined>>;
20
- let label: PropTypes.Validator<NonNullable<NonNullable<string | object | null | undefined>>>;
21
- let id: PropTypes.Validator<string>;
22
- let name: PropTypes.Validator<string>;
23
- let onChange: PropTypes.Requireable<(...args: any[]) => any>;
24
- let value: PropTypes.Validator<string>;
25
- }
26
- }
1
+ import "./TextareaInput.scss";
2
+ import type { TextareaInputProps } from "./TextareaInput.types";
3
+ export declare const TextareaInput: ({ id, label, name, value, disabled, readOnly, error, fullWidth, hint, onChange, }: TextareaInputProps) => import("react/jsx-runtime").JSX.Element;
27
4
  export default TextareaInput;
28
- import PropTypes from "prop-types";
29
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/TextareaInput/index.jsx"],"names":[],"mappings":"AAOO;;;;;;;;;;;4CAkCN;;;;;;;;;;;;;;;;sBAxCqB,YAAY"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/TextareaInput/index.tsx"],"names":[],"mappings":"AAEA,OAAO,sBAAsB,CAAC;AAG9B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,eAAO,MAAM,aAAa,GAAI,mFAW3B,kBAAkB,4CAsBpB,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -1,57 +1,19 @@
1
- export default options;
2
- export namespace Default {
3
- let args: {};
4
- function render({ checkboxes, ...args }: {
5
- [x: string]: any;
6
- checkboxes: any;
7
- }): import("react/jsx-runtime").JSX.Element;
8
- }
9
- export namespace Error {
10
- export namespace args_1 {
11
- let errorText: string;
12
- }
13
- export { args_1 as args };
14
- }
15
- export namespace Disabled {
16
- export namespace args_2 {
17
- let disabled: boolean;
18
- }
19
- export { args_2 as args };
20
- }
21
- export namespace ErrorAndFullWidth {
22
- export namespace args_3 {
23
- export let fullWidth: boolean;
24
- let errorText_1: string;
25
- export { errorText_1 as errorText };
26
- }
27
- export { args_3 as args };
28
- }
29
- export namespace DisabledAndFullWidth {
30
- export namespace args_4 {
31
- let fullWidth_1: boolean;
32
- export { fullWidth_1 as fullWidth };
33
- let disabled_1: boolean;
34
- export { disabled_1 as disabled };
35
- }
36
- export { args_4 as args };
37
- }
38
- declare namespace options {
39
- export let title: string;
40
- export { Fieldset as component };
41
- export let tags: string[];
42
- export namespace args_5 {
43
- let disabled_2: boolean;
44
- export { disabled_2 as disabled };
45
- let errorText_2: string;
46
- export { errorText_2 as errorText };
47
- let fullWidth_2: boolean;
48
- export { fullWidth_2 as fullWidth };
49
- export let legendText: string;
50
- export let legendHintText: string;
51
- export let checkboxes: {
52
- label: string;
53
- }[];
54
- }
55
- export { args_5 as args };
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import type { FieldSetProps } from "components/Form/Fieldset/FieldSet.types";
3
+ interface FieldsetStoryArgs extends FieldSetProps {
4
+ checkboxes: Array<{
5
+ label: string;
6
+ }>;
56
7
  }
8
+ declare const meta: Meta<FieldsetStoryArgs>;
9
+ export default meta;
10
+ type Story = StoryObj<FieldsetStoryArgs>;
11
+ /**
12
+ * A Fieldset element to contain a group of checkboxes or radio buttons. The error is displayed below the fieldset.
13
+ */
14
+ export declare const Default: Story;
15
+ export declare const Error: Story;
16
+ export declare const Disabled: Story;
17
+ export declare const ErrorAndFullWidth: Story;
18
+ export declare const DisabledAndFullWidth: Story;
57
19
  //# sourceMappingURL=Fieldset.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Fieldset.stories.d.ts","sourceRoot":"","sources":["../../../../../src/stories/forms/Fieldset.stories.jsx"],"names":[],"mappings":";;;IAwBU;;;gDAQP"}
1
+ {"version":3,"file":"Fieldset.stories.d.ts","sourceRoot":"","sources":["../../../../../src/stories/forms/Fieldset.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AAI7E,UAAU,iBAAkB,SAAQ,aAAa;IAC/C,UAAU,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACtC;AAED,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,iBAAiB,CAgBjC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,iBAAiB,CAAC,CAAC;AAmBzC;;GAEG;AACH,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAKnB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAKtB,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAM/B,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,KAMlC,CAAC"}
@@ -1,25 +1,14 @@
1
- export default options;
2
- export namespace Default {
3
- let args: {};
4
- }
5
- export namespace Disabled {
6
- export namespace args_1 {
7
- let disabled: boolean;
8
- }
9
- export { args_1 as args };
10
- }
11
- declare namespace options {
12
- export let title: string;
13
- export { InputLabel as component };
14
- export let tags: string[];
15
- export namespace args_2 {
16
- export let label: string;
17
- export let inputFieldId: string;
18
- let disabled_1: boolean;
19
- export { disabled_1 as disabled };
20
- export let hint: string;
21
- }
22
- export { args_2 as args };
23
- export function render(args: any): import("react/jsx-runtime").JSX.Element;
24
- }
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { InputLabel } from "../../components/Form/InputLabel";
3
+ declare const meta: Meta<typeof InputLabel>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof InputLabel>;
6
+ /**
7
+ * The label used with all HTML inputs, including both the label itself and a hint
8
+ */
9
+ export declare const Default: Story;
10
+ /**
11
+ * disabled makes the input greyed out
12
+ */
13
+ export declare const Disabled: Story;
25
14
  //# sourceMappingURL=InputLabel.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"InputLabel.stories.d.ts","sourceRoot":"","sources":["../../../../../src/stories/forms/InputLabel.stories.jsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;IAYU,2EAEP"}
1
+ {"version":3,"file":"InputLabel.stories.d.ts","sourceRoot":"","sources":["../../../../../src/stories/forms/InputLabel.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAE9D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,UAAU,CAajC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,UAAU,CAAC,CAAC;AAEzC;;GAEG;AACH,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,KAAoC,CAAC"}
@@ -1,51 +1,29 @@
1
- export default options;
2
- export namespace Default {
3
- let args: {};
4
- }
5
- export namespace FullWidth {
6
- export namespace args_1 {
7
- let fullWidth: boolean;
8
- }
9
- export { args_1 as args };
10
- }
11
- export namespace Disabled {
12
- export namespace args_2 {
13
- let disabled: boolean;
14
- }
15
- export { args_2 as args };
16
- }
17
- export namespace Checked {
18
- export namespace args_3 {
19
- let isChecked: boolean;
20
- }
21
- export { args_3 as args };
22
- }
23
- export namespace DisabledAndFullWidth {
24
- export namespace args_4 {
25
- let disabled_1: boolean;
26
- export { disabled_1 as disabled };
27
- let fullWidth_1: boolean;
28
- export { fullWidth_1 as fullWidth };
29
- }
30
- export { args_4 as args };
31
- }
32
- declare namespace options {
33
- export let title: string;
34
- export { RadioInput as component };
35
- export let tags: string[];
36
- export namespace args_5 {
37
- export let id: string;
38
- export let name: string;
39
- let disabled_2: boolean;
40
- export { disabled_2 as disabled };
41
- let fullWidth_2: boolean;
42
- export { fullWidth_2 as fullWidth };
43
- export let label: string;
44
- let isChecked_1: boolean;
45
- export { isChecked_1 as isChecked };
46
- export let value: string;
47
- }
48
- export { args_5 as args };
49
- export function render(args: any): import("react/jsx-runtime").JSX.Element;
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import type { RadioInputProps } from "components/Form/RadioInput/RadioInput.types";
3
+ interface RadioInputStoryArgs extends RadioInputProps {
4
+ isChecked: boolean;
50
5
  }
6
+ declare const meta: Meta<RadioInputStoryArgs>;
7
+ export default meta;
8
+ type Story = StoryObj<RadioInputStoryArgs>;
9
+ /**
10
+ * Radioinput let users select an item.
11
+ */
12
+ export declare const Default: Story;
13
+ /**
14
+ * fullWidth makes the input stretch across the available space
15
+ */
16
+ export declare const FullWidth: Story;
17
+ /**
18
+ * disabled makes the input greyed out
19
+ */
20
+ export declare const Disabled: Story;
21
+ /**
22
+ * isChecked makes the input checked
23
+ */
24
+ export declare const Checked: Story;
25
+ /**
26
+ * disabled and fullWidth makes the input greyed out and stretch across the available space
27
+ */
28
+ export declare const DisabledAndFullWidth: Story;
51
29
  //# sourceMappingURL=RadioInput.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RadioInput.stories.d.ts","sourceRoot":"","sources":["../../../../../src/stories/forms/RadioInput.stories.jsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAgBU,2EAQP"}
1
+ {"version":3,"file":"RadioInput.stories.d.ts","sourceRoot":"","sources":["../../../../../src/stories/forms/RadioInput.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAGnF,UAAU,mBAAoB,SAAQ,eAAe;IACnD,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,mBAAmB,CAsBnC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,mBAAmB,CAAC,CAAC;AAE3C;;GAEG;AACH,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,KAIvB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,KAItB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAKlC,CAAC"}
@@ -1,52 +1,26 @@
1
- export default options;
2
- export namespace Default {
3
- let args: {};
4
- }
5
- export namespace NoOptionSelected {
6
- export namespace args_1 {
7
- let value: string;
8
- }
9
- export { args_1 as args };
10
- }
11
- export namespace WithPlaceholder {
12
- export namespace args_2 {
13
- let value_1: string;
14
- export { value_1 as value };
15
- export let placeholder: string;
16
- }
17
- export { args_2 as args };
18
- }
19
- export namespace Error {
20
- export namespace args_3 {
21
- let error: string;
22
- }
23
- export { args_3 as args };
24
- }
25
- export namespace FullWidth {
26
- export namespace args_4 {
27
- let fullWidth: boolean;
28
- }
29
- export { args_4 as args };
30
- }
31
- declare namespace options {
32
- export let title: string;
33
- export { SelectInput as component };
34
- export let tags: string[];
35
- export namespace args_5 {
36
- export let name: string;
37
- export let id: string;
38
- export let disabled: boolean;
39
- let fullWidth_1: boolean;
40
- export { fullWidth_1 as fullWidth };
41
- export let hint: string;
42
- export let label: string;
43
- export let options: {
44
- key: string;
45
- value: string;
46
- }[];
47
- let value_2: string;
48
- export { value_2 as value };
49
- }
50
- export { args_5 as args };
51
- }
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { SelectInput } from "../../components/Form/SelectInput";
3
+ declare const meta: Meta<typeof SelectInput>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof SelectInput>;
6
+ /**
7
+ * Select inputs let users make a choice from a drop down of options.
8
+ */
9
+ export declare const Default: Story;
10
+ /**
11
+ * When there is no provided value
12
+ */
13
+ export declare const NoOptionSelected: Story;
14
+ /**
15
+ * When there is no provided value, but placeholder text is provided
16
+ */
17
+ export declare const WithPlaceholder: Story;
18
+ /**
19
+ * Providing an error string highlights an issue with the field
20
+ */
21
+ export declare const Error: Story;
22
+ /**
23
+ * fullWidth makes the input stretch across the available space
24
+ */
25
+ export declare const FullWidth: Story;
52
26
  //# sourceMappingURL=SelectInput.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SelectInput.stories.d.ts","sourceRoot":"","sources":["../../../../../src/stories/forms/SelectInput.stories.jsx"],"names":[],"mappings":""}
1
+ {"version":3,"file":"SelectInput.stories.d.ts","sourceRoot":"","sources":["../../../../../src/stories/forms/SelectInput.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAEhE,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,WAAW,CAkBlC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,WAAW,CAAC,CAAC;AAE1C;;GAEG;AACH,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAI9B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,KAK7B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,KAAK,EAAE,KAInB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,KAIvB,CAAC"}
@@ -1,37 +1,18 @@
1
- export default options;
2
- export namespace Default {
3
- let args: {};
4
- }
5
- export namespace Error {
6
- export namespace args_1 {
7
- let error: string;
8
- let value: string;
9
- }
10
- export { args_1 as args };
11
- }
12
- export namespace FullWidth {
13
- export namespace args_2 {
14
- let fullWidth: boolean;
15
- }
16
- export { args_2 as args };
17
- }
18
- declare namespace options {
19
- export let title: string;
20
- export { TextInput as component };
21
- export let tags: string[];
22
- export namespace args_3 {
23
- export let id: string;
24
- export let name: string;
25
- export let disabled: boolean;
26
- let error_1: null;
27
- export { error_1 as error };
28
- let fullWidth_1: boolean;
29
- export { fullWidth_1 as fullWidth };
30
- export let hint: string;
31
- export let label: string;
32
- let value_1: string;
33
- export { value_1 as value };
34
- }
35
- export { args_3 as args };
36
- }
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { TextInput } from "../../components/Form/TextInput";
3
+ declare const meta: Meta<typeof TextInput>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof TextInput>;
6
+ /**
7
+ * Text inputs are a primary way of receiving text input from users.
8
+ */
9
+ export declare const Default: Story;
10
+ /**
11
+ * Providing an error string highlights an issue with the field
12
+ */
13
+ export declare const Error: Story;
14
+ /**
15
+ * fullWidth makes the input stretch across the available space
16
+ */
17
+ export declare const FullWidth: Story;
37
18
  //# sourceMappingURL=TextInput.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TextInput.stories.d.ts","sourceRoot":"","sources":["../../../../../src/stories/forms/TextInput.stories.jsx"],"names":[],"mappings":""}
1
+ {"version":3,"file":"TextInput.stories.d.ts","sourceRoot":"","sources":["../../../../../src/stories/forms/TextInput.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAE5D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,SAAS,CAchC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,SAAS,CAAC,CAAC;AAExC;;GAEG;AACH,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,KAAK,EAAE,KAKnB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,KAIvB,CAAC"}
@@ -1,52 +1,26 @@
1
- export default options;
2
- export namespace Default {
3
- let args: {};
4
- }
5
- export namespace Error {
6
- export namespace args_1 {
7
- let error: string;
8
- let value: string;
9
- }
10
- export { args_1 as args };
11
- }
12
- export namespace FullWidth {
13
- export namespace args_2 {
14
- let fullWidth: boolean;
15
- }
16
- export { args_2 as args };
17
- }
18
- export namespace Disabled {
19
- export namespace args_3 {
20
- let disabled: boolean;
21
- }
22
- export { args_3 as args };
23
- }
24
- export namespace ReadOnly {
25
- export namespace args_4 {
26
- let readOnly: boolean;
27
- }
28
- export { args_4 as args };
29
- }
30
- declare namespace options {
31
- export let title: string;
32
- export { TextareaInput as component };
33
- export let tags: string[];
34
- export namespace args_5 {
35
- export let id: string;
36
- export let name: string;
37
- let disabled_1: boolean;
38
- export { disabled_1 as disabled };
39
- let readOnly_1: boolean;
40
- export { readOnly_1 as readOnly };
41
- let error_1: null;
42
- export { error_1 as error };
43
- let fullWidth_1: boolean;
44
- export { fullWidth_1 as fullWidth };
45
- export let hint: string;
46
- export let label: string;
47
- let value_1: string;
48
- export { value_1 as value };
49
- }
50
- export { args_5 as args };
51
- }
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { TextareaInput } from "../../components/Form/TextareaInput";
3
+ declare const meta: Meta<typeof TextareaInput>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof TextareaInput>;
6
+ /**
7
+ * Text inputs are a primary way of receiving text input from users.
8
+ */
9
+ export declare const Default: Story;
10
+ /**
11
+ * Providing an error string highlights an issue with the field
12
+ */
13
+ export declare const Error: Story;
14
+ /**
15
+ * fullWidth makes the input stretch across the available space
16
+ */
17
+ export declare const FullWidth: Story;
18
+ /**
19
+ * disabled makes the input greyed out
20
+ */
21
+ export declare const Disabled: Story;
22
+ /**
23
+ * readOnly makes the input greyed out
24
+ */
25
+ export declare const ReadOnly: Story;
52
26
  //# sourceMappingURL=TextareaInput.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TextareaInput.stories.d.ts","sourceRoot":"","sources":["../../../../../src/stories/forms/TextareaInput.stories.jsx"],"names":[],"mappings":""}
1
+ {"version":3,"file":"TextareaInput.stories.d.ts","sourceRoot":"","sources":["../../../../../src/stories/forms/TextareaInput.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,aAAa,CAepC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,aAAa,CAAC,CAAC;AAE5C;;GAEG;AACH,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,KAAK,EAAE,KAKnB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,KAIvB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,KAItB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,KAItB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raspberrypifoundation/design-system-react",
3
- "version": "2.7.1",
3
+ "version": "2.7.2",
4
4
  "type": "module",
5
5
  "main": "./dist/design-system-react.umd.cjs",
6
6
  "module": "./dist/design-system-react.js",
@@ -60,6 +60,7 @@
60
60
  "@types/node": "^24.3.0",
61
61
  "@types/react": "^18.3.12",
62
62
  "@types/react-dom": "^18.3.1",
63
+ "@types/testing-library__jest-dom": "^6.0.0",
63
64
  "@typescript-eslint/eslint-plugin": "^8.41.0",
64
65
  "@typescript-eslint/parser": "^8.41.0",
65
66
  "@vitejs/plugin-react": "^4.3.4",