semmet-angular 0.40.0 → 0.42.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.en.md +9 -9
- package/README.md +9 -9
- package/README.pt-BR.md +9 -9
- package/package.json +1 -1
- package/src/carousel/files/__name@dasherize__/__name@dasherize__.css.template +2 -1
- package/src/carousel/files/__name@dasherize__/__name@dasherize__.html.template +1 -1
- package/src/navbar/files/__name@dasherize__/__name@dasherize__.css.template +2 -2
- package/src/utils/generate-composition.js +7 -1
- package/src/utils/generate-composition.js.map +1 -1
- package/src/utils/generate-composition.ts +9 -1
package/README.en.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**Accessible UI delivery dev kit in Angular.**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Create accessible Angular components, interface blocks, and delivery scaffolds through the CLI.
|
|
6
6
|
|
|
7
7
|
Semmet Angular helps teams generate, compose, test, verify, and package accessible Angular UI using the Angular CLI ecosystem.
|
|
8
8
|
|
|
@@ -31,7 +31,7 @@ ng generate semmet-angular:deploy
|
|
|
31
31
|
|
|
32
32
|
Use isolated components when you need fine-grained control, or compositions when you want to accelerate accessible screens with validated structure.
|
|
33
33
|
|
|
34
|
-
- **Components**: isolated
|
|
34
|
+
- **Components**: isolated components such as `button`, `card`, `accordion`, `table`, and `navbar`.
|
|
35
35
|
- **Compositions / Blocks**: ready-made sections such as `section-card`, `section-faq`, `section-pricing`, `section-stats`, `section-table`, `section-form`, `section-tabs`, `section-list-group`, `section-alert`, `section-progress`, `section-carousel`, `header-navbar`, `footer-navigation`, and `command-list`.
|
|
36
36
|
- **Delivery**: `ng add`, `ci`, `docker`, `deploy`, and `verify`.
|
|
37
37
|
|
|
@@ -59,7 +59,7 @@ Compositions/blocks generate standalone Angular sections using the matching Semm
|
|
|
59
59
|
|
|
60
60
|
## Generated tests
|
|
61
61
|
|
|
62
|
-
Every component
|
|
62
|
+
Every component command generates test files next to the component:
|
|
63
63
|
|
|
64
64
|
```
|
|
65
65
|
my-faq.ts
|
|
@@ -91,7 +91,7 @@ This command generates `.github/workflows/ci.yml` using the package scripts that
|
|
|
91
91
|
|
|
92
92
|
When the project uses Playwright, the CI also installs Chromium with `playwright install --with-deps chromium` and caches `~/.cache/ms-playwright` with `actions/cache`, reducing follow-up run times.
|
|
93
93
|
|
|
94
|
-
By default, the
|
|
94
|
+
By default, the command does not overwrite an existing workflow. Use `--force` when you want to replace `.github/workflows/ci.yml`.
|
|
95
95
|
|
|
96
96
|
## Docker Packaging
|
|
97
97
|
|
|
@@ -101,7 +101,7 @@ ng generate semmet-angular:docker
|
|
|
101
101
|
|
|
102
102
|
This command generates `Dockerfile`, `.dockerignore`, and `nginx.conf` to package the Angular application as an image served by Nginx. The Dockerfile uses Node 24 in the build stage, detects the package manager by lockfile, runs the build, and copies the output configured in `angular.json` to `/usr/share/nginx/html`.
|
|
103
103
|
|
|
104
|
-
The `nginx.conf` includes SPA fallback with `try_files ... /index.html`. By default, the
|
|
104
|
+
The `nginx.conf` includes SPA fallback with `try_files ... /index.html`. By default, the command does not overwrite existing files; use `--force` to replace the current Docker configuration.
|
|
105
105
|
|
|
106
106
|
## Guided Deploy
|
|
107
107
|
|
|
@@ -119,7 +119,7 @@ ng generate semmet-angular:deploy --platform=github-pages
|
|
|
119
119
|
ng generate semmet-angular:deploy --platform=docker
|
|
120
120
|
```
|
|
121
121
|
|
|
122
|
-
Supported targets: Vercel (`vercel.json`), Netlify (`netlify.toml`), Firebase Hosting (`firebase.json` and `.firebaserc`), GitHub Pages (`.github/workflows/deploy.yml`), and Docker-based deployment (`compose.yml` and `deploy/docker.README.md`). The
|
|
122
|
+
Supported targets: Vercel (`vercel.json`), Netlify (`netlify.toml`), Firebase Hosting (`firebase.json` and `.firebaserc`), GitHub Pages (`.github/workflows/deploy.yml`), and Docker-based deployment (`compose.yml` and `deploy/docker.README.md`). The command detects the build output from `angular.json` when possible and does not overwrite existing files without `--force`.
|
|
123
123
|
|
|
124
124
|
## Projected content containers
|
|
125
125
|
|
|
@@ -183,7 +183,7 @@ The same pattern applies to `tabs`, `carousel`, and `disclosure`:
|
|
|
183
183
|
|
|
184
184
|
By default, projected panel/slide content is preserved after its first render. Set `[preserveContent]="false"` on the generated container to destroy inactive content when it closes or becomes inactive.
|
|
185
185
|
|
|
186
|
-
The smaller structural
|
|
186
|
+
The smaller structural components keep their simple input APIs and add safe slots where the generated component still owns the accessible structure:
|
|
187
187
|
|
|
188
188
|
```
|
|
189
189
|
<app-product-card title="Accessible components">
|
|
@@ -227,7 +227,7 @@ The smaller structural schematics keep their simple input APIs and add safe slot
|
|
|
227
227
|
</app-view-switcher>
|
|
228
228
|
```
|
|
229
229
|
|
|
230
|
-
##
|
|
230
|
+
## Components, Blocks, and Delivery (43)
|
|
231
231
|
|
|
232
232
|
**Overlays & disclosure**
|
|
233
233
|
|
|
@@ -307,7 +307,7 @@ Every generated component shares the same Material Design-informed look — clea
|
|
|
307
307
|
|
|
308
308
|
## Options
|
|
309
309
|
|
|
310
|
-
Every
|
|
310
|
+
Every component command accepts the same three options (same as `ng generate component`):
|
|
311
311
|
|
|
312
312
|
- `name` (required, positional) — component name.
|
|
313
313
|
- `project` — target project; defaults to the current/default project.
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**Dev kit de entrega de UI acessível em Angular.**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Gere componentes Angular acessíveis, blocos de interface e scaffolds de entrega pelo CLI.
|
|
6
6
|
|
|
7
7
|
Semmet Angular ajuda times a gerar, compor, testar, verificar e empacotar UI acessível usando o ecossistema do Angular CLI.
|
|
8
8
|
|
|
@@ -31,7 +31,7 @@ ng generate semmet-angular:deploy
|
|
|
31
31
|
|
|
32
32
|
Use componentes isolados quando precisar de controle fino, ou compositions quando quiser acelerar telas acessíveis com estrutura já validada.
|
|
33
33
|
|
|
34
|
-
- **Components**:
|
|
34
|
+
- **Components**: componentes isolados como `button`, `card`, `accordion`, `table` e `navbar`.
|
|
35
35
|
- **Compositions / Blocks**: seções prontas como `section-card`, `section-faq`, `section-pricing`, `section-stats`, `section-table`, `section-form`, `section-tabs`, `section-list-group`, `section-alert`, `section-progress`, `section-carousel`, `header-navbar`, `footer-navigation` e `command-list`.
|
|
36
36
|
- **Delivery**: `ng add`, `ci`, `docker`, `deploy` e `verify`.
|
|
37
37
|
|
|
@@ -91,7 +91,7 @@ Esse comando gera `.github/workflows/ci.yml` usando os scripts já existentes no
|
|
|
91
91
|
|
|
92
92
|
Quando o projeto usa Playwright, o CI também instala o Chromium com `playwright install --with-deps chromium` e cacheia `~/.cache/ms-playwright` com `actions/cache`, reduzindo o tempo das execuções seguintes.
|
|
93
93
|
|
|
94
|
-
Por padrão, o
|
|
94
|
+
Por padrão, o comando não sobrescreve um workflow existente. Use `--force` quando quiser substituir `.github/workflows/ci.yml`.
|
|
95
95
|
|
|
96
96
|
## Empacotamento com Docker
|
|
97
97
|
|
|
@@ -101,7 +101,7 @@ ng generate semmet-angular:docker
|
|
|
101
101
|
|
|
102
102
|
Esse comando gera `Dockerfile`, `.dockerignore` e `nginx.conf` para empacotar a aplicação Angular como uma imagem servida por Nginx. O Dockerfile usa Node 24 no estágio de build, detecta o gerenciador de pacotes por lockfile, executa o build e copia o output configurado no `angular.json` para `/usr/share/nginx/html`.
|
|
103
103
|
|
|
104
|
-
O `nginx.conf` inclui fallback de SPA com `try_files ... /index.html`. Por padrão, o
|
|
104
|
+
O `nginx.conf` inclui fallback de SPA com `try_files ... /index.html`. Por padrão, o comando não sobrescreve arquivos existentes; use `--force` para substituir a configuração Docker atual.
|
|
105
105
|
|
|
106
106
|
## Deploy Guiado
|
|
107
107
|
|
|
@@ -119,11 +119,11 @@ ng generate semmet-angular:deploy --platform=github-pages
|
|
|
119
119
|
ng generate semmet-angular:deploy --platform=docker
|
|
120
120
|
```
|
|
121
121
|
|
|
122
|
-
Destinos suportados: Vercel (`vercel.json`), Netlify (`netlify.toml`), Firebase Hosting (`firebase.json` e `.firebaserc`), GitHub Pages (`.github/workflows/deploy.yml`) e deploy baseado em Docker (`compose.yml` e `deploy/docker.README.md`). O
|
|
122
|
+
Destinos suportados: Vercel (`vercel.json`), Netlify (`netlify.toml`), Firebase Hosting (`firebase.json` e `.firebaserc`), GitHub Pages (`.github/workflows/deploy.yml`) e deploy baseado em Docker (`compose.yml` e `deploy/docker.README.md`). O comando detecta o output do build no `angular.json` quando possível e não sobrescreve arquivos existentes sem `--force`.
|
|
123
123
|
|
|
124
124
|
## Testes Gerados
|
|
125
125
|
|
|
126
|
-
Todo
|
|
126
|
+
Todo comando de componente gera arquivos de teste ao lado do componente:
|
|
127
127
|
|
|
128
128
|
```text
|
|
129
129
|
minha-faq.ts
|
|
@@ -197,7 +197,7 @@ O mesmo padrão vale para `tabs`, `carousel` e `disclosure`:
|
|
|
197
197
|
|
|
198
198
|
Por padrão, o conteúdo projetado de painel/slide é preservado depois da primeira renderização. Use `[preserveContent]="false"` no container gerado para destruir conteúdo inativo quando ele fechar ou ficar inativo.
|
|
199
199
|
|
|
200
|
-
Os
|
|
200
|
+
Os componentes estruturais menores mantêm APIs simples por input e adicionam slots seguros onde o componente gerado continua dono da estrutura acessível:
|
|
201
201
|
|
|
202
202
|
```html
|
|
203
203
|
<app-product-card title="Componentes acessíveis">
|
|
@@ -241,7 +241,7 @@ Os schematics estruturais menores mantêm APIs simples por input e adicionam slo
|
|
|
241
241
|
</app-view-switcher>
|
|
242
242
|
```
|
|
243
243
|
|
|
244
|
-
##
|
|
244
|
+
## Componentes, Blocks e Entrega (43)
|
|
245
245
|
|
|
246
246
|
**Overlays e disclosure**
|
|
247
247
|
|
|
@@ -321,7 +321,7 @@ Todo componente gerado compartilha um visual inspirado em Material Design — su
|
|
|
321
321
|
|
|
322
322
|
## Opções
|
|
323
323
|
|
|
324
|
-
Todo
|
|
324
|
+
Todo comando de componente aceita as mesmas três opções de `ng generate component`:
|
|
325
325
|
|
|
326
326
|
- `name` (obrigatório, posicional) — nome do componente.
|
|
327
327
|
- `project` — projeto alvo; por padrão, usa o projeto atual/default.
|
package/README.pt-BR.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**Dev kit de entrega de UI acessível em Angular.**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Gere componentes Angular acessíveis, blocos de interface e scaffolds de entrega pelo CLI.
|
|
6
6
|
|
|
7
7
|
Semmet Angular ajuda times a gerar, compor, testar, verificar e empacotar UI acessível usando o ecossistema do Angular CLI.
|
|
8
8
|
|
|
@@ -29,7 +29,7 @@ ng generate semmet-angular:deploy
|
|
|
29
29
|
|
|
30
30
|
Use componentes isolados quando precisar de controle fino, ou compositions quando quiser acelerar telas acessíveis com estrutura já validada.
|
|
31
31
|
|
|
32
|
-
- **Components**:
|
|
32
|
+
- **Components**: componentes isolados como `button`, `card`, `accordion`, `table` e `navbar`.
|
|
33
33
|
- **Compositions / Blocks**: seções prontas como `section-card`, `section-faq`, `section-pricing`, `section-stats`, `section-table`, `section-form`, `section-tabs`, `section-list-group`, `section-alert`, `section-progress`, `section-carousel`, `header-navbar`, `footer-navigation` e `command-list`.
|
|
34
34
|
- **Delivery**: `ng add`, `ci`, `docker`, `deploy` e `verify`.
|
|
35
35
|
|
|
@@ -89,7 +89,7 @@ Esse comando gera `.github/workflows/ci.yml` usando os scripts já existentes no
|
|
|
89
89
|
|
|
90
90
|
Quando o projeto usa Playwright, o CI também instala o Chromium com `playwright install --with-deps chromium` e cacheia `~/.cache/ms-playwright` com `actions/cache`, reduzindo o tempo das execuções seguintes.
|
|
91
91
|
|
|
92
|
-
Por padrão, o
|
|
92
|
+
Por padrão, o comando não sobrescreve um workflow existente. Use `--force` quando quiser substituir `.github/workflows/ci.yml`.
|
|
93
93
|
|
|
94
94
|
## Empacotamento com Docker
|
|
95
95
|
|
|
@@ -99,7 +99,7 @@ ng generate semmet-angular:docker
|
|
|
99
99
|
|
|
100
100
|
Esse comando gera `Dockerfile`, `.dockerignore` e `nginx.conf` para empacotar a aplicação Angular como uma imagem servida por Nginx. O Dockerfile usa Node 24 no estágio de build, detecta o gerenciador de pacotes por lockfile, executa o build e copia o output configurado no `angular.json` para `/usr/share/nginx/html`.
|
|
101
101
|
|
|
102
|
-
O `nginx.conf` inclui fallback de SPA com `try_files ... /index.html`. Por padrão, o
|
|
102
|
+
O `nginx.conf` inclui fallback de SPA com `try_files ... /index.html`. Por padrão, o comando não sobrescreve arquivos existentes; use `--force` para substituir a configuração Docker atual.
|
|
103
103
|
|
|
104
104
|
## Deploy Guiado
|
|
105
105
|
|
|
@@ -117,11 +117,11 @@ ng generate semmet-angular:deploy --platform=github-pages
|
|
|
117
117
|
ng generate semmet-angular:deploy --platform=docker
|
|
118
118
|
```
|
|
119
119
|
|
|
120
|
-
Destinos suportados: Vercel (`vercel.json`), Netlify (`netlify.toml`), Firebase Hosting (`firebase.json` e `.firebaserc`), GitHub Pages (`.github/workflows/deploy.yml`) e deploy baseado em Docker (`compose.yml` e `deploy/docker.README.md`). O
|
|
120
|
+
Destinos suportados: Vercel (`vercel.json`), Netlify (`netlify.toml`), Firebase Hosting (`firebase.json` e `.firebaserc`), GitHub Pages (`.github/workflows/deploy.yml`) e deploy baseado em Docker (`compose.yml` e `deploy/docker.README.md`). O comando detecta o output do build no `angular.json` quando possível e não sobrescreve arquivos existentes sem `--force`.
|
|
121
121
|
|
|
122
122
|
## Testes Gerados
|
|
123
123
|
|
|
124
|
-
Todo
|
|
124
|
+
Todo comando de componente gera arquivos de teste ao lado do componente:
|
|
125
125
|
|
|
126
126
|
```text
|
|
127
127
|
minha-faq.ts
|
|
@@ -195,7 +195,7 @@ O mesmo padrão vale para `tabs`, `carousel` e `disclosure`:
|
|
|
195
195
|
|
|
196
196
|
Por padrão, o conteúdo projetado de painel/slide é preservado depois da primeira renderização. Use `[preserveContent]="false"` no container gerado para destruir conteúdo inativo quando ele fechar ou ficar inativo.
|
|
197
197
|
|
|
198
|
-
Os
|
|
198
|
+
Os componentes estruturais menores mantêm APIs simples por input e adicionam slots seguros onde o componente gerado continua dono da estrutura acessível:
|
|
199
199
|
|
|
200
200
|
```html
|
|
201
201
|
<app-product-card title="Componentes acessíveis">
|
|
@@ -239,7 +239,7 @@ Os schematics estruturais menores mantêm APIs simples por input e adicionam slo
|
|
|
239
239
|
</app-view-switcher>
|
|
240
240
|
```
|
|
241
241
|
|
|
242
|
-
##
|
|
242
|
+
## Componentes, Blocks e Entrega (43)
|
|
243
243
|
|
|
244
244
|
**Overlays e disclosure**
|
|
245
245
|
|
|
@@ -319,7 +319,7 @@ Todo componente gerado compartilha um visual inspirado em Material Design — su
|
|
|
319
319
|
|
|
320
320
|
## Opções
|
|
321
321
|
|
|
322
|
-
Todo
|
|
322
|
+
Todo comando de componente aceita as mesmas três opções de `ng generate component`:
|
|
323
323
|
|
|
324
324
|
- `name` (obrigatório, posicional) — nome do componente.
|
|
325
325
|
- `project` — projeto alvo; por padrão, usa o projeto atual/default.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "semmet-angular",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.42.0",
|
|
4
4
|
"description": "Accessible UI delivery dev kit in Angular: schematics that generate components, compositions, tests, and delivery scaffolds as native editable Angular code.",
|
|
5
5
|
"publisher": "danilodevsilva",
|
|
6
6
|
"license": "MIT",
|
|
@@ -16,6 +16,7 @@ Import <%= classify(name) %> and <%= classify(name) %>Slide in that parent compo
|
|
|
16
16
|
Set [preserveContent]="false" on <<%= selector %>> to destroy inactive slide content.
|
|
17
17
|
-->
|
|
18
18
|
<section aria-roledescription="carousel" aria-label="Featured items">
|
|
19
|
+
<button type="button" [disabled]="slides().length <= 1" (click)="previous()" aria-label="Previous slide">‹</button>
|
|
19
20
|
<div aria-live="polite">
|
|
20
21
|
@for (slide of slides(); track slide.id(); let i = $index) {
|
|
21
22
|
<div
|
|
@@ -29,6 +30,5 @@ Set [preserveContent]="false" on <<%= selector %>> to destroy inactive slide con
|
|
|
29
30
|
</div>
|
|
30
31
|
}
|
|
31
32
|
</div>
|
|
32
|
-
<button type="button" [disabled]="slides().length <= 1" (click)="previous()" aria-label="Previous slide">‹</button>
|
|
33
33
|
<button type="button" [disabled]="slides().length <= 1" (click)="next()" aria-label="Next slide">›</button>
|
|
34
34
|
</section>
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
grid-template-columns: 1fr auto;
|
|
22
22
|
align-items: center;
|
|
23
23
|
gap: var(--semmet-space-xs);
|
|
24
|
-
padding: var(--semmet-space-
|
|
24
|
+
padding: var(--semmet-space-2xs);
|
|
25
25
|
border: 1px solid var(--semmet-color-outline);
|
|
26
26
|
border-radius: var(--semmet-radius-md);
|
|
27
27
|
color: var(--semmet-color-on-surface);
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
@media (min-width: 48rem) {
|
|
147
147
|
.semmet-navbar {
|
|
148
148
|
grid-template-columns: auto 1fr;
|
|
149
|
-
padding-inline: var(--semmet-space-
|
|
149
|
+
padding-inline: var(--semmet-space-2xs);
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
.semmet-navbar__toggle {
|
|
@@ -24,6 +24,12 @@ const knownKinds = new Set([
|
|
|
24
24
|
'section-table',
|
|
25
25
|
'section-tabs',
|
|
26
26
|
]);
|
|
27
|
+
function buildSupportName(name, variable) {
|
|
28
|
+
const variableName = core_1.strings.dasherize(variable);
|
|
29
|
+
return name === variableName || name.endsWith(`-${variableName}`)
|
|
30
|
+
? `${name}-ui`
|
|
31
|
+
: `${name}-${variableName}`;
|
|
32
|
+
}
|
|
27
33
|
function getSupportingComponent(kind) {
|
|
28
34
|
switch (kind) {
|
|
29
35
|
case 'section-card':
|
|
@@ -62,7 +68,7 @@ function createCompositionSchematic(defaultKind) {
|
|
|
62
68
|
: options.kind ?? defaultKind;
|
|
63
69
|
const selector = `${project.prefix ? `${project.prefix}-` : ''}${core_1.strings.dasherize(name)}`;
|
|
64
70
|
const supportingComponent = getSupportingComponent(kind);
|
|
65
|
-
const supportName = supportingComponent ?
|
|
71
|
+
const supportName = supportingComponent ? buildSupportName(name, supportingComponent.variable) : '';
|
|
66
72
|
const supportSelector = supportName
|
|
67
73
|
? `${project.prefix ? `${project.prefix}-` : ''}${core_1.strings.dasherize(supportName)}`
|
|
68
74
|
: '';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-composition.js","sourceRoot":"","sources":["generate-composition.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"generate-composition.js","sourceRoot":"","sources":["generate-composition.ts"],"names":[],"mappings":";;AA0EA,gEAsDC;AAhID,+CAA+C;AAC/C,2DAA8G;AAC9G,iEAA6E;AAC7E,qEAAyE;AACzE,uEAAmE;AACnE,uEAAiG;AASjG,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC;IACzB,cAAc;IACd,mBAAmB;IACnB,eAAe;IACf,MAAM;IACN,eAAe;IACf,kBAAkB;IAClB,cAAc;IACd,aAAa;IACb,cAAc;IACd,oBAAoB;IACpB,iBAAiB;IACjB,kBAAkB;IAClB,eAAe;IACf,eAAe;IACf,cAAc;CACf,CAAC,CAAC;AAOH,SAAS,gBAAgB,CAAC,IAAY,EAAE,QAAgB;IACtD,MAAM,YAAY,GAAG,cAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;IAEjD,OAAO,IAAI,KAAK,YAAY,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,YAAY,EAAE,CAAC;QAC/D,CAAC,CAAC,GAAG,IAAI,KAAK;QACd,CAAC,CAAC,GAAG,IAAI,IAAI,YAAY,EAAE,CAAC;AAChC,CAAC;AAED,SAAS,sBAAsB,CAAC,IAAY;IAC1C,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,cAAc,CAAC;QACpB,KAAK,iBAAiB;YACpB,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM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string): string {
|
|
39
|
+
const variableName = strings.dasherize(variable);
|
|
40
|
+
|
|
41
|
+
return name === variableName || name.endsWith(`-${variableName}`)
|
|
42
|
+
? `${name}-ui`
|
|
43
|
+
: `${name}-${variableName}`;
|
|
44
|
+
}
|
|
45
|
+
|
|
38
46
|
function getSupportingComponent(kind: string): SupportingComponent | null {
|
|
39
47
|
switch (kind) {
|
|
40
48
|
case 'section-card':
|
|
@@ -75,7 +83,7 @@ export function createCompositionSchematic(defaultKind: string): (options: Compo
|
|
|
75
83
|
: options.kind ?? defaultKind;
|
|
76
84
|
const selector = `${project.prefix ? `${project.prefix}-` : ''}${strings.dasherize(name)}`;
|
|
77
85
|
const supportingComponent = getSupportingComponent(kind);
|
|
78
|
-
const supportName = supportingComponent ?
|
|
86
|
+
const supportName = supportingComponent ? buildSupportName(name, supportingComponent.variable) : '';
|
|
79
87
|
const supportSelector = supportName
|
|
80
88
|
? `${project.prefix ? `${project.prefix}-` : ''}${strings.dasherize(supportName)}`
|
|
81
89
|
: '';
|