@sprig-technologies/sprig-bundled 2.40.1 → 2.40.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,5 +1,5 @@
1
- import { a as s, c as y, u as C, F as W, h as U, p as O, _ as P, e as H, r as X, g as $, y as Z, s as Q } from "./view-JArMqSNr.js";
2
- import { j as G, k as J, l as Y, m as ee, E as M } from "./index-BZjOqtTO.js";
1
+ import { a as s, c as y, u as C, F as W, h as U, p as O, _ as P, e as H, r as X, g as $, y as Z, s as Q } from "./view-CwyS6VJ8.js";
2
+ import { j as G, k as J, l as Y, m as ee, E as M } from "./index-B-1ZVEfz.js";
3
3
  const te = (e) => s("button", { ...e, className: y("ul-card-text__button", e.className), id: "ul-card-text__button" }), oe = ({ html: e, ...i }) => {
4
4
  const { enableCspTrustedTypes: r } = C((o) => ({ enableCspTrustedTypes: o.enableCspTrustedTypes })), t = W(() => G(e, r), [r, e]);
5
5
  return s("div", { ...i, dangerouslySetInnerHTML: { __html: t } });
@@ -1,4 +1,4 @@
1
- "use strict";const e=require("./view-CRNTl40s.cjs"),k=require("./index-D7xIZ9_C.cjs"),_=t=>e.u("button",{...t,className:e.cc("ul-card-text__button",t.className),id:"ul-card-text__button"}),q=({html:t,...i})=>{const{enableCspTrustedTypes:r}=e.useConfig(n=>({enableCspTrustedTypes:n.enableCspTrustedTypes})),o=e.F(()=>k.getHtml(t,r),[r,t]);return e.u("div",{...i,dangerouslySetInnerHTML:{__html:o}})},L=()=>{const{viewDocument:t}=e.useConfig(o=>({viewDocument:o.viewDocument})),[i,r]=e.h(!1);return e.p(()=>{const o=t.querySelector(".sprig-question-body"),n=new ResizeObserver(()=>{window.requestAnimationFrame(()=>{r(!!(o&&k.isHTMLElement(o)&&o.scrollHeight>o.offsetHeight))})});return o&&n.observe(o),()=>{o&&n.disconnect()}},[t]),i},R=({plainText:t,richText:i,id:r,className:o,isHeader:n,showAsterisk:c})=>i?e.u(q,{className:o,html:i,id:r}):t?n?e.u("h1",{className:o,id:r,children:[t,c&&"*"]}):e.u("p",{className:o,id:r,children:t}):null,j=()=>e.u("svg",{fill:"none",height:"10",viewBox:"0 0 13 10",width:"13",xmlns:"http://www.w3.org/2000/svg",children:e.u("path",{d:"M11.5 1.5L4.5 8.5L1 5",stroke:"#FFFFFF",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})}),M=(t,i)=>{const r=e._(0);return()=>{if(t.current){const o=t.current;o.style.height="1px";const n=o.scrollHeight+(o.offsetHeight-o.clientHeight),c=parseInt(window.getComputedStyle(o).getPropertyValue("max-height")),s=n<=c?n:c;r.current!==s&&requestAnimationFrame(()=>{i()}),r.current=s,o.style.height=`${s}px`}}},U=({buttonText:t="View Prototype",handleClick:i})=>e.u("button",{className:"prototype-button",onClick:i,children:t},"prototype-btn"),P=({isSelected:t,id:i,divId:r,themeColor:o,disabled:n=!1})=>e.u("div",{"aria-checked":t,"aria-disabled":n,"aria-labelledby":`label-${i}`,className:"select-checkbox",id:r,role:"checkbox",style:{...t?{backgroundColor:o,borderColor:o,boxShadow:"none"}:{},...n?{opacity:.5}:{}},tabIndex:n?-1:0,children:t&&e.u(e.SvgCheckmark,{})}),W=({promptText:t,textValue:i,onTextChange:r,useMobileStyling:o})=>{const n=e._(null),{update:c}=e.useConfig(l=>({update:l.update})),s=M(n,()=>c());return e.p(()=>(s(),n.current&&n.current.focus(),()=>{c()}),[]),e.u("textarea",{"aria-label":t,"aria-multiline":"true","aria-placeholder":t,className:e.cc(e.getClasses("choice-text-input",o)),"data-gramm":"false",maxLength:5e3,name:"text",onChange:l=>{s(),l.stopPropagation(),r(l.currentTarget.value)},onClick:l=>{l.stopPropagation()},onKeyPress:l=>{l.stopPropagation()},placeholder:t,ref:n,role:"textbox",rows:1,value:i})},$="ul-select-style-element",O="ul-select-active-dynamic-style",A="ul-select-error-dynamic-style",K=(t,i,r)=>{let o=t.getElementById($),n=!1;o||(o=t.createElement("style"),n=!0),o.tagName.toLowerCase()==="style"&&(o.id=$,r&&(o.nonce=r),o.textContent=X(i),n&&t.head.appendChild(o))},X=t=>`
1
+ "use strict";const e=require("./view-IVflCEcd.cjs"),k=require("./index-B0SmBCWR.cjs"),_=t=>e.u("button",{...t,className:e.cc("ul-card-text__button",t.className),id:"ul-card-text__button"}),q=({html:t,...i})=>{const{enableCspTrustedTypes:r}=e.useConfig(n=>({enableCspTrustedTypes:n.enableCspTrustedTypes})),o=e.F(()=>k.getHtml(t,r),[r,t]);return e.u("div",{...i,dangerouslySetInnerHTML:{__html:o}})},L=()=>{const{viewDocument:t}=e.useConfig(o=>({viewDocument:o.viewDocument})),[i,r]=e.h(!1);return e.p(()=>{const o=t.querySelector(".sprig-question-body"),n=new ResizeObserver(()=>{window.requestAnimationFrame(()=>{r(!!(o&&k.isHTMLElement(o)&&o.scrollHeight>o.offsetHeight))})});return o&&n.observe(o),()=>{o&&n.disconnect()}},[t]),i},R=({plainText:t,richText:i,id:r,className:o,isHeader:n,showAsterisk:c})=>i?e.u(q,{className:o,html:i,id:r}):t?n?e.u("h1",{className:o,id:r,children:[t,c&&"*"]}):e.u("p",{className:o,id:r,children:t}):null,j=()=>e.u("svg",{fill:"none",height:"10",viewBox:"0 0 13 10",width:"13",xmlns:"http://www.w3.org/2000/svg",children:e.u("path",{d:"M11.5 1.5L4.5 8.5L1 5",stroke:"#FFFFFF",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})}),M=(t,i)=>{const r=e._(0);return()=>{if(t.current){const o=t.current;o.style.height="1px";const n=o.scrollHeight+(o.offsetHeight-o.clientHeight),c=parseInt(window.getComputedStyle(o).getPropertyValue("max-height")),s=n<=c?n:c;r.current!==s&&requestAnimationFrame(()=>{i()}),r.current=s,o.style.height=`${s}px`}}},U=({buttonText:t="View Prototype",handleClick:i})=>e.u("button",{className:"prototype-button",onClick:i,children:t},"prototype-btn"),P=({isSelected:t,id:i,divId:r,themeColor:o,disabled:n=!1})=>e.u("div",{"aria-checked":t,"aria-disabled":n,"aria-labelledby":`label-${i}`,className:"select-checkbox",id:r,role:"checkbox",style:{...t?{backgroundColor:o,borderColor:o,boxShadow:"none"}:{},...n?{opacity:.5}:{}},tabIndex:n?-1:0,children:t&&e.u(e.SvgCheckmark,{})}),W=({promptText:t,textValue:i,onTextChange:r,useMobileStyling:o})=>{const n=e._(null),{update:c}=e.useConfig(l=>({update:l.update})),s=M(n,()=>c());return e.p(()=>(s(),n.current&&n.current.focus(),()=>{c()}),[]),e.u("textarea",{"aria-label":t,"aria-multiline":"true","aria-placeholder":t,className:e.cc(e.getClasses("choice-text-input",o)),"data-gramm":"false",maxLength:5e3,name:"text",onChange:l=>{s(),l.stopPropagation(),r(l.currentTarget.value)},onClick:l=>{l.stopPropagation()},onKeyPress:l=>{l.stopPropagation()},placeholder:t,ref:n,role:"textbox",rows:1,value:i})},$="ul-select-style-element",O="ul-select-active-dynamic-style",A="ul-select-error-dynamic-style",K=(t,i,r)=>{let o=t.getElementById($),n=!1;o||(o=t.createElement("style"),n=!0),o.tagName.toLowerCase()==="style"&&(o.id=$,r&&(o.nonce=r),o.textContent=X(i),n&&t.head.appendChild(o))},X=t=>`
2
2
  .${O} {
3
3
  border-color: ${t};
4
4
  }