Skip to content

Commit

Permalink
Merge pull request #194 from huntabyte/next
Browse files Browse the repository at this point in the history
  • Loading branch information
huntabyte authored Dec 4, 2023
2 parents d04c719 + 6e10a2d commit 489f34d
Show file tree
Hide file tree
Showing 739 changed files with 20,127 additions and 9,057 deletions.
5 changes: 5 additions & 0 deletions .changeset/brave-schools-burn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"bits-ui": minor
---

remove `arrowSize` prop from menu Root components in favor of passing it as a prop to the Arrow components
5 changes: 5 additions & 0 deletions .changeset/fresh-dryers-sneeze.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"bits-ui": minor
---

New component: Date Range Picker
5 changes: 5 additions & 0 deletions .changeset/mighty-cobras-care.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"bits-ui": minor
---

feat: Calendar
5 changes: 5 additions & 0 deletions .changeset/old-dancers-allow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"bits-ui": minor
---

Breaking change: separate floating `positioning` props into individual props and move them to content components
14 changes: 14 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"mode": "exit",
"tag": "next",
"initialVersions": {
"bits-ui": "0.9.9"
},
"changesets": [
"brave-schools-burn",
"fresh-dryers-sneeze",
"mighty-cobras-care",
"old-dancers-allow",
"spotty-beans-return"
]
}
5 changes: 5 additions & 0 deletions .changeset/spotty-beans-return.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"bits-ui": minor
---

New components: Range Calendar, Date Field, Date Range Field
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ yarn.lock
package.json

vite.config.js.timestamp-*
vite.config.ts.timestamp-*
vite.config.ts.timestamp-*
src/content/api-reference/extended-types/
9 changes: 5 additions & 4 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@
"singleQuote": false,
"trailingComma": "none",
"printWidth": 100,
"plugins": [
"prettier-plugin-svelte"
],
"pluginSearchDirs": [
"."
],
"plugins": [
"prettier-plugin-svelte",
"prettier-plugin-tailwindcss"
],
"overrides": [
{
"files": "*.svelte",
"options": {
"parser": "svelte",
"printWidth": 100
"printWidth": 80
}
},
{
Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# @huntabyte/primitives

## 0.10.0-next.0

### Minor Changes

- remove `arrowSize` prop from menu Root components in favor of passing it as a prop to the Arrow components ([#184](https://github.com/huntabyte/bits-ui/pull/184))

- New component: Date Range Picker ([#184](https://github.com/huntabyte/bits-ui/pull/184))

- feat: Calendar ([#184](https://github.com/huntabyte/bits-ui/pull/184))

- Breaking change: separate floating `positioning` props into individual props and move them to content components ([#184](https://github.com/huntabyte/bits-ui/pull/184))

- New components: Range Calendar, Date Field, Date Range Field ([#184](https://github.com/huntabyte/bits-ui/pull/184))

## 0.9.9

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion content/components/accordion.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Accordion
description: Organizes content into collapsable sections.
description: Organizes content into collapsible sections, allowing users to focus on one section at a time.
---

<script>
Expand Down
2 changes: 1 addition & 1 deletion content/components/alert-dialog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Alert Dialog
description: Presents critical information or prompts to the user, typically requiring their attention or action.
description: A modal window that alerts users with important information and awaits their acknowledgment or action.
---

<script>
Expand Down
2 changes: 1 addition & 1 deletion content/components/aspect-ratio.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Aspect Ratio
description: Displays content with a specified aspect ratio, ensuring consistent and visually balanced presentation.
description: Displays content while maintaining a specified aspect ratio, ensuring consistent visual proportions.
---

<script>
Expand Down
2 changes: 1 addition & 1 deletion content/components/avatar.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Avatar
description: Displays user or entity images with a fallback option for failed loading, ensuring consistent visual representation.
description: Represents a user or entity with a recognizable image or placeholder in UI elements.
---

<script>
Expand Down
58 changes: 58 additions & 0 deletions content/components/calendar.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
title: Calendar
description: Displays dates and days of the week, facilitating date-related interactions.
---

<script>
import { APISection, ComponentPreview, CalendarDemo } from '@/components'
export let schemas;
</script>

<ComponentPreview name="calendar-demo" comp="Calendar">

<CalendarDemo slot="preview" />

</ComponentPreview>

## Structure

```svelte
<script lang="ts">
import { Calendar } from "bits-ui";
</script>
<Calendar.Root let:months let:weekdays>
<Calendar.Header>
<Calendar.PrevButton />
<Calendar.Heading />
<Calendar.NextButton />
</Calendar.Header>
{#each months as month}
<Calendar.Grid>
<Calendar.GridHead>
<Calendar.GridRow>
{#each weekdays as day}
<Calendar.HeadCell>
{day}
</Calendar.HeadCell>
{/each}
</Calendar.GridRow>
</Calendar.GridHead>
<Calendar.GridBody>
{#each month.weeks as weekDates}
<Calendar.GridRow>
{#each weekDates as date}
<Calendar.Cell {date}>
<Calendar.Date {date} month={month.value} />
</Calendar.Cell>
{/each}
</Calendar.GridRow>
{/each}
</Calendar.GridBody>
</Calendar.Grid>
{/each}
</Calendar.Root>
```

<APISection {schemas} />
2 changes: 1 addition & 1 deletion content/components/checkbox.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Checkbox
description: Allow users to mark options as checked, unchecked, or indeterminate, accommodating versatile states.
description: Allow users to switch between checked, unchecked, and indeterminate states.
---

<script>
Expand Down
2 changes: 1 addition & 1 deletion content/components/collapsible.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Collapsible
description: An interactive component which expands and collapses content.
description: Conceals or reveals content sections, enhancing space utilization and organization.
---

<script>
Expand Down
2 changes: 1 addition & 1 deletion content/components/context-menu.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Context Menu
description: Displays a menu at the pointer's position when the trigger is right-clicked or long-pressed.
description: Displays options or actions relevant to a specific context or selected item, triggered by a right-click.
---

<script>
Expand Down
36 changes: 36 additions & 0 deletions content/components/date-field.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
title: Date Field
description: Enables users to input specific dates within a designated field.
---

<script>
import { APISection, ComponentPreview, DateFieldDemo } from '@/components'
export let schemas;
</script>

<ComponentPreview name="date-field-demo" comp="Date Field">

<DateFieldDemo slot="preview" />

</ComponentPreview>

## Structure

```svelte
<script lang="ts">
import { DateField } from "$lib";
</script>
<DateField.Root>
<DateField.Label>Check-in date</DateField.Label>
<DateField.Input let:segments>
{#each segments as { part, value }}
<DateField.Segment {part}>
{value}
</DateField.Segment>
{/each}
</DateField.Input>
</DateField.Root>
```

<APISection {schemas} />
70 changes: 70 additions & 0 deletions content/components/date-picker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
title: Date Picker
description: Facilitates the selection of dates through an input and calendar-based interface.
---

<script>
import { APISection, ComponentPreview, DatePickerDemo } from '@/components'
export let schemas;
</script>

<ComponentPreview name="date-picker-demo" comp="Date Picker">

<DatePickerDemo slot="preview" />

</ComponentPreview>

## Structure

```svelte
<script lang="ts">
import { DatePicker } from "bits-ui";
</script>
<DatePicker.Root>
<DatePicker.Label />
<DatePicker.Input let:segments>
{#each segments as { part, value }}
<DatePicker.Segment {part}>
{value}
</DatePicker.Segment>
{/each}
<DatePicker.Trigger />
</DatePicker.Input>
<DatePicker.Content>
<DatePicker.Calendar let:months let:weekdays>
<DatePicker.Header>
<DatePicker.PrevButton />
<DatePicker.Heading />
<DatePicker.NextButton />
</DatePicker.Header>
{#each months as month}
<DatePicker.Grid>
<DatePicker.GridHead>
<DatePicker.GridRow>
{#each weekdays as day}
<DatePicker.HeadCell>
{day}
</DatePicker.HeadCell>
{/each}
</DatePicker.GridRow>
</DatePicker.GridHead>
<DatePicker.GridBody>
{#each month.weeks as weekDates}
<DatePicker.GridRow>
{#each weekDates as date}
<DatePicker.Cell {date}>
<DatePicker.Date {date} month={month.value} />
</DatePicker.Cell>
{/each}
</DatePicker.GridRow>
{/each}
</DatePicker.GridBody>
</DatePicker.Grid>
{/each}
</DatePicker.Calendar>
</DatePicker.Content>
</DatePicker.Root>
```

<APISection {schemas} />
36 changes: 36 additions & 0 deletions content/components/date-range-field.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
title: Date Range Field
description: Allows users to input a range of dates within a designated field.
---

<script>
import { APISection, ComponentPreview, DateRangeFieldDemo } from '@/components'
export let schemas;
</script>

<ComponentPreview name="date-range-field-demo" comp="Date Range Field">

<DateRangeFieldDemo slot="preview" />

</ComponentPreview>

## Structure

```svelte
<script lang="ts">
import { DateField } from "$lib";
</script>
<DateField.Root>
<DateField.Label>Check-in date</DateField.Label>
<DateField.Input let:segments>
{#each segments as { part, value }}
<DateField.Segment {part}>
{value}
</DateField.Segment>
{/each}
</DateField.Input>
</DateField.Root>
```

<APISection {schemas} />
Loading

0 comments on commit 489f34d

Please sign in to comment.