-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make LiveIcon subcomponent of Tag (#5352)
* Initial commit * Update import * Changeset: Version packages (#5351) * version packages * chore(eslint): ignore changelogs --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Cassandra Tam <[email protected]> * chore(prettier): lint MD and MDX files (#5353) * chore(prettier): ignore changelogs and lock files * chore(prettier): check md, mdx, cjs files * style: prettier fixes * chore(deps): update dependency turbo to ^2.3.3 (#5307) Co-authored-by: Cassandra Tam <[email protected]> * Fix import, fix formatting * Fix story import * Attempt fix * Fix imports * Extraced LiveIcon from Story to own component * Fix formatting * Fix export * Fix export * Imports * Fix import * Add changeset * PR Feedback * Removed reused code * Add displayName * Update Migration Guide * Fix import/export * Add displayName, update Migration docs --------- Co-authored-by: Christian Moore <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Cassandra Tam <[email protected]> Co-authored-by: cultureamp-renovate[bot] <89962466+cultureamp-renovate[bot]@users.noreply.github.com>
- Loading branch information
1 parent
d3ae52d
commit 5339698
Showing
8 changed files
with
172 additions
and
193 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@kaizen/components': patch | ||
--- | ||
|
||
Converted LiveIcon into a subcomponent of Tag |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
91 changes: 91 additions & 0 deletions
91
packages/components/src/Tag/subcomponents/LiveIcon/LiveIcon.module.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
.liveIcon { | ||
display: inline-block; | ||
position: relative; | ||
width: 20px; | ||
height: 20px; | ||
margin-inline-start: 0.25rem; | ||
color: var(--color-green-500); | ||
} | ||
|
||
.liveIcon_base { | ||
opacity: 0.3; | ||
display: block; | ||
} | ||
|
||
.liveIcon_1, | ||
.liveIcon_2, | ||
.liveIcon_3 { | ||
display: block; | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100%; | ||
aspect-ratio: 1; | ||
overflow: hidden; | ||
} | ||
|
||
.liveIcon_1 { | ||
clip-path: circle(16%); | ||
} | ||
|
||
.liveIcon_2, | ||
.liveIcon_3 { | ||
animation-duration: 3s; | ||
animation-iteration-count: 3; | ||
animation-delay: 1s; | ||
} | ||
|
||
.liveIcon_2 { | ||
clip-path: circle(32%); | ||
animation-name: pulse-inner; | ||
} | ||
|
||
.liveIcon_3 { | ||
clip-path: circle(50%); | ||
animation-name: pulse-outer; | ||
} | ||
|
||
@keyframes pulse-inner { | ||
0% { | ||
opacity: 0; | ||
} | ||
|
||
25% { | ||
opacity: 0; | ||
} | ||
|
||
50% { | ||
opacity: 1; | ||
} | ||
|
||
75% { | ||
opacity: 1; | ||
} | ||
|
||
100% { | ||
opacity: 1; | ||
} | ||
} | ||
|
||
@keyframes pulse-outer { | ||
0% { | ||
opacity: 0; | ||
} | ||
|
||
25% { | ||
opacity: 0; | ||
} | ||
|
||
50% { | ||
opacity: 0; | ||
} | ||
|
||
75% { | ||
opacity: 1; | ||
} | ||
|
||
100% { | ||
opacity: 1; | ||
} | ||
} |
48 changes: 48 additions & 0 deletions
48
packages/components/src/Tag/subcomponents/LiveIcon/LiveIcon.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// This file is autogenerated by wrapSVGs.ts | ||
// Changes to this file will be overwritten | ||
|
||
import React from 'react' | ||
import { SVG } from '~components/Icon/subcomponents/SVG' | ||
import styles from './LiveIcon.module.css' | ||
|
||
type LiveIconSvgProps = { classNameOverride: string } | ||
|
||
const LiveIconSvg = ({ classNameOverride }: LiveIconSvgProps): JSX.Element => ( | ||
<SVG | ||
role="presentation" | ||
width="16" | ||
height="16" | ||
viewBox="0 0 16 16" | ||
fill="none" | ||
classNameOverride={classNameOverride} | ||
> | ||
<path | ||
stroke="currentColor" | ||
d="M3.266 12.733c-2.6-2.6-2.6-6.866 0-9.466M5.2 10.8c-1.534-1.533-1.534-4.067 0-5.667" | ||
strokeWidth="1.5" | ||
strokeLinejoin="round" | ||
strokeLinecap="round" | ||
/> | ||
<path fill="currentColor" d="M8 10a2 2 0 1 0 0-4 2 2 0 0 0 0 4" /> | ||
<path | ||
stroke="currentColor" | ||
d="M10.8 5.2c1.533 1.533 1.533 4.067 0 5.667M12.733 3.267c2.6 2.6 2.6 6.8 0 9.4" | ||
strokeWidth="1.5" | ||
strokeLinejoin="round" | ||
strokeLinecap="round" | ||
/> | ||
</SVG> | ||
) | ||
|
||
LiveIconSvg.displayName = 'LiveIconSvg' | ||
|
||
export const LiveIcon = (): JSX.Element => ( | ||
<span className={styles.liveIcon}> | ||
<LiveIconSvg classNameOverride={styles.liveIcon_base} /> | ||
<LiveIconSvg classNameOverride={styles.liveIcon_1} /> | ||
<LiveIconSvg classNameOverride={styles.liveIcon_2} /> | ||
<LiveIconSvg classNameOverride={styles.liveIcon_3} /> | ||
</span> | ||
) | ||
|
||
LiveIcon.displayName = 'LiveIcon' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './LiveIcon' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './LiveIcon' |
Oops, something went wrong.