@cityway/basic-ui 1.0.2-beta020 → 1.0.2-beta021
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-beta021.tgz +0 -0
- package/fesm2022/cityway-basic-ui.mjs +28 -4
- package/fesm2022/cityway-basic-ui.mjs.map +1 -1
- package/index.d.ts +45 -3
- package/lib/assets/i18n/common.en.json +2 -1
- package/lib/assets/i18n/common.fr.json +2 -1
- package/lib/assets/styles/scss/_reboot.scss +2 -2
- package/lib/assets/styles/scss/_root-bo.scss +13 -1
- package/lib/assets/styles/scss/basic-ui.styles.bo.scss +1 -0
- package/lib/assets/styles/scss/basic-ui.styles.fo.scss +1 -0
- package/lib/assets/styles/scss/components/_breadcrumb.scss +51 -0
- package/lib/assets/styles/scss/components/_card.scss +11 -0
- package/lib/assets/styles/scss/components/_dropdown.scss +3 -2
- package/lib/assets/styles/scss/components/button/_button.scss +39 -13
- package/lib/assets/styles/scss/helpers/_spinner.scss +5 -4
- package/lib/assets/styles/scss/utilities/type/_type-bo.scss +21 -29
- package/lib/assets/styles/scss/utilities/type/_type.scss +14 -0
- package/package.json +2 -2
- package/styles/basic-ui.styles.bo.min.css +1 -1
- package/styles/basic-ui.styles.bo.min.css.map +1 -1
- package/styles/basic-ui.styles.fo.min.css +1 -1
- package/styles/basic-ui.styles.fo.min.css.map +1 -1
- package/cityway-basic-ui-1.0.2-beta020.tgz +0 -0
package/index.d.ts
CHANGED
|
@@ -1026,6 +1026,29 @@ declare class FormFieldComponent implements OnInit, OnChanges {
|
|
|
1026
1026
|
options: FormFieldOption[];
|
|
1027
1027
|
rangeOptions: FormFieldRangeOption;
|
|
1028
1028
|
validationOptions?: FormFieldValidationOption;
|
|
1029
|
+
/**
|
|
1030
|
+
* Map d'un code d'erreur (clé de `control.errors`) vers une clé i18n.
|
|
1031
|
+
*
|
|
1032
|
+
* Chaque entrée est rendue dans le bloc `<div class="field-invalid">`, à la suite
|
|
1033
|
+
* des messages déjà gérés en dur par la lib (`required`, `rangeInvalid`,
|
|
1034
|
+
* `fileExtension`, `fileSize`).
|
|
1035
|
+
*
|
|
1036
|
+
* Les paramètres du `translate` proviennent de `control.errors[code]` :
|
|
1037
|
+
* - pour une erreur-objet (ex. `{ duplicateCode: { existing: 'ABC' } }`),
|
|
1038
|
+
* `{{existing}}` est interpolé dans la traduction ;
|
|
1039
|
+
* - pour `required` (erreur = `true`), aucun paramètre n'est passé.
|
|
1040
|
+
*
|
|
1041
|
+
* Une entrée dont le code matche un des 4 builtins **prend le pas** sur le
|
|
1042
|
+
* rendu hardcodé (override ponctuel, pas de doublon).
|
|
1043
|
+
*
|
|
1044
|
+
* L'ordre d'affichage suit l'ordre d'insertion des clés (cf. `keepOrder`).
|
|
1045
|
+
*
|
|
1046
|
+
* Limitation : sur les types période (`dateToDate`, `timeToTime`,
|
|
1047
|
+
* `dateTimeToDateTime`), l'override `required` ne porte que sur le `FormGroup`
|
|
1048
|
+
* lui-même — les `required` posés sur les sous-controls `start`/`end`
|
|
1049
|
+
* continuent d'afficher le wording natif.
|
|
1050
|
+
*/
|
|
1051
|
+
errorMessages?: Record<string, string>;
|
|
1029
1052
|
isRequired: boolean;
|
|
1030
1053
|
help?: string;
|
|
1031
1054
|
tooltip: string;
|
|
@@ -1056,6 +1079,8 @@ declare class FormFieldComponent implements OnInit, OnChanges {
|
|
|
1056
1079
|
readonly spriteIcon: typeof SpriteIconEnum;
|
|
1057
1080
|
readonly buttonType: typeof BoButtonTypeEnum;
|
|
1058
1081
|
readonly buttonIconSize: typeof ButtonIconSizeEnum;
|
|
1082
|
+
/** Comparator passé au pipe `keyvalue` pour préserver l'ordre d'insertion de `errorMessages`. */
|
|
1083
|
+
readonly keepOrder: () => number;
|
|
1059
1084
|
get hostClasses(): string;
|
|
1060
1085
|
constructor();
|
|
1061
1086
|
isCheckboxType(): boolean;
|
|
@@ -1138,7 +1163,7 @@ declare class FormFieldComponent implements OnInit, OnChanges {
|
|
|
1138
1163
|
getRangePercent(): number;
|
|
1139
1164
|
onRangeStep(direction: 'increase' | 'decrease'): void;
|
|
1140
1165
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FormFieldComponent, never>;
|
|
1141
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FormFieldComponent, "cw-form-field", never, { "control": { "alias": "control"; "required": false; }; "formGroup": { "alias": "formGroup"; "required": false; }; "type": { "alias": "type"; "required": false; }; "label": { "alias": "label"; "required": false; }; "displayLabel": { "alias": "displayLabel"; "required": false; }; "name": { "alias": "name"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "options": { "alias": "options"; "required": false; }; "rangeOptions": { "alias": "rangeOptions"; "required": false; }; "validationOptions": { "alias": "validationOptions"; "required": false; }; "isRequired": { "alias": "isRequired"; "required": false; }; "help": { "alias": "help"; "required": false; }; "tooltip": { "alias": "tooltip"; "required": false; }; "addonLeft": { "alias": "addonLeft"; "required": false; }; "addonRight": { "alias": "addonRight"; "required": false; }; "isInAddon": { "alias": "isInAddon"; "required": false; }; "isReadonly": { "alias": "isReadonly"; "required": false; }; "isDisabled": { "alias": "isDisabled"; "required": false; }; "sliderValue": { "alias": "sliderValue"; "required": false; }; "sliderOptions": { "alias": "sliderOptions"; "required": false; }; "cssClass": { "alias": "cssClass"; "required": false; }; "skeletonMode": { "alias": "skeletonMode"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "appendTo": { "alias": "appendTo"; "required": false; }; "indeterminate": { "alias": "indeterminate"; "required": false; "isSignal": true; }; }, { "refreshEvent": "refreshEvent"; "textChanged": "textChanged"; "valueChange": "valueChange"; }, ["optionTemplate", "labelTemplate"], never, true, never>;
|
|
1166
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FormFieldComponent, "cw-form-field", never, { "control": { "alias": "control"; "required": false; }; "formGroup": { "alias": "formGroup"; "required": false; }; "type": { "alias": "type"; "required": false; }; "label": { "alias": "label"; "required": false; }; "displayLabel": { "alias": "displayLabel"; "required": false; }; "name": { "alias": "name"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "options": { "alias": "options"; "required": false; }; "rangeOptions": { "alias": "rangeOptions"; "required": false; }; "validationOptions": { "alias": "validationOptions"; "required": false; }; "errorMessages": { "alias": "errorMessages"; "required": false; }; "isRequired": { "alias": "isRequired"; "required": false; }; "help": { "alias": "help"; "required": false; }; "tooltip": { "alias": "tooltip"; "required": false; }; "addonLeft": { "alias": "addonLeft"; "required": false; }; "addonRight": { "alias": "addonRight"; "required": false; }; "isInAddon": { "alias": "isInAddon"; "required": false; }; "isReadonly": { "alias": "isReadonly"; "required": false; }; "isDisabled": { "alias": "isDisabled"; "required": false; }; "sliderValue": { "alias": "sliderValue"; "required": false; }; "sliderOptions": { "alias": "sliderOptions"; "required": false; }; "cssClass": { "alias": "cssClass"; "required": false; }; "skeletonMode": { "alias": "skeletonMode"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "appendTo": { "alias": "appendTo"; "required": false; }; "indeterminate": { "alias": "indeterminate"; "required": false; "isSignal": true; }; }, { "refreshEvent": "refreshEvent"; "textChanged": "textChanged"; "valueChange": "valueChange"; }, ["optionTemplate", "labelTemplate"], never, true, never>;
|
|
1142
1167
|
}
|
|
1143
1168
|
|
|
1144
1169
|
declare class IconComponent {
|
|
@@ -1463,6 +1488,23 @@ declare class RequiredInfoComponent {
|
|
|
1463
1488
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<RequiredInfoComponent, "cw-required-info", never, { "allFieldsRequired": { "alias": "allFieldsRequired"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1464
1489
|
}
|
|
1465
1490
|
|
|
1491
|
+
interface CwBreadcrumbItem {
|
|
1492
|
+
/** Clé i18n OU chaîne brute. La lib applique `| translate` en interne. */
|
|
1493
|
+
label: string;
|
|
1494
|
+
/** Cible RouterLink. Si `undefined` ou si `isCurrent === true`, l'item est rendu en <span> non cliquable. */
|
|
1495
|
+
link?: string;
|
|
1496
|
+
/** Marque le segment courant. Rendu en <span> avec `aria-current="page"`, même si `link` est défini. */
|
|
1497
|
+
isCurrent?: boolean;
|
|
1498
|
+
}
|
|
1499
|
+
|
|
1500
|
+
declare class BreadcrumbComponent {
|
|
1501
|
+
readonly items: _angular_core.InputSignal<CwBreadcrumbItem[]>;
|
|
1502
|
+
readonly ariaLabel: _angular_core.InputSignal<string>;
|
|
1503
|
+
isClickable(item: CwBreadcrumbItem): boolean;
|
|
1504
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BreadcrumbComponent, never>;
|
|
1505
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BreadcrumbComponent, "cw-breadcrumb", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1506
|
+
}
|
|
1507
|
+
|
|
1466
1508
|
declare class ClickOutsideDirective {
|
|
1467
1509
|
private elementRef;
|
|
1468
1510
|
clickOutside: EventEmitter<void>;
|
|
@@ -1537,5 +1579,5 @@ interface DataCustomListGroup {
|
|
|
1537
1579
|
fields: DataCustomList[];
|
|
1538
1580
|
}
|
|
1539
1581
|
|
|
1540
|
-
export { AccordionComponent, AlertComponent, AlertTypeEnum, BadgeComponent, BadgePositionEnum, BadgeTypeEnum, BoButtonTypeEnum, BoTabTypeEnum, ButtonComponent, ButtonIconSizeEnum, ButtonPositionEnum, CardComponent, CardTitleRankEnum, CardTypeEnum, ClickOutsideDirective, CollapseDirective, DropdownComponent, DropdownItemDirective, DropdownPositionEnum, FileToDownloadComponent, FoButtonTypeEnum, FoTabTypeEnum, FocusTrackerService, FormFieldComponent, FormFieldTypeEnum, IconComponent, IconNotifSizeEnum, IconNotifTypeEnum, IconNotificationComponent, IconSizeEnum, IconTypeEnum, IconUiTypeEnum, ImageComponent, LegendComponent, LegendTypeEnum, LoaderComponent, ModalsComponent, ModalsService, ModalsSize, ModalsType, NumericalRangeComponent, NumericalRangeLabelPositionEnum, NumericalRangeTypeEnum, PlacementEnum, RequiredInfoComponent, ResponsiveService, SkipLinksComponent, SpriteIconEnum, StepperComponent, TOAST_AUTOHIDE_DELAY_MS, TabComponent, TabContentComponent, TitleComponent, TitleContextEnum, TitleTagEnum, ToastComponent, ToastItemComponent, ToastService, TriggerTooltipEnum, TypeTooltipEnum, WizardStepComponent, WizardStepperComponent, rangeValidator };
|
|
1541
|
-
export type { Attachment, DataCustomList, DataCustomListGroup, DataLegend, FormFieldOption, FormFieldRangeOption, FormFieldValidationOption, Legend, ModalConfig, ModalRef, ShowToastOptions, SkipLink, Toast, ToastAction };
|
|
1582
|
+
export { AccordionComponent, AlertComponent, AlertTypeEnum, BadgeComponent, BadgePositionEnum, BadgeTypeEnum, BoButtonTypeEnum, BoTabTypeEnum, BreadcrumbComponent, ButtonComponent, ButtonIconSizeEnum, ButtonPositionEnum, CardComponent, CardTitleRankEnum, CardTypeEnum, ClickOutsideDirective, CollapseDirective, DropdownComponent, DropdownItemDirective, DropdownPositionEnum, FileToDownloadComponent, FoButtonTypeEnum, FoTabTypeEnum, FocusTrackerService, FormFieldComponent, FormFieldTypeEnum, IconComponent, IconNotifSizeEnum, IconNotifTypeEnum, IconNotificationComponent, IconSizeEnum, IconTypeEnum, IconUiTypeEnum, ImageComponent, LegendComponent, LegendTypeEnum, LoaderComponent, ModalsComponent, ModalsService, ModalsSize, ModalsType, NumericalRangeComponent, NumericalRangeLabelPositionEnum, NumericalRangeTypeEnum, PlacementEnum, RequiredInfoComponent, ResponsiveService, SkipLinksComponent, SpriteIconEnum, StepperComponent, TOAST_AUTOHIDE_DELAY_MS, TabComponent, TabContentComponent, TitleComponent, TitleContextEnum, TitleTagEnum, ToastComponent, ToastItemComponent, ToastService, TriggerTooltipEnum, TypeTooltipEnum, WizardStepComponent, WizardStepperComponent, rangeValidator };
|
|
1583
|
+
export type { Attachment, CwBreadcrumbItem, DataCustomList, DataCustomListGroup, DataLegend, FormFieldOption, FormFieldRangeOption, FormFieldValidationOption, Legend, ModalConfig, ModalRef, ShowToastOptions, SkipLink, Toast, ToastAction };
|
|
@@ -2,9 +2,21 @@
|
|
|
2
2
|
@use "@cityway/design-tokens/primitives" as p;
|
|
3
3
|
@use "@cityway/design-tokens/functions" as f;
|
|
4
4
|
@use "@cityway/design-tokens/theme-mapping" as tm;
|
|
5
|
+
@use "components/button/button" as btn;
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
[data-cw-theme=cw-bo] {
|
|
7
8
|
@include tm.generate-grid-vars(p.$grid);
|
|
8
9
|
@include tm.generate-theme-colors(tm.$theme-bo-colors);
|
|
9
10
|
@include tm.generate-theme-props(tm.$theme-bo-props);
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
.btn:not(.btn-ghost) {
|
|
14
|
+
@include btn.btn-base((
|
|
15
|
+
padding-x: f.size(xs),
|
|
16
|
+
padding-y: 0,
|
|
17
|
+
min-height: 2rem,
|
|
18
|
+
fs: f.font(fs, xs),
|
|
19
|
+
lh: f.font(lh, xs),
|
|
20
|
+
));
|
|
21
|
+
}
|
|
10
22
|
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
@use "@cityway/design-tokens/primitives" as p;
|
|
2
|
+
@use "@cityway/design-tokens/functions" as *;
|
|
3
|
+
|
|
4
|
+
.breadcrumb {
|
|
5
|
+
--#{p.$prefix}-breadcrumb-gap: #{size(2xs)};
|
|
6
|
+
--#{p.$prefix}-breadcrumb-font-size: #{font(fs, sm)};
|
|
7
|
+
--#{p.$prefix}-breadcrumb-color: var(--#{p.$prefix}-body-color);
|
|
8
|
+
--#{p.$prefix}-breadcrumb-link-color: var(--#{p.$prefix}-primary-base);
|
|
9
|
+
--#{p.$prefix}-breadcrumb-active-color: var(--#{p.$prefix}-body-color);
|
|
10
|
+
--#{p.$prefix}-breadcrumb-separator: "\203A"; // ›
|
|
11
|
+
|
|
12
|
+
font-size: var(--#{p.$prefix}-breadcrumb-font-size);
|
|
13
|
+
color: var(--#{p.$prefix}-breadcrumb-color);
|
|
14
|
+
|
|
15
|
+
&-list {
|
|
16
|
+
flex-wrap: wrap;
|
|
17
|
+
gap: var(--#{p.$prefix}-breadcrumb-gap);
|
|
18
|
+
padding: 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&-item {
|
|
22
|
+
display: inline-flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
gap: var(--#{p.$prefix}-breadcrumb-gap);
|
|
25
|
+
|
|
26
|
+
&:not(.breadcrumb-item-home)::before {
|
|
27
|
+
content: var(--#{p.$prefix}-breadcrumb-separator);
|
|
28
|
+
color: var(--#{p.$prefix}-breadcrumb-color);
|
|
29
|
+
user-select: none;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&.active {
|
|
33
|
+
font-weight: font(fw, bold);
|
|
34
|
+
color: var(--#{p.$prefix}-breadcrumb-active-color);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&-link {
|
|
39
|
+
color: var(--#{p.$prefix}-breadcrumb-link-color);
|
|
40
|
+
text-decoration: none;
|
|
41
|
+
|
|
42
|
+
&:hover,
|
|
43
|
+
&:focus-visible {
|
|
44
|
+
text-decoration: underline;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&-text {
|
|
49
|
+
color: inherit;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -62,6 +62,9 @@
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
&-body {
|
|
65
|
+
display: flex;
|
|
66
|
+
flex-direction: column;
|
|
67
|
+
gap: size(md); // todo
|
|
65
68
|
padding: var(--#{p.$prefix}-card-padding);
|
|
66
69
|
|
|
67
70
|
&:empty {
|
|
@@ -85,3 +88,11 @@
|
|
|
85
88
|
--#{p.$prefix}-card-bs: none;
|
|
86
89
|
}
|
|
87
90
|
}
|
|
91
|
+
|
|
92
|
+
// BO only pour l'instant à trancher pus tard pour le FO
|
|
93
|
+
:root, [data-cw-theme=cw-bo] {
|
|
94
|
+
.card {
|
|
95
|
+
// Surcharge des goutiière dans les cards
|
|
96
|
+
--#{p.$prefix}-columns-gutter: 1rem 1.25rem;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
--#{p.$prefix}-dp-menu-zindex: 1050;
|
|
17
17
|
|
|
18
18
|
--#{p.$prefix}-dp-menu-item-gap: #{size(md)};
|
|
19
|
-
--#{p.$prefix}-dp-menu-item-padding: #{size(md)} #{size(lg)};
|
|
20
19
|
--#{p.$prefix}-dp-menu-item-border: #{border(bw, xs)} solid #{color("grey", 50)};
|
|
21
20
|
--#{p.$prefix}-dp-menu-item-bg-hover: #{color("grey", 100)};
|
|
22
21
|
|
|
23
22
|
display: none;
|
|
23
|
+
line-height: var(--#{p.$prefix}-body-lh);
|
|
24
24
|
|
|
25
25
|
&.show {
|
|
26
26
|
display: block;
|
|
@@ -59,11 +59,12 @@
|
|
|
59
59
|
justify-content: flex-start;
|
|
60
60
|
gap: var(--#{p.$prefix}-dp-menu-item-gap);
|
|
61
61
|
width: 100%;
|
|
62
|
-
padding: var(--#{p.$prefix}-
|
|
62
|
+
padding: var(--#{p.$prefix}-btn-padding-y) var(--#{p.$prefix}-btn-padding-x);
|
|
63
63
|
text-align: left;
|
|
64
64
|
|
|
65
65
|
color: currentColor;
|
|
66
66
|
text-decoration: none;
|
|
67
|
+
border-radius: 0;
|
|
67
68
|
|
|
68
69
|
&:not(:first-child) {
|
|
69
70
|
border-top: var(--#{p.$prefix}-dp-menu-item-border);
|
|
@@ -6,19 +6,36 @@ cw-button {
|
|
|
6
6
|
line-height: 0;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
+
// MIXIN - Base (taille, espacement, typo) — overridable par thème (FO/BO)
|
|
10
|
+
// ---------------------------------
|
|
11
|
+
@mixin btn-base($config: ()) {
|
|
12
|
+
$defaults: (
|
|
13
|
+
padding-x: size(2xl),
|
|
14
|
+
padding-y: size(sm),
|
|
15
|
+
min-width: 17rem,
|
|
16
|
+
min-height: auto,
|
|
17
|
+
fs: var(--#{p.$prefix}-body-fs),
|
|
18
|
+
lh: var(--#{p.$prefix}-body-lh),
|
|
19
|
+
fw: var(--#{p.$prefix}-body-fw),
|
|
20
|
+
);
|
|
21
|
+
$c: map.merge($defaults, $config);
|
|
22
|
+
|
|
23
|
+
--#{p.$prefix}-btn-padding-x: #{map.get($c, padding-x)};
|
|
24
|
+
--#{p.$prefix}-btn-padding-y: #{map.get($c, padding-y)};
|
|
25
|
+
--#{p.$prefix}-btn-min-width: #{map.get($c, min-width)};
|
|
26
|
+
--#{p.$prefix}-btn-min-height: #{map.get($c, min-height)};
|
|
27
|
+
|
|
28
|
+
--#{p.$prefix}-btn-fs: #{map.get($c, fs)};
|
|
29
|
+
--#{p.$prefix}-btn-lh: #{map.get($c, lh)};
|
|
30
|
+
--#{p.$prefix}-btn-fw: #{map.get($c, fw)};
|
|
31
|
+
}
|
|
32
|
+
|
|
9
33
|
.btn {
|
|
10
|
-
|
|
11
|
-
--#{p.$prefix}-btn-padding-y: #{size(sm)};
|
|
12
|
-
--#{p.$prefix}-btn-min-width: 17rem;
|
|
13
|
-
--#{p.$prefix}-btn-min-height: auto;
|
|
34
|
+
@include btn-base;
|
|
14
35
|
|
|
15
36
|
--#{p.$prefix}-btn-bg: transparent;
|
|
16
37
|
--#{p.$prefix}-btn-color: var(--#{p.$prefix}-body-color);
|
|
17
38
|
|
|
18
|
-
--#{p.$prefix}-btn-fs: var(--#{p.$prefix}-body-fs);
|
|
19
|
-
--#{p.$prefix}-btn-lh: var(--#{p.$prefix}-body-lh);;
|
|
20
|
-
--#{p.$prefix}-btn-fw: var(--#{p.$prefix}-body-fw);
|
|
21
|
-
|
|
22
39
|
--#{p.$prefix}-btn-border-color: transparent;
|
|
23
40
|
--#{p.$prefix}-btn-border-width: 1px;
|
|
24
41
|
--#{p.$prefix}-btn-br: var(--#{p.$prefix}-border-radius-input);
|
|
@@ -51,13 +68,16 @@ cw-button {
|
|
|
51
68
|
background-color: var(--#{p.$prefix}-btn-bg);
|
|
52
69
|
transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
|
|
53
70
|
|
|
54
|
-
&:hover,
|
|
71
|
+
&:hover,
|
|
72
|
+
&:active {
|
|
55
73
|
color: var(--#{p.$prefix}-btn-hover-color);
|
|
56
74
|
background-color: var(--#{p.$prefix}-btn-hover-bg);
|
|
57
75
|
border-color: var(--#{p.$prefix}-btn-hover-border-color);
|
|
58
76
|
}
|
|
59
77
|
|
|
60
|
-
&.disabled,
|
|
78
|
+
&.disabled,
|
|
79
|
+
&[disabled],
|
|
80
|
+
&:disabled {
|
|
61
81
|
color: var(--#{p.$prefix}-btn-disabled-color);
|
|
62
82
|
background-color: var(--#{p.$prefix}-btn-disabled-bg);
|
|
63
83
|
border-color: var(--#{p.$prefix}-btn-disabled-border-color);
|
|
@@ -69,7 +89,9 @@ cw-button {
|
|
|
69
89
|
|
|
70
90
|
&-link {
|
|
71
91
|
text-decoration: underline;
|
|
72
|
-
|
|
92
|
+
|
|
93
|
+
&:hover,
|
|
94
|
+
&:active {
|
|
73
95
|
text-decoration: none;
|
|
74
96
|
}
|
|
75
97
|
}
|
|
@@ -114,13 +136,17 @@ cw-button {
|
|
|
114
136
|
--#{p.$prefix}-btn-bg: #{map.get($colors, surface)};
|
|
115
137
|
--#{p.$prefix}-btn-border-color: #{map.get($colors, border)};
|
|
116
138
|
|
|
117
|
-
--#{p.$prefix}-btn-hover-color:
|
|
139
|
+
--#{p.$prefix}-btn-hover-color: #{map.get($colors, text-hover)};
|
|
118
140
|
--#{p.$prefix}-btn-hover-bg: #{map.get($colors, surface-hover)};
|
|
119
141
|
--#{p.$prefix}-btn-hover-border-color: #{map.get($colors, border-hover)};
|
|
120
142
|
|
|
121
|
-
--#{p.$prefix}-btn-disabled-color:
|
|
143
|
+
--#{p.$prefix}-btn-disabled-color: #{map.get($colors, text-disabled)};
|
|
122
144
|
--#{p.$prefix}-btn-disabled-bg: #{map.get($colors, surface-disabled)};
|
|
123
145
|
--#{p.$prefix}-btn-disabled-border-color: #{map.get($colors, border-disabled)};
|
|
146
|
+
|
|
147
|
+
.spinner-border {
|
|
148
|
+
--#{p.$prefix}-spinner-bc: var(--#{p.$prefix}-btn-color);
|
|
149
|
+
}
|
|
124
150
|
}
|
|
125
151
|
}
|
|
126
152
|
}
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
.spinner-border {
|
|
6
6
|
--#{p.$prefix}-spinner-width: #{size(3xl)};
|
|
7
7
|
--#{p.$prefix}-spinner-height: #{size(3xl)};
|
|
8
|
-
--#{p.$prefix}-spinner-
|
|
8
|
+
--#{p.$prefix}-spinner-bw: #{size(4xs)};
|
|
9
|
+
--#{p.$prefix}-spinner-bc: var(--#{p.$prefix}-primary-base);
|
|
9
10
|
|
|
10
11
|
display: inline-block;
|
|
11
12
|
flex-shrink: 0;
|
|
@@ -13,7 +14,7 @@
|
|
|
13
14
|
height: var(--#{p.$prefix}-spinner-height);
|
|
14
15
|
vertical-align: -0.125em;
|
|
15
16
|
|
|
16
|
-
border: var(--#{p.$prefix}-spinner-
|
|
17
|
+
border: var(--#{p.$prefix}-spinner-bw) solid var(--#{p.$prefix}-spinner-bc);
|
|
17
18
|
border-right-color: transparent;
|
|
18
19
|
border-radius: 50%;
|
|
19
20
|
animation: 0.75s linear infinite spinner-border;
|
|
@@ -26,11 +27,11 @@
|
|
|
26
27
|
.spinner-border-sm {
|
|
27
28
|
--#{p.$prefix}-spinner-width: #{size(lg)};
|
|
28
29
|
--#{p.$prefix}-spinner-height: #{size(lg)};
|
|
29
|
-
--#{p.$prefix}-spinner-
|
|
30
|
+
--#{p.$prefix}-spinner-bw: 0.188rem;
|
|
30
31
|
}
|
|
31
32
|
|
|
32
33
|
.spinner-border-lg {
|
|
33
34
|
--#{p.$prefix}-spinner-width: #{size(7xl)};
|
|
34
35
|
--#{p.$prefix}-spinner-height: #{size(7xl)};
|
|
35
|
-
--#{p.$prefix}-spinner-
|
|
36
|
+
--#{p.$prefix}-spinner-bw: 0.5rem;
|
|
36
37
|
}
|
|
@@ -6,43 +6,35 @@
|
|
|
6
6
|
// ---------------------------------
|
|
7
7
|
$heading: (
|
|
8
8
|
h1: (
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
color: var(--#{p.$prefix}-body-color)
|
|
15
|
-
),
|
|
9
|
+
ff: var(--#{p.$prefix}-body-ff-heading),
|
|
10
|
+
fw: font(fw, normal),
|
|
11
|
+
fs: font(fs, 2xl),
|
|
12
|
+
lh: font(lh, 2xl),
|
|
13
|
+
color: var(--#{p.$prefix}-body-color)
|
|
16
14
|
),
|
|
17
15
|
h2: (
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
color: var(--#{p.$prefix}-body-color)
|
|
24
|
-
),
|
|
16
|
+
ff: var(--#{p.$prefix}-body-ff-heading),
|
|
17
|
+
fw: font(fw, normal),
|
|
18
|
+
fs: font(fs, lg),
|
|
19
|
+
lh: font(lh, lg),
|
|
20
|
+
color: var(--#{p.$prefix}-body-color)
|
|
25
21
|
),
|
|
26
22
|
h3: (
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
color: var(--#{p.$prefix}-base-disabled)
|
|
33
|
-
),
|
|
23
|
+
ff: var(--#{p.$prefix}-body-ff-heading),
|
|
24
|
+
fw: font(fw, normal),
|
|
25
|
+
fs: font(fs, lg),
|
|
26
|
+
lh: font(lh, lg),
|
|
27
|
+
color: var(--#{p.$prefix}-base-disabled)
|
|
34
28
|
),
|
|
35
29
|
h4: (
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
color: var(--#{p.$prefix}-body-color)
|
|
42
|
-
)
|
|
30
|
+
ff: var(--#{p.$prefix}-body-ff-heading),
|
|
31
|
+
fw: font(fw, bold),
|
|
32
|
+
fs: font(fs, md),
|
|
33
|
+
lh: font(lh, md),
|
|
34
|
+
color: var(--#{p.$prefix}-body-color)
|
|
43
35
|
)
|
|
44
36
|
);
|
|
45
37
|
|
|
46
38
|
// Générer toutes les variantes
|
|
47
39
|
// ---------------------------------
|
|
48
|
-
@include mixin.heading-
|
|
40
|
+
@include mixin.heading-base($heading);
|
|
@@ -3,6 +3,20 @@
|
|
|
3
3
|
|
|
4
4
|
@include generate-type-utilities();
|
|
5
5
|
|
|
6
|
+
// MIXIN - Base
|
|
7
|
+
// ---------------------------------
|
|
8
|
+
@mixin heading-base($variants) {
|
|
9
|
+
@each $tag, $props in $variants {
|
|
10
|
+
#{$tag}, .#{$tag} {
|
|
11
|
+
font-family: #{map.get($props, ff)};
|
|
12
|
+
font-weight: #{map.get($props, fw)};
|
|
13
|
+
font-size: #{map.get($props, fs)};
|
|
14
|
+
line-height: #{map.get($props, lh)};
|
|
15
|
+
color: #{map.get($props, color)};
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
6
20
|
// MIXIN - Variantes
|
|
7
21
|
// ---------------------------------
|
|
8
22
|
@mixin heading-variants($variants) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cityway/basic-ui",
|
|
3
|
-
"version": "1.0.2-
|
|
3
|
+
"version": "1.0.2-beta021",
|
|
4
4
|
"schematics": "./schematics/collection.json",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": "^20.3.0",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"@angular/animations": "^20.3.0",
|
|
10
10
|
"@angular/cdk": "^20.2.2",
|
|
11
11
|
"@angular/platform-browser": "^20.3.0",
|
|
12
|
-
"@cityway/design-tokens": "1.0.1-
|
|
12
|
+
"@cityway/design-tokens": "1.0.1-beta009"
|
|
13
13
|
},
|
|
14
14
|
"peerDependenciesMeta": {
|
|
15
15
|
"@ng-select/ng-select": {
|