@granto-umbrella/umbrella-components 2.3.16 → 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.
@@ -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.bodyS};
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[100]};
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
- supportingText: e,
88569
- testId: t,
88570
- ...l
88568
+ info: e,
88569
+ supportingText: t,
88570
+ testId: l,
88571
+ ...c
88571
88572
  }) => /* @__PURE__ */ L.jsxs(vEt, { children: [
88572
- a && /* @__PURE__ */ L.jsx(fEt, { children: a }),
88573
- /* @__PURE__ */ L.jsx(AEt, { "data-testid": t, ...l }),
88574
- e && /* @__PURE__ */ L.jsx(ZEt, { children: e })
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.bodyS};
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[100]};
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,supportingText:e,testId:r,...l})=>L.jsxs(fMr,{children:[t&&L.jsx(hMr,{children:t}),L.jsx(bMr,{"data-testid":r,...l}),e&&L.jsx(vMr,{children:e})]}),AMr=U.div`
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@granto-umbrella/umbrella-components",
3
- "version": "2.3.16",
3
+ "version": "2.3.17",
4
4
  "description": "Umbrella Components for React",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -8,6 +8,8 @@ import {
8
8
 
9
9
  export const SwitchWrapper = styled.label`
10
10
  display: flex;
11
+ flex-direction: row;
12
+ width: 100%;
11
13
  align-items: center;
12
14
  gap: ${semanticSizes.global.gap.sm};
13
15
  cursor: pointer;
@@ -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> = ({ label, testId, ...props }) => {
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
  };