@boostdev/design-system-components 2.0.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.
- package/AGENTS.md +2 -1
- package/README.md +42 -1
- package/dist/client.cjs +305 -60
- package/dist/client.css +577 -523
- package/dist/client.d.cts +42 -2
- package/dist/client.d.ts +42 -2
- package/dist/client.js +311 -60
- package/dist/index.cjs +305 -60
- package/dist/index.css +577 -523
- package/dist/index.d.cts +42 -2
- package/dist/index.d.ts +42 -2
- package/dist/index.js +311 -60
- package/dist/native/index.cjs +5 -2
- package/dist/native/index.d.cts +3 -1
- package/dist/native/index.d.ts +3 -1
- package/dist/native/index.js +5 -2
- package/dist/web-components/{chunk-3REOIRDW.js → chunk-N3TN6WCH.js} +26 -1
- package/dist/web-components/index.d.ts +129 -1
- package/dist/web-components/index.js +312 -1
- package/dist/web-components/interaction/bds-button.d.ts +7 -0
- package/dist/web-components/interaction/bds-button.js +1 -1
- package/package.json +1 -1
- package/src/components/interaction/Button/Button.mdx +81 -36
- package/src/components/interaction/Button/Button.module.css +24 -0
- package/src/components/interaction/Button/Button.native.mdx +31 -12
- package/src/components/interaction/Button/Button.native.spec.tsx +20 -0
- package/src/components/interaction/Button/Button.native.stories.tsx +110 -9
- package/src/components/interaction/Button/Button.native.tsx +13 -4
- package/src/components/interaction/Button/Button.spec.tsx +16 -0
- package/src/components/interaction/Button/Button.stories.tsx +134 -16
- package/src/components/interaction/Button/Button.tsx +4 -0
- package/src/components/layout/Grid/Grid.mdx +244 -0
- package/src/components/layout/Grid/Grid.module.css +59 -0
- package/src/components/layout/Grid/Grid.spec.tsx +401 -0
- package/src/components/layout/Grid/Grid.stories.tsx +160 -0
- package/src/components/layout/Grid/Grid.tsx +85 -0
- package/src/components/layout/Grid/GridItem.tsx +150 -0
- package/src/components/layout/Grid/autoSpan.ts +77 -0
- package/src/components/layout/Grid/index.ts +4 -0
- package/src/components/layout/Grid/masonry.ts +134 -0
- package/src/components/layout/IconWrapper/IconWrapper.stories.tsx +46 -14
- package/src/index.ts +2 -0
- package/src/web-components/index.ts +4 -0
- package/src/web-components/interaction/BdsButton.mdx +46 -14
- package/src/web-components/interaction/BdsButton.stories.tsx +171 -19
- package/src/web-components/interaction/bds-button.spec.ts +35 -0
- package/src/web-components/interaction/bds-button.ts +28 -1
- package/src/web-components/layout/BdsGrid.mdx +210 -0
- package/src/web-components/layout/BdsGrid.stories.tsx +209 -0
- package/src/web-components/layout/BdsGridItem.mdx +52 -0
- package/src/web-components/layout/BdsGridItem.stories.tsx +72 -0
- package/src/web-components/layout/bds-grid-item.spec.ts +102 -0
- package/src/web-components/layout/bds-grid-item.ts +177 -0
- package/src/web-components/layout/bds-grid.spec.ts +62 -0
- 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
|
@@ -173,7 +173,7 @@ import { Button } from '@boostdev/design-system-components';
|
|
|
173
173
|
<Button variant="outline">Cancel</Button>
|
|
174
174
|
<Button size="small">Small</Button>
|
|
175
175
|
<Button href="/dashboard">Link button</Button>
|
|
176
|
-
<Button
|
|
176
|
+
<Button isIconOnly aria-label="Delete"><Icon /></Button>
|
|
177
177
|
<Button hasPulse>Call to action</Button>
|
|
178
178
|
```
|
|
179
179
|
|
|
@@ -184,6 +184,7 @@ import { Button } from '@boostdev/design-system-components';
|
|
|
184
184
|
| `href` | `string` | — renders an `<a>` |
|
|
185
185
|
| `iconStart` | `ReactNode` | — |
|
|
186
186
|
| `iconEnd` | `ReactNode` | — |
|
|
187
|
+
| `isIconOnly` | `boolean` | `false` — forces 1:1 aspect ratio with minimal padding. Requires `aria-label`. |
|
|
187
188
|
| `hasPulse` | `boolean` | `false` |
|
|
188
189
|
| `disabled` | `boolean` | `false` |
|
|
189
190
|
|
|
@@ -387,6 +388,46 @@ import { Card } from '@boostdev/design-system-components';
|
|
|
387
388
|
|
|
388
389
|
---
|
|
389
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
|
+
|
|
390
431
|
#### SectionHeader
|
|
391
432
|
|
|
392
433
|
```tsx
|