@bds-web/ui 1.0.0 → 1.2.0

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.
@@ -9,7 +9,7 @@ export const Button = styled.button `
9
9
  ${({ $buttonType }) => getStyle($buttonType)};
10
10
  height: ${({ $buttonSize }) => getSize($buttonSize)};
11
11
  padding: 12px ${({ $buttonSize }) => getSize($buttonSize)};
12
- border-radius: ${shapes.medium};
12
+ border-radius: ${shapes.small};
13
13
  display: flex;
14
14
  align-items: center;
15
15
  justify-content: center;
@@ -16,11 +16,11 @@ const bg = {
16
16
  danger: colors.red.dark,
17
17
  },
18
18
  disabled: {
19
- primary: colors.greyScale[40],
20
- secondary: colors.greyScale[40],
19
+ primary: colors.greyScale[20],
20
+ secondary: colors.greyScale[20],
21
21
  ghost: "transparent",
22
22
  text: "transparent",
23
- danger: colors.greyScale[40],
23
+ danger: colors.greyScale[20],
24
24
  },
25
25
  };
26
26
  const text = {
@@ -39,11 +39,11 @@ const text = {
39
39
  danger: colors.static.white,
40
40
  },
41
41
  disabled: {
42
- primary: colors.greyScale[50],
43
- secondary: colors.greyScale[50],
42
+ primary: colors.greyScale[10],
43
+ secondary: colors.greyScale[10],
44
44
  ghost: colors.greyScale[20],
45
45
  text: colors.greyScale[20],
46
- danger: colors.greyScale[50],
46
+ danger: colors.greyScale[10],
47
47
  },
48
48
  };
49
49
  const border = {
@@ -0,0 +1,2 @@
1
+ export * from "./ui";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/CheckIcon/index.ts"],"names":[],"mappings":"AAAA,cAAc,MAAM,CAAC"}
@@ -0,0 +1 @@
1
+ export * from "./ui";
@@ -0,0 +1,6 @@
1
+ interface Props {
2
+ size: number;
3
+ }
4
+ export declare const CheckIcon: ({ size }: Props) => import("react/jsx-runtime").JSX.Element;
5
+ export {};
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/CheckIcon/ui/index.tsx"],"names":[],"mappings":"AAEA,UAAU,KAAK;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,SAAS,GAAI,UAAU,KAAK,4CAcxC,CAAC"}
@@ -0,0 +1,5 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ export const CheckIcon = ({ size }) => {
4
+ return (_jsx("svg", { width: size * (11 / 20), height: size * (8 / 20), viewBox: "0 0 11 8", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M3.5625 7.51562L0 3.95313L0.890625 3.0625L3.5625 5.73437L9.29688 0L10.1875 0.890625L3.5625 7.51562Z", fill: "white" }) }));
5
+ };
@@ -0,0 +1,3 @@
1
+ export * from "./ui";
2
+ export * from "./types/props";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Checkbox/index.ts"],"names":[],"mappings":"AAAA,cAAc,MAAM,CAAC;AACrB,cAAc,eAAe,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./ui";
2
+ export * from "./types/props";
@@ -0,0 +1,6 @@
1
+ export interface CheckboxProps {
2
+ checked: boolean;
3
+ onChange: (checked: boolean) => void;
4
+ size?: number;
5
+ }
6
+ //# sourceMappingURL=props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/Checkbox/types/props.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ import { CheckboxProps } from "../types/props";
2
+ export declare const Checkbox: ({ checked, onChange, size }: CheckboxProps) => import("react/jsx-runtime").JSX.Element;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Checkbox/ui/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAG/C,eAAO,MAAM,QAAQ,GAAI,6BAAkC,aAAa,4CASvE,CAAC"}
@@ -0,0 +1,7 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { CheckIcon } from "../../CheckIcon";
4
+ import * as S from "./style";
5
+ export const Checkbox = ({ checked, onChange, size = 20 }) => {
6
+ return (_jsx(S.Container, { "$size": size, "$checked": checked, onClick: () => onChange(!checked), children: checked && _jsx(CheckIcon, { size: size }) }));
7
+ };
@@ -0,0 +1,8 @@
1
+ export declare const Container: import("@emotion/styled").StyledComponent<{
2
+ theme?: import("@emotion/react").Theme;
3
+ as?: React.ElementType;
4
+ } & {
5
+ $size: number;
6
+ $checked: boolean;
7
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
8
+ //# sourceMappingURL=style.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../src/Checkbox/ui/style.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,SAAS;;;;WAAuB,MAAM;cAAY,OAAO;yGAUrE,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { colors } from "@bds-web/colors";
2
+ import { shapes } from "@bds-web/shapes";
3
+ import styled from "@emotion/styled";
4
+ export const Container = styled.div `
5
+ width: ${({ $size }) => $size}px;
6
+ height: ${({ $size }) => $size}px;
7
+ border: 1px solid ${colors.blue.light};
8
+ border-radius: ${shapes.small};
9
+ background-color: ${({ $checked }) => $checked ? colors.blue.light : "transparent"};
10
+ cursor: pointer;
11
+ display: flex;
12
+ align-items: center;
13
+ justify-content: center;
14
+ `;
@@ -52,7 +52,7 @@ export const ModalHeader = styled.div `
52
52
  display: flex;
53
53
  justify-content: space-between;
54
54
  align-items: center;
55
- margin-bottom: 10px;
55
+ margin-bottom: 16px;
56
56
  `;
57
57
  export const ModalTitle = styled.h2 `
58
58
  ${typoCss("Accent")};
package/dist/index.d.ts CHANGED
@@ -3,4 +3,5 @@ export * from "./Button";
3
3
  export * from "./TextInput";
4
4
  export * from "./Modal";
5
5
  export * from "./Dropdown";
6
+ export * from "./Checkbox";
6
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC"}
package/dist/index.js CHANGED
@@ -3,3 +3,4 @@ export * from "./Button";
3
3
  export * from "./TextInput";
4
4
  export * from "./Modal";
5
5
  export * from "./Dropdown";
6
+ export * from "./Checkbox";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bds-web/ui",
3
- "version": "1.0.0",
3
+ "version": "1.2.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",