@kreftforeningen/web-react 1.0.29 → 1.0.30

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/main.cjs.js CHANGED
@@ -4258,7 +4258,7 @@ ${r.map(([a,i])=>{const s=i.theme?.[n]||i.color;return s?` --kf-color-${a}: ${s
4258
4258
  .kf-footer__copyright-separator {
4259
4259
  margin-block: calc(var(--kf-spacing, 0.25rem) * 4);
4260
4260
  }
4261
- `;function Dee({className:e,children:t,...r}){return d.jsxs(d.Fragment,{children:[d.jsx(Tee,{}),d.jsx("footer",{"data-slot":"footer",className:P("dark kf-footer",e),...r,children:t})]})}function Aee({children:e}){return d.jsx("div",{className:"kf-footer__section kf-footer__actions",children:e})}function jee({children:e}){return d.jsx("div",{className:"kf-footer__section kf-footer__social",children:e})}function Iee({children:e}){return d.jsx("ul",{className:"kf-footer__section kf-footer__nav",children:e})}function Ree({children:e}){return d.jsx("li",{className:"kf-footer__nav-item",children:e})}function $ee({children:e,href:t}){return d.jsxs("a",{href:t,className:"kf-footer__link",children:[d.jsx(qo,{className:"w-4 h-4","aria-hidden":"true",focusable:"false"}),e]})}function Lee({children:e}){return d.jsx("div",{className:"kf-footer__section kf-footer__contact",children:e})}function Fee({children:e,href:t}){return d.jsx("a",{href:t,className:"kf-footer__contact-link",children:e})}function zee({children:e}){return d.jsxs("div",{className:"kf-footer__section kf-footer__copyright",children:[d.jsx(Va,{className:"kf-footer__copyright-separator"}),e]})}const Ei="[data-kreftforeningen-web-react]",Bee={theme:"system",setTheme:()=>null},hN=_.createContext(Bee);function Wee(e){if(e.includes(Ei))return e;const t=e.trim();return t==="html"||t==="body"?Ei:t.startsWith("html ")||t.startsWith("body ")?`${Ei} ${t.slice(t.indexOf(" ")+1)}`:e.includes(":root")?e.replace(/:root/g,Ei):`${Ei} ${e}`}function Hee(e){e.type!=="rule"||!Array.isArray(e.props)||typeof e.parent?.value=="string"&&e.parent.value.includes("@keyframes")||(e.props=e.props.map(Wee))}function Vee({children:e,defaultTheme:t="system",storageKey:r="vite-ui-theme"}){const[n,o]=_.useState(()=>typeof window>"u"?t:localStorage.getItem(r)||t),a=_.useSyncExternalStore(c=>{if(typeof window>"u")return()=>{};const l=window.matchMedia("(prefers-color-scheme: dark)");return l.addEventListener("change",c),()=>l.removeEventListener("change",c)},()=>typeof window>"u"?!1:window.matchMedia("(prefers-color-scheme: dark)").matches,()=>!1),i=_.useMemo(()=>n==="system"?a?"dark":"light":n,[a,n]),s={theme:n,setTheme:c=>{localStorage.setItem(r,c),o(c)}};return d.jsx(yI,{stylisPlugins:[Hee],children:d.jsx("div",{"data-kreftforeningen-web-react":!0,className:i,children:d.jsx(hN.Provider,{value:s,children:e})})})}const o0=()=>{const e=_.useContext(hN);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e},Gee=ce`
4261
+ `;function Dee({className:e,children:t,...r}){return d.jsxs(d.Fragment,{children:[d.jsx(Tee,{}),d.jsx("footer",{"data-slot":"footer",className:P("dark kf-footer",e),...r,children:t})]})}function Aee({children:e}){return d.jsx("div",{className:"kf-footer__section kf-footer__actions",children:e})}function jee({children:e}){return d.jsx("div",{className:"kf-footer__section kf-footer__social",children:e})}function Iee({children:e}){return d.jsx("ul",{className:"kf-footer__section kf-footer__nav",children:e})}function Ree({children:e}){return d.jsx("li",{className:"kf-footer__nav-item",children:e})}function $ee({children:e,href:t}){return d.jsxs("a",{href:t,className:"kf-footer__link",children:[d.jsx(qo,{className:"w-4 h-4","aria-hidden":"true",focusable:"false"}),e]})}function Lee({children:e}){return d.jsx("div",{className:"kf-footer__section kf-footer__contact",children:e})}function Fee({children:e,href:t}){return d.jsx("a",{href:t,className:"kf-footer__contact-link",children:e})}function zee({children:e}){return d.jsxs("div",{className:"kf-footer__section kf-footer__copyright",children:[d.jsx(Va,{className:"kf-footer__copyright-separator"}),e]})}const Ei="[data-kreftforeningen-web-react]",Bee={theme:"system",setTheme:()=>null},hN=_.createContext(Bee);function Wee(e){if(e.includes(Ei))return e;const t=e.trim();return t==="html"||t==="body"?Ei:t.startsWith("html ")||t.startsWith("body ")?`${Ei} ${t.slice(t.indexOf(" ")+1)}`:e.includes(":root")?e.replace(/:root/g,Ei):`${Ei} ${e}`}function Hee(e){e.type!=="rule"||!Array.isArray(e.props)||typeof e.parent?.value=="string"&&e.parent.value.includes("@keyframes")||(e.props=e.props.map(Wee))}function Vee({children:e,defaultTheme:t="system",storageKey:r="vite-ui-theme"}){const[n,o]=_.useState(()=>typeof window>"u"?t:localStorage.getItem(r)||t),a=_.useSyncExternalStore(c=>{if(typeof window>"u")return()=>{};const l=window.matchMedia("(prefers-color-scheme: dark)");return l.addEventListener("change",c),()=>l.removeEventListener("change",c)},()=>typeof window>"u"?!1:window.matchMedia("(prefers-color-scheme: dark)").matches,()=>!1),i=_.useMemo(()=>n==="system"?a?"dark":"light":n,[a,n]);_.useEffect(()=>{const c=window.document.body;return c.setAttribute("data-kreftforeningen-web-react",""),c.classList.remove("light","dark"),c.classList.add(i),()=>{c.removeAttribute("data-kreftforeningen-web-react"),c.classList.remove("light","dark")}},[i]);const s={theme:n,setTheme:c=>{localStorage.setItem(r,c),o(c)}};return d.jsx(yI,{stylisPlugins:[Hee],children:d.jsx("div",{"data-kreftforeningen-web-react":!0,className:i,children:d.jsx(hN.Provider,{value:s,children:e})})})}const o0=()=>{const e=_.useContext(hN);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e},Gee=ce`
4262
4262
  .kf-input {
4263
4263
  display: inline-flex;
4264
4264
  align-items: center;
package/dist/main.es.js CHANGED
@@ -30791,7 +30791,14 @@ function lce({
30791
30791
  ), i = vr(
30792
30792
  () => n === "system" ? a ? "dark" : "light" : n,
30793
30793
  [a, n]
30794
- ), s = {
30794
+ );
30795
+ st(() => {
30796
+ const c = window.document.body;
30797
+ return c.setAttribute("data-kreftforeningen-web-react", ""), c.classList.remove("light", "dark"), c.classList.add(i), () => {
30798
+ c.removeAttribute("data-kreftforeningen-web-react"), c.classList.remove("light", "dark");
30799
+ };
30800
+ }, [i]);
30801
+ const s = {
30795
30802
  theme: n,
30796
30803
  setTheme: (c) => {
30797
30804
  localStorage.setItem(r, c), o(c);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kreftforeningen/web-react",
3
- "version": "1.0.29",
3
+ "version": "1.0.30",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"