@ark-ui/react 3.12.0 → 3.12.1

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.
@@ -13,16 +13,9 @@ const DatePickerYearSelect = react.forwardRef(
13
13
  (props, ref) => {
14
14
  const datePicker = useDatePickerContext.useDatePickerContext();
15
15
  const mergedProps = react$1.mergeProps(datePicker.getYearSelectProps(), props);
16
- return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.select, { ...mergedProps, ref, children: getYearsRange({ from: 1e3, to: 4e3 }).map((year, i) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: year, children: year }, i)) });
16
+ return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.select, { ...mergedProps, ref, children: datePicker.getYears().map((year, i) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: year.value, children: year.label }, i)) });
17
17
  }
18
18
  );
19
19
  DatePickerYearSelect.displayName = "DatePickerYearSelect";
20
- function getYearsRange(range) {
21
- const years = [];
22
- for (let year = range.from; year <= range.to; year += 1) {
23
- years.push(year);
24
- }
25
- return years;
26
- }
27
20
 
28
21
  exports.DatePickerYearSelect = DatePickerYearSelect;
@@ -9,16 +9,9 @@ const DatePickerYearSelect = forwardRef(
9
9
  (props, ref) => {
10
10
  const datePicker = useDatePickerContext();
11
11
  const mergedProps = mergeProps(datePicker.getYearSelectProps(), props);
12
- return /* @__PURE__ */ jsx(ark.select, { ...mergedProps, ref, children: getYearsRange({ from: 1e3, to: 4e3 }).map((year, i) => /* @__PURE__ */ jsx("option", { value: year, children: year }, i)) });
12
+ return /* @__PURE__ */ jsx(ark.select, { ...mergedProps, ref, children: datePicker.getYears().map((year, i) => /* @__PURE__ */ jsx("option", { value: year.value, children: year.label }, i)) });
13
13
  }
14
14
  );
15
15
  DatePickerYearSelect.displayName = "DatePickerYearSelect";
16
- function getYearsRange(range) {
17
- const years = [];
18
- for (let year = range.from; year <= range.to; year += 1) {
19
- years.push(year);
20
- }
21
- return years;
22
- }
23
16
 
24
17
  export { DatePickerYearSelect };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ark-ui/react",
3
- "version": "3.12.0",
3
+ "version": "3.12.1",
4
4
  "description": "A collection of unstyled, accessible UI components for React, utilizing state machines for seamless interaction.",
5
5
  "keywords": [
6
6
  "accordion",
@@ -132,56 +132,56 @@
132
132
  "sideEffects": false,
133
133
  "dependencies": {
134
134
  "@internationalized/date": "3.5.5",
135
- "@zag-js/accordion": "0.68.0",
136
- "@zag-js/anatomy": "0.68.0",
137
- "@zag-js/avatar": "0.68.0",
138
- "@zag-js/carousel": "0.68.0",
139
- "@zag-js/checkbox": "0.68.0",
140
- "@zag-js/clipboard": "0.68.0",
141
- "@zag-js/collapsible": "0.68.0",
142
- "@zag-js/color-picker": "0.68.0",
143
- "@zag-js/color-utils": "0.68.0",
144
- "@zag-js/combobox": "0.68.0",
145
- "@zag-js/core": "0.68.0",
146
- "@zag-js/date-picker": "0.68.0",
147
- "@zag-js/date-utils": "0.68.0",
148
- "@zag-js/dialog": "0.68.0",
149
- "@zag-js/dom-query": "0.68.0",
150
- "@zag-js/editable": "0.68.0",
151
- "@zag-js/file-upload": "0.68.0",
152
- "@zag-js/file-utils": "0.68.0",
153
- "@zag-js/highlight-word": "0.68.0",
154
- "@zag-js/hover-card": "0.68.0",
155
- "@zag-js/i18n-utils": "0.68.0",
156
- "@zag-js/menu": "0.68.0",
157
- "@zag-js/number-input": "0.68.0",
158
- "@zag-js/pagination": "0.68.0",
159
- "@zag-js/pin-input": "0.68.0",
160
- "@zag-js/popover": "0.68.0",
161
- "@zag-js/presence": "0.68.0",
162
- "@zag-js/progress": "0.68.0",
163
- "@zag-js/qr-code": "0.68.0",
164
- "@zag-js/radio-group": "0.68.0",
165
- "@zag-js/rating-group": "0.68.0",
166
- "@zag-js/react": "0.68.0",
167
- "@zag-js/select": "0.68.0",
168
- "@zag-js/signature-pad": "0.68.0",
169
- "@zag-js/slider": "0.68.0",
170
- "@zag-js/splitter": "0.68.0",
171
- "@zag-js/steps": "0.68.0",
172
- "@zag-js/switch": "0.68.0",
173
- "@zag-js/tabs": "0.68.0",
174
- "@zag-js/tags-input": "0.68.0",
175
- "@zag-js/time-picker": "0.68.0",
176
- "@zag-js/timer": "0.68.0",
177
- "@zag-js/toast": "0.68.0",
178
- "@zag-js/toggle-group": "0.68.0",
179
- "@zag-js/tooltip": "0.68.0",
180
- "@zag-js/tree-view": "0.68.0",
181
- "@zag-js/types": "0.68.0"
135
+ "@zag-js/accordion": "0.68.1",
136
+ "@zag-js/anatomy": "0.68.1",
137
+ "@zag-js/avatar": "0.68.1",
138
+ "@zag-js/carousel": "0.68.1",
139
+ "@zag-js/checkbox": "0.68.1",
140
+ "@zag-js/clipboard": "0.68.1",
141
+ "@zag-js/collapsible": "0.68.1",
142
+ "@zag-js/color-picker": "0.68.1",
143
+ "@zag-js/color-utils": "0.68.1",
144
+ "@zag-js/combobox": "0.68.1",
145
+ "@zag-js/core": "0.68.1",
146
+ "@zag-js/date-picker": "0.68.1",
147
+ "@zag-js/date-utils": "0.68.1",
148
+ "@zag-js/dialog": "0.68.1",
149
+ "@zag-js/dom-query": "0.68.1",
150
+ "@zag-js/editable": "0.68.1",
151
+ "@zag-js/file-upload": "0.68.1",
152
+ "@zag-js/file-utils": "0.68.1",
153
+ "@zag-js/highlight-word": "0.68.1",
154
+ "@zag-js/hover-card": "0.68.1",
155
+ "@zag-js/i18n-utils": "0.68.1",
156
+ "@zag-js/menu": "0.68.1",
157
+ "@zag-js/number-input": "0.68.1",
158
+ "@zag-js/pagination": "0.68.1",
159
+ "@zag-js/pin-input": "0.68.1",
160
+ "@zag-js/popover": "0.68.1",
161
+ "@zag-js/presence": "0.68.1",
162
+ "@zag-js/progress": "0.68.1",
163
+ "@zag-js/qr-code": "0.68.1",
164
+ "@zag-js/radio-group": "0.68.1",
165
+ "@zag-js/rating-group": "0.68.1",
166
+ "@zag-js/react": "0.68.1",
167
+ "@zag-js/select": "0.68.1",
168
+ "@zag-js/signature-pad": "0.68.1",
169
+ "@zag-js/slider": "0.68.1",
170
+ "@zag-js/splitter": "0.68.1",
171
+ "@zag-js/steps": "0.68.1",
172
+ "@zag-js/switch": "0.68.1",
173
+ "@zag-js/tabs": "0.68.1",
174
+ "@zag-js/tags-input": "0.68.1",
175
+ "@zag-js/time-picker": "0.68.1",
176
+ "@zag-js/timer": "0.68.1",
177
+ "@zag-js/toast": "0.68.1",
178
+ "@zag-js/toggle-group": "0.68.1",
179
+ "@zag-js/tooltip": "0.68.1",
180
+ "@zag-js/tree-view": "0.68.1",
181
+ "@zag-js/types": "0.68.1"
182
182
  },
183
183
  "devDependencies": {
184
- "@biomejs/biome": "1.9.0",
184
+ "@biomejs/biome": "1.9.1",
185
185
  "@release-it/keep-a-changelog": "5.0.0",
186
186
  "@storybook/addon-a11y": "8.3.0",
187
187
  "@storybook/addon-essentials": "8.3.0",
@@ -195,7 +195,7 @@
195
195
  "@types/react": "18.3.5",
196
196
  "@types/react-dom": "18.3.0",
197
197
  "@vitejs/plugin-react": "4.3.1",
198
- "@zag-js/stringify-state": "0.68.0",
198
+ "@zag-js/stringify-state": "0.68.1",
199
199
  "globby": "14.0.2",
200
200
  "jsdom": "25.0.0",
201
201
  "lucide-react": "0.441.0",
@@ -207,7 +207,7 @@
207
207
  "resize-observer-polyfill": "1.5.1",
208
208
  "storybook": "8.3.0",
209
209
  "typescript": "5.6.2",
210
- "vite": "5.4.5",
210
+ "vite": "5.4.6",
211
211
  "vite-plugin-dts": "4.2.1",
212
212
  "vitest": "2.1.1",
213
213
  "vitest-axe": "1.0.0-pre.3"