Skip to content

Commit ac5d727

Browse files
authored
docs(DatePicker): fix API reference (#1798)
1 parent fcb7b36 commit ac5d727

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+948
-1922
lines changed

docs/src/lib/content/api-reference/calendar.api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ export const root = defineComponentApiSchema<CalendarRootPropsWithoutHTML>({
162162
}),
163163
disabled: defineBooleanProp({
164164
default: false,
165-
description: "Whether or not the accordion is disabled.",
165+
description: "Whether or not the calendar is disabled.",
166166
}),
167167
readonly: defineBooleanProp({
168168
description: "Whether or not the calendar is readonly.",

docs/src/lib/content/api-reference/date-picker.api.ts

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export const root = defineComponentApiSchema<DatePickerRootPropsWithoutHTML>({
3838
title: "Root",
3939
description: "The root date picker component.",
4040
props: {
41-
value: calendarRoot.props!.value,
41+
value: dateFieldRoot.props!.value,
4242
onValueChange: calendarRoot.props!.onValueChange,
4343
open: defineBooleanProp({
4444
default: false,
@@ -71,8 +71,14 @@ export const root = defineComponentApiSchema<DatePickerRootPropsWithoutHTML>({
7171
minValue: calendarRoot.props!.minValue,
7272
locale: calendarRoot.props!.locale,
7373
numberOfMonths: calendarRoot.props!.numberOfMonths,
74-
disabled: calendarRoot.props!.disabled,
75-
readonly: dateFieldRoot.props!.readonly,
74+
disabled: defineBooleanProp({
75+
default: false,
76+
description: "Whether or not the Date Picker is disabled.",
77+
}),
78+
readonly: defineBooleanProp({
79+
description: "Whether or not the Date Picker is readonly.",
80+
default: false,
81+
}),
7682
hourCycle: dateFieldRoot.props!.hourCycle,
7783
granularity: dateFieldRoot.props!.granularity,
7884
hideTimeZone: dateFieldRoot.props!.hideTimeZone,
@@ -81,24 +87,7 @@ export const root = defineComponentApiSchema<DatePickerRootPropsWithoutHTML>({
8187
yearFormat: calendarRoot.props!.yearFormat,
8288
children: childrenSnippet(),
8389
},
84-
dataAttributes: [
85-
defineSimpleDataAttr({
86-
name: "invalid",
87-
description: "Present on the root element when the calendar is invalid.",
88-
}),
89-
defineSimpleDataAttr({
90-
name: "disabled",
91-
description: "Present on the root element when the calendar is disabled.",
92-
}),
93-
defineSimpleDataAttr({
94-
name: "readonly",
95-
description: "Present on the root element when the calendar is readonly.",
96-
}),
97-
defineSimpleDataAttr({
98-
name: "date-picker-root",
99-
description: "Present on the root element.",
100-
}),
101-
],
90+
dataAttributes: [],
10291
});
10392

10493
const calendar = defineComponentApiSchema<DatePickerCalendarPropsWithoutHTML>({

pnpm-lock.yaml

Lines changed: 0 additions & 359 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/other/setup-test.ts

Lines changed: 0 additions & 58 deletions
This file was deleted.

tests/package.json

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,9 @@
1515
"@sveltejs/kit": "catalog:",
1616
"@sveltejs/vite-plugin-svelte": "catalog:",
1717
"@tailwindcss/vite": "catalog:",
18-
"@testing-library/dom": "^10.4.0",
19-
"@testing-library/jest-dom": "^6.6.3",
20-
"@testing-library/svelte": "^5.2.8",
21-
"@testing-library/user-event": "^14.5.2",
22-
"@types/jest-axe": "^3.5.9",
2318
"@types/node": "catalog:",
24-
"@types/resize-observer-browser": "^0.1.11",
25-
"@types/testing-library__jest-dom": "^5.14.9",
2619
"@vitest/browser": "^3.2.4",
27-
"jest-axe": "^9.0.0",
28-
"jsdom": "^24.1.3",
2920
"playwright": "catalog:",
30-
"resize-observer-polyfill": "^1.5.1",
3121
"svelte": "catalog:",
3222
"svelte-check": "catalog:",
3323
"tailwindcss": "catalog:",

0 commit comments

Comments
 (0)