Skip to content

Commit ac178c2

Browse files
authored
Merge branch 'main' into brooke/sc-label
2 parents 6b038ca + 0efcd4e commit ac178c2

File tree

14 files changed

+124
-34
lines changed

14 files changed

+124
-34
lines changed

.changeset/gentle-shoes-join.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@leafygreen-ui/text-input': patch
3+
---
4+
5+
Updates valid state icon in dark mode to match Figma spec

.changeset/little-comics-deny.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@leafygreen-ui/loading-indicator': major
3+
---
4+
5+
Changing Lottie dependency from @lottie-files/react-lottie-player to react-lottie-player

.changeset/three-lobsters-cough.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@leafygreen-ui/icon': minor
3+
---
4+
5+
Adds 'Federation' icon to glyph set

.github/workflows/release.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ jobs:
2424
run: yarn
2525

2626
- name: Build packages
27-
run: yarn build:packages
27+
run: yarn build
2828

2929
- name: Build typescript
30-
run: yarn build:ts
30+
run: yarn tsc
3131

3232
- name: Build TSDoc
33-
run: yarn docs:tsdoc
33+
run: yarn build:docs
3434

3535
- name: Establish Chromatic baseline
3636
uses: chromaui/action@v1

packages/icon/README.md

+7-7
Large diffs are not rendered by default.

packages/icon/src/generated/Federation.tsx

+65
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
+3
Loading

packages/icon/src/glyphs/index.ts

+2
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ import Ellipsis from './Ellipsis.svg';
5151
import Email from './Email.svg';
5252
import Export from './Export.svg';
5353
import Favorite from './Favorite.svg';
54+
import Federation from './Federation.svg';
5455
import File from './File.svg';
5556
import Filter from './Filter.svg';
5657
import Folder from './Folder.svg';
@@ -178,6 +179,7 @@ const _glyphs = {
178179
Email,
179180
Export,
180181
Favorite,
182+
Federation,
181183
File,
182184
Filter,
183185
FullScreenEnter,

packages/loading-indicator/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"@leafygreen-ui/palette": "^4.0.4",
3535
"@leafygreen-ui/tokens": "^2.1.1",
3636
"@leafygreen-ui/typography": "^16.5.1",
37-
"@lottiefiles/react-lottie-player": "^3.5.3"
37+
"react-lottie-player": "^1.5.4"
3838
},
3939
"peerDependencies": {
4040
"@leafygreen-ui/leafygreen-provider": "^3.1.3"

packages/loading-indicator/src/PageLoader/PageLoader.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { Player } from '@lottiefiles/react-lottie-player';
2+
import Lottie from 'react-lottie-player';
33
import PropTypes from 'prop-types';
44

55
import { cx } from '@leafygreen-ui/emotion';
@@ -24,9 +24,10 @@ const PageLoader = ({
2424
}: PageLoaderProps) => {
2525
const { theme } = useDarkMode(darkModeProp);
2626
const baseFontSize = useUpdatedBaseFontSize(baseFontSizeProp);
27+
2728
return (
2829
<div className={cx(rootStyles, className)} {...rest}>
29-
<Player autoplay loop src={animationJson} style={blobStyles} />
30+
<Lottie play loop animationData={animationJson} style={blobStyles} />
3031
{description && (
3132
<Body
3233
className={descriptionThemeColor[theme]}

packages/loading-indicator/src/Spinner/Spinner.tsx

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { Player } from '@lottiefiles/react-lottie-player';
2+
import Lottie from 'react-lottie-player';
33
import PropTypes from 'prop-types';
44

55
import { cx } from '@leafygreen-ui/emotion';
@@ -36,6 +36,7 @@ const Spinner = ({
3636
const spinnerMarginBottom = SpinnerBottomMargins[displayOption];
3737
const { darkMode, theme } = useDarkMode(darkModeProp);
3838
const baseFontSize = useUpdatedBaseFontSize(baseFontSizeProp);
39+
3940
return (
4041
<div
4142
className={cx(
@@ -48,10 +49,10 @@ const Spinner = ({
4849
)}
4950
{...rest}
5051
>
51-
<Player
52-
autoplay
52+
<Lottie
53+
play
5354
loop
54-
src={animationJson}
55+
animationData={animationJson}
5556
className={cx({
5657
[darkModeSpinnerStyles]: darkMode,
5758
[colorOverrideStyles(colorOverride as string)]: !!colorOverride,

packages/text-input/src/TextInput/TextInput.tsx

+1-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import PropTypes from 'prop-types';
44
import { cx } from '@leafygreen-ui/emotion';
55
import { useIdAllocator, useValidation } from '@leafygreen-ui/hooks';
66
import CheckmarkIcon from '@leafygreen-ui/icon/dist/Checkmark';
7-
import CheckmarkWithCircleIcon from '@leafygreen-ui/icon/dist/CheckmarkWithCircle';
87
import WarningIcon from '@leafygreen-ui/icon/dist/Warning';
98
import { useDarkMode } from '@leafygreen-ui/leafygreen-provider';
109
import { consoleOnce } from '@leafygreen-ui/lib';
@@ -153,10 +152,6 @@ const TextInput = React.forwardRef<HTMLInputElement, TextInputProps>(
153152
);
154153
}
155154

156-
const RenderedCheckmarkIcon = darkMode
157-
? CheckmarkWithCircleIcon
158-
: CheckmarkIcon;
159-
160155
const shouldRenderOptionalText =
161156
state === State.None && !disabled && optional;
162157

@@ -229,7 +224,7 @@ const TextInput = React.forwardRef<HTMLInputElement, TextInputProps>(
229224
>
230225
{/* Render State Icon or Optional text*/}
231226
{state === State.Valid && (
232-
<RenderedCheckmarkIcon
227+
<CheckmarkIcon
233228
role="presentation"
234229
className={stateIndicatorStyles.valid[theme]}
235230
/>

rollup.config.js

+1
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ const baseConfigForFormat = format => ({
151151
'react-dom',
152152
'react-is',
153153
'react-keyed-flatten-children',
154+
'react-lottie-player',
154155
'react-transition-group',
155156
...getLodashExternals(),
156157
...allPackages,

yarn.lock

+18-11
Original file line numberDiff line numberDiff line change
@@ -2928,13 +2928,6 @@
29282928
validate-npm-package-name "5.0.0"
29292929
yargs-parser "20.2.4"
29302930

2931-
"@lottiefiles/react-lottie-player@^3.5.3":
2932-
version "3.5.3"
2933-
resolved "https://registry.yarnpkg.com/@lottiefiles/react-lottie-player/-/react-lottie-player-3.5.3.tgz#e7e848f29577bc4eede87d677a0054de29378127"
2934-
integrity sha512-6pGbiTMjGnPddR1ur8M/TIDCiogZMc1aKIUbMEKXKAuNeYwZ2hvqwBJ+w5KRm88ccdcU88C2cGyLVsboFlSdVQ==
2935-
dependencies:
2936-
lottie-web "^5.10.2"
2937-
29382931
"@manypkg/find-root@^1.1.0":
29392932
version "1.1.0"
29402933
resolved "https://registry.yarnpkg.com/@manypkg/find-root/-/find-root-1.1.0.tgz#a62d8ed1cd7e7d4c11d9d52a8397460b5d4ad29f"
@@ -12473,10 +12466,10 @@ loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.2.0, loose-envify@^1.3
1247312466
dependencies:
1247412467
js-tokens "^3.0.0 || ^4.0.0"
1247512468

12476-
lottie-web@^5.10.2:
12477-
version "5.11.0"
12478-
resolved "https://registry.yarnpkg.com/lottie-web/-/lottie-web-5.11.0.tgz#04bb9fd6cdfbb10e586985dd666de6c727619d95"
12479-
integrity sha512-9vSt0AtdOH98GKDXwD5LPfFg9Pcmxt5+1BllAbudKM5iqPxpJnJUfuGaP45OyudDrESCOBgsjnntVUTygBNlzw==
12469+
lottie-web@^5.7.6:
12470+
version "5.12.2"
12471+
resolved "https://registry.yarnpkg.com/lottie-web/-/lottie-web-5.12.2.tgz#579ca9fe6d3fd9e352571edd3c0be162492f68e5"
12472+
integrity sha512-uvhvYPC8kGPjXT3MyKMrL3JitEAmDMp30lVkuq/590Mw9ok6pWcFCwXJveo0t5uqYw1UREQHofD+jVpdjBv8wg==
1248012473

1248112474
lower-case@^2.0.2:
1248212475
version "2.0.2"
@@ -15077,6 +15070,15 @@ react-keyed-flatten-children@^1.3.0:
1507715070
dependencies:
1507815071
react-is "^16.8.6"
1507915072

15073+
react-lottie-player@^1.5.4:
15074+
version "1.5.4"
15075+
resolved "https://registry.yarnpkg.com/react-lottie-player/-/react-lottie-player-1.5.4.tgz#8205cc334d11b923d9bac78e1d19bcc0d475d751"
15076+
integrity sha512-eM0g11bAc4EJJuDDfCoNloaAYphfXlIpYnriOt4nRU66PpVmvKhajvP2aif4YflGY2ArAFXhWxs418YzdebK9w==
15077+
dependencies:
15078+
fast-deep-equal "^3.1.3"
15079+
lottie-web "^5.7.6"
15080+
rfdc "^1.3.0"
15081+
1508015082
react-refresh@^0.11.0:
1508115083
version "0.11.0"
1508215084
resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.11.0.tgz#77198b944733f0f1f1a90e791de4541f9f074046"
@@ -15624,6 +15626,11 @@ reusify@^1.0.4:
1562415626
resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76"
1562515627
integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==
1562615628

15629+
rfdc@^1.3.0:
15630+
version "1.3.0"
15631+
resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.3.0.tgz#d0b7c441ab2720d05dc4cf26e01c89631d9da08b"
15632+
integrity sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==
15633+
1562715634
[email protected], rimraf@~2.6.2:
1562815635
version "2.6.3"
1562915636
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab"

0 commit comments

Comments
 (0)