@grantbii/design-system 1.0.71 → 1.0.72

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.
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import styled from "styled-components";
4
- import { Colors, Icons } from "../foundations";
4
+ import { Colors, Icons, Responsive, Typography } from "../foundations";
5
5
  const Badge = ({ text, Icon, iconSize = 20, iconWeight = "regular", onClickClose, textWidthPixels, backgroundColor, color, }) => (_jsxs(BaseBadge, { "$backgroundColor": backgroundColor, "$color": color, children: [_jsxs(BadgeContent, { "$isCloseable": !!onClickClose, "$widthPixels": textWidthPixels, children: [Icon ? (_jsx(IconContainer, { children: _jsx(Icon, { color: color, size: iconSize, weight: iconWeight }) })) : (_jsx(_Fragment, {})), _jsx(BadgeText, { children: text })] }), onClickClose ? (_jsx(Button, { type: "button", onClick: onClickClose, children: _jsx(Icons.XIcon, { size: 12 }) })) : (_jsx(_Fragment, {}))] }));
6
6
  export default Badge;
7
7
  const BaseBadge = styled.div `
@@ -38,7 +38,14 @@ const BadgeText = styled.p `
38
38
  text-overflow: ellipsis;
39
39
 
40
40
  font-weight: 500;
41
- font-size: 14px;
41
+
42
+ @media (width < ${Responsive.WIDTH_BREAKPOINTS.laptop}) {
43
+ font-size: ${Typography.HELPER_FONT_SIZES.small};
44
+ }
45
+
46
+ @media (width >= ${Responsive.WIDTH_BREAKPOINTS.laptop}) {
47
+ font-size: ${Typography.HELPER_FONT_SIZES.big};
48
+ }
42
49
  `;
43
50
  const Button = styled.button `
44
51
  display: flex;
@@ -11,9 +11,9 @@ var __rest = (this && this.__rest) || function (s, e) {
11
11
  return t;
12
12
  };
13
13
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
14
- import { LabelInput } from "./shared";
14
+ import { LabelledInput } from "./shared";
15
15
  const Checkbox = (_a) => {
16
16
  var { id, label, labelBefore = false } = _a, checkboxProps = __rest(_a, ["id", "label", "labelBefore"]);
17
- return (_jsxs(LabelInput, { children: [labelBefore ? _jsx("label", { htmlFor: `${id}-checkbox`, children: label }) : _jsx(_Fragment, {}), _jsx("input", Object.assign({}, checkboxProps, { id: `${id}-checkbox`, type: "checkbox" })), labelBefore ? _jsx(_Fragment, {}) : _jsx("label", { htmlFor: `${id}-checkbox`, children: label })] }));
17
+ return (_jsxs(LabelledInput, { children: [labelBefore ? _jsx("label", { htmlFor: `${id}-checkbox`, children: label }) : _jsx(_Fragment, {}), _jsx("input", Object.assign({}, checkboxProps, { id: `${id}-checkbox`, type: "checkbox" })), labelBefore ? _jsx(_Fragment, {}) : _jsx("label", { htmlFor: `${id}-checkbox`, children: label })] }));
18
18
  };
19
19
  export default Checkbox;
@@ -11,9 +11,9 @@ var __rest = (this && this.__rest) || function (s, e) {
11
11
  return t;
12
12
  };
13
13
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
- import { LabelInput } from "./shared";
14
+ import { LabelledInput } from "./shared";
15
15
  const RadioButton = (_a) => {
16
16
  var { id, label } = _a, radioButtonProps = __rest(_a, ["id", "label"]);
17
- return (_jsxs(LabelInput, { children: [_jsx("input", Object.assign({}, radioButtonProps, { id: `${id}-radio-button`, type: "radio" })), _jsx("label", { htmlFor: `${id}-radio-button`, children: label })] }));
17
+ return (_jsxs(LabelledInput, { children: [_jsx("input", Object.assign({}, radioButtonProps, { id: `${id}-radio-button`, type: "radio" })), _jsx("label", { htmlFor: `${id}-radio-button`, children: label })] }));
18
18
  };
19
19
  export default RadioButton;
@@ -4,4 +4,4 @@ export declare const BaseButton: import("styled-components/dist/types").IStyledC
4
4
  $color?: string;
5
5
  $width?: string;
6
6
  }>> & string;
7
- export declare const LabelInput: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
7
+ export declare const LabelledInput: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
@@ -19,7 +19,7 @@ export const BaseButton = styled.div `
19
19
  color: ${({ $color = Colors.typography.whiteHigh }) => $color};
20
20
  background-color: ${({ $underline = false, $backgroundColor = Colors.main.grantbiiBlue, }) => ($underline ? "transparent" : $backgroundColor)};
21
21
  `;
22
- export const LabelInput = styled.div `
22
+ export const LabelledInput = styled.div `
23
23
  display: flex;
24
24
  align-items: center;
25
25
  gap: 8px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grantbii/design-system",
3
- "version": "1.0.71",
3
+ "version": "1.0.72",
4
4
  "description": "Grantbii's Design System",
5
5
  "homepage": "https://design.grantbii.com",
6
6
  "repository": {