@landtrustinc/design-system 1.2.3 → 1.2.5-beta.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
@@ -4,6 +4,41 @@ Design system components for LandTrust applications.
4
4
 
5
5
  [Storybook](https://662e7f123091ccbb08e021fe-lpduyfvtud.chromatic.com)
6
6
 
7
+ ## 📦 Installation
8
+
9
+ ```bash
10
+ npm install @landtrustinc/design-system react-loading-skeleton
11
+ ```
12
+
13
+ ## 🚀 Setup
14
+
15
+ ### Required CSS Imports
16
+
17
+ ⚠️ **Important:** You must import the following CSS files in your app's entry point (e.g., `_app.js` or `_app.tsx` for Next.js):
18
+
19
+ ```tsx
20
+ // pages/_app.tsx (Next.js) or main entry file
21
+ import '@landtrustinc/design-system/dist/variables.css';
22
+ import 'react-loading-skeleton/dist/skeleton.css';
23
+ ```
24
+
25
+ **Why?**
26
+
27
+ - The design system uses `react-loading-skeleton` for loading states in some components
28
+ - Next.js and other frameworks require global CSS to be imported in the app entry point, not from npm packages
29
+ - This prevents build errors and ensures proper styling
30
+
31
+ ### Next.js Configuration
32
+
33
+ If you're using Next.js, make sure these imports are at the top of your `pages/_app.tsx` or `pages/_app.js`:
34
+
35
+ ```tsx
36
+ import 'react-loading-skeleton/dist/skeleton.css';
37
+ import '@landtrustinc/design-system/dist/variables.css';
38
+
39
+ // ... rest of your imports
40
+ ```
41
+
7
42
  ## 📖 Usage
8
43
 
9
44
  ```tsx
@@ -19,7 +54,7 @@ function App() {
19
54
  }
20
55
  ```
21
56
 
22
- ## Styling
57
+ ## 🎨 Styling
23
58
 
24
59
  Following Figma styles try to use tokens from variables.css. Avoid using colors from the theme (these are legacy).
25
60
 
package/dist/index.d.ts CHANGED
@@ -24,6 +24,7 @@ declare const media: {
24
24
  lg: string;
25
25
  xl: string;
26
26
  };
27
+ declare const breakpoints: string[];
27
28
  declare const colors: {
28
29
  gray: {
29
30
  100: string;
@@ -269,6 +270,7 @@ declare const ThemeTokens: {
269
270
  lg: string;
270
271
  xl: string;
271
272
  };
273
+ breakpoints: string[];
272
274
  colors: {
273
275
  gray: {
274
276
  100: string;
@@ -506,6 +508,7 @@ declare const ThemeTokens: {
506
508
  declare const styles_ThemeTokens: typeof ThemeTokens;
507
509
  declare const styles_borderRadius: typeof borderRadius;
508
510
  declare const styles_boxShadow: typeof boxShadow;
511
+ declare const styles_breakpoints: typeof breakpoints;
509
512
  declare const styles_colors: typeof colors;
510
513
  declare const styles_fontSizes: typeof fontSizes;
511
514
  declare const styles_fontWeights: typeof fontWeights;
@@ -521,7 +524,7 @@ declare const styles_textShadow: typeof textShadow;
521
524
  declare const styles_transition: typeof transition;
522
525
  declare const styles_zIndex: typeof zIndex;
523
526
  declare namespace styles {
524
- export { styles_ThemeTokens as ThemeTokens, styles_borderRadius as borderRadius, styles_boxShadow as boxShadow, styles_colors as colors, styles_fontSizes as fontSizes, styles_fontWeights as fontWeights, styles_fonts as fonts, styles_headingSizes as headingSizes, styles_lineHeights as lineHeights, styles_media as media, styles_opacity as opacity, styles_screens as screens, styles_sizes as sizes, styles_space as space, styles_textShadow as textShadow, styles_transition as transition, styles_zIndex as zIndex };
527
+ export { styles_ThemeTokens as ThemeTokens, styles_borderRadius as borderRadius, styles_boxShadow as boxShadow, styles_breakpoints as breakpoints, styles_colors as colors, styles_fontSizes as fontSizes, styles_fontWeights as fontWeights, styles_fonts as fonts, styles_headingSizes as headingSizes, styles_lineHeights as lineHeights, styles_media as media, styles_opacity as opacity, styles_screens as screens, styles_sizes as sizes, styles_space as space, styles_textShadow as textShadow, styles_transition as transition, styles_zIndex as zIndex };
525
528
  }
526
529
 
527
530
  type TopMatchingFieldNoteProps = {
@@ -1274,6 +1277,11 @@ type ChatWidgetProps = {
1274
1277
  * Whether to show thinking indicator
1275
1278
  */
1276
1279
  isThinking?: boolean;
1280
+ /**
1281
+ * Text to display in thinking state
1282
+ * @default "Thinking..."
1283
+ */
1284
+ thinkingText?: string;
1277
1285
  /**
1278
1286
  * Messages to show when chat is empty
1279
1287
  */
@@ -1295,8 +1303,12 @@ type ChatWidgetProps = {
1295
1303
  * @default "Other Helpful Topics"
1296
1304
  */
1297
1305
  suggestedPromptsTitle?: string;
1306
+ /**
1307
+ * Number to display in notification badge on trigger button
1308
+ */
1309
+ notificationCount?: number;
1298
1310
  };
1299
- declare const ChatWidget: ({ title, messages, onSubmit, placeholder, disabled, className, ariaLabel, panelWidth, expanded, defaultExpanded, onExpandedChange, isThinking, emptyState, containerProps, suggestedPrompts, onPromptClick, suggestedPromptsTitle, }: ChatWidgetProps) => _emotion_react_jsx_runtime.JSX.Element;
1311
+ declare const ChatWidget: ({ title, messages, onSubmit, placeholder, disabled, className, ariaLabel, panelWidth, expanded, defaultExpanded, onExpandedChange, isThinking, thinkingText, emptyState, containerProps, suggestedPrompts, onPromptClick, suggestedPromptsTitle, notificationCount, }: ChatWidgetProps) => _emotion_react_jsx_runtime.JSX.Element;
1300
1312
 
1301
1313
  type DividerProps = React__default.HTMLAttributes<HTMLHRElement> & SpaceProps & {
1302
1314
  /**
@@ -1327,6 +1339,10 @@ type FeatureListItemProps = {
1327
1339
  * Optional subtitle/description text
1328
1340
  */
1329
1341
  subtitle?: React__default.ReactNode;
1342
+ /**
1343
+ * Loading state - shows skeleton when true
1344
+ */
1345
+ isLoading?: boolean;
1330
1346
  /**
1331
1347
  * Additional CSS class names
1332
1348
  */