@lukeashford/aurelius 2.0.0 → 2.2.0

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/README.md CHANGED
@@ -56,7 +56,7 @@ while staying within design system constraints.
56
56
 
57
57
  ```bash
58
58
  npm install @lukeashford/aurelius
59
- npm install -D eslint eslint-plugin-tailwindcss
59
+ npm install -D eslint @typescript-eslint/parser eslint-plugin-better-tailwindcss @poupe/eslint-plugin-tailwindcss @eslint/css tailwind-csstree
60
60
  ```
61
61
 
62
62
  ### 2. Import the design system
@@ -78,40 +78,33 @@ Then import it in your entry file:
78
78
  import './index.css'
79
79
  ```
80
80
 
81
- ### 3. Configure ESLint
81
+ ### 3. Configure ESLint (simplest form)
82
82
 
83
- This enforces the design system agents and developers get errors when using arbitrary values or
84
- non-Aurelius classes.
83
+ Aurelius ships with a default ESLint config you can re-export in one line. It enforces design system
84
+ constraints — if ESLint complains, you're leaving the rails.
85
85
 
86
86
  ```javascript
87
- // eslint.config.js
88
- import tailwindcss from 'eslint-plugin-tailwindcss';
89
-
90
- export default [
91
- {
92
- plugins: {tailwindcss},
93
- rules: {
94
- 'tailwindcss/no-arbitrary-value': 'error',
95
- 'tailwindcss/no-custom-classname': 'error',
96
- },
97
- },
98
- ];
87
+ // eslint.config.mjs
88
+ export {default} from '@lukeashford/aurelius/eslint';
99
89
  ```
100
90
 
101
- <details>
102
- <summary>Legacy .eslintrc.js format</summary>
91
+ **Need a different CSS entry point?**
103
92
 
104
93
  ```javascript
105
- module.exports = {
106
- plugins: ['tailwindcss'],
107
- rules: {
108
- 'tailwindcss/no-arbitrary-value': 'error',
109
- 'tailwindcss/no-custom-classname': 'error',
110
- },
111
- }
94
+ // eslint.config.mjs
95
+ import {createAureliusESLintConfig} from '@lukeashford/aurelius/eslint';
96
+
97
+ export default createAureliusESLintConfig({
98
+ entryPoint: './app/styles.css'
99
+ });
112
100
  ```
113
101
 
114
- </details>
102
+ **What this enforces:**
103
+
104
+ - **JS/TS/JSX/TSX files:** No custom/non-Aurelius class names, no arbitrary value utilities like
105
+ `bg-[#123456]` or `text-[15px]`
106
+ - **CSS files:** Tailwind v4 CSS best practices, valid `@apply` directives, no arbitrary value
107
+ overuse, and proper theme token usage
115
108
 
116
109
  ### 4. Update package.json scripts
117
110
 
package/dist/index.d.mts CHANGED
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { Config } from 'dompurify';
2
3
 
3
4
  type ButtonVariant = 'primary' | 'important' | 'elevated' | 'outlined' | 'featured' | 'ghost' | 'danger';
4
5
  type ButtonSize = 'sm' | 'md' | 'lg' | 'xl';
@@ -18,8 +19,12 @@ declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttri
18
19
 
19
20
  type CardVariant = 'default' | 'elevated' | 'outlined' | 'ghost' | 'featured';
20
21
  interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
22
+ /** Visual style variant */
21
23
  variant?: CardVariant;
24
+ /** Enables hover effects and cursor pointer */
22
25
  interactive?: boolean;
26
+ /** Shows selected state with checkmark */
27
+ selected?: boolean;
23
28
  }
24
29
  declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>>;
25
30
 
@@ -124,6 +129,81 @@ declare const Modal: {
124
129
  displayName: string;
125
130
  };
126
131
 
132
+ type StepStatus = 'complete' | 'error';
133
+ interface Step {
134
+ id: string | number;
135
+ label: string;
136
+ }
137
+ interface StepperProps extends React.HTMLAttributes<HTMLDivElement> {
138
+ steps: Step[];
139
+ currentStep: string | number;
140
+ status?: StepStatus;
141
+ }
142
+ declare const Stepper: React.ForwardRefExoticComponent<StepperProps & React.RefAttributes<HTMLDivElement>>;
143
+
144
+ type MessageVariant = 'user' | 'assistant';
145
+ interface MessageProps extends React.HTMLAttributes<HTMLDivElement> {
146
+ variant?: MessageVariant;
147
+ content: string;
148
+ isStreaming?: boolean;
149
+ }
150
+ declare const Message: React.ForwardRefExoticComponent<MessageProps & React.RefAttributes<HTMLDivElement>>;
151
+
152
+ interface ChatHistoryItem extends Omit<MessageProps, 'variant' | 'children'> {
153
+ id?: string;
154
+ variant?: MessageVariant;
155
+ }
156
+ interface ChatHistoryProps extends React.HTMLAttributes<HTMLDivElement> {
157
+ messages: ChatHistoryItem[];
158
+ }
159
+ declare const ChatHistory: React.ForwardRefExoticComponent<ChatHistoryProps & React.RefAttributes<HTMLDivElement>>;
160
+
161
+ interface StreamingCursorProps extends React.HTMLAttributes<HTMLSpanElement> {
162
+ variant?: 'block' | 'line' | 'underscore';
163
+ }
164
+ declare const StreamingCursor: React.ForwardRefExoticComponent<StreamingCursorProps & React.RefAttributes<HTMLSpanElement>>;
165
+
166
+ interface MarkdownContentProps extends React.HTMLAttributes<HTMLDivElement> {
167
+ content: string;
168
+ sanitizeConfig?: Config;
169
+ }
170
+ declare const MarkdownContent: React.ForwardRefExoticComponent<MarkdownContentProps & React.RefAttributes<HTMLDivElement>>;
171
+
172
+ type BrandIconSize = 'sm' | 'md' | 'lg';
173
+ type BrandIconVariant = 'solid' | 'outline';
174
+ interface BrandIconProps extends React.HTMLAttributes<HTMLDivElement> {
175
+ size?: BrandIconSize;
176
+ variant?: BrandIconVariant;
177
+ }
178
+ declare const BrandIcon: React.ForwardRefExoticComponent<BrandIconProps & React.RefAttributes<HTMLDivElement>>;
179
+
180
+ interface ColorSwatchProps extends React.HTMLAttributes<HTMLDivElement> {
181
+ color: string;
182
+ label?: string;
183
+ }
184
+ declare const ColorSwatch: React.ForwardRefExoticComponent<ColorSwatchProps & React.RefAttributes<HTMLDivElement>>;
185
+
186
+ type AspectRatioPreset = 'landscape' | 'portrait' | 'square';
187
+ type AspectRatio = AspectRatioPreset | `${number}/${number}`;
188
+ interface ImageCardProps extends Omit<CardProps, 'title'> {
189
+ src: string;
190
+ alt: string;
191
+ title?: React.ReactNode;
192
+ subtitle?: React.ReactNode;
193
+ aspectRatio?: AspectRatio;
194
+ objectFit?: 'cover' | 'contain';
195
+ overlay?: React.ReactNode;
196
+ mediaClassName?: string;
197
+ contentClassName?: string;
198
+ }
199
+ declare const ImageCard: React.ForwardRefExoticComponent<ImageCardProps & React.RefAttributes<HTMLDivElement>>;
200
+
201
+ type SectionHeadingLevel = 'h2' | 'h3';
202
+ interface SectionHeadingProps extends React.HTMLAttributes<HTMLHeadingElement> {
203
+ level?: SectionHeadingLevel;
204
+ }
205
+ declare const SectionHeading: React.ForwardRefExoticComponent<SectionHeadingProps & React.RefAttributes<HTMLHeadingElement>>;
206
+
127
207
  /**
128
208
  * Aurelius Design System
129
209
  *
@@ -136,4 +216,4 @@ declare const Modal: {
136
216
 
137
217
  declare const version = "2.0.0";
138
218
 
139
- export { Alert, type AlertProps, type AlertVariant, Avatar, type AvatarProps, type AvatarSize, Badge, type BadgeProps, type BadgeVariant, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Card, type CardProps, type CardVariant, Checkbox, type CheckboxProps, HelperText, type HelperTextProps, Input, type InputProps, Label, type LabelProps, Modal, type ModalProps, Radio, type RadioProps, Select, type SelectOption, type SelectProps, Skeleton, type SkeletonProps, Spinner, type SpinnerProps, Switch, type SwitchProps, Textarea, type TextareaProps, Tooltip, type TooltipProps, version };
219
+ export { Alert, type AlertProps, type AlertVariant, type AspectRatio, type AspectRatioPreset, Avatar, type AvatarProps, type AvatarSize, Badge, type BadgeProps, type BadgeVariant, BrandIcon, type BrandIconProps, type BrandIconSize, type BrandIconVariant, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Card, type CardProps, type CardVariant, ChatHistory, type ChatHistoryItem, type ChatHistoryProps, Checkbox, type CheckboxProps, ColorSwatch, type ColorSwatchProps, HelperText, type HelperTextProps, ImageCard, type ImageCardProps, Input, type InputProps, Label, type LabelProps, MarkdownContent, type MarkdownContentProps, Message, type MessageProps, type MessageVariant, Modal, type ModalProps, Radio, type RadioProps, SectionHeading, type SectionHeadingLevel, type SectionHeadingProps, Select, type SelectOption, type SelectProps, Skeleton, type SkeletonProps, Spinner, type SpinnerProps, type Step, type StepStatus, Stepper, type StepperProps, StreamingCursor, type StreamingCursorProps, Switch, type SwitchProps, Textarea, type TextareaProps, Tooltip, type TooltipProps, version };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { Config } from 'dompurify';
2
3
 
3
4
  type ButtonVariant = 'primary' | 'important' | 'elevated' | 'outlined' | 'featured' | 'ghost' | 'danger';
4
5
  type ButtonSize = 'sm' | 'md' | 'lg' | 'xl';
@@ -18,8 +19,12 @@ declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttri
18
19
 
19
20
  type CardVariant = 'default' | 'elevated' | 'outlined' | 'ghost' | 'featured';
20
21
  interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
22
+ /** Visual style variant */
21
23
  variant?: CardVariant;
24
+ /** Enables hover effects and cursor pointer */
22
25
  interactive?: boolean;
26
+ /** Shows selected state with checkmark */
27
+ selected?: boolean;
23
28
  }
24
29
  declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>>;
25
30
 
@@ -124,6 +129,81 @@ declare const Modal: {
124
129
  displayName: string;
125
130
  };
126
131
 
132
+ type StepStatus = 'complete' | 'error';
133
+ interface Step {
134
+ id: string | number;
135
+ label: string;
136
+ }
137
+ interface StepperProps extends React.HTMLAttributes<HTMLDivElement> {
138
+ steps: Step[];
139
+ currentStep: string | number;
140
+ status?: StepStatus;
141
+ }
142
+ declare const Stepper: React.ForwardRefExoticComponent<StepperProps & React.RefAttributes<HTMLDivElement>>;
143
+
144
+ type MessageVariant = 'user' | 'assistant';
145
+ interface MessageProps extends React.HTMLAttributes<HTMLDivElement> {
146
+ variant?: MessageVariant;
147
+ content: string;
148
+ isStreaming?: boolean;
149
+ }
150
+ declare const Message: React.ForwardRefExoticComponent<MessageProps & React.RefAttributes<HTMLDivElement>>;
151
+
152
+ interface ChatHistoryItem extends Omit<MessageProps, 'variant' | 'children'> {
153
+ id?: string;
154
+ variant?: MessageVariant;
155
+ }
156
+ interface ChatHistoryProps extends React.HTMLAttributes<HTMLDivElement> {
157
+ messages: ChatHistoryItem[];
158
+ }
159
+ declare const ChatHistory: React.ForwardRefExoticComponent<ChatHistoryProps & React.RefAttributes<HTMLDivElement>>;
160
+
161
+ interface StreamingCursorProps extends React.HTMLAttributes<HTMLSpanElement> {
162
+ variant?: 'block' | 'line' | 'underscore';
163
+ }
164
+ declare const StreamingCursor: React.ForwardRefExoticComponent<StreamingCursorProps & React.RefAttributes<HTMLSpanElement>>;
165
+
166
+ interface MarkdownContentProps extends React.HTMLAttributes<HTMLDivElement> {
167
+ content: string;
168
+ sanitizeConfig?: Config;
169
+ }
170
+ declare const MarkdownContent: React.ForwardRefExoticComponent<MarkdownContentProps & React.RefAttributes<HTMLDivElement>>;
171
+
172
+ type BrandIconSize = 'sm' | 'md' | 'lg';
173
+ type BrandIconVariant = 'solid' | 'outline';
174
+ interface BrandIconProps extends React.HTMLAttributes<HTMLDivElement> {
175
+ size?: BrandIconSize;
176
+ variant?: BrandIconVariant;
177
+ }
178
+ declare const BrandIcon: React.ForwardRefExoticComponent<BrandIconProps & React.RefAttributes<HTMLDivElement>>;
179
+
180
+ interface ColorSwatchProps extends React.HTMLAttributes<HTMLDivElement> {
181
+ color: string;
182
+ label?: string;
183
+ }
184
+ declare const ColorSwatch: React.ForwardRefExoticComponent<ColorSwatchProps & React.RefAttributes<HTMLDivElement>>;
185
+
186
+ type AspectRatioPreset = 'landscape' | 'portrait' | 'square';
187
+ type AspectRatio = AspectRatioPreset | `${number}/${number}`;
188
+ interface ImageCardProps extends Omit<CardProps, 'title'> {
189
+ src: string;
190
+ alt: string;
191
+ title?: React.ReactNode;
192
+ subtitle?: React.ReactNode;
193
+ aspectRatio?: AspectRatio;
194
+ objectFit?: 'cover' | 'contain';
195
+ overlay?: React.ReactNode;
196
+ mediaClassName?: string;
197
+ contentClassName?: string;
198
+ }
199
+ declare const ImageCard: React.ForwardRefExoticComponent<ImageCardProps & React.RefAttributes<HTMLDivElement>>;
200
+
201
+ type SectionHeadingLevel = 'h2' | 'h3';
202
+ interface SectionHeadingProps extends React.HTMLAttributes<HTMLHeadingElement> {
203
+ level?: SectionHeadingLevel;
204
+ }
205
+ declare const SectionHeading: React.ForwardRefExoticComponent<SectionHeadingProps & React.RefAttributes<HTMLHeadingElement>>;
206
+
127
207
  /**
128
208
  * Aurelius Design System
129
209
  *
@@ -136,4 +216,4 @@ declare const Modal: {
136
216
 
137
217
  declare const version = "2.0.0";
138
218
 
139
- export { Alert, type AlertProps, type AlertVariant, Avatar, type AvatarProps, type AvatarSize, Badge, type BadgeProps, type BadgeVariant, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Card, type CardProps, type CardVariant, Checkbox, type CheckboxProps, HelperText, type HelperTextProps, Input, type InputProps, Label, type LabelProps, Modal, type ModalProps, Radio, type RadioProps, Select, type SelectOption, type SelectProps, Skeleton, type SkeletonProps, Spinner, type SpinnerProps, Switch, type SwitchProps, Textarea, type TextareaProps, Tooltip, type TooltipProps, version };
219
+ export { Alert, type AlertProps, type AlertVariant, type AspectRatio, type AspectRatioPreset, Avatar, type AvatarProps, type AvatarSize, Badge, type BadgeProps, type BadgeVariant, BrandIcon, type BrandIconProps, type BrandIconSize, type BrandIconVariant, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Card, type CardProps, type CardVariant, ChatHistory, type ChatHistoryItem, type ChatHistoryProps, Checkbox, type CheckboxProps, ColorSwatch, type ColorSwatchProps, HelperText, type HelperTextProps, ImageCard, type ImageCardProps, Input, type InputProps, Label, type LabelProps, MarkdownContent, type MarkdownContentProps, Message, type MessageProps, type MessageVariant, Modal, type ModalProps, Radio, type RadioProps, SectionHeading, type SectionHeadingLevel, type SectionHeadingProps, Select, type SelectOption, type SelectProps, Skeleton, type SkeletonProps, Spinner, type SpinnerProps, type Step, type StepStatus, Stepper, type StepperProps, StreamingCursor, type StreamingCursorProps, Switch, type SwitchProps, Textarea, type TextareaProps, Tooltip, type TooltipProps, version };