Skip to content

Commit

Permalink
feat(date-picker): udpate date picker anatomy to match machine
Browse files Browse the repository at this point in the history
  • Loading branch information
cschroeter committed Aug 4, 2023
1 parent a52a57d commit dfa8b39
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/real-cups-warn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@zag-js/date-picker": minor
---

Removed unused part label. Renamed header to rowHeader to be more precise.
3 changes: 1 addition & 2 deletions packages/machines/date-picker/src/date-picker.anatomy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@ export const anatomy = createAnatomy("date-picker").parts(
"content",
"control",
"grid",
"header",
"input",
"label",
"monthSelect",
"nextTrigger",
"positioner",
"prevTrigger",
"rowHeader",
"trigger",
"viewTrigger",
"yearSelect",
Expand Down
2 changes: 1 addition & 1 deletion packages/machines/date-picker/src/date-picker.connect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ export function connect<T extends PropTypes>(state: State, send: Send, normalize
getHeaderProps(props: ViewProps = {}) {
const { view = "day" } = props
return normalize.element({
...parts.header.attrs,
...parts.rowHeader.attrs,
"aria-hidden": true,
dir: state.context.dir,
"data-type": view,
Expand Down

4 comments on commit dfa8b39

@vercel
Copy link

@vercel vercel bot commented on dfa8b39 Aug 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on dfa8b39 Aug 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

zag-nextjs – ./examples/next-ts

zag-nextjs-chakra-ui.vercel.app
zag-nextjs-git-main-chakra-ui.vercel.app
zag-two.vercel.app

@vercel
Copy link

@vercel vercel bot commented on dfa8b39 Aug 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

zag-vue – ./examples/vue-ts

zag-vue-chakra-ui.vercel.app
zag-vue-git-main-chakra-ui.vercel.app
zag-vue.vercel.app

@vercel
Copy link

@vercel vercel bot commented on dfa8b39 Aug 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

zag-solid – ./examples/solid-ts

zag-solid.vercel.app
zag-solid-git-main-chakra-ui.vercel.app
zag-solid-chakra-ui.vercel.app

Please sign in to comment.