@cityway/basic-ui 1.0.2-beta008 → 1.0.2-beta009
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/cityway-basic-ui-1.0.2-beta009.tgz +0 -0
- package/fesm2022/cityway-basic-ui.mjs +9 -2
- package/fesm2022/cityway-basic-ui.mjs.map +1 -1
- package/index.d.ts +9 -2
- package/lib/assets/icons/sprite.preview.html +1 -1
- package/lib/assets/styles/scss/cw-ds/_root-fo.scss +4 -0
- package/lib/assets/styles/scss/cw-ds/components/_alert.scss +2 -0
- package/lib/assets/styles/scss/cw-ds/components/_dropdown.scss +21 -0
- package/lib/assets/styles/scss/cw-ds/components/_tooltip.scss +35 -0
- package/lib/assets/styles/scss/cw-ds/components/button/_button.scss +5 -0
- package/lib/assets/styles/scss/cw-ds/mixins/_popover-tooltip.scss +144 -0
- package/lib/assets/styles/scss/cw-ds/utilities/_flex.scss +20 -0
- package/lib/assets/styles/scss/cw-ds/utilities/_position.scss +24 -0
- package/lib/assets/styles/scss/styles-bo.scss +3 -0
- package/lib/assets/styles/scss/styles-fo.scss +3 -0
- package/package.json +1 -1
- package/styles/styles-bo.min.css +1 -1
- package/styles/styles-bo.min.css.map +1 -1
- package/styles/styles-fo.min.css +1 -1
- package/styles/styles-fo.min.css.map +1 -1
- package/cityway-basic-ui-1.0.2-beta008.tgz +0 -0
package/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { EventEmitter, OnInit, AfterViewInit, ElementRef, WritableSignal, ChangeDetectorRef, AfterContentInit, QueryList, TemplateRef, OnDestroy } from '@angular/core';
|
|
3
3
|
import { BehaviorSubject } from 'rxjs';
|
|
4
4
|
import { Options } from '@angular-slider/ngx-slider';
|
|
5
|
+
export { Options } from '@angular-slider/ngx-slider';
|
|
5
6
|
import { AbstractControl, FormGroup, FormControl, ValidationErrors } from '@angular/forms';
|
|
6
7
|
import { Router, ActivatedRoute } from '@angular/router';
|
|
7
8
|
import { TranslateService } from '@ngx-translate/core';
|
|
@@ -584,6 +585,7 @@ declare class AccordionComponent implements AfterContentInit {
|
|
|
584
585
|
}
|
|
585
586
|
|
|
586
587
|
declare enum AlertTypeEnum {
|
|
588
|
+
primary = "primary",
|
|
587
589
|
info = "info",
|
|
588
590
|
success = "success",
|
|
589
591
|
warning = "warning",
|
|
@@ -677,6 +679,7 @@ declare class ToastComponent {
|
|
|
677
679
|
}
|
|
678
680
|
|
|
679
681
|
declare enum BadgeTypeEnum {
|
|
682
|
+
lightPrimary = "light-primary",
|
|
680
683
|
lightInfo = "light-info",
|
|
681
684
|
lightSuccess = "light-success",
|
|
682
685
|
lightWarning = "light-warning",
|
|
@@ -715,7 +718,8 @@ declare class BadgeComponent {
|
|
|
715
718
|
declare enum FoButtonTypeEnum {
|
|
716
719
|
primary = "primary",
|
|
717
720
|
secondary = "secondary",
|
|
718
|
-
link = "link"
|
|
721
|
+
link = "link",
|
|
722
|
+
ghost = "ghost"
|
|
719
723
|
}
|
|
720
724
|
declare enum BoButtonTypeEnum {
|
|
721
725
|
primary = "primary",
|
|
@@ -726,7 +730,8 @@ declare enum BoButtonTypeEnum {
|
|
|
726
730
|
success = "success",
|
|
727
731
|
danger = "danger",
|
|
728
732
|
dangerOutline = "danger-outline",
|
|
729
|
-
light = "light"
|
|
733
|
+
light = "light",
|
|
734
|
+
ghost = "ghost"
|
|
730
735
|
}
|
|
731
736
|
declare enum ButtonIconSizeEnum {
|
|
732
737
|
default = "default",
|
|
@@ -794,6 +799,7 @@ declare class ButtonComponent implements OnInit {
|
|
|
794
799
|
readonly iconType: typeof IconTypeEnum;
|
|
795
800
|
readonly iconUiType: typeof IconUiTypeEnum;
|
|
796
801
|
readonly buttonIconSizeEnum: typeof ButtonIconSizeEnum;
|
|
802
|
+
readonly spriteIcon: typeof SpriteIconEnum;
|
|
797
803
|
placementCss: string;
|
|
798
804
|
isOpen: boolean;
|
|
799
805
|
tooltipRandomId: number;
|
|
@@ -1068,6 +1074,7 @@ declare class ModalsComponent implements OnInit, AfterViewInit {
|
|
|
1068
1074
|
danger: BoButtonTypeEnum.danger;
|
|
1069
1075
|
dangerOutline: BoButtonTypeEnum.dangerOutline;
|
|
1070
1076
|
light: BoButtonTypeEnum.light;
|
|
1077
|
+
ghost: BoButtonTypeEnum.ghost;
|
|
1071
1078
|
};
|
|
1072
1079
|
readonly spriteIcon: typeof SpriteIconEnum;
|
|
1073
1080
|
readonly iconType: typeof IconTypeEnum;
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
.alert {
|
|
6
6
|
--#{p.$prefix}-alert-color: #{color(base, "black")};
|
|
7
7
|
--#{p.$prefix}-alert-bg-color: #{color(base, "white")};
|
|
8
|
+
--#{p.$prefix}-alert-border: 1px solid #{color(base, "white")};
|
|
8
9
|
|
|
9
10
|
display: flex;
|
|
10
11
|
align-items: center;
|
|
@@ -13,6 +14,7 @@
|
|
|
13
14
|
font-size: font(fs, xs);
|
|
14
15
|
line-height: font(lh, xs);
|
|
15
16
|
color: var(--#{p.$prefix}-alert-color);
|
|
17
|
+
border: var(--#{p.$prefix}-alert-border);
|
|
16
18
|
border-radius: var(--#{p.$prefix}-border-radius);
|
|
17
19
|
background-color: var(--#{p.$prefix}-alert-bg-color);
|
|
18
20
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
@use "@cityway/design-tokens/primitives" as p;
|
|
3
|
+
@use "@cityway/design-tokens/functions" as *;
|
|
4
|
+
|
|
5
|
+
.dropdown-menu {
|
|
6
|
+
display: none;
|
|
7
|
+
|
|
8
|
+
&.show {
|
|
9
|
+
display: block;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.dropdown-icon {
|
|
14
|
+
transition: rotate 200ms ease-in-out;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.btn[aria-expanded="true"] {
|
|
18
|
+
.dropdown-icon {
|
|
19
|
+
rotate: 180deg;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
@use "@cityway/design-tokens/primitives" as p;
|
|
3
|
+
@use "@cityway/design-tokens/functions" as *;
|
|
4
|
+
@use "../mixins/popover-tooltip" as m;
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@include m.popover-base(
|
|
8
|
+
$name: "popover",
|
|
9
|
+
$width: 12.5rem,
|
|
10
|
+
$br: border(br, md),
|
|
11
|
+
$bg: var(--#{p.$prefix}-base-white),
|
|
12
|
+
$header-bg: #{color("grey", 100)},
|
|
13
|
+
$fs: font(fs, xs),
|
|
14
|
+
$lh: font(lh, xs),
|
|
15
|
+
$shadow: var(--#{p.$prefix}-shadow-default),
|
|
16
|
+
$arrow-size: 1rem,
|
|
17
|
+
$arrow-offset: 1.5rem,
|
|
18
|
+
$arrow-border-size: 0
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
@include m.popover-base(
|
|
22
|
+
$name: "tooltip",
|
|
23
|
+
$width: 10rem,
|
|
24
|
+
$br: border(br, sm),
|
|
25
|
+
$bg: var(--#{p.$prefix}-base-black),
|
|
26
|
+
$header-bg: transparent,
|
|
27
|
+
$fs: font(fs, xs),
|
|
28
|
+
$lh: font(lh, xs),
|
|
29
|
+
$shadow: var(--#{p.$prefix}-shadow-default),
|
|
30
|
+
$arrow-size: 0.625rem,
|
|
31
|
+
$arrow-offset: 1.125rem,
|
|
32
|
+
$arrow-border-size: 0
|
|
33
|
+
) {
|
|
34
|
+
color: var(--#{p.$prefix}-base-white);
|
|
35
|
+
};
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
@use "@cityway/design-tokens/primitives" as p;
|
|
3
|
+
@use "@cityway/design-tokens/functions" as *;
|
|
4
|
+
|
|
5
|
+
// MIXIN arrow
|
|
6
|
+
// ---------------------------------
|
|
7
|
+
@mixin arrow($direction, $bg-color, $arrow-size, $arrow-offset, $arrow-border-size) {
|
|
8
|
+
$is-right: $direction ==right;
|
|
9
|
+
|
|
10
|
+
// position horizontale
|
|
11
|
+
@if $is-right {
|
|
12
|
+
left: -$arrow-size;
|
|
13
|
+
|
|
14
|
+
&::before {
|
|
15
|
+
left: -1px;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@else {
|
|
20
|
+
right: -$arrow-size;
|
|
21
|
+
|
|
22
|
+
&::before {
|
|
23
|
+
right: -1px;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// bordure (before)
|
|
28
|
+
&::before {
|
|
29
|
+
border-top: $arrow-border-size solid transparent;
|
|
30
|
+
border-bottom: $arrow-border-size solid transparent;
|
|
31
|
+
|
|
32
|
+
@if $is-right {
|
|
33
|
+
border-right: $arrow-border-size solid $bg-color;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@else {
|
|
37
|
+
border-left: $arrow-border-size solid $bg-color;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// fond (after)
|
|
42
|
+
&::after {
|
|
43
|
+
border-top: $arrow-size solid transparent;
|
|
44
|
+
border-bottom: $arrow-size solid transparent;
|
|
45
|
+
|
|
46
|
+
@if $is-right {
|
|
47
|
+
border-right: $arrow-size solid $bg-color;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@else {
|
|
51
|
+
border-left: $arrow-size solid $bg-color;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// MIXIN BASE POPOVER/TOOLTIP
|
|
57
|
+
// ---------------------------------
|
|
58
|
+
@mixin popover-base($name,
|
|
59
|
+
$width,
|
|
60
|
+
$br,
|
|
61
|
+
$bg,
|
|
62
|
+
$header-bg,
|
|
63
|
+
$fs,
|
|
64
|
+
$lh,
|
|
65
|
+
$shadow,
|
|
66
|
+
$arrow-size,
|
|
67
|
+
$arrow-offset,
|
|
68
|
+
$arrow-border-size
|
|
69
|
+
) {
|
|
70
|
+
.#{$name} {
|
|
71
|
+
--#{p.$prefix}-#{$name}-br: #{$br};
|
|
72
|
+
--#{p.$prefix}-#{$name}-bg: #{$bg};
|
|
73
|
+
--#{p.$prefix}-#{$name}-header-bg: #{$header-bg};
|
|
74
|
+
|
|
75
|
+
position: absolute;
|
|
76
|
+
top: 50%;
|
|
77
|
+
transform: translateY(-50%);
|
|
78
|
+
min-width: $width;
|
|
79
|
+
max-width: $width;
|
|
80
|
+
border-radius: var(--#{p.$prefix}-#{$name}-br);
|
|
81
|
+
background-color: var(--#{p.$prefix}-#{$name}-bg);
|
|
82
|
+
box-shadow: #{$shadow};
|
|
83
|
+
|
|
84
|
+
// slot pour les overrides spécifiques
|
|
85
|
+
@content;
|
|
86
|
+
|
|
87
|
+
.arrow {
|
|
88
|
+
position: absolute;
|
|
89
|
+
top: 50%;
|
|
90
|
+
transform: translateY(-50%);
|
|
91
|
+
width: 0;
|
|
92
|
+
height: 0;
|
|
93
|
+
|
|
94
|
+
&::before,
|
|
95
|
+
&::after {
|
|
96
|
+
content: "";
|
|
97
|
+
position: absolute;
|
|
98
|
+
top: 50%;
|
|
99
|
+
transform: translateY(-50%);
|
|
100
|
+
width: 0;
|
|
101
|
+
height: 0;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
&::after {
|
|
105
|
+
filter: drop-shadow(var(--#{p.$prefix}-shadow-filter));
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
&-right {
|
|
110
|
+
left: 100%;
|
|
111
|
+
margin-left: 1.5rem;
|
|
112
|
+
|
|
113
|
+
.arrow {
|
|
114
|
+
@include arrow(right, var(--#{p.$prefix}-#{$name}-bg), $arrow-size, $arrow-offset, $arrow-border-size);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
&-left {
|
|
119
|
+
right: 100%;
|
|
120
|
+
margin-right: 1.5rem;
|
|
121
|
+
|
|
122
|
+
.arrow {
|
|
123
|
+
@include arrow(left, var(--#{p.$prefix}-#{$name}-bg), $arrow-size, $arrow-offset, $arrow-border-size);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
&-header,
|
|
128
|
+
&-body {
|
|
129
|
+
padding: size(2xs) size(sm);
|
|
130
|
+
font-size: $fs;
|
|
131
|
+
line-height: $lh;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
&-body {
|
|
135
|
+
border-radius: var(--#{p.$prefix}-#{$name}-br);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
&-header {
|
|
139
|
+
font-weight: font(fw, bold);
|
|
140
|
+
border-radius: var(--#{p.$prefix}-#{$name}-br) var(--#{p.$prefix}-#{$name}-br) 0 0;
|
|
141
|
+
background-color: var(--#{p.$prefix}-#{$name}-header-bg);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
@include generate-flex-system();
|
|
4
4
|
|
|
5
|
+
.d-block {
|
|
6
|
+
display: block;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.d-none {
|
|
10
|
+
display: none;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.d-inline-block {
|
|
14
|
+
display: inline-block;
|
|
15
|
+
}
|
|
16
|
+
|
|
5
17
|
.d-flex-h,
|
|
6
18
|
.d-flex-v {
|
|
7
19
|
display: flex;
|
|
@@ -98,3 +110,11 @@
|
|
|
98
110
|
.flex-none {
|
|
99
111
|
flex: none;
|
|
100
112
|
}
|
|
113
|
+
|
|
114
|
+
.flex-grow-1 {
|
|
115
|
+
flex-grow: 1;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.flex-shrink-0 {
|
|
119
|
+
flex-shrink: 0;
|
|
120
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
|
|
2
|
+
// MIXIN - Variantes
|
|
3
|
+
// ---------------------------------
|
|
4
|
+
@mixin generate-position-utilities($map, $prefix: 'p') {
|
|
5
|
+
@each $name, $value in $map {
|
|
6
|
+
.#{$prefix}-#{$name} {
|
|
7
|
+
position: $value;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// Variables
|
|
13
|
+
// ---------------------------------
|
|
14
|
+
$positions: (
|
|
15
|
+
relative: relative,
|
|
16
|
+
absolute: absolute,
|
|
17
|
+
fixed: fixed,
|
|
18
|
+
sticky: sticky
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
// Générer toutes les variantes
|
|
23
|
+
// ---------------------------------
|
|
24
|
+
@include generate-position-utilities($positions);
|
|
@@ -27,6 +27,8 @@
|
|
|
27
27
|
@use "cw-ds/components/numerical-range";
|
|
28
28
|
@use "cw-ds/components/modal";
|
|
29
29
|
@use "cw-ds/components/form-field/form-field";
|
|
30
|
+
@use "cw-ds/components/tooltip";
|
|
31
|
+
@use "cw-ds/components/dropdown";
|
|
30
32
|
|
|
31
33
|
// Utilities
|
|
32
34
|
@use "cw-ds/utilities/breakpoints";
|
|
@@ -36,6 +38,7 @@
|
|
|
36
38
|
@use "cw-ds/utilities/type/type";
|
|
37
39
|
@use "cw-ds/utilities/type/type-bo";
|
|
38
40
|
@use "cw-ds/utilities/alignment";
|
|
41
|
+
@use "cw-ds/utilities/position";
|
|
39
42
|
|
|
40
43
|
// En surcharge
|
|
41
44
|
@use "cw-ds/helpers/skeleton";
|
|
@@ -27,6 +27,8 @@
|
|
|
27
27
|
@use "cw-ds/components/numerical-range";
|
|
28
28
|
@use "cw-ds/components/modal";
|
|
29
29
|
@use "cw-ds/components/form-field/form-field";
|
|
30
|
+
@use "cw-ds/components/tooltip";
|
|
31
|
+
@use "cw-ds/components/dropdown";
|
|
30
32
|
|
|
31
33
|
// Utilities
|
|
32
34
|
@use "cw-ds/utilities/breakpoints";
|
|
@@ -36,6 +38,7 @@
|
|
|
36
38
|
@use "cw-ds/utilities/type/type";
|
|
37
39
|
@use "cw-ds/utilities/type/type-fo";
|
|
38
40
|
@use "cw-ds/utilities/alignment";
|
|
41
|
+
@use "cw-ds/utilities/position";
|
|
39
42
|
|
|
40
43
|
// En surcharge
|
|
41
44
|
@use "cw-ds/helpers/skeleton";
|