@tamagui/web 1.82.1 → 1.82.3
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/cjs/createComponent.js +2 -2
- package/dist/cjs/createComponent.js.map +1 -1
- package/dist/cjs/createComponent.native.js +2 -2
- package/dist/cjs/createComponent.native.js.map +1 -1
- package/dist/cjs/helpers/ThemeManager.js +12 -8
- package/dist/cjs/helpers/ThemeManager.js.map +1 -1
- package/dist/cjs/helpers/ThemeManager.native.js +12 -8
- package/dist/cjs/helpers/ThemeManager.native.js.map +1 -1
- package/dist/cjs/helpers/expandStyle.native.js +1 -1
- package/dist/cjs/helpers/getSplitStyles.js +1 -1
- package/dist/cjs/helpers/getSplitStyles.js.map +1 -1
- package/dist/cjs/helpers/getSplitStyles.native.js +2 -2
- package/dist/cjs/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/cjs/helpers/themeable.js +4 -1
- package/dist/cjs/helpers/themeable.js.map +1 -1
- package/dist/cjs/helpers/themeable.native.js +4 -1
- package/dist/cjs/helpers/themeable.native.js.map +1 -1
- package/dist/cjs/hooks/useTheme.js +1 -1
- package/dist/cjs/hooks/useTheme.js.map +1 -1
- package/dist/cjs/hooks/useTheme.native.js +1 -1
- package/dist/cjs/hooks/useTheme.native.js.map +1 -1
- package/dist/cjs/views/Theme.js +28 -27
- package/dist/cjs/views/Theme.js.map +2 -2
- package/dist/cjs/views/Theme.native.js +28 -27
- package/dist/cjs/views/Theme.native.js.map +2 -2
- package/dist/cjs/views/ThemeDebug.js +3 -5
- package/dist/cjs/views/ThemeDebug.js.map +1 -1
- package/dist/esm/createComponent.js +3 -3
- package/dist/esm/createComponent.js.map +1 -1
- package/dist/esm/createComponent.native.js +3 -3
- package/dist/esm/createComponent.native.js.map +1 -1
- package/dist/esm/helpers/ThemeManager.js +12 -8
- package/dist/esm/helpers/ThemeManager.js.map +1 -1
- package/dist/esm/helpers/ThemeManager.native.js +12 -8
- package/dist/esm/helpers/ThemeManager.native.js.map +1 -1
- package/dist/esm/helpers/expandStyle.native.js +1 -1
- package/dist/esm/helpers/getSplitStyles.js +1 -1
- package/dist/esm/helpers/getSplitStyles.js.map +1 -1
- package/dist/esm/helpers/getSplitStyles.native.js +2 -2
- package/dist/esm/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/esm/helpers/themeable.js +4 -1
- package/dist/esm/helpers/themeable.js.map +1 -1
- package/dist/esm/helpers/themeable.native.js +4 -1
- package/dist/esm/helpers/themeable.native.js.map +1 -1
- package/dist/esm/hooks/useTheme.js +1 -1
- package/dist/esm/hooks/useTheme.js.map +1 -1
- package/dist/esm/hooks/useTheme.native.js +1 -1
- package/dist/esm/hooks/useTheme.native.js.map +1 -1
- package/dist/esm/views/Theme.js +28 -34
- package/dist/esm/views/Theme.js.map +2 -2
- package/dist/esm/views/Theme.native.js +28 -34
- package/dist/esm/views/Theme.native.js.map +2 -2
- package/dist/esm/views/ThemeDebug.js +3 -4
- package/dist/esm/views/ThemeDebug.js.map +1 -1
- package/package.json +10 -10
- package/src/createComponent.tsx +3 -3
- package/src/helpers/ThemeManager.tsx +12 -8
- package/src/helpers/getSplitStyles.tsx +1 -1
- package/src/helpers/themeable.tsx +4 -2
- package/src/hooks/useTheme.tsx +1 -1
- package/src/views/Theme.tsx +44 -52
- package/src/views/ThemeDebug.tsx +7 -5
- package/types/helpers/ThemeManager.d.ts +1 -1
- package/types/helpers/ThemeManager.d.ts.map +1 -1
- package/types/helpers/themeable.d.ts.map +1 -1
- package/types/views/Theme.d.ts +1 -1
- package/types/views/Theme.d.ts.map +1 -1
- package/types/views/ThemeDebug.d.ts.map +1 -1
- package/dist/cjs/helpers/createChainedWeakCache.js +0 -53
- package/dist/cjs/helpers/createChainedWeakCache.js.map +0 -6
- package/dist/cjs/helpers/createChainedWeakCache.native.js +0 -54
- package/dist/cjs/helpers/createChainedWeakCache.native.js.map +0 -6
- package/dist/cjs/helpers/createProxy.js +0 -34
- package/dist/cjs/helpers/createProxy.js.map +0 -6
- package/dist/cjs/helpers/createProxy.native.js +0 -35
- package/dist/cjs/helpers/createProxy.native.js.map +0 -6
- package/dist/cjs/helpers/withStaticProperties.js +0 -40
- package/dist/cjs/helpers/withStaticProperties.js.map +0 -6
- package/dist/cjs/helpers/withStaticProperties.native.js +0 -41
- package/dist/cjs/helpers/withStaticProperties.native.js.map +0 -6
- package/dist/cjs/hooks/getThemeUnwrapped.js +0 -27
- package/dist/cjs/hooks/getThemeUnwrapped.js.map +0 -6
- package/dist/cjs/hooks/getThemeUnwrapped.native.js +0 -28
- package/dist/cjs/hooks/getThemeUnwrapped.native.js.map +0 -6
- package/dist/cjs/hooks/useId.js +0 -25
- package/dist/cjs/hooks/useId.js.map +0 -6
- package/dist/cjs/hooks/useId.native.js +0 -26
- package/dist/cjs/hooks/useId.native.js.map +0 -6
- package/dist/cjs/hooks/useMemoDebug.js +0 -30
- package/dist/cjs/hooks/useMemoDebug.js.map +0 -6
- package/dist/cjs/hooks/useMemoDebug.native.js +0 -31
- package/dist/cjs/hooks/useMemoDebug.native.js.map +0 -6
- package/dist/esm/helpers/createChainedWeakCache.js +0 -33
- package/dist/esm/helpers/createChainedWeakCache.js.map +0 -6
- package/dist/esm/helpers/createChainedWeakCache.native.js +0 -33
- package/dist/esm/helpers/createChainedWeakCache.native.js.map +0 -6
- package/dist/esm/helpers/createProxy.js +0 -14
- package/dist/esm/helpers/createProxy.js.map +0 -6
- package/dist/esm/helpers/createProxy.native.js +0 -14
- package/dist/esm/helpers/createProxy.native.js.map +0 -6
- package/dist/esm/helpers/withStaticProperties.js +0 -20
- package/dist/esm/helpers/withStaticProperties.js.map +0 -6
- package/dist/esm/helpers/withStaticProperties.native.js +0 -20
- package/dist/esm/helpers/withStaticProperties.native.js.map +0 -6
- package/dist/esm/hooks/getThemeUnwrapped.js +0 -6
- package/dist/esm/hooks/getThemeUnwrapped.js.map +0 -6
- package/dist/esm/hooks/getThemeUnwrapped.native.js +0 -6
- package/dist/esm/hooks/getThemeUnwrapped.native.js.map +0 -6
- package/dist/esm/hooks/useId.js +0 -5
- package/dist/esm/hooks/useId.js.map +0 -6
- package/dist/esm/hooks/useId.native.js +0 -5
- package/dist/esm/hooks/useId.native.js.map +0 -6
- package/dist/esm/hooks/useMemoDebug.js +0 -10
- package/dist/esm/hooks/useMemoDebug.js.map +0 -6
- package/dist/esm/hooks/useMemoDebug.native.js +0 -10
- package/dist/esm/hooks/useMemoDebug.native.js.map +0 -6
- package/types/helpers/createChainedWeakCache.d.ts +0 -5
- package/types/helpers/createChainedWeakCache.d.ts.map +0 -1
- package/types/helpers/createProxy.d.ts +0 -2
- package/types/helpers/createProxy.d.ts.map +0 -1
- package/types/helpers/withStaticProperties.d.ts +0 -4
- package/types/helpers/withStaticProperties.d.ts.map +0 -1
- package/types/hooks/getThemeUnwrapped.d.ts +0 -3
- package/types/hooks/getThemeUnwrapped.d.ts.map +0 -1
- package/types/hooks/useId.d.ts +0 -2
- package/types/hooks/useId.d.ts.map +0 -1
- package/types/hooks/useMemoDebug.d.ts +0 -3
- package/types/hooks/useMemoDebug.d.ts.map +0 -1
package/src/views/Theme.tsx
CHANGED
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
import { isWeb } from '@tamagui/constants'
|
|
2
|
-
import React, {
|
|
3
|
-
Children,
|
|
4
|
-
cloneElement,
|
|
5
|
-
forwardRef,
|
|
6
|
-
isValidElement,
|
|
7
|
-
useMemo,
|
|
8
|
-
useRef,
|
|
9
|
-
} from 'react'
|
|
2
|
+
import React, { Children, cloneElement, forwardRef, isValidElement, useRef } from 'react'
|
|
10
3
|
|
|
11
4
|
import { variableToString } from '../createVariable'
|
|
12
5
|
import { ThemeManagerContext } from '../helpers/ThemeManagerContext'
|
|
@@ -14,66 +7,65 @@ import { ChangedThemeResponse, useChangeThemeEffect } from '../hooks/useTheme'
|
|
|
14
7
|
import type { ThemeProps } from '../types'
|
|
15
8
|
import { ThemeDebug } from './ThemeDebug'
|
|
16
9
|
|
|
17
|
-
export const Theme = forwardRef(function Theme(props: ThemeProps, ref) {
|
|
10
|
+
export const Theme = forwardRef(function Theme({ children, ...props }: ThemeProps, ref) {
|
|
18
11
|
// @ts-expect-error only for internal views
|
|
19
12
|
if (props.disable) {
|
|
20
|
-
return
|
|
13
|
+
return children
|
|
21
14
|
}
|
|
22
15
|
|
|
23
16
|
const isRoot = !!props['_isRoot']
|
|
24
|
-
const disableDirectChildTheme = props['disable-child-theme']
|
|
25
17
|
const themeState = useChangeThemeEffect(props, isRoot)
|
|
18
|
+
const disableDirectChildTheme = props['disable-child-theme']
|
|
26
19
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
//ok
|
|
40
|
-
}
|
|
20
|
+
let finalChildren = disableDirectChildTheme
|
|
21
|
+
? Children.map(children, (child) =>
|
|
22
|
+
cloneElement(child, { ['data-disable-theme']: true })
|
|
23
|
+
)
|
|
24
|
+
: children
|
|
25
|
+
|
|
26
|
+
if (ref) {
|
|
27
|
+
try {
|
|
28
|
+
React.Children.only(finalChildren)
|
|
29
|
+
finalChildren = cloneElement(finalChildren, { ref })
|
|
30
|
+
} catch {
|
|
31
|
+
//ok
|
|
41
32
|
}
|
|
33
|
+
}
|
|
42
34
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
35
|
+
if (process.env.NODE_ENV === 'development') {
|
|
36
|
+
if (props.debug === 'visualize') {
|
|
37
|
+
finalChildren = (
|
|
38
|
+
<ThemeDebug themeState={themeState} themeProps={props}>
|
|
39
|
+
{finalChildren}
|
|
40
|
+
</ThemeDebug>
|
|
41
|
+
)
|
|
51
42
|
}
|
|
43
|
+
}
|
|
52
44
|
|
|
53
|
-
|
|
54
|
-
}, [props.children, disableDirectChildTheme])
|
|
55
|
-
|
|
56
|
-
return useThemedChildren(themeState, children, props, isRoot)
|
|
45
|
+
return getThemedChildren(themeState, finalChildren, props, isRoot)
|
|
57
46
|
})
|
|
58
47
|
Theme['displayName'] = 'Theme'
|
|
59
48
|
Theme['avoidForwardRef'] = true
|
|
60
49
|
|
|
61
|
-
export function
|
|
50
|
+
export function getThemedChildren(
|
|
62
51
|
themeState: ChangedThemeResponse,
|
|
63
52
|
children: any,
|
|
64
53
|
props: ThemeProps,
|
|
65
|
-
isRoot = false
|
|
66
|
-
avoidWrap = false
|
|
54
|
+
isRoot = false
|
|
67
55
|
) {
|
|
68
56
|
const { themeManager, isNewTheme } = themeState
|
|
57
|
+
|
|
58
|
+
// its always there.. should fix type
|
|
59
|
+
if (!themeManager) throw `❌`
|
|
60
|
+
|
|
69
61
|
const { shallow, forceClassName } = props
|
|
70
62
|
const hasEverThemed = useRef(false)
|
|
71
|
-
if (isNewTheme) {
|
|
72
|
-
hasEverThemed.current = true
|
|
73
|
-
}
|
|
74
63
|
|
|
75
64
|
const shouldRenderChildrenWithTheme =
|
|
76
65
|
isNewTheme || props.inverse || hasEverThemed.current || forceClassName || isRoot
|
|
66
|
+
if (shouldRenderChildrenWithTheme) {
|
|
67
|
+
hasEverThemed.current = true
|
|
68
|
+
}
|
|
77
69
|
|
|
78
70
|
if (!shouldRenderChildrenWithTheme) {
|
|
79
71
|
return children
|
|
@@ -82,7 +74,7 @@ export function useThemedChildren(
|
|
|
82
74
|
let next = children
|
|
83
75
|
|
|
84
76
|
// each children of these children wont get the theme
|
|
85
|
-
if (shallow
|
|
77
|
+
if (shallow) {
|
|
86
78
|
next = Children.toArray(children).map((child) => {
|
|
87
79
|
return isValidElement(child)
|
|
88
80
|
? cloneElement(
|
|
@@ -96,19 +88,17 @@ export function useThemedChildren(
|
|
|
96
88
|
})
|
|
97
89
|
}
|
|
98
90
|
|
|
99
|
-
const elementsWithContext =
|
|
91
|
+
const elementsWithContext = (
|
|
100
92
|
<ThemeManagerContext.Provider value={themeManager}>
|
|
101
93
|
{next}
|
|
102
94
|
</ThemeManagerContext.Provider>
|
|
103
|
-
) : (
|
|
104
|
-
next
|
|
105
95
|
)
|
|
106
96
|
|
|
107
97
|
if (forceClassName === false) {
|
|
108
98
|
return elementsWithContext
|
|
109
99
|
}
|
|
110
100
|
|
|
111
|
-
if (isWeb
|
|
101
|
+
if (isWeb) {
|
|
112
102
|
return wrapThemeElements({
|
|
113
103
|
children: elementsWithContext,
|
|
114
104
|
themeState,
|
|
@@ -138,10 +128,6 @@ function wrapThemeElements({
|
|
|
138
128
|
const inverse = themeState.inversed
|
|
139
129
|
const requiresExtraWrapper = inverse != null || forceClassName
|
|
140
130
|
|
|
141
|
-
if (!themeState.isNewTheme && !requiresExtraWrapper) {
|
|
142
|
-
return <span className="_dsp_contents is_Theme">{children}</span>
|
|
143
|
-
}
|
|
144
|
-
|
|
145
131
|
const { className, style } = getThemeClassNameAndStyle(themeState, isRoot)
|
|
146
132
|
|
|
147
133
|
let themedChildren = (
|
|
@@ -168,7 +154,13 @@ function wrapThemeElements({
|
|
|
168
154
|
return themedChildren
|
|
169
155
|
}
|
|
170
156
|
|
|
157
|
+
const emptyObj = {}
|
|
158
|
+
|
|
171
159
|
function getThemeClassNameAndStyle(themeState: ChangedThemeResponse, isRoot = false) {
|
|
160
|
+
if (!themeState.isNewTheme) {
|
|
161
|
+
return { className: '', style: emptyObj }
|
|
162
|
+
}
|
|
163
|
+
|
|
172
164
|
// in order to provide currentColor, set color by default
|
|
173
165
|
const themeColor =
|
|
174
166
|
themeState.state?.theme && themeState.isNewTheme
|
package/src/views/ThemeDebug.tsx
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { isServer } from '@tamagui/constants'
|
|
2
|
+
import { useDidFinishSSR } from '@tamagui/use-did-finish-ssr'
|
|
1
3
|
import { useForceUpdate } from '@tamagui/use-force-update'
|
|
2
4
|
import { useEffect, useId, useState } from 'react'
|
|
3
5
|
import { createPortal } from 'react-dom'
|
|
@@ -16,12 +18,8 @@ export function ThemeDebug({
|
|
|
16
18
|
themeProps: ThemeProps
|
|
17
19
|
children: any
|
|
18
20
|
}) {
|
|
19
|
-
// disabled
|
|
20
|
-
if (themeProps['disable-child-theme']) {
|
|
21
|
-
return children
|
|
22
|
-
}
|
|
23
|
-
|
|
24
21
|
if (process.env.NODE_ENV === 'development') {
|
|
22
|
+
const isHydrated = useDidFinishSSR()
|
|
25
23
|
const [onChangeCount, setOnChangeCount] = useState(0)
|
|
26
24
|
const rerender = useForceUpdate()
|
|
27
25
|
const id = useId()
|
|
@@ -60,6 +58,10 @@ export function ThemeDebug({
|
|
|
60
58
|
return () => clearTimeout(tm as any)
|
|
61
59
|
}, [])
|
|
62
60
|
|
|
61
|
+
if (themeProps['disable-child-theme'] || !isHydrated) {
|
|
62
|
+
return children
|
|
63
|
+
}
|
|
64
|
+
|
|
63
65
|
return (
|
|
64
66
|
<>
|
|
65
67
|
{createPortal(
|
|
@@ -15,7 +15,7 @@ export type ThemeManagerState = {
|
|
|
15
15
|
className?: string;
|
|
16
16
|
scheme?: ColorScheme;
|
|
17
17
|
};
|
|
18
|
-
export declare function getHasThemeUpdatingProps(props: ThemeProps):
|
|
18
|
+
export declare function getHasThemeUpdatingProps(props: ThemeProps): boolean;
|
|
19
19
|
export declare class ThemeManager {
|
|
20
20
|
props: ThemeProps;
|
|
21
21
|
id: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeManager.d.ts","sourceRoot":"","sources":["../../src/helpers/ThemeManager.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAE/D,KAAK,aAAa,GAAG,CACnB,IAAI,EAAE,MAAM,GAAG,IAAI,EACnB,YAAY,EAAE,YAAY,EAC1B,MAAM,EAAE,OAAO,KACZ,IAAI,CAAA;AAET,MAAM,MAAM,mBAAmB,GAAG;IAChC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,aAAa,CAAC,EAAE,YAAY,GAAG,IAAI,CAAA;IACnC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,KAAK,CAAC,EAAE,GAAG,CAAA;IACX,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,CAAC,EAAE,WAAW,GAAG,IAAI,CAAA;IAC1B,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE,WAAW,CAAA;CACrB,CAAA;AAID,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"ThemeManager.d.ts","sourceRoot":"","sources":["../../src/helpers/ThemeManager.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAE/D,KAAK,aAAa,GAAG,CACnB,IAAI,EAAE,MAAM,GAAG,IAAI,EACnB,YAAY,EAAE,YAAY,EAC1B,MAAM,EAAE,OAAO,KACZ,IAAI,CAAA;AAET,MAAM,MAAM,mBAAmB,GAAG;IAChC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,aAAa,CAAC,EAAE,YAAY,GAAG,IAAI,CAAA;IACnC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,KAAK,CAAC,EAAE,GAAG,CAAA;IACX,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,CAAC,EAAE,WAAW,GAAG,IAAI,CAAA;IAC1B,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE,WAAW,CAAA;CACrB,CAAA;AAID,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,UAAU,WAEzD;AAID,qBAAa,YAAY;IAOd,KAAK,EAAE,UAAU;IAN1B,EAAE,SAAQ;IACV,cAAc,qBAA2B;IACzC,aAAa,EAAE,YAAY,GAAG,IAAI,CAAO;IACzC,KAAK,EAAE,iBAAiB,CAAa;gBAG5B,KAAK,GAAE,UAAe,EAC7B,aAAa,CAAC,EAAE,YAAY,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS;IA0B1D,oBAAoB,CAClB,KAAK,GAAE,UAAU,GAAG;QAAE,UAAU,CAAC,EAAE,WAAW,CAAA;KAAqB,EACnE,YAAY,UAAO;IAkBrB,WAAW,CAAC,SAAS,EAAE,iBAAiB,EAAE,YAAY,UAAO;IAoB7D,iBAAiB,CACf,KAAK,aAAa,EAClB,KAAK,GAAE,iBAAiB,GAAG,IAAiB,EAC5C,aAAa,sBAAqB;IAapC,oBAAoB,CAClB,SAAS,EAAE,iBAAiB,GAAG,IAAI,EACnC,KAAK,GAAE,iBAAiB,GAAG,IAAiB;IAQ9C,QAAQ,CAAC,KAAK,aAAa,EAAE,aAAa,sBAAqB;IAO/D,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,IAAI,CAAO;IACnC,IAAI,OAAO,gBAMV;IAED,MAAM,CAAC,MAAM,UAAQ;IAIrB,aAAa,CAAC,EAAE,EAAE,aAAa,EAAE,OAAO,CAAC,EAAE,MAAM;CAalD;AAiLD,KAAK,iBAAiB,GAAG,YAAY,GAAG,SAAS,CAAA;AAKjD,wBAAgB,WAAW,CAAC,YAAY,CAAC,EAAE,YAAY,GAAG,IAAI,uDAY7D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"themeable.d.ts","sourceRoot":"","sources":["../../src/helpers/themeable.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAGvD,wBAAgB,SAAS,CAAC,aAAa,SAAS,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG,EACjE,SAAS,EAAE,aAAa,EACxB,YAAY,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,
|
|
1
|
+
{"version":3,"file":"themeable.d.ts","sourceRoot":"","sources":["../../src/helpers/themeable.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAGvD,wBAAgB,SAAS,CAAC,aAAa,SAAS,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG,EACjE,SAAS,EAAE,aAAa,EACxB,YAAY,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,kIAkCrC"}
|
package/types/views/Theme.d.ts
CHANGED
|
@@ -2,5 +2,5 @@ import React from 'react';
|
|
|
2
2
|
import { ChangedThemeResponse } from '../hooks/useTheme';
|
|
3
3
|
import type { ThemeProps } from '../types';
|
|
4
4
|
export declare const Theme: React.ForwardRefExoticComponent<ThemeProps & React.RefAttributes<unknown>>;
|
|
5
|
-
export declare function
|
|
5
|
+
export declare function getThemedChildren(themeState: ChangedThemeResponse, children: any, props: ThemeProps, isRoot?: boolean): any;
|
|
6
6
|
//# sourceMappingURL=Theme.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Theme.d.ts","sourceRoot":"","sources":["../../src/views/Theme.tsx"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"Theme.d.ts","sourceRoot":"","sources":["../../src/views/Theme.tsx"],"names":[],"mappings":"AACA,OAAO,KAAqE,MAAM,OAAO,CAAA;AAIzF,OAAO,EAAE,oBAAoB,EAAwB,MAAM,mBAAmB,CAAA;AAC9E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAG1C,eAAO,MAAM,KAAK,4EAoChB,CAAA;AAIF,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,oBAAoB,EAChC,QAAQ,EAAE,GAAG,EACb,KAAK,EAAE,UAAU,EACjB,MAAM,UAAQ,OAyDf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeDebug.d.ts","sourceRoot":"","sources":["../../src/views/ThemeDebug.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ThemeDebug.d.ts","sourceRoot":"","sources":["../../src/views/ThemeDebug.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAIrC,wBAAgB,UAAU,CAAC,EACzB,UAAU,EACV,UAAU,EACV,QAAQ,GACT,EAAE;IACD,UAAU,EAAE,oBAAoB,CAAA;IAChC,UAAU,EAAE,UAAU,CAAA;IACtB,QAAQ,EAAE,GAAG,CAAA;CACd,OAoFA"}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
8
|
-
}, __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
10
|
-
for (let key of __getOwnPropNames(from))
|
|
11
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
|
-
var createChainedWeakCache_exports = {};
|
|
16
|
-
__export(createChainedWeakCache_exports, {
|
|
17
|
-
createChainedWeakCache: () => createChainedWeakCache
|
|
18
|
-
});
|
|
19
|
-
module.exports = __toCommonJS(createChainedWeakCache_exports);
|
|
20
|
-
const createChainedWeakCache = () => {
|
|
21
|
-
const baseMap = /* @__PURE__ */ new WeakMap();
|
|
22
|
-
return {
|
|
23
|
-
get: (args) => {
|
|
24
|
-
let cur = baseMap;
|
|
25
|
-
for (let arg of args)
|
|
26
|
-
if (cur.has(arg))
|
|
27
|
-
cur = cur.get(arg);
|
|
28
|
-
else
|
|
29
|
-
return;
|
|
30
|
-
return cur;
|
|
31
|
-
},
|
|
32
|
-
set(args, result) {
|
|
33
|
-
const len = args.length;
|
|
34
|
-
let cur = baseMap;
|
|
35
|
-
for (let i = 0; i < len; i++) {
|
|
36
|
-
const arg = args[i];
|
|
37
|
-
if (i === len - 1)
|
|
38
|
-
cur.set(arg, result);
|
|
39
|
-
else if (cur.has(arg))
|
|
40
|
-
cur = cur.get(arg);
|
|
41
|
-
else {
|
|
42
|
-
const next = /* @__PURE__ */ new WeakMap();
|
|
43
|
-
cur.set(arg, next), cur = next;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
50
|
-
0 && (module.exports = {
|
|
51
|
-
createChainedWeakCache
|
|
52
|
-
});
|
|
53
|
-
//# sourceMappingURL=createChainedWeakCache.js.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/helpers/createChainedWeakCache.tsx"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,yBAAyB,MAAM;AAC1C,QAAM,UAAU,oBAAI,QAAQ;AAE5B,SAAO;AAAA,IACL,KAAK,CAAC,SAAgB;AACpB,UAAI,MAAM;AACV,eAAS,OAAO;AACd,YAAI,IAAI,IAAI,GAAG;AACb,gBAAM,IAAI,IAAI,GAAG;AAAA;AAEjB;AAGJ,aAAO;AAAA,IACT;AAAA,IAEA,IAAI,MAAa,QAAa;AAC5B,YAAM,MAAM,KAAK;AACjB,UAAI,MAAM;AAEV,eAAS,IAAI,GAAG,IAAI,KAAK,KAAK;AAC5B,cAAM,MAAM,KAAK,CAAC;AAGlB,YAFe,MAAM,MAAM;AAGzB,cAAK,IAAI,KAAK,MAAM;AAAA,iBAEhB,IAAI,IAAI,GAAG;AACb,gBAAM,IAAI,IAAI,GAAG;AAAA,aACZ;AACL,gBAAM,OAAO,oBAAI,QAAQ;AACzB,cAAI,IAAI,KAAK,IAAI,GACjB,MAAM;AAAA,QACR;AAAA,MAEJ;AAAA,IACF;AAAA,EACF;AACF;",
|
|
5
|
-
"names": []
|
|
6
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
-
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
-
return to;
|
|
14
|
-
};
|
|
15
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
16
|
-
var createChainedWeakCache_exports = {};
|
|
17
|
-
__export(createChainedWeakCache_exports, {
|
|
18
|
-
createChainedWeakCache: () => createChainedWeakCache
|
|
19
|
-
});
|
|
20
|
-
module.exports = __toCommonJS(createChainedWeakCache_exports);
|
|
21
|
-
const createChainedWeakCache = () => {
|
|
22
|
-
const baseMap = /* @__PURE__ */ new WeakMap();
|
|
23
|
-
return {
|
|
24
|
-
get: (args) => {
|
|
25
|
-
let cur = baseMap;
|
|
26
|
-
for (let arg of args)
|
|
27
|
-
if (cur.has(arg))
|
|
28
|
-
cur = cur.get(arg);
|
|
29
|
-
else
|
|
30
|
-
return;
|
|
31
|
-
return cur;
|
|
32
|
-
},
|
|
33
|
-
set(args, result) {
|
|
34
|
-
const len = args.length;
|
|
35
|
-
let cur = baseMap;
|
|
36
|
-
for (let i = 0; i < len; i++) {
|
|
37
|
-
const arg = args[i];
|
|
38
|
-
if (i === len - 1)
|
|
39
|
-
cur.set(arg, result);
|
|
40
|
-
else if (cur.has(arg))
|
|
41
|
-
cur = cur.get(arg);
|
|
42
|
-
else {
|
|
43
|
-
const next = /* @__PURE__ */ new WeakMap();
|
|
44
|
-
cur.set(arg, next), cur = next;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
51
|
-
0 && (module.exports = {
|
|
52
|
-
createChainedWeakCache
|
|
53
|
-
});
|
|
54
|
-
//# sourceMappingURL=createChainedWeakCache.js.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/helpers/createChainedWeakCache.tsx"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,yBAAyB,MAAM;AAC1C,QAAM,UAAU,oBAAI,QAAQ;AAE5B,SAAO;AAAA,IACL,KAAK,CAAC,SAAgB;AACpB,UAAI,MAAM;AACV,eAAS,OAAO;AACd,YAAI,IAAI,IAAI,GAAG;AACb,gBAAM,IAAI,IAAI,GAAG;AAAA;AAEjB;AAGJ,aAAO;AAAA,IACT;AAAA,IAEA,IAAI,MAAa,QAAa;AAC5B,YAAM,MAAM,KAAK;AACjB,UAAI,MAAM;AAEV,eAAS,IAAI,GAAG,IAAI,KAAK,KAAK;AAC5B,cAAM,MAAM,KAAK,CAAC;AAGlB,YAFe,MAAM,MAAM;AAGzB,cAAK,IAAI,KAAK,MAAM;AAAA,iBAEhB,IAAI,IAAI,GAAG;AACb,gBAAM,IAAI,IAAI,GAAG;AAAA,aACZ;AACL,gBAAM,OAAO,oBAAI,QAAQ;AACzB,cAAI,IAAI,KAAK,IAAI,GACjB,MAAM;AAAA,QACR;AAAA,MAEJ;AAAA,IACF;AAAA,EACF;AACF;",
|
|
5
|
-
"names": []
|
|
6
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
8
|
-
}, __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
10
|
-
for (let key of __getOwnPropNames(from))
|
|
11
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
|
-
var createProxy_exports = {};
|
|
16
|
-
__export(createProxy_exports, {
|
|
17
|
-
createProxy: () => createProxy
|
|
18
|
-
});
|
|
19
|
-
module.exports = __toCommonJS(createProxy_exports);
|
|
20
|
-
function createProxy(target, handler) {
|
|
21
|
-
return process.env.NODE_ENV === "development" && (typeof target != "object" || !target) && console.warn(
|
|
22
|
-
"Invalid object given for proxy:",
|
|
23
|
-
target,
|
|
24
|
-
`
|
|
25
|
-
|
|
26
|
-
This can be due to a missing theme or configuration given to Tamagui.`,
|
|
27
|
-
new Error().stack
|
|
28
|
-
), new Proxy(target || {}, handler);
|
|
29
|
-
}
|
|
30
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
31
|
-
0 && (module.exports = {
|
|
32
|
-
createProxy
|
|
33
|
-
});
|
|
34
|
-
//# sourceMappingURL=createProxy.js.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/helpers/createProxy.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,SAAS,YAA8B,QAAW,SAA0B;AACjF,SAAI,QAAQ,IAAI,aAAa,kBACvB,OAAO,UAAW,YAAY,CAAC,WACjC,QAAQ;AAAA,IACN;AAAA,IACA;AAAA,IACA;AAAA;AAAA;AAAA,IAGA,IAAI,MAAM,EAAE;AAAA,EACd,GAGG,IAAI,MAAM,UAAU,CAAC,GAAG,OAAO;AACxC;",
|
|
5
|
-
"names": []
|
|
6
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
-
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
-
return to;
|
|
14
|
-
};
|
|
15
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
16
|
-
var createProxy_exports = {};
|
|
17
|
-
__export(createProxy_exports, {
|
|
18
|
-
createProxy: () => createProxy
|
|
19
|
-
});
|
|
20
|
-
module.exports = __toCommonJS(createProxy_exports);
|
|
21
|
-
function createProxy(target, handler) {
|
|
22
|
-
return process.env.NODE_ENV === "development" && (typeof target != "object" || !target) && console.warn(
|
|
23
|
-
"Invalid object given for proxy:",
|
|
24
|
-
target,
|
|
25
|
-
`
|
|
26
|
-
|
|
27
|
-
This can be due to a missing theme or configuration given to Tamagui.`,
|
|
28
|
-
new Error().stack
|
|
29
|
-
), new Proxy(target || {}, handler);
|
|
30
|
-
}
|
|
31
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
32
|
-
0 && (module.exports = {
|
|
33
|
-
createProxy
|
|
34
|
-
});
|
|
35
|
-
//# sourceMappingURL=createProxy.js.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/helpers/createProxy.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,SAAS,YAA8B,QAAW,SAA0B;AACjF,SAAI,QAAQ,IAAI,aAAa,kBACvB,OAAO,UAAW,YAAY,CAAC,WACjC,QAAQ;AAAA,IACN;AAAA,IACA;AAAA,IACA;AAAA;AAAA;AAAA,IAGA,IAAI,MAAM,EAAE;AAAA,EACd,GAGG,IAAI,MAAM,UAAU,CAAC,GAAG,OAAO;AACxC;",
|
|
5
|
-
"names": []
|
|
6
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
8
|
-
}, __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
10
|
-
for (let key of __getOwnPropNames(from))
|
|
11
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
|
-
var withStaticProperties_exports = {};
|
|
16
|
-
__export(withStaticProperties_exports, {
|
|
17
|
-
withStaticProperties: () => withStaticProperties
|
|
18
|
-
});
|
|
19
|
-
module.exports = __toCommonJS(withStaticProperties_exports);
|
|
20
|
-
var import_react = require("react");
|
|
21
|
-
const Decorated = Symbol(), withStaticProperties = function(component, staticProps) {
|
|
22
|
-
const next = (() => {
|
|
23
|
-
if (component[Decorated]) {
|
|
24
|
-
const _ = (0, import_react.forwardRef)(
|
|
25
|
-
(props, ref) => (0, import_react.createElement)(component, { ...props, ref })
|
|
26
|
-
);
|
|
27
|
-
for (const key in component) {
|
|
28
|
-
const v = component[key];
|
|
29
|
-
_[key] = v && typeof v == "object" ? { ...v } : v;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
return component;
|
|
33
|
-
})();
|
|
34
|
-
return Object.assign(next, staticProps), next[Decorated] = !0, next;
|
|
35
|
-
};
|
|
36
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
37
|
-
0 && (module.exports = {
|
|
38
|
-
withStaticProperties
|
|
39
|
-
});
|
|
40
|
-
//# sourceMappingURL=withStaticProperties.js.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/helpers/withStaticProperties.tsx"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA0C;AAE1C,MAAM,YAAY,OAAO,GAIZ,uBAAuB,SAClC,WACA,aACgB;AAEhB,QAAM,QAAQ,MAAM;AAClB,QAAI,UAAU,SAAS,GAAG;AACxB,YAAM,QAAI;AAAA,QAAW,CAAC,OAAO,YAC3B,4BAAc,WAAkB,EAAE,GAAG,OAAO,IAAI,CAAC;AAAA,MACnD;AAEA,iBAAW,OAAO,WAAW;AAC3B,cAAM,IAAI,UAAU,GAAG;AAEvB,UAAE,GAAG,IAAI,KAAK,OAAO,KAAM,WAAW,EAAE,GAAG,EAAE,IAAI;AAAA,MACnD;AAAA,IACF;AACA,WAAO;AAAA,EACT,GAAG;AAGH,gBAAO,OAAO,MAAM,WAAW,GAC/B,KAAK,SAAS,IAAI,IAEX;AACT;",
|
|
5
|
-
"names": []
|
|
6
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
-
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
-
return to;
|
|
14
|
-
};
|
|
15
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
16
|
-
var withStaticProperties_exports = {};
|
|
17
|
-
__export(withStaticProperties_exports, {
|
|
18
|
-
withStaticProperties: () => withStaticProperties
|
|
19
|
-
});
|
|
20
|
-
module.exports = __toCommonJS(withStaticProperties_exports);
|
|
21
|
-
var import_react = require("react");
|
|
22
|
-
const Decorated = Symbol(), withStaticProperties = function(component, staticProps) {
|
|
23
|
-
const next = (() => {
|
|
24
|
-
if (component[Decorated]) {
|
|
25
|
-
const _ = (0, import_react.forwardRef)(
|
|
26
|
-
(props, ref) => (0, import_react.createElement)(component, { ...props, ref })
|
|
27
|
-
);
|
|
28
|
-
for (const key in component) {
|
|
29
|
-
const v = component[key];
|
|
30
|
-
_[key] = v && typeof v == "object" ? { ...v } : v;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
return component;
|
|
34
|
-
})();
|
|
35
|
-
return Object.assign(next, staticProps), next[Decorated] = !0, next;
|
|
36
|
-
};
|
|
37
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
38
|
-
0 && (module.exports = {
|
|
39
|
-
withStaticProperties
|
|
40
|
-
});
|
|
41
|
-
//# sourceMappingURL=withStaticProperties.js.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/helpers/withStaticProperties.tsx"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA0C;AAE1C,MAAM,YAAY,OAAO,GAIZ,uBAAuB,SAClC,WACA,aACgB;AAEhB,QAAM,QAAQ,MAAM;AAClB,QAAI,UAAU,SAAS,GAAG;AACxB,YAAM,QAAI;AAAA,QAAW,CAAC,OAAO,YAC3B,4BAAc,WAAkB,EAAE,GAAG,OAAO,IAAI,CAAC;AAAA,MACnD;AAEA,iBAAW,OAAO,WAAW;AAC3B,cAAM,IAAI,UAAU,GAAG;AAEvB,UAAE,GAAG,IAAI,KAAK,OAAO,KAAM,WAAW,EAAE,GAAG,EAAE,IAAI;AAAA,MACnD;AAAA,IACF;AACA,WAAO;AAAA,EACT,GAAG;AAGH,gBAAO,OAAO,MAAM,WAAW,GAC/B,KAAK,SAAS,IAAI,IAEX;AACT;",
|
|
5
|
-
"names": []
|
|
6
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
8
|
-
}, __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
10
|
-
for (let key of __getOwnPropNames(from))
|
|
11
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
|
-
var getThemeUnwrapped_exports = {};
|
|
16
|
-
__export(getThemeUnwrapped_exports, {
|
|
17
|
-
GetThemeUnwrapped: () => GetThemeUnwrapped,
|
|
18
|
-
getThemeUnwrapped: () => getThemeUnwrapped
|
|
19
|
-
});
|
|
20
|
-
module.exports = __toCommonJS(getThemeUnwrapped_exports);
|
|
21
|
-
const getThemeUnwrapped = (theme) => (theme == null ? void 0 : theme[GetThemeUnwrapped]) || theme, GetThemeUnwrapped = Symbol();
|
|
22
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
23
|
-
0 && (module.exports = {
|
|
24
|
-
GetThemeUnwrapped,
|
|
25
|
-
getThemeUnwrapped
|
|
26
|
-
});
|
|
27
|
-
//# sourceMappingURL=getThemeUnwrapped.js.map
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
-
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
-
return to;
|
|
14
|
-
};
|
|
15
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
16
|
-
var getThemeUnwrapped_exports = {};
|
|
17
|
-
__export(getThemeUnwrapped_exports, {
|
|
18
|
-
GetThemeUnwrapped: () => GetThemeUnwrapped,
|
|
19
|
-
getThemeUnwrapped: () => getThemeUnwrapped
|
|
20
|
-
});
|
|
21
|
-
module.exports = __toCommonJS(getThemeUnwrapped_exports);
|
|
22
|
-
const getThemeUnwrapped = (theme) => (theme == null ? void 0 : theme[GetThemeUnwrapped]) || theme, GetThemeUnwrapped = Symbol();
|
|
23
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
24
|
-
0 && (module.exports = {
|
|
25
|
-
GetThemeUnwrapped,
|
|
26
|
-
getThemeUnwrapped
|
|
27
|
-
});
|
|
28
|
-
//# sourceMappingURL=getThemeUnwrapped.js.map
|
package/dist/cjs/hooks/useId.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
8
|
-
}, __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
10
|
-
for (let key of __getOwnPropNames(from))
|
|
11
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
|
-
var useId_exports = {};
|
|
16
|
-
__export(useId_exports, {
|
|
17
|
-
useId: () => import_react.useId
|
|
18
|
-
});
|
|
19
|
-
module.exports = __toCommonJS(useId_exports);
|
|
20
|
-
var import_react = require("react");
|
|
21
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
22
|
-
0 && (module.exports = {
|
|
23
|
-
useId
|
|
24
|
-
});
|
|
25
|
-
//# sourceMappingURL=useId.js.map
|