@granto-umbrella/umbrella-components 2.3.15 → 2.3.17
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/dist/umbrella-components.es.js +12 -8
- package/dist/umbrella-components.umd.js +3 -3
- package/package.json +1 -1
- package/src/components/atoms/Switch/Switch.styles.ts +2 -0
- package/src/components/atoms/Switch/Switch.tsx +8 -1
- package/src/components/atoms/Textarea/Textarea.styles.ts +2 -2
- package/src/components/atoms/Textarea/Textarea.tsx +7 -1
- package/src/components/atoms/Textarea/Textarea.types.ts +1 -0
|
@@ -88537,7 +88537,7 @@ const oEt = J.div`
|
|
|
88537
88537
|
`, AEt = J.textarea`
|
|
88538
88538
|
display: flex;
|
|
88539
88539
|
padding: ${_.global.padding.md};
|
|
88540
|
-
font-size: ${O0.fontSizes.
|
|
88540
|
+
font-size: ${O0.fontSizes.bodyM};
|
|
88541
88541
|
color: ${F.base.text};
|
|
88542
88542
|
background: ${F.base.background};
|
|
88543
88543
|
border: 1px solid ${F.neutral[300]};
|
|
@@ -88557,7 +88557,7 @@ const oEt = J.div`
|
|
|
88557
88557
|
|
|
88558
88558
|
&:disabled {
|
|
88559
88559
|
color: ${F.global.text.onSurface.enabled};
|
|
88560
|
-
background-color: ${F.neutral[
|
|
88560
|
+
background-color: ${F.neutral[200]};
|
|
88561
88561
|
cursor: not-allowed;
|
|
88562
88562
|
}
|
|
88563
88563
|
`, ZEt = J.span`
|
|
@@ -88565,13 +88565,17 @@ const oEt = J.div`
|
|
|
88565
88565
|
color: ${F.neutral[400]};
|
|
88566
88566
|
`, VCt = ({
|
|
88567
88567
|
label: a,
|
|
88568
|
-
|
|
88569
|
-
|
|
88570
|
-
|
|
88568
|
+
info: e,
|
|
88569
|
+
supportingText: t,
|
|
88570
|
+
testId: l,
|
|
88571
|
+
...c
|
|
88571
88572
|
}) => /* @__PURE__ */ L.jsxs(vEt, { children: [
|
|
88572
|
-
a && /* @__PURE__ */ L.
|
|
88573
|
-
|
|
88574
|
-
|
|
88573
|
+
a && /* @__PURE__ */ L.jsxs(fEt, { children: [
|
|
88574
|
+
a,
|
|
88575
|
+
e
|
|
88576
|
+
] }),
|
|
88577
|
+
/* @__PURE__ */ L.jsx(AEt, { "data-testid": l, ...c }),
|
|
88578
|
+
t && /* @__PURE__ */ L.jsx(ZEt, { children: t })
|
|
88575
88579
|
] }), dEt = J.div`
|
|
88576
88580
|
display: flex;
|
|
88577
88581
|
flex-direction: ${({ $orientation: a }) => a === "vertical" ? "column" : "row"};
|
|
@@ -619,7 +619,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
619
619
|
`,bMr=U.textarea`
|
|
620
620
|
display: flex;
|
|
621
621
|
padding: ${W.global.padding.md};
|
|
622
|
-
font-size: ${v0.fontSizes.
|
|
622
|
+
font-size: ${v0.fontSizes.bodyM};
|
|
623
623
|
color: ${C.base.text};
|
|
624
624
|
background: ${C.base.background};
|
|
625
625
|
border: 1px solid ${C.neutral[300]};
|
|
@@ -639,13 +639,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
639
639
|
|
|
640
640
|
&:disabled {
|
|
641
641
|
color: ${C.global.text.onSurface.enabled};
|
|
642
|
-
background-color: ${C.neutral[
|
|
642
|
+
background-color: ${C.neutral[200]};
|
|
643
643
|
cursor: not-allowed;
|
|
644
644
|
}
|
|
645
645
|
`,vMr=U.span`
|
|
646
646
|
font-size: ${v0.fontSizes.labelS};
|
|
647
647
|
color: ${C.neutral[400]};
|
|
648
|
-
`,dMr=({label:t,
|
|
648
|
+
`,dMr=({label:t,info:e,supportingText:r,testId:l,...n})=>L.jsxs(fMr,{children:[t&&L.jsxs(hMr,{children:[t,e]}),L.jsx(bMr,{"data-testid":l,...n}),r&&L.jsx(vMr,{children:r})]}),AMr=U.div`
|
|
649
649
|
display: flex;
|
|
650
650
|
flex-direction: ${({$orientation:t})=>t==="vertical"?"column":"row"};
|
|
651
651
|
gap: ${W.global.gap.md};
|
package/package.json
CHANGED
|
@@ -4,13 +4,20 @@ import { SwitchWrapper, SwitchInput, SwitchLabel } from "./Switch.styles";
|
|
|
4
4
|
interface SwitchProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
5
5
|
label?: string;
|
|
6
6
|
testId?: string;
|
|
7
|
+
text?: string;
|
|
7
8
|
}
|
|
8
9
|
|
|
9
|
-
export const Switch: React.FC<SwitchProps> = ({
|
|
10
|
+
export const Switch: React.FC<SwitchProps> = ({
|
|
11
|
+
label,
|
|
12
|
+
text,
|
|
13
|
+
testId,
|
|
14
|
+
...props
|
|
15
|
+
}) => {
|
|
10
16
|
return (
|
|
11
17
|
<SwitchWrapper>
|
|
12
18
|
{label && <SwitchLabel>{label}</SwitchLabel>}
|
|
13
19
|
<SwitchInput data-testid={testId} {...props} />
|
|
20
|
+
{text && <SwitchLabel>{text}</SwitchLabel>}
|
|
14
21
|
</SwitchWrapper>
|
|
15
22
|
);
|
|
16
23
|
};
|
|
@@ -22,7 +22,7 @@ export const Label = styled.label`
|
|
|
22
22
|
export const StyledTextarea = styled.textarea`
|
|
23
23
|
display: flex;
|
|
24
24
|
padding: ${semanticSizes.global.padding.md};
|
|
25
|
-
font-size: ${typographyTokens.fontSizes.
|
|
25
|
+
font-size: ${typographyTokens.fontSizes.bodyM};
|
|
26
26
|
color: ${semanticColors.base.text};
|
|
27
27
|
background: ${semanticColors.base.background};
|
|
28
28
|
border: 1px solid ${semanticColors.neutral[300]};
|
|
@@ -42,7 +42,7 @@ export const StyledTextarea = styled.textarea`
|
|
|
42
42
|
|
|
43
43
|
&:disabled {
|
|
44
44
|
color: ${semanticColors.global.text.onSurface.enabled};
|
|
45
|
-
background-color: ${semanticColors.neutral[
|
|
45
|
+
background-color: ${semanticColors.neutral[200]};
|
|
46
46
|
cursor: not-allowed;
|
|
47
47
|
}
|
|
48
48
|
`;
|
|
@@ -9,13 +9,19 @@ import {
|
|
|
9
9
|
|
|
10
10
|
const Textarea: React.FC<TextareaProps> = ({
|
|
11
11
|
label,
|
|
12
|
+
info,
|
|
12
13
|
supportingText,
|
|
13
14
|
testId,
|
|
14
15
|
...props
|
|
15
16
|
}) => {
|
|
16
17
|
return (
|
|
17
18
|
<TextareaWrapper>
|
|
18
|
-
{label &&
|
|
19
|
+
{label && (
|
|
20
|
+
<Label>
|
|
21
|
+
{label}
|
|
22
|
+
{info}
|
|
23
|
+
</Label>
|
|
24
|
+
)}
|
|
19
25
|
<StyledTextarea data-testid={testId} {...props} />
|
|
20
26
|
{supportingText && <SupportingText>{supportingText}</SupportingText>}
|
|
21
27
|
</TextareaWrapper>
|