@grantbii/design-system 1.2.0 → 1.3.1
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/{molecules → atoms}/Dropdown.js +10 -2
- package/core/atoms/Dropdown.js.map +1 -0
- package/core/atoms/Input.d.ts +7 -1
- package/core/atoms/Input.js +6 -3
- package/core/atoms/Input.js.map +1 -1
- package/core/atoms/index.d.ts +1 -1
- package/core/atoms/index.js +1 -1
- package/core/atoms/index.js.map +1 -1
- package/core/atoms/shared.d.ts +4 -0
- package/core/atoms/shared.js +6 -1
- package/core/atoms/shared.js.map +1 -1
- package/core/molecules/FileDrop.js +7 -5
- package/core/molecules/FileDrop.js.map +1 -1
- package/core/molecules/Modal.d.ts +2 -1
- package/core/molecules/Modal.js +2 -2
- package/core/molecules/Modal.js.map +1 -1
- package/core/molecules/RadioButtons.js +1 -3
- package/core/molecules/RadioButtons.js.map +1 -1
- package/core/molecules/index.d.ts +0 -1
- package/core/molecules/index.js +0 -1
- package/core/molecules/index.js.map +1 -1
- package/core/organisms/GrantMatch/ActiveQueryFiles.js +1 -3
- package/core/organisms/GrantMatch/ActiveQueryFiles.js.map +1 -1
- package/package.json +33 -33
- package/stories/{molecules → atoms}/Dropdown.stories.js +1 -1
- package/stories/atoms/Dropdown.stories.js.map +1 -0
- package/stories/atoms/Input.stories.d.ts +1 -0
- package/stories/atoms/Input.stories.js +9 -1
- package/stories/atoms/Input.stories.js.map +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/core/atoms/Select.d.ts +0 -2
- package/core/atoms/Select.js +0 -12
- package/core/atoms/Select.js.map +0 -1
- package/core/molecules/Dropdown.js.map +0 -1
- package/stories/molecules/Dropdown.stories.js.map +0 -1
- /package/core/{molecules → atoms}/Dropdown.d.ts +0 -0
- /package/stories/{molecules → atoms}/Dropdown.stories.d.ts +0 -0
package/core/atoms/Select.d.ts
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const Select: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, never>> & string;
|
|
2
|
-
export default Select;
|
package/core/atoms/Select.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import styled from "styled-components";
|
|
2
|
-
import { Colors } from "../foundations";
|
|
3
|
-
import { InputValidation } from "./shared";
|
|
4
|
-
const Select = styled.select `
|
|
5
|
-
padding: 12px 16px;
|
|
6
|
-
background-color: ${Colors.base.white};
|
|
7
|
-
border-radius: 6px;
|
|
8
|
-
|
|
9
|
-
${InputValidation}
|
|
10
|
-
`;
|
|
11
|
-
export default Select;
|
|
12
|
-
//# sourceMappingURL=Select.js.map
|
package/core/atoms/Select.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Select.js","sourceRoot":"","sources":["../../../core/atoms/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAA;;sBAEN,MAAM,CAAC,IAAI,CAAC,KAAK;;;IAGnC,eAAe;CAClB,CAAC;AAEF,eAAe,MAAM,CAAC","sourcesContent":["import styled from \"styled-components\";\nimport { Colors } from \"../foundations\";\nimport { InputValidation } from \"./shared\";\n\nconst Select = styled.select`\n padding: 12px 16px;\n background-color: ${Colors.base.white};\n border-radius: 6px;\n\n ${InputValidation}\n`;\n\nexport default Select;\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Dropdown.js","sourceRoot":"","sources":["../../../core/molecules/Dropdown.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAe,MAAM,gBAAgB,CAAC;AAU7C,MAAM,QAAQ,GAAG,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,GAAG,WAAW,EAAiB,EAAE,EAAE,CAAC,CAC7E,MAAC,MAAM,OAAK,WAAW,aACrB,iBAAQ,MAAM,QAAC,QAAQ,QAAC,KAAK,EAAC,EAAE,YAC7B,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,GAC3B,EAER,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CACvB,iBAA2B,KAAK,EAAE,MAAM,CAAC,KAAK,YAC3C,MAAM,CAAC,KAAK,IADF,MAAM,CAAC,KAAK,CAEhB,CACV,CAAC,IACK,CACV,CAAC;AAEF,eAAe,QAAQ,CAAC","sourcesContent":["import type { DetailedHTMLProps, SelectHTMLAttributes } from \"react\";\nimport { Select } from \"../atoms\";\nimport { type Option } from \"../foundations\";\n\nexport type DropdownProps = {\n options: Option[];\n defaultLabel?: string;\n} & DetailedHTMLProps<\n SelectHTMLAttributes<HTMLSelectElement>,\n HTMLSelectElement\n>;\n\nconst Dropdown = ({ options, defaultLabel, ...selectProps }: DropdownProps) => (\n <Select {...selectProps}>\n <option hidden disabled value=\"\">\n {defaultLabel ? defaultLabel : \"-\"}\n </option>\n\n {options.map((option) => (\n <option key={option.value} value={option.value}>\n {option.label}\n </option>\n ))}\n </Select>\n);\n\nexport default Dropdown;\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Dropdown.stories.js","sourceRoot":"","sources":["../../../stories/molecules/Dropdown.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAsB,MAAM,KAAK,CAAC;AACrE,OAAO,EAAE,IAAI,EAAE,MAAM,gCAAgC,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAE3D,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAMjC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{ parseEnum } from \"@grantbii/ui-core/shared/enums\";\nimport type { Meta, StoryObj } from \"@storybook/nextjs-vite\";\nimport { useState } from \"react\";\n\ntype ExampleProps = {\n controlled: boolean;\n};\n\nconst DropdownExample = ({ controlled }: ExampleProps) => {\n const [selectedNeed, setSelectedNeed] = useState(Need.UNKNOWN);\n\n const controlledProps: DropdownProps = {\n ...baseProps,\n value: selectedNeed === Need.UNKNOWN ? \"\" : selectedNeed,\n onChange: (event) => setSelectedNeed(parseEnum(event.target.value, Need)),\n };\n\n return <Dropdown {...(controlled ? controlledProps : uncontrolledProps)} />;\n};\n\nconst baseProps: DropdownProps = {\n options: mapEnumToOptions(Need),\n defaultLabel: \"Select your grant need\",\n};\n\nconst uncontrolledProps: DropdownProps = {\n ...baseProps,\n defaultValue: \"\",\n};\n\nconst meta: Meta<typeof DropdownExample> = {\n title: \"Molecules/Dropdown\",\n component: DropdownExample,\n tags: [\"autodocs\"],\n parameters: {\n layout: \"centered\",\n },\n};\n\nexport default meta;\n\ntype Story = StoryObj<typeof meta>;\n\nexport const Controlled: Story = {\n args: {\n controlled: true,\n },\n};\n\nexport const Uncontrolled: Story = {\n args: {\n controlled: false,\n },\n};\n"]}
|
|
File without changes
|
|
File without changes
|