Skip to content

Commit

Permalink
feat(divider): move && simplify component divider
Browse files Browse the repository at this point in the history
Signed-off-by: aurore.stagnol <[email protected]>
  • Loading branch information
astagnol authored and dpellier committed Aug 4, 2023
1 parent 1f34f9c commit 3b50868
Show file tree
Hide file tree
Showing 84 changed files with 483 additions and 1,215 deletions.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
# [15.0.1](https://ovhcloud.design/v15.0.1/?path=/docs/design-system-changelog--page) (2023-07-26)
[compare](https://github.com/ovh/design-system/compare/v15.0.0...v15.0.1)

**Note:** Version bump only for package @ovhcloud/ods-stencil-divider
**Note:** Version bump only for package @ovhcloud/ods-stencil-icon





Expand All @@ -21,9 +23,9 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
# [15.0.0](https://ovhcloud.design/v15.0.0/?path=/docs/design-system-changelog--page) (2023-07-25)
[compare](https://github.com/ovh/design-system/compare/v13.0.1...v15.0.0)

**Note:** Version bump only for package @ovhcloud/ods-stencil-divider

### Features

* **icon:** add hover style ([#77](https://github.com/ovh/design-system/issues/77)) ([d4b221f](https://github.com/ovh/design-system/commit/d4b221ff82a67b63b2eba89022bb9dff9b0d12ec))



Expand All @@ -33,7 +35,9 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
# [14.1.1](https://ovhcloud.design/v14.1.1/?path=/docs/design-system-changelog--page) (2023-07-19)
[compare](https://github.com/ovh/design-system/compare/v14.1.0...v14.1.1)

**Note:** Version bump only for package @ovhcloud/ods-stencil-divider
**Note:** Version bump only for package @ovhcloud/ods-stencil-icon





Expand All @@ -45,9 +49,9 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
# [14.1.0](https://ovhcloud.design/v14.1.0/?path=/docs/design-system-changelog--page) (2023-07-18)
[compare](https://github.com/ovh/design-system/compare/v13.0.1...v14.1.0)

**Note:** Version bump only for package @ovhcloud/ods-stencil-divider

### Features

* **icon:** add hover style ([#77](https://github.com/ovh/design-system/issues/77)) ([d4b221f](https://github.com/ovh/design-system/commit/d4b221ff82a67b63b2eba89022bb9dff9b0d12ec))



Expand All @@ -57,7 +61,9 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
# [14.0.1](https://ovhcloud.design/v14.0.1/?path=/docs/design-system-changelog--page) (2023-06-28)
[compare](https://github.com/ovh/design-system/compare/v14.0.0...v14.0.1)

**Note:** Version bump only for package @ovhcloud/ods-stencil-divider
**Note:** Version bump only for package @ovhcloud/ods-stencil-icon





Expand All @@ -69,9 +75,9 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
# [14.0.0](https://ovhcloud.design/v14.0.0/?path=/docs/design-system-changelog--page) (2023-06-28)
[compare](https://github.com/ovh/design-system/compare/v13.0.1...v14.0.0)

**Note:** Version bump only for package @ovhcloud/ods-stencil-divider

### Features

* **icon:** add hover style ([#77](https://github.com/ovh/design-system/issues/77)) ([d4b221f](https://github.com/ovh/design-system/commit/d4b221ff82a67b63b2eba89022bb9dff9b0d12ec))



Expand All @@ -81,7 +87,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
# [13.0.1](https://ovhcloud.design/v13.0.1/?path=/docs/design-system-changelog--page) (2023-06-09)
[compare](https://github.com/ovh/design-system/compare/v13.0.0...v13.0.1)

**Note:** Version bump only for package @ovhcloud/ods-stencil-divider
**Note:** Version bump only for package @ovhcloud/ods-stencil-icon



Expand All @@ -93,7 +99,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
# [13.0.0](https://ovhcloud.design/v13.0.0/?path=/docs/design-system-changelog--page) (2023-06-08)
[compare](https://github.com/ovh/design-system/compare/v12.1.3...v13.0.0)

**Note:** Version bump only for package @ovhcloud/ods-stencil-divider
**Note:** Version bump only for package @ovhcloud/ods-stencil-icon



Expand All @@ -105,7 +111,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
# [12.1.3](https://ovhcloud.design/v12.1.3/?path=/docs/design-system-changelog--page) (2023-05-16)
[compare](https://github.com/ovh/design-system/compare/v12.1.2...v12.1.3)

**Note:** Version bump only for package @ovhcloud/ods-stencil-divider
**Note:** Version bump only for package @ovhcloud/ods-stencil-icon



Expand All @@ -117,7 +123,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
# [12.1.2](https://ovhcloud.design/v12.1.2/?path=/docs/design-system-changelog--page) (2023-05-16)
[compare](https://github.com/ovh/design-system/compare/v12.1.1...v12.1.2)

**Note:** Version bump only for package @ovhcloud/ods-stencil-divider
**Note:** Version bump only for package @ovhcloud/ods-stencil-icon



Expand All @@ -129,7 +135,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
# [12.1.1](https://ovhcloud.design/v12.1.1/?path=/docs/design-system-changelog--page) (2023-05-05)
[compare](https://github.com/ovh/design-system/compare/v12.1.0...v12.1.1)

**Note:** Version bump only for package @ovhcloud/ods-stencil-divider
**Note:** Version bump only for package @ovhcloud/ods-stencil-icon



Expand All @@ -141,7 +147,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
# [12.1.0](https://ovhcloud.design/v12.1.0/?path=/docs/design-system-changelog--page) (2023-05-03)
[compare](https://github.com/ovh/design-system/compare/v12.0.5...v12.1.0)

**Note:** Version bump only for package @ovhcloud/ods-stencil-divider
**Note:** Version bump only for package @ovhcloud/ods-stencil-icon



Expand All @@ -153,7 +159,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
# [12.0.5](https://ovhcloud.design/v12.0.5/?path=/docs/design-system-changelog--page) (2023-04-28)
[compare](https://github.com/ovh/design-system/compare/v12.0.4...v12.0.5)

**Note:** Version bump only for package @ovhcloud/ods-stencil-divider
**Note:** Version bump only for package @ovhcloud/ods-stencil-icon



Expand All @@ -179,7 +185,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
# [12.0.3](https://ovhcloud.design/v12.0.3/?path=/docs/design-system-changelog--page) (2023-02-28)
[compare](https://github.com/ovh/design-system/compare/v12.0.2...v12.0.3)

**Note:** Version bump only for package @ovhcloud/ods-stencil-divider
**Note:** Version bump only for package @ovhcloud/ods-stencil-icon



Expand All @@ -191,7 +197,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
# [12.0.2](https://ovhcloud.design/v12.0.2/?path=/docs/design-system-changelog--page) (2023-02-28)
[compare](https://github.com/ovh/design-system/compare/v12.0.1...v12.0.2)

**Note:** Version bump only for package @ovhcloud/ods-stencil-divider
**Note:** Version bump only for package @ovhcloud/ods-stencil-icon



Expand All @@ -203,7 +209,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
# [12.0.1](https://ovhcloud.design/v12.0.1/?path=/docs/design-system-changelog--page) (2023-02-28)
[compare](https://github.com/ovh/design-system/compare/v12.0.0...v12.0.1)

**Note:** Version bump only for package @ovhcloud/ods-stencil-divider
**Note:** Version bump only for package @ovhcloud/ods-stencil-icon



Expand All @@ -215,4 +221,4 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
# [12.0.0](https://ovhcloud.design/v12.0.0/?path=/docs/design-system-changelog--page) (2023-02-27)
12.0.0

**Note:** Version bump only for package @ovhcloud/ods-stencil-divider
**Note:** Version bump only for package @ovhcloud/ods-stencil-icon
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`
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {Description} from '@storybook/addon-docs';
import Specs from '@ovhcloud/ods-core/src/components/divider/docs/spec.md';
import SpecsDividerContents from '@ovhcloud/ods-specifications/components/divider/specifications-divider-contents.mdx';
import SpecsDividerTests from '@ovhcloud/ods-specifications/components/divider/specifications-divider-tests.mdx';
import Specs from './spec.md';
import SpecsDividerContents from './specifications-divider-contents.mdx';
import SpecsDividerTests from './specifications-divider-tests.mdx';

## Description
The divider is a spacer dedicated to represent the empty space.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Config } from '@jest/types';
import { OdsGetJestConfig } from '@ovhcloud/ods-testing';
import { OdsGetJestConfig } from '@ovhcloud/ods-common-testing';

const args = process.argv.slice(2);

Expand All @@ -15,8 +15,9 @@ const args = process.argv.slice(2);
* };
* ```
*/
// @ts-ignore until dependencies are fixed to one unique version of @jest/types
const config: Config.InitialOptions = OdsGetJestConfig({
basePath: '<rootDir>/../../../..',
basePath: '<rootDir>/../../..',
args
});
export default config;
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
{
"name": "@ovhcloud/ods-stencil-divider",
"name": "@ovhcloud/ods-component-divider",
"version": "15.0.1",
"private": true,
"description": "Divider component",
"description": "ODS Divider component",
"author": "OVH SAS",
"license": "Apache-2.0",
"main": "dist/index.cjs.js",
"module": "dist/index.js",
"es2015": "dist/esm/index.js",
"es2017": "dist/esm/index.js",
"types": "dist/types/components.d.ts",
"types": "dist/types/index.d.ts",
"collection": "dist/collection/collection-manifest.json",
"collection:main": "dist/collection/index.js",
"scripts": {
Expand All @@ -35,9 +34,12 @@
"test:e2e:ci:screenshot:update": "stencil test --config stencil.config.ts --e2e --ci --screenshot --update-screenshot --passWithNoTests"
},
"dependencies": {
"@ovhcloud/ods-stencil-component": "^15.0.1"
"@ovhcloud/ods-common-core": "^15.0.1",
"@ovhcloud/ods-common-stencil": "^15.0.1",
"@ovhcloud/ods-theming": "^15.0.1"
},
"devDependencies": {
"@ovhcloud/ods-stencil-component-dev": "^15.0.1"
"@ovhcloud/ods-common-testing": "^15.0.1",
"@ovhcloud/ods-stencil-dev": "^15.0.1"
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@ovhcloud/ods-stencil-divider-react",
"name": "@ovhcloud/ods-component-divider-react",
"version": "15.0.1",
"private": true,
"description": "React specific wrapper for ods",
Expand All @@ -20,19 +20,14 @@
"dist/"
],
"dependencies": {
"@ovhcloud/ods-stencil-cart": "^15.0.1",
"@ovhcloud/ods-component-divider": "^15.0.1",
"tslib": "*"
},
"peerDependencies": {
"react": ">=16.8.6",
"react-dom": ">=16.8.6"
},
"devDependencies": {
"@types/react": "17.0.37",
"@types/react-dom": "17.0.11",
"react": "16.14.0",
"react-dom": "16.14.0",
"rimraf": "^3.0.2",
"typescript": "4.7.4"
"@ovhcloud/ods-react-dev": "^15.0.1"
}
}
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,
};
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,
};
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { ODS_DIVIDER_SIZE } from '../constants/divider-size';
import { OdsThemeColorIntent } from '@ovhcloud/ods-theming';
import { OdsDividerSize } from './ods-divider-size';
import { OdsComponentAttributes } from '../ods-component-attributes';

export interface OdsDividerAttributes extends OdsComponentAttributes {
interface OdsDividerAttribute {
/**
* Divider color theme
*/
Expand All @@ -18,5 +17,9 @@ export interface OdsDividerAttributes extends OdsComponentAttributes {
/**
* Divider size
*/
size?: OdsDividerSize;
size?: ODS_DIVIDER_SIZE;
}

export {
OdsDividerAttribute,
};
Loading

0 comments on commit 3b50868

Please sign in to comment.