@tempots/beatui 0.54.1 → 0.54.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.
- package/dist/{2019-i1LHsYdK.js → 2019-ByDeUdzE.js} +2 -2
- package/dist/{2019-5RIscTOv.cjs → 2019-DzVg1z5j.cjs} +1 -1
- package/dist/{2020-DeCezjWf.cjs → 2020-C2cAo3Kx.cjs} +1 -1
- package/dist/{2020-S7qY95wq.js → 2020-P72Z0RIB.js} +2 -2
- package/dist/{ar-BqnDsD9v.cjs → ar-128v2WAg.cjs} +1 -1
- package/dist/{ar-DrBp_VwJ.js → ar-jKiWO1bA.js} +1 -1
- package/dist/auth/index.cjs.js +1 -1
- package/dist/auth/index.es.js +4 -4
- package/dist/beatui.css +0 -5
- package/dist/beatui.tailwind.css +0 -5
- package/dist/{colors-tmKn7dR5.cjs → colors-B9fcMxa_.cjs} +1 -1
- package/dist/{colors-BW19rWA1.js → colors-pQZlNrwM.js} +27 -25
- package/dist/{de-B5oZoraI.js → de-CsZH8Z4V.js} +1 -1
- package/dist/{de-C_N0wtxQ.cjs → de-Doo_UynL.cjs} +1 -1
- package/dist/{es-JnLMDtzg.cjs → es-C6ksQm_M.cjs} +1 -1
- package/dist/{es-DRc5dc_G.js → es-DHzABlc2.js} +1 -1
- package/dist/{fa-BC16IdRL.cjs → fa-C0ZVnkuX.cjs} +1 -1
- package/dist/{fa-B0VDVs5B.js → fa-Rlsar6Fo.js} +1 -1
- package/dist/{fr-DXlfWwI6.js → fr-DzrAiW9Q.js} +1 -1
- package/dist/{fr-BupZ6YnU.cjs → fr-eyQiRZu8.cjs} +1 -1
- package/dist/{he-BX-Az8As.js → he-B3ehch8T.js} +1 -1
- package/dist/{he-C-aQ2yoO.cjs → he-fifXa9Ks.cjs} +1 -1
- package/dist/{hi-w4uL7LN1.js → hi-B90ZON10.js} +1 -1
- package/dist/{hi-L3y3Aedb.cjs → hi-BBbV2iwE.cjs} +1 -1
- package/dist/{index-DKwuTFYj.js → index-BQear_Jy.js} +3 -3
- package/dist/{index-CyoxPiTg.js → index-BWMybo2K.js} +1 -1
- package/dist/{index-CkNcU-jd.cjs → index-Be-6-fQW.cjs} +2 -2
- package/dist/{index-C_71zSeN.cjs → index-BwkYjXhr.cjs} +1 -1
- package/dist/{index-DNUXf4K4.js → index-CSv_TMiz.js} +1 -1
- package/dist/{index-CFOxIBGJ.cjs → index-Cj2zgGLp.cjs} +1 -1
- package/dist/{index-C_a29dA7.js → index-CpZh_Snx.js} +1 -1
- package/dist/{index-BD2yYgsi.cjs → index-CyyNsVT9.cjs} +1 -1
- package/dist/{index-BnQvOXw8.js → index-Kox58YHG.js} +6 -6
- package/dist/{index-B7gVxeO9.cjs → index-aFA1CLKZ.cjs} +1 -1
- package/dist/index.cjs.js +2 -2
- package/dist/index.es.js +23 -21
- package/dist/{it-CnHaoq-X.cjs → it-CEM-R_5J.cjs} +1 -1
- package/dist/{it-BCKQ5Tu8.js → it-WOitrlIv.js} +1 -1
- package/dist/{ja-DpDF4IgX.cjs → ja-CWzwG1fp.cjs} +1 -1
- package/dist/{ja-DC47Nkza.js → ja-jVLb-kyU.js} +1 -1
- package/dist/json-schema/index.cjs.js +1 -1
- package/dist/json-schema/index.es.js +1 -1
- package/dist/{ko-ejUHA0Sw.js → ko-CUpM9wfr.js} +1 -1
- package/dist/{ko-BMmVJHzm.cjs → ko-DV2NgunR.cjs} +1 -1
- package/dist/{modal-CKyUdeEz.js → modal-C4x5C70f.js} +2 -2
- package/dist/{modal-rou7pM0r.cjs → modal-C5xWtKaZ.cjs} +1 -1
- package/dist/{nl-WjgpPUel.js → nl-BFLwQeEn.js} +1 -1
- package/dist/{nl-viDlnQWK.cjs → nl-C_MHm9AB.cjs} +1 -1
- package/dist/{notice-MF7whf3_.cjs → notice-BhxWf3Dh.cjs} +1 -1
- package/dist/{notice-BS0d903Q.js → notice-DdYpd69I.js} +1 -1
- package/dist/{pl-Vrfv_fGt.cjs → pl-Dcgxv0xK.cjs} +1 -1
- package/dist/{pl-Cw4CYjK_.js → pl-dlo59Xei.js} +1 -1
- package/dist/prosemirror/index.cjs.js +1 -1
- package/dist/prosemirror/index.es.js +1 -1
- package/dist/{pt-CxQV74vS.cjs → pt-As8BblbM.cjs} +1 -1
- package/dist/{pt-B4Rh_ZBF.js → pt-CqkhyKon.js} +1 -1
- package/dist/{ru-DFHsLJ9b.js → ru-DOl7nkP-.js} +1 -1
- package/dist/{ru-BB3GRr_J.cjs → ru-Du4sI8M1.cjs} +1 -1
- package/dist/tailwind/index.cjs.js +1 -1
- package/dist/tailwind/index.es.js +1 -1
- package/dist/tailwind/preset.cjs.js +1 -1
- package/dist/tailwind/preset.es.js +2 -2
- package/dist/tailwind/vite-plugin.cjs.js +1 -1
- package/dist/tailwind/vite-plugin.es.js +1 -1
- package/dist/{toolbar-DRdm9W7H.cjs → toolbar-BnaquvB9.cjs} +1 -1
- package/dist/{toolbar-D2J_NkKD.js → toolbar-Czc8cSjl.js} +1 -1
- package/dist/{tr-Dbktyawl.js → tr-3O7PDT8q.js} +1 -1
- package/dist/{tr-mBiHcEl1.cjs → tr-DTLlM4Pf.cjs} +1 -1
- package/dist/{translations-CaTkLRHu.js → translations-B3P1v3E6.js} +2 -2
- package/dist/{translations-ggnrzaCG.cjs → translations-BH2Dg5AP.cjs} +1 -1
- package/dist/{translations-CpTeFtvW.js → translations-CsO0g7yz.js} +1 -1
- package/dist/{translations-h_OJS1Ut.cjs → translations-DZWe3znu.cjs} +1 -1
- package/dist/types/components/auth/social-login-button.d.ts +1 -1
- package/dist/types/components/auth/types.d.ts +3 -3
- package/dist/types/components/button/button.d.ts +3 -3
- package/dist/types/components/button/close-button.d.ts +3 -3
- package/dist/types/components/data/badge.d.ts +3 -3
- package/dist/types/components/data/icon.d.ts +1 -1
- package/dist/types/components/form/input/appearance-selector.d.ts +1 -1
- package/dist/types/components/form/input/create-temporal-input.d.ts +1 -1
- package/dist/types/components/form/input/duration-input.d.ts +1 -1
- package/dist/types/components/form/input/input-container.d.ts +1 -1
- package/dist/types/components/form/input/instant-input.d.ts +1 -1
- package/dist/types/components/form/input/nullable-duration-input.d.ts +1 -1
- package/dist/types/components/form/input/nullable-instant-input.d.ts +1 -1
- package/dist/types/components/form/input/nullable-plain-month-day-input.d.ts +1 -1
- package/dist/types/components/form/input/nullable-rating-input.d.ts +1 -1
- package/dist/types/components/form/input/nullable-zoned-date-time-input.d.ts +1 -1
- package/dist/types/components/form/input/plain-month-day-input.d.ts +1 -1
- package/dist/types/components/form/input/rating-input.d.ts +1 -1
- package/dist/types/components/form/input/switch.d.ts +1 -1
- package/dist/types/components/form/input/zoned-date-time-input.d.ts +1 -1
- package/dist/types/components/json-schema/validation/async-validation.d.ts +1 -1
- package/dist/types/components/json-schema/validation/conditional-validation.d.ts +1 -1
- package/dist/types/components/json-schema/validation/cross-field-validation.d.ts +1 -1
- package/dist/types/components/json-schema/widgets/string-controls.d.ts +1 -1
- package/dist/types/components/layout/action-card.d.ts +1 -1
- package/dist/types/components/layout/card.d.ts +1 -1
- package/dist/types/components/layout/sink.d.ts +1 -1
- package/dist/types/components/misc/notification-provider.d.ts +2 -2
- package/dist/types/components/misc/notification.d.ts +2 -2
- package/dist/types/components/monaco/monaco-editor-input.d.ts +1 -1
- package/dist/types/components/navigation/link/button-link.d.ts +3 -3
- package/dist/types/components/navigation/link/link.d.ts +1 -1
- package/dist/types/components/navigation/tabs/tabs.d.ts +2 -2
- package/dist/types/components/navigation/toolbar/toolbar.d.ts +1 -1
- package/dist/types/components/overlay/announcement-bar.d.ts +1 -1
- package/dist/types/components/overlay/ribbon.d.ts +1 -1
- package/dist/types/components/theme/style-utils.d.ts +2 -2
- package/dist/types/components/theme/types.d.ts +1 -1
- package/dist/types/tokens/colors.d.ts +3 -3
- package/dist/{ur-Cqh7AYnd.js → ur-DB8mA3fq.js} +1 -1
- package/dist/{ur-CZ5sgUP1.cjs → ur-DRhqXQpq.cjs} +1 -1
- package/dist/{utils-w_vUChhV.js → utils-CPZHwfiH.js} +15 -5
- package/dist/{utils-U1aNOU3o.cjs → utils-DCa_lhhW.cjs} +1 -1
- package/dist/{vi-Ki_Urj_E.cjs → vi-D_MzLijT.cjs} +1 -1
- package/dist/{vi-CLBp2oaY.js → vi-vGJhQVsV.js} +1 -1
- package/dist/{zh-C78OkbS0.cjs → zh-CFMBeH1A.cjs} +1 -1
- package/dist/{zh-CT4aGkgD.js → zh-C_OkXlxM.js} +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { makeProviderMark as V, localStorageProp as j, computedOf as p, Use as R, html as f, attr as i, When as w, Fragment as y, aria as g, coalesce as H, style as D, prop as _, on as I, Value as $, Empty as L, WithElement as z, OnDispose as G, input as K, emitValue as S } from "@tempots/dom";
|
|
2
2
|
import { WhenInViewport as W, Query as J, ElementRect as Q } from "@tempots/ui";
|
|
3
|
-
import { b as Y, g as Z } from "./colors-
|
|
3
|
+
import { b as Y, g as Z } from "./colors-pQZlNrwM.js";
|
|
4
4
|
function X(t, {
|
|
5
5
|
units: e = ["B", "KB", "MB", "GB", "TB"],
|
|
6
6
|
decimalPlaces: n = 0,
|
|
@@ -799,7 +799,7 @@ function St({
|
|
|
799
799
|
const F = St({
|
|
800
800
|
defaultLocale: ot,
|
|
801
801
|
defaultMessages: et,
|
|
802
|
-
localeLoader: async (t) => (await nt(/* @__PURE__ */ Object.assign({ "./locales/ar.ts": () => import("./ar-
|
|
802
|
+
localeLoader: async (t) => (await nt(/* @__PURE__ */ Object.assign({ "./locales/ar.ts": () => import("./ar-jKiWO1bA.js"), "./locales/de.ts": () => import("./de-CsZH8Z4V.js"), "./locales/en.ts": () => Promise.resolve().then(() => tt), "./locales/es.ts": () => import("./es-DHzABlc2.js"), "./locales/fa.ts": () => import("./fa-Rlsar6Fo.js"), "./locales/fr.ts": () => import("./fr-DzrAiW9Q.js"), "./locales/he.ts": () => import("./he-B3ehch8T.js"), "./locales/hi.ts": () => import("./hi-B90ZON10.js"), "./locales/it.ts": () => import("./it-WOitrlIv.js"), "./locales/ja.ts": () => import("./ja-jVLb-kyU.js"), "./locales/ko.ts": () => import("./ko-CUpM9wfr.js"), "./locales/nl.ts": () => import("./nl-BFLwQeEn.js"), "./locales/pl.ts": () => import("./pl-dlo59Xei.js"), "./locales/pt.ts": () => import("./pt-CqkhyKon.js"), "./locales/ru.ts": () => import("./ru-DOl7nkP-.js"), "./locales/tr.ts": () => import("./tr-3O7PDT8q.js"), "./locales/ur.ts": () => import("./ur-DB8mA3fq.js"), "./locales/vi.ts": () => import("./vi-vGJhQVsV.js"), "./locales/zh.ts": () => import("./zh-C_OkXlxM.js") }), `./locales/${t}.ts`, 3)).default,
|
|
803
803
|
providerName: "BeatUII18n"
|
|
804
804
|
});
|
|
805
805
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./translations-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./translations-DZWe3znu.cjs"),s={signInTitle:"Sign In",signInButton:"Sign In",emailLabel:"Email",passwordLabel:"Password",rememberMeLabel:"Remember me",forgotPasswordLink:"Forgot password?",noAccountLink:"Don't have an account? Sign up",signUpTitle:"Sign Up",signUpButton:"Sign Up",nameLabel:"Name",confirmPasswordLabel:"Confirm Password",acceptTermsLabel:"I accept the terms and conditions",hasAccountLink:"Already have an account? Sign in",resetPasswordTitle:"Reset Password",resetPasswordButton:"Reset Password",resetPasswordDescription:"Enter your email to reset your password.",backToSignInLink:"Back to sign in",continueWithProvider:e=>`Continue with ${e}`,passwordStrengthWeak:"Weak",passwordStrengthFair:"Fair",passwordStrengthGood:"Good",passwordStrengthStrong:"Strong",orDivider:"or",error:"An error occurred",required:"Required",authenticationTitle:"Authentication"},o=Object.freeze(Object.defineProperty({__proto__:null,default:s},Symbol.toStringTag,{value:"Module"})),t=s,n="en",i=r.makeI18nProvider({defaultLocale:n,defaultMessages:t,localeLoader:async e=>(await r.__variableDynamicImportRuntimeHelper(Object.assign({"./locales/ar.ts":()=>Promise.resolve().then(()=>require("./ar-BsUm-TCn.cjs")),"./locales/de.ts":()=>Promise.resolve().then(()=>require("./de-BUFLEyKr.cjs")),"./locales/en.ts":()=>Promise.resolve().then(()=>o),"./locales/es.ts":()=>Promise.resolve().then(()=>require("./es-BxBeTRCv.cjs")),"./locales/fa.ts":()=>Promise.resolve().then(()=>require("./fa-DxPseW3g.cjs")),"./locales/fr.ts":()=>Promise.resolve().then(()=>require("./fr-Cdyopuz3.cjs")),"./locales/he.ts":()=>Promise.resolve().then(()=>require("./he-DarDNPn0.cjs")),"./locales/hi.ts":()=>Promise.resolve().then(()=>require("./hi-tATwsXJ6.cjs")),"./locales/it.ts":()=>Promise.resolve().then(()=>require("./it-BmFag7j0.cjs")),"./locales/ja.ts":()=>Promise.resolve().then(()=>require("./ja-Dj-bAKLf.cjs")),"./locales/ko.ts":()=>Promise.resolve().then(()=>require("./ko-BomUE-yQ.cjs")),"./locales/nl.ts":()=>Promise.resolve().then(()=>require("./nl-Dr-l6zUy.cjs")),"./locales/pl.ts":()=>Promise.resolve().then(()=>require("./pl-BK0i_yvq.cjs")),"./locales/pt.ts":()=>Promise.resolve().then(()=>require("./pt-oBMmVYcu.cjs")),"./locales/ru.ts":()=>Promise.resolve().then(()=>require("./ru-CtxMmoa6.cjs")),"./locales/tr.ts":()=>Promise.resolve().then(()=>require("./tr-CgJ8uhZu.cjs")),"./locales/ur.ts":()=>Promise.resolve().then(()=>require("./ur-DvqAg9gW.cjs")),"./locales/vi.ts":()=>Promise.resolve().then(()=>require("./vi-D5R3YcU0.cjs")),"./locales/zh.ts":()=>Promise.resolve().then(()=>require("./zh-CCGXcj5r.cjs"))}),`./locales/${e}.ts`,3)).default,providerName:"AuthI18n"});exports.AuthI18n=i;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const r=require("@tempots/dom"),C=require("@tempots/ui"),S=require("./colors-tmKn7dR5.cjs");function q(t,{units:e=["B","KB","MB","GB","TB"],decimalPlaces:n=0,locale:o}={}){if(t===0||t===0n)return new Intl.NumberFormat(o,{style:"unit",unit:"byte",unitDisplay:"short",maximumFractionDigits:0}).format(0).replace("byte",e[0]);let s,a;if(typeof t=="bigint"){let i=t<0n?-t:t;for(s=0;i>=1024n&&s<e.length-1;)i=i/1024n,s++;a=Number(t)/Math.pow(1024,s)}else s=Math.floor(Math.log(Math.abs(t))/Math.log(1024)),s=Math.min(s,e.length-1),a=t/Math.pow(1024,s);return new Intl.NumberFormat(o,{style:"unit",unit:"byte",unitDisplay:"short",minimumFractionDigits:s===0?0:n,maximumFractionDigits:s===0?0:n}).format(a).replace("byte",e[s])}const _={loadingExtended:"Loading, please wait",loadingShort:"Loading...",locale:"Locale",iconDescription:"Icon",loadingIcon:"Loading icon",failedToLoadIcon:"Failed to load icon",editLabel:"Edit",selectOne:"Select one",selectMany:"Select many",noResults:"No results",passwordPlaceholderText:"Secret Password",togglePasswordVisibility:"Toggle password visibility",toggleMenu:"Toggle menu",toggleAside:"Toggle aside",mainNavigation:"Main navigation",sidebar:"Sidebar",closeDrawer:"Close drawer",closeModal:"Close modal",confirm:"Confirm",cancel:"Cancel",addLabel:"Add",removeItem:"Remove item",currentLocale:"English",ar:"Arabic",de:"German",en:"English",es:"Spanish",fr:"French",hi:"Hindi",it:"Italian",ja:"Japanese",ko:"Korean",nl:"Dutch",pl:"Polish",pt:"Portuguese",ru:"Russian",tr:"Turkish",vi:"Vietnamese",zh:"Chinese",he:"Hebrew",fa:"Persian",ur:"Urdu",emailPlaceholderText:"Enter your email",incrementValue:"Increment value",decrementValue:"Decrement value",dropZoneInstructions:t=>t?"Click to choose or drag files here, or press Enter or Space to open file selector":"Drag files here",fileSizeUnits:["Bytes","KB","MB","GB","TB"],removeFile:"Remove file",clearAllFiles:"Clear all files",clearValue:"Reset",unknownType:"Unknown type",filesInputInstructions:(t,e,n)=>{let o=t==null||t>1?"Click to choose or drag files here":"Click to choose or drag a file here";if(t||e){const s=[];if(t!=null&&t>1&&s.push(`up to ${t} files`),e&&n){const a=q(e,{units:n});s.push(`max ${a} each`)}s.length>0&&(o+=` (${s.join(", ")})`)}return o},prosemirror:{bold:"Bold",italic:"Italic",code:"Inline code",link:"Insert link",removeLink:"Remove link",heading:t=>`Heading ${t}`,bulletList:"Bullet list",orderedList:"Ordered list",blockquote:"Blockquote",codeBlock:"Code block",horizontalRule:"Horizontal rule",linkUrlPlaceholder:"https://example.com"}},K=Object.freeze(Object.defineProperty({__proto__:null,default:_},Symbol.toStringTag,{value:"Module"})),M=_,V="en",$=(t,e,n)=>{const o=t[e];return o?typeof o=="function"?o():Promise.resolve(o):new Promise((s,a)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(a.bind(null,new Error("Unknown variable dynamic import: "+e+(e.split("/").length!==n?". Note that variables only represent file names one level deep.":""))))})},Y=new Set(["ar","he","fa","ur","ps","sd","ku","dv","yi","ji","iw","in"]);function y(t){if(!t)return"ltr";const e=t.split(/[-_]/)[0].toLowerCase();return Y.has(e)?"rtl":"ltr"}function O(t,e){return t==="auto"?y(e):t}function J(t){return`b-${t}`}function Q(t){return y(t)==="rtl"}function Z(t){return t==="ltr"?"rtl":"ltr"}const E={ltr:{"inline-start":"left","inline-end":"right","block-start":"top","block-end":"bottom"},rtl:{"inline-start":"right","inline-end":"left","block-start":"top","block-end":"bottom"}};function X(t,e){return E[e][t]}const T={mark:r.makeProviderMark("Locale"),create:t=>{const e=r.localStorageProp({defaultValue:navigator.language??"en-US",key:"beatui-locale"}),n=r.localStorageProp({defaultValue:"auto",key:"beatui-direction-preference"}),o=r.computedOf(e,n)((a,l)=>O(l,a));return{value:{locale:e,setLocale:a=>e.set(a),direction:o,directionPreference:n,setDirectionPreference:a=>n.set(a)},dispose:()=>{e.dispose(),n.dispose(),o.dispose()}}}},{variants:tt,special:et,overrides:I}=S.backgroundConfig;function m(t,e){switch(t){case"white":return"var(--color-white)";case"black":return"var(--color-black)";case"transparent":return"transparent";default:return S.getColorVar(t,e)}}function j(t,e){const n=et[t];if(!n)return;if(e==="light")return n;const o=I[t];return o?o[e]:n}function f(t,e,n){const o=I[t];if(o){const a=o[n];if(a)return{backgroundColor:a.backgroundColor,textColor:a.color}}if(e==="solid"){const a=j(t,n);if(a)return{backgroundColor:a.backgroundColor,textColor:a.color}}const s=tt[e][n];return{backgroundColor:m(t,s.bgShade),textColor:s.textColor}}const rt={light:{shade:600,textColor:"var(--color-white)"},dark:{shade:600,textColor:"var(--text-inverted-dark)"}},ot={light:{shade:300,textColor:"var(--text-normal-light)"},dark:{shade:700,textColor:"var(--text-normal-dark)"}},nt={light:{shade:400,textColor:"var(--text-normal-light)"},dark:{shade:600,textColor:"var(--text-normal-dark)"}};function b(t,e,n){const o=I[t];if(o){const a=o[n];if(a)return{backgroundColor:a.backgroundColor,textColor:a.color}}if(e==="solid"){const a=j(t,n);if(a)return{backgroundColor:a.backgroundColor,textColor:a.color};const l=rt[n];return{backgroundColor:m(t,l.shade),textColor:l.textColor}}const s=e==="light"?ot[n]:nt[n];return{backgroundColor:m(t,s.shade),textColor:s.textColor}}function w(t,e){const n=e==="light"?500:600;switch(t){case"white":return e==="light"?"var(--text-inverse-light)":"var(--text-inverted-dark)";case"black":return"var(--color-black)";case"transparent":return"transparent";default:return m(t,n)}}function p(t,e){return t==="white"?"var(--color-white)":t==="black"?"var(--color-black)":t==="transparent"?"inherit":m(t,e==="light"?800:200)}function B(t,e,n){return e==="soft"?m(t,n==="light"?300:700):m(t,n==="light"?500:600)}const at="bui-icons",k=new Map,P=(()=>{try{return typeof indexedDB<"u"&&indexedDB!==null}catch{return!1}})();function st(){return P?new Promise((t,e)=>{const n=indexedDB.open(at,1);n.onupgradeneeded=function(o){const s=o.target.result;s.objectStoreNames.contains("icons")||s.createObjectStore("icons")},n.onsuccess=function(){t(n.result)},n.onerror=function(){e(n.error)}}):Promise.reject(new Error("IndexedDB not available"))}const x=P?st():null;async function R(t,e){try{if(x){const n=await x;return new Promise((o,s)=>{const a=n.transaction("icons","readwrite");a.objectStore("icons").put(e,t),a.oncomplete=()=>o(),a.onerror=s})}else k.set(t,e)}catch{k.set(t,e)}}async function A(t){try{if(x){const e=await x;return new Promise((n,o)=>{const l=e.transaction("icons","readonly").objectStore("icons").get(t);l.onsuccess=function(){n(l.result)},l.onerror=o})}else return k.get(t)||null}catch{return k.get(t)||null}}async function lt(t){const e=`https://api.iconify.design/${t}.svg`;return fetch(e).then(n=>{if(n.status===200)return n.text();throw new Error(`Failed to load icon: ${t}`)})}async function it(t){const e=t.replace(":","/"),n=await A(e);if(n)return n;const o=await lt(e);return await R(e,o),o}function ct(t){return["bc-icon",`bc-icon--${t}`].join(" ")}function ut(t,e="solid"){if(!t)return"";const n=B(t,e,"light"),o=B(t,e,"dark");return`--icon-color: ${n}; --icon-color-dark: ${o}`}function L({icon:t,size:e="md",color:n,title:o,accessibility:s="auto",tone:a="solid"},...l){const c=r.computedOf(s,o)((i,u)=>i==="decorative"?!1:i==="informative"?!0:u!=null&&u!=="");return r.Use(D,i=>r.html.span(r.attr.class(r.computedOf(e,n)(u=>ct(u??"md"))),r.attr.style(r.computedOf(n,a)((u,g)=>ut(u??void 0,g??"solid"))),r.When(c,()=>r.Fragment(r.attr.role("img"),r.aria.label(r.coalesce(o,i.$.iconDescription))),()=>r.aria.hidden(!0)),C.WhenInViewport({once:!0},()=>C.Query({request:t,load:({request:u})=>it(u),convertError:String,success:({value:u})=>r.html.span(r.style.width("100%"),r.style.height("100%"),r.attr.innerHTML(u)),pending:()=>r.html.span(r.attr.class("animate-spin"),r.When(c,()=>r.Fragment(r.attr.role("img"),r.aria.label(i.$.loadingIcon)),()=>r.aria.hidden(!0)),"↻"),failure:({error:u})=>r.html.span(r.attr.title(u),r.attr.class("text-red-500"),r.When(c,()=>r.Fragment(r.attr.role("img"),r.aria.label(i.$.failedToLoadIcon)),()=>r.aria.hidden(!0)),"🚫")})),...l))}function F(t,e,n,o){const s=["bc-button",`bc-button--size-${t}`,`bc-control--padding-${t}`,`bc-control--rounded-${e}`];return n&&s.push("bc-button--loading"),o&&s.push("bc-button--full-width"),s.join(" ")}function N(t,e,n){const o=new Map;o.set("--button-text-shadow","var(--text-shadow-none)"),o.set("--button-text-shadow-dark","var(--text-shadow-none)");const s=(a,l,c,i)=>{n||(o.set("--button-bg-hover",a),o.set("--button-text-hover",c),o.set("--button-bg-hover-dark",l),o.set("--button-text-hover-dark",i))};switch(t){case"filled":{const a=f(e,"solid","light"),l=f(e,"solid","dark");o.set("--button-bg",a.backgroundColor),o.set("--button-text",a.textColor),o.set("--button-bg-dark",l.backgroundColor),o.set("--button-text-dark",l.textColor),o.set("--button-text-shadow","var(--text-shadow-button-filled, var(--text-shadow-sm))"),o.set("--button-text-shadow-dark","var(--text-shadow-button-filled, var(--text-shadow-sm))");const c=b(e,"solid","light"),i=b(e,"solid","dark");s(c.backgroundColor,i.backgroundColor,c.textColor,i.textColor);break}case"light":{const a=f(e,"light","light"),l=f(e,"light","dark");o.set("--button-bg",a.backgroundColor),o.set("--button-text",a.textColor),o.set("--button-bg-dark",l.backgroundColor),o.set("--button-text-dark",l.textColor);const c=b(e,"light","light"),i=b(e,"light","dark");s(c.backgroundColor,i.backgroundColor,c.textColor,i.textColor);break}case"outline":{o.set("--button-bg","transparent"),o.set("--button-bg-dark","transparent"),o.set("--button-border",w(e,"light")),o.set("--button-border-dark",w(e,"dark")),o.set("--button-text",p(e,"light")),o.set("--button-text-dark",p(e,"dark")),o.set("--button-text-shadow","var(--text-shadow-button-light, var(--text-shadow-xs))"),o.set("--button-text-shadow-dark","var(--text-shadow-button-light, var(--text-shadow-xs))");const a=b(e,"light","light"),l=b(e,"light","dark");s(a.backgroundColor,l.backgroundColor,a.textColor,l.textColor);break}case"default":{const a=f("neutral","light","light"),l=f("neutral","light","dark");o.set("--button-bg",a.backgroundColor),o.set("--button-text",p(e,"light")),o.set("--button-bg-dark",l.backgroundColor),o.set("--button-text-dark",p(e,"dark")),o.set("--button-text-shadow","var(--text-shadow-button-default, var(--text-shadow-2xs))"),o.set("--button-text-shadow-dark","var(--text-shadow-button-default, var(--text-shadow-2xs))");const c=b("base","light","light"),i=b("base","light","dark");s(c.backgroundColor,i.backgroundColor,o.get("--button-text")??a.textColor,o.get("--button-text-dark")??l.textColor);break}case"text":{o.set("--button-bg","transparent"),o.set("--button-bg-dark","transparent"),o.set("--button-text",p(e,"light")),o.set("--button-text-dark",p(e,"dark")),n||o.set("--button-hover-decoration","underline");break}}return Array.from(o.entries()).map(([a,l])=>`${a}: ${l}`).join("; ")}function dt({type:t="button",disabled:e=!1,loading:n=!1,variant:o="filled",size:s="md",color:a="base",roundedness:l="sm",onClick:c=()=>{},fullWidth:i=!1},...u){const g=r.prop(null);return r.Use(D,h=>r.html.button(r.attr.type(t),r.attr.disabled(r.computedOf(e,n)((d,v)=>d||v)),r.aria.busy(n??!1),r.When(n??!1,()=>r.aria.label(h.$.loadingExtended)),r.attr.class(r.computedOf(s,l,n,i)(F)),r.attr.style(r.computedOf(o,a,e)(N)),r.When(n??!1,()=>r.Fragment(r.style.width(g.map(d=>d==null?"":`${d.width}px`)),r.style.height(g.map(d=>d==null?"":`${d.height}px`)),L({icon:"line-md:loading-twotone-loop",size:s??"md"}),r.html.span(r.attr.class("sr-only"),r.aria.live("polite"),h.$.loadingExtended)),()=>r.Fragment(r.on.click(c),...u)),r.When(n!=null,()=>C.ElementRect(d=>(d.on(v=>{r.Value.get(n??!1)||g.set(v)}),r.Empty)))))}function ht(t,e,n){const o=[t?"bc-base-input-container":"bc-input-container"];return e?o.push(t?"bc-base-input-container--disabled":"bc-input-container--disabled"):o.push(t?"bc-base-input-container--default":"bc-input-container--default"),n&&o.push("bc-input-container--error"),o.join(" ")}function U(t,e){const n=["bc-input-container__input"];return t||(n.push(`bc-control--padding-${e}`),n.push(`bc-control--text-size-${e}`)),n.join(" ")}const H=({baseContainer:t,disabled:e,input:n,before:o,after:s,hasError:a,focusableSelector:l="input, select, textarea",growInput:c=!0,size:i},...u)=>{const g=r.Value.map(e??!1,h=>h);return r.html.div(r.WithElement(h=>{const d=()=>{h.querySelector(l)?.focus()};return h.addEventListener("click",d),r.OnDispose(()=>h.removeEventListener("click",d))}),r.attr.class(r.computedOf(t,g,a??!1)((h,d,v)=>ht(h??!1,d??!1,v??!1))),o!=null?r.html.span(r.attr.class("bc-input-container__before"),o):null,r.html.div(r.attr.class(r.computedOf(t,i??"md")((h,d)=>U(h??!1,d??"md"))),r.attr.class(r.Value.map(c,h=>h?"bc-input-container__input--grow":"")),n),s!=null?r.html.span(r.attr.class("bc-input-container__after"),s):null,...u)};function gt({icon:t,size:e="md",color:n="neutral"}){return r.html.span(r.attr.class("bc-input-container__icon"),L({icon:t,size:e,color:n}))}const W=({autocomplete:t,autofocus:e,class:n,disabled:o,name:s,placeholder:a,id:l,required:c,tabIndex:i,hasError:u})=>r.Fragment(r.attr.autocomplete(t),r.attr.autofocus(e),r.attr.class(n),r.attr.disabled(o),r.attr.name(s??l),r.attr.placeholder(a),r.attr.id(l),r.aria.required(c),r.attr.tabindex(i),u!=null?r.aria.invalid(u??!1):null),bt=t=>{const{value:e,onBlur:n,onChange:o,onInput:s}=t;return H({...t,input:r.input.text(W(t),r.attr.value(e),r.attr.class("bc-input"),n!=null?r.on.blur(r.emitValue(n)):r.Empty,o!=null?r.on.change(r.emitValue(o)):r.Empty,s!=null?r.on.input(r.emitValue(s)):r.Empty)})};function ft(t){const e=t.split("-"),n=[t];return e.length>1&&n.push(e[0]),n}function z({locale:t,defaultLocale:e="en-US",defaultMessages:n,localeLoader:o}){const s=r.prop(e),a=r.prop(n),l=t.on(async c=>{if(c===s.value)return;s.set(c);const i=ft(c);for(const u of i)try{const g=await o(u);if(typeof g.default=="object"&&Object.keys(g).length===1){console.error("It appears that you are trying to load a translation module without referencing the default export. Please use `(await import(...)).default` in your loader function.");return}if(c===s.value){a.set(g);return}}catch{continue}console.warn(`No locale found for "${t.value}", using fallback`),c===s.value&&a.set(n)});return{dispose:()=>{l(),s.dispose(),a.dispose()},t:a}}function G({defaultLocale:t,defaultMessages:e,localeLoader:n,providerName:o="I18nProvider"}){return{mark:r.makeProviderMark(o),create:(s,a)=>{const{value:{locale:l}}=a.getProvider(T.mark),{t:c,dispose:i}=z({locale:l,defaultMessages:e,defaultLocale:t,localeLoader:n});return{value:c,dispose:i}}}}const D=G({defaultLocale:V,defaultMessages:M,localeLoader:async t=>(await $(Object.assign({"./locales/ar.ts":()=>Promise.resolve().then(()=>require("./ar-BqnDsD9v.cjs")),"./locales/de.ts":()=>Promise.resolve().then(()=>require("./de-C_N0wtxQ.cjs")),"./locales/en.ts":()=>Promise.resolve().then(()=>K),"./locales/es.ts":()=>Promise.resolve().then(()=>require("./es-JnLMDtzg.cjs")),"./locales/fa.ts":()=>Promise.resolve().then(()=>require("./fa-BC16IdRL.cjs")),"./locales/fr.ts":()=>Promise.resolve().then(()=>require("./fr-BupZ6YnU.cjs")),"./locales/he.ts":()=>Promise.resolve().then(()=>require("./he-C-aQ2yoO.cjs")),"./locales/hi.ts":()=>Promise.resolve().then(()=>require("./hi-L3y3Aedb.cjs")),"./locales/it.ts":()=>Promise.resolve().then(()=>require("./it-CnHaoq-X.cjs")),"./locales/ja.ts":()=>Promise.resolve().then(()=>require("./ja-DpDF4IgX.cjs")),"./locales/ko.ts":()=>Promise.resolve().then(()=>require("./ko-BMmVJHzm.cjs")),"./locales/nl.ts":()=>Promise.resolve().then(()=>require("./nl-viDlnQWK.cjs")),"./locales/pl.ts":()=>Promise.resolve().then(()=>require("./pl-Vrfv_fGt.cjs")),"./locales/pt.ts":()=>Promise.resolve().then(()=>require("./pt-CxQV74vS.cjs")),"./locales/ru.ts":()=>Promise.resolve().then(()=>require("./ru-BB3GRr_J.cjs")),"./locales/tr.ts":()=>Promise.resolve().then(()=>require("./tr-mBiHcEl1.cjs")),"./locales/ur.ts":()=>Promise.resolve().then(()=>require("./ur-CZ5sgUP1.cjs")),"./locales/vi.ts":()=>Promise.resolve().then(()=>require("./vi-Ki_Urj_E.cjs")),"./locales/zh.ts":()=>Promise.resolve().then(()=>require("./zh-C78OkbS0.cjs"))}),`./locales/${t}.ts`,3)).default,providerName:"BeatUII18n"});exports.BeatUII18n=D;exports.Button=dt;exports.CommonInputAttributes=W;exports.Icon=L;exports.InputContainer=H;exports.InputIcon=gt;exports.LOGICAL_PROPERTY_MAP=E;exports.Locale=T;exports.TextInput=bt;exports.__variableDynamicImportRuntimeHelper=$;exports.backgroundValue=f;exports.borderColorValue=w;exports.defaultLocale=V;exports.defaultMessages=M;exports.formatFileSize=q;exports.generateButtonClasses=F;exports.generateButtonStyles=N;exports.generateInputContainerInputClasses=U;exports.getDirectionClassName=J;exports.getDirectionFromLocale=y;exports.getIconLocally=A;exports.getOppositeDirection=Z;exports.getPhysicalProperty=X;exports.hoverBackgroundValue=b;exports.isIndexedDBAvailable=P;exports.isRTLLocale=Q;exports.makeI18nProvider=G;exports.makeMessages=z;exports.resolveDirection=O;exports.storeIconLocally=R;exports.textColorValue=p;
|
|
1
|
+
"use strict";const r=require("@tempots/dom"),C=require("@tempots/ui"),S=require("./colors-B9fcMxa_.cjs");function q(t,{units:e=["B","KB","MB","GB","TB"],decimalPlaces:n=0,locale:o}={}){if(t===0||t===0n)return new Intl.NumberFormat(o,{style:"unit",unit:"byte",unitDisplay:"short",maximumFractionDigits:0}).format(0).replace("byte",e[0]);let s,a;if(typeof t=="bigint"){let i=t<0n?-t:t;for(s=0;i>=1024n&&s<e.length-1;)i=i/1024n,s++;a=Number(t)/Math.pow(1024,s)}else s=Math.floor(Math.log(Math.abs(t))/Math.log(1024)),s=Math.min(s,e.length-1),a=t/Math.pow(1024,s);return new Intl.NumberFormat(o,{style:"unit",unit:"byte",unitDisplay:"short",minimumFractionDigits:s===0?0:n,maximumFractionDigits:s===0?0:n}).format(a).replace("byte",e[s])}const _={loadingExtended:"Loading, please wait",loadingShort:"Loading...",locale:"Locale",iconDescription:"Icon",loadingIcon:"Loading icon",failedToLoadIcon:"Failed to load icon",editLabel:"Edit",selectOne:"Select one",selectMany:"Select many",noResults:"No results",passwordPlaceholderText:"Secret Password",togglePasswordVisibility:"Toggle password visibility",toggleMenu:"Toggle menu",toggleAside:"Toggle aside",mainNavigation:"Main navigation",sidebar:"Sidebar",closeDrawer:"Close drawer",closeModal:"Close modal",confirm:"Confirm",cancel:"Cancel",addLabel:"Add",removeItem:"Remove item",currentLocale:"English",ar:"Arabic",de:"German",en:"English",es:"Spanish",fr:"French",hi:"Hindi",it:"Italian",ja:"Japanese",ko:"Korean",nl:"Dutch",pl:"Polish",pt:"Portuguese",ru:"Russian",tr:"Turkish",vi:"Vietnamese",zh:"Chinese",he:"Hebrew",fa:"Persian",ur:"Urdu",emailPlaceholderText:"Enter your email",incrementValue:"Increment value",decrementValue:"Decrement value",dropZoneInstructions:t=>t?"Click to choose or drag files here, or press Enter or Space to open file selector":"Drag files here",fileSizeUnits:["Bytes","KB","MB","GB","TB"],removeFile:"Remove file",clearAllFiles:"Clear all files",clearValue:"Reset",unknownType:"Unknown type",filesInputInstructions:(t,e,n)=>{let o=t==null||t>1?"Click to choose or drag files here":"Click to choose or drag a file here";if(t||e){const s=[];if(t!=null&&t>1&&s.push(`up to ${t} files`),e&&n){const a=q(e,{units:n});s.push(`max ${a} each`)}s.length>0&&(o+=` (${s.join(", ")})`)}return o},prosemirror:{bold:"Bold",italic:"Italic",code:"Inline code",link:"Insert link",removeLink:"Remove link",heading:t=>`Heading ${t}`,bulletList:"Bullet list",orderedList:"Ordered list",blockquote:"Blockquote",codeBlock:"Code block",horizontalRule:"Horizontal rule",linkUrlPlaceholder:"https://example.com"}},K=Object.freeze(Object.defineProperty({__proto__:null,default:_},Symbol.toStringTag,{value:"Module"})),M=_,V="en",$=(t,e,n)=>{const o=t[e];return o?typeof o=="function"?o():Promise.resolve(o):new Promise((s,a)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(a.bind(null,new Error("Unknown variable dynamic import: "+e+(e.split("/").length!==n?". Note that variables only represent file names one level deep.":""))))})},Y=new Set(["ar","he","fa","ur","ps","sd","ku","dv","yi","ji","iw","in"]);function y(t){if(!t)return"ltr";const e=t.split(/[-_]/)[0].toLowerCase();return Y.has(e)?"rtl":"ltr"}function O(t,e){return t==="auto"?y(e):t}function J(t){return`b-${t}`}function Q(t){return y(t)==="rtl"}function Z(t){return t==="ltr"?"rtl":"ltr"}const E={ltr:{"inline-start":"left","inline-end":"right","block-start":"top","block-end":"bottom"},rtl:{"inline-start":"right","inline-end":"left","block-start":"top","block-end":"bottom"}};function X(t,e){return E[e][t]}const T={mark:r.makeProviderMark("Locale"),create:t=>{const e=r.localStorageProp({defaultValue:navigator.language??"en-US",key:"beatui-locale"}),n=r.localStorageProp({defaultValue:"auto",key:"beatui-direction-preference"}),o=r.computedOf(e,n)((a,l)=>O(l,a));return{value:{locale:e,setLocale:a=>e.set(a),direction:o,directionPreference:n,setDirectionPreference:a=>n.set(a)},dispose:()=>{e.dispose(),n.dispose(),o.dispose()}}}},{variants:tt,special:et,overrides:I}=S.backgroundConfig;function m(t,e){switch(t){case"white":return"var(--color-white)";case"black":return"var(--color-black)";case"transparent":return"transparent";default:return S.getColorVar(t,e)}}function j(t,e){const n=et[t];if(!n)return;if(e==="light")return n;const o=I[t];return o?o[e]:n}function f(t,e,n){const o=I[t];if(o){const a=o[n];if(a)return{backgroundColor:a.backgroundColor,textColor:a.color}}if(e==="solid"){const a=j(t,n);if(a)return{backgroundColor:a.backgroundColor,textColor:a.color}}const s=tt[e][n];return{backgroundColor:m(t,s.bgShade),textColor:s.textColor}}const rt={light:{shade:600,textColor:"var(--color-white)"},dark:{shade:600,textColor:"var(--text-inverted-dark)"}},ot={light:{shade:300,textColor:"var(--text-normal-light)"},dark:{shade:700,textColor:"var(--text-normal-dark)"}},nt={light:{shade:400,textColor:"var(--text-normal-light)"},dark:{shade:600,textColor:"var(--text-normal-dark)"}};function b(t,e,n){const o=I[t];if(o){const a=o[n];if(a)return{backgroundColor:a.backgroundColor,textColor:a.color}}if(e==="solid"){const a=j(t,n);if(a)return{backgroundColor:a.backgroundColor,textColor:a.color};const l=rt[n];return{backgroundColor:m(t,l.shade),textColor:l.textColor}}const s=e==="light"?ot[n]:nt[n];return{backgroundColor:m(t,s.shade),textColor:s.textColor}}function w(t,e){const n=e==="light"?500:600;switch(t){case"white":return e==="light"?"var(--text-inverse-light)":"var(--text-inverted-dark)";case"black":return"var(--color-black)";case"transparent":return"transparent";default:return m(t,n)}}function p(t,e){return t==="white"?"var(--color-white)":t==="black"?"var(--color-black)":t==="transparent"?"inherit":m(t,e==="light"?800:200)}function B(t,e,n){return e==="soft"?m(t,n==="light"?300:700):m(t,n==="light"?500:600)}const at="bui-icons",k=new Map,P=(()=>{try{return typeof indexedDB<"u"&&indexedDB!==null}catch{return!1}})();function st(){return P?new Promise((t,e)=>{const n=indexedDB.open(at,1);n.onupgradeneeded=function(o){const s=o.target.result;s.objectStoreNames.contains("icons")||s.createObjectStore("icons")},n.onsuccess=function(){t(n.result)},n.onerror=function(){e(n.error)}}):Promise.reject(new Error("IndexedDB not available"))}const x=P?st():null;async function R(t,e){try{if(x){const n=await x;return new Promise((o,s)=>{const a=n.transaction("icons","readwrite");a.objectStore("icons").put(e,t),a.oncomplete=()=>o(),a.onerror=s})}else k.set(t,e)}catch{k.set(t,e)}}async function A(t){try{if(x){const e=await x;return new Promise((n,o)=>{const l=e.transaction("icons","readonly").objectStore("icons").get(t);l.onsuccess=function(){n(l.result)},l.onerror=o})}else return k.get(t)||null}catch{return k.get(t)||null}}async function lt(t){const e=`https://api.iconify.design/${t}.svg`;return fetch(e).then(n=>{if(n.status===200)return n.text();throw new Error(`Failed to load icon: ${t}`)})}async function it(t){const e=t.replace(":","/"),n=await A(e);if(n)return n;const o=await lt(e);return await R(e,o),o}function ct(t){return["bc-icon",`bc-icon--${t}`].join(" ")}function ut(t,e="solid"){if(!t)return"";const n=B(t,e,"light"),o=B(t,e,"dark");return`--icon-color: ${n}; --icon-color-dark: ${o}`}function L({icon:t,size:e="md",color:n,title:o,accessibility:s="auto",tone:a="solid"},...l){const c=r.computedOf(s,o)((i,u)=>i==="decorative"?!1:i==="informative"?!0:u!=null&&u!=="");return r.Use(D,i=>r.html.span(r.attr.class(r.computedOf(e,n)(u=>ct(u??"md"))),r.attr.style(r.computedOf(n,a)((u,g)=>ut(u??void 0,g??"solid"))),r.When(c,()=>r.Fragment(r.attr.role("img"),r.aria.label(r.coalesce(o,i.$.iconDescription))),()=>r.aria.hidden(!0)),C.WhenInViewport({once:!0},()=>C.Query({request:t,load:({request:u})=>it(u),convertError:String,success:({value:u})=>r.html.span(r.style.width("100%"),r.style.height("100%"),r.attr.innerHTML(u)),pending:()=>r.html.span(r.attr.class("animate-spin"),r.When(c,()=>r.Fragment(r.attr.role("img"),r.aria.label(i.$.loadingIcon)),()=>r.aria.hidden(!0)),"↻"),failure:({error:u})=>r.html.span(r.attr.title(u),r.attr.class("text-red-500"),r.When(c,()=>r.Fragment(r.attr.role("img"),r.aria.label(i.$.failedToLoadIcon)),()=>r.aria.hidden(!0)),"🚫")})),...l))}function F(t,e,n,o){const s=["bc-button",`bc-button--size-${t}`,`bc-control--padding-${t}`,`bc-control--rounded-${e}`];return n&&s.push("bc-button--loading"),o&&s.push("bc-button--full-width"),s.join(" ")}function N(t,e,n){const o=new Map;o.set("--button-text-shadow","var(--text-shadow-none)"),o.set("--button-text-shadow-dark","var(--text-shadow-none)");const s=(a,l,c,i)=>{n||(o.set("--button-bg-hover",a),o.set("--button-text-hover",c),o.set("--button-bg-hover-dark",l),o.set("--button-text-hover-dark",i))};switch(t){case"filled":{const a=f(e,"solid","light"),l=f(e,"solid","dark");o.set("--button-bg",a.backgroundColor),o.set("--button-text",a.textColor),o.set("--button-bg-dark",l.backgroundColor),o.set("--button-text-dark",l.textColor),o.set("--button-text-shadow","var(--text-shadow-button-filled, var(--text-shadow-sm))"),o.set("--button-text-shadow-dark","var(--text-shadow-button-filled, var(--text-shadow-sm))");const c=b(e,"solid","light"),i=b(e,"solid","dark");s(c.backgroundColor,i.backgroundColor,c.textColor,i.textColor);break}case"light":{const a=f(e,"light","light"),l=f(e,"light","dark");o.set("--button-bg",a.backgroundColor),o.set("--button-text",a.textColor),o.set("--button-bg-dark",l.backgroundColor),o.set("--button-text-dark",l.textColor);const c=b(e,"light","light"),i=b(e,"light","dark");s(c.backgroundColor,i.backgroundColor,c.textColor,i.textColor);break}case"outline":{o.set("--button-bg","transparent"),o.set("--button-bg-dark","transparent"),o.set("--button-border",w(e,"light")),o.set("--button-border-dark",w(e,"dark")),o.set("--button-text",p(e,"light")),o.set("--button-text-dark",p(e,"dark")),o.set("--button-text-shadow","var(--text-shadow-button-light, var(--text-shadow-xs))"),o.set("--button-text-shadow-dark","var(--text-shadow-button-light, var(--text-shadow-xs))");const a=b(e,"light","light"),l=b(e,"light","dark");s(a.backgroundColor,l.backgroundColor,a.textColor,l.textColor);break}case"default":{const a=f("neutral","light","light"),l=f("neutral","light","dark");o.set("--button-bg",a.backgroundColor),o.set("--button-text",p(e,"light")),o.set("--button-bg-dark",l.backgroundColor),o.set("--button-text-dark",p(e,"dark")),o.set("--button-text-shadow","var(--text-shadow-button-default, var(--text-shadow-2xs))"),o.set("--button-text-shadow-dark","var(--text-shadow-button-default, var(--text-shadow-2xs))");const c=b("base","light","light"),i=b("base","light","dark");s(c.backgroundColor,i.backgroundColor,o.get("--button-text")??a.textColor,o.get("--button-text-dark")??l.textColor);break}case"text":{o.set("--button-bg","transparent"),o.set("--button-bg-dark","transparent"),o.set("--button-text",p(e,"light")),o.set("--button-text-dark",p(e,"dark")),n||o.set("--button-hover-decoration","underline");break}}return Array.from(o.entries()).map(([a,l])=>`${a}: ${l}`).join("; ")}function dt({type:t="button",disabled:e=!1,loading:n=!1,variant:o="filled",size:s="md",color:a="base",roundedness:l="sm",onClick:c=()=>{},fullWidth:i=!1},...u){const g=r.prop(null);return r.Use(D,h=>r.html.button(r.attr.type(t),r.attr.disabled(r.computedOf(e,n)((d,v)=>d||v)),r.aria.busy(n??!1),r.When(n??!1,()=>r.aria.label(h.$.loadingExtended)),r.attr.class(r.computedOf(s,l,n,i)(F)),r.attr.style(r.computedOf(o,a,e)(N)),r.When(n??!1,()=>r.Fragment(r.style.width(g.map(d=>d==null?"":`${d.width}px`)),r.style.height(g.map(d=>d==null?"":`${d.height}px`)),L({icon:"line-md:loading-twotone-loop",size:s??"md"}),r.html.span(r.attr.class("sr-only"),r.aria.live("polite"),h.$.loadingExtended)),()=>r.Fragment(r.on.click(c),...u)),r.When(n!=null,()=>C.ElementRect(d=>(d.on(v=>{r.Value.get(n??!1)||g.set(v)}),r.Empty)))))}function ht(t,e,n){const o=[t?"bc-base-input-container":"bc-input-container"];return e?o.push(t?"bc-base-input-container--disabled":"bc-input-container--disabled"):o.push(t?"bc-base-input-container--default":"bc-input-container--default"),n&&o.push("bc-input-container--error"),o.join(" ")}function U(t,e){const n=["bc-input-container__input"];return t||(n.push(`bc-control--padding-${e}`),n.push(`bc-control--text-size-${e}`)),n.join(" ")}const H=({baseContainer:t,disabled:e,input:n,before:o,after:s,hasError:a,focusableSelector:l="input, select, textarea",growInput:c=!0,size:i},...u)=>{const g=r.Value.map(e??!1,h=>h);return r.html.div(r.WithElement(h=>{const d=()=>{h.querySelector(l)?.focus()};return h.addEventListener("click",d),r.OnDispose(()=>h.removeEventListener("click",d))}),r.attr.class(r.computedOf(t,g,a??!1)((h,d,v)=>ht(h??!1,d??!1,v??!1))),o!=null?r.html.span(r.attr.class("bc-input-container__before"),o):null,r.html.div(r.attr.class(r.computedOf(t,i??"md")((h,d)=>U(h??!1,d??"md"))),r.attr.class(r.Value.map(c,h=>h?"bc-input-container__input--grow":"")),n),s!=null?r.html.span(r.attr.class("bc-input-container__after"),s):null,...u)};function gt({icon:t,size:e="md",color:n="neutral"}){return r.html.span(r.attr.class("bc-input-container__icon"),L({icon:t,size:e,color:n}))}const W=({autocomplete:t,autofocus:e,class:n,disabled:o,name:s,placeholder:a,id:l,required:c,tabIndex:i,hasError:u})=>r.Fragment(r.attr.autocomplete(t),r.attr.autofocus(e),r.attr.class(n),r.attr.disabled(o),r.attr.name(s??l),r.attr.placeholder(a),r.attr.id(l),r.aria.required(c),r.attr.tabindex(i),u!=null?r.aria.invalid(u??!1):null),bt=t=>{const{value:e,onBlur:n,onChange:o,onInput:s}=t;return H({...t,input:r.input.text(W(t),r.attr.value(e),r.attr.class("bc-input"),n!=null?r.on.blur(r.emitValue(n)):r.Empty,o!=null?r.on.change(r.emitValue(o)):r.Empty,s!=null?r.on.input(r.emitValue(s)):r.Empty)})};function ft(t){const e=t.split("-"),n=[t];return e.length>1&&n.push(e[0]),n}function z({locale:t,defaultLocale:e="en-US",defaultMessages:n,localeLoader:o}){const s=r.prop(e),a=r.prop(n),l=t.on(async c=>{if(c===s.value)return;s.set(c);const i=ft(c);for(const u of i)try{const g=await o(u);if(typeof g.default=="object"&&Object.keys(g).length===1){console.error("It appears that you are trying to load a translation module without referencing the default export. Please use `(await import(...)).default` in your loader function.");return}if(c===s.value){a.set(g);return}}catch{continue}console.warn(`No locale found for "${t.value}", using fallback`),c===s.value&&a.set(n)});return{dispose:()=>{l(),s.dispose(),a.dispose()},t:a}}function G({defaultLocale:t,defaultMessages:e,localeLoader:n,providerName:o="I18nProvider"}){return{mark:r.makeProviderMark(o),create:(s,a)=>{const{value:{locale:l}}=a.getProvider(T.mark),{t:c,dispose:i}=z({locale:l,defaultMessages:e,defaultLocale:t,localeLoader:n});return{value:c,dispose:i}}}}const D=G({defaultLocale:V,defaultMessages:M,localeLoader:async t=>(await $(Object.assign({"./locales/ar.ts":()=>Promise.resolve().then(()=>require("./ar-128v2WAg.cjs")),"./locales/de.ts":()=>Promise.resolve().then(()=>require("./de-Doo_UynL.cjs")),"./locales/en.ts":()=>Promise.resolve().then(()=>K),"./locales/es.ts":()=>Promise.resolve().then(()=>require("./es-C6ksQm_M.cjs")),"./locales/fa.ts":()=>Promise.resolve().then(()=>require("./fa-C0ZVnkuX.cjs")),"./locales/fr.ts":()=>Promise.resolve().then(()=>require("./fr-eyQiRZu8.cjs")),"./locales/he.ts":()=>Promise.resolve().then(()=>require("./he-fifXa9Ks.cjs")),"./locales/hi.ts":()=>Promise.resolve().then(()=>require("./hi-BBbV2iwE.cjs")),"./locales/it.ts":()=>Promise.resolve().then(()=>require("./it-CEM-R_5J.cjs")),"./locales/ja.ts":()=>Promise.resolve().then(()=>require("./ja-CWzwG1fp.cjs")),"./locales/ko.ts":()=>Promise.resolve().then(()=>require("./ko-DV2NgunR.cjs")),"./locales/nl.ts":()=>Promise.resolve().then(()=>require("./nl-C_MHm9AB.cjs")),"./locales/pl.ts":()=>Promise.resolve().then(()=>require("./pl-Dcgxv0xK.cjs")),"./locales/pt.ts":()=>Promise.resolve().then(()=>require("./pt-As8BblbM.cjs")),"./locales/ru.ts":()=>Promise.resolve().then(()=>require("./ru-Du4sI8M1.cjs")),"./locales/tr.ts":()=>Promise.resolve().then(()=>require("./tr-DTLlM4Pf.cjs")),"./locales/ur.ts":()=>Promise.resolve().then(()=>require("./ur-DRhqXQpq.cjs")),"./locales/vi.ts":()=>Promise.resolve().then(()=>require("./vi-D_MzLijT.cjs")),"./locales/zh.ts":()=>Promise.resolve().then(()=>require("./zh-CFMBeH1A.cjs"))}),`./locales/${t}.ts`,3)).default,providerName:"BeatUII18n"});exports.BeatUII18n=D;exports.Button=dt;exports.CommonInputAttributes=W;exports.Icon=L;exports.InputContainer=H;exports.InputIcon=gt;exports.LOGICAL_PROPERTY_MAP=E;exports.Locale=T;exports.TextInput=bt;exports.__variableDynamicImportRuntimeHelper=$;exports.backgroundValue=f;exports.borderColorValue=w;exports.defaultLocale=V;exports.defaultMessages=M;exports.formatFileSize=q;exports.generateButtonClasses=F;exports.generateButtonStyles=N;exports.generateInputContainerInputClasses=U;exports.getDirectionClassName=J;exports.getDirectionFromLocale=y;exports.getIconLocally=A;exports.getOppositeDirection=Z;exports.getPhysicalProperty=X;exports.hoverBackgroundValue=b;exports.isIndexedDBAvailable=P;exports.isRTLLocale=Q;exports.makeI18nProvider=G;exports.makeMessages=z;exports.resolveDirection=O;exports.storeIconLocally=R;exports.textColorValue=p;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Renderable, Value } from '@tempots/dom';
|
|
2
2
|
import { SocialLoginButtonOptions, AuthProviderName } from './index';
|
|
3
3
|
import { ControlSize } from '../theme';
|
|
4
|
-
import { ThemeColorName } from '
|
|
4
|
+
import { ThemeColorName } from '../../tokens';
|
|
5
5
|
export declare function SocialLoginButton({ provider, onClick, size, name, icon, color, flow, labels, }: SocialLoginButtonOptions): Renderable;
|
|
6
6
|
export type AuthProviderInfo = {
|
|
7
7
|
provider: AuthProviderName;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TNode, Value } from '@tempots/dom';
|
|
2
2
|
import { ControlSize } from '../theme';
|
|
3
|
-
import { ThemeColorName } from '
|
|
3
|
+
import { ThemeColorName } from '../../tokens';
|
|
4
4
|
import { AuthProviderInfo } from './social-login-button';
|
|
5
5
|
export type AuthProviderName = 'google' | 'github' | 'apple' | 'facebook' | 'twitter' | 'x' | 'microsoft' | 'discord' | 'linkedin' | 'instagram' | 'tiktok' | 'snapchat' | 'reddit' | 'pinterest' | 'twitch' | 'steam' | 'epic' | 'playstation' | 'xbox' | 'whatsapp' | 'wechat' | 'amazon' | 'yahoo' | 'paypal';
|
|
6
6
|
export type AuthMode = 'signin' | 'signup' | 'reset-password';
|
|
@@ -138,7 +138,7 @@ export interface SocialLoginButtonOptions {
|
|
|
138
138
|
flow?: Value<'redirect' | 'popup' | undefined>;
|
|
139
139
|
name: Value<string>;
|
|
140
140
|
icon: Value<string>;
|
|
141
|
-
color: Value<ThemeColorName
|
|
141
|
+
color: Value<ThemeColorName>;
|
|
142
142
|
labels?: {
|
|
143
143
|
continueWithProvider?: Value<(provider: string) => string>;
|
|
144
144
|
};
|
|
@@ -152,5 +152,5 @@ export interface PasswordStrengthIndicatorOptions {
|
|
|
152
152
|
export interface ProviderInfo {
|
|
153
153
|
name: string;
|
|
154
154
|
icon: string;
|
|
155
|
-
color: ThemeColorName
|
|
155
|
+
color: ThemeColorName;
|
|
156
156
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { TNode, Value } from '@tempots/dom';
|
|
2
2
|
import { ControlSize, ButtonVariant } from '../theme';
|
|
3
|
-
import { ThemeColorName } from '
|
|
3
|
+
import { ThemeColorName } from '../../tokens';
|
|
4
4
|
import { ExtendedColor } from '../theme/style-utils';
|
|
5
|
-
import { RadiusName } from '
|
|
5
|
+
import { RadiusName } from '../../tokens/radius';
|
|
6
6
|
export interface ButtonOptions {
|
|
7
7
|
type?: Value<'submit' | 'reset' | 'button'>;
|
|
8
8
|
disabled?: Value<boolean>;
|
|
9
9
|
loading?: Value<boolean>;
|
|
10
10
|
variant?: Value<ButtonVariant>;
|
|
11
11
|
size?: Value<ControlSize>;
|
|
12
|
-
color?: Value<ThemeColorName
|
|
12
|
+
color?: Value<ThemeColorName>;
|
|
13
13
|
roundedness?: Value<RadiusName>;
|
|
14
14
|
onClick?: () => void;
|
|
15
15
|
fullWidth?: Value<boolean>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Renderable, TNode, Value } from '@tempots/dom';
|
|
2
2
|
import { ControlSize } from '../theme';
|
|
3
|
-
import { ThemeColorName } from '
|
|
4
|
-
import { RadiusName } from '
|
|
3
|
+
import { ThemeColorName } from '../../tokens';
|
|
4
|
+
import { RadiusName } from '../../tokens/radius';
|
|
5
5
|
export type CloseButtonOptions = {
|
|
6
6
|
size?: Value<ControlSize>;
|
|
7
7
|
icon?: Value<string>;
|
|
8
8
|
disabled?: Value<boolean>;
|
|
9
9
|
roundedness?: Value<RadiusName>;
|
|
10
|
-
color?: Value<ThemeColorName
|
|
10
|
+
color?: Value<ThemeColorName>;
|
|
11
11
|
onClick?: () => void;
|
|
12
12
|
/** Optional localized label for screen readers; defaults to t.$.closeModal */
|
|
13
13
|
label?: Value<string>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { TNode, Value } from '@tempots/dom';
|
|
2
2
|
import { ControlSize, ButtonVariant } from '../theme';
|
|
3
|
-
import { ThemeColorName } from '
|
|
3
|
+
import { ThemeColorName } from '../../tokens';
|
|
4
4
|
import { ExtendedColor } from '../theme/style-utils';
|
|
5
|
-
import { RadiusName } from '
|
|
5
|
+
import { RadiusName } from '../../tokens/radius';
|
|
6
6
|
export interface BadgeOptions {
|
|
7
7
|
variant?: Value<ButtonVariant>;
|
|
8
8
|
size?: Value<ControlSize>;
|
|
9
|
-
color?: Value<ThemeColorName
|
|
9
|
+
color?: Value<ThemeColorName>;
|
|
10
10
|
roundedness?: Value<RadiusName>;
|
|
11
11
|
circle?: Value<boolean>;
|
|
12
12
|
fullWidth?: Value<boolean>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TNode, Value } from '@tempots/dom';
|
|
2
2
|
import { IconSize } from '../theme';
|
|
3
|
-
import { ThemeColorName } from '
|
|
3
|
+
import { ThemeColorName } from '../../tokens';
|
|
4
4
|
import { ForegroundTone } from '../theme/style-utils';
|
|
5
5
|
export declare const isIndexedDBAvailable: boolean;
|
|
6
6
|
export declare function storeIconLocally(id: string, svgString: string): Promise<void>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Renderable } from '@tempots/dom';
|
|
2
2
|
import { InputOptions } from './input-options';
|
|
3
|
-
import type { BeatUITemporal } from '
|
|
3
|
+
import type { BeatUITemporal } from '../../../temporal';
|
|
4
4
|
/**
|
|
5
5
|
* Configuration for creating a Temporal input component.
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TNode, Value } from '@tempots/dom';
|
|
2
2
|
import { ControlSize } from '../../theme';
|
|
3
|
-
import { ThemeColorName } from '
|
|
3
|
+
import { ThemeColorName } from '../../../tokens';
|
|
4
4
|
export declare function generateInputContainerInputClasses(baseContainer: boolean, size: ControlSize): string;
|
|
5
5
|
export declare const InputContainer: ({ baseContainer, disabled, input, before, after, hasError, focusableSelector, growInput, size, }: {
|
|
6
6
|
disabled?: Value<boolean>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { InputOptions } from './input-options';
|
|
2
|
-
import type { Duration } from '
|
|
2
|
+
import type { Duration } from '../../../temporal/types';
|
|
3
3
|
export declare const NullableDurationInput: (options: InputOptions<Duration | null>) => import("@tempots/dom").Renderable;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { InputOptions } from './input-options';
|
|
2
|
-
import { PlainMonthDay } from '
|
|
2
|
+
import { PlainMonthDay } from '../../../temporal';
|
|
3
3
|
export declare const NullablePlainMonthDayInput: (options: InputOptions<PlainMonthDay | null>) => import("@tempots/dom").Renderable;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Value } from '@tempots/dom';
|
|
2
2
|
import { InputOptions } from './input-options';
|
|
3
|
-
import { ThemeColorName } from '
|
|
3
|
+
import { ThemeColorName } from '../../../tokens';
|
|
4
4
|
import { ControlSize } from '../../theme/types';
|
|
5
5
|
export type NullableRatingInputOptions = InputOptions<number | null> & {
|
|
6
6
|
max?: Value<number>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { InputOptions } from './input-options';
|
|
2
|
-
import { ZonedDateTime } from '
|
|
2
|
+
import { ZonedDateTime } from '../../../temporal';
|
|
3
3
|
export declare const NullableZonedDateTimeInput: (options: InputOptions<ZonedDateTime | null>) => import("@tempots/dom").Renderable;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Value } from '@tempots/dom';
|
|
2
2
|
import { InputOptions } from './input-options';
|
|
3
|
-
import { ThemeColorName } from '
|
|
3
|
+
import { ThemeColorName } from '../../../tokens';
|
|
4
4
|
import { ControlSize } from '../../theme/types';
|
|
5
5
|
type RatingInputOptions = InputOptions<number> & {
|
|
6
6
|
max?: Value<number>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Value, TNode } from '@tempots/dom';
|
|
2
2
|
import { ControlSize } from '../../theme/types';
|
|
3
|
-
import { ThemeColorName } from '
|
|
3
|
+
import { ThemeColorName } from '../../../tokens';
|
|
4
4
|
export type SwitchOptions = {
|
|
5
5
|
value: Value<boolean>;
|
|
6
6
|
onChange?: (value: boolean) => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ValidateFunction } from 'ajv';
|
|
2
2
|
import type { JSONSchema } from '../schema-context';
|
|
3
3
|
import { type CrossFieldValidationRule } from './cross-field-validation';
|
|
4
|
-
import type { ControllerValidation } from '
|
|
4
|
+
import type { ControllerValidation } from '../../form';
|
|
5
5
|
/**
|
|
6
6
|
* Conditional validation configuration from x:ui
|
|
7
7
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Controller, InputWrapperOptions } from '
|
|
1
|
+
import { Controller, InputWrapperOptions } from '../../form';
|
|
2
2
|
import { SchemaContext } from '../schema-context';
|
|
3
3
|
import { Renderable } from '@tempots/dom';
|
|
4
4
|
export declare function StringControl({ ctx, options, controller, }: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TNode, Value } from '@tempots/dom';
|
|
2
2
|
import { ControlSize, IconSize } from '../theme';
|
|
3
|
-
import { ThemeColorName } from '
|
|
3
|
+
import { ThemeColorName } from '../../tokens';
|
|
4
4
|
export interface ActionCardOptions {
|
|
5
5
|
icon: Value<string>;
|
|
6
6
|
title: Value<string>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TNode, Value } from '@tempots/dom';
|
|
2
2
|
import { CardVariant, ControlSize } from '../theme';
|
|
3
|
-
import { RadiusName } from '
|
|
3
|
+
import { RadiusName } from '../../tokens/radius';
|
|
4
4
|
export interface CardOptions {
|
|
5
5
|
variant?: Value<CardVariant>;
|
|
6
6
|
size?: Value<ControlSize>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TNode, Value } from '@tempots/dom';
|
|
2
2
|
import { SinkVariant, ControlSize } from '../theme';
|
|
3
|
-
import { RadiusName } from '
|
|
3
|
+
import { RadiusName } from '../../tokens/radius';
|
|
4
4
|
export interface SinkOptions {
|
|
5
5
|
variant?: Value<SinkVariant>;
|
|
6
6
|
size?: Value<ControlSize>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Provider, Signal, TNode } from '@tempots/dom';
|
|
2
2
|
import { NotificationOptions } from './notification';
|
|
3
|
-
import { RadiusName, ThemeColorName } from '
|
|
4
|
-
import { AnimationConfig } from '
|
|
3
|
+
import { RadiusName, ThemeColorName } from '../../tokens';
|
|
4
|
+
import { AnimationConfig } from '../../utils';
|
|
5
5
|
type NotificationEntry = {
|
|
6
6
|
animation: AnimationConfig;
|
|
7
7
|
children: TNode[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Renderable, TNode, Value } from '@tempots/dom';
|
|
2
|
-
import { ThemeColorName } from '
|
|
3
|
-
import { RadiusName } from '
|
|
2
|
+
import { ThemeColorName } from '../../tokens/colors';
|
|
3
|
+
import { RadiusName } from '../../tokens/radius';
|
|
4
4
|
export type NotificationOptions = {
|
|
5
5
|
loading?: Value<boolean>;
|
|
6
6
|
withCloseButton?: Value<boolean>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Renderable } from '@tempots/dom';
|
|
2
2
|
import type { InputOptions } from '../form/input/input-options';
|
|
3
3
|
import { Merge } from '@tempots/std';
|
|
4
|
-
import { MonacoEditorSpecificOptions } from '
|
|
4
|
+
import { MonacoEditorSpecificOptions } from '../../monaco/types';
|
|
5
5
|
export type MonacoEditorInputOptions = Merge<InputOptions<string>, MonacoEditorSpecificOptions & {
|
|
6
6
|
cssInjection?: 'link' | 'none';
|
|
7
7
|
}>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { TNode, Value } from '@tempots/dom';
|
|
2
2
|
import type { NavigationOptions } from '@tempots/ui';
|
|
3
3
|
import { ControlSize, ButtonVariant } from '../../theme';
|
|
4
|
-
import { ThemeColorName } from '
|
|
5
|
-
import { RadiusName } from '
|
|
4
|
+
import { ThemeColorName } from '../../../tokens';
|
|
5
|
+
import { RadiusName } from '../../../tokens/radius';
|
|
6
6
|
import { UrlMatchMode } from './navigation-link';
|
|
7
7
|
export interface ButtonLinkOptions {
|
|
8
8
|
href: Value<string>;
|
|
@@ -16,7 +16,7 @@ export interface ButtonLinkOptions {
|
|
|
16
16
|
disableWhenActive?: Value<boolean>;
|
|
17
17
|
variant?: Value<ButtonVariant>;
|
|
18
18
|
size?: Value<ControlSize>;
|
|
19
|
-
color?: Value<ThemeColorName
|
|
19
|
+
color?: Value<ThemeColorName>;
|
|
20
20
|
roundedness?: Value<RadiusName>;
|
|
21
21
|
disabled?: Value<boolean>;
|
|
22
22
|
fullWidth?: Value<boolean>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TNode, Value } from '@tempots/dom';
|
|
2
2
|
import type { NavigationOptions } from '@tempots/ui';
|
|
3
|
-
import { ThemeColorName } from '
|
|
3
|
+
import { ThemeColorName } from '../../../tokens';
|
|
4
4
|
export type LinkVariant = 'default' | 'plain' | 'hover';
|
|
5
5
|
export interface LinkOptions {
|
|
6
6
|
href: Value<string>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TNode, Value } from '@tempots/dom';
|
|
2
2
|
import { ControlSize, ButtonVariant } from '../../theme';
|
|
3
|
-
import { ThemeColorName } from '
|
|
3
|
+
import { ThemeColorName } from '../../../tokens';
|
|
4
4
|
export interface TabItem<T extends string> {
|
|
5
5
|
/** Unique identifier for the tab */
|
|
6
6
|
key: T;
|
|
@@ -26,7 +26,7 @@ export interface TabsOptions<T extends string> {
|
|
|
26
26
|
/** Visual variant */
|
|
27
27
|
variant?: Value<ButtonVariant>;
|
|
28
28
|
/** Color used by certain variants (e.g., filled) */
|
|
29
|
-
color?: Value<ThemeColorName
|
|
29
|
+
color?: Value<ThemeColorName>;
|
|
30
30
|
/** Whether tabs are disabled */
|
|
31
31
|
disabled?: Value<boolean>;
|
|
32
32
|
/** Orientation of the tabs */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TNode, Value, Renderable } from '@tempots/dom';
|
|
2
|
-
import type { ThemeColorName } from '
|
|
2
|
+
import type { ThemeColorName } from '../../tokens';
|
|
3
3
|
export type AnnouncementBarOptions = {
|
|
4
4
|
color?: Value<ThemeColorName>;
|
|
5
5
|
icon?: Value<string | undefined>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TNode, Value, Renderable } from '@tempots/dom';
|
|
2
|
-
import type { ThemeColorName } from '
|
|
2
|
+
import type { ThemeColorName } from '../../tokens';
|
|
3
3
|
import { ExtendedColor } from '../theme/style-utils';
|
|
4
4
|
export type RibbonCorner = 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end';
|
|
5
5
|
export type RibbonOptions = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ThemeColorName } from '
|
|
2
|
-
export type ExtendedColor = ThemeColorName | '
|
|
1
|
+
import { ThemeColorName } from '../../tokens/colors';
|
|
2
|
+
export type ExtendedColor = ThemeColorName | 'transparent';
|
|
3
3
|
export type Mode = 'light' | 'dark';
|
|
4
4
|
export type BackgroundVariant = 'solid' | 'light' | 'soft' | 'lighter';
|
|
5
5
|
export type ForegroundTone = 'solid' | 'soft';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BackgroundColorName, ThemeColorName } from '
|
|
1
|
+
import { BackgroundColorName, ThemeColorName } from '../../tokens';
|
|
2
2
|
import { Signal } from '@tempots/dom';
|
|
3
3
|
import { AppearanceType } from '@tempots/ui';
|
|
4
4
|
export type ButtonVariant = 'filled' | 'light' | 'outline' | 'default' | 'text';
|
|
@@ -3,9 +3,9 @@ export type ColorName = keyof typeof colors;
|
|
|
3
3
|
export type ColorShade = 50 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | 950;
|
|
4
4
|
export declare const colorShades: ColorShade[];
|
|
5
5
|
export type SemanticColorName = 'primary' | 'secondary' | 'base' | 'success' | 'warning' | 'danger' | 'info';
|
|
6
|
-
export type ThemeColorName = ColorName | SemanticColorName;
|
|
6
|
+
export type ThemeColorName = ColorName | SemanticColorName | 'black' | 'white';
|
|
7
7
|
export declare const semanticColorNames: readonly ["primary", "secondary", "base", "success", "warning", "danger", "info"];
|
|
8
|
-
export declare const themeColorNames:
|
|
8
|
+
export declare const themeColorNames: ThemeColorName[];
|
|
9
9
|
export declare const semanticColors: Record<SemanticColorName, ColorName>;
|
|
10
10
|
export type SemanticColorOverrides = Partial<Record<SemanticColorName, ThemeColorName>>;
|
|
11
11
|
export declare function resolveSemanticColorMap(overrides?: SemanticColorOverrides): {
|
|
@@ -38,7 +38,7 @@ export declare const interactiveColors: {
|
|
|
38
38
|
dark: Record<InteractiveColorName, [ThemeColorName, ColorShade]>;
|
|
39
39
|
};
|
|
40
40
|
export declare function normalizeColorName(color: ThemeColorName, overrides?: SemanticColorOverrides): ThemeColorName;
|
|
41
|
-
export declare function getColorVarName(color: ThemeColorName, shade: ColorShade): `--color-${ThemeColorName}-${ColorShade}
|
|
41
|
+
export declare function getColorVarName(color: ThemeColorName, shade: ColorShade): `--color-${ThemeColorName}-${ColorShade}` | '--color-white' | '--color-black';
|
|
42
42
|
export declare function getColorVar(color: ThemeColorName, shade: ColorShade): string;
|
|
43
43
|
export type BackgroundVariant = 'solid' | 'soft' | 'light' | 'lighter';
|
|
44
44
|
export declare const backgroundConfig: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./translations-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./translations-DZWe3znu.cjs"),a={loadingExtended:"لوڈ ہو رہا ہے، براہ کرم انتظار کریں",loadingShort:"لوڈ ہو رہا ہے...",locale:"زبان",iconDescription:"آئیکن",loadingIcon:"لوڈنگ آئیکن",failedToLoadIcon:"آئیکن لوڈ کرنے میں ناکام",editLabel:"ترمیم",selectOne:"ایک منتخب کریں",selectMany:"متعدد منتخب کریں",noResults:"کوئی نتیجہ نہیں",passwordPlaceholderText:"خفیہ پاس ورڈ",togglePasswordVisibility:"پاس ورڈ کی مرئیت تبدیل کریں",toggleMenu:"مینو ٹوگل کریں",toggleAside:"سائیڈ پینل ٹوگل کریں",mainNavigation:"بنیادی نیویگیشن",sidebar:"سائیڈ بار",closeDrawer:"دراز بند کریں",closeModal:"ماڈل بند کریں",confirm:"تصدیق",cancel:"منسوخ",addLabel:"شامل کریں",removeItem:"آئٹم ہٹائیں",currentLocale:"اردو",ar:"عربی",de:"جرمن",en:"انگریزی",es:"ہسپانوی",fr:"فرانسیسی",he:"عبرانی",hi:"ہندی",it:"اطالوی",ja:"جاپانی",ko:"کوریائی",nl:"ڈچ",pl:"پولش",pt:"پرتگالی",ru:"روسی",tr:"ترکی",vi:"ویتنامی",zh:"چینی",fa:"فارسی",ur:"اردو",emailPlaceholderText:"اپنا ای میل داخل کریں",incrementValue:"قدر اضافہ کریں",decrementValue:"قدر کم کریں",dropZoneInstructions:e=>e?"منتخب کرنے کے لیے کلک کریں یا فائلیں یہاں گھسیٹیں، یا فائل منتخب کرنے کے لیے Enter یا Space دبائیں":"فائلیں یہاں گھسیٹیں",fileSizeUnits:["بائٹس","KB","MB","GB","TB"],removeFile:"فائل حذف کریں",clearAllFiles:"تمام فائلیں صاف کریں",clearValue:"قدر صاف کریں",unknownType:"نامعلوم قسم",filesInputInstructions:(e,t,l)=>{let n=e==null||e>1?"منتخب کرنے کے لیے کلک کریں یا فائلیں یہاں گھسیٹیں":"منتخب کرنے کے لیے کلک کریں یا فائل یہاں گھسیٹیں";if(e||t){const o=[];if(e!=null&&e>1&&o.push(`زیادہ سے زیادہ ${e} فائلیں`),t&&l){const r=i.formatFileSize(t,{units:l});o.push(`ہر ایک زیادہ سے زیادہ ${r}`)}o.length>0&&(n+=` (${o.join("، ")})`)}return n},prosemirror:{bold:"Bold",italic:"Italic",code:"Code",link:"Link",removeLink:"Remove Link",heading:e=>`Heading ${e}`,bulletList:"Bullet List",orderedList:"Ordered List",blockquote:"Blockquote",codeBlock:"Code Block",horizontalRule:"Horizontal Rule",linkUrlPlaceholder:"https://example.com"}};exports.default=a;
|