@frontify/fondue-components 28.0.0 → 29.0.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/dist/fondue-components.js +60 -56
- package/dist/fondue-components.js.map +1 -1
- package/dist/fondue-components10.js +1 -1
- package/dist/fondue-components100.js +22 -16
- package/dist/fondue-components100.js.map +1 -1
- package/dist/fondue-components101.js +34 -151
- package/dist/fondue-components101.js.map +1 -1
- package/dist/fondue-components102.js +10 -44
- package/dist/fondue-components102.js.map +1 -1
- package/dist/fondue-components103.js +67 -13
- package/dist/fondue-components103.js.map +1 -1
- package/dist/fondue-components104.js +13 -13
- package/dist/fondue-components105.js +26 -111
- package/dist/fondue-components105.js.map +1 -1
- package/dist/fondue-components106.js +18 -12
- package/dist/fondue-components106.js.map +1 -1
- package/dist/fondue-components107.js +25 -17
- package/dist/fondue-components107.js.map +1 -1
- package/dist/fondue-components108.js +8 -12
- package/dist/fondue-components108.js.map +1 -1
- package/dist/fondue-components109.js +30 -16
- package/dist/fondue-components109.js.map +1 -1
- package/dist/fondue-components11.js +3 -3
- package/dist/fondue-components110.js +7 -6
- package/dist/fondue-components110.js.map +1 -1
- package/dist/fondue-components111.js +4 -11
- package/dist/fondue-components111.js.map +1 -1
- package/dist/fondue-components112.js +4 -70
- package/dist/fondue-components112.js.map +1 -1
- package/dist/fondue-components113.js +16 -14
- package/dist/fondue-components113.js.map +1 -1
- package/dist/fondue-components114.js +14 -7
- package/dist/fondue-components114.js.map +1 -1
- package/dist/fondue-components115.js +14 -88
- package/dist/fondue-components115.js.map +1 -1
- package/dist/fondue-components116.js +108 -78
- package/dist/fondue-components116.js.map +1 -1
- package/dist/fondue-components117.js +12 -30
- package/dist/fondue-components117.js.map +1 -1
- package/dist/fondue-components118.js +17 -29
- package/dist/fondue-components118.js.map +1 -1
- package/dist/fondue-components119.js +16 -0
- package/dist/fondue-components119.js.map +1 -0
- package/dist/fondue-components12.js +3 -3
- package/dist/fondue-components120.js +127 -41
- package/dist/fondue-components120.js.map +1 -1
- package/dist/fondue-components121.js +11 -19
- package/dist/fondue-components121.js.map +1 -1
- package/dist/fondue-components122.js +33 -18
- package/dist/fondue-components122.js.map +1 -1
- package/dist/fondue-components123.js +215 -38
- package/dist/fondue-components123.js.map +1 -1
- package/dist/fondue-components124.js +18 -67
- package/dist/fondue-components124.js.map +1 -1
- package/dist/fondue-components125.js +16 -30
- package/dist/fondue-components125.js.map +1 -1
- package/dist/fondue-components126.js +151 -9
- package/dist/fondue-components126.js.map +1 -1
- package/dist/fondue-components127.js +44 -152
- package/dist/fondue-components127.js.map +1 -1
- package/dist/fondue-components128.js +168 -106
- package/dist/fondue-components128.js.map +1 -1
- package/dist/fondue-components129.js +61 -17
- package/dist/fondue-components129.js.map +1 -1
- package/dist/fondue-components13.js +61 -35
- package/dist/fondue-components13.js.map +1 -1
- package/dist/fondue-components130.js +8 -15
- package/dist/fondue-components130.js.map +1 -1
- package/dist/fondue-components131.js +255 -28
- package/dist/fondue-components131.js.map +1 -1
- package/dist/fondue-components132.js +29 -13
- package/dist/fondue-components132.js.map +1 -1
- package/dist/fondue-components134.js +44 -0
- package/dist/fondue-components134.js.map +1 -0
- package/dist/fondue-components135.js +9 -0
- package/dist/fondue-components135.js.map +1 -0
- package/dist/fondue-components136.js +15 -0
- package/dist/fondue-components136.js.map +1 -0
- package/dist/fondue-components137.js +74 -0
- package/dist/fondue-components137.js.map +1 -0
- package/dist/fondue-components138.js +18 -0
- package/dist/fondue-components138.js.map +1 -0
- package/dist/fondue-components139.js +10 -0
- package/dist/fondue-components139.js.map +1 -0
- package/dist/fondue-components14.js +36 -121
- package/dist/fondue-components14.js.map +1 -1
- package/dist/fondue-components140.js +92 -0
- package/dist/fondue-components140.js.map +1 -0
- package/dist/fondue-components141.js +84 -0
- package/dist/fondue-components141.js.map +1 -0
- package/dist/fondue-components142.js +34 -0
- package/dist/fondue-components142.js.map +1 -0
- package/dist/fondue-components143.js +22 -0
- package/dist/fondue-components143.js.map +1 -0
- package/dist/fondue-components144.js +73 -0
- package/dist/fondue-components144.js.map +1 -0
- package/dist/fondue-components145.js +1355 -0
- package/dist/fondue-components145.js.map +1 -0
- package/dist/fondue-components146.js +944 -0
- package/dist/fondue-components146.js.map +1 -0
- package/dist/fondue-components147.js +201 -0
- package/dist/fondue-components147.js.map +1 -0
- package/dist/fondue-components148.js +24 -0
- package/dist/fondue-components148.js.map +1 -0
- package/dist/fondue-components149.js +43 -0
- package/dist/fondue-components149.js.map +1 -0
- package/dist/fondue-components15.js +121 -36
- package/dist/fondue-components15.js.map +1 -1
- package/dist/fondue-components150.js +71 -0
- package/dist/fondue-components150.js.map +1 -0
- package/dist/fondue-components151.js +34 -0
- package/dist/fondue-components151.js.map +1 -0
- package/dist/fondue-components152.js +12 -0
- package/dist/fondue-components152.js.map +1 -0
- package/dist/fondue-components153.js +156 -0
- package/dist/fondue-components153.js.map +1 -0
- package/dist/fondue-components154.js +111 -0
- package/dist/fondue-components154.js.map +1 -0
- package/dist/fondue-components155.js +19 -0
- package/dist/fondue-components155.js.map +1 -0
- package/dist/fondue-components156.js +19 -0
- package/dist/fondue-components156.js.map +1 -0
- package/dist/fondue-components157.js +32 -0
- package/dist/fondue-components157.js.map +1 -0
- package/dist/fondue-components158.js +16 -0
- package/dist/fondue-components158.js.map +1 -0
- package/dist/{fondue-components133.js → fondue-components159.js} +1 -1
- package/dist/{fondue-components133.js.map → fondue-components159.js.map} +1 -1
- package/dist/fondue-components16.js +30 -39
- package/dist/fondue-components16.js.map +1 -1
- package/dist/fondue-components17.js +44 -41
- package/dist/fondue-components17.js.map +1 -1
- package/dist/fondue-components18.js +42 -57
- package/dist/fondue-components18.js.map +1 -1
- package/dist/fondue-components19.js +55 -41
- package/dist/fondue-components19.js.map +1 -1
- package/dist/fondue-components20.js +39 -16
- package/dist/fondue-components20.js.map +1 -1
- package/dist/fondue-components21.js +17 -43
- package/dist/fondue-components21.js.map +1 -1
- package/dist/fondue-components22.js +42 -69
- package/dist/fondue-components22.js.map +1 -1
- package/dist/fondue-components23.js +69 -17
- package/dist/fondue-components23.js.map +1 -1
- package/dist/fondue-components24.js +71 -74
- package/dist/fondue-components24.js.map +1 -1
- package/dist/fondue-components25.js +18 -36
- package/dist/fondue-components25.js.map +1 -1
- package/dist/fondue-components26.js +72 -50
- package/dist/fondue-components26.js.map +1 -1
- package/dist/fondue-components27.js +36 -23
- package/dist/fondue-components27.js.map +1 -1
- package/dist/fondue-components28.js +50 -50
- package/dist/fondue-components28.js.map +1 -1
- package/dist/fondue-components29.js +23 -100
- package/dist/fondue-components29.js.map +1 -1
- package/dist/fondue-components3.js +1 -1
- package/dist/fondue-components30.js +50 -28
- package/dist/fondue-components30.js.map +1 -1
- package/dist/fondue-components31.js +92 -188
- package/dist/fondue-components31.js.map +1 -1
- package/dist/fondue-components32.js +31 -144
- package/dist/fondue-components32.js.map +1 -1
- package/dist/fondue-components33.js +192 -129
- package/dist/fondue-components33.js.map +1 -1
- package/dist/fondue-components34.js +141 -27
- package/dist/fondue-components34.js.map +1 -1
- package/dist/fondue-components35.js +123 -71
- package/dist/fondue-components35.js.map +1 -1
- package/dist/fondue-components36.js +28 -120
- package/dist/fondue-components36.js.map +1 -1
- package/dist/fondue-components37.js +80 -35
- package/dist/fondue-components37.js.map +1 -1
- package/dist/fondue-components38.js +119 -52
- package/dist/fondue-components38.js.map +1 -1
- package/dist/fondue-components39.js +36 -20
- package/dist/fondue-components39.js.map +1 -1
- package/dist/fondue-components4.js +3 -3
- package/dist/fondue-components40.js +56 -25
- package/dist/fondue-components40.js.map +1 -1
- package/dist/fondue-components41.js +20 -7
- package/dist/fondue-components41.js.map +1 -1
- package/dist/fondue-components42.js +25 -8
- package/dist/fondue-components42.js.map +1 -1
- package/dist/fondue-components43.js +8 -41
- package/dist/fondue-components43.js.map +1 -1
- package/dist/fondue-components44.js +8 -4
- package/dist/fondue-components44.js.map +1 -1
- package/dist/fondue-components45.js +41 -5
- package/dist/fondue-components45.js.map +1 -1
- package/dist/fondue-components46.js +3 -11
- package/dist/fondue-components46.js.map +1 -1
- package/dist/fondue-components47.js +5 -32
- package/dist/fondue-components47.js.map +1 -1
- package/dist/fondue-components48.js +12 -53
- package/dist/fondue-components48.js.map +1 -1
- package/dist/fondue-components49.js +32 -131
- package/dist/fondue-components49.js.map +1 -1
- package/dist/fondue-components5.js +2 -2
- package/dist/fondue-components50.js +53 -20
- package/dist/fondue-components50.js.map +1 -1
- package/dist/fondue-components51.js +131 -53
- package/dist/fondue-components51.js.map +1 -1
- package/dist/fondue-components52.js +20 -7
- package/dist/fondue-components52.js.map +1 -1
- package/dist/fondue-components53.js +53 -13
- package/dist/fondue-components53.js.map +1 -1
- package/dist/fondue-components54.js +7 -16
- package/dist/fondue-components54.js.map +1 -1
- package/dist/fondue-components55.js +13 -5
- package/dist/fondue-components55.js.map +1 -1
- package/dist/fondue-components56.js +17 -18
- package/dist/fondue-components56.js.map +1 -1
- package/dist/fondue-components57.js +4 -18
- package/dist/fondue-components57.js.map +1 -1
- package/dist/fondue-components58.js +18 -44
- package/dist/fondue-components58.js.map +1 -1
- package/dist/fondue-components59.js +18 -24
- package/dist/fondue-components59.js.map +1 -1
- package/dist/fondue-components6.js +1 -1
- package/dist/fondue-components60.js +43 -22
- package/dist/fondue-components60.js.map +1 -1
- package/dist/fondue-components61.js +24 -4
- package/dist/fondue-components61.js.map +1 -1
- package/dist/fondue-components62.js +22 -12
- package/dist/fondue-components62.js.map +1 -1
- package/dist/fondue-components63.js +6 -4
- package/dist/fondue-components63.js.map +1 -1
- package/dist/fondue-components64.js +4 -17
- package/dist/fondue-components64.js.map +1 -1
- package/dist/fondue-components65.js +12 -10
- package/dist/fondue-components65.js.map +1 -1
- package/dist/fondue-components66.js +4 -36
- package/dist/fondue-components66.js.map +1 -1
- package/dist/fondue-components67.js +17 -6
- package/dist/fondue-components67.js.map +1 -1
- package/dist/fondue-components68.js +10 -4
- package/dist/fondue-components68.js.map +1 -1
- package/dist/fondue-components69.js +34 -10
- package/dist/fondue-components69.js.map +1 -1
- package/dist/fondue-components7.js +1 -1
- package/dist/fondue-components70.js +6 -8
- package/dist/fondue-components70.js.map +1 -1
- package/dist/fondue-components71.js +4 -12
- package/dist/fondue-components71.js.map +1 -1
- package/dist/fondue-components72.js +11 -3
- package/dist/fondue-components72.js.map +1 -1
- package/dist/fondue-components73.js +50 -23
- package/dist/fondue-components73.js.map +1 -1
- package/dist/fondue-components74.js +44 -17
- package/dist/fondue-components74.js.map +1 -1
- package/dist/fondue-components75.js +6 -20
- package/dist/fondue-components75.js.map +1 -1
- package/dist/fondue-components76.js +6 -20
- package/dist/fondue-components76.js.map +1 -1
- package/dist/fondue-components77.js +12 -19
- package/dist/fondue-components77.js.map +1 -1
- package/dist/fondue-components78.js +24 -16
- package/dist/fondue-components78.js.map +1 -1
- package/dist/fondue-components79.js +13 -19
- package/dist/fondue-components79.js.map +1 -1
- package/dist/fondue-components8.js +5 -5
- package/dist/fondue-components80.js +5 -8
- package/dist/fondue-components80.js.map +1 -1
- package/dist/fondue-components81.js +12 -10
- package/dist/fondue-components81.js.map +1 -1
- package/dist/fondue-components82.js +47 -10
- package/dist/fondue-components82.js.map +1 -1
- package/dist/fondue-components83.js +20 -4
- package/dist/fondue-components83.js.map +1 -1
- package/dist/fondue-components84.js +628 -12
- package/dist/fondue-components84.js.map +1 -1
- package/dist/fondue-components85.js +8 -22
- package/dist/fondue-components85.js.map +1 -1
- package/dist/fondue-components86.js +13 -34
- package/dist/fondue-components86.js.map +1 -1
- package/dist/fondue-components87.js +4 -10
- package/dist/fondue-components87.js.map +1 -1
- package/dist/fondue-components88.js +23 -66
- package/dist/fondue-components88.js.map +1 -1
- package/dist/fondue-components89.js +14 -12
- package/dist/fondue-components89.js.map +1 -1
- package/dist/fondue-components9.js +5 -5
- package/dist/fondue-components90.js +20 -25
- package/dist/fondue-components90.js.map +1 -1
- package/dist/fondue-components91.js +20 -19
- package/dist/fondue-components91.js.map +1 -1
- package/dist/fondue-components92.js +20 -25
- package/dist/fondue-components92.js.map +1 -1
- package/dist/fondue-components93.js +20 -9
- package/dist/fondue-components93.js.map +1 -1
- package/dist/fondue-components94.js +19 -31
- package/dist/fondue-components94.js.map +1 -1
- package/dist/fondue-components95.js +8 -7
- package/dist/fondue-components95.js.map +1 -1
- package/dist/fondue-components96.js +10 -4
- package/dist/fondue-components96.js.map +1 -1
- package/dist/fondue-components97.js +10 -4
- package/dist/fondue-components97.js.map +1 -1
- package/dist/fondue-components98.js +6 -216
- package/dist/fondue-components98.js.map +1 -1
- package/dist/fondue-components99.js +12 -18
- package/dist/fondue-components99.js.map +1 -1
- package/dist/index.d.ts +100 -2
- package/dist/style.css +1 -1
- package/package.json +6 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components129.js","sources":["../../../node_modules/.pnpm
|
|
1
|
+
{"version":3,"file":"fondue-components129.js","sources":["../../../node_modules/.pnpm/@dnd-kit+react@0.3.2_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@dnd-kit/react/hooks.js"],"sourcesContent":["import { useLayoutEffect, useEffect, useRef, useMemo, useState, useCallback } from 'react';\nimport { computed, effect, untracked } from '@dnd-kit/state';\nimport { flushSync } from 'react-dom';\nimport { currentValue } from '@dnd-kit/react/utilities';\n\nfunction useConstant(initializer) {\n const ref = useRef(null);\n if (!ref.current) {\n ref.current = initializer();\n }\n return ref.current;\n}\nvar canUseDOM = typeof window !== \"undefined\" && typeof window.document !== \"undefined\" && typeof window.document.createElement !== \"undefined\";\nvar useIsomorphicLayoutEffect = canUseDOM ? useLayoutEffect : useEffect;\nfunction useForceUpdate() {\n const setState = useState(0)[1];\n return useCallback(() => {\n setState((value) => value + 1);\n }, [setState]);\n}\n\n// src/hooks/useSignal.ts\nfunction useSignal(signal, sync = false) {\n const previous = useRef(signal.peek());\n const read = useRef(false);\n const forceUpdate = useForceUpdate();\n useIsomorphicLayoutEffect(\n () => effect(() => {\n const previousValue = previous.current;\n const currentValue2 = signal.value;\n if (previousValue !== currentValue2) {\n previous.current = currentValue2;\n if (!read.current) return;\n if (sync) {\n flushSync(forceUpdate);\n } else {\n forceUpdate();\n }\n }\n }),\n [signal, sync, forceUpdate]\n );\n return {\n get value() {\n read.current = true;\n return signal.peek();\n }\n };\n}\n\n// src/hooks/useComputed.ts\nfunction useComputed(compute, dependencies = [], sync = false) {\n const $compute = useRef(compute);\n $compute.current = compute;\n return useSignal(\n useMemo(() => computed(() => $compute.current()), dependencies),\n sync\n );\n}\nfunction useDeepSignal(target, synchronous) {\n const tracked = useRef(/* @__PURE__ */ new Map());\n const forceUpdate = useForceUpdate();\n useIsomorphicLayoutEffect(() => {\n if (!target) {\n tracked.current.clear();\n return;\n }\n return effect(() => {\n var _a;\n let stale = false;\n let sync = false;\n for (const entry of tracked.current) {\n const [key] = entry;\n const value = untracked(() => entry[1]);\n const latestValue = target[key];\n if (value !== latestValue) {\n stale = true;\n tracked.current.set(key, latestValue);\n sync = (_a = synchronous == null ? void 0 : synchronous(key, value, latestValue)) != null ? _a : false;\n }\n }\n if (stale) {\n sync ? flushSync(forceUpdate) : forceUpdate();\n }\n });\n }, [target]);\n return useMemo(\n () => target ? new Proxy(target, {\n get(target2, key) {\n const value = target2[key];\n tracked.current.set(key, value);\n return value;\n }\n }) : target,\n [target]\n );\n}\n\n// src/hooks/useImmediateEffect.ts\nfunction useImmediateEffect(callback, _) {\n callback();\n}\nfunction useLatest(value) {\n const valueRef = useRef(value);\n useIsomorphicLayoutEffect(() => {\n valueRef.current = value;\n }, [value]);\n return valueRef;\n}\nfunction useOnValueChange(value, onChange, effect3 = useEffect, compare = Object.is) {\n const tracked = useRef(value);\n effect3(() => {\n const oldValue = tracked.current;\n if (!compare(value, oldValue)) {\n tracked.current = value;\n onChange(value, oldValue);\n }\n }, [onChange, value]);\n}\nfunction useOnElementChange(value, onChange) {\n const previous = useRef(currentValue(value));\n useIsomorphicLayoutEffect(() => {\n const current = currentValue(value);\n if (current !== previous.current) {\n previous.current = current;\n onChange(current);\n }\n });\n}\n\nexport { useComputed, useConstant, useDeepSignal, useImmediateEffect, useIsomorphicLayoutEffect, useLatest, useOnElementChange, useOnValueChange };\n//# sourceMappingURL=hooks.js.map\n//# sourceMappingURL=hooks.js.map"],"names":["canUseDOM","useIsomorphicLayoutEffect","useLayoutEffect","useEffect","useForceUpdate","setState","useState","useCallback","value","useDeepSignal","target","synchronous","tracked","useRef","forceUpdate","effect","_a","stale","sync","entry","key","untracked","latestValue","flushSync","useMemo","target2","useImmediateEffect","callback","_","useOnValueChange","onChange","effect3","compare","oldValue","useOnElementChange","previous","currentValue","current"],"mappings":";;;;;AAYA,IAAIA,IAAY,OAAO,SAAW,OAAe,OAAO,OAAO,WAAa,OAAe,OAAO,OAAO,SAAS,gBAAkB,KAChIC,IAA4BD,IAAYE,IAAkBC;AAC9D,SAASC,IAAiB;AACxB,QAAMC,IAAWC,EAAS,CAAC,EAAE,CAAC;AAC9B,SAAOC,EAAY,MAAM;AACvB,IAAAF,EAAS,CAACG,MAAUA,IAAQ,CAAC;AAAA,EAC/B,GAAG,CAACH,CAAQ,CAAC;AACf;AAwCA,SAASI,EAAcC,GAAQC,GAAa;AAC1C,QAAMC,IAAUC,EAAuB,oBAAI,KAAK,GAC1CC,IAAcV,EAAc;AAClC,SAAAH,EAA0B,MAAM;AAC9B,QAAI,CAACS,GAAQ;AACX,MAAAE,EAAQ,QAAQ,MAAK;AACrB;AAAA,IACF;AACA,WAAOG,EAAO,MAAM;AAClB,UAAIC;AACJ,UAAIC,IAAQ,IACRC,IAAO;AACX,iBAAWC,KAASP,EAAQ,SAAS;AACnC,cAAM,CAACQ,CAAG,IAAID,GACRX,IAAQa,EAAU,MAAMF,EAAM,CAAC,CAAC,GAChCG,IAAcZ,EAAOU,CAAG;AAC9B,QAAIZ,MAAUc,MACZL,IAAQ,IACRL,EAAQ,QAAQ,IAAIQ,GAAKE,CAAW,GACpCJ,KAAQF,IAAKL,KAAe,OAAO,SAASA,EAAYS,GAAKZ,GAAOc,CAAW,MAAM,OAAON,IAAK;AAAA,MAErG;AACA,MAAIC,MACFC,IAAOK,EAAUT,CAAW,IAAIA,EAAW;AAAA,IAE/C,CAAC;AAAA,EACH,GAAG,CAACJ,CAAM,CAAC,GACJc;AAAA,IACL,MAAMd,KAAS,IAAI,MAAMA,GAAQ;AAAA,MAC/B,IAAIe,GAASL,GAAK;AAChB,cAAMZ,IAAQiB,EAAQL,CAAG;AACzB,eAAAR,EAAQ,QAAQ,IAAIQ,GAAKZ,CAAK,GACvBA;AAAA,MACT;AAAA,IACN,CAAK;AAAA,IACD,CAACE,CAAM;AAAA,EACX;AACA;AAGA,SAASgB,EAAmBC,GAAUC,GAAG;AACvC,EAAAD,EAAQ;AACV;AAQA,SAASE,EAAiBrB,GAAOsB,GAAUC,IAAU5B,GAAW6B,IAAU,OAAO,IAAI;AACnF,QAAMpB,IAAUC,EAAOL,CAAK;AAC5B,EAAAuB,EAAQ,MAAM;AACZ,UAAME,IAAWrB,EAAQ;AACzB,IAAKoB,EAAQxB,GAAOyB,CAAQ,MAC1BrB,EAAQ,UAAUJ,GAClBsB,EAAStB,GAAOyB,CAAQ;AAAA,EAE5B,GAAG,CAACH,GAAUtB,CAAK,CAAC;AACtB;AACA,SAAS0B,EAAmB1B,GAAOsB,GAAU;AAC3C,QAAMK,IAAWtB,EAAOuB,EAAa5B,CAAK,CAAC;AAC3C,EAAAP,EAA0B,MAAM;AAC9B,UAAMoC,IAAUD,EAAa5B,CAAK;AAClC,IAAI6B,MAAYF,EAAS,YACvBA,EAAS,UAAUE,GACnBP,EAASO,CAAO;AAAA,EAEpB,CAAC;AACH;","x_google_ignoreList":[0]}
|
|
@@ -1,40 +1,66 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
const
|
|
1
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import { Slot as v } from "@radix-ui/react-slot";
|
|
3
|
+
import { forwardRef as N, useState as S, useRef as c } from "react";
|
|
4
|
+
import g from "./fondue-components63.js";
|
|
5
|
+
const A = N(
|
|
6
6
|
({
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
7
|
+
onChange: o,
|
|
8
|
+
asChild: m,
|
|
9
|
+
hugWidth: x = !0,
|
|
10
|
+
"aria-label": b,
|
|
11
|
+
children: p,
|
|
12
|
+
"data-test-id": w = "fondue-editable-text"
|
|
13
|
+
}, E) => {
|
|
14
|
+
const R = m ? v : "span", [n, u] = S(!1), s = c(!1), l = c(null), i = c(""), T = () => {
|
|
15
|
+
s.current = !0;
|
|
16
|
+
}, h = (t) => {
|
|
17
|
+
var d;
|
|
18
|
+
i.current = t.currentTarget.textContent ?? "", u(!0), (d = l.current) == null || d.setAttribute("data-show-focus-ring", String(!s.current));
|
|
19
|
+
const a = t.currentTarget, e = document.createRange();
|
|
20
|
+
e.selectNodeContents(a), e.collapse(!1);
|
|
21
|
+
const r = window.getSelection();
|
|
22
|
+
r == null || r.removeAllRanges(), r == null || r.addRange(e);
|
|
23
|
+
}, y = (t) => {
|
|
24
|
+
t.key === "Enter" && (t.preventDefault(), t.currentTarget.blur());
|
|
25
|
+
}, D = (t) => {
|
|
26
|
+
var e;
|
|
27
|
+
u(!1), (e = l.current) == null || e.setAttribute("data-show-focus-ring", "false"), s.current = !1, t.currentTarget.scrollLeft = 0;
|
|
28
|
+
const a = t.currentTarget.textContent ?? "";
|
|
29
|
+
a !== i.current && (o == null || o(a));
|
|
30
|
+
};
|
|
31
|
+
return /* @__PURE__ */ f(
|
|
32
|
+
"div",
|
|
33
|
+
{
|
|
34
|
+
ref: l,
|
|
35
|
+
className: g.root,
|
|
36
|
+
"data-editing": n,
|
|
37
|
+
"data-hug-width": x,
|
|
38
|
+
"data-show-focus-ring": "false",
|
|
39
|
+
"data-test-id": w,
|
|
40
|
+
children: /* @__PURE__ */ f(
|
|
41
|
+
R,
|
|
42
|
+
{
|
|
43
|
+
ref: E,
|
|
44
|
+
className: g.text,
|
|
45
|
+
contentEditable: n ? "plaintext-only" : void 0,
|
|
46
|
+
suppressContentEditableWarning: !0,
|
|
47
|
+
tabIndex: 0,
|
|
48
|
+
role: n ? "textbox" : void 0,
|
|
49
|
+
"aria-label": n ? b : void 0,
|
|
50
|
+
"aria-live": "off",
|
|
51
|
+
onMouseDown: T,
|
|
52
|
+
onFocus: h,
|
|
53
|
+
onKeyDown: y,
|
|
54
|
+
onBlur: D,
|
|
55
|
+
children: p
|
|
56
|
+
}
|
|
57
|
+
)
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
}
|
|
35
61
|
);
|
|
36
|
-
|
|
62
|
+
A.displayName = "EditableText";
|
|
37
63
|
export {
|
|
38
|
-
|
|
64
|
+
A as EditableText
|
|
39
65
|
};
|
|
40
66
|
//# sourceMappingURL=fondue-components13.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components13.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"fondue-components13.js","sources":["../src/components/EditableText/EditableText.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { Slot } from '@radix-ui/react-slot';\nimport { type ReactNode, forwardRef, useRef, useState } from 'react';\n\nimport styles from './styles/editable-text.module.scss';\n\nexport type EditableTextProps = {\n /**\n * Callback fired with the plain text value when editing is confirmed (on blur or Enter).\n * Only fires if the value has actually changed.\n */\n onChange?: (value: string) => void;\n /**\n * When true, renders the child element instead of a default span,\n * merging all editable props onto it.\n */\n asChild?: boolean;\n /**\n * When true, the EditableText only takes the width of the content.\n * @default true\n */\n hugWidth?: boolean;\n /**\n * Accessible label for the editable text field.\n */\n 'aria-label'?: string;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport const EditableText = forwardRef<HTMLElement, EditableTextProps>(\n (\n {\n onChange,\n asChild,\n hugWidth = true,\n 'aria-label': ariaLabel,\n children,\n 'data-test-id': dataTestId = 'fondue-editable-text',\n },\n forwardedRef,\n ) => {\n const TextElement = asChild ? Slot : 'span';\n const [isEditing, setIsEditing] = useState(false);\n const wasClickedRef = useRef(false);\n const rootRef = useRef<HTMLDivElement>(null);\n const valueOnFocusRef = useRef('');\n\n const handleMouseDown = () => {\n wasClickedRef.current = true;\n };\n\n const handleFocus = (event: React.FocusEvent<HTMLElement>) => {\n valueOnFocusRef.current = event.currentTarget.textContent ?? '';\n setIsEditing(true);\n rootRef.current?.setAttribute('data-show-focus-ring', String(!wasClickedRef.current));\n const element = event.currentTarget;\n const range = document.createRange();\n range.selectNodeContents(element);\n range.collapse(false);\n const selection = window.getSelection();\n selection?.removeAllRanges();\n selection?.addRange(range);\n };\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLElement>) => {\n if (event.key === 'Enter') {\n event.preventDefault();\n event.currentTarget.blur();\n }\n };\n\n const handleBlur = (event: React.FocusEvent<HTMLElement>) => {\n setIsEditing(false);\n rootRef.current?.setAttribute('data-show-focus-ring', 'false');\n wasClickedRef.current = false;\n event.currentTarget.scrollLeft = 0;\n const currentValue = event.currentTarget.textContent ?? '';\n if (currentValue !== valueOnFocusRef.current) {\n onChange?.(currentValue);\n }\n };\n\n return (\n <div\n ref={rootRef}\n className={styles.root}\n data-editing={isEditing}\n data-hug-width={hugWidth}\n data-show-focus-ring=\"false\"\n data-test-id={dataTestId}\n >\n <TextElement\n ref={forwardedRef}\n className={styles.text}\n contentEditable={isEditing ? 'plaintext-only' : undefined}\n suppressContentEditableWarning\n tabIndex={0}\n role={isEditing ? 'textbox' : undefined}\n aria-label={isEditing ? ariaLabel : undefined}\n aria-live=\"off\"\n onMouseDown={handleMouseDown}\n onFocus={handleFocus}\n onKeyDown={handleKeyDown}\n onBlur={handleBlur}\n >\n {children}\n </TextElement>\n </div>\n );\n },\n);\n\nEditableText.displayName = 'EditableText';\n"],"names":["EditableText","forwardRef","onChange","asChild","hugWidth","ariaLabel","children","dataTestId","forwardedRef","TextElement","Slot","isEditing","setIsEditing","useState","wasClickedRef","useRef","rootRef","valueOnFocusRef","handleMouseDown","handleFocus","event","_a","element","range","selection","handleKeyDown","handleBlur","currentValue","jsx","styles"],"mappings":";;;;AA+BO,MAAMA,IAAeC;AAAA,EACxB,CACI;AAAA,IACI,UAAAC;AAAA,IACA,SAAAC;AAAA,IACA,UAAAC,IAAW;AAAA,IACX,cAAcC;AAAA,IACd,UAAAC;AAAA,IACA,gBAAgBC,IAAa;AAAA,EAAA,GAEjCC,MACC;AACD,UAAMC,IAAcN,IAAUO,IAAO,QAC/B,CAACC,GAAWC,CAAY,IAAIC,EAAS,EAAK,GAC1CC,IAAgBC,EAAO,EAAK,GAC5BC,IAAUD,EAAuB,IAAI,GACrCE,IAAkBF,EAAO,EAAE,GAE3BG,IAAkB,MAAM;AAC1B,MAAAJ,EAAc,UAAU;AAAA,IAC5B,GAEMK,IAAc,CAACC,MAAyC;;AAC1D,MAAAH,EAAgB,UAAUG,EAAM,cAAc,eAAe,IAC7DR,EAAa,EAAI,IACjBS,IAAAL,EAAQ,YAAR,QAAAK,EAAiB,aAAa,wBAAwB,OAAO,CAACP,EAAc,OAAO;AACnF,YAAMQ,IAAUF,EAAM,eAChBG,IAAQ,SAAS,YAAA;AACvB,MAAAA,EAAM,mBAAmBD,CAAO,GAChCC,EAAM,SAAS,EAAK;AACpB,YAAMC,IAAY,OAAO,aAAA;AACzB,MAAAA,KAAA,QAAAA,EAAW,mBACXA,KAAA,QAAAA,EAAW,SAASD;AAAA,IACxB,GAEME,IAAgB,CAACL,MAA4C;AAC/D,MAAIA,EAAM,QAAQ,YACdA,EAAM,eAAA,GACNA,EAAM,cAAc,KAAA;AAAA,IAE5B,GAEMM,IAAa,CAACN,MAAyC;;AACzD,MAAAR,EAAa,EAAK,IAClBS,IAAAL,EAAQ,YAAR,QAAAK,EAAiB,aAAa,wBAAwB,UACtDP,EAAc,UAAU,IACxBM,EAAM,cAAc,aAAa;AACjC,YAAMO,IAAeP,EAAM,cAAc,eAAe;AACxD,MAAIO,MAAiBV,EAAgB,YACjCf,KAAA,QAAAA,EAAWyB;AAAA,IAEnB;AAEA,WACI,gBAAAC;AAAA,MAAC;AAAA,MAAA;AAAA,QACG,KAAKZ;AAAA,QACL,WAAWa,EAAO;AAAA,QAClB,gBAAclB;AAAA,QACd,kBAAgBP;AAAA,QAChB,wBAAqB;AAAA,QACrB,gBAAcG;AAAA,QAEd,UAAA,gBAAAqB;AAAA,UAACnB;AAAA,UAAA;AAAA,YACG,KAAKD;AAAA,YACL,WAAWqB,EAAO;AAAA,YAClB,iBAAiBlB,IAAY,mBAAmB;AAAA,YAChD,gCAA8B;AAAA,YAC9B,UAAU;AAAA,YACV,MAAMA,IAAY,YAAY;AAAA,YAC9B,cAAYA,IAAYN,IAAY;AAAA,YACpC,aAAU;AAAA,YACV,aAAaa;AAAA,YACb,SAASC;AAAA,YACT,WAAWM;AAAA,YACX,QAAQC;AAAA,YAEP,UAAApB;AAAA,UAAA;AAAA,QAAA;AAAA,MACL;AAAA,IAAA;AAAA,EAGZ;AACJ;AAEAN,EAAa,cAAc;"}
|
|
@@ -1,19 +1,12 @@
|
|
|
1
|
-
function
|
|
2
|
-
return
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
} else {
|
|
9
|
-
const d = e.defaultWidth, u = t != null && t.width ? String(t.width) : e.defaultWidth;
|
|
10
|
-
l = e.values[u] || e.values[d];
|
|
11
|
-
}
|
|
12
|
-
const f = e.argumentCallback ? e.argumentCallback(a) : a;
|
|
13
|
-
return l[f];
|
|
14
|
-
};
|
|
1
|
+
function t(r) {
|
|
2
|
+
return r != null && typeof r == "object" && "current" in r;
|
|
3
|
+
}
|
|
4
|
+
function i(r) {
|
|
5
|
+
var n;
|
|
6
|
+
if (r != null)
|
|
7
|
+
return t(r) ? (n = r.current) != null ? n : void 0 : r;
|
|
15
8
|
}
|
|
16
9
|
export {
|
|
17
|
-
|
|
10
|
+
i as currentValue
|
|
18
11
|
};
|
|
19
12
|
//# sourceMappingURL=fondue-components130.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components130.js","sources":["../../../node_modules/.pnpm
|
|
1
|
+
{"version":3,"file":"fondue-components130.js","sources":["../../../node_modules/.pnpm/@dnd-kit+react@0.3.2_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@dnd-kit/react/utilities.js"],"sourcesContent":["// src/utilities/currentValue.ts\nfunction isRef(value) {\n return value != null && typeof value === \"object\" && \"current\" in value;\n}\nfunction currentValue(value) {\n var _a;\n if (value == null) {\n return void 0;\n }\n if (isRef(value)) {\n return (_a = value.current) != null ? _a : void 0;\n }\n return value;\n}\n\nexport { currentValue };\n//# sourceMappingURL=utilities.js.map\n//# sourceMappingURL=utilities.js.map"],"names":["isRef","value","currentValue","_a"],"mappings":"AACA,SAASA,EAAMC,GAAO;AACpB,SAAOA,KAAS,QAAQ,OAAOA,KAAU,YAAY,aAAaA;AACpE;AACA,SAASC,EAAaD,GAAO;AAC3B,MAAIE;AACJ,MAAIF,KAAS;AAGb,WAAID,EAAMC,CAAK,KACLE,IAAKF,EAAM,YAAY,OAAOE,IAAK,SAEtCF;AACT;","x_google_ignoreList":[0]}
|
|
@@ -1,32 +1,259 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
1
|
+
var m = Symbol.for("preact-signals");
|
|
2
|
+
function d() {
|
|
3
|
+
if (s > 1)
|
|
4
|
+
s--;
|
|
5
|
+
else {
|
|
6
|
+
for (var t, i = !1; u !== void 0; ) {
|
|
7
|
+
var o = u;
|
|
8
|
+
for (u = void 0, c++; o !== void 0; ) {
|
|
9
|
+
var n = o.o;
|
|
10
|
+
if (o.o = void 0, o.f &= -3, !(8 & o.f) && w(o)) try {
|
|
11
|
+
o.c();
|
|
12
|
+
} catch (h) {
|
|
13
|
+
i || (t = h, i = !0);
|
|
14
|
+
}
|
|
15
|
+
o = n;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
if (c = 0, s--, i) throw t;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
function E(t) {
|
|
22
|
+
if (s > 0) return t();
|
|
23
|
+
s++;
|
|
24
|
+
try {
|
|
25
|
+
return t();
|
|
26
|
+
} finally {
|
|
27
|
+
d();
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
var r = void 0;
|
|
31
|
+
function p(t) {
|
|
32
|
+
var i = r;
|
|
33
|
+
r = void 0;
|
|
34
|
+
try {
|
|
35
|
+
return t();
|
|
36
|
+
} finally {
|
|
37
|
+
r = i;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
var u = void 0, s = 0, c = 0, a = 0;
|
|
41
|
+
function y(t) {
|
|
42
|
+
if (r !== void 0) {
|
|
43
|
+
var i = t.n;
|
|
44
|
+
if (i === void 0 || i.t !== r)
|
|
45
|
+
return i = { i: 0, S: t, p: r.s, n: void 0, t: r, e: void 0, x: void 0, r: i }, r.s !== void 0 && (r.s.n = i), r.s = i, t.n = i, 32 & r.f && t.S(i), i;
|
|
46
|
+
if (i.i === -1)
|
|
47
|
+
return i.i = 0, i.n !== void 0 && (i.n.p = i.p, i.p !== void 0 && (i.p.n = i.n), i.p = r.s, i.n = void 0, r.s.n = i, r.s = i), i;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
function f(t, i) {
|
|
51
|
+
this.v = t, this.i = 0, this.n = void 0, this.t = void 0, this.W = i == null ? void 0 : i.watched, this.Z = i == null ? void 0 : i.unwatched, this.name = i == null ? void 0 : i.name;
|
|
52
|
+
}
|
|
53
|
+
f.prototype.brand = m;
|
|
54
|
+
f.prototype.h = function() {
|
|
55
|
+
return !0;
|
|
56
|
+
};
|
|
57
|
+
f.prototype.S = function(t) {
|
|
58
|
+
var i = this, o = this.t;
|
|
59
|
+
o !== t && t.e === void 0 && (t.x = o, this.t = t, o !== void 0 ? o.e = t : p(function() {
|
|
60
|
+
var n;
|
|
61
|
+
(n = i.W) == null || n.call(i);
|
|
62
|
+
}));
|
|
63
|
+
};
|
|
64
|
+
f.prototype.U = function(t) {
|
|
65
|
+
var i = this;
|
|
66
|
+
if (this.t !== void 0) {
|
|
67
|
+
var o = t.e, n = t.x;
|
|
68
|
+
o !== void 0 && (o.x = n, t.e = void 0), n !== void 0 && (n.e = o, t.x = void 0), t === this.t && (this.t = n, n === void 0 && p(function() {
|
|
69
|
+
var h;
|
|
70
|
+
(h = i.Z) == null || h.call(i);
|
|
71
|
+
}));
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
f.prototype.subscribe = function(t) {
|
|
75
|
+
var i = this;
|
|
76
|
+
return U(function() {
|
|
77
|
+
var o = i.value, n = r;
|
|
78
|
+
r = void 0;
|
|
79
|
+
try {
|
|
80
|
+
t(o);
|
|
81
|
+
} finally {
|
|
82
|
+
r = n;
|
|
83
|
+
}
|
|
84
|
+
}, { name: "sub" });
|
|
85
|
+
};
|
|
86
|
+
f.prototype.valueOf = function() {
|
|
87
|
+
return this.value;
|
|
88
|
+
};
|
|
89
|
+
f.prototype.toString = function() {
|
|
90
|
+
return this.value + "";
|
|
91
|
+
};
|
|
92
|
+
f.prototype.toJSON = function() {
|
|
93
|
+
return this.value;
|
|
94
|
+
};
|
|
95
|
+
f.prototype.peek = function() {
|
|
96
|
+
var t = r;
|
|
97
|
+
r = void 0;
|
|
98
|
+
try {
|
|
99
|
+
return this.value;
|
|
100
|
+
} finally {
|
|
101
|
+
r = t;
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
Object.defineProperty(f.prototype, "value", { get: function() {
|
|
105
|
+
var t = y(this);
|
|
106
|
+
return t !== void 0 && (t.i = this.i), this.v;
|
|
107
|
+
}, set: function(t) {
|
|
108
|
+
if (t !== this.v) {
|
|
109
|
+
if (c > 100) throw new Error("Cycle detected");
|
|
110
|
+
this.v = t, this.i++, a++, s++;
|
|
111
|
+
try {
|
|
112
|
+
for (var i = this.t; i !== void 0; i = i.x) i.t.N();
|
|
113
|
+
} finally {
|
|
114
|
+
d();
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
} });
|
|
118
|
+
function N(t, i) {
|
|
119
|
+
return new f(t, i);
|
|
120
|
+
}
|
|
121
|
+
function w(t) {
|
|
122
|
+
for (var i = t.s; i !== void 0; i = i.n) if (i.S.i !== i.i || !i.S.h() || i.S.i !== i.i) return !0;
|
|
123
|
+
return !1;
|
|
124
|
+
}
|
|
125
|
+
function S(t) {
|
|
126
|
+
for (var i = t.s; i !== void 0; i = i.n) {
|
|
127
|
+
var o = i.S.n;
|
|
128
|
+
if (o !== void 0 && (i.r = o), i.S.n = i, i.i = -1, i.n === void 0) {
|
|
129
|
+
t.s = i;
|
|
130
|
+
break;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
function x(t) {
|
|
135
|
+
for (var i = t.s, o = void 0; i !== void 0; ) {
|
|
136
|
+
var n = i.p;
|
|
137
|
+
i.i === -1 ? (i.S.U(i), n !== void 0 && (n.n = i.n), i.n !== void 0 && (i.n.p = n)) : o = i, i.S.n = i.r, i.r !== void 0 && (i.r = void 0), i = n;
|
|
138
|
+
}
|
|
139
|
+
t.s = o;
|
|
140
|
+
}
|
|
141
|
+
function e(t, i) {
|
|
142
|
+
f.call(this, void 0), this.x = t, this.s = void 0, this.g = a - 1, this.f = 4, this.W = i == null ? void 0 : i.watched, this.Z = i == null ? void 0 : i.unwatched, this.name = i == null ? void 0 : i.name;
|
|
143
|
+
}
|
|
144
|
+
e.prototype = new f();
|
|
145
|
+
e.prototype.h = function() {
|
|
146
|
+
if (this.f &= -3, 1 & this.f) return !1;
|
|
147
|
+
if ((36 & this.f) == 32 || (this.f &= -5, this.g === a)) return !0;
|
|
148
|
+
if (this.g = a, this.f |= 1, this.i > 0 && !w(this))
|
|
149
|
+
return this.f &= -2, !0;
|
|
150
|
+
var t = r;
|
|
151
|
+
try {
|
|
152
|
+
S(this), r = this;
|
|
153
|
+
var i = this.x();
|
|
154
|
+
(16 & this.f || this.v !== i || this.i === 0) && (this.v = i, this.f &= -17, this.i++);
|
|
155
|
+
} catch (o) {
|
|
156
|
+
this.v = o, this.f |= 16, this.i++;
|
|
157
|
+
}
|
|
158
|
+
return r = t, x(this), this.f &= -2, !0;
|
|
159
|
+
};
|
|
160
|
+
e.prototype.S = function(t) {
|
|
161
|
+
if (this.t === void 0) {
|
|
162
|
+
this.f |= 36;
|
|
163
|
+
for (var i = this.s; i !== void 0; i = i.n) i.S.S(i);
|
|
164
|
+
}
|
|
165
|
+
f.prototype.S.call(this, t);
|
|
166
|
+
};
|
|
167
|
+
e.prototype.U = function(t) {
|
|
168
|
+
if (this.t !== void 0 && (f.prototype.U.call(this, t), this.t === void 0)) {
|
|
169
|
+
this.f &= -33;
|
|
170
|
+
for (var i = this.s; i !== void 0; i = i.n) i.S.U(i);
|
|
171
|
+
}
|
|
172
|
+
};
|
|
173
|
+
e.prototype.N = function() {
|
|
174
|
+
if (!(2 & this.f)) {
|
|
175
|
+
this.f |= 6;
|
|
176
|
+
for (var t = this.t; t !== void 0; t = t.x) t.t.N();
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
Object.defineProperty(e.prototype, "value", { get: function() {
|
|
180
|
+
if (1 & this.f) throw new Error("Cycle detected");
|
|
181
|
+
var t = y(this);
|
|
182
|
+
if (this.h(), t !== void 0 && (t.i = this.i), 16 & this.f) throw this.v;
|
|
183
|
+
return this.v;
|
|
184
|
+
} });
|
|
185
|
+
function O(t, i) {
|
|
186
|
+
return new e(t, i);
|
|
187
|
+
}
|
|
188
|
+
function b(t) {
|
|
189
|
+
var i = t.u;
|
|
190
|
+
if (t.u = void 0, typeof i == "function") {
|
|
191
|
+
s++;
|
|
192
|
+
var o = r;
|
|
193
|
+
r = void 0;
|
|
194
|
+
try {
|
|
195
|
+
i();
|
|
196
|
+
} catch (n) {
|
|
197
|
+
throw t.f &= -2, t.f |= 8, l(t), n;
|
|
198
|
+
} finally {
|
|
199
|
+
r = o, d();
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
function l(t) {
|
|
204
|
+
for (var i = t.s; i !== void 0; i = i.n) i.S.U(i);
|
|
205
|
+
t.x = void 0, t.s = void 0, b(t);
|
|
206
|
+
}
|
|
207
|
+
function g(t) {
|
|
208
|
+
if (r !== this) throw new Error("Out-of-order effect");
|
|
209
|
+
x(this), r = t, this.f &= -2, 8 & this.f && l(this), d();
|
|
210
|
+
}
|
|
211
|
+
function v(t, i) {
|
|
212
|
+
this.x = t, this.u = void 0, this.s = void 0, this.o = void 0, this.f = 32, this.name = i == null ? void 0 : i.name;
|
|
213
|
+
}
|
|
214
|
+
v.prototype.c = function() {
|
|
215
|
+
var t = this.S();
|
|
216
|
+
try {
|
|
217
|
+
if (8 & this.f || this.x === void 0) return;
|
|
218
|
+
var i = this.x();
|
|
219
|
+
typeof i == "function" && (this.u = i);
|
|
220
|
+
} finally {
|
|
221
|
+
t();
|
|
222
|
+
}
|
|
223
|
+
};
|
|
224
|
+
v.prototype.S = function() {
|
|
225
|
+
if (1 & this.f) throw new Error("Cycle detected");
|
|
226
|
+
this.f |= 1, this.f &= -9, b(this), S(this), s++;
|
|
227
|
+
var t = r;
|
|
228
|
+
return r = this, g.bind(this, t);
|
|
229
|
+
};
|
|
230
|
+
v.prototype.N = function() {
|
|
231
|
+
2 & this.f || (this.f |= 2, this.o = u, u = this);
|
|
232
|
+
};
|
|
233
|
+
v.prototype.d = function() {
|
|
234
|
+
this.f |= 8, 1 & this.f || l(this);
|
|
235
|
+
};
|
|
236
|
+
v.prototype.dispose = function() {
|
|
237
|
+
this.d();
|
|
238
|
+
};
|
|
239
|
+
function U(t, i) {
|
|
240
|
+
var o = new v(t, i);
|
|
241
|
+
try {
|
|
242
|
+
o.c();
|
|
243
|
+
} catch (h) {
|
|
244
|
+
throw o.d(), h;
|
|
245
|
+
}
|
|
246
|
+
var n = o.d.bind(o);
|
|
247
|
+
return n[Symbol.dispose] = n, n;
|
|
28
248
|
}
|
|
29
249
|
export {
|
|
30
|
-
|
|
250
|
+
e as Computed,
|
|
251
|
+
v as Effect,
|
|
252
|
+
f as Signal,
|
|
253
|
+
E as batch,
|
|
254
|
+
O as computed,
|
|
255
|
+
U as effect,
|
|
256
|
+
N as signal,
|
|
257
|
+
p as untracked
|
|
31
258
|
};
|
|
32
259
|
//# sourceMappingURL=fondue-components131.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components131.js","sources":["../../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/_lib/buildMatchFn.mjs"],"sourcesContent":["export function buildMatchFn(args) {\n return (string, options = {}) => {\n const width = options.width;\n\n const matchPattern =\n (width && args.matchPatterns[width]) ||\n args.matchPatterns[args.defaultMatchWidth];\n const matchResult = string.match(matchPattern);\n\n if (!matchResult) {\n return null;\n }\n const matchedString = matchResult[0];\n\n const parsePatterns =\n (width && args.parsePatterns[width]) ||\n args.parsePatterns[args.defaultParseWidth];\n\n const key = Array.isArray(parsePatterns)\n ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString))\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type\n findKey(parsePatterns, (pattern) => pattern.test(matchedString));\n\n let value;\n\n value = args.valueCallback ? args.valueCallback(key) : key;\n value = options.valueCallback\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type\n options.valueCallback(value)\n : value;\n\n const rest = string.slice(matchedString.length);\n\n return { value, rest };\n };\n}\n\nfunction findKey(object, predicate) {\n for (const key in object) {\n if (\n Object.prototype.hasOwnProperty.call(object, key) &&\n predicate(object[key])\n ) {\n return key;\n }\n }\n return undefined;\n}\n\nfunction findIndex(array, predicate) {\n for (let key = 0; key < array.length; key++) {\n if (predicate(array[key])) {\n return key;\n }\n }\n return undefined;\n}\n"],"names":["buildMatchFn","args","string","options","width","matchPattern","matchResult","matchedString","parsePatterns","key","findIndex","pattern","findKey","value","rest","object","predicate","array"],"mappings":"AAAO,SAASA,EAAaC,GAAM;AACjC,SAAO,CAACC,GAAQC,IAAU,OAAO;AAC/B,UAAMC,IAAQD,EAAQ,OAEhBE,IACHD,KAASH,EAAK,cAAcG,CAAK,KAClCH,EAAK,cAAcA,EAAK,iBAAiB,GACrCK,IAAcJ,EAAO,MAAMG,CAAY;AAE7C,QAAI,CAACC;AACH,aAAO;AAET,UAAMC,IAAgBD,EAAY,CAAC,GAE7BE,IACHJ,KAASH,EAAK,cAAcG,CAAK,KAClCH,EAAK,cAAcA,EAAK,iBAAiB,GAErCQ,IAAM,MAAM,QAAQD,CAAa,IACnCE,EAAUF,GAAe,CAACG,MAAYA,EAAQ,KAAKJ,CAAa,CAAC;AAAA;AAAA,MAEjEK,EAAQJ,GAAe,CAACG,MAAYA,EAAQ,KAAKJ,CAAa,CAAC;AAAA;AAEnE,QAAIM;AAEJ,IAAAA,IAAQZ,EAAK,gBAAgBA,EAAK,cAAcQ,CAAG,IAAIA,GACvDI,IAAQV,EAAQ;AAAA;AAAA,MAEZA,EAAQ,cAAcU,CAAK;AAAA,QAC3BA;AAEJ,UAAMC,IAAOZ,EAAO,MAAMK,EAAc,MAAM;AAE9C,WAAO,EAAE,OAAAM,GAAO,MAAAC,EAAI;AAAA,EACtB;AACF;AAEA,SAASF,EAAQG,GAAQC,GAAW;AAClC,aAAWP,KAAOM;AAChB,QACE,OAAO,UAAU,eAAe,KAAKA,GAAQN,CAAG,KAChDO,EAAUD,EAAON,CAAG,CAAC;AAErB,aAAOA;AAIb;AAEA,SAASC,EAAUO,GAAOD,GAAW;AACnC,WAASP,IAAM,GAAGA,IAAMQ,EAAM,QAAQR;AACpC,QAAIO,EAAUC,EAAMR,CAAG,CAAC;AACtB,aAAOA;AAIb;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"fondue-components131.js","sources":["../../../node_modules/.pnpm/@preact+signals-core@1.13.0/node_modules/@preact/signals-core/dist/signals-core.module.js"],"sourcesContent":["var i=Symbol.for(\"preact-signals\");function t(){if(!(s>1)){var i,t=!1;while(void 0!==h){var n=h;h=void 0;v++;while(void 0!==n){var r=n.o;n.o=void 0;n.f&=-3;if(!(8&n.f)&&a(n))try{n.c()}catch(n){if(!t){i=n;t=!0}}n=r}}v=0;s--;if(t)throw i}else s--}function n(i){if(s>0)return i();s++;try{return i()}finally{t()}}var r=void 0;function o(i){var t=r;r=void 0;try{return i()}finally{r=t}}var f,h=void 0,s=0,v=0,u=0;function e(i){if(void 0!==r){var t=i.n;if(void 0===t||t.t!==r){t={i:0,S:i,p:r.s,n:void 0,t:r,e:void 0,x:void 0,r:t};if(void 0!==r.s)r.s.n=t;r.s=t;i.n=t;if(32&r.f)i.S(t);return t}else if(-1===t.i){t.i=0;if(void 0!==t.n){t.n.p=t.p;if(void 0!==t.p)t.p.n=t.n;t.p=r.s;t.n=void 0;r.s.n=t;r.s=t}return t}}}function d(i,t){this.v=i;this.i=0;this.n=void 0;this.t=void 0;this.W=null==t?void 0:t.watched;this.Z=null==t?void 0:t.unwatched;this.name=null==t?void 0:t.name}d.prototype.brand=i;d.prototype.h=function(){return!0};d.prototype.S=function(i){var t=this,n=this.t;if(n!==i&&void 0===i.e){i.x=n;this.t=i;if(void 0!==n)n.e=i;else o(function(){var i;null==(i=t.W)||i.call(t)})}};d.prototype.U=function(i){var t=this;if(void 0!==this.t){var n=i.e,r=i.x;if(void 0!==n){n.x=r;i.e=void 0}if(void 0!==r){r.e=n;i.x=void 0}if(i===this.t){this.t=r;if(void 0===r)o(function(){var i;null==(i=t.Z)||i.call(t)})}}};d.prototype.subscribe=function(i){var t=this;return m(function(){var n=t.value,o=r;r=void 0;try{i(n)}finally{r=o}},{name:\"sub\"})};d.prototype.valueOf=function(){return this.value};d.prototype.toString=function(){return this.value+\"\"};d.prototype.toJSON=function(){return this.value};d.prototype.peek=function(){var i=r;r=void 0;try{return this.value}finally{r=i}};Object.defineProperty(d.prototype,\"value\",{get:function(){var i=e(this);if(void 0!==i)i.i=this.i;return this.v},set:function(i){if(i!==this.v){if(v>100)throw new Error(\"Cycle detected\");this.v=i;this.i++;u++;s++;try{for(var n=this.t;void 0!==n;n=n.x)n.t.N()}finally{t()}}}});function c(i,t){return new d(i,t)}function a(i){for(var t=i.s;void 0!==t;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function l(i){for(var t=i.s;void 0!==t;t=t.n){var n=t.S.n;if(void 0!==n)t.r=n;t.S.n=t;t.i=-1;if(void 0===t.n){i.s=t;break}}}function y(i){var t=i.s,n=void 0;while(void 0!==t){var r=t.p;if(-1===t.i){t.S.U(t);if(void 0!==r)r.n=t.n;if(void 0!==t.n)t.n.p=r}else n=t;t.S.n=t.r;if(void 0!==t.r)t.r=void 0;t=r}i.s=n}function w(i,t){d.call(this,void 0);this.x=i;this.s=void 0;this.g=u-1;this.f=4;this.W=null==t?void 0:t.watched;this.Z=null==t?void 0:t.unwatched;this.name=null==t?void 0:t.name}w.prototype=new d;w.prototype.h=function(){this.f&=-3;if(1&this.f)return!1;if(32==(36&this.f))return!0;this.f&=-5;if(this.g===u)return!0;this.g=u;this.f|=1;if(this.i>0&&!a(this)){this.f&=-2;return!0}var i=r;try{l(this);r=this;var t=this.x();if(16&this.f||this.v!==t||0===this.i){this.v=t;this.f&=-17;this.i++}}catch(i){this.v=i;this.f|=16;this.i++}r=i;y(this);this.f&=-2;return!0};w.prototype.S=function(i){if(void 0===this.t){this.f|=36;for(var t=this.s;void 0!==t;t=t.n)t.S.S(t)}d.prototype.S.call(this,i)};w.prototype.U=function(i){if(void 0!==this.t){d.prototype.U.call(this,i);if(void 0===this.t){this.f&=-33;for(var t=this.s;void 0!==t;t=t.n)t.S.U(t)}}};w.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var i=this.t;void 0!==i;i=i.x)i.t.N()}};Object.defineProperty(w.prototype,\"value\",{get:function(){if(1&this.f)throw new Error(\"Cycle detected\");var i=e(this);this.h();if(void 0!==i)i.i=this.i;if(16&this.f)throw this.v;return this.v}});function b(i,t){return new w(i,t)}function _(i){var n=i.u;i.u=void 0;if(\"function\"==typeof n){s++;var o=r;r=void 0;try{n()}catch(t){i.f&=-2;i.f|=8;p(i);throw t}finally{r=o;t()}}}function p(i){for(var t=i.s;void 0!==t;t=t.n)t.S.U(t);i.x=void 0;i.s=void 0;_(i)}function g(i){if(r!==this)throw new Error(\"Out-of-order effect\");y(this);r=i;this.f&=-2;if(8&this.f)p(this);t()}function S(i,t){this.x=i;this.u=void 0;this.s=void 0;this.o=void 0;this.f=32;this.name=null==t?void 0:t.name;if(f)f.push(this)}S.prototype.c=function(){var i=this.S();try{if(8&this.f)return;if(void 0===this.x)return;var t=this.x();if(\"function\"==typeof t)this.u=t}finally{i()}};S.prototype.S=function(){if(1&this.f)throw new Error(\"Cycle detected\");this.f|=1;this.f&=-9;_(this);l(this);s++;var i=r;r=this;return g.bind(this,i)};S.prototype.N=function(){if(!(2&this.f)){this.f|=2;this.o=h;h=this}};S.prototype.d=function(){this.f|=8;if(!(1&this.f))p(this)};S.prototype.dispose=function(){this.d()};function m(i,t){var n=new S(i,t);try{n.c()}catch(i){n.d();throw i}var r=n.d.bind(n);r[Symbol.dispose]=r;return r}function E(i){return function(){var t=arguments,r=this;return n(function(){return o(function(){return i.apply(r,[].slice.call(t))})})}}function x(){var i=f;f=[];return function(){var t=f;if(f&&i)i=i.concat(f);f=i;return t}}function C(i){return function(){var t,n,r=x();try{n=i.apply(void 0,[].slice.call(arguments))}catch(i){f=void 0;throw i}finally{t=r()}for(var o in n)if(\"function\"==typeof n[o])n[o]=E(n[o]);n[Symbol.dispose]=E(function(){if(t)for(var i=0;i<t.length;i++)t[i].dispose();t=void 0});return n}}export{w as Computed,S as Effect,d as Signal,E as action,n as batch,b as computed,C as createModel,m as effect,c as signal,o as untracked};//# sourceMappingURL=signals-core.module.js.map\n"],"names":["i","t","h","n","v","r","a","o","u","e","d","m","c","l","y","w","b","_","p","S"],"mappings":"AAAA,IAAIA,IAAE,OAAO,IAAI,gBAAgB;AAAE,SAASC,IAAG;AAAC,MAAK,IAAE;AAA0L;AAAA,OAAvL;AAAY,aAAPD,GAAEC,IAAE,IAAkBC,MAAT,UAAW;AAAC,UAAIC,IAAED;AAAe,WAAbA,IAAE,QAAOE,KAAmBD,MAAT,UAAW;AAAC,YAAIE,IAAEF,EAAE;AAAqB,YAAnBA,EAAE,IAAE,QAAOA,EAAE,KAAG,IAAM,EAAE,IAAEA,EAAE,MAAIG,EAAEH,CAAC,EAAE,KAAG;AAAC,UAAAA,EAAE,EAAC;AAAA,QAAE,SAAOA,GAAE;AAAC,UAAIF,MAAGD,IAAEG,GAAEF,IAAE;AAAA,QAAG;AAAC,QAAAE,IAAEE;AAAA,MAAC;AAAA,IAAC;AAAS,QAARD,IAAE,GAAE,KAAOH,EAAE,OAAMD;AAAA,EAAC;AAAS;AAAC,SAASG,EAAEH,GAAE;AAAC,MAAG,IAAE,EAAE,QAAOA,EAAC;AAAG;AAAI,MAAG;AAAC,WAAOA,EAAC;AA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IAAE;AAAE,aAAE,MAAY,EAAE,KAAK,MAAKA,CAAC;AAAC;AAAEmB,EAAE,UAAU,IAAE,WAAU;AAAC,EAAK,IAAE,KAAK,MAAI,KAAK,KAAG,GAAE,KAAK,IAAEjB,GAAEA,IAAE;AAAK;AAAEiB,EAAE,UAAU,IAAE,WAAU;AAAC,OAAK,KAAG,GAAO,IAAE,KAAK,KAAGD,EAAE,IAAI;AAAC;AAAEC,EAAE,UAAU,UAAQ,WAAU;AAAC,OAAK,EAAC;AAAE;AAAE,SAASR,EAAEX,GAAEC,GAAE;AAAC,MAAIE,IAAE,IAAIgB,EAAEnB,GAAEC,CAAC;AAAE,MAAG;AAAC,IAAAE,EAAE,EAAC;AAAA,EAAE,SAAOH,GAAE;AAAC,UAAAG,EAAE,EAAC,GAASH;AAAA,EAAC;AAAC,MAAIK,IAAEF,EAAE,EAAE,KAAKA,CAAC;AAAE,SAAAE,EAAE,OAAO,OAAO,IAAEA,GAASA;AAAC;","x_google_ignoreList":[0]}
|
|
@@ -1,16 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
1
|
+
const n = (r) => {
|
|
2
|
+
if (r)
|
|
3
|
+
return {
|
|
4
|
+
year: r.getUTCFullYear(),
|
|
5
|
+
// Month is 0-indexed in JavaScript, so we add 1 to get the correct month
|
|
6
|
+
month: r.getUTCMonth() + 1,
|
|
7
|
+
day: r.getUTCDate()
|
|
8
|
+
};
|
|
9
|
+
}, f = (r) => {
|
|
10
|
+
if (r)
|
|
11
|
+
return new Date(Date.UTC(r.year, r.month - 1, r.day));
|
|
12
|
+
}, D = (r) => {
|
|
13
|
+
const o = n(r == null ? void 0 : r.from), t = n(r == null ? void 0 : r.to);
|
|
14
|
+
if (!(!o || !t))
|
|
15
|
+
return {
|
|
16
|
+
from: o,
|
|
17
|
+
to: t
|
|
18
|
+
};
|
|
19
|
+
}, m = (r) => {
|
|
20
|
+
if (r)
|
|
21
|
+
return {
|
|
22
|
+
from: f(r.from),
|
|
23
|
+
to: f(r.to)
|
|
24
|
+
};
|
|
25
|
+
};
|
|
13
26
|
export {
|
|
14
|
-
|
|
27
|
+
f as transformDatePickerDateToDate,
|
|
28
|
+
m as transformDateRangeToPickerDateRange,
|
|
29
|
+
n as transformDateToDatePickerDate,
|
|
30
|
+
D as transformPickerDateRangeToDateRange
|
|
15
31
|
};
|
|
16
32
|
//# sourceMappingURL=fondue-components132.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components132.js","sources":["
|
|
1
|
+
{"version":3,"file":"fondue-components132.js","sources":["../src/components/DatePicker/helpers/dateTransformer.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { type DateRange as InternalDayPickerDateRange } from 'react-day-picker';\n\nimport { type DatePickerDate, type DatePickerDateRange } from '../types';\n\nexport const transformDateToDatePickerDate = (date?: Date): DatePickerDate | undefined => {\n if (!date) {\n return undefined;\n }\n return {\n year: date.getUTCFullYear(),\n // Month is 0-indexed in JavaScript, so we add 1 to get the correct month\n month: date.getUTCMonth() + 1,\n day: date.getUTCDate(),\n };\n};\n\nexport const transformDatePickerDateToDate = (datePickerDate?: DatePickerDate): Date | undefined => {\n if (!datePickerDate) {\n return undefined;\n }\n // Month is 0-indexed in JavaScript, so we subtract 1 to get the correct month\n return new Date(Date.UTC(datePickerDate.year, datePickerDate.month - 1, datePickerDate.day));\n};\n\nexport const transformPickerDateRangeToDateRange = (dateRange?: InternalDayPickerDateRange): DatePickerDateRange => {\n const fromDate = transformDateToDatePickerDate(dateRange?.from);\n const toDate = transformDateToDatePickerDate(dateRange?.to);\n if (!fromDate || !toDate) {\n return undefined;\n }\n\n return {\n from: fromDate,\n to: toDate,\n };\n};\n\nexport const transformDateRangeToPickerDateRange = (\n dateRange?: DatePickerDateRange,\n): InternalDayPickerDateRange | undefined => {\n if (!dateRange) {\n return undefined;\n }\n\n return {\n from: transformDatePickerDateToDate(dateRange.from),\n to: transformDatePickerDateToDate(dateRange.to),\n };\n};\n"],"names":["transformDateToDatePickerDate","date","transformDatePickerDateToDate","datePickerDate","transformPickerDateRangeToDateRange","dateRange","fromDate","toDate","transformDateRangeToPickerDateRange"],"mappings":"AAMO,MAAMA,IAAgC,CAACC,MAA4C;AACtF,MAAKA;AAGL,WAAO;AAAA,MACH,MAAMA,EAAK,eAAA;AAAA;AAAA,MAEX,OAAOA,EAAK,YAAA,IAAgB;AAAA,MAC5B,KAAKA,EAAK,WAAA;AAAA,IAAW;AAE7B,GAEaC,IAAgC,CAACC,MAAsD;AAChG,MAAKA;AAIL,WAAO,IAAI,KAAK,KAAK,IAAIA,EAAe,MAAMA,EAAe,QAAQ,GAAGA,EAAe,GAAG,CAAC;AAC/F,GAEaC,IAAsC,CAACC,MAAgE;AAChH,QAAMC,IAAWN,EAA8BK,KAAA,gBAAAA,EAAW,IAAI,GACxDE,IAASP,EAA8BK,KAAA,gBAAAA,EAAW,EAAE;AAC1D,MAAI,GAACC,KAAY,CAACC;AAIlB,WAAO;AAAA,MACH,MAAMD;AAAA,MACN,IAAIC;AAAA,IAAA;AAEZ,GAEaC,IAAsC,CAC/CH,MACyC;AACzC,MAAKA;AAIL,WAAO;AAAA,MACH,MAAMH,EAA8BG,EAAU,IAAI;AAAA,MAClD,IAAIH,EAA8BG,EAAU,EAAE;AAAA,IAAA;AAEtD;"}
|