code7-leia 0.2.361 → 1.0.1
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 +107 -1
- package/dist/code7-leia.css +1 -0
- package/dist/index.cjs.js +1053 -0
- package/dist/index.es.js +10512 -0
- package/package.json +35 -71
- package/dist/Leia.d.ts +0 -3
- package/dist/code7-leia.cjs.development.js +0 -2466
- package/dist/code7-leia.cjs.development.js.map +0 -1
- package/dist/code7-leia.cjs.production.min.js +0 -2
- package/dist/code7-leia.cjs.production.min.js.map +0 -1
- package/dist/code7-leia.esm.js +0 -2458
- package/dist/code7-leia.esm.js.map +0 -1
- package/dist/components/CustomToast/index.d.ts +0 -13
- package/dist/components/CustomToast/styles.d.ts +0 -6
- package/dist/components/EmptyState/index.d.ts +0 -16
- package/dist/components/EmptyState/styles.d.ts +0 -7
- package/dist/components/FileArea/components/AreaUpload/index.d.ts +0 -24
- package/dist/components/FileArea/components/AreaUpload/styles.d.ts +0 -8
- package/dist/components/FileArea/components/Modal/ModalButtonClose.d.ts +0 -6
- package/dist/components/FileArea/components/Modal/ModalContent.d.ts +0 -8
- package/dist/components/FileArea/components/Modal/ModalFooter.d.ts +0 -6
- package/dist/components/FileArea/components/Modal/ModalHeader.d.ts +0 -6
- package/dist/components/FileArea/components/Modal/ModalTitle.d.ts +0 -6
- package/dist/components/FileArea/components/Modal/index.d.ts +0 -22
- package/dist/components/FileArea/components/Modal/styles.d.ts +0 -25
- package/dist/components/FileArea/components/Search/index.d.ts +0 -9
- package/dist/components/FileArea/components/Search/styles.d.ts +0 -3
- package/dist/components/FileArea/components/Spinner/index.d.ts +0 -4
- package/dist/components/FileArea/components/Spinner/styles.d.ts +0 -1
- package/dist/components/FileArea/components/Table/index.d.ts +0 -4
- package/dist/components/FileArea/components/Table/styles.d.ts +0 -3
- package/dist/components/FileArea/index.d.ts +0 -2
- package/dist/components/FileArea/styles.d.ts +0 -6
- package/dist/components/MultiSelect/index.d.ts +0 -17
- package/dist/components/MultiSelect/styles.d.ts +0 -7
- package/dist/components/Select/index.d.ts +0 -12
- package/dist/components/Select/styles.d.ts +0 -1
- package/dist/components/Tabs/index.d.ts +0 -35
- package/dist/components/Tabs/styles.d.ts +0 -13
- package/dist/components/TestArea/components/InputTest/index.d.ts +0 -7
- package/dist/components/TestArea/components/InputTest/styles.d.ts +0 -3
- package/dist/components/TestArea/components/TextArea/index.d.ts +0 -19
- package/dist/components/TestArea/components/TextArea/styles.d.ts +0 -10
- package/dist/components/TestArea/index.d.ts +0 -2
- package/dist/components/TestArea/styles.d.ts +0 -8
- package/dist/contexts/SharedPropsProvider.d.ts +0 -19
- package/dist/index.d.ts +0 -11
- package/dist/index.js +0 -8
- package/dist/interface/FileData.d.ts +0 -10
- package/dist/interface/Language.d.ts +0 -90
- package/dist/interface/Table.d.ts +0 -12
- package/dist/service/Api.d.ts +0 -3
- package/dist/service/ApiDev.d.ts +0 -3
- package/dist/service/ApiHml.d.ts +0 -3
- package/dist/store/index.d.ts +0 -10
- package/dist/store/modules/actions.d.ts +0 -93
- package/dist/store/modules/reducer.d.ts +0 -13
- package/dist/store/modules/sagas.d.ts +0 -26
- package/dist/store/modules/types.d.ts +0 -18
- package/dist/utils/formatAxios.d.ts +0 -3
- package/dist/utils/getApi.d.ts +0 -1
- package/dist/utils/getLanguage.d.ts +0 -2
- package/dist/utils/languages/en.d.ts +0 -2
- package/dist/utils/languages/es.d.ts +0 -2
- package/dist/utils/languages/pt-br.d.ts +0 -2
- package/src/Leia.tsx +0 -44
- package/src/components/CustomToast/index.tsx +0 -62
- package/src/components/CustomToast/styles.tsx +0 -73
- package/src/components/EmptyState/index.tsx +0 -88
- package/src/components/EmptyState/styles.tsx +0 -81
- package/src/components/FileArea/components/AreaUpload/index.tsx +0 -137
- package/src/components/FileArea/components/AreaUpload/styles.tsx +0 -75
- package/src/components/FileArea/components/Modal/ModalButtonClose.tsx +0 -23
- package/src/components/FileArea/components/Modal/ModalContent.tsx +0 -26
- package/src/components/FileArea/components/Modal/ModalFooter.tsx +0 -18
- package/src/components/FileArea/components/Modal/ModalHeader.tsx +0 -18
- package/src/components/FileArea/components/Modal/ModalTitle.tsx +0 -18
- package/src/components/FileArea/components/Modal/index.tsx +0 -131
- package/src/components/FileArea/components/Modal/styles.tsx +0 -121
- package/src/components/FileArea/components/Search/index.tsx +0 -44
- package/src/components/FileArea/components/Search/styles.tsx +0 -26
- package/src/components/FileArea/components/Spinner/index.tsx +0 -22
- package/src/components/FileArea/components/Spinner/styles.tsx +0 -59
- package/src/components/FileArea/components/Table/index.tsx +0 -34
- package/src/components/FileArea/components/Table/styles.tsx +0 -60
- package/src/components/FileArea/index.tsx +0 -281
- package/src/components/FileArea/styles.tsx +0 -183
- package/src/components/MultiSelect/index.tsx +0 -102
- package/src/components/MultiSelect/styles.tsx +0 -77
- package/src/components/Select/index.tsx +0 -53
- package/src/components/Select/styles.tsx +0 -49
- package/src/components/Tabs/index.tsx +0 -71
- package/src/components/Tabs/styles.tsx +0 -87
- package/src/components/TestArea/components/InputTest/index.tsx +0 -21
- package/src/components/TestArea/components/InputTest/styles.tsx +0 -28
- package/src/components/TestArea/components/TextArea/index.tsx +0 -97
- package/src/components/TestArea/components/TextArea/styles.tsx +0 -171
- package/src/components/TestArea/index.tsx +0 -101
- package/src/components/TestArea/styles.tsx +0 -112
- package/src/contexts/SharedPropsProvider.tsx +0 -79
- package/src/index.tsx +0 -20
- package/src/interface/FileData.ts +0 -11
- package/src/interface/Language.ts +0 -93
- package/src/interface/Table.ts +0 -12
- package/src/service/Api.ts +0 -9
- package/src/service/ApiDev.ts +0 -9
- package/src/service/ApiHml.ts +0 -9
- package/src/store/index.ts +0 -13
- package/src/store/modules/actions.ts +0 -88
- package/src/store/modules/reducer.ts +0 -46
- package/src/store/modules/sagas.ts +0 -127
- package/src/store/modules/types.ts +0 -19
- package/src/types/image.d.ts +0 -4
- package/src/utils/formatAxios.tsx +0 -15
- package/src/utils/getApi.tsx +0 -16
- package/src/utils/getLanguage.tsx +0 -17
- package/src/utils/languages/en.ts +0 -87
- package/src/utils/languages/es.ts +0 -87
- package/src/utils/languages/pt-br.ts +0 -87
package/README.md
CHANGED
|
@@ -1 +1,107 @@
|
|
|
1
|
-
# code7-boteria-lib-leia
|
|
1
|
+
# 📖 code7-boteria-leia-lib [](https://www.npmjs.com/package/code7-leia)
|
|
2
|
+
|
|
3
|
+
Biblioteca de componentes React para integração com a plataforma **Leia**, fornecendo áreas de arquivos e testes de forma simples e organizada.
|
|
4
|
+
|
|
5
|
+
## ✅ Requerimentos
|
|
6
|
+
|
|
7
|
+
- **React** >= 18
|
|
8
|
+
- **Node.js** >= 22
|
|
9
|
+
|
|
10
|
+
## 📦 Instalação
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm install code7-leia
|
|
14
|
+
# ou
|
|
15
|
+
yarn add code7-leia
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## ⚡ Exemplo de Uso
|
|
19
|
+
|
|
20
|
+
```jsx
|
|
21
|
+
import { useState } from "react";
|
|
22
|
+
import { createRoot } from "react-dom/client";
|
|
23
|
+
|
|
24
|
+
import { LeiaProvider, FileArea, TestArea } from "code7-leia";
|
|
25
|
+
|
|
26
|
+
const App = () => {
|
|
27
|
+
const [activeTab, setActiveTab] = useState("files");
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<div>
|
|
31
|
+
<button type="button" onClick={() => setActiveTab("files")}>
|
|
32
|
+
Files
|
|
33
|
+
</button>
|
|
34
|
+
<button type="button" onClick={() => setActiveTab("test")}>
|
|
35
|
+
Test
|
|
36
|
+
</button>
|
|
37
|
+
|
|
38
|
+
<LeiaProvider
|
|
39
|
+
id="SEU_ID"
|
|
40
|
+
token="SEU_TOKEN"
|
|
41
|
+
language="pt-br"
|
|
42
|
+
env="test"
|
|
43
|
+
>
|
|
44
|
+
{activeTab === "files" && <FileArea />}
|
|
45
|
+
{activeTab === "test" && <TestArea />}
|
|
46
|
+
</LeiaProvider>
|
|
47
|
+
</div>
|
|
48
|
+
);
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
const root = createRoot(document.getElementById("root") as HTMLElement);
|
|
52
|
+
root.render(<App />);
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## 🧩 Componentes
|
|
56
|
+
|
|
57
|
+
### `LeiaProvider`
|
|
58
|
+
|
|
59
|
+
Responsável por inicializar o contexto da biblioteca. Deve envolver os outros componentes.
|
|
60
|
+
|
|
61
|
+
| Propriedade | Tipo | Obrigatório | Descrição |
|
|
62
|
+
| ----------- | -------- | ----------- | --------------------------------------------- |
|
|
63
|
+
| `id` | `string` | ✅ | Identificador da aplicação/usuário. |
|
|
64
|
+
| `token` | `string` | ✅ | Token de autenticação. |
|
|
65
|
+
| `language` | `string` | ❌ | Idioma (`pt-br`, `en`, `es`). |
|
|
66
|
+
| `env` | `string` | ❌ | Ambiente de execução (`dev`, `test`, `prod`). |
|
|
67
|
+
|
|
68
|
+
### `FileArea`
|
|
69
|
+
|
|
70
|
+
Componente que representa a área de arquivos. Pode incluir upload, listagem, visualização ou edição.
|
|
71
|
+
|
|
72
|
+
### `TestArea`
|
|
73
|
+
|
|
74
|
+
Componente que representa a área de testes, usado para simulações ou execuções configuradas.
|
|
75
|
+
|
|
76
|
+
## 🌍 Idiomas
|
|
77
|
+
|
|
78
|
+
Atualmente suportados:
|
|
79
|
+
|
|
80
|
+
- pt-br 🇧🇷
|
|
81
|
+
- en 🇺🇸
|
|
82
|
+
- es 🇪🇸 Espanhol
|
|
83
|
+
|
|
84
|
+
## 🛠️ Desenvolvimento Local
|
|
85
|
+
|
|
86
|
+
Clone o repositório e rode em modo desenvolvimento:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
git clone git@github.com:code7-xlab/code7-boteria-lib-leia.git
|
|
90
|
+
cd code7-boteria-lib-leia
|
|
91
|
+
npm install
|
|
92
|
+
npm run dev
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## 📦 Build & Publicação
|
|
96
|
+
|
|
97
|
+
Gerar a versão de produção:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
npm run build
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Publicar no npm (se configurado):
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
npm publish
|
|
107
|
+
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.Toastify__toast-container{z-index:9999;-webkit-transform:translate3d(0,0,9999px);position:fixed;padding:4px;width:320px;box-sizing:border-box;color:#fff}.Toastify__toast-container--top-left{top:1em;left:1em}.Toastify__toast-container--top-center{top:1em;left:50%;transform:translate(-50%)}.Toastify__toast-container--top-right{top:1em;right:1em}.Toastify__toast-container--bottom-left{bottom:1em;left:1em}.Toastify__toast-container--bottom-center{bottom:1em;left:50%;transform:translate(-50%)}.Toastify__toast-container--bottom-right{bottom:1em;right:1em}@media only screen and (max-width : 480px){.Toastify__toast-container{width:100vw;padding:0;left:0;margin:0}.Toastify__toast-container--top-left,.Toastify__toast-container--top-center,.Toastify__toast-container--top-right{top:0;transform:translate(0)}.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-right{bottom:0;transform:translate(0)}.Toastify__toast-container--rtl{right:0;left:initial}}.Toastify__toast{position:relative;min-height:64px;box-sizing:border-box;margin-bottom:1rem;padding:8px;border-radius:4px;box-shadow:0 1px 10px #0000001a,0 2px 15px #0000000d;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;max-height:800px;overflow:hidden;font-family:sans-serif;cursor:pointer;direction:ltr}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--dark{background:#121212;color:#fff}.Toastify__toast--default{background:#fff;color:#aaa}.Toastify__toast--info{background:#3498db}.Toastify__toast--success{background:#07bc0c}.Toastify__toast--warning{background:#f1c40f}.Toastify__toast--error{background:#e74c3c}.Toastify__toast-body{margin:auto 0;-ms-flex:1 1 auto;flex:1 1 auto;padding:6px}.Toastify--animate{animation-fill-mode:both;animation-duration:.7s}@media only screen and (max-width : 480px){.Toastify__toast{margin-bottom:0;border-radius:0}}.Toastify__close-button{color:#fff;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;-ms-flex-item-align:start;align-self:flex-start}.Toastify__close-button--default{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:hover,.Toastify__close-button:focus{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:5px;z-index:9999;opacity:.7;background-color:#ffffffb3;transform-origin:left}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:initial;transform-origin:right}.Toastify__progress-bar--default{background:linear-gradient(to right,#4cd964,#5ac8fa,#007aff,#34aadc,#5856d6,#ff2d55)}.Toastify__progress-bar--dark{background:#bb86fc}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,0,0)}to{opacity:0;transform:translate3d(2000px,0,0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,0,0)}to{opacity:0;transform:translate3d(-2000px,0,0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,-10px,0)}40%,45%{opacity:1;transform:translate3d(0,20px,0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,10px,0)}40%,45%{opacity:1;transform:translate3d(0,-20px,0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--top-left,.Toastify__bounce-enter--bottom-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--top-right,.Toastify__bounce-enter--bottom-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--top-left,.Toastify__bounce-exit--bottom-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--top-right,.Toastify__bounce-exit--bottom-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:perspective(400px)}30%{transform:perspective(400px) rotateX(-20deg);opacity:1}to{transform:perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translateZ(0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translateZ(0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translateZ(0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translateZ(0)}}@keyframes Toastify__slideOutRight{0%{transform:translateZ(0)}to{visibility:hidden;transform:translate3d(110%,0,0)}}@keyframes Toastify__slideOutLeft{0%{transform:translateZ(0)}to{visibility:hidden;transform:translate3d(-110%,0,0)}}@keyframes Toastify__slideOutDown{0%{transform:translateZ(0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translateZ(0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--top-left,.Toastify__slide-enter--bottom-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--top-right,.Toastify__slide-enter--bottom-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--top-left,.Toastify__slide-exit--bottom-left{animation-name:Toastify__slideOutLeft}.Toastify__slide-exit--top-right,.Toastify__slide-exit--bottom-right{animation-name:Toastify__slideOutRight}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown}
|