Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration: Date Picker [LG-3152] #1951

Merged
merged 412 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
412 commits
Select commit Hold shift + click to select a range
d67aa28
update tests
TheSonOfThomp Sep 28, 2023
0d71cd5
adds validation handler functionality
TheSonOfThomp Sep 28, 2023
82951bd
update Segment formatting & change handling
TheSonOfThomp Sep 28, 2023
b6ff0e5
updates handleValidation tests
TheSonOfThomp Sep 29, 2023
cbbb413
adds initialOpen. moves isOpen to context
TheSonOfThomp Sep 29, 2023
cf86f19
fix ts
TheSonOfThomp Sep 29, 2023
8a6049b
Merge branch 'main' into adam/date-picker-lg-3152
TheSonOfThomp Sep 29, 2023
aec8a7f
rm changesets
TheSonOfThomp Sep 29, 2023
f1e084d
mv menuId declaration
TheSonOfThomp Sep 29, 2023
6cf112d
init range picker
TheSonOfThomp Sep 29, 2023
45da1b0
separate date picker input/menu concerns
TheSonOfThomp Sep 29, 2023
0edfac0
first pass range form field
TheSonOfThomp Sep 29, 2023
8f52782
Creates form-field component
TheSonOfThomp Sep 29, 2023
8030156
Creates form-field component
TheSonOfThomp Sep 29, 2023
e32f1e4
fixes types
TheSonOfThomp Sep 29, 2023
0bdd4a6
lint
TheSonOfThomp Sep 29, 2023
2db1792
Merge branch 'FormField-component' into adam/date-picker-lg-3152
TheSonOfThomp Sep 29, 2023
948c91b
rename prop to errorMessage
TheSonOfThomp Sep 29, 2023
2103ff1
adds tests, updates aria attributes, adds stories
TheSonOfThomp Sep 29, 2023
e182caf
Update FormField.stories.tsx
TheSonOfThomp Sep 29, 2023
31e25e2
Merge branch 'FormField-component' into adam/date-picker-lg-3152
TheSonOfThomp Sep 29, 2023
be56b77
adds rests for ReactNode label & description
TheSonOfThomp Sep 29, 2023
91a544d
Merge branch 'FormField-component' into adam/date-picker-lg-3152
TheSonOfThomp Sep 29, 2023
3114085
adds tests for form field pass through
TheSonOfThomp Sep 29, 2023
bdd1c20
adds tests for form field pass through
TheSonOfThomp Sep 29, 2023
da2aefe
implements form-field
TheSonOfThomp Sep 29, 2023
d3e543a
lint
TheSonOfThomp Sep 29, 2023
f3806f5
rm explicit presentation role from icon
TheSonOfThomp Sep 29, 2023
45ea27e
Merge branch 'main' into FormField-component
TheSonOfThomp Oct 3, 2023
3a529db
update dependencies. fix stories
TheSonOfThomp Oct 3, 2023
691478a
Refactor to use composition
TheSonOfThomp Oct 3, 2023
d4eb45e
erefactor styles
TheSonOfThomp Oct 3, 2023
ac5dbda
add stories. add docs
TheSonOfThomp Oct 3, 2023
d1541f6
improves button demo
TheSonOfThomp Oct 3, 2023
fd28815
mv sub components
TheSonOfThomp Oct 3, 2023
88033c5
reorg components. update tests
TheSonOfThomp Oct 3, 2023
e8777ae
Address RA UI bugs
TheSonOfThomp Oct 3, 2023
c1c3438
Merge branch 'FormField-component' into adam/date-picker-lg-3152
TheSonOfThomp Oct 3, 2023
595bc19
Update yarn.lock
TheSonOfThomp Oct 3, 2023
01694aa
refactor DateFormField
TheSonOfThomp Oct 3, 2023
e5e5559
adds tests for getSegmentToFocus
TheSonOfThomp Oct 3, 2023
c37b02e
creates getRangeSegmentToFocus
TheSonOfThomp Oct 3, 2023
84f0eb0
scaffolds keydown behavior
TheSonOfThomp Oct 3, 2023
8607e56
add darkMode prop. Update 'unset' -> 'default'
TheSonOfThomp Oct 5, 2023
05f9f9e
rm Valid state from SB
TheSonOfThomp Oct 5, 2023
125bdaa
update Default -> None
TheSonOfThomp Oct 5, 2023
882b76d
fix build
TheSonOfThomp Oct 5, 2023
8a6c427
Rename to FormFieldInputContainer
TheSonOfThomp Oct 5, 2023
e932e7f
fix tests
TheSonOfThomp Oct 5, 2023
bafe0b8
Merge branch 'main' into FormField-component
TheSonOfThomp Oct 5, 2023
28e0b74
Merge branch 'FormField-component' into adam/date-picker-lg-3152
TheSonOfThomp Oct 5, 2023
669499c
Refactors re FormField changes
TheSonOfThomp Oct 5, 2023
8120eab
scaffolds range menu
TheSonOfThomp Oct 5, 2023
00453d9
renames icon -> contentEnd
TheSonOfThomp Oct 5, 2023
6fd9da0
Update FormField.stories.tsx
TheSonOfThomp Oct 5, 2023
da1297b
Update FormField.stories.tsx
TheSonOfThomp Oct 5, 2023
6cc638a
Adds Base Font Size
TheSonOfThomp Oct 5, 2023
b7ebd9f
Merge branch 'FormField-component' into adam/date-picker-lg-3152
TheSonOfThomp Oct 5, 2023
548e22f
Update DateFormField.tsx
TheSonOfThomp Oct 5, 2023
a33f001
major range menu buildout
TheSonOfThomp Oct 5, 2023
784eb84
fix tests
TheSonOfThomp Oct 5, 2023
7c7d6f3
Update package.json
TheSonOfThomp Oct 5, 2023
7ed0283
Merge branch 'main' into FormField-component
TheSonOfThomp Oct 5, 2023
cbba43f
Merge branch 'FormField-component' into adam/date-picker-lg-3152
TheSonOfThomp Oct 6, 2023
559d1a5
bump dp deps
TheSonOfThomp Oct 6, 2023
a34a80d
updates tsdocs for shared components
TheSonOfThomp Oct 6, 2023
d70bd9b
rename QuickSelectionMenu
TheSonOfThomp Oct 6, 2023
27f2984
update range calendar menu styling
TheSonOfThomp Oct 6, 2023
c5b04e6
Create getFullMonthLabel.spec.ts
TheSonOfThomp Oct 6, 2023
212fe72
update range menu spacing
TheSonOfThomp Oct 9, 2023
84a3d42
adds range rendering tests
TheSonOfThomp Oct 9, 2023
1b552fe
outlines bulk of range tests
TheSonOfThomp Oct 9, 2023
e18c758
refactor to value/onchange
TheSonOfThomp Oct 9, 2023
2d870c4
update calendar rendering
TheSonOfThomp Oct 9, 2023
91aa96d
scaffold calendar handlers
TheSonOfThomp Oct 9, 2023
95ea4b6
updates range input handlers
TheSonOfThomp Oct 9, 2023
b0aac8d
input handlers
TheSonOfThomp Oct 9, 2023
0524d78
fills out input tests
TheSonOfThomp Oct 9, 2023
4d97fe8
move typing tests
TheSonOfThomp Oct 10, 2023
6b4ce05
Renames onChange to onDateChange
TheSonOfThomp Oct 10, 2023
6adb71c
Updates onSegmentChange to onChange
TheSonOfThomp Oct 10, 2023
d6695b2
LG-3675, LG-3676: Date Picker select width and menu width (#2013)
shaneeza Oct 11, 2023
24f5be6
format segments on value update
TheSonOfThomp Oct 11, 2023
892e8c5
update Range picker with updated callbacks
TheSonOfThomp Oct 11, 2023
963aa49
Merge branch 'main' into adam/date-picker-lg-3152
TheSonOfThomp Oct 11, 2023
09637ec
update typing & validation handler tests
TheSonOfThomp Oct 11, 2023
5c71ebc
creates isSameUTCRange
TheSonOfThomp Oct 11, 2023
27e101b
Merge branch 'main' into adam/date-picker-lg-3152
TheSonOfThomp Oct 11, 2023
b4c1471
updates range picker test suite
TheSonOfThomp Oct 11, 2023
fd4854e
Update DateRangePicker.spec.tsx
TheSonOfThomp Oct 11, 2023
37c5c3f
over-engineering the tab stop tests
TheSonOfThomp Oct 11, 2023
bb6e682
simplify tab stop tests
TheSonOfThomp Oct 12, 2023
a35bdd6
update disabled / color (#2022)
shaneeza Oct 12, 2023
19f5a58
adds focus handling
TheSonOfThomp Oct 12, 2023
6fa0182
Merge branch 'adam/date-picker-lg-3152' of https://github.com/mongodb…
TheSonOfThomp Oct 12, 2023
6046dbc
adds ref to Select component
TheSonOfThomp Oct 12, 2023
01e58a5
Create loud-trainers-sparkle.md
TheSonOfThomp Oct 12, 2023
bf961fa
adds example & tests to polymorphic
TheSonOfThomp Oct 12, 2023
5b728fa
allows Link to accept a ref
TheSonOfThomp Oct 12, 2023
fd7cf26
Create tidy-lemons-drop.md
TheSonOfThomp Oct 12, 2023
55a468c
Merge branch 'select-forward-ref' into adam/date-picker-lg-3152
TheSonOfThomp Oct 12, 2023
cdfb7c7
Merge branch 'link-ref' into adam/date-picker-lg-3152
TheSonOfThomp Oct 12, 2023
ee42cd4
updates ref to month select
TheSonOfThomp Oct 12, 2023
4be9c16
updates single date picker tab behavior
TheSonOfThomp Oct 12, 2023
e5ec508
adds cell hover range interaction
TheSonOfThomp Oct 13, 2023
2b3716b
updates calendar cell styles
TheSonOfThomp Oct 13, 2023
4774a5a
mv funcs to utils
TheSonOfThomp Oct 13, 2023
8b4d819
Merge branch 'main' into adam/date-picker-lg-3152
TheSonOfThomp Oct 13, 2023
3e45e3c
cleanup & add isDefined util
TheSonOfThomp Oct 13, 2023
0a0ac5b
adds range-value setting logic
TheSonOfThomp Oct 13, 2023
3f4e42d
adds arrow key functionality
TheSonOfThomp Oct 13, 2023
9557a9b
adds chevron click functionality
TheSonOfThomp Oct 13, 2023
9c05c0a
add size to FormField (#2029)
shaneeza Oct 13, 2023
7a7a786
run .focus on next animation frame
TheSonOfThomp Oct 16, 2023
1fd5a00
update default calendar
TheSonOfThomp Oct 16, 2023
436e506
on apply, cancel clear
TheSonOfThomp Oct 16, 2023
356c0a9
adds close menu tests
TheSonOfThomp Oct 16, 2023
287add0
adds validation story
TheSonOfThomp Oct 16, 2023
cbe9114
adds calendar button click tests
TheSonOfThomp Oct 16, 2023
a426723
Update DateRangeMenuCalendars.types.ts
TheSonOfThomp Oct 16, 2023
aa363d6
corrects initial highlight when value = null array
TheSonOfThomp Oct 16, 2023
266cb38
fix isEqual import
shaneeza Oct 17, 2023
b543241
LG-3677: Date Picker date selection on enter/space (#2015)
shaneeza Oct 17, 2023
a564ce0
update dark mode calendar cell hover color
shaneeza Oct 17, 2023
8c0b8d8
add a check for tab presses inside handleCalendarKeyDown
shaneeza Oct 17, 2023
0caaa36
use data-testid instead of data-lg
TheSonOfThomp Oct 17, 2023
57be86d
Speeds up tab tests
TheSonOfThomp Oct 17, 2023
3699810
Merge branch 'adam/date-picker-lg-3152' of https://github.com/mongodb…
TheSonOfThomp Oct 17, 2023
5f39eac
fixes some tests
TheSonOfThomp Oct 17, 2023
f53b4b9
LG-3696: dp menu toggle (#2032)
shaneeza Oct 18, 2023
d551f8e
remove pointer-events none from disabled calendar cell
shaneeza Oct 18, 2023
1abb26b
rearchitect range picker with context
TheSonOfThomp Oct 18, 2023
f2be624
fixes build
TheSonOfThomp Oct 18, 2023
b4fc35c
adds handlevalidation to context
TheSonOfThomp Oct 18, 2023
defa9e1
moves min/max date to global constants
TheSonOfThomp Oct 19, 2023
5bdba83
adds quick range tests
TheSonOfThomp Oct 19, 2023
3f7ef2b
implements quick range buttons
TheSonOfThomp Oct 19, 2023
26803d3
completes todo test
TheSonOfThomp Oct 20, 2023
119660a
Adds missing tests
TheSonOfThomp Oct 20, 2023
fe09c75
Update DateRangeMenu.spec.tsx
TheSonOfThomp Oct 20, 2023
0874f3d
fix build
TheSonOfThomp Oct 30, 2023
1e8744e
Merge branch 'main' into adam/date-picker-lg-3152
TheSonOfThomp Oct 30, 2023
4d49add
DatePicker prepare exports (#2051)
TheSonOfThomp Oct 31, 2023
28d16cc
Merge branch 'main' into adam/date-picker-lg-3152
TheSonOfThomp Oct 31, 2023
f1e2076
Adam/date picker/input auto focus (#2057)
TheSonOfThomp Oct 31, 2023
0c323bd
Update getRelativeSegment.spec.tsx
TheSonOfThomp Oct 31, 2023
9d47c70
LG-3699, LG-3723: DP keyboard interactions [WIP] (#2052)
shaneeza Nov 1, 2023
d9a44c9
Update types.ts
TheSonOfThomp Nov 1, 2023
93ccc0f
Merge branch 'main' into adam/date-picker-lg-3152
TheSonOfThomp Nov 2, 2023
c33b8d1
Merge branch 'main' into adam/date-picker-lg-3152
TheSonOfThomp Nov 2, 2023
9a5ee13
Merge branch 'main' into adam/date-picker-lg-3152
TheSonOfThomp Nov 3, 2023
6c88db4
DatePicker: Highlight, tab & focus (#2063)
TheSonOfThomp Nov 6, 2023
fe93b87
Merge branch 'main' into adam/date-picker-lg-3152
TheSonOfThomp Nov 6, 2023
4c810e2
Fire transitionEnd in Tab tests
TheSonOfThomp Nov 6, 2023
d371e7e
update how we test month change highlight
TheSonOfThomp Nov 6, 2023
871c259
ts fix
TheSonOfThomp Nov 6, 2023
dafb470
LG-3740, LG-3741: DP initialOpen + disabled (#2069)
shaneeza Nov 7, 2023
fc5a4b2
DatePicker [LG-3748]: Restricts month menu options (#2070)
TheSonOfThomp Nov 7, 2023
cf2d33e
Merge branch 'main' into adam/date-picker-lg-3152
TheSonOfThomp Nov 7, 2023
561df1a
DatePicker [LG-3758, LG-3760, LG-3764, LG-3765] Menu year/month selec…
TheSonOfThomp Nov 15, 2023
4fd2f06
Date Picker [LG-3792] adds tests (#2085)
shaneeza Nov 17, 2023
1a9e170
Date Picker [LG-3756, LG-3771, LG-3774, LG-3768] Arrow keys in Date I…
TheSonOfThomp Nov 17, 2023
978def3
Updates logic for setting focus when menu opens (#2086)
TheSonOfThomp Nov 17, 2023
92401d9
Update DatePicker.spec.tsx
TheSonOfThomp Nov 17, 2023
7592b63
Merge branch 'main' into adam/date-picker-lg-3152
TheSonOfThomp Nov 17, 2023
717d243
add modal test
shaneeza Nov 17, 2023
1a131b4
add maxLength (#2088)
shaneeza Nov 20, 2023
5f7e1d3
Date Picker [LG-3773]: Daylight time cell focus (#2087)
TheSonOfThomp Nov 20, 2023
f29b854
Date Picker [LG-3767] Modal bugs (#2091)
shaneeza Nov 21, 2023
d821334
Merge branch 'main' into adam/date-picker-lg-3152
TheSonOfThomp Nov 21, 2023
83798c1
Merge branch 'main' into adam/date-picker-lg-3152
TheSonOfThomp Nov 21, 2023
7719526
Date Picker: React 17 [LG-3788] (#2094)
TheSonOfThomp Nov 23, 2023
6599ea4
Date Picker [LG -3806, LG-3808] Consume LeafyGreenProvider (#2096)
shaneeza Nov 23, 2023
b905ac8
updates comments
TheSonOfThomp Nov 27, 2023
fc32072
update comments
TheSonOfThomp Nov 27, 2023
9fe41b2
direct lodash import
TheSonOfThomp Nov 27, 2023
7cf1b32
use today from context
TheSonOfThomp Nov 27, 2023
2745012
prevent default on arrow keys (#2097)
TheSonOfThomp Nov 28, 2023
4fe0498
Date Picker [LG-3809] multiple renders when disabled (#2098)
shaneeza Nov 28, 2023
62f2960
remove focus from cal icon when disabled (#2100)
shaneeza Nov 28, 2023
0161dc5
add tests (#2102)
shaneeza Nov 29, 2023
4dfb5d3
DatePicker [LG-3805] menu out of range (#2103)
TheSonOfThomp Nov 29, 2023
e5e90a8
Date Picker [LG-3811] autocomplete (#2099)
shaneeza Nov 29, 2023
1691394
update year select aria label
shaneeza Nov 29, 2023
eb89f55
Merge branch 'adam/date-picker-lg-3152' of github.com:mongodb/leafygr…
shaneeza Nov 29, 2023
057aa0e
fix error icon placement
shaneeza Nov 30, 2023
bc8a62a
increase select width
shaneeza Nov 30, 2023
0ef6cbd
Date picker [LG-3834] Internal error handling (#2105)
TheSonOfThomp Dec 1, 2023
ee0ffbe
Merge branch 'main' into adam/date-picker-lg-3152
TheSonOfThomp Dec 1, 2023
6807d66
fixes newDateFromSegments util
TheSonOfThomp Dec 1, 2023
377db14
restores `state` to contextPropNames
TheSonOfThomp Dec 1, 2023
33f1303
Date picker [LG-3847] Restrict year input auto-format (#2107)
TheSonOfThomp Dec 1, 2023
ec2b478
Date Picker [LG-3810] calendar cell focus (#2109)
shaneeza Dec 4, 2023
c6e0c28
Date picker [LG-3827] input segment responsive to min max (#2108)
TheSonOfThomp Dec 4, 2023
78ad91c
Update DatePicker.spec.tsx (#2110)
TheSonOfThomp Dec 4, 2023
546117f
Fix Chromatic failures (#2111)
TheSonOfThomp Dec 4, 2023
ed75e7c
Date Picker [LG-3826] Calendar month menu jump (#2112)
TheSonOfThomp Dec 4, 2023
5dc8268
Date Picker [LG-3838] truncate selects (#2113)
shaneeza Dec 5, 2023
cbe91f9
increase z-index (#2116)
shaneeza Dec 5, 2023
d9426b8
Date Picker [LG-3829] space press (#2115)
shaneeza Dec 6, 2023
3cc5d7e
Date picker [LG-3816, LG-3859] Timezone bugs (#2114)
TheSonOfThomp Dec 6, 2023
bc41ebb
Date picker [LG-3854] No impossible dates (#2117)
TheSonOfThomp Dec 6, 2023
bf772e7
Date Picker: move date segment types (#2118)
TheSonOfThomp Dec 6, 2023
e31001a
Date Picker [LG-3835]: Rename component > content (#2119)
TheSonOfThomp Dec 6, 2023
0698414
rm deprecated utils
TheSonOfThomp Dec 7, 2023
e9aa1d2
Date picker [LG-3868] Month & weekday Internationalization (#2121)
TheSonOfThomp Dec 7, 2023
787e9c8
mv main story
TheSonOfThomp Dec 7, 2023
aa511a7
Delete rollup.config.mjs
TheSonOfThomp Dec 7, 2023
6aec3e2
remove getProviderPropsFromStoryArgs
TheSonOfThomp Dec 7, 2023
436349a
Update DatePicker.stories.tsx
TheSonOfThomp Dec 7, 2023
5467d9b
Date picker [LG-3873] rename locale prop (#2122)
TheSonOfThomp Dec 7, 2023
c6ad642
Date Picker [LG-3844] add propTypes (#2124)
shaneeza Dec 8, 2023
4fed5f8
Date Picker [LG-3852] invalid chevron (#2123)
shaneeza Dec 8, 2023
25cfd86
Date picker [LG-3860, LG-3856] min/max bugs (#2125)
TheSonOfThomp Dec 8, 2023
8ea3c0d
Delete DateFormField.spec.tsx
TheSonOfThomp Dec 8, 2023
b08a5c4
Create eighty-kings-mix.md
TheSonOfThomp Dec 8, 2023
7001dff
DatePicker: DateUtils (#2126)
TheSonOfThomp Dec 11, 2023
128345f
Date Picker [LG-3887] fix page scroll (#2129)
shaneeza Dec 11, 2023
cf1ff45
Date picker timezone tests (#2134)
TheSonOfThomp Dec 13, 2023
5dbcb49
Date picker: DateUtils: Testing (#2133)
TheSonOfThomp Dec 13, 2023
2e2f924
Merge branch 'main' into adam/date-picker-lg-3152
TheSonOfThomp Dec 13, 2023
c4d1b75
lint
TheSonOfThomp Dec 13, 2023
6b53d1e
Adam/date picker shared context (#2136)
TheSonOfThomp Dec 13, 2023
76ffbf3
Date Picker [LG-3886] aria labels (#2135)
shaneeza Dec 13, 2023
63fcf61
Date picker [LG-3888, LG-3890] timezone prop today (#2132)
TheSonOfThomp Dec 14, 2023
c9f7c74
Date picker [LG-3894] Local date strings (#2137)
TheSonOfThomp Dec 14, 2023
848a631
Date picker [LG-3864] year input rollover (#2138)
TheSonOfThomp Dec 14, 2023
2414e5e
Date picker [LG-3895] Segment input restriction (#2140)
TheSonOfThomp Dec 15, 2023
3106d48
Merge branch 'main' into adam/date-picker-lg-3152
TheSonOfThomp Dec 15, 2023
95af767
Date Picker chromatic fixes (#2141)
shaneeza Dec 18, 2023
ab16f9e
Date Picker [LG-3897] backspace (#2143)
shaneeza Dec 18, 2023
9335ada
Date picker: restructure ixn tests (#2142)
TheSonOfThomp Dec 19, 2023
363a15d
DatePicker [LG-3899] arrow key errors (#2145)
TheSonOfThomp Dec 19, 2023
8ad3063
Date Picker [LG-3899] arrow key errors (#2144)
TheSonOfThomp Dec 20, 2023
e7f6652
Date picker [LG-3912] Test for invalid dates (#2146)
TheSonOfThomp Dec 20, 2023
09ae215
move menu position (#2157)
shaneeza Jan 5, 2024
c17a9aa
Merge branch 'main' into adam/date-picker-lg-3152
TheSonOfThomp Jan 5, 2024
dc270c6
creates newTZDate
TheSonOfThomp Jan 8, 2024
f5f315f
updates isSameUTCDay & isSameUTCMonth tests
TheSonOfThomp Jan 8, 2024
a117c9b
moves special rollover logic to getMaxSegmentValue
TheSonOfThomp Jan 8, 2024
4d00142
Merge branch 'main' into adam/date-picker-lg-3152
TheSonOfThomp Jan 10, 2024
429fcaa
add readme (#2164)
shaneeza Jan 11, 2024
d548aca
update README
shaneeza Jan 11, 2024
b36e616
Date Picker x React 17 (#2163)
TheSonOfThomp Jan 11, 2024
eb15c8a
Merge branch 'main' into adam/date-picker-lg-3152
TheSonOfThomp Jan 11, 2024
a24d14a
fix label in README
shaneeza Jan 11, 2024
87f1260
Date picker [LG-3911] Responding to `null` and `"Invalid Date"` value…
TheSonOfThomp Jan 11, 2024
19e601f
fix DateInputChangeEventHandler import
TheSonOfThomp Jan 11, 2024
28a733c
updates changeset version
TheSonOfThomp Jan 11, 2024
ae4b58d
Update package.json
TheSonOfThomp Jan 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 6 additions & 0 deletions .changeset/big-carpets-sleep.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@lg-tools/meta': minor
---

- Adds `exitWithErrorMessage` util
- Fixes recursion in `findPackageJson`
5 changes: 5 additions & 0 deletions .changeset/eighty-kings-mix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@leafygreen-ui/date-picker': minor
---

Initial pre-release of `date-picker`. Use DatePicker to allow users to input a date
5 changes: 5 additions & 0 deletions .changeset/eleven-donkeys-tickle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@lg-tools/test': minor
---

Adds coverage reporting for untested sub-modules
8 changes: 8 additions & 0 deletions .changeset/famous-timers-eat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@leafygreen-ui/select': patch
---

- Passes `onEnter*` and `onExit*` props to internal `Popover` component
- Adds tests to test `onEnter*` and `onExit*` callbacks
- Adds tests to test `PopoverContext`

5 changes: 5 additions & 0 deletions .changeset/great-avocados-battle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@lg-tools/test': minor
---

Updates to jest 29 for React 17 testing
5 changes: 5 additions & 0 deletions .changeset/little-melons-beam.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@leafygreen-ui/lib': minor
---

Updates Typescript signature of `createSyntheticEvent`
5 changes: 5 additions & 0 deletions .changeset/old-numbers-serve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@lg-tools/storybook-decorators': patch
---

Adds Null check for args
9 changes: 9 additions & 0 deletions .changeset/proud-doors-smoke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@leafygreen-ui/lib': minor
---
- Creates new utility functions
- `rollover`
- `truncateStart`
- `cloneReverse`
- `isDefined`
- `isZeroLike` & `isNotZeroLike`
5 changes: 5 additions & 0 deletions .changeset/rare-apples-deny.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@leafygreen-ui/form-field': patch
---

Updates disabled icon colors
5 changes: 5 additions & 0 deletions .changeset/rude-tomatoes-hang.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@leafygreen-ui/input-option': minor
---

Renders `aria-disabled` attribute when `disabled` is provided
5 changes: 5 additions & 0 deletions .changeset/seven-stingrays-bake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@leafygreen-ui/popover': patch
---

Exports `ChildrenFunctionParameters` type
5 changes: 5 additions & 0 deletions .changeset/shaggy-falcons-invite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@leafygreen-ui/form-field': minor
---

Adds `data-testid` to Label, Description & Error elements
5 changes: 5 additions & 0 deletions .changeset/smart-steaks-care.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@leafygreen-ui/date-utils': minor
---

Initial pre-release of `date-utils`. DateUtils contains utility functions for managing and manipulating JS Date objects
8 changes: 8 additions & 0 deletions .changeset/soft-berries-obey.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@leafygreen-ui/hooks': minor
---

- Extends `useControlledValue` to accept any type.
- Adds `updateValue` function in return value. This method triggers a synthetic event to update the value of a controlled or uncontrolled component.
- Adds `initialValue` argument. Used for setting the initial value for uncontrolled components. Without this we may encounter a React error for switching between controlled/uncontrolled inputs
- The value of `isControlled` is now immutable after the first render
5 changes: 5 additions & 0 deletions .changeset/spotty-wombats-end.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@lg-tools/validate': patch
---

Updates dev file pattern to include entire `testutils/` directories
5 changes: 5 additions & 0 deletions .changeset/stale-jeans-travel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@leafygreen-ui/a11y': patch
---

Update `AriaLabelProps` `label` type from `string` to `ReactNode`
5 changes: 5 additions & 0 deletions .changeset/tall-mice-ring.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@leafygreen-ui/lib': patch
---

Updates `target` type in `createSyntheticEvent` to extend `EventTarget`
5 changes: 5 additions & 0 deletions .changeset/tidy-lemons-drop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@leafygreen-ui/typography': minor
---

Allows `Link` component to accept a ref
6 changes: 4 additions & 2 deletions packages/a11y/src/AriaLabelProps.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { ReactNode } from 'react';

/**
* A union interface requiring _either_ `aria-label` or `aria-labelledby`
*/
Expand Down Expand Up @@ -43,13 +45,13 @@ export type AriaLabelPropsWithLabel =
*
* Optional if `aria-labelledby` or `aria-label` is provided
*/
label?: string;
label?: ReactNode;
} & AriaLabelProps)
| ({
/**
* Text shown in bold above the input element.
*
* Optional if `aria-labelledby` or `aria-label` is provided
*/
label: string;
label: ReactNode;
} & Partial<AriaLabelProps>);
100 changes: 100 additions & 0 deletions packages/date-picker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# Date Picker

![npm (scoped)](https://img.shields.io/npm/v/@leafygreen-ui/date-picker.svg)

#### [View on MongoDB.design](https://www.mongodb.design/component/date-picker/example/)

## Installation

### Yarn

```shell
yarn add @leafygreen-ui/date-picker
```

### NPM

```shell
npm install @leafygreen-ui/date-picker
```
shaneeza marked this conversation as resolved.
Show resolved Hide resolved

## Example

```js
import { DatePicker } from '@leafygreen-ui/date-picker';

const [date, setDate] = useState<Date>();

<DatePicker
label="Pick a date"
value={date}
max={new Date("2026-12-26")}
onDateChange={setDate}
locale="iso8601"
timeZone="utc"
/>;
```

## Properties

| Prop | Type | Description | Default |
| ------------------ | --------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- |
| `label` | `ReactNode` | Label shown above the date picker. | |
| `description` | `ReactNode` | A description for the date picker. It's recommended to set a meaningful time zone representation as the description. (e.g. "Coordinated Universal Time") | |
| `locale` | `'iso8601'`\| `'string'` | Sets the _presentation format_ for the displayed date, and localizes month & weekday labels. Defaults to the user’s browser preference (if available), otherwise ISO-8601. | `iso8601` |
| `timeZone` | `string` | A valid IANA timezone string, or UTC offset, used to calculate initial values. Defaults to the user’s browser settings. |
| `min` | `Date` | The earliest date accepted, in UTC | |
| `max` | `Date` | The latest date accepted, in UTC | |
| `value` | `'Date'` \| `'InvalidDate'` \| `'null'` | The selected date. Note that this Date object will be read as UTC time. Providing `Date.now()` could result in the incorrect date being displayed, depending on the system time zone. <br><br> To set `value` to today, regardless of timeZone, use `setToUTCMidnight(new Date(Date.now()))`. <br><br> e.g. `2023-12-31` at 20:00 in Los Angeles, will be `2024-01-01` at 04:00 in UTC. To set the correct day (`2023-12-31`) as the DatePicker value we must first convert our local timestamp to `2023-12-31` at midnight | |
| `onDateChange` | `(value?: Date \| InvalidDate \| null) => void` | Callback fired when the user makes a value change. Fired on click of a new date in the menu, or on keydown if the input contains a valid date. <br><br> _Not_ fired when a date segment changes, but does not create a full date <br><br> Callback date argument will be a Date object in UTC time, or `null` | |
| `initialValue` | `'Date'` \| `'InvalidDate'` \| `'null'` | The initial selected date. Ignored if `value` is provided <br><br> Note that this Date object will be read as UTC time. See `value` prop documentation for more details | |
| `handleValidation` | `(value?: Date \| InvalidDate \| null) => void` | A callback fired when validation should run, based on [form validation guidelines](https://www.mongodb.design/foundation/forms/#form-validation-error-handling). Use this callback to compute the correct `state` and `errorMessage` value.<br> <br> Callback date argument will be a Date object in UTC time, or `null` | |
| `onChange` | `(event: ChangeEvent<HTMLInputElement>) => void` | Callback fired when any segment changes, (but not necessarily a full value) | |
| `baseFontSize` | `'13'` \| `'16'` | The base font size of the input. Inherits from the nearest LeafyGreenProvider | |
| `disabled` | `boolean` | Whether the input is disabled. _Note_: will not set the `disabled` attribute on an input and the calendar menu will not open if disabled is set to true. | `false` |
| `size` | `'small'` \| `'xsmall'` \| `'default'` \| `'large'` | Whether the input is disabled. Note: will not set the `disabled` attribute on an input and the calendar menu will not open if disabled is set to true. | `default` |
| `state` | `'none'` \| `'error'` | Whether to show an error message | `none` |
| `errorMessage` | `string` | A message to show in red underneath the input when state is `Error` | |
| `initialOpen` | `boolean` | Whether the calendar menu is initially open. _Note_: The calendar menu will not open if disabled is set to `true`. | `false` |
| `autoComplete` | `'off'` \| `'on'` \| `'bday'` | Whether the input should autofill | `off` |
| `darkMode` | `boolean` | Render the component in dark mode. | `false` |

## 🔎 Glossary

### Date format

The pattern in which a string stores date (& time) information. E.g. `“YYYY-DD-MM”`, `“MM/DD/YYYY”`, `“YYYY-MM-DDTHH:mm:ss.sssZ”`

### Wire format (or Data format)

The format of the date string passed into the component. This will typically be [ISO-8601](https://www.iso.org/iso-8601-date-and-time-format.html), but could be any format accepted by the [Date constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/Date).

### Presentation format

The format in which the date is presented to the user. By default, the HTML date input element presents this in the format of the user’s Locale (as defined in browser or OS settings).

### Locale

Language, script, & region information. Can also include [other data](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale).

### Time Zone

A string representing a user’s local time zone (e.g. “America/New_York”) or UTC offset. Valid time zones are defined by IANA, and [listed on Wikipedia](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List). A UTC offset can be [provided in a DateTime string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#date_time_string_format).

### UTC offset

The offset of a time zone vs UTC. E.g. The UTC offset for `“America/New_York”` is -5:00, (or -4:00 depending on daylight savings).

### Wire time zone (or Data time zone)

The time zone information contained in the date string/object passed into the component.

### Presentation time zone

The time zone relative to which we present date information to the user. Can result in a different day than the wire time zone. E.g. `“2023-08-08T00:00:00Z”` (Aug. 8/2023 at midnight UTC) => `“2023-08-07T20:00:00-04:00”` (Aug. 7 at 8pm EDT)

## Special Case

### Aria Labels

Either `label` or `aria-labelledby` or `aria-label` must be provided, or there will be a console error. This is to ensure that screenreaders have a description for what the DatePicker does.
Loading
Loading