@deepgram/styles 0.0.1 → 0.0.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/README.md CHANGED
@@ -19,13 +19,13 @@ yarn add @deepgram/styles
19
19
  Import the pre-built, minified CSS in your application:
20
20
 
21
21
  ```javascript
22
- import '@deepgram/styles';
22
+ import "@deepgram/styles";
23
23
  ```
24
24
 
25
25
  Or in HTML:
26
26
 
27
27
  ```html
28
- <link rel="stylesheet" href="node_modules/@deepgram/styles/dist/deepgram.css">
28
+ <link rel="stylesheet" href="node_modules/@deepgram/styles/dist/deepgram.css" />
29
29
  ```
30
30
 
31
31
  ### Expanded CSS (Non-minified)
@@ -33,7 +33,7 @@ Or in HTML:
33
33
  For development or easier debugging:
34
34
 
35
35
  ```javascript
36
- import '@deepgram/styles/expanded';
36
+ import "@deepgram/styles/expanded";
37
37
  ```
38
38
 
39
39
  ### Using with Tailwind CSS
@@ -42,12 +42,12 @@ If you're using Tailwind CSS in your project, you can extend your configuration
42
42
 
43
43
  ```javascript
44
44
  // tailwind.config.js
45
- const deepgramConfig = require('@deepgram/styles/tailwind-config');
45
+ const deepgramConfig = require("@deepgram/styles/tailwind-config");
46
46
 
47
47
  module.exports = {
48
48
  presets: [deepgramConfig],
49
49
  content: [
50
- './src/**/*.{html,js,ts,jsx,tsx}',
50
+ "./src/**/*.{html,js,ts,jsx,tsx}",
51
51
  // your content paths
52
52
  ],
53
53
  // your customizations
@@ -59,70 +59,324 @@ module.exports = {
59
59
  To customize and build the styles yourself:
60
60
 
61
61
  ```css
62
- @import '@deepgram/styles/source';
62
+ @import "@deepgram/styles/source";
63
63
  ```
64
64
 
65
65
  ## Available Components
66
66
 
67
- The library provides a comprehensive set of Tailwind-based components:
67
+ The library provides a comprehensive set of Tailwind-based components following BEM methodology:
68
+
69
+ ### Buttons
70
+
71
+ - `.dg-btn` - Base button component
72
+ - `.dg-btn--primary` - Primary action button with gradient border
73
+ - `.dg-btn--secondary` - Secondary action button
74
+ - `.dg-btn--ghost` - Transparent button with border
75
+ - `.dg-btn--danger-ghost` - Destructive action button
76
+ - `.dg-btn--icon-only` - Icon-only button
77
+ - `.dg-btn--sm` - Small button variant
78
+ - `.dg-btn--collapse` - Responsive mobile-adaptive button
79
+
80
+ ### Cards
81
+
82
+ - `.dg-card` - Flexible card container
83
+ - `.dg-card--compact` - Card with reduced padding
84
+ - `.dg-card--spacious` - Card with increased padding
85
+ - `.dg-card--bordered` - Card with enhanced border
86
+ - `.dg-card--structured` - Card optimized for image/header/body/footer layout
87
+ - `.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
91
+ - `.dg-card__image--aspect-4-3` - Responsive 4:3 aspect ratio
92
+ - `.dg-card__icon` - Card icon container (for Font Awesome icons)
93
+ - `.dg-card__icon--left` - Left-aligned icon (default)
94
+ - `.dg-card__icon--center` - Center-aligned icon
95
+ - `.dg-card__icon--right` - Right-aligned icon
96
+ - `.dg-card__header` - Card header section
97
+ - `.dg-card__body` - Card body content section
98
+ - `.dg-card__footer` - Card footer actions section
99
+ - `.dg-card__footer--bordered` - Footer with top border
68
100
 
69
101
  ### Layout
70
- - `.dg-app-header` - Application header with navigation
71
- - `.dg-hero` - Hero section for main content
72
- - `.dg-two-column-layout` - Responsive two-column grid
73
- - `.dg-container` - Centered content container
74
- - `.dg-grid-{2,3,4}` - Responsive grid layouts
75
-
76
- ### Components
77
- - `.dg-panel` - Content panel with border
78
- - `.dg-panel-elevated` - Panel with shadow
79
- - `.dg-card` - Interactive card component
80
- - `.dg-selection-list` - Vertical selection list
81
- - `.dg-selection-item` - Selectable list item
82
- - `.dg-drop-zone` - File drop zone
83
- - `.dg-result-display` - Content display area
84
102
 
85
- ### Buttons
86
- - `.dg-button-primary` - Primary action button
87
- - `.dg-button-secondary` - Secondary action button
88
- - `.dg-button-outline` - Outline button
103
+ - `.dg-section` - Reusable content section
104
+ - `.dg-section--compact` - Section with reduced spacing
105
+ - `.dg-section--spacious` - Section with increased spacing
106
+ - `.dg-section--bordered` - Section with border and background
107
+ - `.dg-section--elevated` - Section with shadow
108
+ - `.dg-section--fieldset` - Fieldset-style section with legend
109
+ - `.dg-constrain-width` - Constrained width container (960px max)
110
+ - `.dg-center-h` - Center content horizontally
111
+ - `.dg-grid-mobile-stack` - Responsive grid that stacks on mobile
112
+ - `.dg-action-group` - Action button group
113
+
114
+ ### Hero & Typography
115
+
116
+ - `.dg-hero` - Hero section container
117
+ - `.dg-hero__content` - Hero content wrapper
118
+ - `.dg-hero__announcement` - Hero announcement banner
119
+ - `.dg-hero__body` - Hero body text
120
+ - `.dg-hero__actions` - Hero action buttons
121
+ - `.dg-hero-title` - Large gradient hero title
122
+ - `.dg-section-heading` - Section heading
123
+ - `.dg-card-heading` - Card heading
124
+ - `.dg-item-title` - Item title
125
+ - `.dg-prose` - Prose text with typography
126
+ - `.dg-prose--large` - Larger prose text
127
+ - `.dg-prose--small` - Smaller prose text
128
+ - `.dg-prose--block` - Full width prose
89
129
 
90
130
  ### Forms
91
- - `.dg-input` - Text input field
92
- - `.dg-textarea` - Multi-line text area
93
- - `.dg-select` - Select dropdown
94
- - `.dg-checkbox` - Checkbox input
131
+
132
+ - `.dg-input` - Base text input field
133
+ - Focus state with primary color border
134
+ - Disabled state with reduced opacity
135
+ - `.dg-input--inline` - Input with minimum width (200px) for inline forms
136
+ - `.dg-input--full` - Override for specific width control
137
+ - `.dg-textarea` - Multi-line text input
138
+ - `.dg-checkbox` - Custom styled checkbox
139
+ - Animated checkmark on selection
140
+ - Focus state for keyboard navigation
141
+ - `.dg-checkbox-label` - Checkbox label wrapper
142
+ - Hover states for better UX
143
+ - Supports inline links
144
+ - `.dg-checkbox-description` - Container for checkbox with description text
145
+ - `.dg-checkbox-group` - Container for multiple checkboxes
146
+ - `.dg-form-field` - Form field container (label + input + helper)
147
+ - Full width on mobile, max-w-md (448px) on desktop
148
+ - `.dg-form-field--full` - Override to make form field full width on all screens
149
+ - `.dg-form-field--error` - Error validation state (cascades to children)
150
+ - `.dg-form-field--success` - Success validation state (cascades to children)
151
+ - `.dg-form-label` - Form field label
152
+ - `.dg-form-helper` - Helper or validation message text
153
+ - `.dg-form-error` - **Deprecated:** Use `.dg-form-helper` with `.dg-form-field--error` instead
154
+ - `.dg-drag-drop-zone` - File upload drag-and-drop area
155
+ - Dashed border indicator
156
+ - Hover and drag-over states
157
+ - Icon, text, and hint sections
158
+
159
+ ### Code & Status
160
+
161
+ - `.dg-code-block` - Code block container
162
+ - `.dg-code-block--compact` - Compact code block
163
+ - `.dg-code-block--tall` - Tall code block
164
+ - `.dg-code-block--no-scroll` - Code block without scrolling
165
+ - `.dg-status` - Status message
166
+ - `.dg-status--info` - Info status
167
+ - `.dg-status--success` - Success status
168
+ - `.dg-status--warning` - Warning status
169
+ - `.dg-status--error` - Error status
170
+ - `.dg-status--primary` - Primary status
171
+ - `.dg-status--secondary` - Secondary status
172
+ - `.dg-spinner` - Loading spinner animation
173
+ - `.dg-modal-overlay` - Modal overlay backdrop
174
+ - `.dg-modal-content` - Modal content container
175
+
176
+ ### Newsletter Components
177
+
178
+ - `.dg-newsletter-container` - Newsletter container with standard spacing
179
+ - `.dg-newsletter-container--compact` - Newsletter container with compact spacing
180
+ - `.dg-newsletter-form` - Newsletter form with standard spacing
181
+ - `.dg-newsletter-form--compact` - Newsletter form with compact spacing
182
+ - `.dg-newsletter-form--inline` - Inline newsletter form (responsive)
183
+ - `.dg-newsletter-header` - Newsletter header section (responsive flex layout)
184
+ - `.dg-newsletter-header__content` - Newsletter header content area
185
+ - `.dg-newsletter-header__actions` - Newsletter header actions area
186
+ - `.dg-logo-container` - Centered logo container
187
+ - `.dg-logo` - Logo image styling
188
+ - `.dg-social-links` - Social links container
189
+ - `.dg-social-link` - Individual social link with hover effect
190
+
191
+ ### Typography Utilities
192
+
193
+ - `.dg-text-tagline` - Centered tagline text (small, muted)
194
+ - `.dg-text-subtitle` - Subtitle text (small, muted)
195
+ - `.dg-text-heading` - Standard heading text
196
+ - `.dg-text-heading--with-margin` - Heading with bottom margin
197
+ - `.dg-text-legal` - Legal/fine print text (small, centered)
198
+
199
+ ### Links
200
+
201
+ - `.dg-link` - Primary link with opacity hover effect
95
202
 
96
203
  ### Utilities
97
- - `.dg-badge-{success,warning,error,info}` - Status badges
98
- - `.dg-spinner` - Loading spinner
99
- - `.dg-divider` - Section divider
100
- - `.text-gradient` - Text with gradient effect
101
- - `.scrollbar-thin` - Thin scrollbar styling
102
204
 
103
- ## Theme Colors
205
+ - `.dg-footer` - Page footer
206
+ - `.dg-text-center` - Center text alignment
207
+ - `.dg-text-danger` - Danger/error text color
208
+ - `.dg-text-success` - Success text color
209
+ - `.dg-text-warning` - Warning text color
210
+ - `.dg-text-primary` - Primary brand color text
211
+ - `.dg-text-secondary` - Secondary brand color text
212
+ - `.dg-text-muted` - Muted text color
213
+ - `.dg-text-fog` - Fog (light gray) text color
214
+ - `.dg-text-white` - White text color
104
215
 
105
- The library includes Deepgram brand colors:
216
+ ## Component Examples
106
217
 
107
- - **Primary**: Spring Green (#13ef93)
108
- - **Accent**: Lavender Blue (#5c68d4)
109
- - **Dark Mode**: Professional dark theme
110
- - **Light Mode**: Clean light theme (toggle with `.light-mode` class on body)
218
+ ### Structured Card with Image
111
219
 
112
- ## Dark/Light Mode
220
+ ```html
221
+ <div class="dg-card dg-card--structured">
222
+ <div class="dg-card__image dg-card__image--medium">
223
+ <img src="image.jpg" alt="Description" />
224
+ </div>
225
+ <div class="dg-card__header">
226
+ <h3 class="dg-card-heading">Card Title</h3>
227
+ </div>
228
+ <div class="dg-card__body">
229
+ <p class="dg-prose">Card body content goes here.</p>
230
+ </div>
231
+ <div class="dg-card__footer">
232
+ <button class="dg-btn dg-btn--primary">Action</button>
233
+ </div>
234
+ </div>
235
+ ```
113
236
 
114
- Dark mode is the default. To enable light mode:
237
+ ### Structured Card with Icon
115
238
 
116
- ```javascript
117
- document.body.classList.add('light-mode');
239
+ ```html
240
+ <div class="dg-card dg-card--structured">
241
+ <div class="dg-card__icon dg-card__icon--left">
242
+ <i class="fas fa-rocket"></i>
243
+ </div>
244
+ <div class="dg-card__header">
245
+ <h3 class="dg-card-heading">Feature Title</h3>
246
+ </div>
247
+ <div class="dg-card__body">
248
+ <p class="dg-prose">Feature description goes here.</p>
249
+ </div>
250
+ <div class="dg-card__footer">
251
+ <button class="dg-btn dg-btn--primary">Learn More</button>
252
+ </div>
253
+ </div>
118
254
  ```
119
255
 
120
- To toggle:
256
+ Icon alignment options: `--left` (default), `--center`, `--right`
121
257
 
122
- ```javascript
123
- document.body.classList.toggle('light-mode');
258
+ ### Button Group
259
+
260
+ ```html
261
+ <div class="dg-action-group">
262
+ <button class="dg-btn dg-btn--ghost">Cancel</button>
263
+ <button class="dg-btn dg-btn--primary">Confirm</button>
264
+ </div>
265
+ ```
266
+
267
+ ### Hero Section
268
+
269
+ ```html
270
+ <section class="dg-hero">
271
+ <div class="dg-hero__content">
272
+ <h1 class="dg-hero-title">Your Hero Title</h1>
273
+ <p class="dg-hero__body">Your hero description text.</p>
274
+ <div class="dg-hero__actions">
275
+ <button class="dg-btn dg-btn--primary">Get Started</button>
276
+ <button class="dg-btn dg-btn--ghost">Learn More</button>
277
+ </div>
278
+ </div>
279
+ </section>
280
+ ```
281
+
282
+ ### Form Input with Label
283
+
284
+ ```html
285
+ <div class="dg-form-field">
286
+ <label for="email" class="dg-form-label">Email Address</label>
287
+ <input type="email" id="email" name="email" placeholder="you@example.com" class="dg-input" />
288
+ <p class="dg-form-helper">We'll never share your email.</p>
289
+ </div>
290
+ ```
291
+
292
+ ### Form Input with Error
293
+
294
+ ```html
295
+ <div class="dg-form-field dg-form-field--error">
296
+ <label for="email" class="dg-form-label">Email Address</label>
297
+ <input type="email" id="email" name="email" placeholder="you@example.com" class="dg-input" />
298
+ <p class="dg-form-helper">Please enter a valid email address.</p>
299
+ </div>
300
+ ```
301
+
302
+ ### Form Input with Success
303
+
304
+ ```html
305
+ <div class="dg-form-field dg-form-field--success">
306
+ <label for="email" class="dg-form-label">Email Address</label>
307
+ <input type="email" id="email" name="email" value="user@example.com" class="dg-input" />
308
+ <p class="dg-form-helper">Email address is valid.</p>
309
+ </div>
310
+ ```
311
+
312
+ ### Checkbox
313
+
314
+ ```html
315
+ <label class="dg-checkbox-label">
316
+ <input type="checkbox" name="agree" class="dg-checkbox" />
317
+ <span>I agree to the terms and conditions</span>
318
+ </label>
124
319
  ```
125
320
 
321
+ ### Checkbox with Link
322
+
323
+ ```html
324
+ <label class="dg-checkbox-label">
325
+ <input type="checkbox" name="privacy" class="dg-checkbox" />
326
+ <span>I've read the <a href="/privacy" class="dg-link">Privacy Policy</a></span>
327
+ </label>
328
+ ```
329
+
330
+ ### Checkbox with Description
331
+
332
+ ```html
333
+ <label class="dg-checkbox-label">
334
+ <input type="checkbox" name="notifications" class="dg-checkbox" />
335
+ <div class="dg-checkbox-description">
336
+ <span>Enable email notifications</span>
337
+ <span class="dg-form-helper">Get notified about updates and announcements</span>
338
+ </div>
339
+ </label>
340
+ ```
341
+
342
+ ### Newsletter Signup Form
343
+
344
+ ```html
345
+ <section class="dg-section dg-section--bordered">
346
+ <div class="dg-newsletter-container--compact">
347
+ <h3 class="dg-text-heading">Subscribe to our newsletter</h3>
348
+ <p class="dg-text-subtitle">Get the latest news and updates delivered to your inbox.</p>
349
+ <form class="dg-newsletter-form--compact">
350
+ <input type="email" placeholder="Enter your email" required class="dg-input" name="email" />
351
+ <button type="submit" class="dg-btn dg-btn--primary">Subscribe</button>
352
+ </form>
353
+ </div>
354
+ </section>
355
+ ```
356
+
357
+ ### File Upload Zone
358
+
359
+ ```html
360
+ <div class="dg-drag-drop-zone">
361
+ <input type="file" id="file-upload" name="file" class="dg-drag-drop-zone__input" />
362
+ <div class="dg-drag-drop-zone__icon fas fa-upload"></div>
363
+ <div class="dg-drag-drop-zone__text">Drop file here or click to browse</div>
364
+ <div class="dg-drag-drop-zone__hint">MP3, WAV, M4A up to 500MB</div>
365
+ </div>
366
+ ```
367
+
368
+ ## Theme Colors
369
+
370
+ The library includes Deepgram brand colors:
371
+
372
+ - **Primary**: Spring Green (#13ef93)
373
+ - **Secondary**: Blue (#149afb)
374
+ - **Success**: Green (#12b76a)
375
+ - **Warning**: Yellow (#fec84b)
376
+ - **Danger**: Red (#f04438)
377
+ - **Dark Background**: Charcoal (#1a1a1f)
378
+ - **Borders**: Pebble (#4e4e52)
379
+
126
380
  ## Responsive Design
127
381
 
128
382
  All components are mobile-first and responsive:
@@ -144,4 +398,3 @@ MIT
144
398
  ## Contributing
145
399
 
146
400
  See the [main repository](https://github.com/deepgram/starter-uis) for contribution guidelines.
147
-