@sapphire-caitlyn/schema-kit-ng 0.0.3 → 0.0.5
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 +27 -5
- package/fesm2022/sapphire-caitlyn-schema-kit-ng.mjs +92 -84
- package/fesm2022/sapphire-caitlyn-schema-kit-ng.mjs.map +1 -1
- package/package.json +2 -2
- package/styles/directives/border-shimmer.css +102 -0
- package/styles/directives/letter-reveal.css +21 -0
- package/styles.scss +14 -0
- package/types/sapphire-caitlyn-schema-kit-ng.d.ts +19 -16
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sapphire-caitlyn/schema-kit-ng",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/cdk": "^22.0.0",
|
|
6
6
|
"@angular/common": "^22.2.0",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
"sideEffects": false,
|
|
35
35
|
"exports": {
|
|
36
|
-
"./styles.
|
|
36
|
+
"./styles.scss": "./styles.scss",
|
|
37
37
|
"./package.json": {
|
|
38
38
|
"default": "./package.json"
|
|
39
39
|
},
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
|
|
2
|
+
/*
|
|
3
|
+
* border-shimmer — Tailwind CSS v4 utility
|
|
4
|
+
*
|
|
5
|
+
* A light glint that travels around an element's border.
|
|
6
|
+
* Works with any border-radius and any background (including transparent),
|
|
7
|
+
* because the ring is drawn on a masked pseudo-element.
|
|
8
|
+
*
|
|
9
|
+
* Usage:
|
|
10
|
+
* <div class="relative rounded-xl border-shimmer shimmer-sky-400">…</div>
|
|
11
|
+
*
|
|
12
|
+
* Requires a positioned element (relative / absolute / fixed / sticky).
|
|
13
|
+
*
|
|
14
|
+
* Modifiers (all optional):
|
|
15
|
+
* shimmer-{color} glint color (default: currentColor)
|
|
16
|
+
* shimmer-base-{color} resting ring color (default: 15% currentColor)
|
|
17
|
+
* ↳ both take an opacity modifier: shimmer-sky-400/60, shimmer-base-white/10
|
|
18
|
+
* shimmer-opacity-{n} whole-ring opacity (default: 100)
|
|
19
|
+
* shimmer-width-{px} ring thickness (default: 1px)
|
|
20
|
+
* shimmer-duration-{ms} one full lap (default: 3000ms)
|
|
21
|
+
* shimmer-spread-{deg} glint length (default: 60deg)
|
|
22
|
+
* All accept arbitrary values too, e.g. shimmer-[#f0f]/[35%], shimmer-width-[0.15rem].
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
@property --shimmer-angle {
|
|
26
|
+
syntax: "<angle>";
|
|
27
|
+
initial-value: 0deg;
|
|
28
|
+
inherits: false;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@keyframes border-shimmer {
|
|
32
|
+
to {
|
|
33
|
+
--shimmer-angle: 360deg;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@utility border-shimmer {
|
|
38
|
+
&::after {
|
|
39
|
+
content: "";
|
|
40
|
+
position: absolute;
|
|
41
|
+
inset: 0;
|
|
42
|
+
z-index: var(--shimmer-z-index, 1);
|
|
43
|
+
border-radius: inherit;
|
|
44
|
+
padding: var(--shimmer-width, 1px);
|
|
45
|
+
pointer-events: none;
|
|
46
|
+
opacity: var(--shimmer-opacity, 100%);
|
|
47
|
+
|
|
48
|
+
background: conic-gradient(
|
|
49
|
+
from var(--shimmer-angle),
|
|
50
|
+
var(--shimmer-base, color-mix(in oklab, currentColor 15%, transparent)) 0deg,
|
|
51
|
+
var(--shimmer-color, currentColor) calc(var(--shimmer-spread, 60deg) * 0.5),
|
|
52
|
+
var(--shimmer-base, color-mix(in oklab, currentColor 15%, transparent)) var(--shimmer-spread, 60deg)
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
/* Keep only the ring: full box minus the content box. */
|
|
56
|
+
mask:
|
|
57
|
+
linear-gradient(#000 0 0) content-box exclude,
|
|
58
|
+
linear-gradient(#000 0 0);
|
|
59
|
+
|
|
60
|
+
animation: border-shimmer var(--shimmer-duration, 3000ms) linear infinite;
|
|
61
|
+
|
|
62
|
+
@media (prefers-reduced-motion: reduce) {
|
|
63
|
+
animation: none;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
@utility shimmer-* {
|
|
69
|
+
--shimmer-color: --value(--color-*, [color]);
|
|
70
|
+
--shimmer-color: color-mix(in oklab, --value(--color-*, [color]) calc(--modifier(integer) * 1%), transparent);
|
|
71
|
+
--shimmer-color: color-mix(in oklab, --value(--color-*, [color]) --modifier([percentage]), transparent);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
@utility shimmer-base-* {
|
|
75
|
+
--shimmer-base: --value(--color-*, [color]);
|
|
76
|
+
--shimmer-base: color-mix(in oklab, --value(--color-*, [color]) calc(--modifier(integer) * 1%), transparent);
|
|
77
|
+
--shimmer-base: color-mix(in oklab, --value(--color-*, [color]) --modifier([percentage]), transparent);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
@utility shimmer-opacity-* {
|
|
81
|
+
--shimmer-opacity: calc(--value(integer) * 1%);
|
|
82
|
+
--shimmer-opacity: --value([percentage], [number]);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
@utility shimmer-width-* {
|
|
86
|
+
--shimmer-width: calc(--value(integer) * 1px);
|
|
87
|
+
--shimmer-width: --value([length]);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
@utility shimmer-duration-* {
|
|
91
|
+
--shimmer-duration: calc(--value(integer) * 1ms);
|
|
92
|
+
--shimmer-duration: --value([*]);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
@utility shimmer-spread-* {
|
|
96
|
+
--shimmer-spread: calc(--value(integer) * 1deg);
|
|
97
|
+
--shimmer-spread: --value([angle]);
|
|
98
|
+
}
|
|
99
|
+
@utility shimmer-z-index-* {
|
|
100
|
+
--shimmer-z-index: calc(--value(integer) * 1);
|
|
101
|
+
--shimmer-z-index: --value([*]);
|
|
102
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
@utility letter-reveal {
|
|
2
|
+
display: inline-block;
|
|
3
|
+
animation: blur-reveal 500ms ease both;
|
|
4
|
+
animation-delay: calc((sibling-index() - 1) * 30ms);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
@theme {
|
|
8
|
+
@keyframes blur-reveal {
|
|
9
|
+
from {
|
|
10
|
+
opacity: 0;
|
|
11
|
+
filter: blur(12px);
|
|
12
|
+
transform: translateY(1rem);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
to {
|
|
16
|
+
opacity: 1;
|
|
17
|
+
filter: blur(0);
|
|
18
|
+
transform: translateY(0);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
package/styles.scss
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Sem a extensão: o Sass embute o .css aqui. Com `.css`, vira `@import` de CSS puro, resolvido a
|
|
2
|
+
// partir do `src/styles.scss` da app, e não acha o arquivo.
|
|
3
|
+
@use './styles/directives/border-shimmer';
|
|
4
|
+
@use './styles/directives/letter-reveal';
|
|
5
|
+
|
|
6
|
+
@layer theme, base, components, utilities;
|
|
7
|
+
@import 'tailwindcss/theme.css' layer(theme);
|
|
8
|
+
@import 'tailwindcss/preflight.css' layer(base);
|
|
9
|
+
@import 'tailwindcss/utilities.css';
|
|
10
|
+
|
|
11
|
+
hlm-select-trigger > [brnselecttrigger],
|
|
12
|
+
hlm-combobox-trigger > [brncomboboxtrigger] {
|
|
13
|
+
min-height: 2rem;
|
|
14
|
+
}
|
|
@@ -35,39 +35,41 @@ export declare enum FieldType {
|
|
|
35
35
|
Icon = "Icon"
|
|
36
36
|
}
|
|
37
37
|
export declare const lstDateTypes: FieldType[];
|
|
38
|
+
/**
|
|
39
|
+
* Provê o ambiente da aplicação (lido de `window[environmentKey]`) como signals,
|
|
40
|
+
* permitindo a configuração e recuperação de variáveis de ambiente.
|
|
41
|
+
*/
|
|
38
42
|
export declare class EnvironmentService<Environment> {
|
|
39
|
-
private
|
|
43
|
+
private readonly _environment;
|
|
44
|
+
/**
|
|
45
|
+
* Ambiente da aplicação. Lança um erro ao ser lido se `window[environmentKey]` não estiver definido.
|
|
46
|
+
*/
|
|
47
|
+
readonly environment: Signal<Environment>;
|
|
48
|
+
private readonly apiUrlGetter;
|
|
40
49
|
/**
|
|
41
|
-
*
|
|
42
|
-
* Inicializa o ambiente a partir da variável global `window.environment`.
|
|
43
|
-
* Lança um erro se o ambiente não estiver definido.
|
|
50
|
+
* URL da API. Recalcula quando o ambiente ou o getter registrado mudam.
|
|
44
51
|
*/
|
|
52
|
+
readonly apiUrl: Signal<string>;
|
|
45
53
|
constructor();
|
|
46
54
|
/**
|
|
47
|
-
*
|
|
55
|
+
* Altera uma chave do ambiente. Gera um novo objeto para notificar quem depende do signal.
|
|
48
56
|
*/
|
|
49
57
|
set<K extends keyof Environment>(key: K, value: Environment[K]): void;
|
|
50
58
|
/**
|
|
51
|
-
* Retorna
|
|
52
|
-
* Lança um erro se o ambiente não estiver definido.
|
|
53
|
-
* @returns O ambiente da aplicação.
|
|
59
|
+
* Retorna uma chave do ambiente. Dentro de `computed`/`effect`/template, vira dependência.
|
|
54
60
|
*/
|
|
55
61
|
get<K extends keyof Environment>(key: K): Environment[K];
|
|
56
62
|
/**
|
|
57
|
-
* Retorna a URL de um recurso.
|
|
63
|
+
* Retorna a URL de um recurso da API.
|
|
58
64
|
* @param path O caminho do recurso.
|
|
59
|
-
* @returns A URL do recurso.
|
|
60
65
|
*/
|
|
61
66
|
resource(path: string): string;
|
|
62
|
-
getEnvironment(): Environment;
|
|
63
67
|
/**
|
|
64
|
-
* Retorna
|
|
65
|
-
* @returns A URL da API.
|
|
68
|
+
* Retorna o ambiente da aplicação. Equivale a ler o signal `environment`.
|
|
66
69
|
*/
|
|
67
|
-
|
|
68
|
-
private apiUrlGetter;
|
|
70
|
+
getEnvironment(): Environment;
|
|
69
71
|
/**
|
|
70
|
-
* Registra
|
|
72
|
+
* Registra a função que retorna a URL da API.
|
|
71
73
|
* @param getter A função que retorna a URL da API.
|
|
72
74
|
*/
|
|
73
75
|
registerApiUrlGetter(getter: () => string): void;
|
|
@@ -1047,6 +1049,7 @@ export interface SchemaKitModuleInputOptions<Environment = any> {
|
|
|
1047
1049
|
* Factory that returns the perfil checker. Runs in an injection context, so `inject()` is allowed.
|
|
1048
1050
|
*/
|
|
1049
1051
|
perfilCheckerFactory?: () => PerfilCheckerFn;
|
|
1052
|
+
environmentKey: string;
|
|
1050
1053
|
}
|
|
1051
1054
|
export interface SchemaKitModuleOptions<Environment = any> extends Required<Omit<SchemaKitModuleInputOptions<Environment>, 'perfilCheckerFactory'>> {}
|
|
1052
1055
|
export declare class SchemaTableActionsDirective<T = any> {
|