@grantbii/design-system 1.0.75 → 1.0.79

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 (137) hide show
  1. package/core/atoms/Badge.d.ts +1 -1
  2. package/core/atoms/Badge.js +1 -1
  3. package/core/atoms/Badge.js.map +1 -0
  4. package/core/atoms/BrandLogo.js +1 -1
  5. package/core/atoms/BrandLogo.js.map +1 -0
  6. package/core/atoms/Button.d.ts +1 -1
  7. package/core/atoms/Button.js +3 -2
  8. package/core/atoms/Button.js.map +1 -0
  9. package/core/atoms/Checkbox.d.ts +1 -1
  10. package/core/atoms/Checkbox.js +2 -16
  11. package/core/atoms/Checkbox.js.map +1 -0
  12. package/core/atoms/LinkButton.d.ts +1 -1
  13. package/core/atoms/LinkButton.js +3 -16
  14. package/core/atoms/LinkButton.js.map +1 -0
  15. package/core/atoms/PageLoader.d.ts +1 -1
  16. package/core/atoms/PageLoader.js +2 -16
  17. package/core/atoms/PageLoader.js.map +1 -0
  18. package/core/atoms/RadioButton.d.ts +1 -1
  19. package/core/atoms/RadioButton.js +2 -16
  20. package/core/atoms/RadioButton.js.map +1 -0
  21. package/core/atoms/Select.d.ts +2 -0
  22. package/core/atoms/Select.js +12 -0
  23. package/core/atoms/Select.js.map +1 -0
  24. package/core/atoms/Textarea.js +3 -24
  25. package/core/atoms/Textarea.js.map +1 -0
  26. package/core/atoms/index.d.ts +1 -0
  27. package/core/atoms/index.js +2 -0
  28. package/core/atoms/index.js.map +1 -0
  29. package/core/atoms/shared.d.ts +1 -0
  30. package/core/atoms/shared.js +33 -1
  31. package/core/atoms/shared.js.map +1 -0
  32. package/core/foundations/colors.js +1 -0
  33. package/core/foundations/colors.js.map +1 -0
  34. package/core/foundations/flags.js +1 -0
  35. package/core/foundations/flags.js.map +1 -0
  36. package/core/foundations/icons.js +1 -0
  37. package/core/foundations/icons.js.map +1 -0
  38. package/core/foundations/index.js +1 -0
  39. package/core/foundations/index.js.map +1 -0
  40. package/core/foundations/responsive.js +1 -0
  41. package/core/foundations/responsive.js.map +1 -0
  42. package/core/foundations/types.js +1 -0
  43. package/core/foundations/types.js.map +1 -0
  44. package/core/foundations/typography.d.ts +1 -1
  45. package/core/foundations/typography.js +1 -0
  46. package/core/foundations/typography.js.map +1 -0
  47. package/core/global/GlobalStyle.js +1 -1
  48. package/core/global/GlobalStyle.js.map +1 -0
  49. package/core/global/index.js +1 -0
  50. package/core/global/index.js.map +1 -0
  51. package/core/integrations/StyledComponentsRegistry.d.ts +1 -1
  52. package/core/integrations/StyledComponentsRegistry.js +1 -1
  53. package/core/integrations/StyledComponentsRegistry.js.map +1 -0
  54. package/core/integrations/index.js +1 -0
  55. package/core/integrations/index.js.map +1 -0
  56. package/core/molecules/Dropdown.d.ts +8 -0
  57. package/core/molecules/Dropdown.js +5 -0
  58. package/core/molecules/Dropdown.js.map +1 -0
  59. package/core/molecules/FileDrop.js +3 -6
  60. package/core/molecules/FileDrop.js.map +1 -0
  61. package/core/molecules/Modal.d.ts +2 -2
  62. package/core/molecules/Modal.js +2 -2
  63. package/core/molecules/Modal.js.map +1 -0
  64. package/core/molecules/RadioButtons.d.ts +2 -2
  65. package/core/molecules/RadioButtons.js +2 -16
  66. package/core/molecules/RadioButtons.js.map +1 -0
  67. package/core/molecules/index.d.ts +1 -0
  68. package/core/molecules/index.js +2 -0
  69. package/core/molecules/index.js.map +1 -0
  70. package/core/organisms/GrantMatch/ActiveQueryFiles.js +2 -4
  71. package/core/organisms/GrantMatch/ActiveQueryFiles.js.map +1 -0
  72. package/core/organisms/GrantMatch/GrantMatchModal.js +1 -1
  73. package/core/organisms/GrantMatch/GrantMatchModal.js.map +1 -0
  74. package/core/organisms/GrantMatch/SearchBar.js +1 -0
  75. package/core/organisms/GrantMatch/SearchBar.js.map +1 -0
  76. package/core/organisms/GrantMatch/context.d.ts +1 -1
  77. package/core/organisms/GrantMatch/context.js +1 -0
  78. package/core/organisms/GrantMatch/context.js.map +1 -0
  79. package/core/organisms/GrantMatch/index.d.ts +1 -1
  80. package/core/organisms/GrantMatch/index.js +2 -2
  81. package/core/organisms/GrantMatch/index.js.map +1 -0
  82. package/core/organisms/TallyModal.d.ts +1 -1
  83. package/core/organisms/TallyModal.js +2 -16
  84. package/core/organisms/TallyModal.js.map +1 -0
  85. package/core/organisms/YesNoOptions.d.ts +1 -1
  86. package/core/organisms/YesNoOptions.js +2 -2
  87. package/core/organisms/YesNoOptions.js.map +1 -0
  88. package/core/organisms/index.js +1 -0
  89. package/core/organisms/index.js.map +1 -0
  90. package/index.js +2 -0
  91. package/index.js.map +1 -0
  92. package/package.json +3 -2
  93. package/stories/atoms/Badge.stories.d.ts +1 -1
  94. package/stories/atoms/Badge.stories.js +1 -0
  95. package/stories/atoms/Badge.stories.js.map +1 -0
  96. package/stories/atoms/BrandLogo.stories.d.ts +1 -1
  97. package/stories/atoms/BrandLogo.stories.js +1 -0
  98. package/stories/atoms/BrandLogo.stories.js.map +1 -0
  99. package/stories/atoms/Button.stories.d.ts +1 -1
  100. package/stories/atoms/Button.stories.js +19 -4
  101. package/stories/atoms/Button.stories.js.map +1 -0
  102. package/stories/atoms/Checkbox.stories.d.ts +1 -1
  103. package/stories/atoms/Checkbox.stories.js +1 -0
  104. package/stories/atoms/Checkbox.stories.js.map +1 -0
  105. package/stories/atoms/LinkButton.stories.d.ts +1 -1
  106. package/stories/atoms/LinkButton.stories.js +19 -4
  107. package/stories/atoms/LinkButton.stories.js.map +1 -0
  108. package/stories/atoms/PageLoader.stories.d.ts +1 -1
  109. package/stories/atoms/PageLoader.stories.js +1 -0
  110. package/stories/atoms/PageLoader.stories.js.map +1 -0
  111. package/stories/atoms/Textarea.stories.d.ts +1 -1
  112. package/stories/atoms/Textarea.stories.js +1 -0
  113. package/stories/atoms/Textarea.stories.js.map +1 -0
  114. package/stories/molecules/Dropdown.stories.d.ts +7 -0
  115. package/stories/molecules/Dropdown.stories.js +26 -0
  116. package/stories/molecules/Dropdown.stories.js.map +1 -0
  117. package/stories/molecules/FileDrop.stories.d.ts +1 -1
  118. package/stories/molecules/FileDrop.stories.js +1 -0
  119. package/stories/molecules/FileDrop.stories.js.map +1 -0
  120. package/stories/molecules/Modal.stories.d.ts +3 -3
  121. package/stories/molecules/Modal.stories.js +3 -1
  122. package/stories/molecules/Modal.stories.js.map +1 -0
  123. package/stories/molecules/RadioButtons.stories.d.ts +1 -1
  124. package/stories/molecules/RadioButtons.stories.js +2 -1
  125. package/stories/molecules/RadioButtons.stories.js.map +1 -0
  126. package/stories/organisms/GrantMatch.stories.d.ts +1 -1
  127. package/stories/organisms/GrantMatch.stories.js +3 -1
  128. package/stories/organisms/GrantMatch.stories.js.map +1 -0
  129. package/stories/organisms/TallyModal.stories.d.ts +2 -2
  130. package/stories/organisms/TallyModal.stories.js +3 -1
  131. package/stories/organisms/TallyModal.stories.js.map +1 -0
  132. package/stories/organisms/YesNoOptions.stories.d.ts +1 -1
  133. package/stories/organisms/YesNoOptions.stories.js +5 -1
  134. package/stories/organisms/YesNoOptions.stories.js.map +1 -0
  135. package/tsconfig.tsbuildinfo +1 -1
  136. package/vitest.config.js +1 -0
  137. package/vitest.config.js.map +1 -0
@@ -0,0 +1,7 @@
1
+ import { Dropdown } from "@/.";
2
+ import type { Meta, StoryObj } from "@storybook/nextjs-vite";
3
+ declare const meta: Meta<typeof Dropdown>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const BasicExample: Story;
7
+ export declare const WithValidation: Story;
@@ -0,0 +1,26 @@
1
+ import { Dropdown } from "@/.";
2
+ import { Need } from "@grantbii/ui-base/grant/enums";
3
+ const meta = {
4
+ title: "Molecules/Dropdown",
5
+ component: Dropdown,
6
+ tags: ["autodocs"],
7
+ parameters: {
8
+ layout: "centered",
9
+ },
10
+ };
11
+ export default meta;
12
+ const options = Object.values(Need)
13
+ .filter((need) => need !== Need.UNKNOWN)
14
+ .map((need) => ({ label: need, value: need }));
15
+ export const BasicExample = {
16
+ args: {
17
+ options,
18
+ },
19
+ };
20
+ export const WithValidation = {
21
+ args: {
22
+ options,
23
+ required: true,
24
+ },
25
+ };
26
+ //# sourceMappingURL=Dropdown.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dropdown.stories.js","sourceRoot":"","sources":["../../../stories/molecules/Dropdown.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AAGrD,MAAM,IAAI,GAA0B;IAClC,KAAK,EAAE,oBAAoB;IAC3B,SAAS,EAAE,QAAQ;IACnB,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE;QACV,MAAM,EAAE,UAAU;KACnB;CACF,CAAC;AAEF,eAAe,IAAI,CAAC;AAIpB,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;KAChC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,IAAI,CAAC,OAAO,CAAC;KACvC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AAEjD,MAAM,CAAC,MAAM,YAAY,GAAU;IACjC,IAAI,EAAE;QACJ,OAAO;KACR;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAU;IACnC,IAAI,EAAE;QACJ,OAAO;QACP,QAAQ,EAAE,IAAI;KACf;CACF,CAAC","sourcesContent":["import { Dropdown } from \"@/.\";\nimport { Need } from \"@grantbii/ui-base/grant/enums\";\nimport type { Meta, StoryObj } from \"@storybook/nextjs-vite\";\n\nconst meta: Meta<typeof Dropdown> = {\n title: \"Molecules/Dropdown\",\n component: Dropdown,\n tags: [\"autodocs\"],\n parameters: {\n layout: \"centered\",\n },\n};\n\nexport default meta;\n\ntype Story = StoryObj<typeof meta>;\n\nconst options = Object.values(Need)\n .filter((need) => need !== Need.UNKNOWN)\n .map((need) => ({ label: need, value: need }));\n\nexport const BasicExample: Story = {\n args: {\n options,\n },\n};\n\nexport const WithValidation: Story = {\n args: {\n options,\n required: true,\n },\n};\n"]}
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from "@storybook/nextjs-vite";
1
+ import type { Meta, StoryObj } from "@storybook/nextjs-vite";
2
2
  declare const FileDropExample: () => import("react/jsx-runtime").JSX.Element;
3
3
  declare const meta: Meta<typeof FileDropExample>;
4
4
  export default meta;
@@ -20,3 +20,4 @@ export default meta;
20
20
  export const Example = {
21
21
  args: {},
22
22
  };
23
+ //# sourceMappingURL=FileDrop.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileDrop.stories.js","sourceRoot":"","sources":["../../../stories/molecules/FileDrop.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AAE5C,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,MAAM,eAAe,GAAG,GAAG,EAAE;IAC3B,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,YAAY,EAAE,GAAG,WAAW,EAAE,CAAC;IAEvE,OAAO,CACL,KAAC,SAAS,cACR,KAAC,QAAQ,IACP,aAAa,EAAE,KAAK,EACpB,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,EACtB,YAAY,EAAE,YAAY,GAC1B,GACQ,CACb,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAA;;CAE3B,CAAC;AAEF,MAAM,IAAI,GAAiC;IACzC,KAAK,EAAE,qBAAqB;IAC5B,SAAS,EAAE,eAAe;IAC1B,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE;QACV,MAAM,EAAE,UAAU;KACnB;CACF,CAAC;AAEF,eAAe,IAAI,CAAC;AAIpB,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE,EAAE;CACT,CAAC","sourcesContent":["import { FileDrop, useFileDrop } from \"@/.\";\nimport type { Meta, StoryObj } from \"@storybook/nextjs-vite\";\nimport styled from \"styled-components\";\n\nconst FileDropExample = () => {\n const { files, uploadFiles, removeFile, errorMessage } = useFileDrop();\n\n return (\n <Container>\n <FileDrop\n uploadedFiles={files}\n uploadFiles={uploadFiles}\n removeFile={removeFile}\n errorMessage={errorMessage}\n />\n </Container>\n );\n};\n\nconst Container = styled.div`\n width: 400px;\n`;\n\nconst meta: Meta<typeof FileDropExample> = {\n title: \"Molecules/File Drop\",\n component: FileDropExample,\n tags: [\"autodocs\"],\n parameters: {\n layout: \"centered\",\n },\n};\n\nexport default meta;\n\ntype Story = StoryObj<typeof meta>;\n\nexport const Example: Story = {\n args: {},\n};\n"]}
@@ -1,8 +1,8 @@
1
- import { Meta, StoryObj } from "@storybook/nextjs-vite";
2
- import { ReactNode } from "react";
1
+ import type { Meta, StoryObj } from "@storybook/nextjs-vite";
2
+ import { type JSX, type ReactNode } from "react";
3
3
  type ModalExampleProps = {
4
4
  header?: ReactNode;
5
- content: ReactNode;
5
+ content: JSX.Element;
6
6
  footer?: ReactNode;
7
7
  width?: string;
8
8
  height?: string;
@@ -1,8 +1,9 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Button, Modal, useModal } from "@/.";
3
+ import {} from "react";
3
4
  const ModalExample = (props) => {
4
5
  const { showModal, openModal, closeModal } = useModal();
5
- return (_jsxs(_Fragment, { children: [_jsx(Button, { text: "Click to open modal", onClick: () => openModal() }), showModal ? (_jsx(Modal, Object.assign({}, props, { onClickCancel: () => closeModal() }))) : (_jsx(_Fragment, {}))] }));
6
+ return (_jsxs(_Fragment, { children: [_jsx(Button, { text: "Click to open modal", onClick: () => openModal() }), showModal ? (_jsx(Modal, { ...props, onClickCancel: () => closeModal() })) : (_jsx(_Fragment, {}))] }));
6
7
  };
7
8
  const meta = {
8
9
  title: "Molecules/Modal",
@@ -32,3 +33,4 @@ export const LongContent = {
32
33
  height: "360px",
33
34
  },
34
35
  };
36
+ //# sourceMappingURL=Modal.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Modal.stories.js","sourceRoot":"","sources":["../../../stories/molecules/Modal.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAE9C,OAAO,EAA4B,MAAM,OAAO,CAAC;AAUjD,MAAM,YAAY,GAAG,CAAC,KAAwB,EAAE,EAAE;IAChD,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,QAAQ,EAAE,CAAC;IAExD,OAAO,CACL,8BACE,KAAC,MAAM,IAAC,IAAI,EAAC,qBAAqB,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,EAAE,GAAI,EAChE,SAAS,CAAC,CAAC,CAAC,CACX,KAAC,KAAK,OAAK,KAAK,EAAE,aAAa,EAAE,GAAG,EAAE,CAAC,UAAU,EAAE,GAAI,CACxD,CAAC,CAAC,CAAC,CACF,mBAAK,CACN,IACA,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,IAAI,GAA8B;IACtC,KAAK,EAAE,iBAAiB;IACxB,SAAS,EAAE,YAAY;IACvB,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE;QACV,MAAM,EAAE,UAAU;KACnB;CACF,CAAC;AAEF,eAAe,IAAI,CAAC;AAIpB,MAAM,MAAM,GAAG,UAAU,CAAC;AAE1B,MAAM,YAAY,GAAG,CACnB,gFAA4D,CAC7D,CAAC;AAEF,MAAM,WAAW,GAAG,CAClB,0BACE,qdAQI,EAEJ,+NAII,EAEJ,iOAII,IACA,CACP,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAU;IACjC,IAAI,EAAE;QACJ,MAAM;QACN,OAAO,EAAE,YAAY;QACrB,KAAK,EAAE,OAAO;QACd,MAAM,EAAE,OAAO;KAChB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAU;IAChC,IAAI,EAAE;QACJ,MAAM;QACN,OAAO,EAAE,WAAW;QACpB,KAAK,EAAE,OAAO;QACd,MAAM,EAAE,OAAO;KAChB;CACF,CAAC","sourcesContent":["import { Button, Modal, useModal } from \"@/.\";\nimport type { Meta, StoryObj } from \"@storybook/nextjs-vite\";\nimport { type JSX, type ReactNode } from \"react\";\n\ntype ModalExampleProps = {\n header?: ReactNode;\n content: JSX.Element;\n footer?: ReactNode;\n width?: string;\n height?: string;\n};\n\nconst ModalExample = (props: ModalExampleProps) => {\n const { showModal, openModal, closeModal } = useModal();\n\n return (\n <>\n <Button text=\"Click to open modal\" onClick={() => openModal()} />\n {showModal ? (\n <Modal {...props} onClickCancel={() => closeModal()} />\n ) : (\n <></>\n )}\n </>\n );\n};\n\nconst meta: Meta<typeof ModalExample> = {\n title: \"Molecules/Modal\",\n component: ModalExample,\n tags: [\"autodocs\"],\n parameters: {\n layout: \"centered\",\n },\n};\n\nexport default meta;\n\ntype Story = StoryObj<typeof meta>;\n\nconst header = \"Grantbii\";\n\nconst shortContent = (\n <p>Amplifying Business Grant Impact for SMEs & Scale-ups</p>\n);\n\nconst longContent = (\n <div>\n <p>\n Grantbii is an AI-powered grant intelligence and matching platform that\n helps grant seekers effortlessly find, match, prep & apply for the right\n business grants - maximizing grant funding success with minimal effort.\n Our platform connects businesses with a trusted Grant Enabler Network -\n solution providers, consulting experts, and delivery partners - ensuring\n that every dollar of grant funding leads to real business transformation\n impact.\n </p>\n\n <p>\n In the future, Grantbii aims to automate the entire grant application\n lifecycle, from discovery to claims submission and guide you through the\n application process with minimal effort on your part.\n </p>\n\n <p>\n To maximize your chances of grant success, you can expect to leverage on\n tools to assess your chances of success and offer expert support to ensure\n your application meets all necessary requirements.\n </p>\n </div>\n);\n\nexport const ShortContent: Story = {\n args: {\n header,\n content: shortContent,\n width: \"600px\",\n height: \"360px\",\n },\n};\n\nexport const LongContent: Story = {\n args: {\n header,\n content: longContent,\n width: \"600px\",\n height: \"360px\",\n },\n};\n"]}
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from "@storybook/nextjs-vite";
1
+ import type { Meta, StoryObj } from "@storybook/nextjs-vite";
2
2
  type ExampleProps = {
3
3
  controlled: boolean;
4
4
  };
@@ -14,7 +14,7 @@ const RadioButtonsExample = ({ controlled }) => {
14
14
  onClick: () => setSelectedLocation(location),
15
15
  })),
16
16
  };
17
- return (_jsx(RadioButtons, Object.assign({}, (controlled ? controlledProps : uncontrolledProps))));
17
+ return (_jsx(RadioButtons, { ...(controlled ? controlledProps : uncontrolledProps) }));
18
18
  };
19
19
  const uncontrolledProps = {
20
20
  name: "location",
@@ -45,3 +45,4 @@ export const Controlled = {
45
45
  controlled: true,
46
46
  },
47
47
  };
48
+ //# sourceMappingURL=RadioButtons.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RadioButtons.stories.js","sourceRoot":"","sources":["../../../stories/molecules/RadioButtons.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,KAAK,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAEzD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAMjC,MAAM,mBAAmB,GAAG,CAAC,EAAE,UAAU,EAAgB,EAAE,EAAE;IAC3D,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IAE7D,MAAM,eAAe,GAAG;QACtB,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC;aAC7B,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,KAAK,QAAQ,CAAC,OAAO,CAAC;aACnD,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;YAClB,KAAK,EAAE,QAAQ;YACf,KAAK,EAAE,QAAQ;YACf,OAAO,EAAE,gBAAgB,KAAK,QAAQ;YACtC,OAAO,EAAE,GAAG,EAAE,CAAC,mBAAmB,CAAC,QAAQ,CAAC;SAC7C,CAAC,CAAC;KACN,CAAC;IAEF,OAAO,CACL,KAAC,YAAY,OAAK,CAAC,UAAU,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,iBAAiB,CAAC,GAAI,CACzE,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,iBAAiB,GAAG;IACxB,IAAI,EAAE,UAAU;IAChB,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC;SAC7B,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,KAAK,QAAQ,CAAC,OAAO,CAAC;SACnD,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;QAClB,KAAK,EAAE,QAAQ;QACf,KAAK,EAAE,QAAQ;QACf,QAAQ,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,YAAY,QAAQ,GAAG,CAAC;KAC/C,CAAC,CAAC;CACN,CAAC;AAEF,MAAM,IAAI,GAAqC;IAC7C,KAAK,EAAE,yBAAyB;IAChC,SAAS,EAAE,mBAAmB;IAC9B,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE;QACV,MAAM,EAAE,UAAU;KACnB;CACF,CAAC;AAEF,eAAe,IAAI,CAAC;AAIpB,MAAM,CAAC,MAAM,YAAY,GAAU;IACjC,IAAI,EAAE;QACJ,UAAU,EAAE,KAAK;KAClB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAU;IAC/B,IAAI,EAAE;QACJ,UAAU,EAAE,IAAI;KACjB;CACF,CAAC","sourcesContent":["import { RadioButtons } from \"@/.\";\nimport { Location } from \"@grantbii/ui-base/grant/enums\";\nimport type { Meta, StoryObj } from \"@storybook/nextjs-vite\";\nimport { useState } from \"react\";\n\ntype ExampleProps = {\n controlled: boolean;\n};\n\nconst RadioButtonsExample = ({ controlled }: ExampleProps) => {\n const [selectedLocation, setSelectedLocation] = useState(\"\");\n\n const controlledProps = {\n options: Object.values(Location)\n .filter((location) => location !== Location.UNKNOWN)\n .map((location) => ({\n label: location,\n value: location,\n checked: selectedLocation === location,\n onClick: () => setSelectedLocation(location),\n })),\n };\n\n return (\n <RadioButtons {...(controlled ? controlledProps : uncontrolledProps)} />\n );\n};\n\nconst uncontrolledProps = {\n name: \"location\",\n options: Object.values(Location)\n .filter((location) => location !== Location.UNKNOWN)\n .map((location) => ({\n label: location,\n value: location,\n onChange: () => alert(`Selected ${location}!`),\n })),\n};\n\nconst meta: Meta<typeof RadioButtonsExample> = {\n title: \"Molecules/Radio Buttons\",\n component: RadioButtonsExample,\n tags: [\"autodocs\"],\n parameters: {\n layout: \"centered\",\n },\n};\n\nexport default meta;\n\ntype Story = StoryObj<typeof meta>;\n\nexport const Uncontrolled: Story = {\n args: {\n controlled: false,\n },\n};\n\nexport const Controlled: Story = {\n args: {\n controlled: true,\n },\n};\n"]}
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from "@storybook/nextjs-vite";
1
+ import type { Meta, StoryObj } from "@storybook/nextjs-vite";
2
2
  declare const GrantMatchExample: () => import("react/jsx-runtime").JSX.Element;
3
3
  declare const meta: Meta<typeof GrantMatchExample>;
4
4
  export default meta;
@@ -1,6 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { GrantMatch } from "@/.";
3
3
  import { useGrantMatchActiveQuery } from "@/core/organisms/GrantMatch";
4
+ import {} from "@grantbii/ui-base/match/models";
4
5
  import { useState } from "react";
5
6
  import styled from "styled-components";
6
7
  const GrantMatchExample = () => {
@@ -13,7 +14,7 @@ const GrantMatchExample = () => {
13
14
  };
14
15
  const resetGrantMatch = () => setStatus("pending query");
15
16
  const grantMatchQueryProps = useGrantMatchActiveQuery(performGrantMatch, resetGrantMatch);
16
- return (_jsxs(Container, { children: [_jsx(GrantMatch, Object.assign({}, grantMatchQueryProps)), _jsxs("p", { children: ["Status: ", status] })] }));
17
+ return (_jsxs(Container, { children: [_jsx(GrantMatch, { ...grantMatchQueryProps }), _jsxs("p", { children: ["Status: ", status] })] }));
17
18
  };
18
19
  const Container = styled.div `
19
20
  display: flex;
@@ -34,3 +35,4 @@ export default meta;
34
35
  export const Example = {
35
36
  args: {},
36
37
  };
38
+ //# sourceMappingURL=GrantMatch.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GrantMatch.stories.js","sourceRoot":"","sources":["../../../stories/organisms/GrantMatch.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACjC,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,EAAwB,MAAM,gCAAgC,CAAC;AAEtE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,MAAM,iBAAiB,GAAG,GAAG,EAAE;IAC7B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,eAAe,CAAC,CAAC;IAEtD,MAAM,iBAAiB,GAAG,CAAC,QAAyB,EAAE,EAAE;QACtD,MAAM,SAAS,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrE,MAAM,cAAc,GAAG,UAAU,SAAS,eAAe,QAAQ,CAAC,IAAI,GAAG,CAAC;QAE1E,SAAS,CAAC,+BAA+B,cAAc,EAAE,CAAC,CAAC;QAC3D,UAAU,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,qBAAqB,cAAc,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC;IAC3E,CAAC,CAAC;IAEF,MAAM,eAAe,GAAG,GAAG,EAAE,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;IAEzD,MAAM,oBAAoB,GAAG,wBAAwB,CACnD,iBAAiB,EACjB,eAAe,CAChB,CAAC;IAEF,OAAO,CACL,MAAC,SAAS,eACR,KAAC,UAAU,OAAK,oBAAoB,GAAI,EACxC,oCAAY,MAAM,IAAK,IACb,CACb,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;CAM3B,CAAC;AAEF,MAAM,IAAI,GAAmC;IAC3C,KAAK,EAAE,uBAAuB;IAC9B,SAAS,EAAE,iBAAiB;IAC5B,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE;QACV,MAAM,EAAE,YAAY;KACrB;CACF,CAAC;AAEF,eAAe,IAAI,CAAC;AAIpB,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE,EAAE;CACT,CAAC","sourcesContent":["import { GrantMatch } from \"@/.\";\nimport { useGrantMatchActiveQuery } from \"@/core/organisms/GrantMatch\";\nimport { type GrantMatchQuery } from \"@grantbii/ui-base/match/models\";\nimport type { Meta, StoryObj } from \"@storybook/nextjs-vite\";\nimport { useState } from \"react\";\nimport styled from \"styled-components\";\n\nconst GrantMatchExample = () => {\n const [status, setStatus] = useState(\"pending query\");\n\n const performGrantMatch = (newQuery: GrantMatchQuery) => {\n const fileNames = newQuery.files.map((file) => file.name).join(\", \");\n const printableQuery = `files [${fileNames}] and text [${newQuery.text}]`;\n\n setStatus(`trying to find grants using ${printableQuery}`);\n setTimeout(() => setStatus(`found grants with ${printableQuery}`), 1000);\n };\n\n const resetGrantMatch = () => setStatus(\"pending query\");\n\n const grantMatchQueryProps = useGrantMatchActiveQuery(\n performGrantMatch,\n resetGrantMatch,\n );\n\n return (\n <Container>\n <GrantMatch {...grantMatchQueryProps} />\n <p>Status: {status}</p>\n </Container>\n );\n};\n\nconst Container = styled.div`\n display: flex;\n flex-direction: column;\n gap: 8px;\n\n padding: 16px;\n`;\n\nconst meta: Meta<typeof GrantMatchExample> = {\n title: \"Organisms/Grant Match\",\n component: GrantMatchExample,\n tags: [\"autodocs\"],\n parameters: {\n layout: \"fullscreen\",\n },\n};\n\nexport default meta;\n\ntype Story = StoryObj<typeof meta>;\n\nexport const Example: Story = {\n args: {},\n};\n"]}
@@ -1,5 +1,5 @@
1
- import { Meta, StoryObj } from "@storybook/nextjs-vite";
2
- import { ReactNode } from "react";
1
+ import type { Meta, StoryObj } from "@storybook/nextjs-vite";
2
+ import { type ReactNode } from "react";
3
3
  type TallyModalExampleProps = {
4
4
  header?: ReactNode;
5
5
  tallyId: string;
@@ -1,8 +1,9 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Button, TallyModal, useModal } from "@/.";
3
+ import {} from "react";
3
4
  const TallyModalExample = (props) => {
4
5
  const { showModal, openModal, closeModal } = useModal();
5
- return (_jsxs(_Fragment, { children: [_jsx(Button, { text: "Click to open modal", onClick: () => openModal() }), showModal ? (_jsx(TallyModal, Object.assign({}, props, { onClickCancel: () => closeModal() }))) : (_jsx(_Fragment, {}))] }));
6
+ return (_jsxs(_Fragment, { children: [_jsx(Button, { text: "Click to open modal", onClick: () => openModal() }), showModal ? (_jsx(TallyModal, { ...props, onClickCancel: () => closeModal() })) : (_jsx(_Fragment, {}))] }));
6
7
  };
7
8
  const meta = {
8
9
  title: "Organisms/Tally Modal",
@@ -19,3 +20,4 @@ export const Example = {
19
20
  tallyId: "3jAj5Q",
20
21
  },
21
22
  };
23
+ //# sourceMappingURL=TallyModal.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TallyModal.stories.js","sourceRoot":"","sources":["../../../stories/organisms/TallyModal.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAEnD,OAAO,EAAkB,MAAM,OAAO,CAAC;AAQvC,MAAM,iBAAiB,GAAG,CAAC,KAA6B,EAAE,EAAE;IAC1D,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,QAAQ,EAAE,CAAC;IAExD,OAAO,CACL,8BACE,KAAC,MAAM,IAAC,IAAI,EAAC,qBAAqB,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,EAAE,GAAI,EAChE,SAAS,CAAC,CAAC,CAAC,CACX,KAAC,UAAU,OAAK,KAAK,EAAE,aAAa,EAAE,GAAG,EAAE,CAAC,UAAU,EAAE,GAAI,CAC7D,CAAC,CAAC,CAAC,CACF,mBAAK,CACN,IACA,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,IAAI,GAAmC;IAC3C,KAAK,EAAE,uBAAuB;IAC9B,SAAS,EAAE,iBAAiB;IAC5B,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE;QACV,MAAM,EAAE,UAAU;KACnB;CACF,CAAC;AAEF,eAAe,IAAI,CAAC;AAIpB,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE;QACJ,MAAM,EAAE,eAAe;QACvB,OAAO,EAAE,QAAQ;KAClB;CACF,CAAC","sourcesContent":["import { Button, TallyModal, useModal } from \"@/.\";\nimport type { Meta, StoryObj } from \"@storybook/nextjs-vite\";\nimport { type ReactNode } from \"react\";\n\ntype TallyModalExampleProps = {\n header?: ReactNode;\n tallyId: string;\n prefilledFieldsQueryParams?: string;\n};\n\nconst TallyModalExample = (props: TallyModalExampleProps) => {\n const { showModal, openModal, closeModal } = useModal();\n\n return (\n <>\n <Button text=\"Click to open modal\" onClick={() => openModal()} />\n {showModal ? (\n <TallyModal {...props} onClickCancel={() => closeModal()} />\n ) : (\n <></>\n )}\n </>\n );\n};\n\nconst meta: Meta<typeof TallyModalExample> = {\n title: \"Organisms/Tally Modal\",\n component: TallyModalExample,\n tags: [\"autodocs\"],\n parameters: {\n layout: \"centered\",\n },\n};\n\nexport default meta;\n\ntype Story = StoryObj<typeof meta>;\n\nexport const Example: Story = {\n args: {\n header: \"Apply with us\",\n tallyId: \"3jAj5Q\",\n },\n};\n"]}
@@ -1,5 +1,5 @@
1
1
  import { YesNoOptions } from "@/.";
2
- import { Meta, StoryObj } from "@storybook/nextjs-vite";
2
+ import type { Meta, StoryObj } from "@storybook/nextjs-vite";
3
3
  declare const meta: Meta<typeof YesNoOptions>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof meta>;
@@ -17,5 +17,9 @@ export const YesOrNo = {
17
17
  args: baseArgs,
18
18
  };
19
19
  export const YesOrNoOrUnsure = {
20
- args: Object.assign(Object.assign({}, baseArgs), { unsureProps: {} }),
20
+ args: {
21
+ ...baseArgs,
22
+ unsureProps: {},
23
+ },
21
24
  };
25
+ //# sourceMappingURL=YesNoOptions.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"YesNoOptions.stories.js","sourceRoot":"","sources":["../../../stories/organisms/YesNoOptions.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,KAAK,CAAC;AAGnC,MAAM,IAAI,GAA8B;IACtC,KAAK,EAAE,0BAA0B;IACjC,SAAS,EAAE,YAAY;IACvB,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE;QACV,MAAM,EAAE,UAAU;KACnB;CACF,CAAC;AAEF,eAAe,IAAI,CAAC;AAIpB,MAAM,QAAQ,GAAG;IACf,IAAI,EAAE,UAAU;IAChB,QAAQ,EAAE,EAAE;IACZ,OAAO,EAAE,EAAE;CACZ,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE,QAAQ;CACf,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAU;IACpC,IAAI,EAAE;QACJ,GAAG,QAAQ;QACX,WAAW,EAAE,EAAE;KAChB;CACF,CAAC","sourcesContent":["import { YesNoOptions } from \"@/.\";\nimport type { Meta, StoryObj } from \"@storybook/nextjs-vite\";\n\nconst meta: Meta<typeof YesNoOptions> = {\n title: \"Organisms/Yes-No Options\",\n component: YesNoOptions,\n tags: [\"autodocs\"],\n parameters: {\n layout: \"centered\",\n },\n};\n\nexport default meta;\n\ntype Story = StoryObj<typeof meta>;\n\nconst baseArgs = {\n name: \"question\",\n yesProps: {},\n noProps: {},\n};\n\nexport const YesOrNo: Story = {\n args: baseArgs,\n};\n\nexport const YesOrNoOrUnsure: Story = {\n args: {\n ...baseArgs,\n unsureProps: {},\n },\n};\n"]}