-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(scripts): update component generator
- Loading branch information
Showing
49 changed files
with
722 additions
and
127 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
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,15 @@ | ||
/** | ||
* File generated and updated using the component generator. | ||
* | ||
* You should not update this file manually! | ||
* | ||
* If you want to create a new component, | ||
* please use the generator command `yarn new:component` at the root of the project | ||
*/ | ||
const componentNames = [ | ||
'spinner', | ||
'text', | ||
//--generator-anchor-- | ||
]; | ||
|
||
export { componentNames }; |
File renamed without changes.
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,10 @@ | ||
/** | ||
* File generated and updated using the component generator. | ||
* | ||
* You should not update this file manually! | ||
* | ||
* If you want to create a new component, | ||
* please use the generator command `yarn new:component` at the root of the project | ||
*/ | ||
export * from './spinner/src'; | ||
export * from './text/src'; |
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,26 @@ | ||
* [**Interfaces**](#interfaces) | ||
* [**Types**](#types) | ||
|
||
## Interfaces | ||
|
||
### OdsSpinnerAttribute | ||
|Name | Type | Required | Default | Description| | ||
|---|---|:---:|---|---| | ||
|**`contrasted`** | _boolean_ | | | contrasted or not: see component principles| | ||
|**`inline`** | _boolean_ | | | full width or not: see component principles| | ||
|**`mode`** | `indeterminate` | | | choose between infinite or progress spinner (infinite only for now)| | ||
|**`size`** | `ODS_SPINNER_SIZE` | | | size: see component principles| | ||
|
||
## Types | ||
|
||
### ODS_SPINNER_MODE | ||
| | | ||
|:---:| | ||
| `indeterminate` | | ||
|
||
### ODS_SPINNER_SIZE | ||
| | | ||
|:---:| | ||
| `lg` | | ||
| `md` | | ||
| `sm` | |
4 changes: 4 additions & 0 deletions
4
.../src/components/spinner/documentation/specifications/specifications-spinner.mdx
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 @@ | ||
import { Markdown } from '@storybook/addon-docs'; | ||
import Specs from './spec.md'; | ||
|
||
<Markdown>{ Specs }</Markdown> |
9 changes: 9 additions & 0 deletions
9
...rc/components/spinner/documentation/usage-guidelines/properties/usage.color.mdx
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,9 @@ | ||
import { Canvas } from '@storybook/addon-docs'; | ||
|
||
<Canvas sourceState="none"> | ||
<ods-spinner color="primary"></ods-spinner> | ||
</Canvas> | ||
|
||
```html | ||
<ods-spinner color="primary"></ods-spinner> | ||
``` |
13 changes: 13 additions & 0 deletions
13
...src/components/spinner/documentation/usage-guidelines/properties/usage.size.mdx
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,13 @@ | ||
import { Canvas } from '@storybook/addon-docs'; | ||
|
||
<Canvas sourceState="none"> | ||
<ods-spinner size='sm'></ods-spinner> | ||
<ods-spinner size='md'></ods-spinner> | ||
<ods-spinner size='lg'></ods-spinner> | ||
</Canvas> | ||
|
||
```html | ||
<ods-spinner size='sm'></ods-spinner> | ||
<ods-spinner size='md'></ods-spinner> | ||
<ods-spinner size='lg'></ods-spinner> | ||
``` |
27 changes: 27 additions & 0 deletions
27
packages/ods/src/components/spinner/documentation/usage-guidelines/usage.mdx
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,27 @@ | ||
import { Canvas } from '@storybook/addon-docs'; | ||
import ColorProperty from './properties/usage.color.mdx'; | ||
import SizeProperty from './properties/usage.size.mdx'; | ||
|
||
## Usage | ||
|
||
### Default | ||
|
||
<Canvas sourceState="none"> | ||
<div style={{ height: '300px', display: 'inline-flex'}}> | ||
<ods-spinner></ods-spinner> | ||
</div> | ||
</Canvas> | ||
|
||
```html | ||
<div style='height: 300px; display: inline-flex'> | ||
<ods-spinner></ods-spinner> | ||
</div> | ||
``` | ||
|
||
### Color | ||
|
||
<ColorProperty /> | ||
|
||
### Size | ||
|
||
<SizeProperty /> |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/** | ||
* File generated and updated using the component generator. | ||
* | ||
* You should not update this file manually! | ||
* | ||
* If you want to create a new component, | ||
* please use the generator command `yarn new:component` at the root of the project | ||
*/ | ||
const componentNames = [ | ||
'spinner', | ||
'text', | ||
//--generator-anchor-- | ||
]; | ||
|
||
export { componentNames }; |
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
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
20 changes: 20 additions & 0 deletions
20
packages/storybook/stories/components/spinner/1_specifications.stories.mdx
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,20 @@ | ||
import { Meta } from '@storybook/addon-docs'; | ||
import SpecificationsSpinner from '@ovhcloud/ods-components/src/components/spinner/documentation/specifications/specifications-spinner.mdx'; | ||
|
||
<Meta title="ODS Components/User feedback/Spinner [atom]/Specifications" /> | ||
|
||
# Spinner - Design Specifications | ||
---- | ||
|
||
A visual indicator that a process is happening in the background but the interface is not yet ready for interaction: | ||
<div> | ||
<osds-button color="primary" variant="ghost" href="https://zeroheight.com/6fc8a63f7/p/9017bb-spinner/b/40a887" target="_blank"> | ||
ZEROHEIGHT - SPINNER DESIGN GUIDELINES | ||
<osds-icon name="external-link" color="primary" size="xs"></osds-icon> | ||
</osds-button> | ||
</div> | ||
|
||
# Spinner - Technical Specification | ||
---- | ||
|
||
<SpecificationsSpinner /> |
9 changes: 9 additions & 0 deletions
9
packages/storybook/stories/components/spinner/2_usage.stories.mdx
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,9 @@ | ||
import { Meta } from '@storybook/addon-docs'; | ||
import Usage from '@ovhcloud/ods-components/src/components/spinner/documentation/usage-guidelines/usage.mdx'; | ||
|
||
<Meta title="ODS Components/User feedback/Spinner [atom]/Usage Guidelines" /> | ||
|
||
# Spinner - Usage Guidelines | ||
---- | ||
|
||
<Usage /> |
34 changes: 34 additions & 0 deletions
34
packages/storybook/stories/components/spinner/3_demo.stories.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,34 @@ | ||
import { ODS_SPINNER_COLOR, ODS_SPINNER_COLORS, ODS_SPINNER_SIZE, ODS_SPINNER_SIZES } from '@ovhcloud/ods-components'; | ||
import { defineCustomElement } from '@ovhcloud/ods-components/dist/components/ods-spinner'; | ||
import { html } from 'lit-html'; | ||
|
||
defineCustomElement(); | ||
|
||
export default { | ||
title: 'ODS Components/User feedback/Spinner [atom]/Demo', | ||
render: (args) => html` | ||
<ods-spinner color="${args.color}" | ||
size="${args.size}"> | ||
</ods-spinner> | ||
`, | ||
argTypes: { | ||
color: { | ||
// category: 'General', // TODO not native storybook, need a table | ||
control: { type: 'select' }, | ||
options: ODS_SPINNER_COLORS, | ||
}, | ||
size: { | ||
// category: 'General', // TODO not native storybook, need a table | ||
control: { type: 'select' }, | ||
options: ODS_SPINNER_SIZES, | ||
}, | ||
}, | ||
args: { | ||
color: ODS_SPINNER_COLOR.primary, | ||
size: ODS_SPINNER_SIZE.md, | ||
}, | ||
}; | ||
|
||
export const Default = { | ||
args: {}, | ||
}; |
32 changes: 0 additions & 32 deletions
32
packages/storybook/stories/components/text/3_demo.stories.ts
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.