twenty-ui 2.48.0 → 2.49.0
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/README.md +27 -2
- package/dist/Avatar-C6WxBgjS.cjs +1 -0
- package/dist/{Avatar-D-QA0RE5.js → Avatar-ifVlxbx_.js} +18 -17
- package/dist/{Button-D5enZ0Qz.js → Button-DIw804CX.js} +1 -1
- package/dist/{Button-Dbi5P05r.cjs → Button-DTm1WDzp.cjs} +1 -1
- package/dist/Dropdown-1OAJvS1f.js +1000 -0
- package/dist/Dropdown-Bl4OXCf9.cjs +1 -0
- package/dist/{ListItem-CjnrSbka.js → ListItem-DizNUBT8.js} +1 -1
- package/dist/{ListItem-CHTR-GLd.cjs → ListItem-DwBb-I1D.cjs} +1 -1
- package/dist/{ProgressBar-BvT1dyFo.js → ProgressBar-B3xACTV2.js} +1 -1
- package/dist/{ProgressBar-DfFz0fFB.cjs → ProgressBar-OpSMnDBz.cjs} +1 -1
- package/dist/{Radio-DMI1B7o5.js → Radio-BEAztmPu.js} +1 -1
- package/dist/{Radio-xmHgGHQO.cjs → Radio-Dx6b4SYZ.cjs} +1 -1
- package/dist/ResizeHandle-B1MuHTNA.cjs +1 -0
- package/dist/{ResizeHandle-C1kQ3MYR.js → ResizeHandle-B30OYZxS.js} +56 -55
- package/dist/Shortcut-Bp9iDdQg.js +73 -0
- package/dist/Shortcut-N8TELGPI.cjs +1 -0
- package/dist/{TintedIconTile-4BGa8g8n.js → TintedIconTile-B1XDtGrF.js} +1 -1
- package/dist/{TintedIconTile-CU2hCerq.cjs → TintedIconTile-DO1XJXCQ.cjs} +1 -1
- package/dist/components/__stories__/reading-direction/DirectionalLayoutExample.d.ts +3 -1
- package/dist/components/code-editor.cjs +1 -1
- package/dist/components/code-editor.mjs +52 -51
- package/dist/components/data-display.cjs +1 -1
- package/dist/components/data-display.mjs +2 -2
- package/dist/components/feedback.cjs +1 -1
- package/dist/components/feedback.mjs +1 -1
- package/dist/components/input/CountrySelect/CountrySelect.d.ts +5 -2
- package/dist/components/input/CountrySelect/__stories__/CountrySelectPartsExample.d.ts +11 -0
- package/dist/components/input/CountrySelect/internal/CountrySelectComponent.d.ts +2 -0
- package/dist/components/input/CountrySelect/internal/CountrySelectContext.d.ts +2 -0
- package/dist/components/input/CountrySelect/internal/CountrySelectContextValue.d.ts +11 -0
- package/dist/components/input/CountrySelect/internal/CountrySelectDropdown.d.ts +4 -0
- package/dist/components/input/CountrySelect/internal/CountrySelectOptions.d.ts +2 -11
- package/dist/components/input/CountrySelect/internal/CountrySelectOptionsContent.d.ts +2 -0
- package/dist/components/input/CountrySelect/internal/CountrySelectRoot.d.ts +2 -0
- package/dist/components/input/CountrySelect/internal/CountrySelectTrigger.d.ts +2 -0
- package/dist/components/input/CountrySelect/internal/NO_COUNTRY_SELECTION_VALUE.d.ts +1 -0
- package/dist/components/input/CountrySelect/internal/PreparedCountryChoice.d.ts +5 -0
- package/dist/components/input/CountrySelect/internal/getCountrySelectionValue.d.ts +1 -0
- package/dist/components/input/CountrySelect/internal/useCountrySelectContextOrThrow.d.ts +1 -0
- package/dist/components/input/CountrySelect/types/CountryChoice.d.ts +1 -0
- package/dist/components/input/CountrySelect/types/CountrySelectOptionsProps.d.ts +10 -0
- package/dist/components/input/CountrySelect/types/CountrySelectOptionsState.d.ts +4 -0
- package/dist/components/input/CountrySelect/types/CountrySelectProps.d.ts +7 -13
- package/dist/components/input/CountrySelect/types/CountrySelectRootProps.d.ts +12 -0
- package/dist/components/input/CountrySelect/types/CountrySelectTriggerProps.d.ts +6 -0
- package/dist/components/input/CurrencyPicker/CurrencyPicker.d.ts +4 -3
- package/dist/components/input/CurrencyPicker/__stories__/CurrencyPickerChangingDefaultExample.d.ts +5 -0
- package/dist/components/input/CurrencyPicker/__stories__/CurrencyPickerControlledExample.d.ts +5 -0
- package/dist/components/input/CurrencyPicker/__stories__/CurrencyPickerControlledSearchExample.d.ts +5 -0
- package/dist/components/input/CurrencyPicker/__stories__/CurrencyPickerExample.d.ts +3 -4
- package/dist/components/input/CurrencyPicker/__stories__/CurrencyPickerListLabelExample.d.ts +1 -0
- package/dist/components/input/CurrencyPicker/__stories__/CurrencyPickerRootStateExample.d.ts +1 -0
- package/dist/components/input/CurrencyPicker/internal/CurrencyPickerContext.d.ts +11 -0
- package/dist/components/input/CurrencyPicker/internal/CurrencyPickerOptions.d.ts +1 -1
- package/dist/components/input/CurrencyPicker/internal/CurrencyPickerRoot.d.ts +2 -0
- package/dist/components/input/CurrencyPicker/internal/CurrencyPickerShorthand.d.ts +2 -0
- package/dist/components/input/CurrencyPicker/internal/CurrencyPickerTrigger.d.ts +1 -1
- package/dist/components/input/CurrencyPicker/internal/PreparedCurrencyPickerOption.d.ts +7 -0
- package/dist/components/input/CurrencyPicker/internal/getCurrencyPickerSearchText.d.ts +2 -0
- package/dist/components/input/CurrencyPicker/internal/useCurrencyPickerContextOrThrow.d.ts +7 -0
- package/dist/components/input/CurrencyPicker/types/CurrencyPickerChangeEventDetails.d.ts +2 -0
- package/dist/components/input/CurrencyPicker/types/CurrencyPickerOption.d.ts +1 -0
- package/dist/components/input/CurrencyPicker/types/CurrencyPickerOptionsProps.d.ts +6 -5
- package/dist/components/input/CurrencyPicker/types/CurrencyPickerProps.d.ts +10 -0
- package/dist/components/input/CurrencyPicker/types/CurrencyPickerRootProps.d.ts +17 -0
- package/dist/components/input/CurrencyPicker/types/CurrencyPickerState.d.ts +6 -0
- package/dist/components/input/CurrencyPicker/types/CurrencyPickerTriggerProps.d.ts +3 -2
- package/dist/components/input/IconButton/__stories__/IconButtonExample.d.ts +7 -0
- package/dist/components/input/PhoneCountryPicker/PhoneCountryPicker.d.ts +5 -3
- package/dist/components/input/PhoneCountryPicker/__stories__/PhoneCountryPickerExample.d.ts +7 -3
- package/dist/components/input/PhoneCountryPicker/__stories__/testDisabledPhoneCountryPicker.d.ts +5 -0
- package/dist/components/input/PhoneCountryPicker/__stories__/testPhoneCountryCallingCodeDirection.d.ts +3 -0
- package/dist/components/input/PhoneCountryPicker/__stories__/testPhoneCountryNullSelection.d.ts +5 -0
- package/dist/components/input/PhoneCountryPicker/__stories__/testPhoneCountrySelection.d.ts +5 -0
- package/dist/components/input/PhoneCountryPicker/internal/PhoneCountryPickerContext.d.ts +9 -0
- package/dist/components/input/PhoneCountryPicker/internal/PhoneCountryPickerOptions.d.ts +1 -1
- package/dist/components/input/PhoneCountryPicker/internal/PhoneCountryPickerRoot.d.ts +2 -0
- package/dist/components/input/PhoneCountryPicker/internal/PhoneCountryPickerTrigger.d.ts +1 -1
- package/dist/components/input/PhoneCountryPicker/internal/PreparedPhoneCountryOption.d.ts +5 -0
- package/dist/components/input/PhoneCountryPicker/internal/getPhoneCountryOptionTooltipLabel.d.ts +2 -0
- package/dist/components/input/PhoneCountryPicker/internal/matchesPhoneCountrySearch.d.ts +6 -0
- package/dist/components/input/PhoneCountryPicker/internal/usePhoneCountryPickerContextOrThrow.d.ts +7 -0
- package/dist/components/input/PhoneCountryPicker/types/PhoneCountryOption.d.ts +1 -0
- package/dist/components/input/PhoneCountryPicker/types/PhoneCountryPickerOptionsProps.d.ts +4 -5
- package/dist/components/input/PhoneCountryPicker/types/PhoneCountryPickerProps.d.ts +10 -0
- package/dist/components/input/PhoneCountryPicker/types/PhoneCountryPickerRootProps.d.ts +12 -0
- package/dist/components/input/PhoneCountryPicker/types/PhoneCountryPickerTriggerProps.d.ts +1 -3
- package/dist/components/input/index.d.ts +10 -0
- package/dist/components/input.cjs +1 -1
- package/dist/components/input.mjs +13 -13
- package/dist/components/layout/OverflowingList/internal/measureItemWidths.d.ts +1 -2
- package/dist/components/layout/OverflowingList/internal/measureOverflowingListLayout.d.ts +1 -2
- package/dist/components/layout.cjs +1 -1
- package/dist/components/layout.mjs +1 -1
- package/dist/components/navigation/Dropdown/Dropdown.d.ts +2 -1
- package/dist/components/navigation/Dropdown/__stories__/DropdownIconGridExample.d.ts +3 -0
- package/dist/components/navigation/Dropdown/__stories__/DropdownSelectionGroupsExample.d.ts +1 -0
- package/dist/components/navigation/Dropdown/internal/DropdownContextValue.d.ts +6 -1
- package/dist/components/navigation/Dropdown/internal/DropdownOptionItem.d.ts +1 -1
- package/dist/components/navigation/Dropdown/internal/DropdownOptionItemOwner.d.ts +7 -0
- package/dist/components/navigation/Dropdown/internal/DropdownSelectionContext.d.ts +2 -0
- package/dist/components/navigation/Dropdown/internal/DropdownSelectionContextValue.d.ts +9 -0
- package/dist/components/navigation/Dropdown/internal/DropdownSelectionGroup.d.ts +2 -0
- package/dist/components/navigation/Dropdown/internal/DropdownSelectionGroupEffect.d.ts +11 -0
- package/dist/components/navigation/Dropdown/internal/createDropdownSelectionEventDetails.d.ts +5 -0
- package/dist/components/navigation/Dropdown/internal/dropdownItemActivation.d.ts +11 -0
- package/dist/components/navigation/Dropdown/internal/getDropdownItemExplicitId.d.ts +2 -2
- package/dist/components/navigation/Dropdown/internal/getDropdownOptionItemRole.d.ts +9 -0
- package/dist/components/navigation/Dropdown/internal/getDropdownSelectionGroupState.d.ts +6 -0
- package/dist/components/navigation/Dropdown/internal/getTrailingFocusGuard.d.ts +1 -0
- package/dist/components/navigation/Dropdown/internal/isDropdownOptionItemSelected.d.ts +6 -0
- package/dist/components/navigation/Dropdown/internal/useDropdownSelections.d.ts +12 -0
- package/dist/components/navigation/Dropdown/types/DropdownOptionItemProps.d.ts +7 -2
- package/dist/components/navigation/Dropdown/types/DropdownOptionItemSelectEventDetails.d.ts +2 -0
- package/dist/components/navigation/Dropdown/types/DropdownOptionItemState.d.ts +5 -0
- package/dist/components/navigation/Dropdown/types/DropdownSelectionGroupChangeEventDetails.d.ts +7 -0
- package/dist/components/navigation/Dropdown/types/DropdownSelectionGroupProps.d.ts +21 -0
- package/dist/components/navigation/Dropdown/types/DropdownSelectionGroupState.d.ts +7 -0
- package/dist/components/navigation/index.d.ts +5 -0
- package/dist/components/navigation.cjs +1 -1
- package/dist/components/navigation.mjs +2 -2
- package/dist/components/settings.cjs +1 -1
- package/dist/components/settings.mjs +1 -1
- package/dist/components.cjs +1 -1
- package/dist/components.mjs +22 -22
- package/dist/data-display-BSKGlijb.cjs +1 -0
- package/dist/{data-display-KyZbLLy-.js → data-display-BtXCGOGw.js} +81 -80
- package/dist/{data-display-0QO_WDSs.js → data-display-DtXIhJ4B.js} +45 -44
- package/dist/data-display-XV3ht1rC.cjs +2 -0
- package/dist/doNotTranslate-BSVT8Xyd.js +4 -0
- package/dist/doNotTranslate-CHE7WmRS.cjs +1 -0
- package/dist/feedback-Cs-38OH4.cjs +1 -0
- package/dist/{feedback-CM6fatE8.js → feedback-DTyVVcTb.js} +198 -197
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +42 -42
- package/dist/{input-CJDYNwoO.cjs → input-B_rBplmn.cjs} +1 -1
- package/dist/input-BrjD91wv.js +785 -0
- package/dist/input-ChlFcqIS.cjs +1 -0
- package/dist/{input-DRpDiMRi.js → input-D1oyk0tD.js} +2 -2
- package/dist/layout-CthYckvl.cjs +1 -0
- package/dist/layout-DQcjBu08.js +439 -0
- package/dist/{navigation-B1SRvzKK.js → navigation-B6nka3bW.js} +125 -128
- package/dist/navigation-CIVYqPc5.js +132 -0
- package/dist/navigation-CflGBYv-.cjs +1 -0
- package/dist/navigation-DoInK0Sp.cjs +1 -0
- package/dist/preventDismissingClickActivation-AaqHBLnW.js +45 -0
- package/dist/preventDismissingClickActivation-CIhWvKCu.cjs +1 -0
- package/dist/primitives/data-display.cjs +1 -1
- package/dist/primitives/data-display.mjs +2 -2
- package/dist/primitives/feedback.cjs +1 -1
- package/dist/primitives/feedback.mjs +1 -1
- package/dist/primitives/input/Radio/__stories__/RadioCardContent.d.ts +8 -0
- package/dist/primitives/input.cjs +1 -1
- package/dist/primitives/input.mjs +3 -3
- package/dist/primitives/layout/ResizeHandle/__stories__/ResizableNotesExample.d.ts +2 -0
- package/dist/primitives/layout.cjs +1 -1
- package/dist/primitives/layout.mjs +1 -1
- package/dist/primitives/navigation.cjs +1 -1
- package/dist/primitives/navigation.mjs +2 -2
- package/dist/primitives/typography.cjs +1 -1
- package/dist/primitives/typography.mjs +2 -2
- package/dist/primitives.cjs +1 -1
- package/dist/primitives.mjs +11 -11
- package/dist/{settings-BjEZiHXE.js → settings-BgVuLpg9.js} +1 -1
- package/dist/{settings-BAYsnlZJ.cjs → settings-CPXhrmbK.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/testing/GroupedCatalog.d.ts +14 -0
- package/dist/testing/index.d.ts +1 -0
- package/dist/testing.cjs +1 -1
- package/dist/testing.mjs +96 -66
- package/dist/{typography-fOTFr0jS.js → typography-DT2eKLvd.js} +1 -1
- package/dist/{typography-B5QEuPaL.cjs → typography-bKeSMuJd.cjs} +1 -1
- package/dist/useIsMobile-Byp9AIq-.cjs +1 -0
- package/dist/useIsMobile-D1ImfQnE.js +38 -0
- package/dist/utilities/internal/doNotTranslate.d.ts +1 -0
- package/dist/utilities-BKCMZyqZ.js +53 -0
- package/dist/utilities-xZh8D2gd.cjs +1 -0
- package/dist/utilities.cjs +1 -1
- package/dist/utilities.mjs +3 -3
- package/package.json +3 -3
- package/dist/Avatar-CQhIEazb.cjs +0 -1
- package/dist/Dropdown-BKjAaZS0.cjs +0 -1
- package/dist/Dropdown-C2hXrjvD.js +0 -820
- package/dist/ResizeHandle-DI4LHIQm.cjs +0 -1
- package/dist/Shortcut-BvWUZ3pb.js +0 -72
- package/dist/Shortcut-CgrdLv_L.cjs +0 -1
- package/dist/data-display-CPmTJAWJ.cjs +0 -1
- package/dist/data-display-DjhAHvj1.cjs +0 -2
- package/dist/feedback-ybO4n69s.cjs +0 -1
- package/dist/input-3D2lXywH.cjs +0 -1
- package/dist/input-TM3nUdu6.js +0 -554
- package/dist/layout-BszCDxAO.js +0 -441
- package/dist/layout-VaIq7Sjr.cjs +0 -1
- package/dist/navigation-CYAs2LnR.js +0 -131
- package/dist/navigation-CthkGHJ8.cjs +0 -1
- package/dist/navigation-DrOV5E67.cjs +0 -1
- package/dist/preventDismissingClickActivation-CzWqpjiX.js +0 -44
- package/dist/preventDismissingClickActivation-DZxTSLV3.cjs +0 -1
- package/dist/useIsMobile-DxOPI2_E.cjs +0 -1
- package/dist/useIsMobile-nrufFzMb.js +0 -37
- package/dist/utilities-BeLfNQ0Q.cjs +0 -1
- package/dist/utilities-CEi9I09B.js +0 -52
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { t as C } from "./isDefined-fMi6eQ4r.js";
|
|
2
|
-
var L = /[·ʻʼ´¨ˆ˜΄ˇ˘˙˚˛˝¯¸^`]/g, l = new RegExp("([\\p{Script=Latin}\\p{Script=Greek}\\p{Script_Extensions=Arabic}\\p{Script=Hebrew}])\\p{Mark}+", "gu"), p = new RegExp("(\\p{Script=Cyrillic})(\\p{Mark}+)", "gu"), T = /[\u0300\u0301]/g, S = ["г", "к"], I = /[가-힣]+/g, A = /[ㄱ-ㆎ]/g, E = {
|
|
3
|
-
ø: "o",
|
|
4
|
-
æ: "ae",
|
|
5
|
-
ß: "ss",
|
|
6
|
-
ð: "d",
|
|
7
|
-
þ: "th",
|
|
8
|
-
ł: "l",
|
|
9
|
-
œ: "oe",
|
|
10
|
-
đ: "d",
|
|
11
|
-
ı: "i",
|
|
12
|
-
ŋ: "ng",
|
|
13
|
-
ς: "σ",
|
|
14
|
-
ё: "е"
|
|
15
|
-
}, u = new RegExp(`[${Object.keys(E).join("")}]`, "g"), R = (e, r, o) => S.includes(r) ? `${r}${o}` : `${r}${o.replace(T, "")}`, v = (e) => C(e) ? e.toLowerCase().normalize("NFD").replace(L, "").replace(l, "$1").replace(p, R).normalize("NFC").replace(I, (r) => r.normalize("NFD")).replace(A, (r) => r.normalize("NFKD")).replace(u, (r) => E[r] ?? r) : "", N = [
|
|
16
|
-
"pointerdown",
|
|
17
|
-
"mousedown",
|
|
18
|
-
"touchend",
|
|
19
|
-
"focusout"
|
|
20
|
-
], s = ["pointerdown", "keydown"], g = [
|
|
21
|
-
...s,
|
|
22
|
-
"keyup",
|
|
23
|
-
"mousedown"
|
|
24
|
-
], c = (e) => {
|
|
25
|
-
e.preventDefault(), e.stopPropagation();
|
|
26
|
-
}, m = (e) => {
|
|
27
|
-
if (e.type === "click") {
|
|
28
|
-
c(e);
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
|
-
if (!N.includes(e.type)) return;
|
|
32
|
-
const r = e.target instanceof Node ? e.target.ownerDocument ?? document : document, o = r.defaultView ?? r, t = new AbortController(), i = () => t.abort(), a = {
|
|
33
|
-
capture: !0,
|
|
34
|
-
signal: t.signal
|
|
35
|
-
}, _ = e.type === "focusout" ? g : s;
|
|
36
|
-
o.addEventListener("click", (n) => {
|
|
37
|
-
c(n), i();
|
|
38
|
-
}, a);
|
|
39
|
-
for (const n of _) o.addEventListener(n, i, a);
|
|
40
|
-
};
|
|
41
|
-
export {
|
|
42
|
-
v as n,
|
|
43
|
-
m as t
|
|
44
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const l=require("./isDefined-DS2Q42p5.cjs");var C=/[·ʻʼ´¨ˆ˜΄ˇ˘˙˚˛˝¯¸^`]/g,p=new RegExp("([\\p{Script=Latin}\\p{Script=Greek}\\p{Script_Extensions=Arabic}\\p{Script=Hebrew}])\\p{Mark}+","gu"),L=new RegExp("(\\p{Script=Cyrillic})(\\p{Mark}+)","gu"),u=/[\u0300\u0301]/g,T=["г","к"],S=/[가-힣]+/g,A=/[ㄱ-ㆎ]/g,s={ø:"o",æ:"ae",ß:"ss",ð:"d",þ:"th",ł:"l",œ:"oe",đ:"d",ı:"i",ŋ:"ng",ς:"σ",ё:"е"},I=new RegExp(`[${Object.keys(s).join("")}]`,"g"),g=(e,r,n)=>T.includes(r)?`${r}${n}`:`${r}${n.replace(u,"")}`,R=e=>l.isDefined(e)?e.toLowerCase().normalize("NFD").replace(C,"").replace(p,"$1").replace(L,g).normalize("NFC").replace(S,r=>r.normalize("NFD")).replace(A,r=>r.normalize("NFKD")).replace(I,r=>s[r]??r):"",d=["pointerdown","mousedown","touchend","focusout"],E=["pointerdown","keydown"],N=[...E,"keyup","mousedown"],c=e=>{e.preventDefault(),e.stopPropagation()},v=e=>{if(e.type==="click"){c(e);return}if(!d.includes(e.type))return;const r=e.target instanceof Node?e.target.ownerDocument??document:document,n=r.defaultView??r,i=new AbortController,o=()=>i.abort(),a={capture:!0,signal:i.signal},_=e.type==="focusout"?N:E;n.addEventListener("click",t=>{c(t),o()},a);for(const t of _)n.addEventListener(t,o,a)};Object.defineProperty(exports,"normalizeSearchText",{enumerable:!0,get:function(){return R}});Object.defineProperty(exports,"preventDismissingClickActivation",{enumerable:!0,get:function(){return v}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const w=require("./theme-1XkFz8Qu.cjs"),u=require("./isDefined-DS2Q42p5.cjs");let s=require("@sniptt/guards"),c=require("react");var d=()=>{const r=globalThis.navigator?.userAgent;if(!(0,s.isString)(r))return"unknown";const e=r.toLowerCase();return e.includes("ios")||e.includes("iphone")||e.includes("ipad")?"ios":e.includes("mac os x")||e.includes("macos")?"mac":e.includes("windows")?"windows":e.includes("android")?"android":e.includes("linux")?"linux":"unknown"},a="(max-width: 768px)",l={getSnapshot:()=>!1,subscribe:()=>()=>{}},i=new WeakMap,f=r=>({getSnapshot:()=>r.matches,subscribe:e=>(r.addEventListener("change",e),()=>r.removeEventListener("change",e))}),g=r=>{const e=i.get(r);if(u.isDefined(e))return e;const t=new Map;return i.set(r,t),t},y=r=>{if(typeof window>"u"||!(0,s.isFunction)(window.matchMedia))return l;const e=g(window.matchMedia),t=e.get(r);if(u.isDefined(t))return t;const n=f(window.matchMedia(r));return e.set(r,n),n},M=()=>!1,o=r=>{const{subscribe:e,getSnapshot:t}=y(r);return(0,c.useSyncExternalStore)(e,t,M)},m=()=>o(a);Object.defineProperty(exports,"MOBILE_MEDIA_QUERY",{enumerable:!0,get:function(){return a}});Object.defineProperty(exports,"getUserDevice",{enumerable:!0,get:function(){return d}});Object.defineProperty(exports,"useIsMobile",{enumerable:!0,get:function(){return m}});Object.defineProperty(exports,"useMediaQuery",{enumerable:!0,get:function(){return o}});
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { t as s } from "./isDefined-fMi6eQ4r.js";
|
|
2
|
-
import "./theme-B2EaXhye.js";
|
|
3
|
-
import { isFunction as a, isString as o } from "@sniptt/guards";
|
|
4
|
-
import { useSyncExternalStore as u } from "react";
|
|
5
|
-
var h = () => {
|
|
6
|
-
const r = globalThis.navigator?.userAgent;
|
|
7
|
-
if (!o(r)) return "unknown";
|
|
8
|
-
const e = r.toLowerCase();
|
|
9
|
-
return e.includes("ios") || e.includes("iphone") || e.includes("ipad") ? "ios" : e.includes("mac os x") || e.includes("macos") ? "mac" : e.includes("windows") ? "windows" : e.includes("android") ? "android" : e.includes("linux") ? "linux" : "unknown";
|
|
10
|
-
}, d = "(max-width: 768px)", c = {
|
|
11
|
-
getSnapshot: () => !1,
|
|
12
|
-
subscribe: () => () => {
|
|
13
|
-
}
|
|
14
|
-
}, i = /* @__PURE__ */ new WeakMap(), m = (r) => ({
|
|
15
|
-
getSnapshot: () => r.matches,
|
|
16
|
-
subscribe: (e) => (r.addEventListener("change", e), () => r.removeEventListener("change", e))
|
|
17
|
-
}), f = (r) => {
|
|
18
|
-
const e = i.get(r);
|
|
19
|
-
if (s(e)) return e;
|
|
20
|
-
const n = /* @__PURE__ */ new Map();
|
|
21
|
-
return i.set(r, n), n;
|
|
22
|
-
}, l = (r) => {
|
|
23
|
-
if (typeof window > "u" || !a(window.matchMedia)) return c;
|
|
24
|
-
const e = f(window.matchMedia), n = e.get(r);
|
|
25
|
-
if (s(n)) return n;
|
|
26
|
-
const t = m(window.matchMedia(r));
|
|
27
|
-
return e.set(r, t), t;
|
|
28
|
-
}, w = () => !1, S = (r) => {
|
|
29
|
-
const { subscribe: e, getSnapshot: n } = l(r);
|
|
30
|
-
return u(e, n, w);
|
|
31
|
-
}, Q = () => S(d);
|
|
32
|
-
export {
|
|
33
|
-
h as i,
|
|
34
|
-
S as n,
|
|
35
|
-
d as r,
|
|
36
|
-
Q as t
|
|
37
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const n=require("./theme-1XkFz8Qu.cjs"),i=require("./useIsMobile-DxOPI2_E.cjs");let m=require("zod");var h=e=>e.replace(/\d+$/,""),u=m.z.enum(n.MAIN_COLOR_NAMES),f=e=>{const r=u.safeParse(e??"");return r.success?r.data:n.DEFAULT_THEME_COLOR_FALLBACK},c=e=>{let r=0;for(let t=0;t<e.length;t++)r=e.charCodeAt(t)+((r<<5)-r);return n.MAIN_COLOR_NAMES[Math.abs(r)%n.MAIN_COLOR_NAMES.length]??n.MAIN_COLOR_NAMES[0]},O=({string:e,variant:r=9,theme:t})=>{if(r<1||r>12)throw new Error("Variant must be between 1 and 12");const l=`${c(e)}${r}`;return t.color[l]},C=()=>{const e=i.getUserDevice();return e==="mac"||e==="ios"?"⌘":"Ctrl"},s="(hover: none) and (pointer: coarse)",g=()=>i.useMediaQuery(s),b=["http:","https:","mailto:","tel:"],o="https://same-origin-probe.invalid",a=e=>{if(e.startsWith("/"))try{return new URL(e,o).origin===o}catch{return!1}try{const r=new URL(e);return b.includes(r.protocol)}catch{return!1}},_=e=>{if(!e||e.trim().length===0)return;if(a(e))return e;if(e.startsWith("/"))return;const r=`https://${e}`;return a(r)?r:void 0};Object.defineProperty(exports,"TOUCH_DEVICE_MEDIA_QUERY",{enumerable:!0,get:function(){return s}});Object.defineProperty(exports,"getMainColorNameFromPaletteColorName",{enumerable:!0,get:function(){return h}});Object.defineProperty(exports,"getOsControlSymbol",{enumerable:!0,get:function(){return C}});Object.defineProperty(exports,"getSafeUrl",{enumerable:!0,get:function(){return _}});Object.defineProperty(exports,"parseThemeColor",{enumerable:!0,get:function(){return f}});Object.defineProperty(exports,"stringToThemeColor",{enumerable:!0,get:function(){return c}});Object.defineProperty(exports,"stringToThemeColorP3String",{enumerable:!0,get:function(){return O}});Object.defineProperty(exports,"themeColorSchema",{enumerable:!0,get:function(){return u}});Object.defineProperty(exports,"useIsTouchDevice",{enumerable:!0,get:function(){return g}});
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { f as a, h as i } from "./theme-B2EaXhye.js";
|
|
2
|
-
import { i as h, n as c } from "./useIsMobile-nrufFzMb.js";
|
|
3
|
-
import { z as m } from "zod";
|
|
4
|
-
var E = (e) => e.replace(/\d+$/, ""), l = m.enum(a), d = (e) => {
|
|
5
|
-
const r = l.safeParse(e ?? "");
|
|
6
|
-
return r.success ? r.data : i;
|
|
7
|
-
}, v = (e) => {
|
|
8
|
-
let r = 0;
|
|
9
|
-
for (let t = 0; t < e.length; t++) r = e.charCodeAt(t) + ((r << 5) - r);
|
|
10
|
-
return a[Math.abs(r) % a.length] ?? a[0];
|
|
11
|
-
}, g = ({ string: e, variant: r = 9, theme: t }) => {
|
|
12
|
-
if (r < 1 || r > 12) throw new Error("Variant must be between 1 and 12");
|
|
13
|
-
const n = `${v(e)}${r}`;
|
|
14
|
-
return t.color[n];
|
|
15
|
-
}, O = () => {
|
|
16
|
-
const e = h();
|
|
17
|
-
return e === "mac" || e === "ios" ? "⌘" : "Ctrl";
|
|
18
|
-
}, f = "(hover: none) and (pointer: coarse)", S = () => c(f), u = [
|
|
19
|
-
"http:",
|
|
20
|
-
"https:",
|
|
21
|
-
"mailto:",
|
|
22
|
-
"tel:"
|
|
23
|
-
], o = "https://same-origin-probe.invalid", s = (e) => {
|
|
24
|
-
if (e.startsWith("/")) try {
|
|
25
|
-
return new URL(e, o).origin === o;
|
|
26
|
-
} catch {
|
|
27
|
-
return !1;
|
|
28
|
-
}
|
|
29
|
-
try {
|
|
30
|
-
const r = new URL(e);
|
|
31
|
-
return u.includes(r.protocol);
|
|
32
|
-
} catch {
|
|
33
|
-
return !1;
|
|
34
|
-
}
|
|
35
|
-
}, A = (e) => {
|
|
36
|
-
if (!e || e.trim().length === 0) return;
|
|
37
|
-
if (s(e)) return e;
|
|
38
|
-
if (e.startsWith("/")) return;
|
|
39
|
-
const r = `https://${e}`;
|
|
40
|
-
return s(r) ? r : void 0;
|
|
41
|
-
};
|
|
42
|
-
export {
|
|
43
|
-
v as a,
|
|
44
|
-
l as c,
|
|
45
|
-
O as i,
|
|
46
|
-
E as l,
|
|
47
|
-
S as n,
|
|
48
|
-
g as o,
|
|
49
|
-
f as r,
|
|
50
|
-
d as s,
|
|
51
|
-
A as t
|
|
52
|
-
};
|