@sproutsocial/seeds-react-theme-provider 1.1.22 → 1.1.24

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.
@@ -8,14 +8,14 @@ $ tsup --dts
8
8
  CLI Cleaning output folder
9
9
  CJS Build start
10
10
  ESM Build start
11
- ESM dist/index.mjs 861.00 B
12
- ESM dist/index.mjs.map 1.64 KB
13
- ESM ⚡️ Build success in 17ms
14
- CJS dist/index.js 1.83 KB
15
- CJS dist/index.js.map 1.67 KB
16
- CJS ⚡️ Build success in 18ms
11
+ CJS dist/index.js 1.41 KB
12
+ CJS dist/index.js.map 969.00 B
13
+ CJS ⚡️ Build success in 12ms
14
+ ESM dist/index.mjs 451.00 B
15
+ ESM dist/index.mjs.map 909.00 B
16
+ ESM ⚡️ Build success in 44ms
17
17
  DTS Build start
18
- DTS ⚡️ Build success in 2281ms
18
+ DTS ⚡️ Build success in 1443ms
19
19
  DTS dist/index.d.ts 436.00 B
20
20
  DTS dist/index.d.mts 436.00 B
21
- Done in 3.21s.
21
+ Done in 2.21s.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,42 @@
1
1
  # @sproutsocial/seeds-react-theme-provider
2
2
 
3
+ ## 1.1.24
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [2e72599]
8
+ - @sproutsocial/seeds-react-theme@4.3.0
9
+
10
+ ## 1.1.23
11
+
12
+ ### Patch Changes
13
+
14
+ - d21ae54: Fix AI gradient contrast and dark-mode legibility for AI components.
15
+
16
+ - The dark-mode `--color-gradient-ai` / `--color-gradient-ai-subtle` tokens now
17
+ use lighter blue/purple stops (`#679eff → #b984ff → #f282f5`) so AI components
18
+ meet WCAG contrast against the dark surface. Light mode is unchanged.
19
+ - The `ai-secondary` Button base now uses the themed container surface
20
+ (`--color-container-bg-base`) instead of a hardcoded white, and its label text
21
+ now flips to a light neutral in dark mode (previously dark text on a dark
22
+ fill).
23
+ - `container.background.ai_generated` and `text.ai_generated` are now
24
+ token-driven with proper light/dark variants; the hardcoded, light-only
25
+ gradient injection was removed from `seeds-react-theme-provider`.
26
+
27
+ **Contract change:** AI-generated surface tokens now resolve entirely from the
28
+ compiled theme CSS (`--color-gradient-ai-subtle`, `--color-container-bg-base`),
29
+ which is required for these tokens to render. The previous
30
+ `seeds-react-theme-provider` injection that let standalone styled-components
31
+ consumers get the AI surface _without_ loading the compiled theme CSS has been
32
+ removed deliberately, as part of the ongoing migration away from
33
+ styled-components toward CSS/Tailwind. A literal fallback was intentionally not
34
+ added — it could only encode the light-mode value and would render incorrectly
35
+ in dark mode. Consumers rendering AI components must load the compiled theme CSS.
36
+
37
+ - Updated dependencies [d21ae54]
38
+ - @sproutsocial/seeds-react-theme@4.2.1
39
+
3
40
  ## 1.1.22
4
41
 
5
42
  ### Patch Changes
package/dist/index.js CHANGED
@@ -27,19 +27,6 @@ var React = require("react");
27
27
  var import_styled_components = require("styled-components");
28
28
  var import_seeds_react_theme = require("@sproutsocial/seeds-react-theme");
29
29
  var import_jsx_runtime = require("react/jsx-runtime");
30
- var GlobalTokenStyles = import_styled_components.createGlobalStyle`
31
- :root {
32
- --color-container-bg-ai-generated: radial-gradient(
33
- circle at bottom left,
34
- color-mix(in srgb, #205bc3, transparent 80%) 0%,
35
- color-mix(in srgb, #6f5ed3, transparent 80%) 61%,
36
- color-mix(in srgb, #f282f5, transparent 80%) 100%
37
- ), #f3f4f4;
38
- }
39
- `;
40
- var ThemeProvider = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styled_components.ThemeProvider, { ...props, theme: props.theme || import_seeds_react_theme.theme, children: [
41
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(GlobalTokenStyles, {}),
42
- props.children
43
- ] });
30
+ var ThemeProvider = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled_components.ThemeProvider, { ...props, theme: props.theme || import_seeds_react_theme.theme, children: props.children });
44
31
  var index_default = ThemeProvider;
45
32
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.tsx"],"sourcesContent":["import * as React from \"react\";\nimport {\n ThemeProvider as BaseThemeProvider,\n createGlobalStyle,\n} from \"styled-components\";\nimport { theme } from \"@sproutsocial/seeds-react-theme\";\nimport type {\n TypeSproutTheme,\n TypeTheme,\n} from \"@sproutsocial/seeds-react-theme\";\n\n// We can append additional themes types here\ntype TypeAllThemes = TypeTheme | TypeSproutTheme;\n\ntype TypeProps = {\n readonly theme?: TypeAllThemes;\n readonly children?: React.ReactNode;\n};\n\n// CSS custom properties for token values that cannot be represented in SCSS maps\n// (e.g. radial-gradient + color-mix). These are injected here so styled-components\n// consumers get the values without needing to load the compiled SCSS theme CSS.\nconst GlobalTokenStyles = createGlobalStyle`\n :root {\n --color-container-bg-ai-generated: radial-gradient(\n circle at bottom left,\n color-mix(in srgb, #205bc3, transparent 80%) 0%,\n color-mix(in srgb, #6f5ed3, transparent 80%) 61%,\n color-mix(in srgb, #f282f5, transparent 80%) 100%\n ), #f3f4f4;\n }\n`;\n\nconst ThemeProvider = (props: TypeProps) => (\n <BaseThemeProvider {...props} theme={props.theme || theme}>\n <GlobalTokenStyles />\n {props.children}\n </BaseThemeProvider>\n);\n\nexport default ThemeProvider;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAAuB;AACvB,+BAGO;AACP,+BAAsB;AA6BpB;AAZF,IAAM,oBAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAW1B,IAAM,gBAAgB,CAAC,UACrB,6CAAC,yBAAAA,eAAA,EAAmB,GAAG,OAAO,OAAO,MAAM,SAAS,gCAClD;AAAA,8CAAC,qBAAkB;AAAA,EAClB,MAAM;AAAA,GACT;AAGF,IAAO,gBAAQ;","names":["BaseThemeProvider"]}
1
+ {"version":3,"sources":["../src/index.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { ThemeProvider as BaseThemeProvider } from \"styled-components\";\nimport { theme } from \"@sproutsocial/seeds-react-theme\";\nimport type {\n TypeSproutTheme,\n TypeTheme,\n} from \"@sproutsocial/seeds-react-theme\";\n\n// We can append additional themes types here\ntype TypeAllThemes = TypeTheme | TypeSproutTheme;\n\ntype TypeProps = {\n readonly theme?: TypeAllThemes;\n readonly children?: React.ReactNode;\n};\n\nconst ThemeProvider = (props: TypeProps) => (\n <BaseThemeProvider {...props} theme={props.theme || theme}>\n {props.children}\n </BaseThemeProvider>\n);\n\nexport default ThemeProvider;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAAuB;AACvB,+BAAmD;AACnD,+BAAsB;AAepB;AADF,IAAM,gBAAgB,CAAC,UACrB,4CAAC,yBAAAA,eAAA,EAAmB,GAAG,OAAO,OAAO,MAAM,SAAS,gCACjD,gBAAM,UACT;AAGF,IAAO,gBAAQ;","names":["BaseThemeProvider"]}
package/dist/index.mjs CHANGED
@@ -1,25 +1,9 @@
1
1
  // src/index.tsx
2
2
  import "react";
3
- import {
4
- ThemeProvider as BaseThemeProvider,
5
- createGlobalStyle
6
- } from "styled-components";
3
+ import { ThemeProvider as BaseThemeProvider } from "styled-components";
7
4
  import { theme } from "@sproutsocial/seeds-react-theme";
8
- import { jsx, jsxs } from "react/jsx-runtime";
9
- var GlobalTokenStyles = createGlobalStyle`
10
- :root {
11
- --color-container-bg-ai-generated: radial-gradient(
12
- circle at bottom left,
13
- color-mix(in srgb, #205bc3, transparent 80%) 0%,
14
- color-mix(in srgb, #6f5ed3, transparent 80%) 61%,
15
- color-mix(in srgb, #f282f5, transparent 80%) 100%
16
- ), #f3f4f4;
17
- }
18
- `;
19
- var ThemeProvider = (props) => /* @__PURE__ */ jsxs(BaseThemeProvider, { ...props, theme: props.theme || theme, children: [
20
- /* @__PURE__ */ jsx(GlobalTokenStyles, {}),
21
- props.children
22
- ] });
5
+ import { jsx } from "react/jsx-runtime";
6
+ var ThemeProvider = (props) => /* @__PURE__ */ jsx(BaseThemeProvider, { ...props, theme: props.theme || theme, children: props.children });
23
7
  var index_default = ThemeProvider;
24
8
  export {
25
9
  index_default as default
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.tsx"],"sourcesContent":["import * as React from \"react\";\nimport {\n ThemeProvider as BaseThemeProvider,\n createGlobalStyle,\n} from \"styled-components\";\nimport { theme } from \"@sproutsocial/seeds-react-theme\";\nimport type {\n TypeSproutTheme,\n TypeTheme,\n} from \"@sproutsocial/seeds-react-theme\";\n\n// We can append additional themes types here\ntype TypeAllThemes = TypeTheme | TypeSproutTheme;\n\ntype TypeProps = {\n readonly theme?: TypeAllThemes;\n readonly children?: React.ReactNode;\n};\n\n// CSS custom properties for token values that cannot be represented in SCSS maps\n// (e.g. radial-gradient + color-mix). These are injected here so styled-components\n// consumers get the values without needing to load the compiled SCSS theme CSS.\nconst GlobalTokenStyles = createGlobalStyle`\n :root {\n --color-container-bg-ai-generated: radial-gradient(\n circle at bottom left,\n color-mix(in srgb, #205bc3, transparent 80%) 0%,\n color-mix(in srgb, #6f5ed3, transparent 80%) 61%,\n color-mix(in srgb, #f282f5, transparent 80%) 100%\n ), #f3f4f4;\n }\n`;\n\nconst ThemeProvider = (props: TypeProps) => (\n <BaseThemeProvider {...props} theme={props.theme || theme}>\n <GlobalTokenStyles />\n {props.children}\n </BaseThemeProvider>\n);\n\nexport default ThemeProvider;\n"],"mappings":";AAAA,OAAuB;AACvB;AAAA,EACE,iBAAiB;AAAA,EACjB;AAAA,OACK;AACP,SAAS,aAAa;AA6BpB,SACE,KADF;AAZF,IAAM,oBAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAW1B,IAAM,gBAAgB,CAAC,UACrB,qBAAC,qBAAmB,GAAG,OAAO,OAAO,MAAM,SAAS,OAClD;AAAA,sBAAC,qBAAkB;AAAA,EAClB,MAAM;AAAA,GACT;AAGF,IAAO,gBAAQ;","names":[]}
1
+ {"version":3,"sources":["../src/index.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { ThemeProvider as BaseThemeProvider } from \"styled-components\";\nimport { theme } from \"@sproutsocial/seeds-react-theme\";\nimport type {\n TypeSproutTheme,\n TypeTheme,\n} from \"@sproutsocial/seeds-react-theme\";\n\n// We can append additional themes types here\ntype TypeAllThemes = TypeTheme | TypeSproutTheme;\n\ntype TypeProps = {\n readonly theme?: TypeAllThemes;\n readonly children?: React.ReactNode;\n};\n\nconst ThemeProvider = (props: TypeProps) => (\n <BaseThemeProvider {...props} theme={props.theme || theme}>\n {props.children}\n </BaseThemeProvider>\n);\n\nexport default ThemeProvider;\n"],"mappings":";AAAA,OAAuB;AACvB,SAAS,iBAAiB,yBAAyB;AACnD,SAAS,aAAa;AAepB;AADF,IAAM,gBAAgB,CAAC,UACrB,oBAAC,qBAAmB,GAAG,OAAO,OAAO,MAAM,SAAS,OACjD,gBAAM,UACT;AAGF,IAAO,gBAAQ;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sproutsocial/seeds-react-theme-provider",
3
- "version": "1.1.22",
3
+ "version": "1.1.24",
4
4
  "description": "Seeds React Theme Provider",
5
5
  "author": "Sprout Social, Inc.",
6
6
  "license": "MIT",
@@ -15,7 +15,7 @@
15
15
  "typecheck": "tsc --noEmit"
16
16
  },
17
17
  "dependencies": {
18
- "@sproutsocial/seeds-react-theme": "^4.2.0"
18
+ "@sproutsocial/seeds-react-theme": "^4.3.0"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@types/styled-components": "^5.1.26",
package/src/index.tsx CHANGED
@@ -1,8 +1,5 @@
1
1
  import * as React from "react";
2
- import {
3
- ThemeProvider as BaseThemeProvider,
4
- createGlobalStyle,
5
- } from "styled-components";
2
+ import { ThemeProvider as BaseThemeProvider } from "styled-components";
6
3
  import { theme } from "@sproutsocial/seeds-react-theme";
7
4
  import type {
8
5
  TypeSproutTheme,
@@ -17,23 +14,8 @@ type TypeProps = {
17
14
  readonly children?: React.ReactNode;
18
15
  };
19
16
 
20
- // CSS custom properties for token values that cannot be represented in SCSS maps
21
- // (e.g. radial-gradient + color-mix). These are injected here so styled-components
22
- // consumers get the values without needing to load the compiled SCSS theme CSS.
23
- const GlobalTokenStyles = createGlobalStyle`
24
- :root {
25
- --color-container-bg-ai-generated: radial-gradient(
26
- circle at bottom left,
27
- color-mix(in srgb, #205bc3, transparent 80%) 0%,
28
- color-mix(in srgb, #6f5ed3, transparent 80%) 61%,
29
- color-mix(in srgb, #f282f5, transparent 80%) 100%
30
- ), #f3f4f4;
31
- }
32
- `;
33
-
34
17
  const ThemeProvider = (props: TypeProps) => (
35
18
  <BaseThemeProvider {...props} theme={props.theme || theme}>
36
- <GlobalTokenStyles />
37
19
  {props.children}
38
20
  </BaseThemeProvider>
39
21
  );