@yamada-ui/react 2.3.0-next-20260513032749 → 2.3.0-next-20260513142633
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/core/index.cjs +2 -0
- package/dist/cjs/core/system/index.cjs +2 -0
- package/dist/cjs/core/system/styled.cjs +23 -12
- package/dist/cjs/core/system/styled.cjs.map +1 -1
- package/dist/cjs/index.cjs +4 -0
- package/dist/esm/core/index.js +2 -2
- package/dist/esm/core/system/index.js +2 -2
- package/dist/esm/core/system/styled.js +22 -13
- package/dist/esm/core/system/styled.js.map +1 -1
- package/dist/esm/index.js +4 -2
- package/dist/types/components/accordion/accordion.style.d.ts +1 -1
- package/dist/types/components/avatar/avatar.d.ts +3 -3
- package/dist/types/components/avatar/avatar.style.d.ts +1 -1
- package/dist/types/components/breadcrumb/breadcrumb.style.d.ts +1 -1
- package/dist/types/components/calendar/calendar.style.d.ts +2 -2
- package/dist/types/components/carousel/carousel.style.d.ts +2 -2
- package/dist/types/components/checkbox-card/checkbox-card.d.ts +3 -3
- package/dist/types/components/checkbox-card/checkbox-card.style.d.ts +1 -1
- package/dist/types/components/data-list/data-list.style.d.ts +1 -1
- package/dist/types/components/empty-state/empty-state.style.d.ts +2 -2
- package/dist/types/components/field/field.style.d.ts +2 -2
- package/dist/types/components/fieldset/fieldset.style.d.ts +1 -1
- package/dist/types/components/flip/flip.d.ts +1 -1
- package/dist/types/components/flip/flip.style.d.ts +1 -1
- package/dist/types/components/list/list.style.d.ts +2 -2
- package/dist/types/components/native-accordion/native-accordion.style.d.ts +2 -2
- package/dist/types/components/notice/notice.style.d.ts +1 -1
- package/dist/types/components/pagination/pagination.style.d.ts +1 -1
- package/dist/types/components/radio-card/radio-card.d.ts +3 -3
- package/dist/types/components/radio-card/radio-card.style.d.ts +1 -1
- package/dist/types/components/rating/rating.style.d.ts +2 -2
- package/dist/types/components/reorder/reorder.style.d.ts +1 -1
- package/dist/types/components/resizable/resizable.style.d.ts +2 -2
- package/dist/types/components/segmented-control/segmented-control.style.d.ts +2 -2
- package/dist/types/components/stat/stat.style.d.ts +2 -2
- package/dist/types/components/steps/steps.style.d.ts +1 -1
- package/dist/types/components/timeline/timeline.d.ts +1 -1
- package/dist/types/components/timeline/timeline.style.d.ts +1 -1
- package/dist/types/components/tree/tree.style.d.ts +1 -1
- package/dist/types/core/index.d.ts +2 -2
- package/dist/types/core/system/index.d.ts +2 -2
- package/dist/types/core/system/styled.d.ts +2 -1
- package/dist/types/index.d.ts +3 -3
- package/dist/types/providers/i18n-provider/i18n-provider.d.ts +1 -1
- package/package.json +1 -1
package/dist/cjs/core/index.cjs
CHANGED
|
@@ -43,6 +43,7 @@ exports.DEFAULT_LOCALE = require_constant.DEFAULT_LOCALE;
|
|
|
43
43
|
exports.DEFAULT_VAR_PREFIX = require_constant.DEFAULT_VAR_PREFIX;
|
|
44
44
|
exports.EnvironmentProvider = require_environment_provider.EnvironmentProvider;
|
|
45
45
|
exports.GlobalStyles = require_theme_provider.GlobalStyles;
|
|
46
|
+
exports.HydrationContext = require_styled.HydrationContext;
|
|
46
47
|
exports.SystemProvider = require_system_provider.SystemProvider;
|
|
47
48
|
exports.THEME_SCHEME_STORAGE_KEY = require_constant.THEME_SCHEME_STORAGE_KEY;
|
|
48
49
|
exports.ThemeProvider = require_theme_provider.ThemeProvider;
|
|
@@ -154,6 +155,7 @@ exports.useComponentSlotStyle = require_use_component_style.useComponentSlotStyl
|
|
|
154
155
|
exports.useComponentStyle = require_use_component_style.useComponentStyle;
|
|
155
156
|
exports.useEnvironment = require_environment_provider.useEnvironment;
|
|
156
157
|
exports.useExtractProps = require_props.useExtractProps;
|
|
158
|
+
exports.useHydrationContext = require_styled.useHydrationContext;
|
|
157
159
|
exports.useInjectVarsIntoCss = require_use_inject_vars.useInjectVarsIntoCss;
|
|
158
160
|
exports.useInjectVarsIntoProps = require_use_inject_vars.useInjectVarsIntoProps;
|
|
159
161
|
exports.useSplitProps = require_props.useSplitProps;
|
|
@@ -20,6 +20,7 @@ exports.ColorModeScript = require_storage_script.ColorModeScript;
|
|
|
20
20
|
exports.ColorSchemeContext = require_styled.ColorSchemeContext;
|
|
21
21
|
exports.EnvironmentProvider = require_environment_provider.EnvironmentProvider;
|
|
22
22
|
exports.GlobalStyles = require_theme_provider.GlobalStyles;
|
|
23
|
+
exports.HydrationContext = require_styled.HydrationContext;
|
|
23
24
|
exports.SystemProvider = require_system_provider.SystemProvider;
|
|
24
25
|
exports.ThemeProvider = require_theme_provider.ThemeProvider;
|
|
25
26
|
exports.ThemeSchemeScript = require_storage_script.ThemeSchemeScript;
|
|
@@ -55,6 +56,7 @@ exports.useColorMode = require_color_mode_provider.useColorMode;
|
|
|
55
56
|
exports.useColorModeValue = require_use_color_mode_value.useColorModeValue;
|
|
56
57
|
exports.useColorSchemeContext = require_styled.useColorSchemeContext;
|
|
57
58
|
exports.useEnvironment = require_environment_provider.useEnvironment;
|
|
59
|
+
exports.useHydrationContext = require_styled.useHydrationContext;
|
|
58
60
|
exports.useSystem = require_system_provider.useSystem;
|
|
59
61
|
exports.useSystemColorMode = require_use_system_color_mode.useSystemColorMode;
|
|
60
62
|
exports.useTheme = require_theme_provider.useTheme;
|
|
@@ -45,6 +45,10 @@ const [ColorSchemeContext, useColorSchemeContext] = require_context.createContex
|
|
|
45
45
|
name: "ColorSchemeContext",
|
|
46
46
|
strict: false
|
|
47
47
|
});
|
|
48
|
+
const [HydrationContext, useHydrationContext] = require_context.createContext({
|
|
49
|
+
name: "HydrationContext",
|
|
50
|
+
strict: false
|
|
51
|
+
});
|
|
48
52
|
function createStyled(el, { name, base, compounds, props, sizes, variants, defaultProps, transferProps, ...options } = {}) {
|
|
49
53
|
const displayName = options.displayName ?? require_utils.getDisplayName(name, "");
|
|
50
54
|
const shouldForwardProp = !options.shouldForwardProp ? require_props.createShouldForwardProp(options.forwardProps) : void 0;
|
|
@@ -71,6 +75,7 @@ function createStyled(el, { name, base, compounds, props, sizes, variants, defau
|
|
|
71
75
|
const forwardAsChild = options.forwardAsChild || options.forwardProps?.includes("asChild");
|
|
72
76
|
const [omittedProps, styleProps] = useSplitProps(props, shouldForwardProp);
|
|
73
77
|
const [, rest] = require_use_component_style.useComponentStyle(omittedProps, componentStyleOptions);
|
|
78
|
+
const suppressHydrationWarning = useHydrationContext();
|
|
74
79
|
const [cssArray, colorScheme, forwardProps] = (0, react.useMemo)(() => {
|
|
75
80
|
const { css, colorScheme, ...forwardProps } = rest;
|
|
76
81
|
return [
|
|
@@ -80,6 +85,7 @@ function createStyled(el, { name, base, compounds, props, sizes, variants, defau
|
|
|
80
85
|
];
|
|
81
86
|
}, [rest]);
|
|
82
87
|
styleProps.colorScheme ??= colorScheme;
|
|
88
|
+
forwardProps.suppressHydrationWarning ??= suppressHydrationWarning;
|
|
83
89
|
if (forwardProps.className) className = (0, _emotion_utils.getRegisteredStyles)(cache.registered, registered.current, forwardProps.className).trim();
|
|
84
90
|
const interpolations = (0, react.useMemo)(() => [...registered.current, ...(0, require_utils_index.utils_exports.filterEmpty)([...cssArray, styleProps].map(require_css.css(system, theme)))], [
|
|
85
91
|
cssArray,
|
|
@@ -96,19 +102,22 @@ function createStyled(el, { name, base, compounds, props, sizes, variants, defau
|
|
|
96
102
|
className,
|
|
97
103
|
children
|
|
98
104
|
};
|
|
99
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.
|
|
105
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ColorSchemeContext, {
|
|
100
106
|
value: styleProps.colorScheme,
|
|
101
|
-
children:
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
107
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(HydrationContext, {
|
|
108
|
+
value: mergedProps.suppressHydrationWarning,
|
|
109
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Insertion, {
|
|
110
|
+
cache,
|
|
111
|
+
htmlTag,
|
|
112
|
+
serialized
|
|
113
|
+
}), asChild && !forwardAsChild ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_slot.Slot, {
|
|
114
|
+
ref,
|
|
115
|
+
...mergedProps
|
|
116
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Component, {
|
|
117
|
+
ref,
|
|
118
|
+
...mergedProps
|
|
119
|
+
})]
|
|
120
|
+
})
|
|
112
121
|
});
|
|
113
122
|
});
|
|
114
123
|
StyledComponent.displayName = displayName || "StyledComponent";
|
|
@@ -116,7 +125,9 @@ function createStyled(el, { name, base, compounds, props, sizes, variants, defau
|
|
|
116
125
|
}
|
|
117
126
|
//#endregion
|
|
118
127
|
exports.ColorSchemeContext = ColorSchemeContext;
|
|
128
|
+
exports.HydrationContext = HydrationContext;
|
|
119
129
|
exports.createStyled = createStyled;
|
|
120
130
|
exports.useColorSchemeContext = useColorSchemeContext;
|
|
131
|
+
exports.useHydrationContext = useHydrationContext;
|
|
121
132
|
|
|
122
133
|
//# sourceMappingURL=styled.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.cjs","names":["createContext","getDisplayName","createShouldForwardProp","useSystem","useTheme","useComponentStyle","css","Slot"],"sources":["../../../../src/core/system/styled.tsx"],"sourcesContent":["\"use client\"\n\nimport type { EmotionCache, SerializedStyles } from \"@emotion/utils\"\nimport type { FC } from \"react\"\nimport type { Dict } from \"../../utils\"\nimport type {
|
|
1
|
+
{"version":3,"file":"styled.cjs","names":["createContext","getDisplayName","createShouldForwardProp","useSystem","useTheme","useComponentStyle","css","Slot"],"sources":["../../../../src/core/system/styled.tsx"],"sourcesContent":["\"use client\"\n\nimport type { EmotionCache, SerializedStyles } from \"@emotion/utils\"\nimport type { FC } from \"react\"\nimport type { Dict } from \"../../utils\"\nimport type {\n As,\n HTMLProps,\n ShouldForwardProp,\n StyledComponent,\n} from \"../components\"\nimport type { CSSModifierObject, CSSPropObject } from \"../css\"\nimport type {\n ColorScheme,\n ComponentStyle,\n System,\n UsageTheme,\n} from \"./index.types\"\nimport { withEmotionCache } from \"@emotion/react\"\nimport { serializeStyles } from \"@emotion/serialize\"\nimport { useInsertionEffectAlwaysWithSyncFallback } from \"@emotion/use-insertion-effect-with-fallbacks\"\nimport {\n getRegisteredStyles,\n insertStyles,\n registerStyles,\n} from \"@emotion/utils\"\nimport { useMemo, useRef } from \"react\"\nimport isEqual from \"react-fast-compare\"\nimport { Slot } from \"../../components/slot\"\nimport {\n createContext,\n createdDom,\n cx,\n filterEmpty,\n filterUndefined,\n isString,\n isUndefined,\n runIfFn,\n splitObject,\n toArray,\n toKebabCase,\n} from \"../../utils\"\nimport {\n createShouldForwardProp,\n getDisplayName,\n useComponentStyle,\n} from \"../components\"\nimport { css } from \"../css\"\nimport { useSystem } from \"./system-provider\"\nimport { useTheme } from \"./theme-provider\"\n\ninterface InsertionProps {\n cache: EmotionCache\n htmlTag: boolean\n serialized: SerializedStyles\n}\n\nconst Insertion: FC<InsertionProps> = ({ cache, htmlTag, serialized }) => {\n registerStyles(cache, serialized, htmlTag)\n\n const style = useInsertionEffectAlwaysWithSyncFallback(() =>\n insertStyles(cache, serialized, htmlTag),\n )\n\n if (!createdDom() && !isUndefined(style)) {\n let className = serialized.name\n let next = serialized.next\n\n while (next !== undefined) {\n className = cx(className, next.name) ?? \"\"\n next = next.next\n }\n\n return (\n <style\n data-emotion={cx(cache.key, className)}\n dangerouslySetInnerHTML={{ __html: style }}\n nonce={cache.sheet.nonce}\n />\n )\n } else {\n return null\n }\n}\n\nconst useSplitProps = <Y extends Dict, M extends Dict>(\n props: Dict,\n shouldForwardProp?: ShouldForwardProp,\n) => {\n const propsRef = useRef(props)\n\n if (!isEqual(propsRef.current, props)) propsRef.current = props\n\n const computedProps = propsRef.current\n\n return useMemo(\n () => splitObject<Y, M>(computedProps, shouldForwardProp),\n [computedProps, shouldForwardProp],\n )\n}\n\nexport const [ColorSchemeContext, useColorSchemeContext] =\n createContext<ColorScheme>({\n name: \"ColorSchemeContext\",\n strict: false,\n })\n\nexport const [HydrationContext, useHydrationContext] = createContext<boolean>({\n name: \"HydrationContext\",\n strict: false,\n})\n\nexport interface StyledOptions<\n Y extends CSSPropObject = CSSPropObject,\n M extends CSSModifierObject = CSSModifierObject,\n D extends CSSModifierObject = CSSModifierObject,\n H extends number | string | symbol = string,\n> extends Omit<ComponentStyle<Y, M, D>, \"className\"> {\n className?: ((system: System) => string) | string\n displayName?: string\n forwardAsChild?: boolean\n name?: string\n shouldForwardProp?: boolean | ShouldForwardProp\n target?: string\n forwardProps?: string[]\n transferProps?: H[]\n}\n\nexport function createStyled<\n Y extends As,\n M extends object = {},\n D extends CSSPropObject = CSSPropObject,\n H extends CSSModifierObject = CSSModifierObject,\n R extends CSSModifierObject = CSSModifierObject,\n>(\n el: Y,\n {\n name,\n base,\n compounds,\n props,\n sizes,\n variants,\n defaultProps,\n transferProps,\n ...options\n }: StyledOptions<D, H, R, keyof M> = {},\n) {\n const displayName = options.displayName ?? getDisplayName(name, \"\")\n const shouldForwardProp = !options.shouldForwardProp\n ? createShouldForwardProp(options.forwardProps)\n : undefined\n const style = filterUndefined({\n base,\n compounds,\n props,\n sizes,\n variants,\n defaultProps,\n })\n\n const StyledComponent = withEmotionCache<Dict>(function (\n { as: Component = el, asChild, children, ...props },\n cache,\n ref,\n ) {\n let className: string | undefined = \"\"\n\n const system = useSystem()\n const { theme } = useTheme<UsageTheme>()\n const componentStyleOptions = {\n name,\n className: system.utils.getClassName(\n runIfFn(options.className, system) ?? toKebabCase(name ?? \"\"),\n ),\n style,\n transferProps,\n }\n const registered = useRef<string[]>([])\n const htmlTag = isString(Component)\n const forwardAsChild =\n options.forwardAsChild || options.forwardProps?.includes(\"asChild\")\n const [omittedProps, styleProps] = useSplitProps(props, shouldForwardProp)\n const [, rest] = useComponentStyle<any, {}>(\n omittedProps,\n componentStyleOptions,\n )\n const suppressHydrationWarning = useHydrationContext()\n const [cssArray, colorScheme, forwardProps] = useMemo(() => {\n const { css, colorScheme, ...forwardProps } = rest\n\n return [toArray(css), colorScheme, forwardProps]\n }, [rest])\n\n styleProps.colorScheme ??= colorScheme\n forwardProps.suppressHydrationWarning ??= suppressHydrationWarning\n\n if (forwardProps.className)\n className = getRegisteredStyles(\n cache.registered,\n registered.current,\n forwardProps.className,\n ).trim()\n\n const interpolations = useMemo(\n () => [\n ...registered.current,\n ...filterEmpty([...cssArray, styleProps].map(css(system, theme))),\n ],\n [cssArray, system, styleProps, theme],\n )\n\n const serialized = useMemo(\n () => serializeStyles(interpolations, cache.registered),\n [interpolations, cache.registered],\n )\n\n className = cx(\n className,\n serialized.styles ? `${cache.key}-${serialized.name}` : undefined,\n )\n className = cx(className, options.target)\n\n if (!className) className = undefined\n\n const mergedProps: HTMLProps = { ...forwardProps, className, children }\n\n return (\n <ColorSchemeContext value={styleProps.colorScheme}>\n <HydrationContext value={mergedProps.suppressHydrationWarning}>\n <Insertion cache={cache} htmlTag={htmlTag} serialized={serialized} />\n\n {asChild && !forwardAsChild ? (\n <Slot ref={ref} {...mergedProps} />\n ) : (\n <Component ref={ref} {...mergedProps} />\n )}\n </HydrationContext>\n </ColorSchemeContext>\n )\n }) as StyledComponent<Y, M>\n\n StyledComponent.displayName = displayName || \"StyledComponent\"\n\n return StyledComponent\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAyDA,MAAM,aAAiC,EAAE,OAAO,SAAS,iBAAiB;CACxE,CAAA,GAAA,eAAA,gBAAe,OAAO,YAAY,QAAQ;CAE1C,MAAM,SAAA,GAAA,6CAAA,iDAAA,GAAA,eAAA,cACS,OAAO,YAAY,QAAQ,CACzC;CAED,IAAI,EAAA,GAAA,oBAAA,cAAA,aAAa,IAAI,EAAA,GAAA,oBAAA,cAAA,aAAa,MAAM,EAAE;EACxC,IAAI,YAAY,WAAW;EAC3B,IAAI,OAAO,WAAW;EAEtB,OAAO,SAAS,KAAA,GAAW;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A,IAAe,WAAW,QAAQ,OAAO;EAEzC,IAAI,CAAC,WAAW,YAAY,KAAA;EAE5B,MAAM,cAAyB;GAAE,GAAG;GAAc;GAAW;GAAU;EAEvE,OACE,iBAAA,GAAA,kBAAA,KAAC,oBAAD;GAAoB,OAAO,WAAW;aACpC,iBAAA,GAAA,kBAAA,MAAC,kBAAD;IAAkB,OAAO,YAAY;cAArC,CACE,iBAAA,GAAA,kBAAA,KAAC,WAAD;KAAkB;KAAgB;KAAqB;KAAc,CAAA,EAEpE,WAAW,CAAC,iBACX,iBAAA,GAAA,kBAAA,KAACC,aAAAA,MAAD;KAAW;KAAK,GAAI;KAAe,CAAA,GAEnC,iBAAA,GAAA,kBAAA,KAAC,WAAD;KAAgB;KAAK,GAAI;KAAe,CAAA,CAEzB;;GACA,CAAA;GAEvB;CAEF,gBAAgB,cAAc,eAAe;CAE7C,OAAO"}
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -3320,6 +3320,7 @@ var src_exports = /* @__PURE__ */ require_runtime.__exportAll({
|
|
|
3320
3320
|
HueSliderRoot: () => require_hue_slider.HueSliderRoot,
|
|
3321
3321
|
HueSliderThumb: () => require_hue_slider.HueSliderThumb,
|
|
3322
3322
|
HueSliderTrack: () => require_hue_slider.HueSliderTrack,
|
|
3323
|
+
HydrationContext: () => require_styled.HydrationContext,
|
|
3323
3324
|
I18nContext: () => require_i18n_provider.I18nContext,
|
|
3324
3325
|
I18nProvider: () => require_i18n_provider.I18nProvider,
|
|
3325
3326
|
IceCreamBowlIcon: () => require_ice_cream_bowl_icon.IceCreamBowlIcon,
|
|
@@ -5015,6 +5016,7 @@ var src_exports = /* @__PURE__ */ require_runtime.__exportAll({
|
|
|
5015
5016
|
useHighlight: () => require_use_highlight.useHighlight,
|
|
5016
5017
|
useHover: () => require_hooks_use_hover_index.useHover,
|
|
5017
5018
|
useHueSliderPropsContext: () => require_hue_slider.useHueSliderPropsContext,
|
|
5019
|
+
useHydrationContext: () => require_styled.useHydrationContext,
|
|
5018
5020
|
useI18n: () => require_i18n_provider.useI18n,
|
|
5019
5021
|
useIconButtonPropsContext: () => require_icon_button.useIconButtonPropsContext,
|
|
5020
5022
|
useIconPropsContext: () => require_icon.useIconPropsContext,
|
|
@@ -6514,6 +6516,7 @@ exports.HueSliderPropsContext = require_hue_slider.HueSliderPropsContext;
|
|
|
6514
6516
|
exports.HueSliderRoot = require_hue_slider.HueSliderRoot;
|
|
6515
6517
|
exports.HueSliderThumb = require_hue_slider.HueSliderThumb;
|
|
6516
6518
|
exports.HueSliderTrack = require_hue_slider.HueSliderTrack;
|
|
6519
|
+
exports.HydrationContext = require_styled.HydrationContext;
|
|
6517
6520
|
exports.I18nContext = require_i18n_provider.I18nContext;
|
|
6518
6521
|
exports.I18nProvider = require_i18n_provider.I18nProvider;
|
|
6519
6522
|
exports.IceCreamBowlIcon = require_ice_cream_bowl_icon.IceCreamBowlIcon;
|
|
@@ -8384,6 +8387,7 @@ exports.useHeadingPropsContext = require_heading.useHeadingPropsContext;
|
|
|
8384
8387
|
exports.useHighlight = require_use_highlight.useHighlight;
|
|
8385
8388
|
exports.useHover = require_hooks_use_hover_index.useHover;
|
|
8386
8389
|
exports.useHueSliderPropsContext = require_hue_slider.useHueSliderPropsContext;
|
|
8390
|
+
exports.useHydrationContext = require_styled.useHydrationContext;
|
|
8387
8391
|
exports.useI18n = require_i18n_provider.useI18n;
|
|
8388
8392
|
exports.useIconButtonPropsContext = require_icon_button.useIconButtonPropsContext;
|
|
8389
8393
|
exports.useIconPropsContext = require_icon.useIconPropsContext;
|
package/dist/esm/core/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import { GlobalStyles, ThemeProvider, getPreventTransition, useTheme } from "./s
|
|
|
10
10
|
import { useSystemColorMode } from "./system/use-system-color-mode.js";
|
|
11
11
|
import { ColorModeContext, ColorModeProvider, useColorMode } from "./system/color-mode-provider.js";
|
|
12
12
|
import { defineComponentSlotStyle, defineComponentStyle, defineConfig, defineSemanticTokens, defineStyles, defineTheme, defineThemeSchemes, defineTokens } from "./system/config.js";
|
|
13
|
-
import { ColorSchemeContext, createStyled, useColorSchemeContext } from "./system/styled.js";
|
|
13
|
+
import { ColorSchemeContext, HydrationContext, createStyled, useColorSchemeContext, useHydrationContext } from "./system/styled.js";
|
|
14
14
|
import { styled } from "./system/factory.js";
|
|
15
15
|
import { ColorModeScript, ThemeSchemeScript, getStorageScript } from "./system/storage-script.js";
|
|
16
16
|
import { getColorModeValue, useColorModeValue } from "./system/use-color-mode-value.js";
|
|
@@ -31,4 +31,4 @@ import { chainProps, createShouldForwardProp, cssProps, extractProps, isEqualPro
|
|
|
31
31
|
import { getSlotClassName, mergeSlotCSS, useComponentSlotStyle, useComponentStyle } from "./components/use-component-style.js";
|
|
32
32
|
import { getClassName, getDisplayName } from "./components/utils.js";
|
|
33
33
|
import { createComponent, createSlotComponent } from "./components/create-component.js";
|
|
34
|
-
export { COLOR_MODE_STORAGE_KEY, ColorModeContext, ColorModeProvider, ColorModeScript, ColorSchemeContext, DEFAULT_DIRECTION, DEFAULT_LAYERS, DEFAULT_LOCALE, DEFAULT_VAR_PREFIX, EnvironmentProvider, GlobalStyles, SystemProvider, THEME_SCHEME_STORAGE_KEY, ThemeProvider, ThemeSchemeScript, animation, animationProperties, aspectRatioProperties, atRuleStyles, attributeProperties, attributeSelectors, attributes, blurProperties, borderProperties, chainProps, colorMix, colorProperties, conditionProperties, conditionSelectors, conditions, createBreakpoints, createComponent, createLayers, createShouldForwardProp, createSlotComponent, createStorageManager, createStyled, createSystem, createVars, css, cssProps, defaultEnvironment, defaultLayers, defaultSystem, defineComponentSlotStyle, defineComponentStyle, defineConfig, defineSemanticTokens, defineStyles, defineTheme, defineThemeSchemes, defineTokens, display, durationProperties, easingProperties, extractProps, focusRingStyle, fontProperties, getCSS, getCSSFunction, getClassName, getColorModeValue, getColorSchemeVar, getCondition, getDisplayName, getPreventTransition, getSlotClassName, getStorageScript, getStyle, getVar, getVarName, gradient, gradientProperties, groupAttributeProperties, groupAttributeSelectors, groupAttributes, injectKeyframes, injectVars, isCSSFunction, isCSSToken, isCSSVar, isColorScheme, isEqualProps, keyframeProperties, keyframes, mergeCSS, mergeProps, mergeSlotCSS, mergeVars, peerAttributeProperties, peerAttributeSelectors, peerAttributes, pseudoClassProperties, pseudoClassSelectors, pseudoClasses, pseudoElementProperties, pseudoElementSelectors, pseudoElements, pseudoStyles, radiusProperties, shadowProperties, shorthandStyles, sizeProperties, spaceProperties, standardStyles, styleProperties, styled, styledStyles, styles, tokenToValue, tokenToVar, transformConditionalValue, transformInterpolation, transforms, useCSS, useColorMode, useColorModeValue, useColorSchemeContext, useComponentSlotStyle, useComponentStyle, useEnvironment, useExtractProps, useInjectVarsIntoCss, useInjectVarsIntoProps, useSplitProps, useSystem, useSystemColorMode, useTheme, varAttr, varToValue, variableLengthProperties, zIndexProperties };
|
|
34
|
+
export { COLOR_MODE_STORAGE_KEY, ColorModeContext, ColorModeProvider, ColorModeScript, ColorSchemeContext, DEFAULT_DIRECTION, DEFAULT_LAYERS, DEFAULT_LOCALE, DEFAULT_VAR_PREFIX, EnvironmentProvider, GlobalStyles, HydrationContext, SystemProvider, THEME_SCHEME_STORAGE_KEY, ThemeProvider, ThemeSchemeScript, animation, animationProperties, aspectRatioProperties, atRuleStyles, attributeProperties, attributeSelectors, attributes, blurProperties, borderProperties, chainProps, colorMix, colorProperties, conditionProperties, conditionSelectors, conditions, createBreakpoints, createComponent, createLayers, createShouldForwardProp, createSlotComponent, createStorageManager, createStyled, createSystem, createVars, css, cssProps, defaultEnvironment, defaultLayers, defaultSystem, defineComponentSlotStyle, defineComponentStyle, defineConfig, defineSemanticTokens, defineStyles, defineTheme, defineThemeSchemes, defineTokens, display, durationProperties, easingProperties, extractProps, focusRingStyle, fontProperties, getCSS, getCSSFunction, getClassName, getColorModeValue, getColorSchemeVar, getCondition, getDisplayName, getPreventTransition, getSlotClassName, getStorageScript, getStyle, getVar, getVarName, gradient, gradientProperties, groupAttributeProperties, groupAttributeSelectors, groupAttributes, injectKeyframes, injectVars, isCSSFunction, isCSSToken, isCSSVar, isColorScheme, isEqualProps, keyframeProperties, keyframes, mergeCSS, mergeProps, mergeSlotCSS, mergeVars, peerAttributeProperties, peerAttributeSelectors, peerAttributes, pseudoClassProperties, pseudoClassSelectors, pseudoClasses, pseudoElementProperties, pseudoElementSelectors, pseudoElements, pseudoStyles, radiusProperties, shadowProperties, shorthandStyles, sizeProperties, spaceProperties, standardStyles, styleProperties, styled, styledStyles, styles, tokenToValue, tokenToVar, transformConditionalValue, transformInterpolation, transforms, useCSS, useColorMode, useColorModeValue, useColorSchemeContext, useComponentSlotStyle, useComponentStyle, useEnvironment, useExtractProps, useHydrationContext, useInjectVarsIntoCss, useInjectVarsIntoProps, useSplitProps, useSystem, useSystemColorMode, useTheme, varAttr, varToValue, variableLengthProperties, zIndexProperties };
|
|
@@ -9,8 +9,8 @@ import { GlobalStyles, ThemeProvider, getPreventTransition, useTheme } from "./t
|
|
|
9
9
|
import { useSystemColorMode } from "./use-system-color-mode.js";
|
|
10
10
|
import { ColorModeContext, ColorModeProvider, useColorMode } from "./color-mode-provider.js";
|
|
11
11
|
import { defineComponentSlotStyle, defineComponentStyle, defineConfig, defineSemanticTokens, defineStyles, defineTheme, defineThemeSchemes, defineTokens } from "./config.js";
|
|
12
|
-
import { ColorSchemeContext, createStyled, useColorSchemeContext } from "./styled.js";
|
|
12
|
+
import { ColorSchemeContext, HydrationContext, createStyled, useColorSchemeContext, useHydrationContext } from "./styled.js";
|
|
13
13
|
import { styled } from "./factory.js";
|
|
14
14
|
import { ColorModeScript, ThemeSchemeScript, getStorageScript } from "./storage-script.js";
|
|
15
15
|
import { getColorModeValue, useColorModeValue } from "./use-color-mode-value.js";
|
|
16
|
-
export { ColorModeContext, ColorModeProvider, ColorModeScript, ColorSchemeContext, EnvironmentProvider, GlobalStyles, SystemProvider, ThemeProvider, ThemeSchemeScript, createBreakpoints, createLayers, createStorageManager, createStyled, createSystem, createVars, defaultEnvironment, defaultLayers, defaultSystem, defineComponentSlotStyle, defineComponentStyle, defineConfig, defineSemanticTokens, defineStyles, defineTheme, defineThemeSchemes, defineTokens, getColorModeValue, getColorSchemeVar, getPreventTransition, getStorageScript, getVar, getVarName, injectVars, isColorScheme, mergeVars, styled, transformInterpolation, useColorMode, useColorModeValue, useColorSchemeContext, useEnvironment, useSystem, useSystemColorMode, useTheme, varAttr };
|
|
16
|
+
export { ColorModeContext, ColorModeProvider, ColorModeScript, ColorSchemeContext, EnvironmentProvider, GlobalStyles, HydrationContext, SystemProvider, ThemeProvider, ThemeSchemeScript, createBreakpoints, createLayers, createStorageManager, createStyled, createSystem, createVars, defaultEnvironment, defaultLayers, defaultSystem, defineComponentSlotStyle, defineComponentStyle, defineConfig, defineSemanticTokens, defineStyles, defineTheme, defineThemeSchemes, defineTokens, getColorModeValue, getColorSchemeVar, getPreventTransition, getStorageScript, getVar, getVarName, injectVars, isColorScheme, mergeVars, styled, transformInterpolation, useColorMode, useColorModeValue, useColorSchemeContext, useEnvironment, useHydrationContext, useSystem, useSystemColorMode, useTheme, varAttr };
|
|
@@ -43,6 +43,10 @@ const [ColorSchemeContext, useColorSchemeContext] = createContext$1({
|
|
|
43
43
|
name: "ColorSchemeContext",
|
|
44
44
|
strict: false
|
|
45
45
|
});
|
|
46
|
+
const [HydrationContext, useHydrationContext] = createContext$1({
|
|
47
|
+
name: "HydrationContext",
|
|
48
|
+
strict: false
|
|
49
|
+
});
|
|
46
50
|
function createStyled(el, { name, base, compounds, props, sizes, variants, defaultProps, transferProps, ...options } = {}) {
|
|
47
51
|
const displayName = options.displayName ?? getDisplayName(name, "");
|
|
48
52
|
const shouldForwardProp = !options.shouldForwardProp ? createShouldForwardProp(options.forwardProps) : void 0;
|
|
@@ -69,6 +73,7 @@ function createStyled(el, { name, base, compounds, props, sizes, variants, defau
|
|
|
69
73
|
const forwardAsChild = options.forwardAsChild || options.forwardProps?.includes("asChild");
|
|
70
74
|
const [omittedProps, styleProps] = useSplitProps(props, shouldForwardProp);
|
|
71
75
|
const [, rest] = useComponentStyle(omittedProps, componentStyleOptions);
|
|
76
|
+
const suppressHydrationWarning = useHydrationContext();
|
|
72
77
|
const [cssArray, colorScheme, forwardProps] = useMemo(() => {
|
|
73
78
|
const { css, colorScheme, ...forwardProps } = rest;
|
|
74
79
|
return [
|
|
@@ -78,6 +83,7 @@ function createStyled(el, { name, base, compounds, props, sizes, variants, defau
|
|
|
78
83
|
];
|
|
79
84
|
}, [rest]);
|
|
80
85
|
styleProps.colorScheme ??= colorScheme;
|
|
86
|
+
forwardProps.suppressHydrationWarning ??= suppressHydrationWarning;
|
|
81
87
|
if (forwardProps.className) className = getRegisteredStyles(cache.registered, registered.current, forwardProps.className).trim();
|
|
82
88
|
const interpolations = useMemo(() => [...registered.current, ...(0, utils_exports.filterEmpty)([...cssArray, styleProps].map(css(system, theme)))], [
|
|
83
89
|
cssArray,
|
|
@@ -94,25 +100,28 @@ function createStyled(el, { name, base, compounds, props, sizes, variants, defau
|
|
|
94
100
|
className,
|
|
95
101
|
children
|
|
96
102
|
};
|
|
97
|
-
return /* @__PURE__ */
|
|
103
|
+
return /* @__PURE__ */ jsx(ColorSchemeContext, {
|
|
98
104
|
value: styleProps.colorScheme,
|
|
99
|
-
children:
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
105
|
+
children: /* @__PURE__ */ jsxs(HydrationContext, {
|
|
106
|
+
value: mergedProps.suppressHydrationWarning,
|
|
107
|
+
children: [/* @__PURE__ */ jsx(Insertion, {
|
|
108
|
+
cache,
|
|
109
|
+
htmlTag,
|
|
110
|
+
serialized
|
|
111
|
+
}), asChild && !forwardAsChild ? /* @__PURE__ */ jsx(Slot, {
|
|
112
|
+
ref,
|
|
113
|
+
...mergedProps
|
|
114
|
+
}) : /* @__PURE__ */ jsx(Component, {
|
|
115
|
+
ref,
|
|
116
|
+
...mergedProps
|
|
117
|
+
})]
|
|
118
|
+
})
|
|
110
119
|
});
|
|
111
120
|
});
|
|
112
121
|
StyledComponent.displayName = displayName || "StyledComponent";
|
|
113
122
|
return StyledComponent;
|
|
114
123
|
}
|
|
115
124
|
//#endregion
|
|
116
|
-
export { ColorSchemeContext, createStyled, useColorSchemeContext };
|
|
125
|
+
export { ColorSchemeContext, HydrationContext, createStyled, useColorSchemeContext, useHydrationContext };
|
|
117
126
|
|
|
118
127
|
//# sourceMappingURL=styled.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.js","names":["createContext"],"sources":["../../../../src/core/system/styled.tsx"],"sourcesContent":["\"use client\"\n\nimport type { EmotionCache, SerializedStyles } from \"@emotion/utils\"\nimport type { FC } from \"react\"\nimport type { Dict } from \"../../utils\"\nimport type {
|
|
1
|
+
{"version":3,"file":"styled.js","names":["createContext"],"sources":["../../../../src/core/system/styled.tsx"],"sourcesContent":["\"use client\"\n\nimport type { EmotionCache, SerializedStyles } from \"@emotion/utils\"\nimport type { FC } from \"react\"\nimport type { Dict } from \"../../utils\"\nimport type {\n As,\n HTMLProps,\n ShouldForwardProp,\n StyledComponent,\n} from \"../components\"\nimport type { CSSModifierObject, CSSPropObject } from \"../css\"\nimport type {\n ColorScheme,\n ComponentStyle,\n System,\n UsageTheme,\n} from \"./index.types\"\nimport { withEmotionCache } from \"@emotion/react\"\nimport { serializeStyles } from \"@emotion/serialize\"\nimport { useInsertionEffectAlwaysWithSyncFallback } from \"@emotion/use-insertion-effect-with-fallbacks\"\nimport {\n getRegisteredStyles,\n insertStyles,\n registerStyles,\n} from \"@emotion/utils\"\nimport { useMemo, useRef } from \"react\"\nimport isEqual from \"react-fast-compare\"\nimport { Slot } from \"../../components/slot\"\nimport {\n createContext,\n createdDom,\n cx,\n filterEmpty,\n filterUndefined,\n isString,\n isUndefined,\n runIfFn,\n splitObject,\n toArray,\n toKebabCase,\n} from \"../../utils\"\nimport {\n createShouldForwardProp,\n getDisplayName,\n useComponentStyle,\n} from \"../components\"\nimport { css } from \"../css\"\nimport { useSystem } from \"./system-provider\"\nimport { useTheme } from \"./theme-provider\"\n\ninterface InsertionProps {\n cache: EmotionCache\n htmlTag: boolean\n serialized: SerializedStyles\n}\n\nconst Insertion: FC<InsertionProps> = ({ cache, htmlTag, serialized }) => {\n registerStyles(cache, serialized, htmlTag)\n\n const style = useInsertionEffectAlwaysWithSyncFallback(() =>\n insertStyles(cache, serialized, htmlTag),\n )\n\n if (!createdDom() && !isUndefined(style)) {\n let className = serialized.name\n let next = serialized.next\n\n while (next !== undefined) {\n className = cx(className, next.name) ?? \"\"\n next = next.next\n }\n\n return (\n <style\n data-emotion={cx(cache.key, className)}\n dangerouslySetInnerHTML={{ __html: style }}\n nonce={cache.sheet.nonce}\n />\n )\n } else {\n return null\n }\n}\n\nconst useSplitProps = <Y extends Dict, M extends Dict>(\n props: Dict,\n shouldForwardProp?: ShouldForwardProp,\n) => {\n const propsRef = useRef(props)\n\n if (!isEqual(propsRef.current, props)) propsRef.current = props\n\n const computedProps = propsRef.current\n\n return useMemo(\n () => splitObject<Y, M>(computedProps, shouldForwardProp),\n [computedProps, shouldForwardProp],\n )\n}\n\nexport const [ColorSchemeContext, useColorSchemeContext] =\n createContext<ColorScheme>({\n name: \"ColorSchemeContext\",\n strict: false,\n })\n\nexport const [HydrationContext, useHydrationContext] = createContext<boolean>({\n name: \"HydrationContext\",\n strict: false,\n})\n\nexport interface StyledOptions<\n Y extends CSSPropObject = CSSPropObject,\n M extends CSSModifierObject = CSSModifierObject,\n D extends CSSModifierObject = CSSModifierObject,\n H extends number | string | symbol = string,\n> extends Omit<ComponentStyle<Y, M, D>, \"className\"> {\n className?: ((system: System) => string) | string\n displayName?: string\n forwardAsChild?: boolean\n name?: string\n shouldForwardProp?: boolean | ShouldForwardProp\n target?: string\n forwardProps?: string[]\n transferProps?: H[]\n}\n\nexport function createStyled<\n Y extends As,\n M extends object = {},\n D extends CSSPropObject = CSSPropObject,\n H extends CSSModifierObject = CSSModifierObject,\n R extends CSSModifierObject = CSSModifierObject,\n>(\n el: Y,\n {\n name,\n base,\n compounds,\n props,\n sizes,\n variants,\n defaultProps,\n transferProps,\n ...options\n }: StyledOptions<D, H, R, keyof M> = {},\n) {\n const displayName = options.displayName ?? getDisplayName(name, \"\")\n const shouldForwardProp = !options.shouldForwardProp\n ? createShouldForwardProp(options.forwardProps)\n : undefined\n const style = filterUndefined({\n base,\n compounds,\n props,\n sizes,\n variants,\n defaultProps,\n })\n\n const StyledComponent = withEmotionCache<Dict>(function (\n { as: Component = el, asChild, children, ...props },\n cache,\n ref,\n ) {\n let className: string | undefined = \"\"\n\n const system = useSystem()\n const { theme } = useTheme<UsageTheme>()\n const componentStyleOptions = {\n name,\n className: system.utils.getClassName(\n runIfFn(options.className, system) ?? toKebabCase(name ?? \"\"),\n ),\n style,\n transferProps,\n }\n const registered = useRef<string[]>([])\n const htmlTag = isString(Component)\n const forwardAsChild =\n options.forwardAsChild || options.forwardProps?.includes(\"asChild\")\n const [omittedProps, styleProps] = useSplitProps(props, shouldForwardProp)\n const [, rest] = useComponentStyle<any, {}>(\n omittedProps,\n componentStyleOptions,\n )\n const suppressHydrationWarning = useHydrationContext()\n const [cssArray, colorScheme, forwardProps] = useMemo(() => {\n const { css, colorScheme, ...forwardProps } = rest\n\n return [toArray(css), colorScheme, forwardProps]\n }, [rest])\n\n styleProps.colorScheme ??= colorScheme\n forwardProps.suppressHydrationWarning ??= suppressHydrationWarning\n\n if (forwardProps.className)\n className = getRegisteredStyles(\n cache.registered,\n registered.current,\n forwardProps.className,\n ).trim()\n\n const interpolations = useMemo(\n () => [\n ...registered.current,\n ...filterEmpty([...cssArray, styleProps].map(css(system, theme))),\n ],\n [cssArray, system, styleProps, theme],\n )\n\n const serialized = useMemo(\n () => serializeStyles(interpolations, cache.registered),\n [interpolations, cache.registered],\n )\n\n className = cx(\n className,\n serialized.styles ? `${cache.key}-${serialized.name}` : undefined,\n )\n className = cx(className, options.target)\n\n if (!className) className = undefined\n\n const mergedProps: HTMLProps = { ...forwardProps, className, children }\n\n return (\n <ColorSchemeContext value={styleProps.colorScheme}>\n <HydrationContext value={mergedProps.suppressHydrationWarning}>\n <Insertion cache={cache} htmlTag={htmlTag} serialized={serialized} />\n\n {asChild && !forwardAsChild ? (\n <Slot ref={ref} {...mergedProps} />\n ) : (\n <Component ref={ref} {...mergedProps} />\n )}\n </HydrationContext>\n </ColorSchemeContext>\n )\n }) as StyledComponent<Y, M>\n\n StyledComponent.displayName = displayName || \"StyledComponent\"\n\n return StyledComponent\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAyDA,MAAM,aAAiC,EAAE,OAAO,SAAS,iBAAiB;CACxE,eAAe,OAAO,YAAY,QAAQ;CAE1C,MAAM,QAAQ,+CACZ,aAAa,OAAO,YAAY,QAAQ,CACzC;CAED,IAAI,EAAA,GAAA,cAAA,aAAa,IAAI,EAAA,GAAA,cAAA,aAAa,MAAM,EAAE;EACxC,IAAI,YAAY,WAAW;EAC3B,IAAI,OAAO,WAAW;EAEtB,OAAO,SAAS,KAAA,GAAW;GACzB,aAAA,GAAA,cAAA,IAAe,WAAW,KAAK,KAAK,IAAI;GACxC,OAAO,KAAK;;EAGd,OACE,oBAAC,SAAD;GACE,iBAAA,GAAA,cAAA,IAAiB,MAAM,KAAK,UAAU;GACtC,yBAAyB,EAAE,QAAQ,OAAO;GAC1C,OAAO,MAAM,MAAM;GACnB,CAAA;QAGJ,OAAO;;AAIX,MAAM,iBACJ,OACA,sBACG;CACH,MAAM,WAAW,OAAO,MAAM;CAE9B,IAAI,CAAC,QAAQ,SAAS,SAAS,MAAM,EAAE,SAAS,UAAU;CAE1D,MAAM,gBAAgB,SAAS;CAE/B,OAAO,eAAA,GAAA,cAAA,aACmB,eAAe,kBAAkB,EACzD,CAAC,eAAe,kBAAkB,CACnC;;AAGH,MAAa,CAAC,oBAAoB,yBAChCA,gBAA2B;CACzB,MAAM;CACN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