-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(divider): move && simplify component divider
Signed-off-by: aurore.stagnol <[email protected]>
- Loading branch information
Showing
84 changed files
with
483 additions
and
1,215 deletions.
There are no files selected for viewing
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
File renamed without changes.
68 changes: 68 additions & 0 deletions
68
packages-new/components/divider/documentation/specifications/spec.md
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,68 @@ | ||
* [**Interfaces**](#interfaces) | ||
* [**Types**](#types) | ||
* [**Classes**](#classes) | ||
* [**Type alias**](#type-alias) | ||
* [**Variables**](#variables) | ||
|
||
## Interfaces | ||
|
||
### OdsDividerAttributes | ||
|name | Type | Required | Default | Description| | ||
|---|---|:---:|---|---| | ||
|**`color`** | `OdsThemeColorIntent` | | | Divider color theme| | ||
|**`contrasted`** | _boolean_ | | | Divider design as contrasted version| | ||
|**`separator`** | _boolean_ | | | Divider has a separator or not| | ||
|**`size`** | `ODS_DIVIDER_SIZE` | | | Divider size| | ||
|
||
## Types | ||
|
||
### ODS_DIVIDER_SIZE | ||
| | | ||
|:---:| | ||
| `eight` | | ||
| `five` | | ||
| `four` | | ||
| `nine` | | ||
| `one` | | ||
| `seven` | | ||
| `six` | | ||
| `ten` | | ||
| `three` | | ||
| `two` | | ||
| `zero` | | ||
|
||
## Classes | ||
|
||
### OdsDividerController | ||
_common controller logic for divider component used by the different implementations._ | ||
_it contains all the glue between framework implementation and the third party service._ | ||
|
||
|
||
## Type alias | ||
|
||
### OdsDivider | ||
|
||
interface description of all implementation of `ods-divider`. | ||
each implementation must have defined events, methods, attributes | ||
and one controller for the common behavior logic | ||
|
||
> - `OdsComponentGenericMethods` | ||
> - `OdsComponentGenericEvents` | ||
### OdsDividerAttributes | ||
|
||
> _Based on `OdsComponentAttributes`_ | ||
### OdsDividerEvents | ||
|
||
> _Based on `OdsComponentEvents`_ | ||
### OdsDividerMethods | ||
|
||
> _Based on `OdsComponentMethods`_ | ||
## Variables | ||
|
||
### odsDividerDefaultAttributes | ||
`OdsDividerAttributes` |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions
6
...onents/divider/specifications-divider.mdx → ...specifications/specifications-divider.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
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
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
File renamed without changes.
File renamed without changes.
14 changes: 14 additions & 0 deletions
14
packages-new/components/divider/src/components/osds-divider/constants/default-attributes.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,14 @@ | ||
import { OdsDividerAttribute } from '../interfaces/attributes'; | ||
import { OdsThemeColorIntent } from '@ovhcloud/ods-theming'; | ||
import { ODS_DIVIDER_SIZE } from './divider-size'; | ||
|
||
const DEFAULT_ATTRIBUTE: OdsDividerAttribute = Object.freeze({ | ||
color: OdsThemeColorIntent.default, | ||
contrasted: false, | ||
separator: false, | ||
size: ODS_DIVIDER_SIZE.six, | ||
}); | ||
|
||
export { | ||
DEFAULT_ATTRIBUTE, | ||
}; |
20 changes: 20 additions & 0 deletions
20
packages-new/components/divider/src/components/osds-divider/constants/divider-size.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,20 @@ | ||
enum ODS_DIVIDER_SIZE { | ||
zero = '0', | ||
one = '1', | ||
two = '2', | ||
three = '3', | ||
four ='4', | ||
five ='5', | ||
six ='6', | ||
seven ='7', | ||
eight ='8', | ||
nine ='9', | ||
ten ='10', | ||
} | ||
|
||
const ODS_DIVIDER_SIZES = Object.freeze(Object.values(ODS_DIVIDER_SIZE)); | ||
|
||
export { | ||
ODS_DIVIDER_SIZE, | ||
ODS_DIVIDER_SIZES, | ||
}; |
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
Oops, something went wrong.