@deepgram/styles 0.0.3 → 0.0.5

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
@@ -62,6 +62,105 @@ To customize and build the styles yourself:
62
62
  @import "@deepgram/styles/source";
63
63
  ```
64
64
 
65
+ ## Configuration
66
+
67
+ ### Base Font Size
68
+
69
+ The entire design system is based on `rem` units, which scale relative to the root font size. By default, the base font size is set to `16px`. You can customize this by setting the CSS variable `--dg-base-font-size` in your application:
70
+
71
+ ```css
72
+ :root {
73
+ --dg-base-font-size: 18px; /* Increase base size to 18px */
74
+ }
75
+ ```
76
+
77
+ Or target a specific element:
78
+
79
+ ```css
80
+ .my-app {
81
+ --dg-base-font-size: 14px; /* Decrease base size to 14px */
82
+ }
83
+ ```
84
+
85
+ This approach allows for:
86
+
87
+ - **Accessibility**: Users can adjust font sizes in their browser, and all components scale proportionally
88
+ - **Responsive Design**: Change the base font size at different breakpoints for better mobile/desktop experiences
89
+ - **Consistency**: All spacing, sizing, and typography scale together
90
+
91
+ Example for responsive font sizing:
92
+
93
+ ```css
94
+ :root {
95
+ --dg-base-font-size: 14px; /* Smaller on mobile */
96
+ }
97
+
98
+ @media (min-width: 768px) {
99
+ :root {
100
+ --dg-base-font-size: 16px; /* Standard on desktop */
101
+ }
102
+ }
103
+ ```
104
+
105
+ **Note**: The CSS variable defines the base font size, but all measurements internally use `rem` units, ensuring everything scales proportionally when you change this value.
106
+
107
+ ### Brand Colors
108
+
109
+ The design system uses two primary brand colors that can be customized by setting CSS variables `--dg-primary` and `--dg-secondary` in your application. The gradient borders and glow effects automatically derive from these colors, so you only need to set two variables:
110
+
111
+ ```css
112
+ :root {
113
+ --dg-primary: #ff6b35; /* Custom orange */
114
+ --dg-secondary: #4ecdc4; /* Custom teal */
115
+ }
116
+ ```
117
+
118
+ Or target a specific element:
119
+
120
+ ```css
121
+ .my-custom-section {
122
+ --dg-primary: #9b59b6; /* Custom purple */
123
+ --dg-secondary: #3498db; /* Custom blue */
124
+ }
125
+ ```
126
+
127
+ This allows you to:
128
+
129
+ - **Brand Consistency**: Easily apply your brand colors across all Deepgram components
130
+ - **Theme Variations**: Create different themes or color schemes for different sections
131
+ - **Quick Customization**: Override brand colors without rebuilding or forking the library
132
+ - **Automatic Gradients**: Gradient borders and glow effects automatically use your custom colors
133
+
134
+ Example for multiple themes:
135
+
136
+ ```css
137
+ /* Default Deepgram theme */
138
+ :root {
139
+ --dg-primary: #13ef95; /* Deepgram green */
140
+ --dg-secondary: #149afb; /* Deepgram blue */
141
+ }
142
+
143
+ /* Purple theme - gradient will be blue to purple */
144
+ .theme-purple {
145
+ --dg-primary: #a855f7; /* Purple */
146
+ --dg-secondary: #ec4899; /* Pink */
147
+ }
148
+
149
+ /* Ocean theme - gradient will be teal to cyan */
150
+ .theme-ocean {
151
+ --dg-primary: #16a085; /* Teal */
152
+ --dg-secondary: #3498db; /* Ocean Blue */
153
+ }
154
+
155
+ /* Sunset theme - gradient will be orange to golden */
156
+ .theme-sunset {
157
+ --dg-primary: #ff6b35; /* Orange */
158
+ --dg-secondary: #f7931e; /* Golden */
159
+ }
160
+ ```
161
+
162
+ **Note**: These colors are used throughout the component library for buttons, links, highlights, gradient borders (secondary → primary), glow effects, and other interactive elements. The primary button's gradient border animates from `--dg-secondary` to `--dg-primary`, creating a cohesive brand experience.
163
+
65
164
  ## Available Components
66
165
 
67
166
  The library provides a comprehensive set of Tailwind-based components following BEM methodology:
@@ -85,9 +184,9 @@ The library provides a comprehensive set of Tailwind-based components following
85
184
  - `.dg-card--bordered` - Card with enhanced border
86
185
  - `.dg-card--structured` - Card optimized for image/header/body/footer layout
87
186
  - `.dg-card__image` - Card image container
88
- - `.dg-card__image--small` - 120px height
89
- - `.dg-card__image--medium` - 160px height
90
- - `.dg-card__image--large` - 240px height
187
+ - `.dg-card__image--small` - Small height (7.5rem)
188
+ - `.dg-card__image--medium` - Medium height (10rem)
189
+ - `.dg-card__image--large` - Large height (15rem)
91
190
  - `.dg-card__image--aspect-4-3` - Responsive 4:3 aspect ratio
92
191
  - `.dg-card__icon` - Card icon container (for Font Awesome icons)
93
192
  - `.dg-card__icon--left` - Left-aligned icon (default)
@@ -106,11 +205,27 @@ The library provides a comprehensive set of Tailwind-based components following
106
205
  - `.dg-section--bordered` - Section with border and background
107
206
  - `.dg-section--elevated` - Section with shadow
108
207
  - `.dg-section--fieldset` - Fieldset-style section with legend
109
- - `.dg-constrain-width` - Constrained width container (960px max)
208
+ - `.dg-constrain-width` - Constrained width container (60rem max)
110
209
  - `.dg-center-h` - Center content horizontally
111
210
  - `.dg-grid-mobile-stack` - Responsive grid that stacks on mobile
112
211
  - `.dg-action-group` - Action button group
113
212
 
213
+ #### Multi-Column Layouts
214
+
215
+ - `.dg-layout-three-column` - Full-height three-column layout with header
216
+ - `.dg-layout-three-column__header` - Fixed header section with dark theme
217
+ - `.dg-layout-three-column__header-container` - Header inner container (max-width constrained)
218
+ - `.dg-layout-three-column__header-logo` - Logo image in header
219
+ - `.dg-layout-three-column__header-actions` - Header action buttons container
220
+ - `.dg-layout-three-column__header-button` - Icon button in header
221
+ - `.dg-layout-three-column__header-profile` - Profile link wrapper
222
+ - `.dg-layout-three-column__header-avatar` - Profile avatar image
223
+ - `.dg-layout-three-column__main` - Main three-column container
224
+ - `.dg-layout-three-column__left-main-wrapper` - Wrapper for left sidebar and main content
225
+ - `.dg-layout-three-column__sidebar-left` - Left sidebar (256px on xl screens)
226
+ - `.dg-layout-three-column__content` - Main content area (flexible width)
227
+ - `.dg-layout-three-column__sidebar-right` - Right sidebar (384px on lg+ screens)
228
+
114
229
  ### Hero & Typography
115
230
 
116
231
  - `.dg-hero` - Hero section container
@@ -132,7 +247,7 @@ The library provides a comprehensive set of Tailwind-based components following
132
247
  - `.dg-input` - Base text input field
133
248
  - Focus state with primary color border
134
249
  - Disabled state with reduced opacity
135
- - `.dg-input--inline` - Input with minimum width (200px) for inline forms
250
+ - `.dg-input--inline` - Input with minimum width (12.5rem) for inline forms
136
251
  - `.dg-input--full` - Override for specific width control
137
252
  - `.dg-textarea` - Multi-line text input
138
253
  - `.dg-checkbox` - Custom styled checkbox
@@ -144,7 +259,7 @@ The library provides a comprehensive set of Tailwind-based components following
144
259
  - `.dg-checkbox-description` - Container for checkbox with description text
145
260
  - `.dg-checkbox-group` - Container for multiple checkboxes
146
261
  - `.dg-form-field` - Form field container (label + input + helper)
147
- - Full width on mobile, max-w-md (448px) on desktop
262
+ - Full width on mobile, max-w-md (28rem) on desktop
148
263
  - `.dg-form-field--full` - Override to make form field full width on all screens
149
264
  - `.dg-form-field--error` - Error validation state (cascades to children)
150
265
  - `.dg-form-field--success` - Success validation state (cascades to children)
@@ -365,6 +480,42 @@ Icon alignment options: `--left` (default), `--center`, `--right`
365
480
  </div>
366
481
  ```
367
482
 
483
+ ### Three-Column Layout
484
+
485
+ ```html
486
+ <div class="dg-layout-three-column">
487
+ <header class="dg-layout-three-column__header">
488
+ <div class="dg-layout-three-column__header-container">
489
+ <img src="logo.svg" alt="Company" class="dg-layout-three-column__header-logo" />
490
+ <div class="dg-layout-three-column__header-actions">
491
+ <button type="button" class="dg-layout-three-column__header-button">
492
+ <span class="dg-sr-only">Notifications</span>
493
+ <!-- Icon SVG -->
494
+ </button>
495
+ <a href="#" class="dg-layout-three-column__header-profile">
496
+ <span class="dg-sr-only">Profile</span>
497
+ <img src="avatar.jpg" alt="" class="dg-layout-three-column__header-avatar" />
498
+ </a>
499
+ </div>
500
+ </div>
501
+ </header>
502
+
503
+ <div class="dg-layout-three-column__main">
504
+ <div class="dg-layout-three-column__left-main-wrapper">
505
+ <div class="dg-layout-three-column__sidebar-left">
506
+ <!-- Left sidebar content (navigation, filters, etc.) -->
507
+ </div>
508
+ <div class="dg-layout-three-column__content">
509
+ <!-- Main content area -->
510
+ </div>
511
+ </div>
512
+ <div class="dg-layout-three-column__sidebar-right">
513
+ <!-- Right sidebar content (notifications, info, etc.) -->
514
+ </div>
515
+ </div>
516
+ </div>
517
+ ```
518
+
368
519
  ## Theme Colors
369
520
 
370
521
  The library includes Deepgram brand colors: