diff --git a/.changeset/real-cups-warn.md b/.changeset/real-cups-warn.md new file mode 100644 index 0000000000..09c76a2aec --- /dev/null +++ b/.changeset/real-cups-warn.md @@ -0,0 +1,5 @@ +--- +"@zag-js/date-picker": minor +--- + +Removed unused part label. Renamed header to rowHeader to be more precise. diff --git a/packages/machines/date-picker/src/date-picker.anatomy.ts b/packages/machines/date-picker/src/date-picker.anatomy.ts index 7469cf521f..6e39919975 100644 --- a/packages/machines/date-picker/src/date-picker.anatomy.ts +++ b/packages/machines/date-picker/src/date-picker.anatomy.ts @@ -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", diff --git a/packages/machines/date-picker/src/date-picker.connect.ts b/packages/machines/date-picker/src/date-picker.connect.ts index a9b4bc81b8..b34e067a08 100644 --- a/packages/machines/date-picker/src/date-picker.connect.ts +++ b/packages/machines/date-picker/src/date-picker.connect.ts @@ -520,7 +520,7 @@ export function connect(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,