@bikdotai/bik-component-library 0.0.536-beta.tp-2 → 0.0.536-beta.tp-3
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,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../../assets/icons/delete.svg.js"),n=require("../../../assets/icons/PlusIcon.js"),s=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../../assets/icons/delete.svg.js"),n=require("../../../assets/icons/PlusIcon.js"),s=require("react"),a=require("styled-components"),o=require("../../button/Button.js"),i=require("../../checkBox/CheckBox.js"),r=require("../../icon-button/IconButton.js"),u=require("../../input/Input.js"),c=require("../../../constants/Theme.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const d=l(a).default.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 12px;
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
justify-content: center;
|
|
9
9
|
padding: 10px;
|
|
10
10
|
}
|
|
11
|
-
`;exports.QueryParamsComponent=
|
|
11
|
+
`;exports.QueryParamsComponent=a=>{const{params:l,onChange:p}=a,[x,j]=s.useState(l.length>0),[h,g]=s.useState(l);return e.jsxs(d,{children:[e.jsx(i.CheckBox,{isChecked:x,label:"Add custom query params",onValueChange:e=>{g([]),p([]),j(e)}}),x&&h.map(((n,s)=>e.jsxs("div",Object.assign({style:{display:"flex",gap:"4px"}},{children:[e.jsx(u.Input,{placeholder:"Key",value:n.key,onChangeText:e=>{const t=h.map(((t,n)=>n===s?Object.assign(Object.assign({},t),{key:e}):t));p(t)}}),e.jsx(u.Input,{placeholder:"Value",value:n.value,onChangeText:e=>{const t=h.map(((t,n)=>n===s?Object.assign(Object.assign({},t),{value:e}):t));p(t)}}),e.jsx(r.IconButton,{Icon:t.default,width:20,height:20,onClick:()=>{const e=h.filter(((e,t)=>t!=s));g(e),p(e)}})]}),s))),x&&l.length<10&&e.jsx(o.Button,{buttonText:"Add Params",buttonType:"dashRegular",style:{display:"flex",alignItems:"center",justifyContent:"center"},IconComponent:()=>e.jsx("div",Object.assign({style:{display:"flex",alignItems:"center",justifyContent:"center",width:"20px",height:"20px"}},{children:e.jsx(n.default,{width:16,height:16,color:c.COLORS.content.primary})})),onClick:()=>{const e=[...h,{key:"",value:""}];g(e),p(e)}})]})};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as e,jsx as t}from"react/jsx-runtime";import n from"../../../assets/icons/delete.svg.js";import o from"../../../assets/icons/PlusIcon.js";import{useState as s}from"react";import i from"styled-components";import{Button as
|
|
1
|
+
import{jsxs as e,jsx as t}from"react/jsx-runtime";import n from"../../../assets/icons/delete.svg.js";import o from"../../../assets/icons/PlusIcon.js";import{useState as s}from"react";import i from"styled-components";import{Button as a}from"../../button/Button.js";import{CheckBox as r}from"../../checkBox/CheckBox.js";import{IconButton as c}from"../../icon-button/IconButton.js";import{Input as l}from"../../input/Input.js";import{COLORS as p}from"../../../constants/Theme.js";const m=i=>{const{params:m,onChange:u}=i,[h,g]=s(m.length>0),[f,y]=s(m);return e(d,{children:[t(r,{isChecked:h,label:"Add custom query params",onValueChange:e=>{y([]),u([]),g(e)}}),h&&f.map(((o,s)=>e("div",Object.assign({style:{display:"flex",gap:"4px"}},{children:[t(l,{placeholder:"Key",value:o.key,onChangeText:e=>{const t=f.map(((t,n)=>n===s?Object.assign(Object.assign({},t),{key:e}):t));u(t)}}),t(l,{placeholder:"Value",value:o.value,onChangeText:e=>{const t=f.map(((t,n)=>n===s?Object.assign(Object.assign({},t),{value:e}):t));u(t)}}),t(c,{Icon:n,width:20,height:20,onClick:()=>{const e=f.filter(((e,t)=>t!=s));y(e),u(e)}})]}),s))),h&&m.length<10&&t(a,{buttonText:"Add Params",buttonType:"dashRegular",style:{display:"flex",alignItems:"center",justifyContent:"center"},IconComponent:()=>t("div",Object.assign({style:{display:"flex",alignItems:"center",justifyContent:"center",width:"20px",height:"20px"}},{children:t(o,{width:16,height:16,color:p.content.primary})})),onClick:()=>{const e=[...f,{key:"",value:""}];y(e),u(e)}})]})},d=i.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 12px;
|