@gipisistemas/ngx-core 1.0.9 → 1.0.11

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.
Files changed (49) hide show
  1. package/README.md +166 -168
  2. package/components/checkbox/{checkbox.component.scss → checkbox.scss} +46 -2
  3. package/components/date-picker/date-picker-calendar.scss +470 -0
  4. package/components/date-picker/date-picker.scss +74 -0
  5. package/components/date-picker/time-picker.scss +125 -0
  6. package/components/filter-listbox/filter-listbox.scss +191 -0
  7. package/components/form-field/form-field.scss +192 -0
  8. package/components/label/{label.component.scss → label.scss} +1 -1
  9. package/components/loading/loading.component.scss +27 -0
  10. package/components/{password-requeriments/password-requeriments.component.scss → password-requirements/password-requirements.scss} +11 -11
  11. package/components/radio-group/radio-group.component.scss +1 -1
  12. package/components/select/select.scss +243 -0
  13. package/components/skeleton/skeleton.component.scss +76 -76
  14. package/components/split-button/split-button.component.scss +2 -1
  15. package/components/toolbar/toolbar.component.scss +22 -22
  16. package/components/tooltip/tooltip.component.scss +143 -0
  17. package/components/top-nav/top-nav.component.scss +18 -18
  18. package/components/user-profile/user-profile.component.scss +76 -76
  19. package/fesm2022/gipisistemas-ngx-core.mjs +10984 -9664
  20. package/fesm2022/gipisistemas-ngx-core.mjs.map +1 -1
  21. package/index.d.ts +1310 -1424
  22. package/package.json +22 -21
  23. package/theming/_index.scss +4 -19
  24. package/theming/_palettes.scss +71 -71
  25. package/theming/_theme.scss +25 -33
  26. package/theming/_utils.scss +766 -759
  27. package/components/date-picker/date-picker.component.scss +0 -23
  28. package/components/date-range-picker/date-range-picker.component.scss +0 -105
  29. package/components/date-range-picker/shared/calendar/calendar.component.scss +0 -13
  30. package/components/datetime-picker/datetime-picker.component.scss +0 -283
  31. package/components/field-error/field-error.component.scss +0 -7
  32. package/components/month-picker/month-picker.component.scss +0 -33
  33. package/components/select/select.component.scss +0 -48
  34. package/components/select/shared/mat-select-styles.scss +0 -429
  35. package/components/select-enum/select-enum.component.scss +0 -37
  36. package/components/year-picker/year-picker.component.scss +0 -37
  37. /package/components/action-row/{action-row.component.scss → action-row.scss} +0 -0
  38. /package/components/avatar/{avatar.component.scss → avatar.scss} +0 -0
  39. /package/components/button/{button.component.scss → button.scss} +0 -0
  40. /package/components/button-group/{button-group.component.scss → button-group.scss} +0 -0
  41. /package/components/chips/{chips.component.scss → chips.scss} +0 -0
  42. /package/components/confirm-dialog/{confirm-dialog.component.scss → confirm-dialog.scss} +0 -0
  43. /package/components/empty/{empty.component.scss → empty.scss} +0 -0
  44. /package/components/expansion-panel/{expansion-panel.component.scss → expansion-panel.scss} +0 -0
  45. /package/components/fieldset/{fieldset.component.scss → fieldset.scss} +0 -0
  46. /package/components/file-drag-and-drop/{file-drag-and-drop.component.scss → file-drag-and-drop.scss} +0 -0
  47. /package/components/form-wrapper/{form-wrapper.component.scss → form-wrapper.scss} +0 -0
  48. /package/components/helpful-tip/{helpful-tip.component.scss → helpful-tip.scss} +0 -0
  49. /package/components/icon/{icon.component.scss → icon.scss} +0 -0
package/README.md CHANGED
@@ -1,168 +1,166 @@
1
- # GIPI - ngx-core
2
-
3
- Este projeto foi gerado utilizando o [Angular CLI](https://github.com/angular/angular-cli) - _versão `19.2.0`_.
4
-
5
- ## 📝 Sobre
6
-
7
- A biblioteca `ngx-core` fornece utilitários, temas e componentes reutilizáveis para projetos Angular, facilitando o desenvolvimento de interfaces consistentes e responsivas.
8
-
9
- ## 🧩 Pré-requisitos
10
-
11
- - [Node](https://nodejs.org/en/download) - _vesão `^18.19.1 || ^20.11.1 || ^22.0.0`._
12
- - [Angular](https://angular.dev/) - _versão `^19.2.0`._
13
- - [Angular Material](https://material.angular.io/) - _versão `^19.2.0`_.
14
- - [Extenso](https://github.com/lusofonia/extenso.js) - _versão `^2.1.0`_.
15
- - [Moment-timezone](https://momentjs.com/timezone/) - _versão `^0.5.47`_.
16
-
17
- ## ⚠️ Estrutura de Commits (Conventional Commits)
18
-
19
- Este projeto utiliza **Semantic Release** para gerar versões automaticamente.
20
- A versão (`patch`, `minor`, `major`) é definida de acordo com o **tipo do commit**.
21
-
22
- ### 🔑 Regras principais
23
- - **fix:** incrementa **patch** → `1.0.0 → 1.0.1`
24
- - **feat:** incrementa **minor** → `1.0.0 → 1.1.0`
25
- - **feat!:** ou qualquer commit com **BREAKING CHANGE** no corpo → incrementa **major** → `1.0.0 → 2.0.0`
26
-
27
- ### Exemplos de commits válidos
28
- - `fix: corrige bug no botão de login`
29
- - `feat: adiciona novo componente de avatar`
30
- - `feat!: altera API de autenticação`
31
- - `chore: atualiza dependências (não gera release)`
32
- - `docs: adiciona instruções no README (não gera release)`
33
-
34
- ### ⚠️ Importante
35
- Sempre coloque dois pontos e um espaço depois do tipo.
36
- - ✅ fix: descrição
37
- - fix:descrição
38
-
39
- Somente commits fix, feat ou com BREAKING CHANGE geram versão.
40
- Outros tipos (chore, docs, refactor, etc.) não geram release automaticamente.
41
-
42
- ## 🛠️ Desenvolvimento
43
-
44
- Para compilar a biblioteca em modo de desenvolvimento, execute:
45
-
46
- ```bash
47
- npm run watch
48
- ```
49
-
50
- Isso executará o comando:
51
-
52
- ```bash
53
- ng build --watch --configuration development
54
- ```
55
-
56
- Uma vez compilada. A biblioteca será recarregada automaticamente sempre que houver modificações nos arquivos.
57
-
58
- ## 🖥️ Utilização no aplicativo
59
-
60
- Para utilizar esta biblioteca, siga os passos abaixo:
61
-
62
- ### 1️⃣ Instalar a biblioteca no aplicativo
63
-
64
- Instale a biblioteca no seu aplicativo Angular executando:
65
-
66
- ```bash
67
- npm install caminho-da-lib\\dist\\ngx-core
68
- ```
69
-
70
- Substitua `caminho-da-lib` pelo caminho correto onde a biblioteca foi compilada.
71
-
72
- ### 2️⃣ Configurar `preserveSymlinks`
73
-
74
- É necessário definir `preserveSymlinks: true` no arquivo `angular.json` para evitar o seguinte erro:
75
-
76
- ```plaintext
77
- core.mjs:7195 ERROR RuntimeError: NG0203: inject() must be called from an injection context...
78
- ```
79
-
80
- 🔹 No `angular.json`, dentro de `projects -> nome-do-projeto -> architect -> build -> options`, adicione:
81
-
82
- ```json
83
- "preserveSymlinks": true
84
- ```
85
-
86
- ### 3️⃣ Adicionar os providers necessários
87
-
88
- Esses providers são essenciais para o funcionamento da biblioteca.
89
- No `main.ts` ou no arquivo de configuração `app.config.ts`, adicione os seguintes providers:
90
-
91
- ```typescript
92
- import { bootstrapApplication } from "@angular/platform-browser";
93
- import { AppComponent } from "./app/app.component";
94
- import { importProvidersFrom } from "@angular/core";
95
- import { MatSnackBarModule } from "@angular/material/snack-bar";
96
- import { provideHttpClient, withInterceptorsFromDi } from "@angular/common/http";
97
- import { provideAppMessages, DEFAULT_MESSAGES } from "@gipisistemas/ngx-core";
98
-
99
- bootstrapApplication(AppComponent, {
100
- providers: [
101
- // ...outros providers
102
- importProvidersFrom(MatSnackBarModule),
103
- provideHttpClient(withInterceptorsFromDi()),
104
- provideAppMessages(DEFAULT_MESSAGES),
105
- ],
106
- }).catch((err) => console.error(err));
107
- ```
108
-
109
- ### 4️⃣ Temas e estilos globais
110
-
111
- Definição de temas:
112
-
113
- 🔹 Se não informar o `$custom-theme` no mixin `all-component-themes` a biblioteca irá aderir as paletas de cores, fontes e densidades padrão.
114
-
115
- ##### Palettes
116
-
117
- - primary: `$palette-primary`
118
- - secondary: `$palette-secondary`
119
- - success: `$palette-success`
120
- - information: `$palette-information`
121
- - warning: `$palette-warning`
122
- - danger: `$palette-danger`
123
- - white: `$palette-white`
124
- - black: `$palette-black`
125
- - pastels: `$palette-pastels`
126
-
127
- ##### Typography
128
-
129
- - font-family: `'Roboto, sans-serif'`
130
- - font-size: `1.4rem`
131
- - font-base: `62.5%` - _100% equivale a 16px; Logo 62.5% de 16px = 10px; Assim 1rem equivale 10px;_
132
-
133
- ##### Density
134
-
135
- - scale: `0`
136
-
137
- Utilizando tema customizado:
138
-
139
- ```scss
140
- @use "@gipisistemas/ngx-core" as ngx-core;
141
-
142
- $custom-theme: ngx-core.define-theme(
143
- (
144
- palettes: (
145
- primary: $palette-primary,
146
- secondary: $palette-secondary,
147
- // ... other palettes
148
- ),
149
- typography: (
150
- font-family: "Roboto, sans-serif",
151
- font-size: 1.4rem,
152
- font-base: 62.5%,
153
- ),
154
- )
155
- );
156
-
157
- @include ngx-core.all-component-themes($custom-theme);
158
- ```
159
-
160
- Utilizando tema padrão:
161
-
162
- ```scss
163
- @use "@gipisistemas/ngx-core" as ngx-core;
164
- @include ngx-core.all-component-themes();
165
- ```
166
-
167
- ## 🚀 Produção
168
- Ainda será implementado
1
+ # GIPI - ngx-core
2
+
3
+ Este projeto foi gerado utilizando o [Angular CLI](https://github.com/angular/angular-cli) - _versão `19.2.0`_.
4
+
5
+ ## 📝 Sobre
6
+
7
+ A biblioteca `ngx-core` fornece utilitários, temas e componentes reutilizáveis para projetos Angular, facilitando o desenvolvimento de interfaces consistentes e responsivas.
8
+
9
+ ## 🧩 Pré-requisitos
10
+
11
+ - [Node](https://nodejs.org/en/download) - _vesão `^18.19.1 || ^20.11.1 || ^22.0.0`._
12
+ - [Angular](https://angular.dev/) - _versão `20.x.x`._
13
+ - [Angular Material](https://material.angular.io/) - _versão `20.x.x`_.
14
+
15
+ ## ⚠️ Estrutura de Commits (Conventional Commits)
16
+
17
+ Este projeto utiliza **Semantic Release** para gerar versões automaticamente.
18
+ A versão (`patch`, `minor`, `major`) é definida de acordo com o **tipo do commit**.
19
+
20
+ ### 🔑 Regras principais
21
+ - **fix:** incrementa **patch** → `1.0.0 → 1.0.1`
22
+ - **feat:** incrementa **minor** → `1.0.0 → 1.1.0`
23
+ - **feat!:** ou qualquer commit com **BREAKING CHANGE** no corpo → incrementa **major** → `1.0.0 → 2.0.0`
24
+
25
+ ### Exemplos de commits válidos
26
+ - `fix: corrige bug no botão de login`
27
+ - `feat: adiciona novo componente de avatar`
28
+ - `feat!: altera API de autenticação`
29
+ - `chore: atualiza dependências (não gera release)`
30
+ - `docs: adiciona instruções no README (não gera release)`
31
+
32
+ ### ⚠️ Importante
33
+ Sempre coloque dois pontos e um espaço depois do tipo.
34
+ - fix: descrição
35
+ - fix:descrição
36
+
37
+ Somente commits fix, feat ou com BREAKING CHANGE geram versão.
38
+ Outros tipos (chore, docs, refactor, etc.) não geram release automaticamente.
39
+
40
+ ## 🛠️ Desenvolvimento
41
+
42
+ Para compilar a biblioteca em modo de desenvolvimento, execute:
43
+
44
+ ```bash
45
+ npm run watch
46
+ ```
47
+
48
+ Isso executará o comando:
49
+
50
+ ```bash
51
+ ng build --watch --configuration development
52
+ ```
53
+
54
+ Uma vez compilada. A biblioteca será recarregada automaticamente sempre que houver modificações nos arquivos.
55
+
56
+ ## 🖥️ Utilização no aplicativo
57
+
58
+ Para utilizar esta biblioteca, siga os passos abaixo:
59
+
60
+ ### 1️⃣ Instalar a biblioteca no aplicativo
61
+
62
+ Instale a biblioteca no seu aplicativo Angular executando:
63
+
64
+ ```bash
65
+ npm install caminho-da-lib\\dist\\ngx-core
66
+ ```
67
+
68
+ Substitua `caminho-da-lib` pelo caminho correto onde a biblioteca foi compilada.
69
+
70
+ ### 2️⃣ Configurar `preserveSymlinks`
71
+
72
+ É necessário definir `preserveSymlinks: true` no arquivo `angular.json` para evitar o seguinte erro:
73
+
74
+ ```plaintext
75
+ core.mjs:7195 ERROR RuntimeError: NG0203: inject() must be called from an injection context...
76
+ ```
77
+
78
+ 🔹 No `angular.json`, dentro de `projects -> nome-do-projeto -> architect -> build -> options`, adicione:
79
+
80
+ ```json
81
+ "preserveSymlinks": true
82
+ ```
83
+
84
+ ### 3️⃣ Adicionar os providers necessários
85
+
86
+ Esses providers são essenciais para o funcionamento da biblioteca.
87
+ No `main.ts` ou no arquivo de configuração `app.config.ts`, adicione os seguintes providers:
88
+
89
+ ```typescript
90
+ import { bootstrapApplication } from "@angular/platform-browser";
91
+ import { AppComponent } from "./app/app.component";
92
+ import { importProvidersFrom } from "@angular/core";
93
+ import { MatSnackBarModule } from "@angular/material/snack-bar";
94
+ import { provideHttpClient, withInterceptorsFromDi } from "@angular/common/http";
95
+ import { provideAppMessages, DEFAULT_MESSAGES } from "@gipisistemas/ngx-core";
96
+
97
+ bootstrapApplication(AppComponent, {
98
+ providers: [
99
+ // ...outros providers
100
+ importProvidersFrom(MatSnackBarModule),
101
+ provideHttpClient(withInterceptorsFromDi()),
102
+ provideAppMessages(DEFAULT_MESSAGES),
103
+ ],
104
+ }).catch((err) => console.error(err));
105
+ ```
106
+
107
+ ### 4️⃣ Temas e estilos globais
108
+
109
+ Definição de temas:
110
+
111
+ 🔹 Se não informar o `$custom-theme` no mixin `all-component-themes` a biblioteca irá aderir as paletas de cores, fontes e densidades padrão.
112
+
113
+ ##### Palettes
114
+
115
+ - primary: `$palette-primary`
116
+ - secondary: `$palette-secondary`
117
+ - success: `$palette-success`
118
+ - information: `$palette-information`
119
+ - warning: `$palette-warning`
120
+ - danger: `$palette-danger`
121
+ - white: `$palette-white`
122
+ - black: `$palette-black`
123
+ - pastels: `$palette-pastels`
124
+
125
+ ##### Typography
126
+
127
+ - font-family: `'Roboto, sans-serif'`
128
+ - font-size: `1.4rem`
129
+ - font-base: `62.5%` - _100% equivale a 16px; Logo 62.5% de 16px = 10px; Assim 1rem equivale 10px;_
130
+
131
+ ##### Density
132
+
133
+ - scale: `0`
134
+
135
+ Utilizando tema customizado:
136
+
137
+ ```scss
138
+ @use "@gipisistemas/ngx-core" as ngx-core;
139
+
140
+ $custom-theme: ngx-core.define-theme(
141
+ (
142
+ palettes: (
143
+ primary: $palette-primary,
144
+ secondary: $palette-secondary,
145
+ // ... other palettes
146
+ ),
147
+ typography: (
148
+ font-family: "Roboto, sans-serif",
149
+ font-size: 1.4rem,
150
+ font-base: 62.5%,
151
+ ),
152
+ )
153
+ );
154
+
155
+ @include ngx-core.all-component-themes($custom-theme);
156
+ ```
157
+
158
+ Utilizando tema padrão:
159
+
160
+ ```scss
161
+ @use "@gipisistemas/ngx-core" as ngx-core;
162
+ @include ngx-core.all-component-themes();
163
+ ```
164
+
165
+ ## 🚀 Produção
166
+ Ainda será implementado
@@ -1,14 +1,19 @@
1
1
  @use '../../theming/utils' as utils;
2
+ @use '../../theming/breakpoints' as breakpoints;
2
3
 
3
4
  @mixin checkbox-theme($theme: ()) {
4
5
  $font-family: utils.get-font-family($theme);
5
6
  $font-size: utils.get-font-size($theme);
6
7
  $font-color: utils.get-font-color($theme);
8
+
7
9
  $white-100: utils.get-color($theme, white, 100);
10
+
8
11
  $primary-500: utils.get-color($theme, primary, 500);
12
+
13
+ $secondary-100: utils.get-color($theme, secondary, 100);
9
14
  $secondary-200: utils.get-color($theme, secondary, 200);
10
- $secondary-500: utils.get-color($theme, secondary, 500);
11
15
  $secondary-300: utils.get-color($theme, secondary, 300);
16
+ $secondary-500: utils.get-color($theme, secondary, 500);
12
17
 
13
18
  .g-checkbox {
14
19
  display: flex;
@@ -126,7 +131,7 @@
126
131
  }
127
132
  }
128
133
 
129
- > label {
134
+ .g-checkbox-label {
130
135
  display: flex;
131
136
  align-items: center;
132
137
  gap: 0.2rem;
@@ -145,4 +150,43 @@
145
150
  }
146
151
  }
147
152
  }
153
+
154
+ .g-checkbox-group {
155
+ display: flex;
156
+ flex-direction: column;
157
+ gap: 0.4rem;
158
+ width: fit-content;
159
+ user-select: none;
160
+ font-family: $font-family;
161
+
162
+ .g-checkbox-group-container {
163
+ display: flex;
164
+ flex-direction: column;
165
+ gap: 0.8rem;
166
+ }
167
+
168
+ &.g-checkbox-group-disabled .g-checkbox-group-container {
169
+ cursor: not-allowed;
170
+ }
171
+
172
+ .g-checkbox-group-select-all {
173
+ margin-bottom: 0.4rem;
174
+ }
175
+
176
+ .g-checkbox-group-options {
177
+ display: flex;
178
+ flex-direction: column;
179
+ gap: 0.8rem;
180
+ border-left: 2px solid $secondary-100;
181
+ margin-left: 1rem;
182
+ padding-left: 1.6rem;
183
+ }
184
+
185
+ @include breakpoints.mobile-view() {
186
+ .g-checkbox-group-horizontal .g-checkbox-group-options {
187
+ flex-direction: column;
188
+ gap: 0.8rem;
189
+ }
190
+ }
191
+ }
148
192
  }