@bikdotai/bik-component-library 0.0.388-beta.6 → 0.0.388-beta.7

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,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export declare const Menus: ({
2
3
  displayName: string;
3
4
  key: number;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),t=require("../../checkBox/CheckBox.js"),s=require("../../TypographyStyle.js"),a=require("../../input/Input.js");exports.BackTrackComponent=i=>{const{backTrackMessage:n,setBackTrackMessage:c}=i,[l,o]=r.useState(!1);return e.jsxs(e.Fragment,{children:[e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"row",marginLeft:10,marginTop:8}},{children:[e.jsx(t.CheckBox,{isChecked:l,onValueChange:()=>{l&&c&&c(""),o(!l)}}),e.jsx(s.TitleSmall,Object.assign({style:{marginLeft:8}},{children:"Prevent BackTracking"}))]})),l&&e.jsx("div",Object.assign({style:{margin:10}},{children:e.jsx(a.Input,{placeholder:"Enter your text here",labelText:"Message if user tries backtracking",onChangeText:e=>{c&&c(e)},height:"120px",value:n,noErrorHint:!0,validate:e=>[!0,""]})}))]})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),s=require("../../checkBox/CheckBox.js"),a=require("../../TypographyStyle.js"),t=require("../../input/Input.js");exports.BackTrackComponent=i=>{const{backTrackMessage:c,setBackTrackMessage:n}=i,[l,o]=r.useState(!!c);return console.log("vj: back",{backTrackMessage:c,isChecked:l}),e.jsxs(e.Fragment,{children:[e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"row",marginLeft:10,marginTop:8}},{children:[e.jsx(s.CheckBox,{isChecked:l,onValueChange:()=>{l&&n&&n(""),o(!l)}}),e.jsx(a.TitleSmall,Object.assign({style:{marginLeft:8}},{children:"Prevent BackTracking"}))]})),l&&e.jsx("div",Object.assign({style:{margin:10}},{children:e.jsx(t.Input,{placeholder:"Enter your text here",labelText:"Message if user tries backtracking",onChangeText:e=>{n&&n(e)},height:"120px",value:c,noErrorHint:!0,validate:e=>[!0,""]})}))]})};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("../../../assets/icons/PlusIcon.js"),a=require("react"),s=require("../../add-variableV2/AddVariableV2SideModal.js");require("../../../_virtual/_tslib.js"),require("../../add-variableV2/AddVariableV2.styled.js"),require("../../button/Button.js"),require("../../icon-button/IconButton.js");var i=require("../../input/Input.js");require("@tippyjs/react"),require("../../tooltips/TooltipInternal.js"),require("../../../constants/Theme.js"),require("../../switch/Switch.js");var t=require("../../TypographyStyle.js"),l=require("../../checkBox/CheckBox.js"),o=require("./VariableConnectorsPanel.js");exports.DiscountCodeComponent=d=>{const{discountCode:n,setDiscountCode:u,variableList:c}=d,[j,b]=a.useState(""),[h,v]=a.useState(!1),[x,g]=a.useState(!1),[p,V]=a.useState(!1),q=a.useRef(),f=a.useRef();return a.useEffect((()=>{console.log("vj: setDiscountCode",u,j),u&&u(n+j)}),[j]),e.jsxs(e.Fragment,{children:[e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"row",marginLeft:10,marginTop:8}},{children:[e.jsx(l.CheckBox,{isChecked:h,onValueChange:()=>{h&&u&&u(""),v(!h)}}),e.jsx(t.TitleSmall,Object.assign({style:{marginLeft:8}},{children:"Add discount code"}))]})),h&&e.jsxs("div",Object.assign({ref:q,style:{margin:10}},{children:[e.jsx(i.Input,{placeholder:"Enter your discount code",onChangeText:e=>{u&&u(e)},value:n,onFocus:()=>{g(!0)},onBlur:e=>{var r;"addVar"===(null===(r=e.relatedTarget)||void 0===r?void 0:r.id)?(q.current&&q.current.focus(),g(!0)):(g(!1),V(!1))},noErrorHint:!0,validate:e=>[!0,""]}),x&&e.jsx(o.AddVariableStyled,Object.assign({ref:f,id:"addVar",onClick:e=>{e.stopPropagation(),V(!0)}},{children:e.jsxs("div",Object.assign({className:"add"},{children:[e.jsx(r.default,{width:20,height:20,color:"white"}),e.jsx("div",Object.assign({className:"variable"},{children:"Add variable"}))]}))}))]})),p&&e.jsx(s.AddVariableV2SideModal,{zIndex:2e3,data:null!=c?c:[],showVariable:p,setShowVariable:V,variableValue:j,setVariableValue:b,placeholder:"Add a variable",customTrigger:e=>{b(e.actualValue),g(!1)}})]})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("../../../assets/icons/PlusIcon.js"),a=require("react"),s=require("../../add-variableV2/AddVariableV2SideModal.js");require("../../../_virtual/_tslib.js"),require("../../add-variableV2/AddVariableV2.styled.js"),require("../../button/Button.js"),require("../../icon-button/IconButton.js");var i=require("../../input/Input.js");require("@tippyjs/react"),require("../../tooltips/TooltipInternal.js"),require("../../../constants/Theme.js"),require("../../switch/Switch.js");var t=require("../../TypographyStyle.js"),l=require("../../checkBox/CheckBox.js"),o=require("./VariableConnectorsPanel.js");exports.DiscountCodeComponent=d=>{const{discountCode:n,setDiscountCode:u,variableList:c}=d,[j,b]=a.useState(""),[h,v]=a.useState(!!n),[x,g]=a.useState(!1),[p,V]=a.useState(!1),q=a.useRef(),f=a.useRef();return a.useEffect((()=>{console.log("vj: setDiscountCode",u,j),u&&u(n+j)}),[j]),e.jsxs(e.Fragment,{children:[e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"row",marginLeft:10,marginTop:8}},{children:[e.jsx(l.CheckBox,{isChecked:h,onValueChange:()=>{h&&u&&u(""),v(!h)}}),e.jsx(t.TitleSmall,Object.assign({style:{marginLeft:8}},{children:"Add discount code"}))]})),h&&e.jsxs("div",Object.assign({ref:q,style:{margin:10}},{children:[e.jsx(i.Input,{placeholder:"Enter your discount code",onChangeText:e=>{u&&u(e)},value:n,onFocus:()=>{g(!0)},onBlur:e=>{var r;"addVar"===(null===(r=e.relatedTarget)||void 0===r?void 0:r.id)?(q.current&&q.current.focus(),g(!0)):(g(!1),V(!1))},noErrorHint:!0,validate:e=>[!0,""]}),x&&e.jsx(o.AddVariableStyled,Object.assign({ref:f,id:"addVar",onClick:e=>{e.stopPropagation(),V(!0)}},{children:e.jsxs("div",Object.assign({className:"add"},{children:[e.jsx(r.default,{width:20,height:20,color:"white"}),e.jsx("div",Object.assign({className:"variable"},{children:"Add variable"}))]}))}))]})),p&&e.jsx(s.AddVariableV2SideModal,{zIndex:2e3,data:null!=c?c:[],showVariable:p,setShowVariable:V,variableValue:j,setVariableValue:b,placeholder:"Add a variable",customTrigger:e=>{b(e.actualValue),g(!1)}})]})};
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export declare const Menus: ({
2
3
  displayName: string;
3
4
  key: number;
@@ -1 +1 @@
1
- import{jsxs as e,Fragment as r,jsx as t}from"react/jsx-runtime";import{useState as i}from"react";import{CheckBox as a}from"../../checkBox/CheckBox.js";import{TitleSmall as n}from"../../TypographyStyle.js";import{Input as s}from"../../input/Input.js";const c=c=>{const{backTrackMessage:o,setBackTrackMessage:l}=c,[g,m]=i(!1);return e(r,{children:[e("div",Object.assign({style:{display:"flex",flexDirection:"row",marginLeft:10,marginTop:8}},{children:[t(a,{isChecked:g,onValueChange:()=>{g&&l&&l(""),m(!g)}}),t(n,Object.assign({style:{marginLeft:8}},{children:"Prevent BackTracking"}))]})),g&&t("div",Object.assign({style:{margin:10}},{children:t(s,{placeholder:"Enter your text here",labelText:"Message if user tries backtracking",onChangeText:e=>{l&&l(e)},height:"120px",value:o,noErrorHint:!0,validate:e=>[!0,""]})}))]})};export{c as BackTrackComponent};
1
+ import{jsxs as e,Fragment as r,jsx as t}from"react/jsx-runtime";import{useState as a}from"react";import{CheckBox as i}from"../../checkBox/CheckBox.js";import{TitleSmall as c}from"../../TypographyStyle.js";import{Input as s}from"../../input/Input.js";const n=n=>{const{backTrackMessage:o,setBackTrackMessage:l}=n,[g,h]=a(!!o);return console.log("vj: back",{backTrackMessage:o,isChecked:g}),e(r,{children:[e("div",Object.assign({style:{display:"flex",flexDirection:"row",marginLeft:10,marginTop:8}},{children:[t(i,{isChecked:g,onValueChange:()=>{g&&l&&l(""),h(!g)}}),t(c,Object.assign({style:{marginLeft:8}},{children:"Prevent BackTracking"}))]})),g&&t("div",Object.assign({style:{margin:10}},{children:t(s,{placeholder:"Enter your text here",labelText:"Message if user tries backtracking",onChangeText:e=>{l&&l(e)},height:"120px",value:o,noErrorHint:!0,validate:e=>[!0,""]})}))]})};export{n as BackTrackComponent};
@@ -1 +1 @@
1
- import{jsxs as e,Fragment as t,jsx as i}from"react/jsx-runtime";import o from"../../../assets/icons/PlusIcon.js";import{useState as r,useRef as a,useEffect as s}from"react";import{AddVariableV2SideModal as n}from"../../add-variableV2/AddVariableV2SideModal.js";import"../../../_virtual/_tslib.js";import"../../add-variableV2/AddVariableV2.styled.js";import"../../button/Button.js";import"../../icon-button/IconButton.js";import{Input as l}from"../../input/Input.js";import"@tippyjs/react";import"../../tooltips/TooltipInternal.js";import"../../../constants/Theme.js";import"../../switch/Switch.js";import{TitleSmall as d}from"../../TypographyStyle.js";import{CheckBox as c}from"../../checkBox/CheckBox.js";import{AddVariableStyled as m}from"./VariableConnectorsPanel.js";const p=p=>{const{discountCode:u,setDiscountCode:h,variableList:b}=p,[j,g]=r(""),[v,V]=r(!1),[f,y]=r(!1),[C,x]=r(!1),w=a(),T=a();return s((()=>{console.log("vj: setDiscountCode",h,j),h&&h(u+j)}),[j]),e(t,{children:[e("div",Object.assign({style:{display:"flex",flexDirection:"row",marginLeft:10,marginTop:8}},{children:[i(c,{isChecked:v,onValueChange:()=>{v&&h&&h(""),V(!v)}}),i(d,Object.assign({style:{marginLeft:8}},{children:"Add discount code"}))]})),v&&e("div",Object.assign({ref:w,style:{margin:10}},{children:[i(l,{placeholder:"Enter your discount code",onChangeText:e=>{h&&h(e)},value:u,onFocus:()=>{y(!0)},onBlur:e=>{var t;"addVar"===(null===(t=e.relatedTarget)||void 0===t?void 0:t.id)?(w.current&&w.current.focus(),y(!0)):(y(!1),x(!1))},noErrorHint:!0,validate:e=>[!0,""]}),f&&i(m,Object.assign({ref:T,id:"addVar",onClick:e=>{e.stopPropagation(),x(!0)}},{children:e("div",Object.assign({className:"add"},{children:[i(o,{width:20,height:20,color:"white"}),i("div",Object.assign({className:"variable"},{children:"Add variable"}))]}))}))]})),C&&i(n,{zIndex:2e3,data:null!=b?b:[],showVariable:C,setShowVariable:x,variableValue:j,setVariableValue:g,placeholder:"Add a variable",customTrigger:e=>{g(e.actualValue),y(!1)}})]})};export{p as DiscountCodeComponent};
1
+ import{jsxs as e,Fragment as t,jsx as i}from"react/jsx-runtime";import o from"../../../assets/icons/PlusIcon.js";import{useState as r,useRef as a,useEffect as s}from"react";import{AddVariableV2SideModal as n}from"../../add-variableV2/AddVariableV2SideModal.js";import"../../../_virtual/_tslib.js";import"../../add-variableV2/AddVariableV2.styled.js";import"../../button/Button.js";import"../../icon-button/IconButton.js";import{Input as l}from"../../input/Input.js";import"@tippyjs/react";import"../../tooltips/TooltipInternal.js";import"../../../constants/Theme.js";import"../../switch/Switch.js";import{TitleSmall as d}from"../../TypographyStyle.js";import{CheckBox as c}from"../../checkBox/CheckBox.js";import{AddVariableStyled as m}from"./VariableConnectorsPanel.js";const p=p=>{const{discountCode:u,setDiscountCode:h,variableList:b}=p,[j,g]=r(""),[v,V]=r(!!u),[f,y]=r(!1),[C,x]=r(!1),w=a(),T=a();return s((()=>{console.log("vj: setDiscountCode",h,j),h&&h(u+j)}),[j]),e(t,{children:[e("div",Object.assign({style:{display:"flex",flexDirection:"row",marginLeft:10,marginTop:8}},{children:[i(c,{isChecked:v,onValueChange:()=>{v&&h&&h(""),V(!v)}}),i(d,Object.assign({style:{marginLeft:8}},{children:"Add discount code"}))]})),v&&e("div",Object.assign({ref:w,style:{margin:10}},{children:[i(l,{placeholder:"Enter your discount code",onChangeText:e=>{h&&h(e)},value:u,onFocus:()=>{y(!0)},onBlur:e=>{var t;"addVar"===(null===(t=e.relatedTarget)||void 0===t?void 0:t.id)?(w.current&&w.current.focus(),y(!0)):(y(!1),x(!1))},noErrorHint:!0,validate:e=>[!0,""]}),f&&i(m,Object.assign({ref:T,id:"addVar",onClick:e=>{e.stopPropagation(),x(!0)}},{children:e("div",Object.assign({className:"add"},{children:[i(o,{width:20,height:20,color:"white"}),i("div",Object.assign({className:"variable"},{children:"Add variable"}))]}))}))]})),C&&i(n,{zIndex:2e3,data:null!=b?b:[],showVariable:C,setShowVariable:x,variableValue:j,setVariableValue:g,placeholder:"Add a variable",customTrigger:e=>{g(e.actualValue),y(!1)}})]})};export{p as DiscountCodeComponent};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bikdotai/bik-component-library",
3
- "version": "0.0.388-beta.6",
3
+ "version": "0.0.388-beta.7",
4
4
  "description": "Bik Component Library",
5
5
  "repository": {
6
6
  "type": "git",