@grantbii/design-system 1.0.75 → 1.0.78
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.
- package/core/atoms/Badge.d.ts +1 -1
- package/core/atoms/Badge.js +2 -1
- package/core/atoms/Badge.js.map +1 -0
- package/core/atoms/BrandLogo.js +1 -1
- package/core/atoms/BrandLogo.js.map +1 -0
- package/core/atoms/Button.d.ts +1 -1
- package/core/atoms/Button.js +3 -1
- package/core/atoms/Button.js.map +1 -0
- package/core/atoms/Checkbox.d.ts +1 -1
- package/core/atoms/Checkbox.js +3 -16
- package/core/atoms/Checkbox.js.map +1 -0
- package/core/atoms/LinkButton.d.ts +1 -1
- package/core/atoms/LinkButton.js +4 -16
- package/core/atoms/LinkButton.js.map +1 -0
- package/core/atoms/PageLoader.d.ts +1 -1
- package/core/atoms/PageLoader.js +3 -16
- package/core/atoms/PageLoader.js.map +1 -0
- package/core/atoms/RadioButton.d.ts +1 -1
- package/core/atoms/RadioButton.js +3 -16
- package/core/atoms/RadioButton.js.map +1 -0
- package/core/atoms/Textarea.js +1 -1
- package/core/atoms/Textarea.js.map +1 -0
- package/core/atoms/index.js +1 -0
- package/core/atoms/index.js.map +1 -0
- package/core/atoms/shared.js +1 -0
- package/core/atoms/shared.js.map +1 -0
- package/core/foundations/colors.js +1 -0
- package/core/foundations/colors.js.map +1 -0
- package/core/foundations/flags.js +1 -0
- package/core/foundations/flags.js.map +1 -0
- package/core/foundations/icons.js +1 -0
- package/core/foundations/icons.js.map +1 -0
- package/core/foundations/index.js +1 -0
- package/core/foundations/index.js.map +1 -0
- package/core/foundations/responsive.js +1 -0
- package/core/foundations/responsive.js.map +1 -0
- package/core/foundations/types.js +1 -0
- package/core/foundations/types.js.map +1 -0
- package/core/foundations/typography.d.ts +1 -1
- package/core/foundations/typography.js +2 -0
- package/core/foundations/typography.js.map +1 -0
- package/core/global/GlobalStyle.js +1 -1
- package/core/global/GlobalStyle.js.map +1 -0
- package/core/global/index.js +1 -0
- package/core/global/index.js.map +1 -0
- package/core/integrations/StyledComponentsRegistry.d.ts +1 -1
- package/core/integrations/StyledComponentsRegistry.js +1 -1
- package/core/integrations/StyledComponentsRegistry.js.map +1 -0
- package/core/integrations/index.js +1 -0
- package/core/integrations/index.js.map +1 -0
- package/core/molecules/FileDrop.js +3 -6
- package/core/molecules/FileDrop.js.map +1 -0
- package/core/molecules/Modal.d.ts +2 -2
- package/core/molecules/Modal.js +2 -2
- package/core/molecules/Modal.js.map +1 -0
- package/core/molecules/RadioButtons.d.ts +2 -2
- package/core/molecules/RadioButtons.js +4 -16
- package/core/molecules/RadioButtons.js.map +1 -0
- package/core/molecules/index.js +1 -0
- package/core/molecules/index.js.map +1 -0
- package/core/organisms/GrantMatch/ActiveQueryFiles.js +3 -4
- package/core/organisms/GrantMatch/ActiveQueryFiles.js.map +1 -0
- package/core/organisms/GrantMatch/GrantMatchModal.js +1 -1
- package/core/organisms/GrantMatch/GrantMatchModal.js.map +1 -0
- package/core/organisms/GrantMatch/SearchBar.js +2 -0
- package/core/organisms/GrantMatch/SearchBar.js.map +1 -0
- package/core/organisms/GrantMatch/context.d.ts +1 -1
- package/core/organisms/GrantMatch/context.js +2 -0
- package/core/organisms/GrantMatch/context.js.map +1 -0
- package/core/organisms/GrantMatch/index.d.ts +1 -1
- package/core/organisms/GrantMatch/index.js +3 -2
- package/core/organisms/GrantMatch/index.js.map +1 -0
- package/core/organisms/TallyModal.d.ts +1 -1
- package/core/organisms/TallyModal.js +3 -16
- package/core/organisms/TallyModal.js.map +1 -0
- package/core/organisms/YesNoOptions.d.ts +1 -1
- package/core/organisms/YesNoOptions.js +3 -2
- package/core/organisms/YesNoOptions.js.map +1 -0
- package/core/organisms/index.js +1 -0
- package/core/organisms/index.js.map +1 -0
- package/index.js +2 -0
- package/index.js.map +1 -0
- package/package.json +2 -1
- package/stories/atoms/Badge.stories.d.ts +1 -1
- package/stories/atoms/Badge.stories.js +2 -0
- package/stories/atoms/Badge.stories.js.map +1 -0
- package/stories/atoms/BrandLogo.stories.d.ts +1 -1
- package/stories/atoms/BrandLogo.stories.js +2 -0
- package/stories/atoms/BrandLogo.stories.js.map +1 -0
- package/stories/atoms/Button.stories.d.ts +1 -1
- package/stories/atoms/Button.stories.js +20 -4
- package/stories/atoms/Button.stories.js.map +1 -0
- package/stories/atoms/Checkbox.stories.d.ts +1 -1
- package/stories/atoms/Checkbox.stories.js +2 -0
- package/stories/atoms/Checkbox.stories.js.map +1 -0
- package/stories/atoms/LinkButton.stories.d.ts +1 -1
- package/stories/atoms/LinkButton.stories.js +20 -4
- package/stories/atoms/LinkButton.stories.js.map +1 -0
- package/stories/atoms/PageLoader.stories.d.ts +1 -1
- package/stories/atoms/PageLoader.stories.js +2 -0
- package/stories/atoms/PageLoader.stories.js.map +1 -0
- package/stories/atoms/Textarea.stories.d.ts +1 -1
- package/stories/atoms/Textarea.stories.js +2 -0
- package/stories/atoms/Textarea.stories.js.map +1 -0
- package/stories/molecules/FileDrop.stories.d.ts +1 -1
- package/stories/molecules/FileDrop.stories.js +2 -0
- package/stories/molecules/FileDrop.stories.js.map +1 -0
- package/stories/molecules/Modal.stories.d.ts +3 -3
- package/stories/molecules/Modal.stories.js +4 -1
- package/stories/molecules/Modal.stories.js.map +1 -0
- package/stories/molecules/RadioButtons.stories.d.ts +1 -1
- package/stories/molecules/RadioButtons.stories.js +3 -1
- package/stories/molecules/RadioButtons.stories.js.map +1 -0
- package/stories/organisms/GrantMatch.stories.d.ts +1 -1
- package/stories/organisms/GrantMatch.stories.js +4 -1
- package/stories/organisms/GrantMatch.stories.js.map +1 -0
- package/stories/organisms/TallyModal.stories.d.ts +2 -2
- package/stories/organisms/TallyModal.stories.js +4 -1
- package/stories/organisms/TallyModal.stories.js.map +1 -0
- package/stories/organisms/YesNoOptions.stories.d.ts +1 -1
- package/stories/organisms/YesNoOptions.stories.js +6 -1
- package/stories/organisms/YesNoOptions.stories.js.map +1 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/vitest.config.js +1 -0
- package/vitest.config.js.map +1 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { RadioButtons } from "@/.";
|
|
3
3
|
import { Location } from "@grantbii/ui-base/grant/enums";
|
|
4
|
+
import {} from "@storybook/nextjs-vite";
|
|
4
5
|
import { useState } from "react";
|
|
5
6
|
const RadioButtonsExample = ({ controlled }) => {
|
|
6
7
|
const [selectedLocation, setSelectedLocation] = useState("");
|
|
@@ -14,7 +15,7 @@ const RadioButtonsExample = ({ controlled }) => {
|
|
|
14
15
|
onClick: () => setSelectedLocation(location),
|
|
15
16
|
})),
|
|
16
17
|
};
|
|
17
|
-
return (_jsx(RadioButtons,
|
|
18
|
+
return (_jsx(RadioButtons, { ...(controlled ? controlledProps : uncontrolledProps) }));
|
|
18
19
|
};
|
|
19
20
|
const uncontrolledProps = {
|
|
20
21
|
name: "location",
|
|
@@ -45,3 +46,4 @@ export const Controlled = {
|
|
|
45
46
|
controlled: true,
|
|
46
47
|
},
|
|
47
48
|
};
|
|
49
|
+
//# 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;AACzD,OAAO,EAA4B,MAAM,wBAAwB,CAAC;AAClE,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, type 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, type 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,8 @@
|
|
|
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";
|
|
5
|
+
import {} from "@storybook/nextjs-vite";
|
|
4
6
|
import { useState } from "react";
|
|
5
7
|
import styled from "styled-components";
|
|
6
8
|
const GrantMatchExample = () => {
|
|
@@ -13,7 +15,7 @@ const GrantMatchExample = () => {
|
|
|
13
15
|
};
|
|
14
16
|
const resetGrantMatch = () => setStatus("pending query");
|
|
15
17
|
const grantMatchQueryProps = useGrantMatchActiveQuery(performGrantMatch, resetGrantMatch);
|
|
16
|
-
return (_jsxs(Container, { children: [_jsx(GrantMatch,
|
|
18
|
+
return (_jsxs(Container, { children: [_jsx(GrantMatch, { ...grantMatchQueryProps }), _jsxs("p", { children: ["Status: ", status] })] }));
|
|
17
19
|
};
|
|
18
20
|
const Container = styled.div `
|
|
19
21
|
display: flex;
|
|
@@ -34,3 +36,4 @@ export default meta;
|
|
|
34
36
|
export const Example = {
|
|
35
37
|
args: {},
|
|
36
38
|
};
|
|
39
|
+
//# 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;AACtE,OAAO,EAA4B,MAAM,wBAAwB,CAAC;AAClE,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, type 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, type 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,10 @@
|
|
|
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 "@storybook/nextjs-vite";
|
|
4
|
+
import {} from "react";
|
|
3
5
|
const TallyModalExample = (props) => {
|
|
4
6
|
const { showModal, openModal, closeModal } = useModal();
|
|
5
|
-
return (_jsxs(_Fragment, { children: [_jsx(Button, { text: "Click to open modal", onClick: () => openModal() }), showModal ? (_jsx(TallyModal,
|
|
7
|
+
return (_jsxs(_Fragment, { children: [_jsx(Button, { text: "Click to open modal", onClick: () => openModal() }), showModal ? (_jsx(TallyModal, { ...props, onClickCancel: () => closeModal() })) : (_jsx(_Fragment, {}))] }));
|
|
6
8
|
};
|
|
7
9
|
const meta = {
|
|
8
10
|
title: "Organisms/Tally Modal",
|
|
@@ -19,3 +21,4 @@ export const Example = {
|
|
|
19
21
|
tallyId: "3jAj5Q",
|
|
20
22
|
},
|
|
21
23
|
};
|
|
24
|
+
//# 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;AACnD,OAAO,EAA4B,MAAM,wBAAwB,CAAC;AAClE,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, type 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, type 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>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { YesNoOptions } from "@/.";
|
|
2
|
+
import {} from "@storybook/nextjs-vite";
|
|
2
3
|
const meta = {
|
|
3
4
|
title: "Organisms/Yes-No Options",
|
|
4
5
|
component: YesNoOptions,
|
|
@@ -17,5 +18,9 @@ export const YesOrNo = {
|
|
|
17
18
|
args: baseArgs,
|
|
18
19
|
};
|
|
19
20
|
export const YesOrNoOrUnsure = {
|
|
20
|
-
args:
|
|
21
|
+
args: {
|
|
22
|
+
...baseArgs,
|
|
23
|
+
unsureProps: {},
|
|
24
|
+
},
|
|
21
25
|
};
|
|
26
|
+
//# 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;AACnC,OAAO,EAA4B,MAAM,wBAAwB,CAAC;AAElE,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, type 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"]}
|