@eclass/ui-kit 1.11.7 → 1.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +57 -0
- package/dist/eclass-ui-kit.es.js +38 -21
- package/dist/eclass-ui-kit.es.js.map +1 -1
- package/dist/eclass-ui-kit.umd.js +21 -21
- package/dist/eclass-ui-kit.umd.js.map +1 -1
- package/dist/organisms/CourseList/components/CourseStatus.d.ts +15 -0
- package/dist/organisms/CourseList/index.d.ts +1 -0
- package/dist/tsconfig.types.tsbuildinfo +1 -1
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
[[_TOC_]]
|
|
2
|
+
|
|
3
|
+
## Información
|
|
4
|
+
|
|
5
|
+
Este repositorio es una librería de componentes que se pensó para unificar estilos en los desarrollos de Eclass
|
|
6
|
+
|
|
7
|
+
La fuente de donde se basan los componentes se encuentran en este [**Sistema de diseño**](https://zeroheight.com/15698077d/p/48fae4-eclass-sistema-de-diseo)
|
|
8
|
+
|
|
9
|
+
## Scripts
|
|
10
|
+
|
|
11
|
+
Los componentes están al 100% en escritas en archivos `typescript`.
|
|
12
|
+
|
|
13
|
+
Además deben ser testeadas en donde el enfoque del `testing` es asegurarse de que se muestre todo lo que se promete
|
|
14
|
+
|
|
15
|
+
Por otra parte cada componente debe llevar su `storie` donde muestre todos los estados que puede tomar el componente
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
npm run dev
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Para trabajar de manera local
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
npm run storybook
|
|
25
|
+
```
|
|
26
|
+
Levanta el entorno de `storybook`
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
npm run test
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Ejecuta los test con `jest`
|
|
33
|
+
|
|
34
|
+
## Instalación
|
|
35
|
+
|
|
36
|
+
Se debe instalar este repositorio más unas dependencias
|
|
37
|
+
|
|
38
|
+
### npm
|
|
39
|
+
|
|
40
|
+
```shell
|
|
41
|
+
npm install @eclass/ui-kit @chakra-ui/react @emotion/react @emotion/styled framer-motion
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Implementación
|
|
45
|
+
|
|
46
|
+
Ejemplo de implementación en código.
|
|
47
|
+
|
|
48
|
+
```js
|
|
49
|
+
import { ChakraProvider } from '@chakra-ui/react'
|
|
50
|
+
import { theme } from '@eclass/ui-kit'
|
|
51
|
+
|
|
52
|
+
const AppWrapper = () => (
|
|
53
|
+
<ChakraProvider theme={theme} resetCSS={false}>
|
|
54
|
+
<App />
|
|
55
|
+
</ChakraProvider>
|
|
56
|
+
)
|
|
57
|
+
```
|
package/dist/eclass-ui-kit.es.js
CHANGED
|
@@ -27172,7 +27172,7 @@ function BtnTertiary({
|
|
|
27172
27172
|
m: m2,
|
|
27173
27173
|
onClick,
|
|
27174
27174
|
_hover: {
|
|
27175
|
-
color: blue
|
|
27175
|
+
color: `${blue}`
|
|
27176
27176
|
},
|
|
27177
27177
|
_focusVisible: {
|
|
27178
27178
|
boxShadow: `inset 0 0 0 2px ${blue}, inset 0 0 0 4px ${white}`
|
|
@@ -27186,7 +27186,13 @@ function BtnTertiary({
|
|
|
27186
27186
|
sx: {
|
|
27187
27187
|
"&:hover": {
|
|
27188
27188
|
"svg path": {
|
|
27189
|
-
fill: blue
|
|
27189
|
+
fill: `${blue}`
|
|
27190
|
+
},
|
|
27191
|
+
"@media (hover: none)": {
|
|
27192
|
+
color: `${gray}`,
|
|
27193
|
+
"svg path": {
|
|
27194
|
+
fill: colorIcon
|
|
27195
|
+
}
|
|
27190
27196
|
}
|
|
27191
27197
|
}
|
|
27192
27198
|
},
|
|
@@ -27319,6 +27325,30 @@ function IconSelection({
|
|
|
27319
27325
|
}
|
|
27320
27326
|
}
|
|
27321
27327
|
const ID_QUALIFIED = 7;
|
|
27328
|
+
function CourseStatus({
|
|
27329
|
+
progress: progress2,
|
|
27330
|
+
status
|
|
27331
|
+
}) {
|
|
27332
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
27333
|
+
children: [/* @__PURE__ */ jsxs(Flex, {
|
|
27334
|
+
children: [/* @__PURE__ */ jsx(IconSelection, {
|
|
27335
|
+
type: progress2.icon,
|
|
27336
|
+
progressValue: progress2.progress
|
|
27337
|
+
}), /* @__PURE__ */ jsx(Text, {
|
|
27338
|
+
m: "0",
|
|
27339
|
+
ml: ".625rem",
|
|
27340
|
+
fontSize: ".875rem",
|
|
27341
|
+
lineHeight: "1.125rem",
|
|
27342
|
+
children: progress2 == null ? void 0 : progress2.label
|
|
27343
|
+
})]
|
|
27344
|
+
}), (status == null ? void 0 : status.id) === ID_QUALIFIED && (progress2 == null ? void 0 : progress2.finalGrade) && (progress2 == null ? void 0 : progress2.finalGrade.length) > 0 && /* @__PURE__ */ jsx(Label, {
|
|
27345
|
+
size: "sm",
|
|
27346
|
+
bg: progress2.isApproved ? vars("colors-alert-jadeGreen") : vars("colors-alert-red"),
|
|
27347
|
+
color: vars("colors-neutral-white"),
|
|
27348
|
+
children: progress2 == null ? void 0 : progress2.finalGrade
|
|
27349
|
+
})]
|
|
27350
|
+
});
|
|
27351
|
+
}
|
|
27322
27352
|
function Section() {
|
|
27323
27353
|
const {
|
|
27324
27354
|
name,
|
|
@@ -27354,26 +27384,13 @@ function Section() {
|
|
|
27354
27384
|
fontWeight: "700",
|
|
27355
27385
|
lineHeight: "1.3",
|
|
27356
27386
|
children: name
|
|
27357
|
-
}), /* @__PURE__ */
|
|
27387
|
+
}), /* @__PURE__ */ jsx(Flex, {
|
|
27358
27388
|
mt: "1rem",
|
|
27359
27389
|
justify: "space-between",
|
|
27360
|
-
children:
|
|
27361
|
-
|
|
27362
|
-
|
|
27363
|
-
|
|
27364
|
-
}), /* @__PURE__ */ jsx(Text, {
|
|
27365
|
-
m: "0",
|
|
27366
|
-
ml: ".625rem",
|
|
27367
|
-
fontSize: ".875rem",
|
|
27368
|
-
lineHeight: "1.125rem",
|
|
27369
|
-
children: progress2 == null ? void 0 : progress2.label
|
|
27370
|
-
})]
|
|
27371
|
-
}), (status == null ? void 0 : status.id) === ID_QUALIFIED && (progress2 == null ? void 0 : progress2.finalGrade) && (progress2 == null ? void 0 : progress2.finalGrade.length) > 0 && /* @__PURE__ */ jsx(Label, {
|
|
27372
|
-
size: "sm",
|
|
27373
|
-
bg: progress2.isApproved ? vars("colors-alert-jadeGreen") : vars("colors-alert-red"),
|
|
27374
|
-
color: vars("colors-neutral-white"),
|
|
27375
|
-
children: progress2 == null ? void 0 : progress2.finalGrade
|
|
27376
|
-
})]
|
|
27390
|
+
children: /* @__PURE__ */ jsx(CourseStatus, {
|
|
27391
|
+
progress: progress2,
|
|
27392
|
+
status
|
|
27393
|
+
})
|
|
27377
27394
|
}), information != null && (information == null ? void 0 : information.length) > 0 && /* @__PURE__ */ jsx(List, {
|
|
27378
27395
|
spacing: ".625rem",
|
|
27379
27396
|
paddingInlineStart: "0",
|
|
@@ -28395,5 +28412,5 @@ function CourseList({
|
|
|
28395
28412
|
});
|
|
28396
28413
|
}
|
|
28397
28414
|
CourseList.displayName = "CourseList";
|
|
28398
|
-
export { Btn, BtnLink, BtnPrimary, BtnSecondary, BtnTertiary, CourseList, Label, Progress, Ripples, TinyAlert, dataFake, maxWidthCoursesList, theme, vars };
|
|
28415
|
+
export { Btn, BtnLink, BtnPrimary, BtnSecondary, BtnTertiary, CourseList, CourseStatus, Label, Progress, Ripples, TinyAlert, dataFake, maxWidthCoursesList, theme, vars };
|
|
28399
28416
|
//# sourceMappingURL=eclass-ui-kit.es.js.map
|