bits-ui 1.0.0-next.35 → 1.0.0-next.37
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.
|
@@ -56,7 +56,7 @@ declare class PaginationPageState {
|
|
|
56
56
|
constructor(props: PaginationPageStateProps, root: PaginationRootState);
|
|
57
57
|
props: {
|
|
58
58
|
readonly id: string;
|
|
59
|
-
readonly "aria-label": `Page ${
|
|
59
|
+
readonly "aria-label": `Page ${number}`;
|
|
60
60
|
readonly "data-value": `${number}`;
|
|
61
61
|
readonly "data-selected": "" | undefined;
|
|
62
62
|
readonly "data-pagination-page": "";
|
|
@@ -119,7 +119,7 @@ class PaginationPageState {
|
|
|
119
119
|
};
|
|
120
120
|
props = $derived.by(() => ({
|
|
121
121
|
id: this.#id.current,
|
|
122
|
-
"aria-label": `Page ${this.page.current}`,
|
|
122
|
+
"aria-label": `Page ${this.page.current.value}`,
|
|
123
123
|
"data-value": `${this.page.current.value}`,
|
|
124
124
|
"data-selected": this.#isSelected ? "" : undefined,
|
|
125
125
|
[PAGE_ATTR]: "",
|
|
@@ -114,6 +114,23 @@ export class RangeCalendarRootState {
|
|
|
114
114
|
return;
|
|
115
115
|
node.textContent = this.fullCalendarLabel;
|
|
116
116
|
});
|
|
117
|
+
/**
|
|
118
|
+
* Synchronize the start and end values with the `value` in case
|
|
119
|
+
* it is updated externally.
|
|
120
|
+
*/
|
|
121
|
+
$effect(() => {
|
|
122
|
+
const value = this.value.current;
|
|
123
|
+
untrack(() => {
|
|
124
|
+
if (value.start && value.end) {
|
|
125
|
+
this.startValue.current = value.start;
|
|
126
|
+
this.endValue.current = value.end;
|
|
127
|
+
}
|
|
128
|
+
else if (value.start) {
|
|
129
|
+
this.startValue.current = value.start;
|
|
130
|
+
this.endValue.current = undefined;
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
});
|
|
117
134
|
/**
|
|
118
135
|
* Synchronize the placeholder value with the current start value
|
|
119
136
|
*/
|