From 83d14631452f7c63f33f2dd6d58d0d5b5e7f773c Mon Sep 17 00:00:00 2001 From: Kevintjuhz Date: Tue, 26 Nov 2024 16:10:07 +0100 Subject: [PATCH] Remove link from popovers --- dist/components.css | 7 ------- dist/components.css.map | 2 +- dist/components.js | 23 ++++++----------------- dist/components.js.map | 2 +- dist/components.mjs | 19 ++++--------------- dist/components.mjs.map | 2 +- package.json | 2 +- src/components/InfoPopover.tsx | 9 +-------- src/components/PreprPreviewBar.tsx | 2 -- 9 files changed, 15 insertions(+), 53 deletions(-) diff --git a/dist/components.css b/dist/components.css index 85486aa..0a44aaf 100644 --- a/dist/components.css +++ b/dist/components.css @@ -193,9 +193,6 @@ font-size: 0.75rem; line-height: 1rem; } -.prp-font-black { - font-weight: 900; -} .prp-font-bold { font-weight: 700; } @@ -214,10 +211,6 @@ --tw-text-opacity: 1; color: rgb(165 180 252 / var(--tw-text-opacity)); } -.prp-text-indigo-700 { - --tw-text-opacity: 1; - color: rgb(67 56 202 / var(--tw-text-opacity)); -} .prp-text-white { --tw-text-opacity: 1; color: rgb(255 255 255 / var(--tw-text-opacity)); diff --git a/dist/components.css.map b/dist/components.css.map index b5a658b..8feceeb 100644 --- a/dist/components.css.map +++ b/dist/components.css.map @@ -1 +1 @@ -{"version":3,"sources":["../src/main.css"],"sourcesContent":["@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');\n.prp-sticky{\n position: sticky;\n}\n.prp-top-0{\n top: 0px;\n}\n.prp-z-\\[1000\\]{\n z-index: 1000;\n}\n.prp-z-\\[100\\]{\n z-index: 100;\n}\n.prp-z-\\[9999\\]{\n z-index: 9999;\n}\n.prp-mr-1{\n margin-right: 0.25rem;\n}\n.prp-mr-10{\n margin-right: 2.5rem;\n}\n.prp-block{\n display: block;\n}\n.prp-flex{\n display: flex;\n}\n.prp-hidden{\n display: none;\n}\n.prp-h-10{\n height: 2.5rem;\n}\n.prp-h-8{\n height: 2rem;\n}\n.prp-h-full{\n height: 100%;\n}\n.prp-w-3{\n width: 0.75rem;\n}\n.prp-w-\\[13rem\\]{\n width: 13rem;\n}\n.prp-w-\\[var\\(--button-width\\)\\]{\n width: var(--button-width);\n}\n.prp-w-full{\n width: 100%;\n}\n.prp-max-w-\\[15rem\\]{\n max-width: 15rem;\n}\n.prp-max-w-\\[312px\\]{\n max-width: 312px;\n}\n.prp-flex-initial{\n flex: 0 1 auto;\n}\n.prp-cursor-pointer{\n cursor: pointer;\n}\n.prp-flex-wrap{\n flex-wrap: wrap;\n}\n.prp-items-center{\n align-items: center;\n}\n.prp-justify-center{\n justify-content: center;\n}\n.prp-justify-between{\n justify-content: space-between;\n}\n.prp-gap-1{\n gap: 0.25rem;\n}\n.prp-gap-2{\n gap: 0.5rem;\n}\n.prp-gap-4{\n gap: 1rem;\n}\n.prp-gap-6{\n gap: 1.5rem;\n}\n.prp-gap-x-6{\n -moz-column-gap: 1.5rem;\n column-gap: 1.5rem;\n}\n.prp-gap-y-4{\n row-gap: 1rem;\n}\n.prp-space-y-2 > :not([hidden]) ~ :not([hidden]){\n --tw-space-y-reverse: 0;\n margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(0.5rem * var(--tw-space-y-reverse));\n}\n.prp-space-y-3 > :not([hidden]) ~ :not([hidden]){\n --tw-space-y-reverse: 0;\n margin-top: calc(0.75rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(0.75rem * var(--tw-space-y-reverse));\n}\n.prp-rounded-lg{\n border-radius: 0.5rem;\n}\n.prp-rounded-md{\n border-radius: 0.375rem;\n}\n.prp-rounded-b-md{\n border-bottom-right-radius: 0.375rem;\n border-bottom-left-radius: 0.375rem;\n}\n.prp-border{\n border-width: 1px;\n}\n.prp-border-gray-300{\n --tw-border-opacity: 1;\n border-color: rgb(209 213 219 / var(--tw-border-opacity));\n}\n.prp-bg-grey-400{\n --tw-bg-opacity: 1;\n background-color: rgb(156 163 175 / var(--tw-bg-opacity));\n}\n.prp-bg-indigo-default{\n --tw-bg-opacity: 1;\n background-color: rgb(67 56 202 / var(--tw-bg-opacity));\n}\n.prp-bg-orange-400{\n --tw-bg-opacity: 1;\n background-color: rgb(251 146 60 / var(--tw-bg-opacity));\n}\n.prp-bg-white{\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity));\n}\n.prp-p-1{\n padding: 0.25rem;\n}\n.prp-p-4{\n padding: 1rem;\n}\n.prp-px-3{\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n}\n.prp-px-4{\n padding-left: 1rem;\n padding-right: 1rem;\n}\n.prp-px-5{\n padding-left: 1.25rem;\n padding-right: 1.25rem;\n}\n.prp-py-2{\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n.prp-py-3{\n padding-top: 0.75rem;\n padding-bottom: 0.75rem;\n}\n.prp-py-4{\n padding-top: 1rem;\n padding-bottom: 1rem;\n}\n.prp-pb-0\\.5{\n padding-bottom: 0.125rem;\n}\n.prp-pb-2{\n padding-bottom: 0.5rem;\n}\n.prp-text-center{\n text-align: center;\n}\n.prp-text-base{\n font-size: 1rem;\n line-height: 1.5rem;\n}\n.prp-text-lg{\n font-size: 1.125rem;\n line-height: 1.75rem;\n}\n.prp-text-sm{\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n.prp-text-xs{\n font-size: 0.75rem;\n line-height: 1rem;\n}\n.prp-font-black{\n font-weight: 900;\n}\n.prp-font-bold{\n font-weight: 700;\n}\n.prp-leading-tight{\n line-height: 1.25;\n}\n.prp-text-gray-500{\n --tw-text-opacity: 1;\n color: rgb(107 114 128 / var(--tw-text-opacity));\n}\n.prp-text-gray-900{\n --tw-text-opacity: 1;\n color: rgb(17 24 39 / var(--tw-text-opacity));\n}\n.prp-text-indigo-300{\n --tw-text-opacity: 1;\n color: rgb(165 180 252 / var(--tw-text-opacity));\n}\n.prp-text-indigo-700{\n --tw-text-opacity: 1;\n color: rgb(67 56 202 / var(--tw-text-opacity));\n}\n.prp-text-white{\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n.prp-ring-0{\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n\n.prp-regular-text{\n font-size: 0.875rem;\n line-height: 1.25rem;\n font-weight: 500;\n line-height: 1.5;\n}\n\n.prp-base {\n font-family: Inter, sans-serif;\n}\n\n.prp-dropshadow {\n box-shadow: 0px 0px 12px 0px #C3C3C3;\n}\n\n.prp-dropshadow-popover {\n box-shadow: 0px 3px 16px 0px rgba(84, 84, 84, 0.45);\n}\n\n.hover\\:prp-cursor-pointer:hover{\n cursor: pointer;\n}\n\n.hover\\:prp-bg-gray-100:hover{\n --tw-bg-opacity: 1;\n background-color: rgb(243 244 246 / var(--tw-bg-opacity));\n}\n\n.hover\\:prp-text-indigo-400:hover{\n --tw-text-opacity: 1;\n color: rgb(129 140 248 / var(--tw-text-opacity));\n}\n\n.focus\\:prp-ring-0:focus{\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n\n.data-\\[open\\]\\:prp-rounded-b-none[data-open]{\n border-bottom-right-radius: 0px;\n border-bottom-left-radius: 0px;\n}\n\n.data-\\[open\\]\\:prp-border-b-white[data-open]{\n --tw-border-opacity: 1;\n border-bottom-color: rgb(255 255 255 / var(--tw-border-opacity));\n}\n\n.data-\\[checked\\]\\:prp-bg-indigo-600[data-checked]{\n --tw-bg-opacity: 1;\n background-color: rgb(67 56 202 / var(--tw-bg-opacity));\n}\n\n.data-\\[checked\\]\\:prp-text-white[data-checked]{\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n\n@media (min-width: 768px){\n .md\\:prp-inline{\n display: inline;\n }\n .md\\:prp-w-\\[15rem\\]{\n width: 15rem;\n }\n .md\\:prp-w-auto{\n width: auto;\n }\n .md\\:prp-px-19\\.5{\n padding-left: 4.875rem;\n padding-right: 4.875rem;\n }\n}\n\n@media (min-width: 1024px){\n .lg\\:prp-block{\n display: block;\n }\n .lg\\:prp-gap-6{\n gap: 1.5rem;\n }\n}\n\n@media (min-width: 1440px){\n .\\32xl\\:prp-flex{\n display: flex;\n }\n}"],"mappings":";;;AACA,CAAC;AACG,YAAU;AACd;AACA,CAAC;AACG,OAAK;AACT;AACA,CAAC;AACG,WAAS;AACb;AACA,CAAC;AACG,WAAS;AACb;AACA,CAAC;AACG,WAAS;AACb;AACA,CAAC;AACG,gBAAc;AAClB;AACA,CAAC;AACG,gBAAc;AAClB;AACA,CAAC;AACG,WAAS;AACb;AACA,CAAC;AACG,WAAS;AACb;AACA,CAAC;AACG,WAAS;AACb;AACA,CAAC;AACG,UAAQ;AACZ;AACA,CAAC;AACG,UAAQ;AACZ;AACA,CAAC;AACG,UAAQ;AACZ;AACA,CAAC;AACG,SAAO;AACX;AACA,CAAC;AACG,SAAO;AACX;AACA,CAAC;AACG,SAAO,IAAI;AACf;AACA,CAAC;AACG,SAAO;AACX;AACA,CAAC;AACG,aAAW;AACf;AACA,CAAC;AACG,aAAW;AACf;AACA,CAAC;AACG,QAAM,EAAE,EAAE;AACd;AACA,CAAC;AACG,UAAQ;AACZ;AACA,CAAC;AACG,aAAW;AACf;AACA,CAAC;AACG,eAAa;AACjB;AACA,CAAC;AACG,mBAAiB;AACrB;AACA,CAAC;AACG,mBAAiB;AACrB;AACA,CAAC;AACG,OAAK;AACT;AACA,C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AAE;AACf,GAAC;AACG,aAAS;AACb;AACJ;","names":[]} \ No newline at end of file +{"version":3,"sources":["../src/main.css"],"sourcesContent":["@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');\n.prp-sticky{\n position: sticky;\n}\n.prp-top-0{\n top: 0px;\n}\n.prp-z-\\[1000\\]{\n z-index: 1000;\n}\n.prp-z-\\[100\\]{\n z-index: 100;\n}\n.prp-z-\\[9999\\]{\n z-index: 9999;\n}\n.prp-mr-1{\n margin-right: 0.25rem;\n}\n.prp-mr-10{\n margin-right: 2.5rem;\n}\n.prp-block{\n display: block;\n}\n.prp-flex{\n display: flex;\n}\n.prp-hidden{\n display: none;\n}\n.prp-h-10{\n height: 2.5rem;\n}\n.prp-h-8{\n height: 2rem;\n}\n.prp-h-full{\n height: 100%;\n}\n.prp-w-3{\n width: 0.75rem;\n}\n.prp-w-\\[13rem\\]{\n width: 13rem;\n}\n.prp-w-\\[var\\(--button-width\\)\\]{\n width: var(--button-width);\n}\n.prp-w-full{\n width: 100%;\n}\n.prp-max-w-\\[15rem\\]{\n max-width: 15rem;\n}\n.prp-max-w-\\[312px\\]{\n max-width: 312px;\n}\n.prp-flex-initial{\n flex: 0 1 auto;\n}\n.prp-cursor-pointer{\n cursor: pointer;\n}\n.prp-flex-wrap{\n flex-wrap: wrap;\n}\n.prp-items-center{\n align-items: center;\n}\n.prp-justify-center{\n justify-content: center;\n}\n.prp-justify-between{\n justify-content: space-between;\n}\n.prp-gap-1{\n gap: 0.25rem;\n}\n.prp-gap-2{\n gap: 0.5rem;\n}\n.prp-gap-4{\n gap: 1rem;\n}\n.prp-gap-6{\n gap: 1.5rem;\n}\n.prp-gap-x-6{\n -moz-column-gap: 1.5rem;\n column-gap: 1.5rem;\n}\n.prp-gap-y-4{\n row-gap: 1rem;\n}\n.prp-space-y-2 > :not([hidden]) ~ :not([hidden]){\n --tw-space-y-reverse: 0;\n margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(0.5rem * var(--tw-space-y-reverse));\n}\n.prp-space-y-3 > :not([hidden]) ~ :not([hidden]){\n --tw-space-y-reverse: 0;\n margin-top: calc(0.75rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(0.75rem * var(--tw-space-y-reverse));\n}\n.prp-rounded-lg{\n border-radius: 0.5rem;\n}\n.prp-rounded-md{\n border-radius: 0.375rem;\n}\n.prp-rounded-b-md{\n border-bottom-right-radius: 0.375rem;\n border-bottom-left-radius: 0.375rem;\n}\n.prp-border{\n border-width: 1px;\n}\n.prp-border-gray-300{\n --tw-border-opacity: 1;\n border-color: rgb(209 213 219 / var(--tw-border-opacity));\n}\n.prp-bg-grey-400{\n --tw-bg-opacity: 1;\n background-color: rgb(156 163 175 / var(--tw-bg-opacity));\n}\n.prp-bg-indigo-default{\n --tw-bg-opacity: 1;\n background-color: rgb(67 56 202 / var(--tw-bg-opacity));\n}\n.prp-bg-orange-400{\n --tw-bg-opacity: 1;\n background-color: rgb(251 146 60 / var(--tw-bg-opacity));\n}\n.prp-bg-white{\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity));\n}\n.prp-p-1{\n padding: 0.25rem;\n}\n.prp-p-4{\n padding: 1rem;\n}\n.prp-px-3{\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n}\n.prp-px-4{\n padding-left: 1rem;\n padding-right: 1rem;\n}\n.prp-px-5{\n padding-left: 1.25rem;\n padding-right: 1.25rem;\n}\n.prp-py-2{\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n.prp-py-3{\n padding-top: 0.75rem;\n padding-bottom: 0.75rem;\n}\n.prp-py-4{\n padding-top: 1rem;\n padding-bottom: 1rem;\n}\n.prp-pb-0\\.5{\n padding-bottom: 0.125rem;\n}\n.prp-pb-2{\n padding-bottom: 0.5rem;\n}\n.prp-text-center{\n text-align: center;\n}\n.prp-text-base{\n font-size: 1rem;\n line-height: 1.5rem;\n}\n.prp-text-lg{\n font-size: 1.125rem;\n line-height: 1.75rem;\n}\n.prp-text-sm{\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n.prp-text-xs{\n font-size: 0.75rem;\n line-height: 1rem;\n}\n.prp-font-bold{\n font-weight: 700;\n}\n.prp-leading-tight{\n line-height: 1.25;\n}\n.prp-text-gray-500{\n --tw-text-opacity: 1;\n color: rgb(107 114 128 / var(--tw-text-opacity));\n}\n.prp-text-gray-900{\n --tw-text-opacity: 1;\n color: rgb(17 24 39 / var(--tw-text-opacity));\n}\n.prp-text-indigo-300{\n --tw-text-opacity: 1;\n color: rgb(165 180 252 / var(--tw-text-opacity));\n}\n.prp-text-white{\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n.prp-ring-0{\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n\n.prp-regular-text{\n font-size: 0.875rem;\n line-height: 1.25rem;\n font-weight: 500;\n line-height: 1.5;\n}\n\n.prp-base {\n font-family: Inter, sans-serif;\n}\n\n.prp-dropshadow {\n box-shadow: 0px 0px 12px 0px #C3C3C3;\n}\n\n.prp-dropshadow-popover {\n box-shadow: 0px 3px 16px 0px rgba(84, 84, 84, 0.45);\n}\n\n.hover\\:prp-cursor-pointer:hover{\n cursor: pointer;\n}\n\n.hover\\:prp-bg-gray-100:hover{\n --tw-bg-opacity: 1;\n background-color: rgb(243 244 246 / var(--tw-bg-opacity));\n}\n\n.hover\\:prp-text-indigo-400:hover{\n --tw-text-opacity: 1;\n color: rgb(129 140 248 / var(--tw-text-opacity));\n}\n\n.focus\\:prp-ring-0:focus{\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n\n.data-\\[open\\]\\:prp-rounded-b-none[data-open]{\n border-bottom-right-radius: 0px;\n border-bottom-left-radius: 0px;\n}\n\n.data-\\[open\\]\\:prp-border-b-white[data-open]{\n --tw-border-opacity: 1;\n border-bottom-color: rgb(255 255 255 / var(--tw-border-opacity));\n}\n\n.data-\\[checked\\]\\:prp-bg-indigo-600[data-checked]{\n --tw-bg-opacity: 1;\n background-color: rgb(67 56 202 / var(--tw-bg-opacity));\n}\n\n.data-\\[checked\\]\\:prp-text-white[data-checked]{\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n\n@media (min-width: 768px){\n .md\\:prp-inline{\n display: inline;\n }\n .md\\:prp-w-\\[15rem\\]{\n width: 15rem;\n }\n .md\\:prp-w-auto{\n width: auto;\n }\n .md\\:prp-px-19\\.5{\n padding-left: 4.875rem;\n padding-right: 4.875rem;\n }\n}\n\n@media (min-width: 1024px){\n .lg\\:prp-block{\n display: block;\n }\n .lg\\:prp-gap-6{\n gap: 1.5rem;\n }\n}\n\n@media (min-width: 1440px){\n .\\32xl\\:prp-flex{\n display: flex;\n }\n}"],"mappings":";;;AACA,CAAC;AACG,YAAU;AACd;AACA,CAAC;AACG,OAAK;AACT;AACA,CAAC;AACG,WAAS;AACb;AACA,CAAC;AACG,WAAS;AACb;AACA,CAAC;AACG,WAAS;AACb;AACA,CAAC;AACG,gBAAc;AAClB;AACA,CAAC;AACG,gBAAc;AAClB;AACA,CAAC;AACG,WAAS;AACb;AACA,CAAC;AACG,WAAS;AACb;AACA,CAAC;AACG,WAAS;AACb;AACA,CAAC;AACG,UAAQ;AACZ;AACA,CAAC;AACG,UAAQ;AACZ;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IAAI,IAAI,EAAE,IAAI;AACjC;AAEA,OAAO,CAAC,SAAS,EAAE;AACf,GAAC;AACG,aAAS;AACb;AACA,GAAC;AACG,WAAO;AACX;AACA,GAAC;AACG,WAAO;AACX;AACA,GAAC;AACG,kBAAc;AACd,mBAAe;AACnB;AACJ;AAEA,OAAO,CAAC,SAAS,EAAE;AACf,GAAC;AACG,aAAS;AACb;AACA,GAAC;AACG,SAAK;AACT;AACJ;AAEA,OAAO,CAAC,SAAS,EAAE;AACf,GAAC;AACG,aAAS;AACb;AACJ;","names":[]} \ No newline at end of file diff --git a/dist/components.js b/dist/components.js index b20c80b..6d4c689 100644 --- a/dist/components.js +++ b/dist/components.js @@ -111,14 +111,13 @@ function ResetButton({ // src/components/PreprPreviewBar.tsx var import_react6 = require("@headlessui/react"); -var import_fa63 = require("react-icons/fa6"); +var import_fa62 = require("react-icons/fa6"); // src/components/InfoPopover.tsx var import_react3 = require("@headlessui/react"); var import_fa = require("react-icons/fa"); var import_react4 = __toESM(require("react")); -var import_fa62 = require("react-icons/fa6"); -function InfoPopover({ title, text, link }) { +function InfoPopover({ title, text }) { return /* @__PURE__ */ import_react4.default.createElement(import_react3.Popover, null, /* @__PURE__ */ import_react4.default.createElement(import_react3.PopoverButton, { className: "prp-ring-0 focus:prp-ring-0 prp-font-bold prp-text-indigo-300 prp-text-xs hover:prp-text-indigo-400 prp-block" }, /* @__PURE__ */ import_react4.default.createElement(import_fa.FaInfoCircle, null)), /* @__PURE__ */ import_react4.default.createElement( import_react3.PopoverPanel, { @@ -126,15 +125,7 @@ function InfoPopover({ title, text, link }) { anchor: "bottom", className: "prp-z-[1000] prp-p-4" }, - /* @__PURE__ */ import_react4.default.createElement("div", { className: " prp-bg-white rounded-lg p-6 prp-dropshadow-popover prp-space-y-3 prp-max-w-[312px]" }, /* @__PURE__ */ import_react4.default.createElement("span", { className: "prp-text-base prp-font-bold prp-leading-tight prp-text-gray-900" }, title), /* @__PURE__ */ import_react4.default.createElement("div", { className: "prp-space-y-2" }, /* @__PURE__ */ import_react4.default.createElement("span", { className: "prp-text-sm" }, text), /* @__PURE__ */ import_react4.default.createElement( - "a", - { - href: link, - className: "prp-font-black prp-text-sm prp-flex prp-gap-1 prp-items-center prp-text-indigo-700" - }, - "Learn more ", - /* @__PURE__ */ import_react4.default.createElement(import_fa62.FaArrowUpRightFromSquare, null) - ))) + /* @__PURE__ */ import_react4.default.createElement("div", { className: " prp-bg-white rounded-lg p-6 prp-dropshadow-popover prp-space-y-3 prp-max-w-[312px]" }, /* @__PURE__ */ import_react4.default.createElement("span", { className: "prp-text-base prp-font-bold prp-leading-tight prp-text-gray-900" }, title), /* @__PURE__ */ import_react4.default.createElement("div", { className: "prp-space-y-2" }, /* @__PURE__ */ import_react4.default.createElement("span", { className: "prp-text-sm" }, text))) )); } @@ -204,8 +195,7 @@ function PreprPreviewBar(props) { InfoPopover, { title: "Adaptive Preview", - text: "Choose a segment to see how it's displayed.", - link: "Learn more" + text: "Choose a segment to see how it's displayed." } )), /* @__PURE__ */ import_react5.default.createElement( import_react6.Listbox, @@ -213,7 +203,7 @@ function PreprPreviewBar(props) { value: selectedSegment.slug, onChange: handleUpdateSegment }, - /* @__PURE__ */ import_react5.default.createElement(import_react6.ListboxButton, { className: "prp-h-10 prp-flex-initial prp-w-[13rem] md:prp-w-[15rem] prp-max-w-[15rem] prp-rounded-md data-[open]:prp-rounded-b-none data-[open]:prp-border-b-white prp-border prp-border-gray-300 prp-items-center prp-bg-white prp-justify-center prp-px-4 prp-regular-text prp-text-gray-500" }, /* @__PURE__ */ import_react5.default.createElement("span", { className: "prp-flex prp-items-center prp-justify-between" }, /* @__PURE__ */ import_react5.default.createElement("span", null, selectedSegment.body), /* @__PURE__ */ import_react5.default.createElement("span", { className: "prp-text-gray-900" }, /* @__PURE__ */ import_react5.default.createElement(import_fa63.FaCaretDown, { className: "prp-w-3" })))), + /* @__PURE__ */ import_react5.default.createElement(import_react6.ListboxButton, { className: "prp-h-10 prp-flex-initial prp-w-[13rem] md:prp-w-[15rem] prp-max-w-[15rem] prp-rounded-md data-[open]:prp-rounded-b-none data-[open]:prp-border-b-white prp-border prp-border-gray-300 prp-items-center prp-bg-white prp-justify-center prp-px-4 prp-regular-text prp-text-gray-500" }, /* @__PURE__ */ import_react5.default.createElement("span", { className: "prp-flex prp-items-center prp-justify-between" }, /* @__PURE__ */ import_react5.default.createElement("span", null, selectedSegment.body), /* @__PURE__ */ import_react5.default.createElement("span", { className: "prp-text-gray-900" }, /* @__PURE__ */ import_react5.default.createElement(import_fa62.FaCaretDown, { className: "prp-w-3" })))), /* @__PURE__ */ import_react5.default.createElement( import_react6.ListboxOptions, { @@ -234,8 +224,7 @@ function PreprPreviewBar(props) { InfoPopover, { title: "A/B Testing", - text: "Choose between two different versions of a page to see which one performs better.", - link: "Learn more" + text: "Choose between two different versions of a page to see which one performs better." } )), /* @__PURE__ */ import_react5.default.createElement( import_react6.RadioGroup, diff --git a/dist/components.js.map b/dist/components.js.map index de59753..e97b2eb 100644 --- a/dist/components.js.map +++ b/dist/components.js.map @@ -1 +1 @@ -{"version":3,"sources":["../src/components.ts","../src/components/PreprPreviewBar.tsx","../src/components/PreprLogo.tsx","../src/components/ResetButton.tsx","../src/components/InfoPopover.tsx"],"sourcesContent":["'use client'\n\nimport \"./main.css\"\nimport {PreprPreviewBar} from './components/PreprPreviewBar'\n\nexport {PreprPreviewBar}","'use client'\n\nimport { usePathname, useRouter } from 'next/navigation'\nimport React, { useState } from 'react'\n\nimport '../main.css'\nimport PreprLogo from './PreprLogo'\nimport ResetButton from './ResetButton'\nimport {\n Listbox,\n ListboxButton,\n ListboxOption,\n ListboxOptions,\n Radio,\n RadioGroup,\n} from '@headlessui/react'\nimport { FaCaretDown } from 'react-icons/fa6'\nimport InfoPopover from './InfoPopover'\n\nexport function PreprPreviewBar(props: {\n activeSegment?: string | null\n activeVariant?: string | null\n data?: any\n}) {\n const { activeSegment, activeVariant, data } = props\n\n if (\n data?.items &&\n data?.items[data?.items.length - 1].reference_id !== 'null'\n ) {\n data.items\n data.items.unshift({\n reference_id: 'null',\n body: 'All other users',\n })\n }\n\n const emptyVariant = 'A'\n const emptySegment = {\n body: 'Choose segment',\n }\n const [selectedSegment, setSelectedSegment] = useState(\n (data.items &&\n data.items.filter(\n (segmentData: any) => segmentData === activeSegment\n )[0]) ||\n emptySegment\n )\n\n const [selectedVariant, setSelectedVariant] = useState(\n activeVariant || 'A'\n )\n\n const router = useRouter()\n const pathname = usePathname()\n\n const handleUpdateVariant = (variant: any) => {\n setSelectedVariant(variant)\n\n const params = new URLSearchParams({})\n\n params.append('a-b-testing', variant as string)\n\n router.push(`${pathname}?${params.toString()}`, {\n scroll: false,\n })\n router.refresh()\n }\n\n const handleUpdateSegment = (value: any) => {\n setSelectedSegment(value)\n\n const segment = value.reference_id\n\n if (!segment) {\n return\n }\n\n const params = new URLSearchParams({})\n\n if (segment !== 'Choose segment') {\n params.append('segments', segment as string)\n } else {\n params.append('segments', 'null')\n }\n\n router.push(`${pathname}?${params.toString()}`, {\n scroll: false,\n })\n router.refresh()\n }\n\n const handleReset = () => {\n setSelectedSegment(emptySegment)\n setSelectedVariant(emptyVariant)\n\n const params = new URLSearchParams({})\n params.append('segments', 'null')\n params.append('a-b-testing', 'null')\n\n router.push(`${pathname}?${params.toString()}`, {\n scroll: false,\n })\n router.refresh()\n }\n\n return (\n
\n
\n {/* Logo & Text */}\n
\n
\n \n
\n
\n Adaptive Preview\n
\n
\n\n
\n
\n
\n Apply segment\n \n
\n \n \n \n {selectedSegment.body}\n \n \n \n \n \n \n {data?.items?.map((segment: any) => (\n \n {segment.body}\n \n ))}\n \n \n
\n\n
\n
\n Show A/B variant\n \n
\n\n \n \n \n Variant{' '}\n \n A\n \n \n \n Variant{' '}\n \n B\n \n \n
\n\n \n
\n
\n
\n )\n}\n","import React from \"react\";\n\nexport default function PreprLogo() {\n return (\n \n \n \n \n \n \n \n\n )\n}","import React from 'react'\nimport classNames from 'classnames'\nimport { FaRotate } from 'react-icons/fa6'\n\ninterface ResetButtonProps {\n enabled?: boolean\n handleClick?: () => void\n}\n\nexport default function ResetButton({\n enabled = false,\n handleClick,\n}: ResetButtonProps) {\n const classes = classNames(\n 'prp-py-3 prp-px-4 prp-flex prp-gap-2 prp-items-center rounded-md prp-regular-text h-10',\n enabled &&\n 'prp-bg-orange-400 hover:prp-orange-500 prp-cursor-pointer prp-text-white',\n !enabled && 'prp-bg-grey-400 prp-text-gray-500'\n )\n\n return (\n \n \n Reset\n \n )\n}\n","import { Popover, PopoverButton, PopoverPanel } from '@headlessui/react'\nimport { FaInfoCircle } from 'react-icons/fa'\nimport React from 'react'\nimport { FaArrowUpRightFromSquare } from 'react-icons/fa6'\n\ninterface InfoPopoverProps {\n title: string\n text: string\n link: string\n}\n\nexport default function InfoPopover({ title, text, link }: InfoPopoverProps) {\n return (\n \n \n \n \n \n
\n \n {title}\n \n
\n {text}\n \n Learn more \n \n
\n
\n \n
\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEA,wBAAuC;AACvC,IAAAA,gBAAgC;;;ACHhC,mBAAkB;AAEH,SAAR,YAA6B;AAChC,SACI,6BAAAC,QAAA,cAAC,SAAI,OAAM,MAAK,QAAO,MAAK,SAAQ,aAAY,MAAK,QAAO,OAAM,gCAC9D,6BAAAA,QAAA;AAAA,IAAC;AAAA;AAAA,MAAK,UAAS;AAAA,MAAU,UAAS;AAAA,MAC5B,GAAE;AAAA,MACF,MAAK;AAAA;AAAA,EAAO,GAClB,6BAAAA,QAAA;AAAA,IAAC;AAAA;AAAA,MAAK,UAAS;AAAA,MAAU,UAAS;AAAA,MAC5B,GAAE;AAAA,MACF,MAAK;AAAA;AAAA,EAAO,GAClB,6BAAAA,QAAA;AAAA,IAAC;AAAA;AAAA,MAAK,UAAS;AAAA,MAAU,UAAS;AAAA,MAC5B,GAAE;AAAA,MACF,MAAK;AAAA;AAAA,EAAO,GAClB,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,SACI,gBAAgB,gBAChB,oBAAoB;AAAA;AAAA,EAE5B,CACJ,CACJ,CACJ;AAER;","names":["import_react","React","import_react","classNames","React","import_react","import_fa6","import_react","import_fa6","React","React"]} \ No newline at end of file +{"version":3,"sources":["../src/components.ts","../src/components/PreprPreviewBar.tsx","../src/components/PreprLogo.tsx","../src/components/ResetButton.tsx","../src/components/InfoPopover.tsx"],"sourcesContent":["'use client'\n\nimport \"./main.css\"\nimport {PreprPreviewBar} from './components/PreprPreviewBar'\n\nexport {PreprPreviewBar}","'use client'\n\nimport { usePathname, useRouter } from 'next/navigation'\nimport React, { useState } from 'react'\n\nimport '../main.css'\nimport PreprLogo from './PreprLogo'\nimport ResetButton from './ResetButton'\nimport {\n Listbox,\n ListboxButton,\n ListboxOption,\n ListboxOptions,\n Radio,\n RadioGroup,\n} from '@headlessui/react'\nimport { FaCaretDown } from 'react-icons/fa6'\nimport InfoPopover from './InfoPopover'\n\nexport function PreprPreviewBar(props: {\n activeSegment?: string | null\n activeVariant?: string | null\n data?: any\n}) {\n const { activeSegment, activeVariant, data } = props\n\n if (\n data?.items &&\n data?.items[data?.items.length - 1].reference_id !== 'null'\n ) {\n data.items\n data.items.unshift({\n reference_id: 'null',\n body: 'All other users',\n })\n }\n\n const emptyVariant = 'A'\n const emptySegment = {\n body: 'Choose segment',\n }\n const [selectedSegment, setSelectedSegment] = useState(\n (data.items &&\n data.items.filter(\n (segmentData: any) => segmentData === activeSegment\n )[0]) ||\n emptySegment\n )\n\n const [selectedVariant, setSelectedVariant] = useState(\n activeVariant || 'A'\n )\n\n const router = useRouter()\n const pathname = usePathname()\n\n const handleUpdateVariant = (variant: any) => {\n setSelectedVariant(variant)\n\n const params = new URLSearchParams({})\n\n params.append('a-b-testing', variant as string)\n\n router.push(`${pathname}?${params.toString()}`, {\n scroll: false,\n })\n router.refresh()\n }\n\n const handleUpdateSegment = (value: any) => {\n setSelectedSegment(value)\n\n const segment = value.reference_id\n\n if (!segment) {\n return\n }\n\n const params = new URLSearchParams({})\n\n if (segment !== 'Choose segment') {\n params.append('segments', segment as string)\n } else {\n params.append('segments', 'null')\n }\n\n router.push(`${pathname}?${params.toString()}`, {\n scroll: false,\n })\n router.refresh()\n }\n\n const handleReset = () => {\n setSelectedSegment(emptySegment)\n setSelectedVariant(emptyVariant)\n\n const params = new URLSearchParams({})\n params.append('segments', 'null')\n params.append('a-b-testing', 'null')\n\n router.push(`${pathname}?${params.toString()}`, {\n scroll: false,\n })\n router.refresh()\n }\n\n return (\n
\n
\n {/* Logo & Text */}\n
\n
\n \n
\n
\n Adaptive Preview\n
\n
\n\n
\n
\n
\n Apply segment\n \n
\n \n \n \n {selectedSegment.body}\n \n \n \n \n \n \n {data?.items?.map((segment: any) => (\n \n {segment.body}\n \n ))}\n \n \n
\n\n
\n
\n Show A/B variant\n \n
\n\n \n \n \n Variant{' '}\n \n A\n \n \n \n Variant{' '}\n \n B\n \n \n
\n\n \n
\n
\n
\n )\n}\n","import React from \"react\";\n\nexport default function PreprLogo() {\n return (\n \n \n \n \n \n \n \n\n )\n}","import React from 'react'\nimport classNames from 'classnames'\nimport { FaRotate } from 'react-icons/fa6'\n\ninterface ResetButtonProps {\n enabled?: boolean\n handleClick?: () => void\n}\n\nexport default function ResetButton({\n enabled = false,\n handleClick,\n}: ResetButtonProps) {\n const classes = classNames(\n 'prp-py-3 prp-px-4 prp-flex prp-gap-2 prp-items-center rounded-md prp-regular-text h-10',\n enabled &&\n 'prp-bg-orange-400 hover:prp-orange-500 prp-cursor-pointer prp-text-white',\n !enabled && 'prp-bg-grey-400 prp-text-gray-500'\n )\n\n return (\n \n \n Reset\n \n )\n}\n","import { Popover, PopoverButton, PopoverPanel } from '@headlessui/react'\nimport { FaInfoCircle } from 'react-icons/fa'\nimport React from 'react'\nimport { FaArrowUpRightFromSquare } from 'react-icons/fa6'\n\ninterface InfoPopoverProps {\n title: string\n text: string\n}\n\nexport default function InfoPopover({ title, text }: InfoPopoverProps) {\n return (\n \n \n \n \n \n
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AU;AAAA,MACV,OAAO;AAAA,MACP,UAAU;AAAA;AAAA,IAEV,8BAAAA,QAAA;AAAA,MAAC;AAAA;AAAA,QACG,OAAO;AAAA,QACP,WAAU;AAAA;AAAA,MAIV,8BAAAA,QAAA,cAAC,UAAK,WAAU,uCAAoC,WACxC,GACZ;AAAA,MAAO;AAAA,IAEX;AAAA,IACA,8BAAAA,QAAA;AAAA,MAAC;AAAA;AAAA,QACG,OAAO;AAAA,QACP,WAAU;AAAA;AAAA,MAIV,8BAAAA,QAAA,cAAC,UAAK,WAAU,uCAAoC,WACxC,GACZ;AAAA,MAAO;AAAA,IAEX;AAAA,EACJ,CACJ,GAEA,8BAAAA,QAAA;AAAA,IAAC;AAAA;AAAA,MACG,aAAa;AAAA,MACb,SACI,gBAAgB,gBAChB,oBAAoB;AAAA;AAAA,EAE5B,CACJ,CACJ,CACJ;AAER;","names":["import_react","React","import_react","classNames","React","import_react","import_fa6","import_react","React","React"]} \ No newline at end of file diff --git a/dist/components.mjs b/dist/components.mjs index a3255fd..d8e8f76 100644 --- a/dist/components.mjs +++ b/dist/components.mjs @@ -91,8 +91,7 @@ import { FaCaretDown } from "react-icons/fa6"; import { Popover, PopoverButton, PopoverPanel } from "@headlessui/react"; import { FaInfoCircle } from "react-icons/fa"; import React3 from "react"; -import { FaArrowUpRightFromSquare } from "react-icons/fa6"; -function InfoPopover({ title, text, link }) { +function InfoPopover({ title, text }) { return /* @__PURE__ */ React3.createElement(Popover, null, /* @__PURE__ */ React3.createElement(PopoverButton, { className: "prp-ring-0 focus:prp-ring-0 prp-font-bold prp-text-indigo-300 prp-text-xs hover:prp-text-indigo-400 prp-block" }, /* @__PURE__ */ React3.createElement(FaInfoCircle, null)), /* @__PURE__ */ React3.createElement( PopoverPanel, { @@ -100,15 +99,7 @@ function InfoPopover({ title, text, link }) { anchor: "bottom", className: "prp-z-[1000] prp-p-4" }, - /* @__PURE__ */ React3.createElement("div", { className: " prp-bg-white rounded-lg p-6 prp-dropshadow-popover prp-space-y-3 prp-max-w-[312px]" }, /* @__PURE__ */ React3.createElement("span", { className: "prp-text-base prp-font-bold prp-leading-tight prp-text-gray-900" }, title), /* @__PURE__ */ React3.createElement("div", { className: "prp-space-y-2" }, /* @__PURE__ */ React3.createElement("span", { className: "prp-text-sm" }, text), /* @__PURE__ */ React3.createElement( - "a", - { - href: link, - className: "prp-font-black prp-text-sm prp-flex prp-gap-1 prp-items-center prp-text-indigo-700" - }, - "Learn more ", - /* @__PURE__ */ React3.createElement(FaArrowUpRightFromSquare, null) - ))) + /* @__PURE__ */ React3.createElement("div", { className: " prp-bg-white rounded-lg p-6 prp-dropshadow-popover prp-space-y-3 prp-max-w-[312px]" }, /* @__PURE__ */ React3.createElement("span", { className: "prp-text-base prp-font-bold prp-leading-tight prp-text-gray-900" }, title), /* @__PURE__ */ React3.createElement("div", { className: "prp-space-y-2" }, /* @__PURE__ */ React3.createElement("span", { className: "prp-text-sm" }, text))) )); } @@ -178,8 +169,7 @@ function PreprPreviewBar(props) { InfoPopover, { title: "Adaptive Preview", - text: "Choose a segment to see how it's displayed.", - link: "Learn more" + text: "Choose a segment to see how it's displayed." } )), /* @__PURE__ */ React4.createElement( Listbox, @@ -208,8 +198,7 @@ function PreprPreviewBar(props) { InfoPopover, { title: "A/B Testing", - text: "Choose between two different versions of a page to see which one performs better.", - link: "Learn more" + text: "Choose between two different versions of a page to see which one performs better." } )), /* @__PURE__ */ React4.createElement( RadioGroup, diff --git a/dist/components.mjs.map b/dist/components.mjs.map index b1ba529..1cf7be7 100644 --- a/dist/components.mjs.map +++ b/dist/components.mjs.map @@ -1 +1 @@ -{"version":3,"sources":["../src/components/PreprPreviewBar.tsx","../src/components/PreprLogo.tsx","../src/components/ResetButton.tsx","../src/components/InfoPopover.tsx"],"sourcesContent":["'use client'\n\nimport { usePathname, useRouter } from 'next/navigation'\nimport React, { useState } from 'react'\n\nimport '../main.css'\nimport PreprLogo from './PreprLogo'\nimport ResetButton from './ResetButton'\nimport {\n Listbox,\n ListboxButton,\n ListboxOption,\n ListboxOptions,\n Radio,\n RadioGroup,\n} from '@headlessui/react'\nimport { FaCaretDown } from 'react-icons/fa6'\nimport InfoPopover from './InfoPopover'\n\nexport function PreprPreviewBar(props: {\n activeSegment?: string | null\n activeVariant?: string | null\n data?: any\n}) {\n const { activeSegment, activeVariant, data } = props\n\n if (\n data?.items &&\n data?.items[data?.items.length - 1].reference_id !== 'null'\n ) {\n data.items\n data.items.unshift({\n reference_id: 'null',\n body: 'All other users',\n })\n }\n\n const emptyVariant = 'A'\n const emptySegment = {\n body: 'Choose segment',\n }\n const [selectedSegment, setSelectedSegment] = useState(\n (data.items &&\n data.items.filter(\n (segmentData: any) => segmentData === activeSegment\n )[0]) ||\n emptySegment\n )\n\n const [selectedVariant, setSelectedVariant] = useState(\n activeVariant || 'A'\n )\n\n const router = useRouter()\n const pathname = usePathname()\n\n const handleUpdateVariant = (variant: any) => {\n setSelectedVariant(variant)\n\n const params = new URLSearchParams({})\n\n params.append('a-b-testing', variant as string)\n\n router.push(`${pathname}?${params.toString()}`, {\n scroll: false,\n })\n router.refresh()\n }\n\n const handleUpdateSegment = (value: any) => {\n setSelectedSegment(value)\n\n const segment = value.reference_id\n\n if (!segment) {\n return\n }\n\n const params = new URLSearchParams({})\n\n if (segment !== 'Choose segment') {\n params.append('segments', segment as string)\n } else {\n params.append('segments', 'null')\n }\n\n router.push(`${pathname}?${params.toString()}`, {\n scroll: false,\n })\n router.refresh()\n }\n\n const handleReset = () => {\n setSelectedSegment(emptySegment)\n setSelectedVariant(emptyVariant)\n\n const params = new URLSearchParams({})\n params.append('segments', 'null')\n params.append('a-b-testing', 'null')\n\n router.push(`${pathname}?${params.toString()}`, {\n scroll: false,\n })\n router.refresh()\n }\n\n return (\n
\n
\n {/* Logo & Text */}\n
\n
\n \n
\n
\n Adaptive Preview\n
\n
\n\n
\n
\n
\n Apply segment\n \n
\n \n \n \n {selectedSegment.body}\n \n \n \n \n \n \n {data?.items?.map((segment: any) => (\n \n {segment.body}\n \n ))}\n \n \n
\n\n
\n
\n Show A/B variant\n \n
\n\n \n \n \n Variant{' '}\n \n A\n \n \n \n Variant{' '}\n \n B\n \n \n
\n\n \n
\n
\n
\n )\n}\n","import React from \"react\";\n\nexport default function PreprLogo() {\n return (\n \n \n \n \n \n \n \n\n )\n}","import React from 'react'\nimport classNames from 'classnames'\nimport { FaRotate } from 'react-icons/fa6'\n\ninterface ResetButtonProps {\n enabled?: boolean\n handleClick?: () => void\n}\n\nexport default function ResetButton({\n enabled = false,\n handleClick,\n}: ResetButtonProps) {\n const classes = classNames(\n 'prp-py-3 prp-px-4 prp-flex prp-gap-2 prp-items-center rounded-md prp-regular-text h-10',\n enabled &&\n 'prp-bg-orange-400 hover:prp-orange-500 prp-cursor-pointer prp-text-white',\n !enabled && 'prp-bg-grey-400 prp-text-gray-500'\n )\n\n return (\n \n \n Reset\n \n )\n}\n","import { Popover, PopoverButton, PopoverPanel } from '@headlessui/react'\nimport { FaInfoCircle } from 'react-icons/fa'\nimport React from 'react'\nimport { FaArrowUpRightFromSquare } from 'react-icons/fa6'\n\ninterface InfoPopoverProps {\n title: string\n text: string\n link: string\n}\n\nexport default function InfoPopover({ title, text, link }: InfoPopoverProps) {\n return (\n \n \n \n \n \n
\n \n {title}\n \n
\n {text}\n \n Learn more \n \n
\n
\n \n
\n )\n}\n"],"mappings":";;;;AAEA,SAAS,aAAa,iBAAiB;AACvC,OAAOA,UAAS,gBAAgB;;;ACHhC,OAAO,WAAW;AAEH,SAAR,YAA6B;AAChC,SACI,oCAAC,SAAI,OAAM,MAAK,QAAO,MAAK,SAAQ,aAAY,MAAK,QAAO,OAAM,gCAC9D;AAAA,IAAC;AAAA;AAAA,MAAK,UAAS;AAAA,MAAU,UAAS;AAAA,MAC5B,GAAE;AAAA,MACF,MAAK;AAAA;AAAA,EAAO,GAClB;AAAA,IAAC;AAAA;AAAA,MAAK,UAAS;AAAA,MAAU,UAAS;AAAA,MAC5B,GAAE;AAAA,MACF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ACP,WAAU;AAAA;AAAA,MAIV,gBAAAA,OAAA,cAAC,UAAK,WAAU,uCAAoC,WACxC,GACZ;AAAA,MAAO;AAAA,IAEX;AAAA,EACJ,CACJ,GAEA,gBAAAA,OAAA;AAAA,IAAC;AAAA;AAAA,MACG,aAAa;AAAA,MACb,SACI,gBAAgB,gBAChB,oBAAoB;AAAA;AAAA,EAE5B,CACJ,CACJ,CACJ;AAER;","names":["React","React","React","React"]} \ No newline at end of file +{"version":3,"sources":["../src/components/PreprPreviewBar.tsx","../src/components/PreprLogo.tsx","../src/components/ResetButton.tsx","../src/components/InfoPopover.tsx"],"sourcesContent":["'use client'\n\nimport { usePathname, useRouter } from 'next/navigation'\nimport React, { useState } from 'react'\n\nimport '../main.css'\nimport PreprLogo from './PreprLogo'\nimport ResetButton from './ResetButton'\nimport {\n Listbox,\n ListboxButton,\n ListboxOption,\n ListboxOptions,\n Radio,\n RadioGroup,\n} from '@headlessui/react'\nimport { FaCaretDown } from 'react-icons/fa6'\nimport InfoPopover from './InfoPopover'\n\nexport function PreprPreviewBar(props: {\n activeSegment?: string | null\n activeVariant?: string | null\n data?: any\n}) {\n const { activeSegment, activeVariant, data } = props\n\n if (\n data?.items &&\n data?.items[data?.items.length - 1].reference_id !== 'null'\n ) {\n data.items\n data.items.unshift({\n reference_id: 'null',\n body: 'All other users',\n })\n }\n\n const emptyVariant = 'A'\n const emptySegment = {\n body: 'Choose segment',\n }\n const [selectedSegment, setSelectedSegment] = useState(\n (data.items &&\n data.items.filter(\n (segmentData: any) => segmentData === activeSegment\n )[0]) ||\n emptySegment\n )\n\n const [selectedVariant, setSelectedVariant] = useState(\n activeVariant || 'A'\n )\n\n const router = useRouter()\n const pathname = usePathname()\n\n const handleUpdateVariant = (variant: any) => {\n setSelectedVariant(variant)\n\n const params = new URLSearchParams({})\n\n params.append('a-b-testing', variant as string)\n\n router.push(`${pathname}?${params.toString()}`, {\n scroll: false,\n })\n router.refresh()\n }\n\n const handleUpdateSegment = (value: any) => {\n setSelectedSegment(value)\n\n const segment = value.reference_id\n\n if (!segment) {\n return\n }\n\n const params = new URLSearchParams({})\n\n if (segment !== 'Choose segment') {\n params.append('segments', segment as string)\n } else {\n params.append('segments', 'null')\n }\n\n router.push(`${pathname}?${params.toString()}`, {\n scroll: false,\n })\n router.refresh()\n }\n\n const handleReset = () => {\n setSelectedSegment(emptySegment)\n setSelectedVariant(emptyVariant)\n\n const params = new URLSearchParams({})\n params.append('segments', 'null')\n params.append('a-b-testing', 'null')\n\n router.push(`${pathname}?${params.toString()}`, {\n scroll: false,\n })\n router.refresh()\n }\n\n return (\n
\n
\n {/* Logo & Text */}\n
\n
\n \n
\n
\n Adaptive Preview\n
\n
\n\n
\n
\n
\n Apply segment\n \n
\n \n \n \n {selectedSegment.body}\n \n \n \n \n \n \n {data?.items?.map((segment: any) => (\n \n {segment.body}\n \n ))}\n \n \n
\n\n
\n
\n Show A/B variant\n \n
\n\n \n \n \n Variant{' '}\n \n A\n \n \n \n Variant{' '}\n \n B\n \n \n
\n\n \n
\n
\n
\n )\n}\n","import React from \"react\";\n\nexport default function PreprLogo() {\n return (\n \n \n \n \n \n \n \n\n )\n}","import React from 'react'\nimport classNames from 'classnames'\nimport { FaRotate } from 'react-icons/fa6'\n\ninterface ResetButtonProps {\n enabled?: boolean\n handleClick?: () => void\n}\n\nexport default function ResetButton({\n enabled = false,\n handleClick,\n}: ResetButtonProps) {\n const classes = classNames(\n 'prp-py-3 prp-px-4 prp-flex prp-gap-2 prp-items-center rounded-md prp-regular-text h-10',\n enabled &&\n 'prp-bg-orange-400 hover:prp-orange-500 prp-cursor-pointer prp-text-white',\n !enabled && 'prp-bg-grey-400 prp-text-gray-500'\n )\n\n return (\n \n \n Reset\n \n )\n}\n","import { Popover, PopoverButton, PopoverPanel } from '@headlessui/react'\nimport { FaInfoCircle } from 'react-icons/fa'\nimport React from 'react'\nimport { FaArrowUpRightFromSquare } from 'react-icons/fa6'\n\ninterface InfoPopoverProps {\n title: string\n text: string\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G,WAAU;AAAA,MACV,OAAO;AAAA,MACP,UAAU;AAAA;AAAA,IAEV,gBAAAA,OAAA;AAAA,MAAC;AAAA;AAAA,QACG,OAAO;AAAA,QACP,WAAU;AAAA;AAAA,MAIV,gBAAAA,OAAA,cAAC,UAAK,WAAU,uCAAoC,WACxC,GACZ;AAAA,MAAO;AAAA,IAEX;AAAA,IACA,gBAAAA,OAAA;AAAA,MAAC;AAAA;AAAA,QACG,OAAO;AAAA,QACP,WAAU;AAAA;AAAA,MAIV,gBAAAA,OAAA,cAAC,UAAK,WAAU,uCAAoC,WACxC,GACZ;AAAA,MAAO;AAAA,IAEX;AAAA,EACJ,CACJ,GAEA,gBAAAA,OAAA;AAAA,IAAC;AAAA;AAAA,MACG,aAAa;AAAA,MACb,SACI,gBAAgB,gBAChB,oBAAoB;AAAA;AAAA,EAE5B,CACJ,CACJ,CACJ;AAER;","names":["React","React","React","React"]} \ No newline at end of file diff --git a/package.json b/package.json index 224debb..64fe826 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@preprio/prepr-nextjs", - "version": "1.0.0-beta.13", + "version": "1.0.0-beta.14", "description": "A next.js package with code snippets to use with Prepr", "main": "./dist/index.js", "types": "./dist/index.d.ts", diff --git a/src/components/InfoPopover.tsx b/src/components/InfoPopover.tsx index 5688fbc..0ee6bef 100644 --- a/src/components/InfoPopover.tsx +++ b/src/components/InfoPopover.tsx @@ -6,10 +6,9 @@ import { FaArrowUpRightFromSquare } from 'react-icons/fa6' interface InfoPopoverProps { title: string text: string - link: string } -export default function InfoPopover({ title, text, link }: InfoPopoverProps) { +export default function InfoPopover({ title, text }: InfoPopoverProps) { return ( @@ -26,12 +25,6 @@ export default function InfoPopover({ title, text, link }: InfoPopoverProps) { diff --git a/src/components/PreprPreviewBar.tsx b/src/components/PreprPreviewBar.tsx index 5aad66d..1c8ade6 100644 --- a/src/components/PreprPreviewBar.tsx +++ b/src/components/PreprPreviewBar.tsx @@ -126,7 +126,6 @@ export function PreprPreviewBar(props: { text={ "Choose a segment to see how it's displayed." } - link={'Learn more'} />