@orion-ds/react 1.1.2 → 1.1.4
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/components/Button/Button.types.d.ts +130 -11
- package/dist/components/Button/Button.types.d.ts.map +1 -1
- package/dist/components/Field/Field.types.d.ts +124 -11
- package/dist/components/Field/Field.types.d.ts.map +1 -1
- package/dist/contexts/ThemeContext.d.ts +15 -1
- package/dist/contexts/ThemeContext.d.ts.map +1 -1
- package/dist/examples/LandingPage.example.d.ts +36 -0
- package/dist/examples/LandingPage.example.d.ts.map +1 -0
- package/dist/examples/index.d.ts +22 -0
- package/dist/examples/index.d.ts.map +1 -0
- package/dist/index.cjs +103 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +14019 -13517
- package/dist/index.mjs.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/react.css +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/validation.d.ts +94 -0
- package/dist/utils/validation.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -2,62 +2,181 @@
|
|
|
2
2
|
* Button Component Types
|
|
3
3
|
*
|
|
4
4
|
* Type definitions for the Orion Button component.
|
|
5
|
+
*
|
|
6
|
+
* @module Button
|
|
7
|
+
* @see {@link ./README.md} for full documentation
|
|
5
8
|
*/
|
|
6
9
|
import type { ButtonHTMLAttributes, ReactNode } from 'react';
|
|
7
10
|
/**
|
|
8
|
-
* Button visual variants
|
|
11
|
+
* Button visual variants - each has specific semantic meaning.
|
|
12
|
+
*
|
|
13
|
+
* @semanticGuide
|
|
14
|
+
* - `primary`: Main CTA - Submit, Save, Continue, Get Started
|
|
15
|
+
* - `secondary`: Supporting action - Cancel, Back, Learn More
|
|
16
|
+
* - `ghost`: Subtle/tertiary action - Close, Dismiss, Skip
|
|
17
|
+
* - `danger`: Destructive action - Delete, Remove, Unsubscribe
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```tsx
|
|
21
|
+
* <Button variant="primary">Save</Button> // Main action
|
|
22
|
+
* <Button variant="secondary">Cancel</Button> // Supporting action
|
|
23
|
+
* <Button variant="ghost">Skip</Button> // Subtle action
|
|
24
|
+
* <Button variant="danger">Delete</Button> // Destructive action
|
|
25
|
+
* ```
|
|
9
26
|
*/
|
|
10
27
|
export type ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'danger';
|
|
11
28
|
/**
|
|
12
|
-
* Button sizes
|
|
29
|
+
* Button sizes - automatically adapt to current mode (display/product/app).
|
|
30
|
+
*
|
|
31
|
+
* @modeAware Sizes scale per data-mode:
|
|
32
|
+
* - Display mode: sm=40px, md=56px, lg=64px (spacious, marketing)
|
|
33
|
+
* - Product mode: sm=28px, md=32px, lg=36px (compact, SaaS)
|
|
34
|
+
* - App mode: sm=40px, md=44px, lg=48px (touch-friendly, mobile)
|
|
35
|
+
*
|
|
36
|
+
* @semanticGuide
|
|
37
|
+
* - `sm`: Dense UIs, tables, inline actions
|
|
38
|
+
* - `md`: Default - most buttons (recommended)
|
|
39
|
+
* - `lg`: Hero CTAs, prominent actions
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```tsx
|
|
43
|
+
* <Button size="sm">Edit</Button> // Dense UI
|
|
44
|
+
* <Button size="md">Submit</Button> // Default
|
|
45
|
+
* <Button size="lg">Get Started</Button> // Hero CTA
|
|
46
|
+
* ```
|
|
13
47
|
*/
|
|
14
48
|
export type ButtonSize = 'sm' | 'md' | 'lg';
|
|
15
49
|
/**
|
|
16
50
|
* Button component props
|
|
17
51
|
*
|
|
18
|
-
* @example
|
|
52
|
+
* @example Basic usage
|
|
19
53
|
* ```tsx
|
|
20
54
|
* <Button variant="primary" size="md">
|
|
21
55
|
* Click me
|
|
22
56
|
* </Button>
|
|
23
57
|
* ```
|
|
58
|
+
*
|
|
59
|
+
* @example With icon
|
|
60
|
+
* ```tsx
|
|
61
|
+
* import { Download } from 'lucide-react';
|
|
62
|
+
*
|
|
63
|
+
* <Button icon={<Download size={20} />}>
|
|
64
|
+
* Download
|
|
65
|
+
* </Button>
|
|
66
|
+
* ```
|
|
67
|
+
*
|
|
68
|
+
* @example Icon-only (requires aria-label)
|
|
69
|
+
* ```tsx
|
|
70
|
+
* import { Settings } from 'lucide-react';
|
|
71
|
+
*
|
|
72
|
+
* <Button
|
|
73
|
+
* iconOnly
|
|
74
|
+
* icon={<Settings size={20} />}
|
|
75
|
+
* aria-label="Settings"
|
|
76
|
+
* />
|
|
77
|
+
* ```
|
|
78
|
+
*
|
|
79
|
+
* @example Loading state
|
|
80
|
+
* ```tsx
|
|
81
|
+
* <Button isLoading>
|
|
82
|
+
* Saving...
|
|
83
|
+
* </Button>
|
|
84
|
+
* ```
|
|
24
85
|
*/
|
|
25
86
|
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
26
87
|
/**
|
|
27
|
-
* Visual variant of the button
|
|
88
|
+
* Visual variant of the button.
|
|
89
|
+
*
|
|
90
|
+
* @semanticGuide
|
|
91
|
+
* - `primary`: Main CTA (Submit, Save, Continue)
|
|
92
|
+
* - `secondary`: Supporting action (Cancel, Back)
|
|
93
|
+
* - `ghost`: Subtle action (Close, Dismiss)
|
|
94
|
+
* - `danger`: Destructive action (Delete, Remove)
|
|
95
|
+
*
|
|
28
96
|
* @default 'primary'
|
|
29
97
|
*/
|
|
30
98
|
variant?: ButtonVariant;
|
|
31
99
|
/**
|
|
32
|
-
* Size of the button
|
|
100
|
+
* Size of the button. Automatically adapts to current mode.
|
|
101
|
+
*
|
|
102
|
+
* @modeAware
|
|
103
|
+
* - Display: 40/56/64px heights (spacious)
|
|
104
|
+
* - Product: 28/32/36px heights (compact)
|
|
105
|
+
* - App: 40/44/48px heights (touch-friendly)
|
|
106
|
+
*
|
|
33
107
|
* @default 'md'
|
|
34
108
|
*/
|
|
35
109
|
size?: ButtonSize;
|
|
36
110
|
/**
|
|
37
|
-
* Loading state - shows spinner and disables interaction
|
|
111
|
+
* Loading state - shows spinner and disables interaction.
|
|
112
|
+
* Button text remains visible but dimmed.
|
|
113
|
+
*
|
|
114
|
+
* @example
|
|
115
|
+
* ```tsx
|
|
116
|
+
* <Button isLoading>Saving...</Button>
|
|
117
|
+
* ```
|
|
118
|
+
*
|
|
38
119
|
* @default false
|
|
39
120
|
*/
|
|
40
121
|
isLoading?: boolean;
|
|
41
122
|
/**
|
|
42
|
-
* Full width button
|
|
123
|
+
* Full width button - expands to fill container.
|
|
124
|
+
* Useful for form submissions and card footers.
|
|
125
|
+
*
|
|
126
|
+
* @example
|
|
127
|
+
* ```tsx
|
|
128
|
+
* <Card.Footer>
|
|
129
|
+
* <Button fullWidth>Continue</Button>
|
|
130
|
+
* </Card.Footer>
|
|
131
|
+
* ```
|
|
132
|
+
*
|
|
43
133
|
* @default false
|
|
44
134
|
*/
|
|
45
135
|
fullWidth?: boolean;
|
|
46
136
|
/**
|
|
47
|
-
* Icon to display
|
|
137
|
+
* Icon to display on the left side of button text.
|
|
138
|
+
* Use 20px icons (size={20}) for best results.
|
|
139
|
+
*
|
|
140
|
+
* @example
|
|
141
|
+
* ```tsx
|
|
142
|
+
* import { Download } from 'lucide-react';
|
|
143
|
+
* <Button icon={<Download size={20} />}>Download</Button>
|
|
144
|
+
* ```
|
|
48
145
|
*/
|
|
49
146
|
icon?: ReactNode;
|
|
50
147
|
/**
|
|
51
|
-
* Icon to display
|
|
148
|
+
* Icon to display on the right side of button text.
|
|
149
|
+
* Commonly used for chevrons/arrows indicating action direction.
|
|
150
|
+
*
|
|
151
|
+
* @example
|
|
152
|
+
* ```tsx
|
|
153
|
+
* import { ChevronRight } from 'lucide-react';
|
|
154
|
+
* <Button iconRight={<ChevronRight size={20} />}>Continue</Button>
|
|
155
|
+
* ```
|
|
52
156
|
*/
|
|
53
157
|
iconRight?: ReactNode;
|
|
54
158
|
/**
|
|
55
|
-
* Icon-only button (no text)
|
|
159
|
+
* Icon-only button (no text, just icon).
|
|
160
|
+
*
|
|
161
|
+
* @requires aria-label - MUST provide aria-label for accessibility
|
|
162
|
+
*
|
|
163
|
+
* @example
|
|
164
|
+
* ```tsx
|
|
165
|
+
* import { Settings } from 'lucide-react';
|
|
166
|
+
*
|
|
167
|
+
* // CORRECT - has aria-label
|
|
168
|
+
* <Button iconOnly icon={<Settings size={20} />} aria-label="Settings" />
|
|
169
|
+
*
|
|
170
|
+
* // WRONG - missing aria-label (accessibility violation)
|
|
171
|
+
* <Button iconOnly icon={<Settings size={20} />} />
|
|
172
|
+
* ```
|
|
173
|
+
*
|
|
56
174
|
* @default false
|
|
57
175
|
*/
|
|
58
176
|
iconOnly?: boolean;
|
|
59
177
|
/**
|
|
60
|
-
* Button content
|
|
178
|
+
* Button content (text and/or elements).
|
|
179
|
+
* Ignored when iconOnly is true.
|
|
61
180
|
*/
|
|
62
181
|
children?: ReactNode;
|
|
63
182
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.types.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"Button.types.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE7D;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,WAAW,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEzE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,MAAM,WAAW,WAAY,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC;IAC1E;;;;;;;;;;OAUG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IAExB;;;;;;;;;OASG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;IAElB;;;;;;;;;;OAUG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;;;;;;;;;OAYG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;;;;;;OASG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB;;;;;;;;;OASG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB;;;;;;;;;;;;;;;;;OAiBG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB"}
|
|
@@ -2,54 +2,167 @@
|
|
|
2
2
|
* Field Component Types
|
|
3
3
|
*
|
|
4
4
|
* Type definitions for the Orion Field component (input with label and error).
|
|
5
|
+
*
|
|
6
|
+
* @important Field is a SELF-CONTAINED component - it renders its own input.
|
|
7
|
+
* Do NOT use children to pass an input element.
|
|
8
|
+
*
|
|
9
|
+
* @module Field
|
|
10
|
+
* @see {@link ./README.md} for full documentation
|
|
5
11
|
*/
|
|
6
12
|
import type { InputHTMLAttributes, ReactNode } from 'react';
|
|
7
13
|
/**
|
|
8
14
|
* Field component props
|
|
9
15
|
*
|
|
10
|
-
* @
|
|
16
|
+
* @important Field is PROPS-BASED, not a wrapper. It renders its own `<input>`.
|
|
17
|
+
*
|
|
18
|
+
* @example Basic usage
|
|
19
|
+
* ```tsx
|
|
20
|
+
* <Field
|
|
21
|
+
* label="Email"
|
|
22
|
+
* type="email"
|
|
23
|
+
* placeholder="you@example.com"
|
|
24
|
+
* />
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* @example With validation error
|
|
28
|
+
* ```tsx
|
|
29
|
+
* <Field
|
|
30
|
+
* label="Email"
|
|
31
|
+
* type="email"
|
|
32
|
+
* value={email}
|
|
33
|
+
* onChange={(e) => setEmail(e.target.value)}
|
|
34
|
+
* error={emailError}
|
|
35
|
+
* />
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* @example With icons
|
|
11
39
|
* ```tsx
|
|
40
|
+
* import { Mail, Eye } from 'lucide-react';
|
|
41
|
+
*
|
|
12
42
|
* <Field
|
|
13
43
|
* label="Email"
|
|
14
44
|
* type="email"
|
|
15
|
-
*
|
|
16
|
-
*
|
|
45
|
+
* leftIcon={<Mail size={18} />}
|
|
46
|
+
* placeholder="you@example.com"
|
|
17
47
|
* />
|
|
18
48
|
* ```
|
|
49
|
+
*
|
|
50
|
+
* @example WRONG - Don't use children
|
|
51
|
+
* ```tsx
|
|
52
|
+
* // WRONG - Field doesn't accept children for input
|
|
53
|
+
* <Field label="Email">
|
|
54
|
+
* <input type="email" /> // This won't work!
|
|
55
|
+
* </Field>
|
|
56
|
+
*
|
|
57
|
+
* // CORRECT - Use props
|
|
58
|
+
* <Field label="Email" type="email" />
|
|
59
|
+
* ```
|
|
19
60
|
*/
|
|
20
61
|
export interface FieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
21
62
|
/**
|
|
22
|
-
* Input label text
|
|
63
|
+
* Input label text displayed above the input.
|
|
64
|
+
* Required for accessibility unless aria-label is provided.
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* ```tsx
|
|
68
|
+
* <Field label="Email Address" type="email" />
|
|
69
|
+
* ```
|
|
23
70
|
*/
|
|
24
71
|
label?: string;
|
|
25
72
|
/**
|
|
26
|
-
* Error message
|
|
73
|
+
* Error message - shows error state and displays message below input.
|
|
74
|
+
* Takes precedence over helperText when both are provided.
|
|
75
|
+
* Automatically associated with input via aria-describedby.
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* ```tsx
|
|
79
|
+
* <Field
|
|
80
|
+
* label="Email"
|
|
81
|
+
* type="email"
|
|
82
|
+
* error="Please enter a valid email address"
|
|
83
|
+
* />
|
|
84
|
+
* ```
|
|
27
85
|
*/
|
|
28
86
|
error?: string;
|
|
29
87
|
/**
|
|
30
|
-
* Helper text
|
|
88
|
+
* Helper text displayed below input (when no error).
|
|
89
|
+
* Provides additional context or instructions.
|
|
90
|
+
*
|
|
91
|
+
* @example
|
|
92
|
+
* ```tsx
|
|
93
|
+
* <Field
|
|
94
|
+
* label="Password"
|
|
95
|
+
* type="password"
|
|
96
|
+
* helperText="Must be at least 8 characters"
|
|
97
|
+
* />
|
|
98
|
+
* ```
|
|
31
99
|
*/
|
|
32
100
|
helperText?: string;
|
|
33
101
|
/**
|
|
34
|
-
* Icon to display on the left
|
|
102
|
+
* Icon to display on the left side of input.
|
|
103
|
+
* Use 18px icons (size={18}) for best results.
|
|
104
|
+
*
|
|
105
|
+
* @example
|
|
106
|
+
* ```tsx
|
|
107
|
+
* import { Mail } from 'lucide-react';
|
|
108
|
+
* <Field leftIcon={<Mail size={18} />} label="Email" type="email" />
|
|
109
|
+
* ```
|
|
35
110
|
*/
|
|
36
111
|
leftIcon?: ReactNode;
|
|
37
112
|
/**
|
|
38
|
-
* Icon to display on the right
|
|
113
|
+
* Icon to display on the right side of input.
|
|
114
|
+
* Can be an icon or interactive element (e.g., password toggle).
|
|
115
|
+
*
|
|
116
|
+
* @example
|
|
117
|
+
* ```tsx
|
|
118
|
+
* import { Eye, EyeOff } from 'lucide-react';
|
|
119
|
+
*
|
|
120
|
+
* <Field
|
|
121
|
+
* label="Password"
|
|
122
|
+
* type={showPassword ? 'text' : 'password'}
|
|
123
|
+
* rightIcon={
|
|
124
|
+
* <button onClick={() => setShowPassword(!showPassword)}>
|
|
125
|
+
* {showPassword ? <EyeOff size={18} /> : <Eye size={18} />}
|
|
126
|
+
* </button>
|
|
127
|
+
* }
|
|
128
|
+
* />
|
|
129
|
+
* ```
|
|
39
130
|
*/
|
|
40
131
|
rightIcon?: ReactNode;
|
|
41
132
|
/**
|
|
42
|
-
* Full width input
|
|
133
|
+
* Full width input - expands to fill container.
|
|
134
|
+
*
|
|
135
|
+
* @example
|
|
136
|
+
* ```tsx
|
|
137
|
+
* <form style={{ maxWidth: '400px' }}>
|
|
138
|
+
* <Field label="Name" fullWidth />
|
|
139
|
+
* <Field label="Email" type="email" fullWidth />
|
|
140
|
+
* </form>
|
|
141
|
+
* ```
|
|
142
|
+
*
|
|
43
143
|
* @default false
|
|
44
144
|
*/
|
|
45
145
|
fullWidth?: boolean;
|
|
46
146
|
/**
|
|
47
|
-
* Input size
|
|
147
|
+
* Input size variant.
|
|
148
|
+
*
|
|
149
|
+
* @semanticGuide
|
|
150
|
+
* - `sm`: Dense UIs, tables, compact forms
|
|
151
|
+
* - `md`: Default - most forms (recommended)
|
|
152
|
+
* - `lg`: Prominent forms, search inputs
|
|
153
|
+
*
|
|
48
154
|
* @default 'md'
|
|
49
155
|
*/
|
|
50
156
|
size?: 'sm' | 'md' | 'lg';
|
|
51
157
|
/**
|
|
52
|
-
*
|
|
158
|
+
* Shows "(optional)" indicator next to label.
|
|
159
|
+
* Use when most fields are required but some are optional.
|
|
160
|
+
*
|
|
161
|
+
* @example
|
|
162
|
+
* ```tsx
|
|
163
|
+
* <Field label="Phone Number" type="tel" optional />
|
|
164
|
+
* ```
|
|
165
|
+
*
|
|
53
166
|
* @default false
|
|
54
167
|
*/
|
|
55
168
|
optional?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Field.types.d.ts","sourceRoot":"","sources":["../../../src/components/Field/Field.types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"Field.types.d.ts","sourceRoot":"","sources":["../../../src/components/Field/Field.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACrF;;;;;;;;OAQG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;;;;;;;;;;OAaG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;;;;;;;;;OAYG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;;;;;;;;;;;;;;;;;OAkBG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB;;;;;;;;;;;;OAYG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;;;;;;OASG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAE1B;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
* Provides global theme and brand state to all components.
|
|
5
5
|
* This ensures consistent theming across the entire application.
|
|
6
6
|
*
|
|
7
|
+
* Fonts are loaded automatically by default. No need to add <FontLoader /> manually.
|
|
8
|
+
*
|
|
7
9
|
* @example
|
|
8
10
|
* ```tsx
|
|
9
11
|
* // App.tsx
|
|
@@ -24,6 +26,11 @@
|
|
|
24
26
|
* const { theme, brand } = useTheme();
|
|
25
27
|
* return <div>Current: {theme} / {brand}</div>;
|
|
26
28
|
* }
|
|
29
|
+
*
|
|
30
|
+
* // To disable automatic font loading:
|
|
31
|
+
* <ThemeProvider disableAutoFontLoading>
|
|
32
|
+
* <YourComponents />
|
|
33
|
+
* </ThemeProvider>
|
|
27
34
|
* ```
|
|
28
35
|
*/
|
|
29
36
|
import { ReactNode } from 'react';
|
|
@@ -45,6 +52,13 @@ export interface ThemeProviderProps {
|
|
|
45
52
|
* @default false
|
|
46
53
|
*/
|
|
47
54
|
disableFontWarnings?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Disable automatic font loading via FontLoader
|
|
57
|
+
* When false (default), fonts are loaded automatically.
|
|
58
|
+
* Set to true if you want to manage font loading manually.
|
|
59
|
+
* @default false
|
|
60
|
+
*/
|
|
61
|
+
disableAutoFontLoading?: boolean;
|
|
48
62
|
}
|
|
49
63
|
/**
|
|
50
64
|
* ThemeProvider Component
|
|
@@ -52,7 +66,7 @@ export interface ThemeProviderProps {
|
|
|
52
66
|
* Wraps your application to provide global theme and brand state.
|
|
53
67
|
* Must be placed near the root of your application.
|
|
54
68
|
*/
|
|
55
|
-
export declare function ThemeProvider({ children, options, disableFontWarnings }: ThemeProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
69
|
+
export declare function ThemeProvider({ children, options, disableFontWarnings, disableAutoFontLoading, }: ThemeProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
56
70
|
/**
|
|
57
71
|
* Hook to access global theme state
|
|
58
72
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeContext.d.ts","sourceRoot":"","sources":["../../src/contexts/ThemeContext.tsx"],"names":[],"mappings":"AAAA
|
|
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;AAS9F;;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;CAClC;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,OAAO,EACP,mBAA2B,EAC3B,sBAA8B,GAC/B,EAAE,kBAAkB,2CAoDpB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,eAAe,IAAI,cAAc,CAmBhD"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Landing Page Example
|
|
3
|
+
*
|
|
4
|
+
* A complete, copy-paste ready landing page using @orion/react sections.
|
|
5
|
+
* This example demonstrates the recommended structure and composition
|
|
6
|
+
* of Orion sections for building marketing pages.
|
|
7
|
+
*
|
|
8
|
+
* @example Usage
|
|
9
|
+
* ```tsx
|
|
10
|
+
* // In your app
|
|
11
|
+
* import { LandingPageExample } from '@orion/react/examples';
|
|
12
|
+
*
|
|
13
|
+
* function App() {
|
|
14
|
+
* return <LandingPageExample />;
|
|
15
|
+
* }
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* @module examples
|
|
19
|
+
*/
|
|
20
|
+
import React from 'react';
|
|
21
|
+
/**
|
|
22
|
+
* Complete Landing Page Example
|
|
23
|
+
*
|
|
24
|
+
* This component demonstrates the recommended structure for building
|
|
25
|
+
* landing pages with @orion/react sections. Copy and customize for your needs.
|
|
26
|
+
*
|
|
27
|
+
* @remarks
|
|
28
|
+
* IMPORTANT: In your actual app, you must import the CSS files at the root:
|
|
29
|
+
* ```tsx
|
|
30
|
+
* import '@orion/core/theme.css';
|
|
31
|
+
* import '@orion/react/dist/react.css';
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
export declare function LandingPageExample(): React.ReactElement;
|
|
35
|
+
export default LandingPageExample;
|
|
36
|
+
//# sourceMappingURL=LandingPage.example.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LandingPage.example.d.ts","sourceRoot":"","sources":["../../src/examples/LandingPage.example.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAoO1B;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,IAAI,KAAK,CAAC,YAAY,CAqJvD;AAED,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @orion/react Examples
|
|
3
|
+
*
|
|
4
|
+
* Complete, copy-paste ready examples demonstrating how to use
|
|
5
|
+
* Orion components and sections together.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```tsx
|
|
9
|
+
* import { LandingPageExample } from '@orion/react';
|
|
10
|
+
*
|
|
11
|
+
* // Use directly for testing
|
|
12
|
+
* function App() {
|
|
13
|
+
* return <LandingPageExample />;
|
|
14
|
+
* }
|
|
15
|
+
*
|
|
16
|
+
* // Or study the source code to build your own
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* @module examples
|
|
20
|
+
*/
|
|
21
|
+
export { LandingPageExample } from './LandingPage.example';
|
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/examples/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC"}
|