@autoguru/overdrive 4.45.2 → 4.47.0
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.
- package/dist/components/Calendar/Calendar.css.d.ts +8 -0
- package/dist/components/Calendar/Calendar.css.d.ts.map +1 -0
- package/dist/components/Calendar/Calendar.css.js +113 -0
- package/dist/components/Calendar/Calendar.d.ts +64 -0
- package/dist/components/Calendar/Calendar.d.ts.map +1 -0
- package/dist/components/Calendar/Calendar.js +122 -0
- package/dist/components/Calendar/CalendarButton.d.ts +7 -0
- package/dist/components/Calendar/CalendarButton.d.ts.map +1 -0
- package/dist/components/{DateTimePicker → Calendar}/CalendarButton.js +4 -3
- package/dist/components/{DateTimePicker → Calendar}/CalendarGrid.d.ts +4 -1
- package/dist/components/Calendar/CalendarGrid.d.ts.map +1 -0
- package/dist/components/{DateTimePicker → Calendar}/CalendarGrid.js +8 -7
- package/dist/components/Calendar/index.d.ts +3 -0
- package/dist/components/Calendar/index.d.ts.map +1 -0
- package/dist/components/Calendar/index.js +3 -0
- package/dist/components/DatePicker/DatePicker.css.d.ts +2 -1
- package/dist/components/DatePicker/DatePicker.css.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePicker.css.js +60 -30
- package/dist/components/DatePicker/DatePicker.d.ts +83 -5
- package/dist/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePicker.js +160 -43
- package/dist/components/DateTimePicker/DateTimePicker.css.d.ts +0 -15
- package/dist/components/DateTimePicker/DateTimePicker.css.d.ts.map +1 -1
- package/dist/components/DateTimePicker/DateTimePicker.css.js +16 -99
- package/dist/components/DateTimePicker/DateTimePicker.d.ts +5 -2
- package/dist/components/DateTimePicker/DateTimePicker.d.ts.map +1 -1
- package/dist/components/DateTimePicker/DateTimePicker.js +24 -80
- package/dist/components/OptionGrid/OptionGrid.css.d.ts +33 -34
- package/dist/components/OptionGrid/OptionGrid.css.d.ts.map +1 -1
- package/dist/components/OptionGrid/OptionGrid.css.js +208 -146
- package/dist/components/OptionGrid/OptionGrid.d.ts +16 -5
- package/dist/components/OptionGrid/OptionGrid.d.ts.map +1 -1
- package/dist/components/OptionGrid/OptionGrid.js +38 -13
- package/dist/components/OptionList/OptionList.css.d.ts +2 -10
- package/dist/components/OptionList/OptionList.css.d.ts.map +1 -1
- package/dist/components/OptionList/OptionList.css.js +92 -92
- package/dist/components/OptionList/OptionList.d.ts +10 -3
- package/dist/components/OptionList/OptionList.d.ts.map +1 -1
- package/dist/components/OptionList/OptionListItem.js +3 -3
- package/dist/components/Popover/Popover.css.d.ts +4 -0
- package/dist/components/Popover/Popover.css.d.ts.map +1 -0
- package/dist/components/Popover/Popover.css.js +46 -0
- package/dist/components/Popover/Popover.d.ts +34 -0
- package/dist/components/Popover/Popover.d.ts.map +1 -0
- package/dist/components/Popover/Popover.js +127 -0
- package/dist/components/Popover/PopoverTrigger.d.ts +51 -0
- package/dist/components/Popover/PopoverTrigger.d.ts.map +1 -0
- package/dist/components/Popover/PopoverTrigger.js +94 -0
- package/dist/components/Popover/index.d.ts +5 -0
- package/dist/components/Popover/index.d.ts.map +1 -0
- package/dist/components/Popover/index.js +4 -0
- package/dist/components/SearchBar/SearchBar.css.d.ts +7 -12
- package/dist/components/SearchBar/SearchBar.css.d.ts.map +1 -1
- package/dist/components/SearchBar/SearchBar.css.js +121 -66
- package/dist/components/SearchBar/SearchBar.d.ts.map +1 -1
- package/dist/components/SearchBar/SearchBar.js +17 -10
- package/dist/components/Slider/Slider.css.d.ts +9 -0
- package/dist/components/Slider/Slider.css.d.ts.map +1 -0
- package/dist/components/Slider/Slider.css.js +92 -0
- package/dist/components/Slider/Slider.d.ts +47 -0
- package/dist/components/Slider/Slider.d.ts.map +1 -0
- package/dist/components/Slider/Slider.js +137 -0
- package/dist/components/Slider/index.d.ts +2 -0
- package/dist/components/Slider/index.d.ts.map +1 -0
- package/dist/components/Slider/index.js +3 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +1 -0
- package/dist/hooks/useMedia/useMedia.spec.d.ts +2 -0
- package/dist/hooks/useMedia/useMedia.spec.d.ts.map +1 -0
- package/dist/hooks/useMedia/useMedia.spec.js +288 -0
- package/dist/styles/selectors.d.ts +14 -0
- package/dist/styles/selectors.d.ts.map +1 -0
- package/dist/styles/selectors.js +27 -0
- package/dist/utils/css.d.ts +0 -22
- package/dist/utils/css.d.ts.map +1 -1
- package/dist/utils/css.js +0 -52
- package/dist/utils/css.spec.d.ts +2 -0
- package/dist/utils/css.spec.d.ts.map +1 -0
- package/dist/utils/css.spec.js +66 -0
- package/dist/utils/dateFormat.d.ts +24 -0
- package/dist/utils/dateFormat.d.ts.map +1 -0
- package/dist/utils/dateFormat.js +57 -0
- package/dist/utils/object.spec.d.ts +2 -0
- package/dist/utils/object.spec.d.ts.map +1 -0
- package/dist/utils/object.spec.js +135 -0
- package/dist/utils/responsiveStyle.spec.d.ts +2 -0
- package/dist/utils/responsiveStyle.spec.d.ts.map +1 -0
- package/dist/utils/responsiveStyle.spec.js +134 -0
- package/dist/utils/utils.spec.d.ts.map +1 -1
- package/dist/utils/utils.spec.js +342 -0
- package/package.json +25 -25
- package/dist/components/DateTimePicker/CalendarButton.d.ts +0 -4
- package/dist/components/DateTimePicker/CalendarButton.d.ts.map +0 -1
- package/dist/components/DateTimePicker/CalendarGrid.d.ts.map +0 -1
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { renderHook, act } from '@testing-library/react';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { describe, expect, it, vi, beforeEach, afterEach } from 'vitest';
|
|
6
|
+
import { useId, setRef, mergeRefs, isHtmlElement, hex2rgba, ownerDocument, ownerWindow, useEventCallback, useUncontrolledState, useInputControlledState, animate, arrayRingLookup } from "./index.js"; // Mock requestAnimationFrame for animate tests
|
|
7
|
+
const mockRequestAnimationFrame = vi.fn();
|
|
8
|
+
const mockCancelAnimationFrame = vi.fn();
|
|
9
|
+
Object.defineProperty(window, 'requestAnimationFrame', {
|
|
10
|
+
writable: true,
|
|
11
|
+
value: mockRequestAnimationFrame
|
|
12
|
+
});
|
|
13
|
+
Object.defineProperty(window, 'cancelAnimationFrame', {
|
|
14
|
+
writable: true,
|
|
15
|
+
value: mockCancelAnimationFrame
|
|
16
|
+
});
|
|
17
|
+
describe('Utils', () => {
|
|
18
|
+
beforeEach(() => {
|
|
19
|
+
vi.clearAllMocks();
|
|
20
|
+
mockRequestAnimationFrame.mockClear();
|
|
21
|
+
mockCancelAnimationFrame.mockClear();
|
|
22
|
+
});
|
|
23
|
+
afterEach(() => {
|
|
24
|
+
vi.restoreAllMocks();
|
|
25
|
+
});
|
|
26
|
+
describe('useId', () => {
|
|
27
|
+
it('generates unique IDs', () => {
|
|
28
|
+
const {
|
|
29
|
+
result: result1
|
|
30
|
+
} = renderHook(() => useId());
|
|
31
|
+
const {
|
|
32
|
+
result: result2
|
|
33
|
+
} = renderHook(() => useId());
|
|
34
|
+
expect(result1.current).toBeTruthy();
|
|
35
|
+
expect(result2.current).toBeTruthy();
|
|
36
|
+
expect(result1.current).not.toBe(result2.current);
|
|
37
|
+
});
|
|
38
|
+
it('generates consistent ID for same hook instance', () => {
|
|
39
|
+
const {
|
|
40
|
+
result,
|
|
41
|
+
rerender
|
|
42
|
+
} = renderHook(() => useId());
|
|
43
|
+
const firstId = result.current;
|
|
44
|
+
rerender();
|
|
45
|
+
expect(result.current).toBe(firstId);
|
|
46
|
+
});
|
|
47
|
+
it('uses provided prefix', () => {
|
|
48
|
+
const {
|
|
49
|
+
result
|
|
50
|
+
} = renderHook(() => useId('test-prefix'));
|
|
51
|
+
expect(result.current).toContain('test-prefix');
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
describe('setRef', () => {
|
|
55
|
+
it('sets ref object current value', () => {
|
|
56
|
+
const refObject = {
|
|
57
|
+
current: null
|
|
58
|
+
};
|
|
59
|
+
const value = document.createElement('div');
|
|
60
|
+
setRef(refObject, value);
|
|
61
|
+
expect(refObject.current).toBe(value);
|
|
62
|
+
});
|
|
63
|
+
it('calls ref function', () => {
|
|
64
|
+
const refFunction = vi.fn();
|
|
65
|
+
const value = document.createElement('div');
|
|
66
|
+
setRef(refFunction, value);
|
|
67
|
+
expect(refFunction).toHaveBeenCalledWith(value);
|
|
68
|
+
});
|
|
69
|
+
it('handles null ref gracefully', () => {
|
|
70
|
+
const value = document.createElement('div');
|
|
71
|
+
expect(() => setRef(null, value)).not.toThrow();
|
|
72
|
+
});
|
|
73
|
+
it('handles undefined ref gracefully', () => {
|
|
74
|
+
const value = document.createElement('div');
|
|
75
|
+
expect(() => setRef(undefined, value)).not.toThrow();
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
describe('mergeRefs', () => {
|
|
79
|
+
it('merges ref objects', () => {
|
|
80
|
+
const ref1 = /*#__PURE__*/React.createRef();
|
|
81
|
+
const ref2 = /*#__PURE__*/React.createRef();
|
|
82
|
+
const value = document.createElement('div');
|
|
83
|
+
const mergedRef = mergeRefs([ref1, ref2]);
|
|
84
|
+
mergedRef(value);
|
|
85
|
+
expect(ref1.current).toBe(value);
|
|
86
|
+
expect(ref2.current).toBe(value);
|
|
87
|
+
});
|
|
88
|
+
it('merges ref functions', () => {
|
|
89
|
+
const ref1 = vi.fn();
|
|
90
|
+
const ref2 = vi.fn();
|
|
91
|
+
const value = document.createElement('div');
|
|
92
|
+
const mergedRef = mergeRefs([ref1, ref2]);
|
|
93
|
+
mergedRef(value);
|
|
94
|
+
expect(ref1).toHaveBeenCalledWith(value);
|
|
95
|
+
expect(ref2).toHaveBeenCalledWith(value);
|
|
96
|
+
});
|
|
97
|
+
it('handles mixed ref types', () => {
|
|
98
|
+
const refObject = /*#__PURE__*/React.createRef();
|
|
99
|
+
const refFunction = vi.fn();
|
|
100
|
+
const value = document.createElement('div');
|
|
101
|
+
const mergedRef = mergeRefs([refObject, refFunction]);
|
|
102
|
+
mergedRef(value);
|
|
103
|
+
expect(refObject.current).toBe(value);
|
|
104
|
+
expect(refFunction).toHaveBeenCalledWith(value);
|
|
105
|
+
});
|
|
106
|
+
it('handles null and undefined refs', () => {
|
|
107
|
+
const ref = /*#__PURE__*/React.createRef();
|
|
108
|
+
const value = document.createElement('div');
|
|
109
|
+
const mergedRef = mergeRefs([ref, null, undefined]);
|
|
110
|
+
expect(() => mergedRef(value)).not.toThrow();
|
|
111
|
+
expect(ref.current).toBe(value);
|
|
112
|
+
});
|
|
113
|
+
});
|
|
114
|
+
describe('isHtmlElement', () => {
|
|
115
|
+
it('returns true for Element instances', () => {
|
|
116
|
+
const div = document.createElement('div');
|
|
117
|
+
expect(isHtmlElement(div)).toBe(true);
|
|
118
|
+
});
|
|
119
|
+
it('returns true for Document instances', () => {
|
|
120
|
+
expect(isHtmlElement(document)).toBe(true);
|
|
121
|
+
});
|
|
122
|
+
it('returns false for non-DOM objects', () => {
|
|
123
|
+
expect(isHtmlElement({})).toBe(false);
|
|
124
|
+
expect(isHtmlElement('string')).toBe(false);
|
|
125
|
+
expect(isHtmlElement(123)).toBe(false);
|
|
126
|
+
expect(isHtmlElement(null)).toBe(false);
|
|
127
|
+
let undefinedValue;
|
|
128
|
+
expect(isHtmlElement(undefinedValue)).toBe(false);
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
describe('hex2rgba', () => {
|
|
132
|
+
it('converts hex color to rgba', () => {
|
|
133
|
+
expect(hex2rgba('#ff0000')).toBe('rgb(255,0,0,1)');
|
|
134
|
+
expect(hex2rgba('#00ff00')).toBe('rgb(0,255,0,1)');
|
|
135
|
+
expect(hex2rgba('#0000ff')).toBe('rgb(0,0,255,1)');
|
|
136
|
+
});
|
|
137
|
+
it('handles custom alpha values', () => {
|
|
138
|
+
expect(hex2rgba('#ff0000', '0.5')).toBe('rgb(255,0,0,0.5)');
|
|
139
|
+
expect(hex2rgba('#000000', '0')).toBe('rgb(0,0,0,0)');
|
|
140
|
+
});
|
|
141
|
+
it('handles uppercase hex values', () => {
|
|
142
|
+
expect(hex2rgba('#FF0000')).toBe('rgb(255,0,0,1)');
|
|
143
|
+
});
|
|
144
|
+
it('handles mixed case hex values', () => {
|
|
145
|
+
expect(hex2rgba('#Ff00Aa')).toBe('rgb(255,0,170,1)');
|
|
146
|
+
});
|
|
147
|
+
});
|
|
148
|
+
describe('ownerDocument', () => {
|
|
149
|
+
it('returns node ownerDocument when available', () => {
|
|
150
|
+
const div = document.createElement('div');
|
|
151
|
+
expect(ownerDocument(div)).toBe(document);
|
|
152
|
+
});
|
|
153
|
+
it('returns global document when node is undefined', () => {
|
|
154
|
+
expect(ownerDocument()).toBe(document);
|
|
155
|
+
});
|
|
156
|
+
it('returns global document when node has no ownerDocument', () => {
|
|
157
|
+
const nodeWithoutOwner = {
|
|
158
|
+
ownerDocument: null
|
|
159
|
+
};
|
|
160
|
+
expect(ownerDocument(nodeWithoutOwner)).toBe(document);
|
|
161
|
+
});
|
|
162
|
+
});
|
|
163
|
+
describe('ownerWindow', () => {
|
|
164
|
+
it('returns window from node ownerDocument', () => {
|
|
165
|
+
const div = document.createElement('div');
|
|
166
|
+
expect(ownerWindow(div)).toBe(window);
|
|
167
|
+
});
|
|
168
|
+
it('returns global window when node is undefined', () => {
|
|
169
|
+
expect(ownerWindow()).toBe(window);
|
|
170
|
+
});
|
|
171
|
+
});
|
|
172
|
+
describe('useEventCallback', () => {
|
|
173
|
+
it('returns a stable callback function', () => {
|
|
174
|
+
const fn = vi.fn();
|
|
175
|
+
const {
|
|
176
|
+
result,
|
|
177
|
+
rerender
|
|
178
|
+
} = renderHook(() => useEventCallback(fn));
|
|
179
|
+
const callback1 = result.current;
|
|
180
|
+
rerender();
|
|
181
|
+
const callback2 = result.current;
|
|
182
|
+
expect(callback1).toBe(callback2);
|
|
183
|
+
});
|
|
184
|
+
it('calls the latest version of the function', () => {
|
|
185
|
+
let fn = vi.fn();
|
|
186
|
+
const {
|
|
187
|
+
result,
|
|
188
|
+
rerender
|
|
189
|
+
} = renderHook(({
|
|
190
|
+
fn
|
|
191
|
+
}) => useEventCallback(fn), {
|
|
192
|
+
initialProps: {
|
|
193
|
+
fn
|
|
194
|
+
}
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
// Call initial version
|
|
198
|
+
result.current('test1');
|
|
199
|
+
expect(fn).toHaveBeenCalledWith('test1');
|
|
200
|
+
|
|
201
|
+
// Update function and rerender
|
|
202
|
+
fn = vi.fn();
|
|
203
|
+
rerender({
|
|
204
|
+
fn
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
// Call updated version
|
|
208
|
+
result.current('test2');
|
|
209
|
+
expect(fn).toHaveBeenCalledWith('test2');
|
|
210
|
+
});
|
|
211
|
+
});
|
|
212
|
+
describe('useUncontrolledState', () => {
|
|
213
|
+
it('returns controlled state when onChange is provided', () => {
|
|
214
|
+
const onChange = vi.fn();
|
|
215
|
+
const {
|
|
216
|
+
result
|
|
217
|
+
} = renderHook(() => useUncontrolledState('test', onChange));
|
|
218
|
+
const [value, setter] = result.current;
|
|
219
|
+
expect(value).toBe('test');
|
|
220
|
+
expect(setter).toBe(onChange);
|
|
221
|
+
});
|
|
222
|
+
it('returns uncontrolled state when onChange is not provided', () => {
|
|
223
|
+
const {
|
|
224
|
+
result
|
|
225
|
+
} = renderHook(() => useUncontrolledState('test'));
|
|
226
|
+
const [value, setter] = result.current;
|
|
227
|
+
expect(value).toBe('test');
|
|
228
|
+
expect(typeof setter).toBe('function');
|
|
229
|
+
expect(setter).not.toBe(undefined);
|
|
230
|
+
});
|
|
231
|
+
it('updates uncontrolled state when setter is called', () => {
|
|
232
|
+
const {
|
|
233
|
+
result
|
|
234
|
+
} = renderHook(() => useUncontrolledState('initial'));
|
|
235
|
+
const [, setter] = result.current;
|
|
236
|
+
act(() => {
|
|
237
|
+
setter('updated');
|
|
238
|
+
});
|
|
239
|
+
const [newValue] = result.current;
|
|
240
|
+
expect(newValue).toBe('updated');
|
|
241
|
+
});
|
|
242
|
+
});
|
|
243
|
+
describe('useInputControlledState', () => {
|
|
244
|
+
it('returns controlled state when onChange is provided', () => {
|
|
245
|
+
const onChange = vi.fn();
|
|
246
|
+
const {
|
|
247
|
+
result
|
|
248
|
+
} = renderHook(() => useInputControlledState('test', onChange));
|
|
249
|
+
const [value, handler] = result.current;
|
|
250
|
+
expect(value).toBe('test');
|
|
251
|
+
expect(handler).toBe(onChange);
|
|
252
|
+
});
|
|
253
|
+
it('returns uncontrolled state when onChange is not provided', () => {
|
|
254
|
+
const {
|
|
255
|
+
result
|
|
256
|
+
} = renderHook(() => useInputControlledState('test'));
|
|
257
|
+
const [value, handler] = result.current;
|
|
258
|
+
expect(value).toBe('test');
|
|
259
|
+
expect(typeof handler).toBe('function');
|
|
260
|
+
});
|
|
261
|
+
it('handles input events in uncontrolled mode', () => {
|
|
262
|
+
const {
|
|
263
|
+
result
|
|
264
|
+
} = renderHook(() => useInputControlledState('initial'));
|
|
265
|
+
const [, handler] = result.current;
|
|
266
|
+
|
|
267
|
+
// Simulate input event
|
|
268
|
+
const event = {
|
|
269
|
+
target: {
|
|
270
|
+
value: 'new value'
|
|
271
|
+
}
|
|
272
|
+
};
|
|
273
|
+
act(() => {
|
|
274
|
+
handler(event);
|
|
275
|
+
});
|
|
276
|
+
const [newValue] = result.current;
|
|
277
|
+
expect(newValue).toBe('new value');
|
|
278
|
+
});
|
|
279
|
+
});
|
|
280
|
+
describe('animate', () => {
|
|
281
|
+
beforeEach(() => {
|
|
282
|
+
// Mock performance.now for consistent testing
|
|
283
|
+
vi.spyOn(performance, 'now').mockReturnValue(0);
|
|
284
|
+
});
|
|
285
|
+
it('returns cancellation function', () => {
|
|
286
|
+
const element = {
|
|
287
|
+
scrollTop: 0
|
|
288
|
+
};
|
|
289
|
+
const cancel = animate(element, 'scrollTop', 100);
|
|
290
|
+
expect(typeof cancel).toBe('function');
|
|
291
|
+
});
|
|
292
|
+
it('starts animation with requestAnimationFrame', () => {
|
|
293
|
+
const element = {
|
|
294
|
+
scrollTop: 0
|
|
295
|
+
};
|
|
296
|
+
animate(element, 'scrollTop', 100);
|
|
297
|
+
expect(mockRequestAnimationFrame).toHaveBeenCalled();
|
|
298
|
+
});
|
|
299
|
+
});
|
|
300
|
+
describe('arrayRingLookup', () => {
|
|
301
|
+
const array = ['a', 'b', 'c'];
|
|
302
|
+
it('returns function that looks up array values', () => {
|
|
303
|
+
const lookup = arrayRingLookup(array);
|
|
304
|
+
expect(typeof lookup).toBe('function');
|
|
305
|
+
});
|
|
306
|
+
it('handles positive indices', () => {
|
|
307
|
+
const lookup = arrayRingLookup(array);
|
|
308
|
+
expect(lookup(0)).toBe('a');
|
|
309
|
+
expect(lookup(1)).toBe('b');
|
|
310
|
+
expect(lookup(2)).toBe('c');
|
|
311
|
+
});
|
|
312
|
+
it('wraps around for indices beyond array length', () => {
|
|
313
|
+
const lookup = arrayRingLookup(array);
|
|
314
|
+
expect(lookup(3)).toBe('a');
|
|
315
|
+
expect(lookup(4)).toBe('b');
|
|
316
|
+
expect(lookup(5)).toBe('c');
|
|
317
|
+
});
|
|
318
|
+
it('handles negative indices', () => {
|
|
319
|
+
const lookup = arrayRingLookup(array);
|
|
320
|
+
expect(lookup(-1)).toBe('c');
|
|
321
|
+
expect(lookup(-2)).toBe('b');
|
|
322
|
+
expect(lookup(-3)).toBe('a');
|
|
323
|
+
});
|
|
324
|
+
it('handles large negative indices', () => {
|
|
325
|
+
const lookup = arrayRingLookup(array);
|
|
326
|
+
expect(lookup(-4)).toBe('c');
|
|
327
|
+
expect(lookup(-5)).toBe('b');
|
|
328
|
+
});
|
|
329
|
+
it('handles empty arrays', () => {
|
|
330
|
+
const lookup = arrayRingLookup([]);
|
|
331
|
+
expect(lookup(0)).toBeUndefined();
|
|
332
|
+
expect(lookup(1)).toBeUndefined();
|
|
333
|
+
expect(lookup(-1)).toBeUndefined();
|
|
334
|
+
});
|
|
335
|
+
it('handles single element arrays', () => {
|
|
336
|
+
const lookup = arrayRingLookup(['only']);
|
|
337
|
+
expect(lookup(0)).toBe('only');
|
|
338
|
+
expect(lookup(1)).toBe('only');
|
|
339
|
+
expect(lookup(-1)).toBe('only');
|
|
340
|
+
});
|
|
341
|
+
});
|
|
342
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@autoguru/overdrive",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.47.0",
|
|
4
4
|
"description": "Overdrive is a product component library, and design system for AutoGuru.",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -64,39 +64,39 @@
|
|
|
64
64
|
"@autoguru/tsconfig": "1.3.1",
|
|
65
65
|
"@autoguru/utilities": "^1.3.3",
|
|
66
66
|
"@babel/cli": "7.28.3",
|
|
67
|
-
"@babel/core": "7.28.
|
|
67
|
+
"@babel/core": "7.28.4",
|
|
68
68
|
"@babel/plugin-proposal-class-properties": "7.18.6",
|
|
69
69
|
"@babel/plugin-proposal-export-default-from": "7.27.1",
|
|
70
70
|
"@babel/plugin-proposal-nullish-coalescing-operator": "7.18.6",
|
|
71
71
|
"@babel/plugin-proposal-object-rest-spread": "7.20.7",
|
|
72
72
|
"@babel/plugin-proposal-optional-chaining": "7.21.0",
|
|
73
73
|
"@babel/plugin-syntax-dynamic-import": "7.8.3",
|
|
74
|
-
"@babel/plugin-transform-classes": "7.28.
|
|
74
|
+
"@babel/plugin-transform-classes": "7.28.4",
|
|
75
75
|
"@babel/plugin-transform-runtime": "7.28.3",
|
|
76
76
|
"@babel/plugin-transform-spread": "7.27.1",
|
|
77
77
|
"@babel/plugin-transform-strict-mode": "7.27.1",
|
|
78
78
|
"@babel/preset-env": "7.28.3",
|
|
79
79
|
"@babel/preset-react": "7.27.1",
|
|
80
80
|
"@babel/preset-typescript": "7.27.1",
|
|
81
|
-
"@babel/runtime-corejs3": "7.28.
|
|
81
|
+
"@babel/runtime-corejs3": "7.28.4",
|
|
82
82
|
"@changesets/cli": "2.29.6",
|
|
83
83
|
"@chromatic-com/storybook": "4.1.1",
|
|
84
|
-
"@internationalized/date": "3.
|
|
84
|
+
"@internationalized/date": "3.9.0",
|
|
85
85
|
"@octokit/rest": "22.0.0",
|
|
86
86
|
"@popperjs/core": "2.11.8",
|
|
87
|
-
"@react-stately/toggle": "3.
|
|
88
|
-
"@storybook/addon-a11y": "9.1.
|
|
89
|
-
"@storybook/addon-docs": "9.1.
|
|
90
|
-
"@storybook/addon-links": "9.1.
|
|
91
|
-
"@storybook/addon-onboarding": "9.1.
|
|
92
|
-
"@storybook/addon-vitest": "9.1.
|
|
93
|
-
"@storybook/react-vite": "9.1.
|
|
87
|
+
"@react-stately/toggle": "3.9.1",
|
|
88
|
+
"@storybook/addon-a11y": "9.1.5",
|
|
89
|
+
"@storybook/addon-docs": "9.1.5",
|
|
90
|
+
"@storybook/addon-links": "9.1.5",
|
|
91
|
+
"@storybook/addon-onboarding": "9.1.5",
|
|
92
|
+
"@storybook/addon-vitest": "9.1.5",
|
|
93
|
+
"@storybook/react-vite": "9.1.5",
|
|
94
94
|
"@testing-library/dom": "^10.4.1",
|
|
95
95
|
"@testing-library/jest-dom": "6.8.0",
|
|
96
96
|
"@testing-library/react": "16.3.0",
|
|
97
97
|
"@testing-library/react-hooks": "8.0.1",
|
|
98
98
|
"@testing-library/user-event": "14.6.1",
|
|
99
|
-
"@types/node": "24.3.
|
|
99
|
+
"@types/node": "24.3.1",
|
|
100
100
|
"@types/react": "19.1.12",
|
|
101
101
|
"@types/react-dom": "19.1.9",
|
|
102
102
|
"@types/webpack-env": "1.18.8",
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
"@vanilla-extract/webpack-plugin": "2.3.22",
|
|
111
111
|
"@vitest/browser": "3.2.4",
|
|
112
112
|
"@vitest/coverage-v8": "3.2.4",
|
|
113
|
-
"@vitest/eslint-plugin": "1.3.
|
|
113
|
+
"@vitest/eslint-plugin": "1.3.9",
|
|
114
114
|
"babel-plugin-add-import-extension": "1.6.0",
|
|
115
115
|
"babel-plugin-dev-expression": "0.2.3",
|
|
116
116
|
"babel-plugin-macros": "3.1.0",
|
|
@@ -124,35 +124,35 @@
|
|
|
124
124
|
"deepmerge": "4.3.1",
|
|
125
125
|
"es-toolkit": "1.39.10",
|
|
126
126
|
"eslint": "9.34.0",
|
|
127
|
-
"eslint-plugin-storybook": "9.1.
|
|
127
|
+
"eslint-plugin-storybook": "9.1.5",
|
|
128
128
|
"husky": "9.1.7",
|
|
129
129
|
"intersection-observer": "0.12.2",
|
|
130
130
|
"jsdom": "26.1.0",
|
|
131
|
-
"lint-staged": "16.1.
|
|
132
|
-
"magic-string": "0.30.
|
|
131
|
+
"lint-staged": "16.1.6",
|
|
132
|
+
"magic-string": "0.30.19",
|
|
133
133
|
"mini-css-extract-plugin": "2.9.4",
|
|
134
134
|
"mockdate": "3.0.5",
|
|
135
135
|
"playwright": "1.55.0",
|
|
136
|
-
"plop": "4.0.
|
|
136
|
+
"plop": "4.0.2",
|
|
137
137
|
"postcss": "8.5.6",
|
|
138
138
|
"prettier": "3.6.2",
|
|
139
139
|
"prop-types": "15.8.1",
|
|
140
140
|
"rand-seed": "3.0.0",
|
|
141
141
|
"react": "19.1.1",
|
|
142
|
-
"react-aria": "3.
|
|
143
|
-
"react-aria-components": "1.
|
|
142
|
+
"react-aria": "3.43.1",
|
|
143
|
+
"react-aria-components": "1.12.1",
|
|
144
144
|
"react-dom": "19.1.1",
|
|
145
145
|
"react-focus-lock": "2.13.6",
|
|
146
146
|
"react-intersection-observer": "9.16.0",
|
|
147
147
|
"react-keyed-flatten-children": "5.0.1",
|
|
148
|
-
"react-stately": "3.
|
|
148
|
+
"react-stately": "3.41.0",
|
|
149
149
|
"react-swipeable": "7.0.2",
|
|
150
150
|
"rollup-plugin-visualizer": "6.0.3",
|
|
151
|
-
"storybook": "9.1.
|
|
151
|
+
"storybook": "9.1.5",
|
|
152
152
|
"storybook-addon-tag-badges": "2.0.2",
|
|
153
153
|
"typescript": "5.9.2",
|
|
154
154
|
"url-loader": "4.1.1",
|
|
155
|
-
"vite": "7.1.
|
|
155
|
+
"vite": "7.1.5",
|
|
156
156
|
"vitest": "3.2.4",
|
|
157
157
|
"webpack": "5.101.3"
|
|
158
158
|
},
|
|
@@ -168,7 +168,7 @@
|
|
|
168
168
|
"csstype": "^3.1.3",
|
|
169
169
|
"es-toolkit": "^1.34.1",
|
|
170
170
|
"react": ">=18 || >=19.0.0-rc.0",
|
|
171
|
-
"react-aria": "^3.
|
|
171
|
+
"react-aria": "^3.43.1",
|
|
172
172
|
"react-dom": ">=18 || >=19.0.0-rc.0",
|
|
173
173
|
"react-focus-lock": "^2.13.6",
|
|
174
174
|
"react-intersection-observer": ">=9.16.0",
|
|
@@ -177,7 +177,7 @@
|
|
|
177
177
|
"webpack": "*"
|
|
178
178
|
},
|
|
179
179
|
"volta": {
|
|
180
|
-
"node": "22.
|
|
180
|
+
"node": "22.19.0",
|
|
181
181
|
"yarn": "4.9.4"
|
|
182
182
|
},
|
|
183
183
|
"packageManager": "yarn@4.9.4"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CalendarButton.d.ts","sourceRoot":"","sources":["../../../lib/components/DateTimePicker/CalendarButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAC;AACtC,OAAO,EAAa,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAI7D,eAAO,MAAM,cAAc,GAAI,OAAO,eAAe,sBAQpD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CalendarGrid.d.ts","sourceRoot":"","sources":["../../../lib/components/DateTimePicker/CalendarGrid.tsx"],"names":[],"mappings":"AACA,OAAO,KAAiB,MAAM,OAAO,CAAC;AACtC,OAAO,EAKN,KAAK,qBAAqB,EAC1B,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AA8CnD,UAAU,iBAAkB,SAAQ,qBAAqB;IACxD,KAAK,EAAE,aAAa,CAAC;CACrB;AAED,eAAO,MAAM,YAAY,GAAI,qBAAqB,iBAAiB,sBA2ClE,CAAC"}
|