@marigold/system 16.0.0 → 16.0.1

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/index.d.mts CHANGED
@@ -1,6 +1,7 @@
1
1
  import * as react0 from "react";
2
- import { Context, ReactNode } from "react";
2
+ import { CSSProperties, Context, ReactNode } from "react";
3
3
  import { VariantProps } from "class-variance-authority";
4
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
4
5
  import { DateFormatterOptions, useNumberFormatter } from "@react-aria/i18n";
5
6
  import { HtmlProps, KebabCase } from "@marigold/types";
6
7
  import { ClassProp, ClassValue, StringToBoolean } from "class-variance-authority/dist/types";
@@ -34,7 +35,7 @@ declare const DateFormat: ({
34
35
  value,
35
36
  tabular,
36
37
  ...props
37
- }: DateFormatProps) => react0.JSX.Element;
38
+ }: DateFormatProps) => react_jsx_runtime0.JSX.Element;
38
39
  //#endregion
39
40
  //#region src/components/Formatters/NumericFormat.d.ts
40
41
  type NumerFormatterOptions = NonNullable<Parameters<typeof useNumberFormatter>[0]>;
@@ -58,7 +59,7 @@ declare const NumericFormat: ({
58
59
  value,
59
60
  tabular,
60
61
  ...props
61
- }: NumericFormatProps) => react0.JSX.Element;
62
+ }: NumericFormatProps) => react_jsx_runtime0.JSX.Element;
62
63
  //#endregion
63
64
  //#region src/utils.d.ts
64
65
  type ConfigSchema = Record<string, Record<string, ClassValue>>;
@@ -77,7 +78,7 @@ declare const cva: <T>(base?: ClassValue, config?: Config<T>) => {
77
78
  declare const cn: (...inputs: ClassValue[]) => string;
78
79
  declare const createVar: (o: {
79
80
  [key: string]: string | number | undefined;
80
- }) => React.CSSProperties;
81
+ }) => CSSProperties;
81
82
  /**
82
83
  * Safely get a dot-notated path within a nested object, with ability
83
84
  * to return a default if the full key path does not exist or
@@ -245,7 +246,7 @@ declare function ThemeProvider<T$1 extends Theme>({
245
246
  theme,
246
247
  children,
247
248
  className
248
- }: ThemeProviderProps<T$1>): react0.JSX.Element;
249
+ }: ThemeProviderProps<T$1>): react_jsx_runtime0.JSX.Element;
249
250
  //#endregion
250
251
  //#region src/hooks/useSmallScreen.d.ts
251
252
  declare const useSmallScreen: () => boolean;
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import * as react0 from "react";
2
- import { Context, ReactNode } from "react";
2
+ import { CSSProperties, Context, ReactNode } from "react";
3
3
  import { HtmlProps, KebabCase } from "@marigold/types";
4
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
4
5
  import { DateFormatterOptions, useNumberFormatter } from "@react-aria/i18n";
5
6
  import { ClassProp, ClassValue, StringToBoolean } from "class-variance-authority/dist/types";
6
7
  import { VariantProps } from "class-variance-authority";
@@ -34,7 +35,7 @@ declare const DateFormat: ({
34
35
  value,
35
36
  tabular,
36
37
  ...props
37
- }: DateFormatProps) => react0.JSX.Element;
38
+ }: DateFormatProps) => react_jsx_runtime0.JSX.Element;
38
39
  //#endregion
39
40
  //#region src/components/Formatters/NumericFormat.d.ts
40
41
  type NumerFormatterOptions = NonNullable<Parameters<typeof useNumberFormatter>[0]>;
@@ -58,7 +59,7 @@ declare const NumericFormat: ({
58
59
  value,
59
60
  tabular,
60
61
  ...props
61
- }: NumericFormatProps) => react0.JSX.Element;
62
+ }: NumericFormatProps) => react_jsx_runtime0.JSX.Element;
62
63
  //#endregion
63
64
  //#region src/utils.d.ts
64
65
  type ConfigSchema = Record<string, Record<string, ClassValue>>;
@@ -77,7 +78,7 @@ declare const cva: <T>(base?: ClassValue, config?: Config<T>) => {
77
78
  declare const cn: (...inputs: ClassValue[]) => string;
78
79
  declare const createVar: (o: {
79
80
  [key: string]: string | number | undefined;
80
- }) => React.CSSProperties;
81
+ }) => CSSProperties;
81
82
  /**
82
83
  * Safely get a dot-notated path within a nested object, with ability
83
84
  * to return a default if the full key path does not exist or
@@ -245,7 +246,7 @@ declare function ThemeProvider<T$1 extends Theme>({
245
246
  theme,
246
247
  children,
247
248
  className
248
- }: ThemeProviderProps<T$1>): react0.JSX.Element;
249
+ }: ThemeProviderProps<T$1>): react_jsx_runtime0.JSX.Element;
249
250
  //#endregion
250
251
  //#region src/hooks/useSmallScreen.d.ts
251
252
  declare const useSmallScreen: () => boolean;
package/dist/index.js CHANGED
@@ -27,6 +27,8 @@ let class_variance_authority = require("class-variance-authority");
27
27
  class_variance_authority = __toESM(class_variance_authority);
28
28
  let tailwind_merge = require("tailwind-merge");
29
29
  tailwind_merge = __toESM(tailwind_merge);
30
+ let react_jsx_runtime = require("react/jsx-runtime");
31
+ react_jsx_runtime = __toESM(react_jsx_runtime);
30
32
  let __react_aria_i18n = require("@react-aria/i18n");
31
33
  __react_aria_i18n = __toESM(__react_aria_i18n);
32
34
  let react_fast_compare = require("react-fast-compare");
@@ -81,28 +83,35 @@ const ensureCssVar = (val, prefix) => isValidCssCustomPropertyName(val) ? `var(-
81
83
  //#endregion
82
84
  //#region src/components/SVG/SVG.tsx
83
85
  const SVG = (0, react.forwardRef)(({ size = 24, children, className, color,...props }, ref) => {
84
- return /* @__PURE__ */ React.createElement("svg", {
86
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
85
87
  ...props,
86
88
  ref,
87
89
  width: `${props.width || size}px`,
88
90
  height: `${props.height || size}px`,
89
91
  className: cn("flex-none fill-current", className),
90
- style: { color: color && ensureCssVar(color, "color") }
91
- }, children);
92
+ style: { color: color && ensureCssVar(color, "color") },
93
+ children
94
+ });
92
95
  });
93
96
 
94
97
  //#endregion
95
98
  //#region src/components/Formatters/DateFormat.tsx
96
99
  const DateFormat = ({ value, tabular,...props }) => {
97
100
  const formatter = (0, __react_aria_i18n.useDateFormatter)({ ...props });
98
- return /* @__PURE__ */ React.createElement("span", { className: tabular ? "tabular-nums" : "" }, Array.isArray(value) ? formatter.formatRange(value[0], value[1]) : formatter.format(value));
101
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
102
+ className: tabular ? "tabular-nums" : "",
103
+ children: Array.isArray(value) ? formatter.formatRange(value[0], value[1]) : formatter.format(value)
104
+ });
99
105
  };
100
106
 
101
107
  //#endregion
102
108
  //#region src/components/Formatters/NumericFormat.tsx
103
109
  const NumericFormat = ({ value, tabular = true,...props }) => {
104
110
  const formatter = (0, __react_aria_i18n.useNumberFormatter)({ ...props });
105
- return /* @__PURE__ */ React.createElement("span", { className: tabular ? "tabular-nums" : void 0 }, Array.isArray(value) ? formatter.formatRange(value[0], value[1]) : formatter.format(value));
111
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
112
+ className: tabular ? "tabular-nums" : void 0,
113
+ children: Array.isArray(value) ? formatter.formatRange(value[0], value[1]) : formatter.format(value)
114
+ });
106
115
  };
107
116
 
108
117
  //#endregion
@@ -126,7 +135,13 @@ const useTheme = () => {
126
135
  return (0, react.useContext)(InternalContext);
127
136
  };
128
137
  function ThemeProvider({ theme, children, className }) {
129
- return /* @__PURE__ */ React.createElement(InternalContext.Provider, { value: theme }, /* @__PURE__ */ React.createElement("div", { className }, children));
138
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InternalContext.Provider, {
139
+ value: theme,
140
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
141
+ className,
142
+ children
143
+ })
144
+ });
130
145
  }
131
146
 
132
147
  //#endregion
package/dist/index.mjs CHANGED
@@ -1,6 +1,7 @@
1
1
  import { createContext, forwardRef, useCallback, useContext, useEffect, useRef, useState } from "react";
2
2
  import { cva as cva$1, cx } from "class-variance-authority";
3
3
  import { twMerge } from "tailwind-merge";
4
+ import { jsx } from "react/jsx-runtime";
4
5
  import { useDateFormatter, useNumberFormatter } from "@react-aria/i18n";
5
6
  import isEqual from "react-fast-compare";
6
7
 
@@ -53,28 +54,35 @@ const ensureCssVar = (val, prefix) => isValidCssCustomPropertyName(val) ? `var(-
53
54
  //#endregion
54
55
  //#region src/components/SVG/SVG.tsx
55
56
  const SVG = forwardRef(({ size = 24, children, className, color,...props }, ref) => {
56
- return /* @__PURE__ */ React.createElement("svg", {
57
+ return /* @__PURE__ */ jsx("svg", {
57
58
  ...props,
58
59
  ref,
59
60
  width: `${props.width || size}px`,
60
61
  height: `${props.height || size}px`,
61
62
  className: cn("flex-none fill-current", className),
62
- style: { color: color && ensureCssVar(color, "color") }
63
- }, children);
63
+ style: { color: color && ensureCssVar(color, "color") },
64
+ children
65
+ });
64
66
  });
65
67
 
66
68
  //#endregion
67
69
  //#region src/components/Formatters/DateFormat.tsx
68
70
  const DateFormat = ({ value, tabular,...props }) => {
69
71
  const formatter = useDateFormatter({ ...props });
70
- return /* @__PURE__ */ React.createElement("span", { className: tabular ? "tabular-nums" : "" }, Array.isArray(value) ? formatter.formatRange(value[0], value[1]) : formatter.format(value));
72
+ return /* @__PURE__ */ jsx("span", {
73
+ className: tabular ? "tabular-nums" : "",
74
+ children: Array.isArray(value) ? formatter.formatRange(value[0], value[1]) : formatter.format(value)
75
+ });
71
76
  };
72
77
 
73
78
  //#endregion
74
79
  //#region src/components/Formatters/NumericFormat.tsx
75
80
  const NumericFormat = ({ value, tabular = true,...props }) => {
76
81
  const formatter = useNumberFormatter({ ...props });
77
- return /* @__PURE__ */ React.createElement("span", { className: tabular ? "tabular-nums" : void 0 }, Array.isArray(value) ? formatter.formatRange(value[0], value[1]) : formatter.format(value));
82
+ return /* @__PURE__ */ jsx("span", {
83
+ className: tabular ? "tabular-nums" : void 0,
84
+ children: Array.isArray(value) ? formatter.formatRange(value[0], value[1]) : formatter.format(value)
85
+ });
78
86
  };
79
87
 
80
88
  //#endregion
@@ -98,7 +106,13 @@ const useTheme = () => {
98
106
  return useContext(InternalContext);
99
107
  };
100
108
  function ThemeProvider({ theme, children, className }) {
101
- return /* @__PURE__ */ React.createElement(InternalContext.Provider, { value: theme }, /* @__PURE__ */ React.createElement("div", { className }, children));
109
+ return /* @__PURE__ */ jsx(InternalContext.Provider, {
110
+ value: theme,
111
+ children: /* @__PURE__ */ jsx("div", {
112
+ className,
113
+ children
114
+ })
115
+ });
102
116
  }
103
117
 
104
118
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marigold/system",
3
- "version": "16.0.0",
3
+ "version": "16.0.1",
4
4
  "description": "Marigold System Library",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -52,7 +52,7 @@
52
52
  "react": "19.2.0",
53
53
  "tailwindcss": "4.1.17",
54
54
  "tsdown": "0.15.9",
55
- "@marigold/tsconfig": "0.4.1"
55
+ "@marigold/tsconfig": "0.4.2"
56
56
  },
57
57
  "scripts": {
58
58
  "build": "tsdown src/index.ts",