@boostdev/design-system-components 2.1.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.
Files changed (34) hide show
  1. package/AGENTS.md +2 -1
  2. package/README.md +40 -0
  3. package/dist/client.cjs +303 -60
  4. package/dist/client.css +568 -527
  5. package/dist/client.d.cts +39 -1
  6. package/dist/client.d.ts +39 -1
  7. package/dist/client.js +309 -60
  8. package/dist/index.cjs +303 -60
  9. package/dist/index.css +568 -527
  10. package/dist/index.d.cts +39 -1
  11. package/dist/index.d.ts +39 -1
  12. package/dist/index.js +309 -60
  13. package/dist/web-components/index.d.ts +129 -1
  14. package/dist/web-components/index.js +311 -0
  15. package/package.json +1 -1
  16. package/src/components/layout/Grid/Grid.mdx +244 -0
  17. package/src/components/layout/Grid/Grid.module.css +59 -0
  18. package/src/components/layout/Grid/Grid.spec.tsx +401 -0
  19. package/src/components/layout/Grid/Grid.stories.tsx +160 -0
  20. package/src/components/layout/Grid/Grid.tsx +85 -0
  21. package/src/components/layout/Grid/GridItem.tsx +150 -0
  22. package/src/components/layout/Grid/autoSpan.ts +77 -0
  23. package/src/components/layout/Grid/index.ts +4 -0
  24. package/src/components/layout/Grid/masonry.ts +134 -0
  25. package/src/index.ts +2 -0
  26. package/src/web-components/index.ts +4 -0
  27. package/src/web-components/layout/BdsGrid.mdx +210 -0
  28. package/src/web-components/layout/BdsGrid.stories.tsx +209 -0
  29. package/src/web-components/layout/BdsGridItem.mdx +52 -0
  30. package/src/web-components/layout/BdsGridItem.stories.tsx +72 -0
  31. package/src/web-components/layout/bds-grid-item.spec.ts +102 -0
  32. package/src/web-components/layout/bds-grid-item.ts +177 -0
  33. package/src/web-components/layout/bds-grid.spec.ts +62 -0
  34. package/src/web-components/layout/bds-grid.ts +184 -0
package/AGENTS.md CHANGED
@@ -28,12 +28,13 @@ import '@boostdev/design-system-components/web-components';
28
28
  - **ui/**: Accordion, Alert, Avatar, Badge, Breadcrumb, Calendar, Carousel, Collapsible, DescriptionList, Link, Loading, NotificationBanner, Pagination, Progress, ProgressCircle, Separator, Skeleton, SkipLink, Table, Tabs, Tooltip, Typography
29
29
  - **interaction/**: Button, Command, Dialog, Drawer, DropdownMenu, Popover, Rating, Toast (ToastProvider + useToast hook)
30
30
  - **interaction/form/**: Checkbox, CheckboxGroup, Combobox, FileInput, FormInput, NumberInput, Radio, RadioGroup, SegmentedControl, Select, Slider, Switch, Textarea (+ atom primitives: Label, Message, InputContainer)
31
- - **layout/**: ButtonContainer (formerly ButtonGroup — deprecated alias still available), Card, IconWrapper, SectionHeader
31
+ - **layout/**: ButtonContainer (formerly ButtonGroup — deprecated alias still available), Card, Grid (supports `isMasonry` — CSS Grid Level 3 with row-span polyfill — and `autoSpanMedia` — per-item span derived from media aspect ratio), GridItem (supports `columnSpan="auto"`), IconWrapper, SectionHeader
32
32
 
33
33
  ### Web Components (experimental) — `src/web-components/`
34
34
  Custom elements built with Lit. Entry: `src/web-components/index.ts`. Bundled with Lit (no peer dep required).
35
35
 
36
36
  - **ui/**: `<bds-alert>`, `<bds-avatar>`, `<bds-badge>`, `<bds-breadcrumb>`, `<bds-button-group>`, `<bds-calendar>`, `<bds-card>`, `<bds-carousel>`, `<bds-description-list>`, `<bds-icon-wrapper>`, `<bds-link>`, `<bds-loading>`, `<bds-notification-banner>`, `<bds-pagination>`, `<bds-progress>`, `<bds-progress-circle>`, `<bds-rating>`, `<bds-section-header>`, `<bds-separator>`, `<bds-skeleton>`, `<bds-table>`, `<bds-typography>`
37
+ - **layout/**: `<bds-grid>`, `<bds-grid-item>`
37
38
  - **interaction/**: `<bds-accordion>`, `<bds-accordion-item>`, `<bds-button>`, `<bds-collapsible>`, `<bds-dialog>`, `<bds-drawer>`, `<bds-dropdown-menu>`, `<bds-dropdown-menu-item>`, `<bds-popover>`, `<bds-skip-link>`, `<bds-tab>`, `<bds-tab-panel>`, `<bds-tabs>`, `<bds-toast-provider>`, `<bds-tooltip>`
38
39
  - **interaction/form/**: `<bds-checkbox>`, `<bds-checkbox-group>`, `<bds-combobox>`, `<bds-file-input>`, `<bds-form-input>`, `<bds-number-input>`, `<bds-radio>`, `<bds-radio-group>`, `<bds-segmented-control>`, `<bds-select>`, `<bds-slider>`, `<bds-switch>`, `<bds-textarea>`
39
40
 
package/README.md CHANGED
@@ -388,6 +388,46 @@ import { Card } from '@boostdev/design-system-components';
388
388
 
389
389
  ---
390
390
 
391
+ #### Grid / GridItem
392
+
393
+ ```tsx
394
+ import { Grid, GridItem, GridItemSpan } from '@boostdev/design-system-components';
395
+
396
+ <Grid variant="main">
397
+ <GridItem columnSpan="half">Left</GridItem>
398
+ <GridItem columnSpan="half">Right</GridItem>
399
+ </Grid>
400
+
401
+ <Grid variant="custom" columns={5}>
402
+ {items.map((item) => <GridItem key={item.id} columnSpan={1}>{item.label}</GridItem>)}
403
+ </Grid>
404
+ ```
405
+
406
+ Named `columnSpan` values are responsive via the foundation breakpoint ladder (4 / 8 / 12 columns across mobile / tablet / desktop). Also available as a web component: `<bds-grid>` / `<bds-grid-item>`.
407
+
408
+ **Grid props**
409
+
410
+ | Prop | Type | Default |
411
+ |--------------|--------------------------------------------------|----------|
412
+ | `variant` | `'main' \| 'page' \| 'funnel' \| 'custom'` | `'main'` |
413
+ | `columns` | `number` | — |
414
+ | `isCentered` | `boolean` | `false` |
415
+ | `isMasonry` | `boolean` — CSS Grid Level 3 masonry layout (native + JS polyfill) | `false` |
416
+ | `autoSpanMedia` | `boolean` — children without `columnSpan` auto-span by media aspect ratio | `false` |
417
+ | `as` | `ElementType` | `'div'` |
418
+
419
+ **GridItem props**
420
+
421
+ | Prop | Type | Default |
422
+ |---------------|--------------------------------------------------------------------------------------------------|----------|
423
+ | `columnSpan` | `'full' \| 'three-quarters' \| 'two-thirds' \| 'half' \| 'one-third' \| 'one-quarter' \| 'auto' \| number` — `'auto'` derives span from the first `<img>`/`<video>` descendant's aspect ratio | `'full'` |
424
+ | `rowSpan` | `number` | — |
425
+ | `startColumn` | `number` — escape hatch | — |
426
+ | `endColumn` | `number` — escape hatch | — |
427
+ | `as` | `ElementType` | `'div'` |
428
+
429
+ ---
430
+
391
431
  #### SectionHeader
392
432
 
393
433
  ```tsx