-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add new components WelcomeLoader
- Loading branch information
1 parent
479a30d
commit 4ca4388
Showing
13 changed files
with
189 additions
and
4 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,3 @@ | ||
/* | ||
!/dist/*.js | ||
!/dist/*.d.ts |
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,3 @@ | ||
# Change Log | ||
|
||
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. |
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,17 @@ | ||
# @welcome-ui/welcome-loader | ||
|
||
The [WelcomeLoader](https://welcome-ui.com/components/welcome-loader) component from [@welcome-ui](https://welcome-ui.com). | ||
|
||
![npm bundle size](https://img.shields.io/bundlephobia/minzip/@welcome-ui/welcome-loader) [![License](https://img.shields.io/npm/l/welcome-ui.svg)](https://github.com/WTTJ/welcome-ui/tree/main/LICENSE) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-mediumspringgreen.svg)](ttps://github.com/WTTJ/welcome-ui/tree/main/CONTRIBUTING.mdx) | ||
|
||
## Installation | ||
|
||
yarn add @welcome-ui/welcome-loader | ||
|
||
## Import | ||
|
||
import { WelcomeLoader } from '@welcome-ui/welcome-loader' | ||
|
||
## Documentation | ||
|
||
See the [documentation](https://welcome-ui.com/components/welcome-loader) or [package source](https://github.com/WTTJ/welcome-ui/tree/main/packages/WelcomeLoader) for more details. |
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,8 @@ | ||
import * as React from 'react' | ||
import { WelcomeLoader } from '@welcome-ui/welcome-loader' | ||
|
||
const Example = () => { | ||
return <WelcomeLoader /> | ||
} | ||
|
||
export default Example |
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,8 @@ | ||
import * as React from 'react' | ||
import { WelcomeLoader } from '@welcome-ui/welcome-loader' | ||
|
||
const Example = () => { | ||
return <WelcomeLoader w={100} /> | ||
} | ||
|
||
export default Example |
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,12 @@ | ||
--- | ||
category: icons-&-logo | ||
description: The Page Loader component is a visual indicator used to signal that a page is loading or content is being retrieved. Designed for Welcome to the Jungle, it ensures users stay informed during transitions, maintaining engagement and reducing perceived wait times. The loader is styled to align with the brand’s aesthetic, offering a seamless and polished user experience. | ||
packageName: welcome-loader | ||
title: WelcomeLoader | ||
--- | ||
|
||
### Resize | ||
|
||
You can resize or add some properties like margin etc. | ||
|
||
<div data-playground="resize.tsx" data-component="WelcomeLoader"></div> |
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 @@ | ||
{ | ||
"WelcomeLoader": { | ||
"props": {} | ||
} | ||
} |
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,61 @@ | ||
{ | ||
"name": "@welcome-ui/welcome-loader", | ||
"version": "6.1.1", | ||
"description": "Customizable design system with react • styled-components • styled-system and ariakit.", | ||
"main": "dist/index.js", | ||
"module": "dist/index.mjs", | ||
"types": "dist/types/index.d.ts", | ||
"exports": { | ||
".": { | ||
"types": "./dist/types/index.d.ts", | ||
"import": "./dist/index.mjs", | ||
"require": "./dist/index.js" | ||
}, | ||
"./package.json": "./package.json", | ||
"./dist/index.doc.json": "./dist/index.doc.json" | ||
}, | ||
"scripts": { | ||
"build": "node ../../scripts/build.js", | ||
"test": "jest", | ||
"types": "rimraf dist/types && tsc --emitDeclarationOnly --declaration --declarationDir dist/types", | ||
"doc": "node -r esm ../../scripts/doc-props.js --name WelcomeLoader" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/WTTJ/welcome-ui.git" | ||
}, | ||
"keywords": [ | ||
"design-system", | ||
"react", | ||
"ariakit", | ||
"styled-components", | ||
"styled-system", | ||
"ui-library", | ||
"ui", | ||
"ux", | ||
"jungle", | ||
"welcome", | ||
"WTTJ" | ||
], | ||
"author": "WTTJ <[email protected]>", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/WTTJ/welcome-ui/issues" | ||
}, | ||
"dependencies": { | ||
"lottie-light-react": "^2.4.0", | ||
"@welcome-ui/box": "^6.1.1", | ||
"@welcome-ui/system": "^6.1.1" | ||
}, | ||
"peerDependencies": { | ||
"@xstyled/styled-components": "^3.7.3", | ||
"react": "^18.0.0", | ||
"styled-components": "^5.3.9" | ||
}, | ||
"gitHead": "974e7bfd71f8cfe846cbffd678c3860a8952f9e9", | ||
"sideEffects": false, | ||
"homepage": "https://welcome-ui.com/components/welcome-loader" | ||
} |
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,24 @@ | ||
import React from 'react' | ||
import { forwardRef } from '@welcome-ui/system' | ||
import { Box, BoxProps } from '@welcome-ui/box' | ||
import { useLottie } from 'lottie-light-react' | ||
|
||
import loader from './loader.json' | ||
|
||
// eslint-disable-next-line no-empty-pattern | ||
export const WelcomeLoader = forwardRef<'div', BoxProps>((props, ref) => { | ||
const options = { | ||
animationData: loader, | ||
loop: true, | ||
} | ||
|
||
const { View } = useLottie(options) | ||
|
||
return ( | ||
<Box ref={ref} {...props}> | ||
{View} | ||
</Box> | ||
) | ||
}) | ||
|
||
WelcomeLoader.displayName = 'WelcomeLoader' |
Large diffs are not rendered by default.
Oops, something went wrong.
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,4 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"include": ["src", "../../types"] | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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