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

chore: migrate clayui.com to next #5780

Open
wants to merge 60 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
202f779
chore: www
matuzalemsteles Mar 6, 2024
013e1a8
chore: update next
matuzalemsteles Mar 7, 2024
bf16c8b
chore: add clay packages
matuzalemsteles Mar 7, 2024
9000f42
chore: update page
matuzalemsteles Mar 7, 2024
564bb79
feat(www): add mdxts implementation to read documents from clay-core
matuzalemsteles Aug 7, 2024
cddbe1f
chore(www): add redirect and sf
matuzalemsteles Aug 9, 2024
5b4b501
chore(www): fixed version
matuzalemsteles Aug 12, 2024
b635e4f
chore(www): add next dependency to root directory
matuzalemsteles Aug 12, 2024
12c28e8
chore(www): static documents on build
matuzalemsteles Aug 12, 2024
c5a56dd
chore(www): fix error
matuzalemsteles Aug 12, 2024
881deea
feat(www): adds HTML/CSS tab support
matuzalemsteles Aug 15, 2024
5f5902b
chore(www): move the alert document to the new pattern
matuzalemsteles Aug 15, 2024
d687054
chore(www): move the autocomplete document to the new pattern
matuzalemsteles Aug 16, 2024
b87f211
chore(www): move the badge document to the new pattern
matuzalemsteles Aug 16, 2024
01e6c5c
chore(www): move the breadcrumb document to the new pattern
matuzalemsteles Aug 16, 2024
e920e40
chore(www): move the button document to the new pattern
matuzalemsteles Aug 16, 2024
30feed5
chore(www): move the card document to the new pattern
matuzalemsteles Aug 16, 2024
7b54faf
chore(www): move the color picker document to the new pattern
matuzalemsteles Aug 16, 2024
439fd6e
chore(www): sf
matuzalemsteles Aug 16, 2024
685df22
chore(www): move the data provider document to the new pattern
matuzalemsteles Aug 17, 2024
1a5857d
chore(www): move the date picker document to the new pattern
matuzalemsteles Aug 19, 2024
c4ea78d
chore(www): move the drop down document to the new pattern
matuzalemsteles Aug 20, 2024
77803fd
chore(www): move the empty state document to the new pattern
matuzalemsteles Aug 20, 2024
f30fb12
chore(www): move the icon document to the new pattern
matuzalemsteles Aug 28, 2024
3895ab0
chore(www): sf
matuzalemsteles Aug 28, 2024
90f8701
chore(www): move the label document to the new pattern
matuzalemsteles Aug 28, 2024
7359b19
chore(www): move the layout document to the new pattern
matuzalemsteles Sep 2, 2024
58c4760
chore(www): move the link document to the new pattern
matuzalemsteles Sep 2, 2024
aa73451
chore(www): move the list document to the new pattern
matuzalemsteles Sep 2, 2024
5fc7ab6
chore(www): move the loading indicator document to the new pattern
matuzalemsteles Sep 2, 2024
6eaa7dd
chore(www): move the localized input document to the new pattern
matuzalemsteles Sep 3, 2024
b49512b
chore(www): move the management toolbar document to the new pattern
matuzalemsteles Sep 3, 2024
2617a9a
chore(www): move the modal document to the new pattern
matuzalemsteles Sep 3, 2024
f7e72fe
chore(www): move the multi select document to the new pattern
matuzalemsteles Sep 5, 2024
f711a50
chore(www): move the multi step nav document to the new pattern
matuzalemsteles Sep 5, 2024
8a37a37
chore(www): move the nav document to the new pattern
matuzalemsteles Sep 5, 2024
f5069e7
chore(www): move the navigation bar document to the new pattern
matuzalemsteles Sep 5, 2024
56e479e
chore(www): move the pagination document to the new pattern
matuzalemsteles Sep 10, 2024
c7fa564
chore(www): move the pagination-bar document to the new pattern
matuzalemsteles Sep 10, 2024
5626fce
chore(www): move the panel document to the new pattern
matuzalemsteles Sep 11, 2024
94ab7b9
chore(www): move the popover document to the new pattern
matuzalemsteles Sep 12, 2024
2bfba66
chore(www): move the progress bar document to the new pattern
matuzalemsteles Sep 12, 2024
3265d97
chore(www): move the provider document to the new pattern
matuzalemsteles Sep 12, 2024
a4cda3e
chore(www): move the slider document to the new pattern
matuzalemsteles Sep 13, 2024
011f75d
chore(www): move the sticker document to the new pattern
matuzalemsteles Sep 17, 2024
df1b4e0
chore(www): add table markup document
matuzalemsteles Sep 17, 2024
3f6236a
chore(www): add tabs markup document
matuzalemsteles Sep 17, 2024
0a1ddde
chore(www): add time picker markup document
matuzalemsteles Sep 18, 2024
a86a5f1
chore(www): add time toolbar markup document
matuzalemsteles Sep 18, 2024
4fedc00
chore(www): add tooltip markup document
matuzalemsteles Sep 18, 2024
6c4e986
chore(www): add upper toolbar markup document
matuzalemsteles Sep 18, 2024
8c75376
chore(www): sf
matuzalemsteles Sep 18, 2024
318b403
chore(www): add icon and update packages
matuzalemsteles Sep 19, 2024
44d8b95
chore(www): add www to workspace
matuzalemsteles Sep 19, 2024
bc14ea7
chore(@clayui/button): fix bug
matuzalemsteles Sep 20, 2024
e9275c5
chore(www): remove from workspace
matuzalemsteles Sep 20, 2024
afbc0d1
chore(www): fixes conflict bug with eslint
matuzalemsteles Sep 20, 2024
91c515a
chore(www): fixes error in build
matuzalemsteles Sep 21, 2024
35f6cc3
chore(www): adjust link colors
matuzalemsteles Sep 24, 2024
aa9a7f1
chore(www): fix active color in sidebar
matuzalemsteles Sep 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ node_modules
package-lock.json
/packages/clay-css/src/js/**/*.js
packages/generator-clay-component/app/templates
yarn.lock
yarn.lock
.next
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ lib
node_modules
*.log
package-lock.json
.env
.gradle
.parcel-cache
.parcel-ci-builds
Expand Down
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ package-lock.json
/packages/clay-css/src/js/**/*.js
/packages/clay-css/src/scss/bootstrap/**/*.scss
/packages/generator-clay-component/app/templates
yarn.lock
yarn.lock
.next
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"private": true,
"repository": "https://github.com/liferay/clay",
"engines": {
"node": ">=14"
"node": "18.x"
},
"size-limit": [
{
Expand Down Expand Up @@ -127,5 +127,8 @@
"js-beautify": "1.7.5",
"event-stream": "3.3.4",
"graceful-fs": "^4.2.4"
},
"dependencies": {
"next": "^14.2.5"
}
}
245 changes: 213 additions & 32 deletions packages/clay-alert/docs/alert.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,60 +3,241 @@ title: 'Alerts'
description: 'Alerts are used to capture the attention of the user in an intrusive way.'
lexiconDefinition: 'https://liferay.design/lexicon/core-components/alerts/'
packageNpm: '@clayui/alert'
packageUse: "import Alert from '@clayui/alert';"
---

import {
Alert,
AlertIcon,
AlertToastContainer,
AlertVariants,
AlertWithButton,
InlineAlert,
} from '$packages/clay-alert/docs/index';
## Display Types

<div class="nav-toc-absolute">
<div class="nav-toc">
The available `displayTypes` are `info`, `secondary`, `success`, `warning`, and `danger`.

- [Display Types](#alert-display-types)
- [Variants](#variants)
- [Icons](#alert-icons)
- [Using with ClayButton](#using-with-claybutton)
- [Inline](#inline)
- [Using with ToastContainer](#using-with-toastcontainer)
```jsx preview
import {Provider} from '@clayui/core';
import Alert from '@clayui/alert';
import React from 'react';

</div>
</div>
import '@clayui/css/lib/css/atlas.css';

## Display Types(#alert-display-types)
export default function App() {
return (
<Provider spritemap="/public/icons.svg">
<div className="p-4">
<Alert displayType="info" title="Info" role={null}>
This is an info message.
</Alert>

The available `displayTypes` are `info`, `secondary`, `success`, `warning`, and `danger`.
<Alert displayType="success" title="Success" role={null}>
This is a success message.
</Alert>

<Alert displayType="warning" title="Warning" role={null}>
This is a warning message.
</Alert>

<Alert />
<Alert displayType="danger" title="Danger" role={null}>
This is a danger message.
</Alert>
</div>
</Provider>
);
}
```

We recommend that you review the use cases in the <a href="https://storybook.clayui.com/?path=/story/design-system-components-alert--default">Storybook</a>.
We recommend that you review the use cases in the [Storybook](https://storybook.clayui.com/?path=/story/design-system-components-alert--default).

## Variants

You can use alert with the `feedback`, `inline`, and `stripe` variants.

<AlertVariants />

## Icons(#alert-icons)
```jsx preview
import {Provider, Button} from '@clayui/core';
import Alert from '@clayui/alert';
import React from 'react';

import '@clayui/css/lib/css/atlas.css';

export default function App() {
return (
<Provider spritemap="/public/icons.svg">
<div className="p-4">
<div className="c-mt-3">
<Alert
actions={
<Button.Group spaced>
<Button displayType="warning" small>
Replace
</Button>
<Button alert>Keep Both</Button>
</Button.Group>
}
displayType="warning"
onClose={() => {}}
title="Alert"
variant="inline"
>
A file with this name already exists.
</Alert>
</div>

<Alert
displayType="info"
title="Info"
variant="stripe"
role={null}
>
This is a stripe variant.
</Alert>

<div className="c-mt-3">
<Alert
displayType="success"
title="This is an inline variant."
variant="inline"
role={null}
/>
</div>

<div className="c-mt-3">
<Alert
displayType="danger"
title="This is a feedback variant."
variant="feedback"
role={null}
/>
</div>
</div>
</Provider>
);
}
```

## Icons

Each Alert `displayType` has a default icon, the icon can be changed through the `symbol` attribute.

<AlertIcon />

## Using with ClayButton

<AlertWithButton />
```jsx preview
import {Provider} from '@clayui/core';
import Alert from '@clayui/alert';
import React from 'react';

import '@clayui/css/lib/css/atlas.css';

export default function App() {
return (
<Provider spritemap="/public/icons.svg">
<div className="p-4">
<Alert
displayType="info"
symbol="thumbs-up-full"
title="Info"
variant="stripe"
role={null}
>
This is a stripe variant.
</Alert>
</div>
</Provider>
);
}
```

## Using with Button

```jsx preview
import {Provider, Button} from '@clayui/core';
import Alert from '@clayui/alert';
import React from 'react';

import '@clayui/css/lib/css/atlas.css';

export default function App() {
return (
<Provider spritemap="/public/icons.svg">
<div className="p-4">
<Alert displayType="info" title="With a Button" role={null}>
This is an alert with a button!
<Alert.Footer>
<Button alert>View</Button>
</Alert.Footer>
</Alert>
</div>
</Provider>
);
}
```

### Inline

<InlineAlert />
```jsx preview
import {Provider, Button} from '@clayui/core';
import Alert from '@clayui/alert';
import React from 'react';

import '@clayui/css/lib/css/atlas.css';

export default function App() {
return (
<Provider spritemap="/public/icons.svg">
<div className="p-4">
<Alert
actions={<Button alert>View</Button>}
displayType="info"
title="With a Button"
variant="inline"
role={null}
>
This is an alert with a button!
</Alert>
</div>
</Provider>
);
}
```

## Using with ToastContainer

You can use alerts with a `ToastContainer` to render the alerts in a container with `position: fixed`.

<AlertToastContainer />
```jsx preview
import {Provider, Button} from '@clayui/core';
import Alert from '@clayui/alert';
import React, {useState} from 'react';

import '@clayui/css/lib/css/atlas.css';

export default function App() {
const [toastItems, setToastItems] = useState([]);

return (
<Provider spritemap="/public/icons.svg">
<div className="p-4">
<div>
<Button
onClick={() =>
setToastItems([...toastItems, Math.random() * 100])
}
>
Add Alert
</Button>
</div>

<Alert.ToastContainer>
{toastItems.map((value) => (
<Alert
autoClose={5000}
key={value}
onClose={() => {
setToastItems((prevItems) =>
prevItems.filter((item) => item !== value)
);
}}
title="Hola:"
>
My value is {value}
</Alert>
))}
</Alert.ToastContainer>
</div>
</Provider>
);
}
```
Loading