@sprig-technologies/sprig-bundled 2.41.0 → 2.41.2

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";const e=require("./view-Btk1gSAI.cjs"),k=require("./index-DZZhe9UA.cjs"),_=t=>e.u("button",{...t,className:e.cc("ul-card-text__button",t.className),id:"ul-card-text__button"}),q=({html:t,...o})=>{const{enableCspTrustedTypes:s}=e.useConfig(i=>({enableCspTrustedTypes:i.enableCspTrustedTypes})),n=e.F(()=>k.getHtml(t,s),[s,t]);return e.u("div",{...o,dangerouslySetInnerHTML:{__html:n}})},L=()=>{const{viewDocument:t}=e.useConfig(n=>({viewDocument:n.viewDocument})),[o,s]=e.h(!1);return e.p(()=>{const n=t.querySelector(".sprig-question-body"),i=new ResizeObserver(()=>{window.requestAnimationFrame(()=>{s(!!(n&&k.isHTMLElement(n)&&n.scrollHeight>n.offsetHeight))})});return n&&i.observe(n),()=>{n&&i.disconnect()}},[t]),o},R=({plainText:t,richText:o,id:s,className:n,isHeader:i,showAsterisk:c})=>o?e.u(q,{className:n,html:o,id:s}):t?i?e.u("h1",{className:n,id:s,children:[t,c&&"*"]}):e.u("p",{className:n,id:s,children:t}):null,z=()=>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"})}),P=(t,o)=>{const s=e._(0);return()=>{if(t.current){const n=t.current;n.style.height="1px";const i=n.scrollHeight+(n.offsetHeight-n.clientHeight),c=parseInt(window.getComputedStyle(n).getPropertyValue("max-height")),r=i<=c?i:c;s.current!==r&&requestAnimationFrame(()=>{o()}),s.current=r,n.style.height=`${r}px`}}},U=({buttonText:t="View Prototype",handleClick:o})=>e.u("button",{className:"prototype-button",onClick:o,children:t},"prototype-btn"),M=({isSelected:t,id:o,divId:s,themeColor:n,disabled:i=!1})=>e.u("div",{"aria-checked":t,"aria-disabled":i,"aria-labelledby":`label-${o}`,className:"select-checkbox",id:s,role:"checkbox",style:{...t?{backgroundColor:n,borderColor:n,boxShadow:"none"}:{},...i?{opacity:.5}:{}},tabIndex:i?-1:0,children:t&&e.u(e.SvgCheckmark,{})}),W=({promptText:t,textValue:o,onTextChange:s,useMobileStyling:n})=>{const i=e._(null),{update:c}=e.useConfig(l=>({update:l.update})),r=P(i,()=>c());return e.p(()=>(r(),i.current&&i.current.focus(),()=>{c()}),[]),e.u("textarea",{"aria-label":t,"aria-multiline":"true","aria-placeholder":t,className:e.cc(e.getClasses("choice-text-input",n)),"data-gramm":"false",maxLength:5e3,name:"text",onChange:l=>{r(),l.stopPropagation(),s(l.currentTarget.value)},onClick:l=>{l.stopPropagation()},onKeyPress:l=>{l.stopPropagation()},placeholder:t,ref:i,role:"textbox",rows:1,value:o})},$="ul-select-style-element",O="ul-select-active-dynamic-style",A="ul-select-error-dynamic-style",K=(t,o,s)=>{let n=t.getElementById($),i=!1;n||(n=t.createElement("style"),i=!0),n.tagName.toLowerCase()==="style"&&(n.id=$,s&&(n.nonce=s),n.textContent=X(o),i&&t.head.appendChild(n))},X=t=>`
1
+ "use strict";const e=require("./view-DunMtls8.cjs"),k=require("./index-DEIb7Tgo.cjs"),_=t=>e.u("button",{...t,className:e.cc("ul-card-text__button",t.className),id:"ul-card-text__button"}),q=({html:t,...o})=>{const{enableCspTrustedTypes:s}=e.useConfig(i=>({enableCspTrustedTypes:i.enableCspTrustedTypes})),n=e.F(()=>k.getHtml(t,s),[s,t]);return e.u("div",{...o,dangerouslySetInnerHTML:{__html:n}})},L=()=>{const{viewDocument:t}=e.useConfig(n=>({viewDocument:n.viewDocument})),[o,s]=e.h(!1);return e.p(()=>{const n=t.querySelector(".sprig-question-body"),i=new ResizeObserver(()=>{window.requestAnimationFrame(()=>{s(!!(n&&k.isHTMLElement(n)&&n.scrollHeight>n.offsetHeight))})});return n&&i.observe(n),()=>{n&&i.disconnect()}},[t]),o},R=({plainText:t,richText:o,id:s,className:n,isHeader:i,showAsterisk:c})=>o?e.u(q,{className:n,html:o,id:s}):t?i?e.u("h1",{className:n,id:s,children:[t,c&&"*"]}):e.u("p",{className:n,id:s,children:t}):null,z=()=>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"})}),P=(t,o)=>{const s=e._(0);return()=>{if(t.current){const n=t.current;n.style.height="1px";const i=n.scrollHeight+(n.offsetHeight-n.clientHeight),c=parseInt(window.getComputedStyle(n).getPropertyValue("max-height")),r=i<=c?i:c;s.current!==r&&requestAnimationFrame(()=>{o()}),s.current=r,n.style.height=`${r}px`}}},U=({buttonText:t="View Prototype",handleClick:o})=>e.u("button",{className:"prototype-button",onClick:o,children:t},"prototype-btn"),M=({isSelected:t,id:o,divId:s,themeColor:n,disabled:i=!1})=>e.u("div",{"aria-checked":t,"aria-disabled":i,"aria-labelledby":`label-${o}`,className:"select-checkbox",id:s,role:"checkbox",style:{...t?{backgroundColor:n,borderColor:n,boxShadow:"none"}:{},...i?{opacity:.5}:{}},tabIndex:i?-1:0,children:t&&e.u(e.SvgCheckmark,{})}),W=({promptText:t,textValue:o,onTextChange:s,useMobileStyling:n})=>{const i=e._(null),{update:c}=e.useConfig(l=>({update:l.update})),r=P(i,()=>c());return e.p(()=>(r(),i.current&&i.current.focus(),()=>{c()}),[]),e.u("textarea",{"aria-label":t,"aria-multiline":"true","aria-placeholder":t,className:e.cc(e.getClasses("choice-text-input",n)),"data-gramm":"false",maxLength:5e3,name:"text",onChange:l=>{r(),l.stopPropagation(),s(l.currentTarget.value)},onClick:l=>{l.stopPropagation()},onKeyPress:l=>{l.stopPropagation()},placeholder:t,ref:i,role:"textbox",rows:1,value:o})},$="ul-select-style-element",O="ul-select-active-dynamic-style",A="ul-select-error-dynamic-style",K=(t,o,s)=>{let n=t.getElementById($),i=!1;n||(n=t.createElement("style"),i=!0),n.tagName.toLowerCase()==="style"&&(n.id=$,s&&(n.nonce=s),n.textContent=X(o),i&&t.head.appendChild(n))},X=t=>`
2
2
  .${O} {
3
3
  border-color: ${t};
4
4
  }
@@ -1,5 +1,5 @@
1
- import { a as r, c as y, u as C, F as W, h as U, p as O, _ as P, e as H, v as X, g as $, y as Z, x as Q } from "./view-BHOd3THT.js";
2
- import { j as G, k as J, l as Y, m as ee, E as M } from "./index-YBebm7NT.js";
1
+ import { a as r, c as y, u as C, F as W, h as U, p as O, _ as P, e as H, v as X, g as $, y as Z, x as Q } from "./view-E1bmiI1s.js";
2
+ import { j as G, k as J, l as Y, m as ee, E as M } from "./index-BiIngDfi.js";
3
3
  const te = (e) => r("button", { ...e, className: y("ul-card-text__button", e.className), id: "ul-card-text__button" }), oe = ({ html: e, ...t }) => {
4
4
  const { enableCspTrustedTypes: s } = C((i) => ({ enableCspTrustedTypes: i.enableCspTrustedTypes })), o = W(() => G(e, s), [s, e]);
5
5
  return r("div", { ...t, dangerouslySetInnerHTML: { __html: o } });