You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 7, 2020. It is now read-only.
Copy file name to clipboardexpand all lines: README.md
+142
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,148 @@ const app = angular
21
21
])
22
22
```
23
23
24
+
## Components
25
+
26
+
### Themes
27
+
28
+
Shows a select containing all themes available related to the ui. Themes can be defined through the `ThemesProvider` like this:
29
+
30
+
```js
31
+
ThemesProvider.setThemes([
32
+
{
33
+
id:"",
34
+
name:"None"
35
+
},
36
+
{
37
+
id:"oui-theme-sapphire",
38
+
name:"Sapphire"
39
+
},
40
+
{
41
+
id:"oui-theme-diamond",
42
+
name:"Diamond"
43
+
}
44
+
]);
45
+
```
46
+
47
+
### Component status
48
+
49
+
Shows development status of a component. There is two types of statuses, `cx-design` and `ux`. Depending of the combinaison of both statuses, a status level is chosen between `error`, `warning`, `info` and `success`.
50
+
51
+
Statuses are configured through the `ComponentStatusProvider` like this:
**(DEPRECATED)** This component should not be used anymore and is not maintained anymore.
83
+
84
+
## States
85
+
86
+
### root
87
+
88
+
When user open the website without any routes, he will be redirected to the `showcase.documentation` state.
89
+
90
+
### showcase
91
+
92
+
State used as a base to all routes that needs to show documentation menus. Sub states will automatically populate menus.
93
+
94
+
```js
95
+
$stateProvider
96
+
.state("showcase.ovh-ui-kit", {
97
+
url:"/ovh-ui-kit",
98
+
[...]
99
+
});
100
+
```
101
+
102
+
#### First level children states
103
+
104
+
They can use multiple attributes to populate menus and write better texts. Those items will appear on the top menu.
105
+
106
+
-**friendlyName**: Well formatted name that appears in the top menu
107
+
-**groupName**: Name that appears as header of side menu
108
+
-**weight**: Weight of an item. By default, items have 0 as weight. Items are rendered from left to right (bigger weight to smaller weight) and sorted alphabetically from a to z when numbers are equals
109
+
-**groups**: List of groups used to group children together in side menu
110
+
111
+
```js
112
+
$stateProvider
113
+
.state("showcase.oui-angular", {
114
+
url:"/oui-angular",
115
+
friendlyName:"Components",
116
+
groupName:"oui-angular components",
117
+
redirectTo:"showcase.oui-angular.introduction",
118
+
template:"<ui-view></ui-view>",
119
+
weight:9000,
120
+
groups: {
121
+
basic: {
122
+
name:"Basic",
123
+
weight:9000
124
+
},
125
+
form: {
126
+
name:"Form",
127
+
weight:8000
128
+
}
129
+
}
130
+
});
131
+
```
132
+
133
+
#### Second level children states
134
+
135
+
They can use multiple attributes to populate menus write better texts. Those items will appear on the side menu.
136
+
137
+
-**friendlyName**: Well formatted name that appears in the side menu
138
+
-**group**: Group key that correspond to first level state group to get group details
139
+
-**weight**: Weight of an item inside its group. By default, items have 0 as weight. Items are rendered from top to bottom (bigger weight to smaller weight) and sorted alphabetically from a to z when numbers are equals
140
+
141
+
```js
142
+
$stateProvider
143
+
.state("showcase.oui-angular.button", {
144
+
url:"/button",
145
+
friendlyName:"Button",
146
+
template: buttonTemplate,
147
+
group:"basic",
148
+
weight:3000
149
+
})
150
+
```
151
+
152
+
## States utilities
153
+
154
+
### redirectTo
155
+
156
+
When a state is declared, a new attribute can be used to automatically redirect the user to another state.
0 commit comments