prototipo-cls-ui 0.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 T-Cloud
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,199 @@
1
+ # prototipo-cls-ui
2
+
3
+ Prototipo de framework CSS para o projeto TCloud da TOTVS, com proposta semelhante a frameworks como Bootstrap, porem focado nas necessidades de design system, padronizacao visual e escalabilidade do ecossistema TCloud.
4
+
5
+ Repositorio oficial: https://github.com/tcloud-dev/prototipo-cls-ui.git
6
+
7
+ ## Contexto do Projeto
8
+
9
+ Este projeto esta no inicio e, neste momento, ainda nao possui implementacao da nova framework CSS.
10
+
11
+ Atualmente, o repositorio contem apenas o diretorio de referencia `reference/tcloud-ui`, que representa a base anterior a ser estudada e evoluida.
12
+
13
+ ## Finalidade
14
+
15
+ A finalidade deste repositorio e construir uma grande evolucao da solucao anterior, criando uma nova fundacao para estilos, utilitarios e componentes CSS do TCloud.
16
+
17
+ Objetivos desta fase inicial:
18
+
19
+ - Definir a base arquitetural da nova framework CSS.
20
+ - Identificar pontos de melhoria da referencia atual.
21
+ - Estabelecer padroes de nomenclatura, organizacao e manutencao.
22
+ - Evoluir consistencia visual, produtividade e escalabilidade.
23
+
24
+ ## Estrutura Atual
25
+
26
+ - `reference/tcloud-ui`: referencia do projeto anterior.
27
+ - `README.md`: documentacao inicial do prototipo.
28
+
29
+ ## Como Clonar
30
+
31
+ Clone do projeto com submodulos:
32
+
33
+ ```bash
34
+ git clone --recurse-submodules https://github.com/tcloud-dev/prototipo-cls-ui.git
35
+ cd prototipo-cls-ui
36
+ ```
37
+
38
+ Se ja clonou sem submodulos:
39
+
40
+ ```bash
41
+ git submodule update --init --recursive
42
+ ```
43
+
44
+ ## Como Usar
45
+
46
+ ### Instalação Inicial
47
+
48
+ Após clonar o projeto, instale as dependências:
49
+
50
+ ```bash
51
+ npm install
52
+ ```
53
+
54
+ ### Desenvolvimento
55
+
56
+ Execute o build em modo watch para desenvolvimento:
57
+
58
+ ```bash
59
+ npm run dev
60
+ ```
61
+
62
+ Este comando irá monitorar alterações no diretório `src/` e recompilar automaticamente.
63
+
64
+ ### Build para Produção
65
+
66
+ Para gerar o build final no diretório `dist/`:
67
+
68
+ ```bash
69
+ npm run build
70
+ ```
71
+
72
+ O build gera:
73
+ - **ESM** (ES Modules): `dist/index.mjs`
74
+ - **CJS** (CommonJS): `dist/index.js`
75
+ - **Types**: `dist/index.d.ts`
76
+ - **Source Maps**: arquivos `.map`
77
+
78
+ ### Scripts Disponíveis
79
+
80
+ - `npm run dev` - Build em modo watch para desenvolvimento
81
+ - `npm run build` - Build de produção (ESM + CJS + tipos)
82
+ - `npm run clean` - Limpa o diretório dist/
83
+ - `npm test` - Executa testes
84
+ - `npm run lint` - Executa linting do código
85
+ - `npm run format` - Formata código com Prettier
86
+ - `npm run docs` - Gera documentação em /docs
87
+ - `npm run docs:serve` - Gera e serve documentação localmente
88
+
89
+ ### Gerar Documentação
90
+
91
+ Para gerar a documentação técnica do projeto:
92
+
93
+ ```bash
94
+ npm run docs
95
+ ```
96
+
97
+ Para visualizar a documentação localmente:
98
+
99
+ ```bash
100
+ npm run docs:serve
101
+ ```
102
+
103
+ A documentação será gerada no diretório `/docs` e pode ser publicada automaticamente no GitHub Pages.
104
+
105
+ ### Publicar no NPM
106
+
107
+ #### Via GitHub Actions (Recomendado)
108
+
109
+ 1. Acesse o repositório no GitHub
110
+ 2. Vá em **Actions** > **NPM Publish**
111
+ 3. Clique em **Run workflow**
112
+ 4. Selecione a tag desejada (latest, beta ou alpha)
113
+ 5. Confirme a execução
114
+
115
+ #### Via Linha de Comando (Manual)
116
+
117
+ ```bash
118
+ npm publish --tag latest --access public
119
+ ```
120
+
121
+ ## Sobre a Documentação
122
+
123
+ Este projeto utiliza **TypeDoc** para gerar documentação técnica automaticamente a partir dos comentários no código.
124
+
125
+ ### Por que TypeDoc?
126
+
127
+ - ✅ **Nativo para TypeScript** - Suporte completo a tipos e interfaces
128
+ - ✅ **Geração Automática** - Cria documentação a partir dos comentários JSDoc
129
+ - ✅ **Site Estático** - Gera páginas HTML navegáveis e pesquisáveis
130
+ - ✅ **GitHub Pages** - Integração fácil para publicação online
131
+ - ✅ **Temas Personalizáveis** - Suporta customização visual
132
+ - ✅ **Exportação de Tipos** - Documenta toda a API pública
133
+
134
+ ### Como Documentar o Código
135
+
136
+ Use comentários JSDoc no código TypeScript:
137
+
138
+ ```typescript
139
+ /**
140
+ * Componente de botão do Claus UI
141
+ * @public
142
+ */
143
+ export interface ButtonProps {
144
+ /** Texto do botão */
145
+ label: string;
146
+ /** Variante visual */
147
+ variant?: 'primary' | 'secondary' | 'tertiary';
148
+ /** Estado desabilitado */
149
+ disabled?: boolean;
150
+ }
151
+
152
+ /**
153
+ * Classe do componente Button
154
+ * @example
155
+ * ```typescript
156
+ * const button = new Button({
157
+ * label: 'Clique aqui',
158
+ * variant: 'primary'
159
+ * });
160
+ * ```
161
+ */
162
+ export class Button {
163
+ constructor(private props: ButtonProps) {}
164
+
165
+ render(): HTMLButtonElement {
166
+ // implementação
167
+ }
168
+ }
169
+ ```
170
+
171
+ ### Visualizar Documentação
172
+
173
+ A documentação é publicada automaticamente no GitHub Pages a cada push na branch principal.
174
+
175
+ Acesse em: `https://tcloud-dev.github.io/prototipo-cls-ui/`
176
+
177
+ ## Diretorio de Referencia
178
+
179
+ O diretorio `reference/tcloud-ui` deve ser utilizado como referencia tecnica para comparacao e apoio durante a evolucao do novo prototipo.
180
+
181
+ Para atualizar o conteudo da referencia quando necessario:
182
+
183
+ ```bash
184
+ git submodule update --remote --merge
185
+ ```
186
+
187
+ ## Status Atual
188
+
189
+ Projeto em fase de bootstrap inicial.
190
+
191
+ - Sem implementacao funcional da nova framework CSS ate o momento.
192
+ - Estrutura inicial preparada para evolucao incremental.
193
+
194
+ ## Proximos Passos Sugeridos
195
+
196
+ - Definir design tokens (cores, tipografia, espacamento, sombras).
197
+ - Definir convencoes de classes e arquitetura CSS.
198
+ - Criar os primeiros modulos base (layout, grid, tipografia, botoes, formularios e utilitarios).
199
+ - Estruturar documentacao tecnica e exemplos de uso.
package/dist/index.cjs ADDED
@@ -0,0 +1,2 @@
1
+ 'use strict';var r=class{constructor(t){this.props=t;}render(){let t=document.createElement("button");return t.textContent=this.props.label,t.className=`cls-button cls-button--${this.props.variant||"primary"}`,t.disabled=this.props.disabled||false,this.props.onClick&&t.addEventListener("click",this.props.onClick),t}};var i="0.0.1";exports.Button=r;exports.VERSION=i;//# sourceMappingURL=index.cjs.map
2
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/Button/Button.ts","../src/index.ts"],"names":["Button","props","button","VERSION"],"mappings":"aAsBO,IAAMA,CAAAA,CAAN,KAAa,CAClB,WAAA,CAAoBC,EAAoB,CAApB,IAAA,CAAA,KAAA,CAAAA,EAAqB,CAEzC,MAAA,EAA4B,CAC1B,IAAMC,CAAAA,CAAS,QAAA,CAAS,aAAA,CAAc,QAAQ,CAAA,CAC9C,OAAAA,EAAO,WAAA,CAAc,IAAA,CAAK,KAAA,CAAM,KAAA,CAChCA,CAAAA,CAAO,SAAA,CAAY,0BAA0B,IAAA,CAAK,KAAA,CAAM,OAAA,EAAW,SAAS,CAAA,CAAA,CAC5EA,CAAAA,CAAO,SAAW,IAAA,CAAK,KAAA,CAAM,QAAA,EAAY,KAAA,CAErC,IAAA,CAAK,KAAA,CAAM,SACbA,CAAAA,CAAO,gBAAA,CAAiB,OAAA,CAAS,IAAA,CAAK,KAAA,CAAM,OAAO,EAG9CA,CACT,CACF,EC5BO,IAAMC,CAAAA,CAAU","file":"index.cjs","sourcesContent":["/**\n * Componente de botão do Claus UI\n * @public\n */\nexport interface ButtonProps {\n /** Texto do botão */\n label: string;\n /** Variante visual */\n variant?: 'primary' | 'secondary' | 'tertiary';\n /** Estado desabilitado */\n disabled?: boolean;\n /** Callback de click */\n onClick?: () => void;\n}\n\n/**\n * Classe do componente Button\n * @example\n * ```typescript\n * const button = new Button({ label: 'Clique aqui', variant: 'primary' });\n * ```\n */\nexport class Button {\n constructor(private props: ButtonProps) {}\n\n render(): HTMLButtonElement {\n const button = document.createElement('button');\n button.textContent = this.props.label;\n button.className = `cls-button cls-button--${this.props.variant || 'primary'}`;\n button.disabled = this.props.disabled || false;\n \n if (this.props.onClick) {\n button.addEventListener('click', this.props.onClick);\n }\n\n return button;\n }\n}","/**\n * Claus UI - Design System para T-Cloud\n * @packageDocumentation\n */\n\n// Exemplo de componente inicial\nexport * from './components';\n\n// Versão do pacote\nexport const VERSION = '0.0.1';"]}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Componente de botão do Claus UI
3
+ * @public
4
+ */
5
+ interface ButtonProps {
6
+ /** Texto do botão */
7
+ label: string;
8
+ /** Variante visual */
9
+ variant?: 'primary' | 'secondary' | 'tertiary';
10
+ /** Estado desabilitado */
11
+ disabled?: boolean;
12
+ /** Callback de click */
13
+ onClick?: () => void;
14
+ }
15
+ /**
16
+ * Classe do componente Button
17
+ * @example
18
+ * ```typescript
19
+ * const button = new Button({ label: 'Clique aqui', variant: 'primary' });
20
+ * ```
21
+ */
22
+ declare class Button {
23
+ private props;
24
+ constructor(props: ButtonProps);
25
+ render(): HTMLButtonElement;
26
+ }
27
+
28
+ /**
29
+ * Claus UI - Design System para T-Cloud
30
+ * @packageDocumentation
31
+ */
32
+
33
+ declare const VERSION = "0.0.1";
34
+
35
+ export { Button, type ButtonProps, VERSION };
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Componente de botão do Claus UI
3
+ * @public
4
+ */
5
+ interface ButtonProps {
6
+ /** Texto do botão */
7
+ label: string;
8
+ /** Variante visual */
9
+ variant?: 'primary' | 'secondary' | 'tertiary';
10
+ /** Estado desabilitado */
11
+ disabled?: boolean;
12
+ /** Callback de click */
13
+ onClick?: () => void;
14
+ }
15
+ /**
16
+ * Classe do componente Button
17
+ * @example
18
+ * ```typescript
19
+ * const button = new Button({ label: 'Clique aqui', variant: 'primary' });
20
+ * ```
21
+ */
22
+ declare class Button {
23
+ private props;
24
+ constructor(props: ButtonProps);
25
+ render(): HTMLButtonElement;
26
+ }
27
+
28
+ /**
29
+ * Claus UI - Design System para T-Cloud
30
+ * @packageDocumentation
31
+ */
32
+
33
+ declare const VERSION = "0.0.1";
34
+
35
+ export { Button, type ButtonProps, VERSION };
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ var r=class{constructor(t){this.props=t;}render(){let t=document.createElement("button");return t.textContent=this.props.label,t.className=`cls-button cls-button--${this.props.variant||"primary"}`,t.disabled=this.props.disabled||false,this.props.onClick&&t.addEventListener("click",this.props.onClick),t}};var i="0.0.1";export{r as Button,i as VERSION};//# sourceMappingURL=index.js.map
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/Button/Button.ts","../src/index.ts"],"names":["Button","props","button","VERSION"],"mappings":"AAsBO,IAAMA,CAAAA,CAAN,KAAa,CAClB,WAAA,CAAoBC,EAAoB,CAApB,IAAA,CAAA,KAAA,CAAAA,EAAqB,CAEzC,MAAA,EAA4B,CAC1B,IAAMC,CAAAA,CAAS,QAAA,CAAS,aAAA,CAAc,QAAQ,CAAA,CAC9C,OAAAA,EAAO,WAAA,CAAc,IAAA,CAAK,KAAA,CAAM,KAAA,CAChCA,CAAAA,CAAO,SAAA,CAAY,0BAA0B,IAAA,CAAK,KAAA,CAAM,OAAA,EAAW,SAAS,CAAA,CAAA,CAC5EA,CAAAA,CAAO,SAAW,IAAA,CAAK,KAAA,CAAM,QAAA,EAAY,KAAA,CAErC,IAAA,CAAK,KAAA,CAAM,SACbA,CAAAA,CAAO,gBAAA,CAAiB,OAAA,CAAS,IAAA,CAAK,KAAA,CAAM,OAAO,EAG9CA,CACT,CACF,EC5BO,IAAMC,CAAAA,CAAU","file":"index.js","sourcesContent":["/**\n * Componente de botão do Claus UI\n * @public\n */\nexport interface ButtonProps {\n /** Texto do botão */\n label: string;\n /** Variante visual */\n variant?: 'primary' | 'secondary' | 'tertiary';\n /** Estado desabilitado */\n disabled?: boolean;\n /** Callback de click */\n onClick?: () => void;\n}\n\n/**\n * Classe do componente Button\n * @example\n * ```typescript\n * const button = new Button({ label: 'Clique aqui', variant: 'primary' });\n * ```\n */\nexport class Button {\n constructor(private props: ButtonProps) {}\n\n render(): HTMLButtonElement {\n const button = document.createElement('button');\n button.textContent = this.props.label;\n button.className = `cls-button cls-button--${this.props.variant || 'primary'}`;\n button.disabled = this.props.disabled || false;\n \n if (this.props.onClick) {\n button.addEventListener('click', this.props.onClick);\n }\n\n return button;\n }\n}","/**\n * Claus UI - Design System para T-Cloud\n * @packageDocumentation\n */\n\n// Exemplo de componente inicial\nexport * from './components';\n\n// Versão do pacote\nexport const VERSION = '0.0.1';"]}
package/package.json ADDED
@@ -0,0 +1,61 @@
1
+ {
2
+ "name": "prototipo-cls-ui",
3
+ "version": "0.0.1",
4
+ "description": "Prototipo do Claus UI, um Design System para o projeto T-Cloud da TOTVS.",
5
+ "main": "./dist/index.js",
6
+ "module": "./dist/index.mjs",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.mjs",
12
+ "require": "./dist/index.js"
13
+ },
14
+ "./styles": "./dist/styles.css"
15
+ },
16
+ "files": [
17
+ "dist"
18
+ ],
19
+ "scripts": {
20
+ "dev": "tsup --watch",
21
+ "build": "tsup",
22
+ "clean": "rm -rf dist",
23
+ "prepublishOnly": "npm run build",
24
+ "docs": "typedoc",
25
+ "docs:serve": "npm run docs && npx serve docs",
26
+ "test": "vitest",
27
+ "lint": "eslint src --ext .ts",
28
+ "format": "prettier --write \"src/**/*.ts\""
29
+ },
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "https://github.com/tcloud-dev/prototipo-cls-ui.git"
33
+ },
34
+ "keywords": [
35
+ "Claus",
36
+ "UI",
37
+ "Totvs",
38
+ "Design System",
39
+ "TCloud",
40
+ "Web Components",
41
+ "TypeScript"
42
+ ],
43
+ "author": "Christian Martins",
44
+ "license": "ISC",
45
+ "type": "module",
46
+ "publishConfig": {
47
+ "access": "public"
48
+ },
49
+ "devDependencies": {
50
+ "eslint": "^8.57.0",
51
+ "prettier": "^3.2.5",
52
+ "tsup": "^8.0.2",
53
+ "typedoc": "^0.25.13",
54
+ "typescript": "^5.4.5",
55
+ "vitest": "^1.6.0"
56
+ },
57
+ "bugs": {
58
+ "url": "https://github.com/tcloud-dev/prototipo-cls-ui/issues"
59
+ },
60
+ "homepage": "https://github.com/tcloud-dev/prototipo-cls-ui#readme"
61
+ }