@bikdotai/bik-component-library 0.0.310 → 0.0.312
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.
- package/dist/cjs/components/bik-layout/MockMenus.d.ts +1 -0
- package/dist/cjs/components/dashboard-review-popup/components/ZeroState.js +1 -1
- package/dist/cjs/components/input-with-vars/InputWithVariables.js +2 -2
- package/dist/esm/components/bik-layout/MockMenus.d.ts +1 -0
- package/dist/esm/components/dashboard-review-popup/components/ZeroState.js +1 -1
- package/dist/esm/components/input-with-vars/InputWithVariables.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@emotion/styled/base"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@emotion/styled/base"),c=require("react/jsx-runtime"),t=require("../../star-rating/StarRating.js"),l=require("../../TypographyStyle.js"),i=require("../../../constants/Theme.js");function g(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const a=g(e).default("div","production"===process.env.NODE_ENV?{target:"e2npj5k0"}:{target:"e2npj5k0",label:"Container"})("production"===process.env.NODE_ENV?{name:"budh8k",styles:"display:flex;flex-direction:column;gap:16px"}:{name:"budh8k",styles:"display:flex;flex-direction:column;gap:16px",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlplcm9TdGF0ZS50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBSzZCIiwiZmlsZSI6Ilplcm9TdGF0ZS50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBqc3ggYXMgX2pzeCwganN4cyBhcyBfanN4cyB9IGZyb20gXCJyZWFjdC9qc3gtcnVudGltZVwiO1xyXG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XHJcbmltcG9ydCB7IFN0YXJSYXRpbm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xufTtcclxuLy8jIHNvdXJjZU1hcHBpbmdVUkw9WmVyb1N0YXRlLmpzLm1hcCJdfQ== */",toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}});exports.ZeroState=e=>{let{handleStarSelection:g,initialText:d}=e;return c.jsxs(a,{children:[c.jsx(l.TitleMedium,Object.assign({color:i.COLORS.surface.standard},{children:null!=d?d:"Rate your experience with us"})),c.jsx("div",Object.assign({style:{display:"flex",flexDirection:"row",justifyContent:"center"}},{children:c.jsx(t.StarRating,{starSize:32,onChange:g})}))]})};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),a=require("react"),l=require("uuid"),r=require("styled-components"),i=require("../input/Input.js"),t=require("../TypographyStyle.js"),s=require("../../constants/Theme.js"),d=require("../../assets/icons/PlusIcon.js"),u=require("../add-variableV2/AddVariableBox.styled.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),a=require("react"),l=require("uuid"),r=require("styled-components"),i=require("../input/Input.js"),t=require("../TypographyStyle.js"),s=require("../../constants/Theme.js"),d=require("../../assets/icons/PlusIcon.js"),u=require("../add-variableV2/AddVariableBox.styled.js"),o=require("../add-variableV2/AddVariableV2.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const c=n(r).default.div`
|
|
2
2
|
margin-bottom: 32px;
|
|
3
3
|
input {
|
|
4
4
|
color: ${e=>e.isVar?s.COLORS.stroke.brand:"black"}
|
|
5
5
|
}
|
|
6
|
-
`;exports.InputWithVariables=r=>{const s=a.useRef(null),[
|
|
6
|
+
`;exports.InputWithVariables=r=>{const s=a.useRef(null),[n,v]=a.useState(!1),[b]=a.useState(l.v4()),[p,V]=a.useState(),[g,h]=a.useState(r.prevVariable),[j,x]=a.useState(!1),[y,T]=a.useState(!1);return a.useEffect((()=>{p&&p.actualValue&&(r.allowMix?h((e=>({actualValue:e.actualValue+p.actualValue,variableType:"string"}))):h((e=>({actualValue:p.actualValue,variableType:p.variableType,needsFetching:p.needsFetching}))))}),[p]),a.useEffect((()=>{r.onChange(g)}),[g]),e.jsxs(c,Object.assign({isVar:/^{{.*}}$/.test(g.actualValue)},{children:[e.jsx(i.Input,{id:b,ref:s,skipFocus:!0,textControl:!0,isActive:n,value:g.actualValue,validate:e=>[!0,""],errorMessage:"",placeholder:"Add a value",onChangeText:function(e,a){if(r.onlyVariables){const e=(null==a?void 0:a.keyCode)||(null==a?void 0:a.charCode);8!=e&&46!=e||h({actualValue:"",variableType:"string"})}else r.allowMix?h({actualValue:e,variableType:"string"}):h({actualValue:e.replace(/{{.*}}/,""),variableType:"string"})},onReferenceInit:()=>{},onFocus:e=>{var a;v(!0),T(!0),"Search..."!==(null===(a=e.relatedTarget)||void 0===a?void 0:a.placeholder)||j||x(!0)},onBlur:e=>{var a,l,r,i,t,d,u;"addVar"===(null===(a=e.relatedTarget)||void 0===a?void 0:a.id)||"varList"===(null===(l=e.relatedTarget)||void 0===l?void 0:l.id)||(null===(i=null===(r=e.relatedTarget)||void 0===r?void 0:r.className)||void 0===i?void 0:i.includes("exlualr0"))||(null===(d=null===(t=e.relatedTarget)||void 0===t?void 0:t.className)||void 0===d?void 0:d.includes("sc-dZoequ "))?(s.current&&s.current.focus(),v(!0)):"Search..."===(null===(u=e.relatedTarget)||void 0===u?void 0:u.placeholder)?v(!0):(v(!1),x(!1),T(!1))}}),e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"row",justifyContent:"space-between"}},{children:[g.actualValue&&r.showHelp?e.jsx("div",Object.assign({style:{marginTop:4}},{children:e.jsx(t.BodyCaption,{children:`This value is of type ${g.variableType}`})})):e.jsx("div",{}),y&&e.jsx(u.AddVariableStyled,Object.assign({right:r.addVarBoxRight,id:"addVar",onClick:()=>{x(!j)}},{children:e.jsxs("div",Object.assign({className:"add"},{children:[e.jsx(d.default,{color:"white"}),e.jsx("div",Object.assign({className:"variable"},{children:"Add variable"}))]}))}))]})),j&&e.jsx(o.AddVariableV2,{data:r.variablesList,showVariable:!0,setShowVariable:()=>{x(!1)},variableValue:p,setVariableValue:V,placeholder:"",pickerSize:"large",enableVariable:!0,selectWithTypes:!0,onSearchBlur:e=>{var a,l,r,i,t,d;"varList"===(null===(a=e.relatedTarget)||void 0===a?void 0:a.id)||(null===(r=null===(l=e.relatedTarget)||void 0===l?void 0:l.className)||void 0===r?void 0:r.includes("exlualr0"))||(null===(t=null===(i=e.relatedTarget)||void 0===i?void 0:i.className)||void 0===t?void 0:t.includes("sc-dZoequ "))?s.current.focus():"Enter here"===(null===(d=e.relatedTarget)||void 0===d?void 0:d.placeholder)?e.relatedTarget.id!==b&&(x(!1),T(!1),v(!1)):(x(!1),T(!1),v(!1))}})]}))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import c from"@emotion/styled/base";import{jsxs as e,jsx as t}from"react/jsx-runtime";import{StarRating as
|
|
1
|
+
import c from"@emotion/styled/base";import{jsxs as e,jsx as t}from"react/jsx-runtime";import{StarRating as g}from"../../star-rating/StarRating.js";import{TitleMedium as l}from"../../TypographyStyle.js";import{COLORS as i}from"../../../constants/Theme.js";const a=c("div","production"===process.env.NODE_ENV?{target:"e2npj5k0"}:{target:"e2npj5k0",label:"Container"})("production"===process.env.NODE_ENV?{name:"budh8k",styles:"display:flex;flex-direction:column;gap:16px"}:{name:"budh8k",styles:"display:flex;flex-direction:column;gap:16px",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlplcm9TdGF0ZS50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBSzZCIiwiZmlsZSI6Ilplcm9TdGF0ZS50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBqc3ggYXMgX2pzeCwganN4cyBhcyBfanN4cyB9IGZyb20g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GNoaWxkcmVuOiBfanN4KFN0YXJSYXRpbmcsIHsgc3RhclNpemU6IDMyLCBvbkNoYW5nZTogaGFuZGxlU3RhclNlbGVjdGlvbiB9KSB9KSldIH0pKTtcclxufTtcclxuLy8jIHNvdXJjZU1hcHBpbmdVUkw9WmVyb1N0YXRlLmpzLm1hcCJdfQ== */",toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}}),d=c=>{let{handleStarSelection:d,initialText:n}=c;return e(a,{children:[t(l,Object.assign({color:i.surface.standard},{children:null!=n?n:"Rate your experience with us"})),t("div",Object.assign({style:{display:"flex",flexDirection:"row",justifyContent:"center"}},{children:t(g,{starSize:32,onChange:d})}))]})};export{d as ZeroState};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as e,jsx as a}from"react/jsx-runtime";import{useRef as l,useState as r,useEffect as i}from"react";import{v4 as t}from"uuid";import o from"styled-components";import{Input as d}from"../input/Input.js";import{BodyCaption as s}from"../TypographyStyle.js";import{COLORS as n}from"../../constants/Theme.js";import c from"../../assets/icons/PlusIcon.js";import{AddVariableStyled as u}from"../add-variableV2/AddVariableBox.styled.js";import{AddVariableV2 as v}from"../add-variableV2/AddVariableV2.js";const p=o=>{const n=l(null),[p,
|
|
1
|
+
import{jsxs as e,jsx as a}from"react/jsx-runtime";import{useRef as l,useState as r,useEffect as i}from"react";import{v4 as t}from"uuid";import o from"styled-components";import{Input as d}from"../input/Input.js";import{BodyCaption as s}from"../TypographyStyle.js";import{COLORS as n}from"../../constants/Theme.js";import c from"../../assets/icons/PlusIcon.js";import{AddVariableStyled as u}from"../add-variableV2/AddVariableBox.styled.js";import{AddVariableV2 as v}from"../add-variableV2/AddVariableV2.js";const p=o=>{const n=l(null),[p,g]=r(!1),[m]=r(t()),[h,V]=r(),[T,f]=r(o.prevVariable),[y,j]=r(!1),[x,w]=r(!1);return i((()=>{h&&h.actualValue&&(o.allowMix?f((e=>({actualValue:e.actualValue+h.actualValue,variableType:"string"}))):f((e=>({actualValue:h.actualValue,variableType:h.variableType,needsFetching:h.needsFetching}))))}),[h]),i((()=>{o.onChange(T)}),[T]),e(b,Object.assign({isVar:/^{{.*}}$/.test(T.actualValue)},{children:[a(d,{id:m,ref:n,skipFocus:!0,textControl:!0,isActive:p,value:T.actualValue,validate:e=>[!0,""],errorMessage:"",placeholder:"Add a value",onChangeText:function(e,a){if(o.onlyVariables){const e=(null==a?void 0:a.keyCode)||(null==a?void 0:a.charCode);8!=e&&46!=e||f({actualValue:"",variableType:"string"})}else o.allowMix?f({actualValue:e,variableType:"string"}):f({actualValue:e.replace(/{{.*}}/,""),variableType:"string"})},onReferenceInit:()=>{},onFocus:e=>{var a;g(!0),w(!0),"Search..."!==(null===(a=e.relatedTarget)||void 0===a?void 0:a.placeholder)||y||j(!0)},onBlur:e=>{var a,l,r,i,t,o,d;"addVar"===(null===(a=e.relatedTarget)||void 0===a?void 0:a.id)||"varList"===(null===(l=e.relatedTarget)||void 0===l?void 0:l.id)||(null===(i=null===(r=e.relatedTarget)||void 0===r?void 0:r.className)||void 0===i?void 0:i.includes("exlualr0"))||(null===(o=null===(t=e.relatedTarget)||void 0===t?void 0:t.className)||void 0===o?void 0:o.includes("sc-dZoequ "))?(n.current&&n.current.focus(),g(!0)):"Search..."===(null===(d=e.relatedTarget)||void 0===d?void 0:d.placeholder)?g(!0):(g(!1),j(!1),w(!1))}}),e("div",Object.assign({style:{display:"flex",flexDirection:"row",justifyContent:"space-between"}},{children:[T.actualValue&&o.showHelp?a("div",Object.assign({style:{marginTop:4}},{children:a(s,{children:`This value is of type ${T.variableType}`})})):a("div",{}),x&&a(u,Object.assign({right:o.addVarBoxRight,id:"addVar",onClick:()=>{j(!y)}},{children:e("div",Object.assign({className:"add"},{children:[a(c,{color:"white"}),a("div",Object.assign({className:"variable"},{children:"Add variable"}))]}))}))]})),y&&a(v,{data:o.variablesList,showVariable:!0,setShowVariable:()=>{j(!1)},variableValue:h,setVariableValue:V,placeholder:"",pickerSize:"large",enableVariable:!0,selectWithTypes:!0,onSearchBlur:e=>{var a,l,r,i,t,o;"varList"===(null===(a=e.relatedTarget)||void 0===a?void 0:a.id)||(null===(r=null===(l=e.relatedTarget)||void 0===l?void 0:l.className)||void 0===r?void 0:r.includes("exlualr0"))||(null===(t=null===(i=e.relatedTarget)||void 0===i?void 0:i.className)||void 0===t?void 0:t.includes("sc-dZoequ "))?n.current.focus():"Enter here"===(null===(o=e.relatedTarget)||void 0===o?void 0:o.placeholder)?e.relatedTarget.id!==m&&(j(!1),w(!1),g(!1)):(j(!1),w(!1),g(!1))}})]}))},b=o.div`
|
|
2
2
|
margin-bottom: 32px;
|
|
3
3
|
input {
|
|
4
4
|
color: ${e=>e.isVar?n.stroke.brand:"black"}
|