@orion-ds/react 1.2.1 → 1.2.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/AI_COMPONENTS.md +651 -0
- package/AI_QUICKREF.md +59 -0
- package/README.md +16 -1
- package/dist/contexts/ThemeContext.d.ts +7 -1
- package/dist/contexts/ThemeContext.d.ts.map +1 -1
- package/dist/index.cjs +24 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +14 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +1887 -1864
- package/dist/index.mjs.map +1 -1
- package/dist/react.css +1 -1
- package/package.json +16 -2
package/README.md
CHANGED
|
@@ -30,13 +30,28 @@ pnpm add @orion/react @orion/core
|
|
|
30
30
|
yarn add @orion/react @orion/core
|
|
31
31
|
\`\`\`
|
|
32
32
|
|
|
33
|
+
## Required CSS Imports
|
|
34
|
+
|
|
35
|
+
> **⚠️ IMPORTANT**: Both CSS files are **REQUIRED** for components to render correctly.
|
|
36
|
+
|
|
37
|
+
\`\`\`tsx
|
|
38
|
+
// In your app entry file (e.g., main.tsx, App.tsx)
|
|
39
|
+
import '@orion-ds/core/theme.css'; // Design tokens - REQUIRED
|
|
40
|
+
import '@orion-ds/react/dist/react.css'; // Component styles - REQUIRED
|
|
41
|
+
\`\`\`
|
|
42
|
+
|
|
43
|
+
Missing either import will result in unstyled or broken components. In development, ThemeProvider will warn you if `react.css` is missing.
|
|
44
|
+
|
|
33
45
|
## Quick Start
|
|
34
46
|
|
|
35
47
|
\`\`\`tsx
|
|
36
|
-
|
|
48
|
+
// 1. Import BOTH CSS files (required!)
|
|
37
49
|
import '@orion-ds/core/theme.css';
|
|
38
50
|
import '@orion-ds/react/dist/react.css';
|
|
39
51
|
|
|
52
|
+
// 2. Import components
|
|
53
|
+
import { Button, Card, Field, useTheme, ThemeProvider } from '@orion-ds/react';
|
|
54
|
+
|
|
40
55
|
function App() {
|
|
41
56
|
return (
|
|
42
57
|
<ThemeProvider> {/* Fonts load automatically! */}
|
|
@@ -59,6 +59,12 @@ export interface ThemeProviderProps {
|
|
|
59
59
|
* @default false
|
|
60
60
|
*/
|
|
61
61
|
disableAutoFontLoading?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Disable CSS import warnings in development
|
|
64
|
+
* When false (default), a warning is shown if react.css is not imported.
|
|
65
|
+
* @default false
|
|
66
|
+
*/
|
|
67
|
+
disableCSSWarnings?: boolean;
|
|
62
68
|
}
|
|
63
69
|
/**
|
|
64
70
|
* ThemeProvider Component
|
|
@@ -66,7 +72,7 @@ export interface ThemeProviderProps {
|
|
|
66
72
|
* Wraps your application to provide global theme and brand state.
|
|
67
73
|
* Must be placed near the root of your application.
|
|
68
74
|
*/
|
|
69
|
-
export declare function ThemeProvider({ children, options, disableFontWarnings, disableAutoFontLoading, }: ThemeProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
75
|
+
export declare function ThemeProvider({ children, options, disableFontWarnings, disableAutoFontLoading, disableCSSWarnings, }: ThemeProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
70
76
|
/**
|
|
71
77
|
* Hook to access global theme state
|
|
72
78
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeContext.d.ts","sourceRoot":"","sources":["../../src/contexts/ThemeContext.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,EAAgD,SAAS,EAAE,MAAM,OAAO,CAAC;AAChF,OAAO,EAA4B,eAAe,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"ThemeContext.d.ts","sourceRoot":"","sources":["../../src/contexts/ThemeContext.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,EAAgD,SAAS,EAAE,MAAM,OAAO,CAAC;AAChF,OAAO,EAA4B,eAAe,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAqB9F;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,OAAO,CAAC,EAAE,eAAe,CAAC;IAE1B;;;OAGG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B;;;;;OAKG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,OAAO,EACP,mBAA2B,EAC3B,sBAA8B,EAC9B,kBAA0B,GAC3B,EAAE,kBAAkB,2CAmFpB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,eAAe,IAAI,cAAc,CAmBhD"}
|