@cityway/basic-ui 1.0.2-beta006 → 1.0.2-beta008

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/index.d.ts CHANGED
@@ -920,6 +920,8 @@ declare class FormFieldComponent implements OnInit {
920
920
  labelTemplate?: TemplateRef<any>;
921
921
  typeField: typeof FormFieldTypeEnum;
922
922
  readonly spriteIcon: typeof SpriteIconEnum;
923
+ readonly buttonType: typeof BoButtonTypeEnum;
924
+ readonly buttonIconSize: typeof ButtonIconSizeEnum;
923
925
  get hostClasses(): string;
924
926
  constructor();
925
927
  get isRange(): boolean;
@@ -1230,6 +1232,44 @@ declare class ImageComponent {
1230
1232
  static ɵcmp: i0.ɵɵComponentDeclaration<ImageComponent, "cw-image", never, { "source": { "alias": "source"; "required": false; }; "alt": { "alias": "alt"; "required": false; }; "isAriaHidden": { "alias": "isAriaHidden"; "required": false; }; "cssClass": { "alias": "cssClass"; "required": false; }; "width": { "alias": "width"; "required": false; }; "height": { "alias": "height"; "required": false; }; }, {}, never, never, true, never>;
1231
1233
  }
1232
1234
 
1235
+ declare enum TitleTagEnum {
1236
+ h1 = "h1",
1237
+ h2 = "h2",
1238
+ h3 = "h3",
1239
+ h4 = "h4"
1240
+ }
1241
+ declare enum TitleContextEnum {
1242
+ editorial = "editorial",
1243
+ home = "home",
1244
+ mobility = "mobility",
1245
+ standard = "standard"
1246
+ }
1247
+
1248
+ declare class TitleComponent {
1249
+ tag: i0.InputSignal<TitleTagEnum>;
1250
+ context: i0.InputSignal<TitleContextEnum>;
1251
+ classes: i0.Signal<string>;
1252
+ static ɵfac: i0.ɵɵFactoryDeclaration<TitleComponent, never>;
1253
+ static ɵcmp: i0.ɵɵComponentDeclaration<TitleComponent, "cw-title", never, { "tag": { "alias": "tag"; "required": false; "isSignal": true; }; "context": { "alias": "context"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
1254
+ }
1255
+
1256
+ interface SkipLink {
1257
+ id: string;
1258
+ label: string;
1259
+ }
1260
+
1261
+ declare class SkipLinksComponent {
1262
+ links: i0.InputSignal<SkipLink[]>;
1263
+ static ɵfac: i0.ɵɵFactoryDeclaration<SkipLinksComponent, never>;
1264
+ static ɵcmp: i0.ɵɵComponentDeclaration<SkipLinksComponent, "cw-skiplinks", never, { "links": { "alias": "links"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
1265
+ }
1266
+
1267
+ declare class RequiredInfoComponent {
1268
+ allFieldsRequired: i0.InputSignal<boolean>;
1269
+ static ɵfac: i0.ɵɵFactoryDeclaration<RequiredInfoComponent, never>;
1270
+ static ɵcmp: i0.ɵɵComponentDeclaration<RequiredInfoComponent, "cw-required-info", never, { "allFieldsRequired": { "alias": "allFieldsRequired"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
1271
+ }
1272
+
1233
1273
  declare class ClickOutsideDirective {
1234
1274
  private elementRef;
1235
1275
  clickOutside: EventEmitter<void>;
@@ -1294,5 +1334,5 @@ interface DataCustomListGroup {
1294
1334
  fields: DataCustomList[];
1295
1335
  }
1296
1336
 
1297
- export { AccordionComponent, AlertComponent, AlertTypeEnum, BadgeComponent, BadgePositionEnum, BadgeTypeEnum, BoButtonTypeEnum, BoTabTypeEnum, ButtonComponent, ButtonIconSizeEnum, ButtonPositionEnum, CardComponent, CardTitleRankEnum, CardTypeEnum, ClickOutsideDirective, CollapseDirective, DropdownComponent, DropdownItemDirective, 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, ResponsiveService, StepperComponent, TabComponent, TabContentComponent, ToastComponent, ToastService, TriggerTooltipEnum, TypeTooltipEnum, WizardStepComponent, WizardStepperComponent, rangeValidator };
1298
- export type { Attachment, DataCustomList, DataCustomListGroup, DataLegend, FormFieldOption, FormFieldRangeOption, Legend, ModalRef, ShowToastOptions, Toast, ToastAction };
1337
+ export { AccordionComponent, AlertComponent, AlertTypeEnum, BadgeComponent, BadgePositionEnum, BadgeTypeEnum, BoButtonTypeEnum, BoTabTypeEnum, ButtonComponent, ButtonIconSizeEnum, ButtonPositionEnum, CardComponent, CardTitleRankEnum, CardTypeEnum, ClickOutsideDirective, CollapseDirective, DropdownComponent, DropdownItemDirective, 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, TabComponent, TabContentComponent, TitleComponent, TitleContextEnum, TitleTagEnum, ToastComponent, ToastService, TriggerTooltipEnum, TypeTooltipEnum, WizardStepComponent, WizardStepperComponent, rangeValidator };
1338
+ export type { Attachment, DataCustomList, DataCustomListGroup, DataLegend, FormFieldOption, FormFieldRangeOption, Legend, ModalRef, ShowToastOptions, SkipLink, Toast, ToastAction };
@@ -112,7 +112,7 @@
112
112
  "_FORM": {
113
113
  "BACK": "Retour",
114
114
  "ERROR_INVALID_EMAIL": "Format d'e-mail invalide. Exemple : contact@mail.com",
115
- "ERROR_IS_MANDATORY": "Le champs <b>{{label}}</b> est obligatoire.",
115
+ "ERROR_IS_MANDATORY": "Le champ <b>{{label}}</b> est obligatoire.",
116
116
  "ERROR_IS_ONLY_NUMERIC": " ne doit être composé que de chiffres.",
117
117
  "ERROR_REQUIRED_EMAIL": "L'e-mail est requis.",
118
118
  "ERROR_REQUIRED_LANG": "La langue est requise.",
@@ -284,46 +284,6 @@ button {
284
284
  }
285
285
  }
286
286
 
287
- // Input
288
- input[type="text"],
289
- input[type="email"],
290
- input[type="url"],
291
- input[type="password"],
292
- input[type="number"],
293
- input[type="date"],
294
- input[type="datetime-local"],
295
- input[type="month"],
296
- input[type="search"],
297
- input[type="tel"],
298
- input[type="time"],
299
- input[type="week"],
300
- select,
301
- textarea {
302
- width: 100%;
303
- padding: 0.375rem 0.75rem;
304
- font-size: 1rem;
305
- font-weight: 400;
306
- line-height: 1.5;
307
- color: var(--input-color, #212529);
308
- background-color: var(--input-bg, #fff);
309
- background-clip: padding-box;
310
- border: 1px solid var(--input-border-color, #dee2e6);
311
- appearance: none;
312
- border-radius: 0.375rem;
313
- transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
314
- }
315
-
316
- // Textarea
317
- textarea {
318
- resize: vertical;
319
- min-height: 6rem;
320
- }
321
-
322
- // Placeholder
323
- ::placeholder {
324
- color: var(--placeholder-color, #6c757d);
325
- opacity: 1;
326
- }
327
287
 
328
288
  // Désactiver le spinner pour les inputs number
329
289
  input[type="number"]::-webkit-inner-spin-button,
@@ -355,13 +315,8 @@ fieldset {
355
315
  }
356
316
 
357
317
  legend {
358
- float: left;
359
- width: 100%;
360
318
  padding: 0;
361
- margin-bottom: 0.5rem;
362
- font-size: 1.5rem;
363
- font-weight: 600;
364
- line-height: inherit;
319
+ margin-bottom: 0;
365
320
 
366
321
  + * {
367
322
  clear: left;
@@ -371,7 +326,6 @@ legend {
371
326
  // Label
372
327
  label {
373
328
  display: inline-block;
374
- margin-bottom: 0.5rem;
375
329
  }
376
330
 
377
331
  // ============================================
@@ -389,13 +343,6 @@ progress {
389
343
  vertical-align: baseline;
390
344
  }
391
345
 
392
- // Disabled
393
- [disabled],
394
- [aria-disabled="true"] {
395
- cursor: not-allowed;
396
- opacity: 0.6;
397
- }
398
-
399
346
  // Hidden
400
347
  [hidden] {
401
348
  display: none !important;
@@ -50,6 +50,10 @@
50
50
  overflow-y: auto;
51
51
  outline: 0;
52
52
 
53
+ &.show {
54
+ display: flex;
55
+ }
56
+
53
57
  &-dialog {
54
58
  position: relative;
55
59
  width: auto;
@@ -39,6 +39,17 @@ $buttons: (
39
39
  text-disabled: var(--#{p.$prefix}-disabled),
40
40
  border-disabled: transparent,
41
41
  ),
42
+ danger: (
43
+ surface: var(--#{p.$prefix}-danger),
44
+ text: var(--#{p.$prefix}-danger-contrasted),
45
+ border: var(--#{p.$prefix}-danger),
46
+ surface-hover: var(--#{p.$prefix}-danger-hover),
47
+ text-hover: var(--#{p.$prefix}-danger-contrasted),
48
+ border-hover: var(--#{p.$prefix}-danger-hover),
49
+ surface-disabled: var(--#{p.$prefix}-disabled),
50
+ text-disabled: var(--#{p.$prefix}-disabled-contrasted),
51
+ border-disabled: var(--#{p.$prefix}-disabled),
52
+ ),
42
53
  );
43
54
 
44
55
  // Générer toutes les variantes
@@ -0,0 +1,130 @@
1
+ @use "sass:map";
2
+ @use "@cityway/design-tokens/primitives" as p;
3
+ @use "@cityway/design-tokens/functions" as *;
4
+
5
+ // --- CONFIGURATION COMMUNE ---
6
+ %field-check-base {
7
+ flex-shrink: 0;
8
+ appearance: none;
9
+ background-color: var(--#{p.$prefix}-field-check-bg);
10
+ background-image: var(--#{p.$prefix}-field-check-bg-image);
11
+ background-repeat: no-repeat;
12
+ background-position: center;
13
+ background-size: contain;
14
+ border: var(--#{p.$prefix}-field-check-border);
15
+ border-radius: var(--#{p.$prefix}-field-check-br);
16
+ print-color-adjust: exact;
17
+ transition: background-position 0.15s ease-in-out, background-color 0.15s, border-color 0.15s;
18
+
19
+ &:disabled,
20
+ &[disabled] {
21
+ pointer-events: none;
22
+ filter: none;
23
+
24
+ ~.field-check-label {
25
+ cursor: default;
26
+ color: #{color("grey", 600)};
27
+ }
28
+ }
29
+ }
30
+
31
+ .field-check {
32
+ display: flex;
33
+ gap: size(2xs);
34
+
35
+ &-input {
36
+ @extend %field-check-base;
37
+
38
+ // Valeurs par défaut (Checkbox / Radio)
39
+ --#{p.$prefix}-field-check-border: #{border(bw, xs)} solid #{color("grey", 600)};
40
+ --#{p.$prefix}-field-check-br: #{border(br, xs)};
41
+ --#{p.$prefix}-field-check-bg: var(--#{p.$prefix}-base-white);
42
+ --#{p.$prefix}-field-check-bg-image: none;
43
+
44
+ width: 1rem;
45
+ height: 1rem;
46
+ margin-top: calc(((font(fs, md-rwd) * font(lh, md-rwd)) - 1rem) / 2);
47
+
48
+ // États Partagés
49
+ &:checked {
50
+ --#{p.$prefix}-field-check-bg: var(--#{p.$prefix}-primary);
51
+ --#{p.$prefix}-field-check-border: #{border(bw, xs)} solid var(--#{p.$prefix}-primary);
52
+ }
53
+
54
+ &[aria-invalid="true"] {
55
+ --#{p.$prefix}-field-check-border: #{border(bw, xs)} solid var(--#{p.$prefix}-danger);
56
+
57
+ ~.field-check-label {
58
+ color: var(--#{p.$prefix}-danger);
59
+ }
60
+ }
61
+
62
+ &:disabled,
63
+ &[disabled] {
64
+ --#{p.$prefix}-field-check-bg: #{color("grey", 600)};
65
+ --#{p.$prefix}-field-check-border: #{border(bw, xs)} solid #{color("grey", 600)};
66
+ }
67
+
68
+ // Spécificités Radio / Checkbox
69
+ &[type="checkbox"]:checked {
70
+ --#{p.$prefix}-field-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
71
+ }
72
+
73
+ &[type="radio"] {
74
+ --#{p.$prefix}-field-check-br: #{border(br, round)};
75
+
76
+ &:checked {
77
+ --#{p.$prefix}-field-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e");
78
+ }
79
+ }
80
+ }
81
+
82
+ &-label {
83
+ font-size: font(fs, md-rwd);
84
+ line-height: font(lh, md-rwd);
85
+ }
86
+ }
87
+
88
+ // --- VARIANTE SWITCH ---
89
+ .field-switch {
90
+ .field-check-input {
91
+ --#{p.$prefix}-field-check-br: #{border(br, round)};
92
+ --#{p.$prefix}-field-check-bg: var(--#{p.$prefix}-base-disabled);
93
+ --#{p.$prefix}-field-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
94
+
95
+ width: 2.625rem;
96
+ height: 1.625rem;
97
+ margin-top: calc(((font(fs, md-rwd) * font(lh, md-rwd)) - 1.625rem) / 2);
98
+ background-position: left center;
99
+
100
+ &:checked {
101
+ --#{p.$prefix}-field-check-bg: var(--#{p.$prefix}-primary);
102
+ --#{p.$prefix}-field-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
103
+
104
+ background-position: right center;
105
+ }
106
+
107
+ &[aria-invalid="true"] {
108
+ --#{p.$prefix}-field-check-bg: var(--#{p.$prefix}-danger);
109
+ }
110
+
111
+ &:disabled,
112
+ &[disabled] {
113
+ --#{p.$prefix}-field-check-bg: var(--#{p.$prefix}-base-white);
114
+ --#{p.$prefix}-field-check-border: #{border(bw, xs)} solid #{color("grey", 600)};
115
+ }
116
+ }
117
+ }
118
+
119
+ .field-switch.field-switch-small {
120
+ .field-check-input {
121
+ width: 1.625rem;
122
+ height: 1rem;
123
+ margin-top: calc(((font(fs, md-rwd) * font(lh, md-rwd)) - 1rem) / 2);
124
+ }
125
+ }
126
+
127
+ // --- GLOBAL ---
128
+ fieldset[aria-invalid="true"] .field-check-input {
129
+ --#{p.$prefix}-field-check-border: #{border(bw, xs)} solid var(--#{p.$prefix}-danger);
130
+ }
@@ -0,0 +1,146 @@
1
+ @use "sass:map";
2
+ @use "@cityway/design-tokens/primitives" as p;
3
+ @use "@cityway/design-tokens/functions" as *;
4
+ @use "../button/button" as mixin;
5
+
6
+ @use "field-check";
7
+ @use "ng-select";
8
+ @use "slider-range";
9
+
10
+ .field {
11
+ &-required {
12
+ font-size: font(fs, xs);
13
+ line-height: font(lh, xs);
14
+ }
15
+
16
+ &-label {
17
+ font-size: font(fs, md-rwd);
18
+ font-weight: font(fw, regular);
19
+ line-height: font(lh, md-rwd);
20
+ }
21
+
22
+ &-text {
23
+ font-size: font(fs, xs);
24
+ line-height: font(lh, xs);
25
+ color: var(--#{p.$prefix}-base-disabled);
26
+ }
27
+
28
+ &-invalid {
29
+ font-size: font(fs, xs);
30
+ line-height: font(lh, xs);
31
+ color: var(--#{p.$prefix}-danger);
32
+ }
33
+
34
+ &-group {
35
+ --#{p.$prefix}-field-control-height: #{size(3xl)};
36
+ --#{p.$prefix}-field-control-padding-y: #{size(md)};
37
+ --#{p.$prefix}-field-control-border: #{border(bw, xs)} solid #{color("grey", 600)};
38
+ --#{p.$prefix}-field-control-bg: var(--#{p.$prefix}-base-white);
39
+ --#{p.$prefix}-field-control-br: var(--#{p.$prefix}-border-radius-input);
40
+ --#{p.$prefix}-field-control-bs: none;
41
+
42
+ display: flex;
43
+ align-items: stretch;
44
+ gap: 0;
45
+
46
+ &-text {
47
+ display: flex;
48
+ align-items: center;
49
+ padding-inline: var(--#{p.$prefix}-field-control-padding-y);
50
+ border: var(--#{p.$prefix}-field-control-border);
51
+ }
52
+
53
+ &-text:first-child {
54
+ border-radius: var(--#{p.$prefix}-border-radius-input) 0 0 var(--#{p.$prefix}-border-radius-input);
55
+ }
56
+
57
+ &-text:last-child {
58
+ border-radius: 0 var(--#{p.$prefix}-border-radius-input) var(--#{p.$prefix}-border-radius-input) 0;
59
+ }
60
+ }
61
+
62
+ &-control {
63
+ width: 100%;
64
+ min-height: var(--#{p.$prefix}-field-control-height);
65
+ padding-inline: var(--#{p.$prefix}-field-control-padding-y);
66
+
67
+ font-size: font(fs, md-rwd);
68
+ line-height: font(lh, md-rwd);
69
+ color: var(--#{p.$prefix}-body-color);
70
+
71
+ border: 0;
72
+ border-top: var(--#{p.$prefix}-field-control-border);
73
+ border-bottom: var(--#{p.$prefix}-field-control-border);
74
+ border-radius: 0;
75
+ background-color: var(--#{p.$prefix}-field-control-bg);
76
+ box-shadow: var(--#{p.$prefix}-field-control-bs);
77
+
78
+ &:first-child {
79
+ border: var(--#{p.$prefix}-field-control-border);
80
+ border-right-width: 0;
81
+ border-radius: var(--#{p.$prefix}-border-radius-input) 0 0 var(--#{p.$prefix}-border-radius-input);
82
+ }
83
+
84
+ &:last-child {
85
+ border: var(--#{p.$prefix}-field-control-border);
86
+ border-left-width: 0;
87
+ border-radius: 0 var(--#{p.$prefix}-border-radius-input) var(--#{p.$prefix}-border-radius-input) 0;
88
+ }
89
+
90
+ &:only-child {
91
+ border: var(--#{p.$prefix}-field-control-border);
92
+ border-radius: var(--#{p.$prefix}-field-control-br);
93
+ }
94
+ }
95
+ }
96
+
97
+ .btn-clear-field {
98
+ padding: 0;
99
+ padding-inline: var(--#{p.$prefix}-field-control-padding-y);
100
+ border: 0;
101
+ border-top: var(--#{p.$prefix}-field-control-border);
102
+ border-bottom: var(--#{p.$prefix}-field-control-border);
103
+ border-radius: 0;
104
+
105
+ &:last-child {
106
+ border: var(--#{p.$prefix}-field-control-border);
107
+ border-left-width: 0;
108
+ border-radius: 0 var(--#{p.$prefix}-border-radius-input) var(--#{p.$prefix}-border-radius-input) 0;
109
+ }
110
+ }
111
+
112
+ // Placeholder
113
+ // ::placeholder {
114
+ // color: var(--placeholder-color, #6c757d);
115
+ // opacity: 1;
116
+ // }
117
+
118
+ // Variables
119
+ // ---------------------------------
120
+ $buttons: (
121
+ field-group: (surface: var(--#{p.$prefix}-primary-contrasted),
122
+ text: var(--#{p.$prefix}-body-color),
123
+ border: var(--#{p.$prefix}-primary),
124
+ surface-hover: var(--#{p.$prefix}-primary-contrasted),
125
+ text-hover: var(--#{p.$prefix}-primary-hover),
126
+ border-hover: var(--#{p.$prefix}-primary-hover),
127
+ surface-disabled: var(--#{p.$prefix}-disabled-contrasted),
128
+ text-disabled: var(--#{p.$prefix}-disabled),
129
+ border-disabled: var(--#{p.$prefix}-disabled)),
130
+ );
131
+
132
+ // Générer toutes les variantes
133
+ // ---------------------------------
134
+ @include mixin.button-variants($buttons);
135
+
136
+ .btn-field-group {
137
+ border-radius: 0;
138
+
139
+ &:first-of-type {
140
+ border-radius: var(--#{p.$prefix}-border-radius-input) 0 0 var(--#{p.$prefix}-border-radius-input);
141
+ }
142
+
143
+ &:last-of-type {
144
+ border-radius: 0 var(--#{p.$prefix}-border-radius-input) var(--#{p.$prefix}-border-radius-input) 0;
145
+ }
146
+ }
@@ -0,0 +1,84 @@
1
+ @use "sass:map";
2
+ @use "@cityway/design-tokens/primitives" as p;
3
+ @use "@cityway/design-tokens/functions" as *;
4
+
5
+ .ng-select {
6
+ display: flex;
7
+ width: 100%;
8
+
9
+ &.ng-select-multiple,
10
+ &.ng-select-single {
11
+ .ng-select-container {
12
+ width: 100%;
13
+ min-height: var(--#{p.$prefix}-field-control-height);
14
+ border: 0;
15
+ border-top: var(--#{p.$prefix}-field-control-border);
16
+ border-bottom: var(--#{p.$prefix}-field-control-border);
17
+ border-radius: 0;
18
+
19
+
20
+ .ng-value-container {
21
+ display: flex;
22
+ gap: size(2xs);
23
+ height: 100%;
24
+ padding-top: 0;
25
+ padding-inline: var(--#{p.$prefix}-field-control-padding-y);
26
+
27
+ .ng-value {
28
+ margin: 0;
29
+ padding-right: size(2xs);
30
+ }
31
+
32
+ .ng-placeholder {
33
+ top: inherit;
34
+ padding-left: 0;
35
+ padding-bottom: 0;
36
+ // color: $input-placeholder-color;
37
+ // font-weight: $font-weight-base;
38
+ }
39
+
40
+ .ng-input {
41
+ left: inherit;
42
+ top: 0.5rem;
43
+ padding-left: 0;
44
+ }
45
+ }
46
+ }
47
+ }
48
+
49
+
50
+ &:first-child {
51
+
52
+ &.ng-select-multiple,
53
+ &.ng-select-single {
54
+ .ng-select-container {
55
+ border: var(--#{p.$prefix}-field-control-border);
56
+ border-right: 0;
57
+ border-radius: var(--#{p.$prefix}-border-radius-input) 0 0 var(--#{p.$prefix}-border-radius-input);
58
+ }
59
+ }
60
+ }
61
+
62
+ &:last-child {
63
+
64
+ &.ng-select-multiple,
65
+ &.ng-select-single {
66
+ .ng-select-container {
67
+ border: var(--#{p.$prefix}-field-control-border);
68
+ border-left: 0;
69
+ border-radius: 0 var(--#{p.$prefix}-border-radius-input) var(--#{p.$prefix}-border-radius-input) 0;
70
+ }
71
+ }
72
+ }
73
+
74
+ &:only-child {
75
+
76
+ &.ng-select-multiple,
77
+ &.ng-select-single {
78
+ .ng-select-container {
79
+ border: var(--#{p.$prefix}-field-control-border);
80
+ border-radius: var(--#{p.$prefix}-border-radius-input);
81
+ }
82
+ }
83
+ }
84
+ }
@@ -0,0 +1,68 @@
1
+ @use "sass:map";
2
+ @use "@cityway/design-tokens/primitives" as p;
3
+ @use "@cityway/design-tokens/functions" as *;
4
+
5
+ .slider {
6
+
7
+ display: flex;
8
+ align-items: center;
9
+ gap: size(md);
10
+ width: 100%;
11
+
12
+ &-input {
13
+ position: relative;
14
+ display: flex;
15
+ flex-grow: 1;
16
+ flex-direction: column;
17
+ }
18
+
19
+ &-custom-bar {
20
+ // position: absolute;
21
+ // bottom: 0;
22
+ width: 100%;
23
+ height: 0.625rem;
24
+ border-radius: 10rem;
25
+ background-color: grey;
26
+
27
+ &-selection {
28
+ height: 0.625rem;
29
+ border-radius: 10rem;
30
+ background-color: red;
31
+ }
32
+ }
33
+
34
+ &-tooltip {
35
+ position: absolute;
36
+ top: -100%;
37
+ padding: 2rem;
38
+ white-space: nowrap;
39
+ border-radius:10rem;
40
+ background-color: white;
41
+ //box-shadow: $ngx-slider-bubble-box-shadow;
42
+ transform: translate(-50%, -130%);
43
+ }
44
+ }
45
+
46
+ .field-control-range {
47
+ -webkit-appearance: none;
48
+ position: relative;
49
+ z-index: 1;
50
+ height: 0;
51
+ border: 0 solid transparent;
52
+ background-color: transparent;
53
+ transform: translateY(calc(0.625rem / 2 * -1));
54
+ &:focus {
55
+ outline: none;
56
+ box-shadow: none;
57
+ }
58
+ &::-webkit-slider-thumb {
59
+ width: 1rem;
60
+ height: 1rem;
61
+ border: 0.125rem solid red;
62
+ border-radius: 10rem;
63
+ background-color: white;
64
+ //box-shadow: $ngx-slider-pointer-box-shadow;
65
+ cursor: pointer;
66
+ -webkit-appearance: none;
67
+ }
68
+ }
@@ -3,24 +3,25 @@
3
3
  @use "@cityway/design-tokens/functions" as f;
4
4
  @use "breakpoints" as m;
5
5
 
6
- .container, .container-fluid {
6
+ .container,
7
+ .container-fluid {
7
8
  width: 100%;
8
9
  margin-inline: auto;
9
- padding-inline: var(--#{p.$prefix}-columns-gutter);
10
+ padding-inline: calc(var(--#{p.$prefix}-columns-gutter) / 2);
10
11
  }
11
12
 
13
+ // container max à 1200 - gutter meme en breakpoint xxl
12
14
  .container {
13
15
  @each $bp, $value in map.get(p.$grid, "breakpoints") {
14
16
  @if $value > 0 {
15
17
  @include m.media-breakpoint-up($bp) {
16
- max-width: calc(#{$value} - (var(--#{p.$prefix}-columns-gutter) * 2));
18
+ // On cap à la valeur xl, récupérée depuis la map
19
+ $xl-value: map.get(p.$grid, "breakpoints", "xl");
20
+ $max: if($value > $xl-value, $xl-value, $value);
21
+ max-width: calc(#{$max} - var(--#{p.$prefix}-columns-gutter));
17
22
  }
18
23
  }
19
24
  }
20
-
21
- @include m.media-breakpoint-up(xl) {
22
- max-width: calc(f.grid("breakpoints", "xl") - var(--#{p.$prefix}-columns-gutter));
23
- }
24
25
  }
25
26
 
26
27
  .row {
@@ -29,22 +30,35 @@
29
30
  gap: var(--#{p.$prefix}-columns-gutter);
30
31
  }
31
32
 
32
- [class^="col-"] {
33
- grid-column: span var(--#{p.$prefix}-columns-number);
33
+ [class^="col-"],
34
+ [class*=" col-"] {
35
+ // --_col-span sert de mémoire locale : offset peut le lire sans conflit
36
+ --_col-span: var(--#{p.$prefix}-columns-number);
37
+ grid-column: var(--_col-offset-start, auto) / span var(--_col-span);
34
38
  }
35
39
 
40
+ // Colonnes sans breakpoint
41
+ @for $i from 1 through map.get(p.$grid, "columns", "number") {
42
+ .col-#{$i} {
43
+ --_col-span: #{$i};
44
+ }
45
+ }
46
+
47
+ // Colonnes et offsets par breakpoint
36
48
  @each $name, $width in map.get(p.$grid, "breakpoints") {
37
49
  @include m.media-breakpoint-up($name) {
38
50
  @for $i from 1 through map.get(p.$grid, "columns", "number") {
39
51
  .col-#{$name}-#{$i} {
40
- grid-column: span #{$i};
52
+ --_col-span: #{$i};
41
53
  }
54
+
42
55
  .offset-#{$name}-#{$i} {
43
- grid-column-start: #{$i + 1};
56
+ --_col-offset-start: #{$i + 1};
44
57
  }
45
58
  }
59
+
46
60
  .offset-#{$name}-0 {
47
- grid-column-start: auto;
61
+ --_col-offset-start: auto;
48
62
  }
49
63
  }
50
64
  }