@widgetic/design-system 0.3.78 → 0.3.79

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
@@ -160,243 +160,4 @@ The global styles load the necessary `@font-face` rules. You can apply typograph
160
160
  <h1 class="h1">Main Title</h1>
161
161
  <p class="body-medium">This is body text.</p>
162
162
  <span class="subtext">Some smaller text.</span>
163
- ```
164
-
165
- ## Grid System
166
-
167
- The design system implements three distinct responsive grid layouts:
168
-
169
- 1. Site Grid
170
- 2. Dashboard Grid
171
- 3. App Grid
172
-
173
- ### Grid Breakpoints
174
- - Desktop: > 744px
175
- - Tablet: 393px - 744px
176
- - Mobile: ≤ 393px
177
-
178
- ### 1. Site Grid
179
-
180
- **Desktop (>744px)**
181
- - 12 columns
182
- - 144px margins
183
- - 24px gutters
184
- - Stretching columns with auto width
185
-
186
- **Tablet (≤744px)**
187
- - 8 columns
188
- - 32px margins
189
- - 16px gutters
190
- - Stretching columns with auto width
191
-
192
- **Mobile (≤393px)**
193
- - 4 columns
194
- - 16px margins
195
- - 16px gutters
196
- - Stretching columns with auto width
197
-
198
- ### 2. Dashboard Grid
199
-
200
- **Desktop (>744px)**
201
- - Header: 12 columns, 24px margins, 20px gutters
202
- - Sidebar: 240px fixed width
203
- - Main Content: 12 columns, 24px margins, 20px gutters
204
- - 56px header height
205
-
206
- **Tablet (≤744px)**
207
- - Header: 8 columns
208
- - Sidebar: 200px fixed width
209
- - Main Content: 8 columns
210
- - 16px margins and gutters
211
-
212
- **Mobile (≤393px)**
213
- - Header: 4 columns
214
- - Sidebar replaced with menu component
215
- - Main Content: 4 columns
216
- - 16px margins and gutters
217
-
218
- ### 3. App Grid
219
-
220
- **Desktop (>744px)**
221
- - Header: 12 columns, 24px margins, 20px gutters
222
- - Main Content: 12 columns, 144px margins, 20px gutters
223
- - 56px header height
224
-
225
- **Tablet (≤744px)**
226
- - Header: 8 columns
227
- - Main Content: 8 columns, 32px margins
228
- - 16px gutters
229
-
230
- **Mobile (≤393px)**
231
- - Header: 4 columns
232
- - Menu component added below header
233
- - Main Content: 4 columns
234
- - 16px margins and gutters
235
-
236
- ### Usage Example
237
-
238
- ```svelte
239
- <!-- Site Grid -->
240
- <div class="site-grid">
241
- <div class="grid-margin-left"></div>
242
- <header class="grid-header">Header Content</header>
243
- <main class="grid-main">Main Content</main>
244
- <footer class="grid-footer">Footer Content</footer>
245
- <div class="grid-margin-right"></div>
246
- </div>
247
-
248
- <!-- Dashboard Grid -->
249
- <div class="dashboard-grid">
250
- <div class="grid-margin-left"></div>
251
- <header class="dashboard-header-grid">
252
- <!-- Header content with 12/8/4 columns based on viewport -->
253
- </header>
254
- <nav class="grid-sidebar">
255
- <!-- Sidebar content (hidden on mobile) -->
256
- </nav>
257
- <main class="dashboard-main-grid">
258
- <!-- Main content with 12/8/4 columns based on viewport -->
259
- </main>
260
- <div class="grid-margin-right"></div>
261
- <!-- Mobile menu appears automatically on small screens -->
262
- <div class="grid-menu">
263
- <!-- Mobile menu content -->
264
- </div>
265
- </div>
266
-
267
- <!-- App Grid -->
268
- <div class="app-grid">
269
- <div class="grid-margin-left"></div>
270
- <header class="app-header-grid">
271
- <!-- Header content with 12/8/4 columns based on viewport -->
272
- </header>
273
- <main class="app-main-grid">
274
- <!-- Main content with 12/8/4 columns based on viewport -->
275
- </main>
276
- <div class="grid-margin-right"></div>
277
- <!-- Mobile menu appears automatically on small screens -->
278
- <div class="grid-menu">
279
- <!-- Mobile menu content -->
280
- </div>
281
- </div>
282
- ```
283
-
284
- ### Grid Area Classes
285
- The following classes are available to position elements within the grid:
286
- ```css
287
- .grid-header /* Header area */
288
- .grid-main /* Main content area */
289
- .grid-sidebar /* Sidebar area (dashboard only) */
290
- .grid-footer /* Footer area (site only) */
291
- .grid-toolbar /* Toolbar area (app only) */
292
- .grid-margin-left /* Left margin area */
293
- .grid-margin-right/* Right margin area */
294
- .grid-menu /* Mobile menu area */
295
- .grid-gap /* Gap area (dashboard only) */
296
- ```
297
-
298
- The grid system is designed to maintain consistent spacing and layout across different viewport sizes while adapting to the specific needs of each layout type (site, dashboard, and app).
299
-
300
- ## DeleteConfirmation Component
301
-
302
- The `DeleteConfirmation` component is a reusable confirmation dialog that can be used across different parts of the project for confirming deletion actions.
303
-
304
- ### Features
305
-
306
- - Independent of any specific store or state management system
307
- - Customizable title, message, and button labels
308
- - Works with any type of items to be deleted
309
- - Dispatches events for both confirmation and cancellation
310
-
311
- ### Usage
312
-
313
- ```svelte
314
- <script>
315
- import { DeleteConfirmation } from '@widgetic/design-system/components';
316
-
317
- let showDeleteConfirmation = false;
318
- let itemsToDelete = [
319
- { id: '1', name: 'Document.pdf', type: 'file' },
320
- { id: '2', name: 'Images', type: 'folder' }
321
- ];
322
-
323
- function handleDelete(event) {
324
- const deletedItems = event.detail.items;
325
- console.log('Items to delete:', deletedItems);
326
- // Perform deletion logic here
327
- }
328
-
329
- function handleCancel() {
330
- showDeleteConfirmation = false;
331
- console.log('Deletion cancelled');
332
- }
333
- </script>
334
-
335
- <button on:click={() => showDeleteConfirmation = true}>
336
- Delete Items
337
- </button>
338
-
339
- <DeleteConfirmation
340
- bind:isOpen={showDeleteConfirmation}
341
- items={itemsToDelete}
342
- modalId="my-delete-confirmation"
343
- on:delete={handleDelete}
344
- on:cancel={handleCancel}
345
- />
346
- ```
347
-
348
- ### Props
349
-
350
- | Prop | Type | Default | Description |
351
- |------|------|---------|-------------|
352
- | `isOpen` | boolean | `false` | Controls the visibility of the modal |
353
- | `items` | array | `[]` | Array of items to be deleted |
354
- | `title` | string | `''` | Custom title for the modal (autogenerated if empty) |
355
- | `message` | string | `''` | Custom message for the modal (autogenerated if empty) |
356
- | `confirmLabel` | string | `'Confirm'` | Label for the confirm button |
357
- | `cancelLabel` | string | `'Cancel'` | Label for the cancel button |
358
- | `width` | string | `'410px'` | Width of the modal |
359
- | `height` | string | `'168px'` | Height of the modal |
360
- | `modalId` | string | `'delete-confirmation-modal'` | ID for targeting the modal |
361
-
362
- ### Events
363
-
364
- - `delete` - Dispatched when the user confirms deletion, with `items` in the event detail
365
- - `cancel` - Dispatched when the user cancels deletion
366
-
367
- ### Custom Title and Message Example
368
-
369
- You can provide custom title and message for specific contexts:
370
-
371
- ```svelte
372
- <script>
373
- import { DeleteConfirmation } from '@widgetic/design-system/components';
374
-
375
- let showDeleteConfirmation = false;
376
- let selectedItems = [
377
- { id: '1', name: 'Document.pdf', type: 'file' },
378
- { id: '2', name: 'Images', type: 'folder' }
379
- ];
380
-
381
- function handleDelete(event) {
382
- const deletedItems = event.detail.items;
383
- console.log('Items to delete:', deletedItems);
384
- // Perform deletion logic here
385
- }
386
-
387
- function handleCancel() {
388
- showDeleteConfirmation = false;
389
- console.log('Deletion cancelled');
390
- }
391
- </script>
392
-
393
- <DeleteConfirmation
394
- bind:isOpen={showDeleteConfirmation}
395
- items={selectedItems}
396
- title="Delete Assets"
397
- message="These assets will be permanently deleted. This action cannot be undone."
398
- confirmLabel="Delete Permanently"
399
- on:delete={handleDelete}
400
- on:cancel={handleCancel}
401
- />
402
- ```
163
+ ```
@@ -571,6 +571,7 @@ go 3 levels up in development mode, 2 levels up in production mode*/
571
571
  /* Modal Button Styles */
572
572
  .modal-btn-primary {
573
573
  @apply !h6 !inline-flex !items-center !justify-center;
574
+ cursor: pointer;
574
575
  padding: 0 16px !important;
575
576
  min-height: 34px !important;
576
577
  border-radius: var(--radius-pill) !important;
@@ -587,6 +588,7 @@ go 3 levels up in development mode, 2 levels up in production mode*/
587
588
 
588
589
  .modal-btn-secondary {
589
590
  @apply !h6 !inline-flex !items-center !justify-center;
591
+ cursor: pointer;
590
592
  padding: 0 16px !important;
591
593
  min-height: 34px !important;
592
594
  border-radius: var(--radius-pill) !important;
@@ -624,6 +626,7 @@ go 3 levels up in development mode, 2 levels up in production mode*/
624
626
  /* Primary Button - Base styfles */
625
627
  .btn-primary {
626
628
  @apply !inline-flex !items-center !justify-center !gap-2;
629
+ cursor: pointer;
627
630
  padding: 8px 16px !important;
628
631
  height: 34px !important;
629
632
  border-radius: var(--radius-small) !important;
@@ -672,6 +675,7 @@ go 3 levels up in development mode, 2 levels up in production mode*/
672
675
  /* Secondary Button */
673
676
  .btn-secondary {
674
677
  @apply !h6 !inline-flex !items-center !justify-center !gap-2;
678
+ cursor: pointer;
675
679
  padding: 0 16px !important;
676
680
  height: 34px !important;
677
681
  border-radius: var(--radius-small) !important;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@widgetic/design-system",
3
- "version": "0.3.78",
3
+ "version": "0.3.79",
4
4
  "type": "module",
5
5
  "svelte": "./dist/index.js",
6
6
  "module": "./dist/index.js",