@ayseaistudio/ui-components 3.11.4 → 3.11.5

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,10 +1,11 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import PropTypes from "prop-types";
3
- import { Label } from "../Label";
4
- import { Strikethrough } from "../Strikethrough";
3
+ import { Checkbox } from "../Checkbox/Checkbox";
4
+ import { Label } from "../Label/Label";
5
5
  import "./style.css";
6
+ import { IconCheck, IconX } from "@tabler/icons-react";
6
7
  export const CallCenterTasks = ({ status, className, strikethroughText = "Selamlaşma ve kendini tanıtma.", labelText, index = 1, }) => {
7
- return (_jsxs("div", { className: `call-center-tasks ${className}`, children: [_jsx("div", { className: "frame-5", "data-status": status, children: _jsx("div", { className: `frame-6 status-4-${status}` }) }), _jsx(Label, { bold: "on", className: "label-2", color: status === "warning" ? "galliano" : "black", size: "medium", spacing: "on", stroke: "off", text: labelText || index.toString(), version: "primary" }), _jsx("div", { className: `frame-7 status-5-${status}`, children: _jsx(Strikethrough, { className: "strikethrough-checkbox", color: "black", size: "medium", status: status === "default" ? "default" : "selected", text: strikethroughText }) })] }));
8
+ return (_jsxs("div", { className: `call-center-tasks ${className}`, children: [_jsx("div", { className: "frame-5", "data-status": status, children: _jsx("div", { className: `frame-6 status-4-${status}` }) }), _jsx(Label, { bold: "on", className: "label-2", color: status === "warning" ? "galliano" : "black", size: "medium", spacing: "on", stroke: "off", text: labelText || index.toString(), version: "primary" }), _jsx("div", { className: `frame-7 status-5-${status}`, children: _jsx(Checkbox, { className: "strikethrough-checkbox", color: status === "warning" ? "galliano" : "black", size: "medium", status: status === "default" ? "default" : "selected", text: strikethroughText, icon: status === "warning" ? _jsx(IconX, { size: 16, color: "rgba(241, 241, 241, 1)" }) : _jsx(IconCheck, { size: 16, color: "rgba(241, 241, 241, 1)" }) }) })] }));
8
9
  };
9
10
  CallCenterTasks.propTypes = {
10
11
  status: PropTypes.oneOf(["warning", "complete", "default"]),
@@ -23,7 +23,7 @@
23
23
  right: 5px;
24
24
  top: 0;
25
25
  bottom: 0;
26
- width: 1px;
26
+ width: 2px;
27
27
  background-image: repeating-linear-gradient(to bottom, #b0b0b0 0px, #b0b0b0 4px, transparent 4px, transparent 8px);
28
28
  }
29
29
 
@@ -46,14 +46,12 @@
46
46
 
47
47
  .call-center-tasks .label-2 {
48
48
  flex: 0 0 auto !important;
49
- width: 24px !important;
49
+
50
50
  }
51
51
 
52
52
  .call-center-tasks .divide-vertical-2 {
53
53
  height: 24px !important;
54
- left: unset !important;
55
54
  position: relative !important;
56
- top: unset !important;
57
55
  }
58
56
 
59
57
  .call-center-tasks .frame-7 {
@@ -74,6 +72,9 @@
74
72
  display: flex !important;
75
73
  flex: 0 0 auto !important;
76
74
  width: 100% !important;
75
+ background-color: transparent !important;
76
+ border: none !important;
77
+
77
78
  }
78
79
 
79
80
  .call-center-tasks .merhaba-iyi-g-nler-wrapper {
@@ -115,7 +116,7 @@
115
116
  width: 16px !important;
116
117
  }
117
118
 
118
- .call-center-tasks .status-4-warning {
119
+ .call-center-tasks .status-4-warning .field {
119
120
  background-color: #d7af1b;
120
121
  }
121
122
 
@@ -151,5 +152,5 @@
151
152
  }
152
153
 
153
154
  .call-center-tasks .frame-7.status-5-default .merhaba-iyi-g-nler {
154
- color: rgba(136, 136, 136, 1);
155
+ color: #5d5d5d;
155
156
  }
@@ -1,4 +1,5 @@
1
1
  import PropTypes from "prop-types";
2
+ import { type ReactNode } from "react";
2
3
  import "./style.css";
3
4
  interface Props {
4
5
  text?: string;
@@ -7,16 +8,18 @@ interface Props {
7
8
  color?: "mauve" | "lime" | "black" | "blue" | "galliano" | "red";
8
9
  className?: string;
9
10
  fieldClassName?: string;
11
+ icon?: ReactNode;
10
12
  onClick?: () => void;
11
13
  onChange?: () => void;
12
14
  }
13
15
  export declare const Checkbox: {
14
- ({ text, size, status, color, className, fieldClassName, onClick, onChange, }: Props): React.JSX.Element;
16
+ ({ text, size, status, color, className, fieldClassName, icon, onClick, onChange, }: Props): React.JSX.Element;
15
17
  propTypes: {
16
18
  text: PropTypes.Requireable<string>;
17
19
  size: PropTypes.Requireable<string>;
18
20
  status: PropTypes.Requireable<string>;
19
21
  color: PropTypes.Requireable<string>;
22
+ icon: PropTypes.Requireable<PropTypes.ReactNodeLike>;
20
23
  };
21
24
  };
22
25
  export {};
@@ -1,9 +1,9 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import PropTypes from "prop-types";
3
3
  import { useReducer, useEffect } from "react";
4
4
  import "./style.css";
5
5
  import { IconCheck } from "@tabler/icons-react";
6
- export const Checkbox = ({ text, size, status, color, className = "", fieldClassName = "", onClick, onChange, }) => {
6
+ export const Checkbox = ({ text, size, status, color, className = "", fieldClassName = "", icon, onClick, onChange, }) => {
7
7
  const [state, dispatch] = useReducer(reducer, {
8
8
  size: size ?? "large",
9
9
  status: status ?? "default",
@@ -25,11 +25,11 @@ export const Checkbox = ({ text, size, status, color, className = "", fieldClass
25
25
  }
26
26
  onClick?.();
27
27
  onChange?.();
28
- }, children: [_jsx("div", { className: `field ${fieldClassName}`, children: state.status === "selected" && (_jsx(IconCheck, { className: state.size === "large"
29
- ? "class"
30
- : state.size === "x-small"
31
- ? "class-2"
32
- : "class-3", color: ["lime", "mauve"].includes(state.color) ? "#3D3D3D" : "#F1F1F1" })) }), text && _jsx("div", { className: "text", children: text })] }));
28
+ }, children: [_jsx("div", { className: `field ${fieldClassName}`, children: state.status === "selected" && (_jsx(_Fragment, { children: icon ?? (_jsx(IconCheck, { className: state.size === "large"
29
+ ? "class"
30
+ : state.size === "x-small"
31
+ ? "class-2"
32
+ : "class-3", color: ["lime", "mauve"].includes(state.color) ? "#3D3D3D" : "#F1F1F1" })) })) }), text && _jsx("div", { className: "text", children: text })] }));
33
33
  };
34
34
  function reducer(state, action) {
35
35
  if (typeof action === "object" && action.type === "sync") {
@@ -51,4 +51,5 @@ Checkbox.propTypes = {
51
51
  size: PropTypes.oneOf(["large", "x-small", "medium", "small"]),
52
52
  status: PropTypes.oneOf(["default", "selected", "hover"]),
53
53
  color: PropTypes.oneOf(["mauve", "lime", "black", "blue", "galliano", "red"]),
54
+ icon: PropTypes.node,
54
55
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ayseaistudio/ui-components",
3
- "version": "3.11.4",
3
+ "version": "3.11.5",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",