@zambon-dev/ui 0.0.1-bootstrap.0 → 1.1.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/CHANGELOG.md +177 -0
- package/README.md +81 -81
- package/fesm2022/zambon-dev-ui-framework.mjs +5995 -3980
- package/fesm2022/zambon-dev-ui-framework.mjs.map +1 -1
- package/fesm2022/zambon-dev-ui-library.mjs +6003 -4272
- package/fesm2022/zambon-dev-ui-library.mjs.map +1 -1
- package/fesm2022/zambon-dev-ui-shared.mjs +2758 -1790
- package/fesm2022/zambon-dev-ui-shared.mjs.map +1 -1
- package/fesm2022/zambon-dev-ui-testing.mjs +73 -77
- package/fesm2022/zambon-dev-ui-testing.mjs.map +1 -1
- package/fesm2022/zambon-dev-ui.mjs +6 -8
- package/i18n/framework/en.json +63 -63
- package/i18n/framework/pt.json +63 -63
- package/i18n/shared/external-content/en.json +12 -12
- package/i18n/shared/external-content/pt.json +12 -12
- package/i18n/shared/language-selector/en.json +5 -5
- package/i18n/shared/language-selector/pt.json +5 -5
- package/i18n/shared/login/en.json +16 -14
- package/i18n/shared/login/pt.json +16 -14
- package/i18n/shared/operations-history/en.json +5 -5
- package/i18n/shared/operations-history/pt.json +5 -5
- package/i18n/shared/services-history/en.json +14 -14
- package/i18n/shared/services-history/pt.json +14 -14
- package/i18n/shared/top-bar/en.json +10 -7
- package/i18n/shared/top-bar/pt.json +10 -7
- package/package.json +1 -1
- package/styles/common.scss +9 -10
- package/styles/components/card.scss +19 -13
- package/styles/components/dropdown-static.scss +33 -35
- package/styles/components/input-group.scss +48 -44
- package/styles/components/input.scss +120 -99
- package/styles/components/label.scss +6 -3
- package/styles/components/row.scss +48 -48
- package/styles/mixins/background.scss +31 -31
- package/styles/theme.css +307 -75
- package/styles/variables.scss +86 -60
- package/types/zambon-dev-ui-framework.d.ts +1470 -1029
- package/types/zambon-dev-ui-library.d.ts +1689 -1165
- package/types/zambon-dev-ui-shared.d.ts +630 -543
- package/types/zambon-dev-ui-testing.d.ts +25 -30
- package/types/zambon-dev-ui.d.ts +6 -3
- package/fesm2022/zambon-dev-ui.mjs.map +0 -1
- package/styles/components/button.scss +0 -101
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
import { ComponentFixture } from
|
|
4
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ComponentRef, Type, ViewContainerRef } from "@angular/core";
|
|
3
|
+
import { ComponentFixture } from "@angular/core/testing";
|
|
5
4
|
/**
|
|
6
5
|
* A host that behaves exactly like a consumer application's own component: it declares no
|
|
7
6
|
* change-detection strategy, which in Angular 22 means `OnPush`. Once it has rendered it goes
|
|
@@ -13,30 +12,29 @@ import { ComponentFixture } from '@angular/core/testing';
|
|
|
13
12
|
* cannot update its DOM underneath this host, which is precisely the failure that a plain
|
|
14
13
|
* `TestBed.createComponent` + `fixture.detectChanges()` cannot express.
|
|
15
14
|
*/
|
|
16
|
-
declare class InertHostComponent {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
export declare class InertHostComponent {
|
|
16
|
+
readonly outlet: import("@angular/core").Signal<ViewContainerRef>;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InertHostComponent, never>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<InertHostComponent, "lib-inert-host", never, {}, {}, never, never, true, never>;
|
|
20
19
|
}
|
|
21
|
-
|
|
22
20
|
/** A component rendered beneath {@link InertHostComponent}, plus the handles a spec needs. */
|
|
23
|
-
interface OnPushRender<TComponent> {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
21
|
+
export interface OnPushRender<TComponent> {
|
|
22
|
+
/** The component under test. */
|
|
23
|
+
readonly component: TComponent;
|
|
24
|
+
readonly componentRef: ComponentRef<TComponent>;
|
|
25
|
+
/** The component under test's own host element -- host bindings included. */
|
|
26
|
+
readonly element: HTMLElement;
|
|
27
|
+
/** The fixture whose root is the inert host. */
|
|
28
|
+
readonly fixture: ComponentFixture<InertHostComponent>;
|
|
29
|
+
/** Binds an input the way a template would, notifying Angular. */
|
|
30
|
+
setInput(name: string, value: unknown): void;
|
|
31
|
+
/**
|
|
32
|
+
* Runs a change-detection pass that a clean `OnPush` ancestor can still short-circuit.
|
|
33
|
+
*
|
|
34
|
+
* Call this and never `fixture.detectChanges()` yourself -- under a zoneless test environment
|
|
35
|
+
* that call forces every test view and hands the component a refresh it did not earn.
|
|
36
|
+
*/
|
|
37
|
+
tick(): void;
|
|
40
38
|
}
|
|
41
39
|
/**
|
|
42
40
|
* Renders `type` beneath a clean `OnPush` ancestor and returns once it has painted for the
|
|
@@ -50,7 +48,4 @@ interface OnPushRender<TComponent> {
|
|
|
50
48
|
* 3. Assert the DOM, never a field. `expect(component.loading).toBe(false)` passes on a blank
|
|
51
49
|
* screen.
|
|
52
50
|
*/
|
|
53
|
-
declare function renderUnderOnPush<TComponent>(type: Type<TComponent>, inputs?: Record<string, unknown>): OnPushRender<TComponent>;
|
|
54
|
-
|
|
55
|
-
export { InertHostComponent, renderUnderOnPush };
|
|
56
|
-
export type { OnPushRender };
|
|
51
|
+
export declare function renderUnderOnPush<TComponent>(type: Type<TComponent>, inputs?: Record<string, unknown>): OnPushRender<TComponent>;
|
package/types/zambon-dev-ui.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export * from
|
|
1
|
+
import { ButtonComponent as LibButtonComponent } from "@zambon-dev/ui/library";
|
|
2
|
+
import { ButtonComponent } from "@zambon-dev/ui/framework";
|
|
3
|
+
export * from "@zambon-dev/ui/library";
|
|
4
|
+
export * from "@zambon-dev/ui/framework";
|
|
5
|
+
export * from "@zambon-dev/ui/shared";
|
|
6
|
+
export { ButtonComponent, LibButtonComponent };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"zambon-dev-ui.mjs","sources":["../../../../libs/ui/src/zambon-dev-ui.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;;AAEG"}
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
input[type='button'],
|
|
2
|
-
input[type='reset'],
|
|
3
|
-
input[type='submit'],
|
|
4
|
-
button,
|
|
5
|
-
a {
|
|
6
|
-
&.btn {
|
|
7
|
-
@apply relative px-3 py-1.5 inline-block text-center rounded-sm select-none;
|
|
8
|
-
@apply bg-slate-700 text-white;
|
|
9
|
-
@apply transition-all;
|
|
10
|
-
|
|
11
|
-
@apply focus:ring-4 focus:ring-slate-600/30;
|
|
12
|
-
@apply focus:bg-slate-800 hover:bg-slate-800;
|
|
13
|
-
@apply active:bg-slate-900;
|
|
14
|
-
|
|
15
|
-
i:not(:last-child) {
|
|
16
|
-
@apply mr-2;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
&.disabled,
|
|
20
|
-
&:disabled {
|
|
21
|
-
@apply pointer-events-none opacity-[.60] ring-0;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
&.error {
|
|
25
|
-
@apply bg-red-700 focus:ring-red-600/30;
|
|
26
|
-
@apply focus:bg-red-800 hover:bg-red-800;
|
|
27
|
-
@apply active:bg-red-900;
|
|
28
|
-
|
|
29
|
-
i:before {
|
|
30
|
-
@apply content-['\f00d'];
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
&.success {
|
|
35
|
-
@apply bg-green-700 ring-4 ring-green-600/30;
|
|
36
|
-
@apply pointer-events-none opacity-[.60];
|
|
37
|
-
|
|
38
|
-
i:before {
|
|
39
|
-
@apply content-['\f00c'];
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
&.loading {
|
|
44
|
-
@apply pointer-events-none opacity-[.60] ring-0 pl-8;
|
|
45
|
-
@apply transition-[margin-left] duration-200 ease-in-out;
|
|
46
|
-
|
|
47
|
-
&:before {
|
|
48
|
-
@apply content-[''] absolute left-2 top-0 bg-center bg-contain bg-no-repeat w-5 h-full animate-spin text-white;
|
|
49
|
-
@apply transition-opacity duration-200 ease-in-out;
|
|
50
|
-
background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"%3E%3Ccircle style="opacity:.25" cx="12" cy="12" r="10" stroke="white" stroke-width="4"%3E%3C/circle%3E%3Cpath style="opacity:.75" fill="white" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"%3E%3C/path%3E%3C/svg%3E');
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
i {
|
|
54
|
-
@apply invisible;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
@mixin button($color) {
|
|
61
|
-
input[type='button'],
|
|
62
|
-
input[type='reset'],
|
|
63
|
-
input[type='submit'],
|
|
64
|
-
button,
|
|
65
|
-
a {
|
|
66
|
-
&.btn {
|
|
67
|
-
@for $i from 1 through 7 {
|
|
68
|
-
&.#{$color + '-' + $i + '00'} {
|
|
69
|
-
@if $i > 4 {
|
|
70
|
-
@apply text-white;
|
|
71
|
-
} @else {
|
|
72
|
-
@apply text-black;
|
|
73
|
-
|
|
74
|
-
&.loading:before {
|
|
75
|
-
background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"%3E%3Ccircle style="opacity:.25" cx="12" cy="12" r="10" stroke="black" stroke-width="4"%3E%3C/circle%3E%3Cpath style="opacity:.75" fill="black" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"%3E%3C/path%3E%3C/svg%3E');
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
@apply #{'bg-' + $color + '-' + $i + '00'};
|
|
80
|
-
|
|
81
|
-
$ring: $i + '00/30';
|
|
82
|
-
@if $i < 5 {
|
|
83
|
-
$ring: '400/20';
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
@apply #{'focus:ring-' + $color + '-' + $ring};
|
|
87
|
-
@apply #{'focus:bg-' + $color + '-' + ($i+1) + '00'};
|
|
88
|
-
@apply #{'hover:bg-' + $color + '-' + ($i+1) + '00'};
|
|
89
|
-
@apply #{'active:bg-' + $color + '-' + ($i+2) + '00'};
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
$colors:
|
|
97
|
-
'slate', 'gray', 'zinc', 'neutral', 'stone', 'red', 'orange', 'amber', 'yellow', 'lime', 'green', 'emerald', 'teal',
|
|
98
|
-
'cyan', 'sky', 'indigo', 'violet', 'purple', 'fuchsia', 'pink', 'rose', 'primary';
|
|
99
|
-
@each $color in $colors {
|
|
100
|
-
@include button($color);
|
|
101
|
-
}
|