@sproutsocial/seeds-react-fieldset 1.0.0 → 1.0.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.
- package/.turbo/turbo-build.log +19 -19
- package/CHANGELOG.md +20 -0
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
yarn run v1.22.22
|
|
2
2
|
$ tsup --dts
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
Done in
|
|
3
|
+
[34mCLI[39m Building entry: src/index.ts
|
|
4
|
+
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
5
|
+
[34mCLI[39m tsup v8.5.0
|
|
6
|
+
[34mCLI[39m Using tsup config: /home/runner/work/seeds/seeds/seeds-react/seeds-react-fieldset/tsup.config.ts
|
|
7
|
+
[34mCLI[39m Target: es2022
|
|
8
|
+
[34mCLI[39m Cleaning output folder
|
|
9
|
+
[34mCJS[39m Build start
|
|
10
|
+
[34mESM[39m Build start
|
|
11
|
+
[32mCJS[39m [1mdist/index.js [22m[32m4.18 KB[39m
|
|
12
|
+
[32mCJS[39m [1mdist/index.js.map [22m[32m4.56 KB[39m
|
|
13
|
+
[32mCJS[39m ⚡️ Build success in 126ms
|
|
14
|
+
[32mESM[39m [1mdist/esm/index.js [22m[32m2.09 KB[39m
|
|
15
|
+
[32mESM[39m [1mdist/esm/index.js.map [22m[32m4.45 KB[39m
|
|
16
|
+
[32mESM[39m ⚡️ Build success in 126ms
|
|
17
|
+
[34mDTS[39m Build start
|
|
18
|
+
[32mDTS[39m ⚡️ Build success in 27872ms
|
|
19
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m1.30 KB[39m
|
|
20
|
+
[32mDTS[39m [1mdist/index.d.mts [22m[32m1.30 KB[39m
|
|
21
|
+
Done in 34.90s.
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @sproutsocial/seeds-react-fieldset
|
|
2
2
|
|
|
3
|
+
## 1.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [22e1111]
|
|
8
|
+
- @sproutsocial/seeds-react-text@1.3.2
|
|
9
|
+
- @sproutsocial/seeds-react-theme@3.0.1
|
|
10
|
+
- @sproutsocial/seeds-react-box@1.1.3
|
|
11
|
+
|
|
12
|
+
## 1.0.1
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- 9fd8bac: Update dependencies to use semantic package version instead of wildcards
|
|
17
|
+
- Updated dependencies [9fd8bac]
|
|
18
|
+
- @sproutsocial/seeds-react-system-props@3.0.2
|
|
19
|
+
- @sproutsocial/seeds-react-theme@2.2.1
|
|
20
|
+
- @sproutsocial/seeds-react-text@1.3.1
|
|
21
|
+
- @sproutsocial/seeds-react-box@1.1.2
|
|
22
|
+
|
|
3
23
|
## 1.0.0
|
|
4
24
|
|
|
5
25
|
### Major Changes
|
package/dist/esm/index.js
CHANGED
|
@@ -67,9 +67,9 @@ var Fieldset_default = Fieldset;
|
|
|
67
67
|
import "react";
|
|
68
68
|
|
|
69
69
|
// src/index.ts
|
|
70
|
-
var
|
|
70
|
+
var index_default = Fieldset_default;
|
|
71
71
|
export {
|
|
72
72
|
Fieldset_default as Fieldset,
|
|
73
|
-
|
|
73
|
+
index_default as default
|
|
74
74
|
};
|
|
75
75
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Fieldset.tsx","../../src/styles.ts","../../src/FieldsetTypes.ts","../../src/index.ts"],"sourcesContent":["import * as React from \"react\";\nimport Box from \"@sproutsocial/seeds-react-box\";\nimport Text from \"@sproutsocial/seeds-react-text\";\nimport { ChildContainer } from \"./styles\";\nimport type {\n TypeFieldsetProps,\n TypeFieldsetLegendProps,\n TypeFieldsetHelperText,\n} from \"./FieldsetTypes\";\n\n/**\n * Fieldset Component\n */\nconst Fieldset = ({\n layout = \"vertical\",\n label,\n helperText,\n children,\n ...rest\n}: TypeFieldsetProps) => (\n <Box as=\"fieldset\" border=\"none\" p={0} data-qa-fieldset=\"\" {...rest}>\n {typeof label === \"string\" ? (\n <Fieldset.Legend>{label}</Fieldset.Legend>\n ) : (\n label\n )}\n {typeof helperText === \"string\" ? (\n <Fieldset.HelperText>{helperText}</Fieldset.HelperText>\n ) : (\n helperText\n )}\n <Box\n display=\"flex\"\n flexDirection={layout === \"vertical\" ? \"column\" : \"row\"}\n >\n {React.Children.map(children, (child) => (\n <ChildContainer layout={layout}>{child}</ChildContainer>\n ))}\n </Box>\n </Box>\n);\n\nconst FieldsetLegend = ({ children, ...rest }: TypeFieldsetLegendProps) => (\n <Text\n as=\"legend\"\n fontSize={300}\n fontWeight=\"semibold\"\n color=\"text.body\"\n mb={300}\n {...rest}\n >\n {children}\n </Text>\n);\n\nconst FieldsetHelperText = ({ children, ...rest }: TypeFieldsetHelperText) => (\n <Text as=\"p\" fontSize={200} mb={300} {...rest}>\n {children}\n </Text>\n);\n\nFieldsetLegend.displayName = \"Fieldset.Legend\";\nFieldsetHelperText.displayName = \"Fieldset.HelperText\";\n\nFieldset.Legend = FieldsetLegend;\nFieldset.HelperText = FieldsetHelperText;\n\nexport default Fieldset;\n","import styled, { css } from \"styled-components\";\nimport type { TypeFieldsetChildContainerProps } from \"./FieldsetTypes\";\nimport Box from \"@sproutsocial/seeds-react-box\";\n\nexport const ChildContainer = styled(Box)<TypeFieldsetChildContainerProps>`\n ${(props) =>\n props.layout === \"vertical\" &&\n css`\n margin-top: ${props.theme.space[300]};\n\n &:first-child {\n margin-top: 0;\n }\n `}\n\n ${(props) =>\n props.layout === \"horizontal\" &&\n css`\n margin-left: ${props.theme.space[300]};\n\n &:first-child {\n margin-left: 0;\n }\n `}\n`;\n","import type { TypeTextProps } from \"@sproutsocial/seeds-react-text\";\nimport React from \"react\";\nimport type { TypeBoxProps } from \"@sproutsocial/seeds-react-box\";\n\nexport interface TypeFieldsetProps extends TypeBoxProps {\n /** Label text to display above the fieldset */\n label: React.ReactNode;\n helperText?: React.ReactNode;\n layout?: \"vertical\" | \"horizontal\";\n children: React.ReactNode;\n}\n\nexport interface TypeFieldsetChildContainerProps {\n layout: TypeFieldsetProps[\"layout\"];\n}\n\nexport interface TypeFieldsetLegendProps extends TypeTextProps {\n children: React.ReactNode;\n}\n\nexport interface TypeFieldsetHelperText extends TypeTextProps {\n children: React.ReactNode;\n}\n","import Fieldset from \"./Fieldset\";\n\nexport default Fieldset;\nexport { Fieldset };\nexport * from \"./FieldsetTypes\";\n"],"mappings":";AAAA,YAAY,WAAW;AACvB,OAAOA,UAAS;AAChB,OAAO,UAAU;;;ACFjB,OAAO,UAAU,WAAW;AAE5B,OAAO,SAAS;AAET,IAAM,iBAAiB,OAAO,GAAG;AAAA,IACpC,CAAC,UACD,MAAM,WAAW,cACjB;AAAA,oBACgB,MAAM,MAAM,MAAM,GAAG,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,KAKrC;AAAA;AAAA,IAED,CAAC,UACD,MAAM,WAAW,gBACjB;AAAA,qBACiB,MAAM,MAAM,MAAM,GAAG,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,KAKtC;AAAA;;;ADHH,SAEI,KAFJ;AAPF,IAAM,WAAW,CAAC;AAAA,EAChB,SAAS;AAAA,EACT;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MACE,qBAACC,MAAA,EAAI,IAAG,YAAW,QAAO,QAAO,GAAG,GAAG,oBAAiB,IAAI,GAAG,MAC5D;AAAA,SAAO,UAAU,WAChB,oBAAC,SAAS,QAAT,EAAiB,iBAAM,IAExB;AAAA,EAED,OAAO,eAAe,WACrB,oBAAC,SAAS,YAAT,EAAqB,sBAAW,IAEjC;AAAA,EAEF;AAAA,IAACA;AAAA,IAAA;AAAA,MACC,SAAQ;AAAA,MACR,eAAe,WAAW,aAAa,WAAW;AAAA,MAEjD,UAAM,eAAS,IAAI,UAAU,CAAC,UAC7B,oBAAC,kBAAe,QAAiB,iBAAM,CACxC;AAAA;AAAA,EACH;AAAA,GACF;AAGF,IAAM,iBAAiB,CAAC,EAAE,UAAU,GAAG,KAAK,MAC1C;AAAA,EAAC;AAAA;AAAA,IACC,IAAG;AAAA,IACH,UAAU;AAAA,IACV,YAAW;AAAA,IACX,OAAM;AAAA,IACN,IAAI;AAAA,IACH,GAAG;AAAA,IAEH;AAAA;AACH;AAGF,IAAM,qBAAqB,CAAC,EAAE,UAAU,GAAG,KAAK,MAC9C,oBAAC,QAAK,IAAG,KAAI,UAAU,KAAK,IAAI,KAAM,GAAG,MACtC,UACH;AAGF,eAAe,cAAc;AAC7B,mBAAmB,cAAc;AAEjC,SAAS,SAAS;AAClB,SAAS,aAAa;AAEtB,IAAO,mBAAQ;;;AElEf,OAAkB;;;ACClB,IAAO,
|
|
1
|
+
{"version":3,"sources":["../../src/Fieldset.tsx","../../src/styles.ts","../../src/FieldsetTypes.ts","../../src/index.ts"],"sourcesContent":["import * as React from \"react\";\nimport Box from \"@sproutsocial/seeds-react-box\";\nimport Text from \"@sproutsocial/seeds-react-text\";\nimport { ChildContainer } from \"./styles\";\nimport type {\n TypeFieldsetProps,\n TypeFieldsetLegendProps,\n TypeFieldsetHelperText,\n} from \"./FieldsetTypes\";\n\n/**\n * Fieldset Component\n */\nconst Fieldset = ({\n layout = \"vertical\",\n label,\n helperText,\n children,\n ...rest\n}: TypeFieldsetProps) => (\n <Box as=\"fieldset\" border=\"none\" p={0} data-qa-fieldset=\"\" {...rest}>\n {typeof label === \"string\" ? (\n <Fieldset.Legend>{label}</Fieldset.Legend>\n ) : (\n label\n )}\n {typeof helperText === \"string\" ? (\n <Fieldset.HelperText>{helperText}</Fieldset.HelperText>\n ) : (\n helperText\n )}\n <Box\n display=\"flex\"\n flexDirection={layout === \"vertical\" ? \"column\" : \"row\"}\n >\n {React.Children.map(children, (child) => (\n <ChildContainer layout={layout}>{child}</ChildContainer>\n ))}\n </Box>\n </Box>\n);\n\nconst FieldsetLegend = ({ children, ...rest }: TypeFieldsetLegendProps) => (\n <Text\n as=\"legend\"\n fontSize={300}\n fontWeight=\"semibold\"\n color=\"text.body\"\n mb={300}\n {...rest}\n >\n {children}\n </Text>\n);\n\nconst FieldsetHelperText = ({ children, ...rest }: TypeFieldsetHelperText) => (\n <Text as=\"p\" fontSize={200} mb={300} {...rest}>\n {children}\n </Text>\n);\n\nFieldsetLegend.displayName = \"Fieldset.Legend\";\nFieldsetHelperText.displayName = \"Fieldset.HelperText\";\n\nFieldset.Legend = FieldsetLegend;\nFieldset.HelperText = FieldsetHelperText;\n\nexport default Fieldset;\n","import styled, { css } from \"styled-components\";\nimport type { TypeFieldsetChildContainerProps } from \"./FieldsetTypes\";\nimport Box from \"@sproutsocial/seeds-react-box\";\n\nexport const ChildContainer = styled(Box)<TypeFieldsetChildContainerProps>`\n ${(props) =>\n props.layout === \"vertical\" &&\n css`\n margin-top: ${props.theme.space[300]};\n\n &:first-child {\n margin-top: 0;\n }\n `}\n\n ${(props) =>\n props.layout === \"horizontal\" &&\n css`\n margin-left: ${props.theme.space[300]};\n\n &:first-child {\n margin-left: 0;\n }\n `}\n`;\n","import type { TypeTextProps } from \"@sproutsocial/seeds-react-text\";\nimport React from \"react\";\nimport type { TypeBoxProps } from \"@sproutsocial/seeds-react-box\";\n\nexport interface TypeFieldsetProps extends TypeBoxProps {\n /** Label text to display above the fieldset */\n label: React.ReactNode;\n helperText?: React.ReactNode;\n layout?: \"vertical\" | \"horizontal\";\n children: React.ReactNode;\n}\n\nexport interface TypeFieldsetChildContainerProps {\n layout: TypeFieldsetProps[\"layout\"];\n}\n\nexport interface TypeFieldsetLegendProps extends TypeTextProps {\n children: React.ReactNode;\n}\n\nexport interface TypeFieldsetHelperText extends TypeTextProps {\n children: React.ReactNode;\n}\n","import Fieldset from \"./Fieldset\";\n\nexport default Fieldset;\nexport { Fieldset };\nexport * from \"./FieldsetTypes\";\n"],"mappings":";AAAA,YAAY,WAAW;AACvB,OAAOA,UAAS;AAChB,OAAO,UAAU;;;ACFjB,OAAO,UAAU,WAAW;AAE5B,OAAO,SAAS;AAET,IAAM,iBAAiB,OAAO,GAAG;AAAA,IACpC,CAAC,UACD,MAAM,WAAW,cACjB;AAAA,oBACgB,MAAM,MAAM,MAAM,GAAG,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,KAKrC;AAAA;AAAA,IAED,CAAC,UACD,MAAM,WAAW,gBACjB;AAAA,qBACiB,MAAM,MAAM,MAAM,GAAG,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,KAKtC;AAAA;;;ADHH,SAEI,KAFJ;AAPF,IAAM,WAAW,CAAC;AAAA,EAChB,SAAS;AAAA,EACT;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MACE,qBAACC,MAAA,EAAI,IAAG,YAAW,QAAO,QAAO,GAAG,GAAG,oBAAiB,IAAI,GAAG,MAC5D;AAAA,SAAO,UAAU,WAChB,oBAAC,SAAS,QAAT,EAAiB,iBAAM,IAExB;AAAA,EAED,OAAO,eAAe,WACrB,oBAAC,SAAS,YAAT,EAAqB,sBAAW,IAEjC;AAAA,EAEF;AAAA,IAACA;AAAA,IAAA;AAAA,MACC,SAAQ;AAAA,MACR,eAAe,WAAW,aAAa,WAAW;AAAA,MAEjD,UAAM,eAAS,IAAI,UAAU,CAAC,UAC7B,oBAAC,kBAAe,QAAiB,iBAAM,CACxC;AAAA;AAAA,EACH;AAAA,GACF;AAGF,IAAM,iBAAiB,CAAC,EAAE,UAAU,GAAG,KAAK,MAC1C;AAAA,EAAC;AAAA;AAAA,IACC,IAAG;AAAA,IACH,UAAU;AAAA,IACV,YAAW;AAAA,IACX,OAAM;AAAA,IACN,IAAI;AAAA,IACH,GAAG;AAAA,IAEH;AAAA;AACH;AAGF,IAAM,qBAAqB,CAAC,EAAE,UAAU,GAAG,KAAK,MAC9C,oBAAC,QAAK,IAAG,KAAI,UAAU,KAAK,IAAI,KAAM,GAAG,MACtC,UACH;AAGF,eAAe,cAAc;AAC7B,mBAAmB,cAAc;AAEjC,SAAS,SAAS;AAClB,SAAS,aAAa;AAEtB,IAAO,mBAAQ;;;AElEf,OAAkB;;;ACClB,IAAO,gBAAQ;","names":["Box","Box"]}
|
package/dist/index.js
CHANGED
|
@@ -28,12 +28,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
|
|
30
30
|
// src/index.ts
|
|
31
|
-
var
|
|
32
|
-
__export(
|
|
31
|
+
var index_exports = {};
|
|
32
|
+
__export(index_exports, {
|
|
33
33
|
Fieldset: () => Fieldset_default,
|
|
34
|
-
default: () =>
|
|
34
|
+
default: () => index_default
|
|
35
35
|
});
|
|
36
|
-
module.exports = __toCommonJS(
|
|
36
|
+
module.exports = __toCommonJS(index_exports);
|
|
37
37
|
|
|
38
38
|
// src/Fieldset.tsx
|
|
39
39
|
var React = __toESM(require("react"));
|
|
@@ -104,7 +104,7 @@ var Fieldset_default = Fieldset;
|
|
|
104
104
|
var import_react = require("react");
|
|
105
105
|
|
|
106
106
|
// src/index.ts
|
|
107
|
-
var
|
|
107
|
+
var index_default = Fieldset_default;
|
|
108
108
|
// Annotate the CommonJS export names for ESM import in node:
|
|
109
109
|
0 && (module.exports = {
|
|
110
110
|
Fieldset
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/Fieldset.tsx","../src/styles.ts","../src/FieldsetTypes.ts"],"sourcesContent":["import Fieldset from \"./Fieldset\";\n\nexport default Fieldset;\nexport { Fieldset };\nexport * from \"./FieldsetTypes\";\n","import * as React from \"react\";\nimport Box from \"@sproutsocial/seeds-react-box\";\nimport Text from \"@sproutsocial/seeds-react-text\";\nimport { ChildContainer } from \"./styles\";\nimport type {\n TypeFieldsetProps,\n TypeFieldsetLegendProps,\n TypeFieldsetHelperText,\n} from \"./FieldsetTypes\";\n\n/**\n * Fieldset Component\n */\nconst Fieldset = ({\n layout = \"vertical\",\n label,\n helperText,\n children,\n ...rest\n}: TypeFieldsetProps) => (\n <Box as=\"fieldset\" border=\"none\" p={0} data-qa-fieldset=\"\" {...rest}>\n {typeof label === \"string\" ? (\n <Fieldset.Legend>{label}</Fieldset.Legend>\n ) : (\n label\n )}\n {typeof helperText === \"string\" ? (\n <Fieldset.HelperText>{helperText}</Fieldset.HelperText>\n ) : (\n helperText\n )}\n <Box\n display=\"flex\"\n flexDirection={layout === \"vertical\" ? \"column\" : \"row\"}\n >\n {React.Children.map(children, (child) => (\n <ChildContainer layout={layout}>{child}</ChildContainer>\n ))}\n </Box>\n </Box>\n);\n\nconst FieldsetLegend = ({ children, ...rest }: TypeFieldsetLegendProps) => (\n <Text\n as=\"legend\"\n fontSize={300}\n fontWeight=\"semibold\"\n color=\"text.body\"\n mb={300}\n {...rest}\n >\n {children}\n </Text>\n);\n\nconst FieldsetHelperText = ({ children, ...rest }: TypeFieldsetHelperText) => (\n <Text as=\"p\" fontSize={200} mb={300} {...rest}>\n {children}\n </Text>\n);\n\nFieldsetLegend.displayName = \"Fieldset.Legend\";\nFieldsetHelperText.displayName = \"Fieldset.HelperText\";\n\nFieldset.Legend = FieldsetLegend;\nFieldset.HelperText = FieldsetHelperText;\n\nexport default Fieldset;\n","import styled, { css } from \"styled-components\";\nimport type { TypeFieldsetChildContainerProps } from \"./FieldsetTypes\";\nimport Box from \"@sproutsocial/seeds-react-box\";\n\nexport const ChildContainer = styled(Box)<TypeFieldsetChildContainerProps>`\n ${(props) =>\n props.layout === \"vertical\" &&\n css`\n margin-top: ${props.theme.space[300]};\n\n &:first-child {\n margin-top: 0;\n }\n `}\n\n ${(props) =>\n props.layout === \"horizontal\" &&\n css`\n margin-left: ${props.theme.space[300]};\n\n &:first-child {\n margin-left: 0;\n }\n `}\n`;\n","import type { TypeTextProps } from \"@sproutsocial/seeds-react-text\";\nimport React from \"react\";\nimport type { TypeBoxProps } from \"@sproutsocial/seeds-react-box\";\n\nexport interface TypeFieldsetProps extends TypeBoxProps {\n /** Label text to display above the fieldset */\n label: React.ReactNode;\n helperText?: React.ReactNode;\n layout?: \"vertical\" | \"horizontal\";\n children: React.ReactNode;\n}\n\nexport interface TypeFieldsetChildContainerProps {\n layout: TypeFieldsetProps[\"layout\"];\n}\n\nexport interface TypeFieldsetLegendProps extends TypeTextProps {\n children: React.ReactNode;\n}\n\nexport interface TypeFieldsetHelperText extends TypeTextProps {\n children: React.ReactNode;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,IAAAA,0BAAgB;AAChB,8BAAiB;;;ACFjB,+BAA4B;AAE5B,6BAAgB;AAET,IAAM,qBAAiB,yBAAAC,SAAO,uBAAAC,OAAG;AAAA,IACpC,CAAC,UACD,MAAM,WAAW,cACjB;AAAA,oBACgB,MAAM,MAAM,MAAM,GAAG,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,KAKrC;AAAA;AAAA,IAED,CAAC,UACD,MAAM,WAAW,gBACjB;AAAA,qBACiB,MAAM,MAAM,MAAM,GAAG,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,KAKtC;AAAA;;;ADHH;AAPF,IAAM,WAAW,CAAC;AAAA,EAChB,SAAS;AAAA,EACT;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MACE,6CAAC,wBAAAC,SAAA,EAAI,IAAG,YAAW,QAAO,QAAO,GAAG,GAAG,oBAAiB,IAAI,GAAG,MAC5D;AAAA,SAAO,UAAU,WAChB,4CAAC,SAAS,QAAT,EAAiB,iBAAM,IAExB;AAAA,EAED,OAAO,eAAe,WACrB,4CAAC,SAAS,YAAT,EAAqB,sBAAW,IAEjC;AAAA,EAEF;AAAA,IAAC,wBAAAA;AAAA,IAAA;AAAA,MACC,SAAQ;AAAA,MACR,eAAe,WAAW,aAAa,WAAW;AAAA,MAEjD,UAAM,eAAS,IAAI,UAAU,CAAC,UAC7B,4CAAC,kBAAe,QAAiB,iBAAM,CACxC;AAAA;AAAA,EACH;AAAA,GACF;AAGF,IAAM,iBAAiB,CAAC,EAAE,UAAU,GAAG,KAAK,MAC1C;AAAA,EAAC,wBAAAC;AAAA,EAAA;AAAA,IACC,IAAG;AAAA,IACH,UAAU;AAAA,IACV,YAAW;AAAA,IACX,OAAM;AAAA,IACN,IAAI;AAAA,IACH,GAAG;AAAA,IAEH;AAAA;AACH;AAGF,IAAM,qBAAqB,CAAC,EAAE,UAAU,GAAG,KAAK,MAC9C,4CAAC,wBAAAA,SAAA,EAAK,IAAG,KAAI,UAAU,KAAK,IAAI,KAAM,GAAG,MACtC,UACH;AAGF,eAAe,cAAc;AAC7B,mBAAmB,cAAc;AAEjC,SAAS,SAAS;AAClB,SAAS,aAAa;AAEtB,IAAO,mBAAQ;;;AElEf,mBAAkB;;;AHClB,IAAO,
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/Fieldset.tsx","../src/styles.ts","../src/FieldsetTypes.ts"],"sourcesContent":["import Fieldset from \"./Fieldset\";\n\nexport default Fieldset;\nexport { Fieldset };\nexport * from \"./FieldsetTypes\";\n","import * as React from \"react\";\nimport Box from \"@sproutsocial/seeds-react-box\";\nimport Text from \"@sproutsocial/seeds-react-text\";\nimport { ChildContainer } from \"./styles\";\nimport type {\n TypeFieldsetProps,\n TypeFieldsetLegendProps,\n TypeFieldsetHelperText,\n} from \"./FieldsetTypes\";\n\n/**\n * Fieldset Component\n */\nconst Fieldset = ({\n layout = \"vertical\",\n label,\n helperText,\n children,\n ...rest\n}: TypeFieldsetProps) => (\n <Box as=\"fieldset\" border=\"none\" p={0} data-qa-fieldset=\"\" {...rest}>\n {typeof label === \"string\" ? (\n <Fieldset.Legend>{label}</Fieldset.Legend>\n ) : (\n label\n )}\n {typeof helperText === \"string\" ? (\n <Fieldset.HelperText>{helperText}</Fieldset.HelperText>\n ) : (\n helperText\n )}\n <Box\n display=\"flex\"\n flexDirection={layout === \"vertical\" ? \"column\" : \"row\"}\n >\n {React.Children.map(children, (child) => (\n <ChildContainer layout={layout}>{child}</ChildContainer>\n ))}\n </Box>\n </Box>\n);\n\nconst FieldsetLegend = ({ children, ...rest }: TypeFieldsetLegendProps) => (\n <Text\n as=\"legend\"\n fontSize={300}\n fontWeight=\"semibold\"\n color=\"text.body\"\n mb={300}\n {...rest}\n >\n {children}\n </Text>\n);\n\nconst FieldsetHelperText = ({ children, ...rest }: TypeFieldsetHelperText) => (\n <Text as=\"p\" fontSize={200} mb={300} {...rest}>\n {children}\n </Text>\n);\n\nFieldsetLegend.displayName = \"Fieldset.Legend\";\nFieldsetHelperText.displayName = \"Fieldset.HelperText\";\n\nFieldset.Legend = FieldsetLegend;\nFieldset.HelperText = FieldsetHelperText;\n\nexport default Fieldset;\n","import styled, { css } from \"styled-components\";\nimport type { TypeFieldsetChildContainerProps } from \"./FieldsetTypes\";\nimport Box from \"@sproutsocial/seeds-react-box\";\n\nexport const ChildContainer = styled(Box)<TypeFieldsetChildContainerProps>`\n ${(props) =>\n props.layout === \"vertical\" &&\n css`\n margin-top: ${props.theme.space[300]};\n\n &:first-child {\n margin-top: 0;\n }\n `}\n\n ${(props) =>\n props.layout === \"horizontal\" &&\n css`\n margin-left: ${props.theme.space[300]};\n\n &:first-child {\n margin-left: 0;\n }\n `}\n`;\n","import type { TypeTextProps } from \"@sproutsocial/seeds-react-text\";\nimport React from \"react\";\nimport type { TypeBoxProps } from \"@sproutsocial/seeds-react-box\";\n\nexport interface TypeFieldsetProps extends TypeBoxProps {\n /** Label text to display above the fieldset */\n label: React.ReactNode;\n helperText?: React.ReactNode;\n layout?: \"vertical\" | \"horizontal\";\n children: React.ReactNode;\n}\n\nexport interface TypeFieldsetChildContainerProps {\n layout: TypeFieldsetProps[\"layout\"];\n}\n\nexport interface TypeFieldsetLegendProps extends TypeTextProps {\n children: React.ReactNode;\n}\n\nexport interface TypeFieldsetHelperText extends TypeTextProps {\n children: React.ReactNode;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,IAAAA,0BAAgB;AAChB,8BAAiB;;;ACFjB,+BAA4B;AAE5B,6BAAgB;AAET,IAAM,qBAAiB,yBAAAC,SAAO,uBAAAC,OAAG;AAAA,IACpC,CAAC,UACD,MAAM,WAAW,cACjB;AAAA,oBACgB,MAAM,MAAM,MAAM,GAAG,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,KAKrC;AAAA;AAAA,IAED,CAAC,UACD,MAAM,WAAW,gBACjB;AAAA,qBACiB,MAAM,MAAM,MAAM,GAAG,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,KAKtC;AAAA;;;ADHH;AAPF,IAAM,WAAW,CAAC;AAAA,EAChB,SAAS;AAAA,EACT;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MACE,6CAAC,wBAAAC,SAAA,EAAI,IAAG,YAAW,QAAO,QAAO,GAAG,GAAG,oBAAiB,IAAI,GAAG,MAC5D;AAAA,SAAO,UAAU,WAChB,4CAAC,SAAS,QAAT,EAAiB,iBAAM,IAExB;AAAA,EAED,OAAO,eAAe,WACrB,4CAAC,SAAS,YAAT,EAAqB,sBAAW,IAEjC;AAAA,EAEF;AAAA,IAAC,wBAAAA;AAAA,IAAA;AAAA,MACC,SAAQ;AAAA,MACR,eAAe,WAAW,aAAa,WAAW;AAAA,MAEjD,UAAM,eAAS,IAAI,UAAU,CAAC,UAC7B,4CAAC,kBAAe,QAAiB,iBAAM,CACxC;AAAA;AAAA,EACH;AAAA,GACF;AAGF,IAAM,iBAAiB,CAAC,EAAE,UAAU,GAAG,KAAK,MAC1C;AAAA,EAAC,wBAAAC;AAAA,EAAA;AAAA,IACC,IAAG;AAAA,IACH,UAAU;AAAA,IACV,YAAW;AAAA,IACX,OAAM;AAAA,IACN,IAAI;AAAA,IACH,GAAG;AAAA,IAEH;AAAA;AACH;AAGF,IAAM,qBAAqB,CAAC,EAAE,UAAU,GAAG,KAAK,MAC9C,4CAAC,wBAAAA,SAAA,EAAK,IAAG,KAAI,UAAU,KAAK,IAAI,KAAM,GAAG,MACtC,UACH;AAGF,eAAe,cAAc;AAC7B,mBAAmB,cAAc;AAEjC,SAAS,SAAS;AAClB,SAAS,aAAa;AAEtB,IAAO,mBAAQ;;;AElEf,mBAAkB;;;AHClB,IAAO,gBAAQ;","names":["import_seeds_react_box","styled","Box","Box","Text"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sproutsocial/seeds-react-fieldset",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Seeds React Fieldset",
|
|
5
5
|
"author": "Sprout Social, Inc.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
"test:watch": "jest --watch --coverage=false"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@sproutsocial/seeds-react-theme": "
|
|
22
|
-
"@sproutsocial/seeds-react-system-props": "
|
|
23
|
-
"@sproutsocial/seeds-react-box": "
|
|
24
|
-
"@sproutsocial/seeds-react-text": "
|
|
21
|
+
"@sproutsocial/seeds-react-theme": "^3.0.1",
|
|
22
|
+
"@sproutsocial/seeds-react-system-props": "^3.0.1",
|
|
23
|
+
"@sproutsocial/seeds-react-box": "^1.1.3",
|
|
24
|
+
"@sproutsocial/seeds-react-text": "^1.3.2"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/react": "^18.0.0",
|
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
"@sproutsocial/eslint-config-seeds": "*",
|
|
30
30
|
"react": "^18.0.0",
|
|
31
31
|
"styled-components": "^5.2.3",
|
|
32
|
-
"tsup": "^8.
|
|
32
|
+
"tsup": "^8.3.4",
|
|
33
33
|
"typescript": "^5.6.2",
|
|
34
34
|
"@sproutsocial/seeds-tsconfig": "*",
|
|
35
35
|
"@sproutsocial/seeds-testing": "*",
|
|
36
36
|
"@sproutsocial/seeds-react-testing-library": "*",
|
|
37
|
-
"@sproutsocial/seeds-react-radio": "
|
|
37
|
+
"@sproutsocial/seeds-react-radio": "^1.3.1"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"styled-components": "^5.2.3"
|