@avenirs-esr/avenirs-dsav 0.1.130 → 0.1.132

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.
@@ -17,6 +17,8 @@ export declare const AvPeriodInputStub: import("vue").DefineComponent<import("vu
17
17
  startDateDisabled: BooleanConstructor;
18
18
  type: StringConstructor;
19
19
  labelVisible: BooleanConstructor;
20
+ startErrorMessage: StringConstructor;
21
+ endErrorMessage: StringConstructor;
20
22
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:startModelValue" | "update:endModelValue")[], "change" | "update:startModelValue" | "update:endModelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
21
23
  id: StringConstructor;
22
24
  label: StringConstructor;
@@ -36,6 +38,8 @@ export declare const AvPeriodInputStub: import("vue").DefineComponent<import("vu
36
38
  startDateDisabled: BooleanConstructor;
37
39
  type: StringConstructor;
38
40
  labelVisible: BooleanConstructor;
41
+ startErrorMessage: StringConstructor;
42
+ endErrorMessage: StringConstructor;
39
43
  }>> & Readonly<{
40
44
  onChange?: ((...args: any[]) => any) | undefined;
41
45
  "onUpdate:startModelValue"?: ((...args: any[]) => any) | undefined;
@@ -67,7 +67,7 @@
67
67
  <fieldset class="av-checkboxes-group-stub">
68
68
  <slot />
69
69
  </fieldset>
70
- `}),C=e.defineComponent({name:"AvInput",props:{modelValue:String,label:String,labelClass:String,placeholder:String,isValid:Boolean,isTextarea:Boolean,labelVisible:Boolean,disabled:Boolean,required:Boolean,maxlength:Number,minlength:Number,errorMessage:String,validMessage:String,prefixIcon:String,id:String,descriptionId:String,hint:String,type:String,minDate:String,maxDate:String,width:String,noRadius:Boolean,modelModifiers:Object,textareaMinHeight:String,formatDateStr:String},emits:["update:modelValue"],template:`<input @input="$emit('update:modelValue', $event.target.value)" data-testid="av-input-stub" :value="modelValue" :placeholder="placeholder" :disabled="disabled" :required="required" :maxlength="maxlength" /><slot name="maxLengthCaption" :current-value="modelValue" />`}),h=e.defineComponent({name:"AvPeriodInput",props:{id:String,label:String,labelClass:String,startModelValue:String,endModelValue:String,startLabel:String,endLabel:String,width:String,startMinDate:Date,startMaxDate:Date,endMinDate:Date,endMaxDate:Date,stacked:Boolean,separatorSpacing:String,endDateDisabled:Boolean,startDateDisabled:Boolean,type:String,labelVisible:Boolean},emits:["update:startModelValue","update:endModelValue","change"],template:'<div class="av-period-input-stub" data-testid="av-period-input-stub" />'}),y=e.defineComponent({name:"AvList",props:["size"],template:`
70
+ `}),C=e.defineComponent({name:"AvInput",props:{modelValue:String,label:String,labelClass:String,placeholder:String,isValid:Boolean,isTextarea:Boolean,labelVisible:Boolean,disabled:Boolean,required:Boolean,maxlength:Number,minlength:Number,errorMessage:String,validMessage:String,prefixIcon:String,id:String,descriptionId:String,hint:String,type:String,minDate:String,maxDate:String,width:String,noRadius:Boolean,modelModifiers:Object,textareaMinHeight:String,formatDateStr:String},emits:["update:modelValue"],template:`<input @input="$emit('update:modelValue', $event.target.value)" data-testid="av-input-stub" :value="modelValue" :placeholder="placeholder" :disabled="disabled" :required="required" :maxlength="maxlength" /><slot name="maxLengthCaption" :current-value="modelValue" />`}),h=e.defineComponent({name:"AvPeriodInput",props:{id:String,label:String,labelClass:String,startModelValue:String,endModelValue:String,startLabel:String,endLabel:String,width:String,startMinDate:Date,startMaxDate:Date,endMinDate:Date,endMaxDate:Date,stacked:Boolean,separatorSpacing:String,endDateDisabled:Boolean,startDateDisabled:Boolean,type:String,labelVisible:Boolean,startErrorMessage:String,endErrorMessage:String},emits:["update:startModelValue","update:endModelValue","change"],template:'<div class="av-period-input-stub" data-testid="av-period-input-stub" />'}),y=e.defineComponent({name:"AvList",props:["size"],template:`
71
71
  <div class="av-list-stub">
72
72
  <slot />
73
73
  </div>`}),k=e.defineComponent({name:"AvListItem",props:["hoverBackgroundColor","selected","icon","iconSize","iconColor","colorOnHover"],emits:["click"],template:`
@@ -123,7 +123,7 @@
123
123
  <span v-if="errorMessage">{{ errorMessage }}</span>
124
124
  <span v-if="!errorMessage && successMessage">{{ successMessage }}</span>
125
125
  </select>
126
- `}),T=e.defineComponent({name:"AvTab",props:{title:{type:String,required:!0},icon:{type:String,required:!1}},template:'<div class="av-tab"><slot /></div>'}),I=e.defineComponent({name:"AvTabs",props:{modelValue:{type:Number,default:0},ariaLabel:String,compact:Boolean},emits:["update:modelValue"],setup(a,{slots:t}){const o=e.computed(()=>{var n;return((n=t.default)==null?void 0:n.call(t))??[]}),i=e.computed(()=>a.modelValue??0);return()=>e.h("div",{class:"av-tabs"},o.value[i.value]??null)}}),M=e.defineComponent({name:"AvToggle",props:["id","name","modelValue","description","activeText","inactiveText","disabled"],emits:["update:modelValue"],template:`
126
+ `}),M=e.defineComponent({name:"AvTab",props:{title:{type:String,required:!0},icon:{type:String,required:!1}},template:'<div class="av-tab"><slot /></div>'}),T=e.defineComponent({name:"AvTabs",props:{modelValue:{type:Number,default:0},ariaLabel:String,compact:Boolean},emits:["update:modelValue"],setup(a,{slots:t}){const o=e.computed(()=>{var n;return((n=t.default)==null?void 0:n.call(t))??[]}),i=e.computed(()=>a.modelValue??0);return()=>e.h("div",{class:"av-tabs"},o.value[i.value]??null)}}),I=e.defineComponent({name:"AvToggle",props:["id","name","modelValue","description","activeText","inactiveText","disabled"],emits:["update:modelValue"],template:`
127
127
  <div class="av-toggle">
128
128
  <input
129
129
  type="checkbox"
@@ -179,4 +179,4 @@
179
179
  <slot />
180
180
  <slot name="footer"></slot>
181
181
  </div>
182
- `});function O(){return{given(a,t){return describe(`🔵 GIVEN ${a}`,t),this},when(a,t){return describe(`🔶 WHEN ${a}`,t),this},and(a,t){return describe(`➕ AND ${a}`,t),this},then(a,t){return it(`🟩 THEN ${a}`,t),this}}}exports.AvAccordionStub=b;exports.AvAutocompleteStub=B;exports.AvBadgeStub=d;exports.AvBreadcrumbStub=L;exports.AvButtonStub=g;exports.AvCancelConfirmButtonsStub=S;exports.AvCardStub=v;exports.AvCheckboxStub=f;exports.AvCheckboxesGroupStub=A;exports.AvDrawerStub=$;exports.AvDropdownStub=q;exports.AvFieldsetStub=u;exports.AvIconStub=p;exports.AvIconTextStub=m;exports.AvInputStub=C;exports.AvListItemStub=k;exports.AvListStub=y;exports.AvModalStub=N;exports.AvPeriodInputStub=h;exports.AvSelectStub=V;exports.AvSideNavigationStub=D;exports.AvStepperStub=w;exports.AvTabStub=T;exports.AvTabsStub=I;exports.AvTagPickerStub=x;exports.AvTagStub=c;exports.AvToggleStub=M;exports.BddTest=O;
182
+ `});function O(){return{given(a,t){return describe(`🔵 GIVEN ${a}`,t),this},when(a,t){return describe(`🔶 WHEN ${a}`,t),this},and(a,t){return describe(`➕ AND ${a}`,t),this},then(a,t){return it(`🟩 THEN ${a}`,t),this}}}exports.AvAccordionStub=b;exports.AvAutocompleteStub=B;exports.AvBadgeStub=d;exports.AvBreadcrumbStub=L;exports.AvButtonStub=g;exports.AvCancelConfirmButtonsStub=S;exports.AvCardStub=v;exports.AvCheckboxStub=f;exports.AvCheckboxesGroupStub=A;exports.AvDrawerStub=$;exports.AvDropdownStub=q;exports.AvFieldsetStub=u;exports.AvIconStub=p;exports.AvIconTextStub=m;exports.AvInputStub=C;exports.AvListItemStub=k;exports.AvListStub=y;exports.AvModalStub=N;exports.AvPeriodInputStub=h;exports.AvSelectStub=V;exports.AvSideNavigationStub=D;exports.AvStepperStub=w;exports.AvTabStub=M;exports.AvTabsStub=T;exports.AvTagPickerStub=x;exports.AvTagStub=c;exports.AvToggleStub=I;exports.BddTest=O;
@@ -126,7 +126,7 @@ const f = e({
126
126
  {{ label }}
127
127
  </button>
128
128
  `
129
- }), C = e({
129
+ }), M = e({
130
130
  name: "AvCancelConfirmButtons",
131
131
  props: [
132
132
  "cancelLabel",
@@ -155,7 +155,7 @@ const f = e({
155
155
  </button>
156
156
  </div>
157
157
  `
158
- }), M = e({
158
+ }), C = e({
159
159
  name: "AvCheckbox",
160
160
  props: {
161
161
  id: { type: String, default: "" },
@@ -242,7 +242,9 @@ const f = e({
242
242
  endDateDisabled: Boolean,
243
243
  startDateDisabled: Boolean,
244
244
  type: String,
245
- labelVisible: Boolean
245
+ labelVisible: Boolean,
246
+ startErrorMessage: String,
247
+ endErrorMessage: String
246
248
  },
247
249
  emits: ["update:startModelValue", "update:endModelValue", "change"],
248
250
  template: '<div class="av-period-input-stub" data-testid="av-period-input-stub" />'
@@ -384,7 +386,7 @@ const f = e({
384
386
  }), i = s(() => a.modelValue ?? 0);
385
387
  return () => u("div", { class: "av-tabs" }, l.value[i.value] ?? null);
386
388
  }
387
- }), H = e({
389
+ }), E = e({
388
390
  name: "AvToggle",
389
391
  props: ["id", "name", "modelValue", "description", "activeText", "inactiveText", "disabled"],
390
392
  emits: ["update:modelValue"],
@@ -407,11 +409,11 @@ const f = e({
407
409
  {{ inactiveText }}
408
410
  </span>
409
411
  </div>`
410
- }), K = e({
412
+ }), H = e({
411
413
  name: "AvBreadcrumb",
412
414
  template: '<div class="av-breadcrumb-stub" />',
413
415
  props: ["links", "navigationLabel", "showBreadcrumbLabel"]
414
- }), P = e({
416
+ }), K = e({
415
417
  name: "AvSideNavigation",
416
418
  props: {
417
419
  items: Array,
@@ -426,7 +428,7 @@ const f = e({
426
428
  @click="$emit('update:isSideMenuCollapsed', !isSideMenuCollapsed)"
427
429
  />
428
430
  `
429
- }), E = e({
431
+ }), P = e({
430
432
  name: "AvStepper",
431
433
  props: {
432
434
  steps: {
@@ -508,11 +510,11 @@ export {
508
510
  B as AvAccordionStub,
509
511
  N as AvAutocompleteStub,
510
512
  f as AvBadgeStub,
511
- K as AvBreadcrumbStub,
513
+ H as AvBreadcrumbStub,
512
514
  V as AvButtonStub,
513
- C as AvCancelConfirmButtonsStub,
515
+ M as AvCancelConfirmButtonsStub,
514
516
  k as AvCardStub,
515
- M as AvCheckboxStub,
517
+ C as AvCheckboxStub,
516
518
  I as AvCheckboxesGroupStub,
517
519
  F as AvDrawerStub,
518
520
  j as AvDropdownStub,
@@ -525,12 +527,12 @@ export {
525
527
  z as AvModalStub,
526
528
  D as AvPeriodInputStub,
527
529
  q as AvSelectStub,
528
- P as AvSideNavigationStub,
529
- E as AvStepperStub,
530
+ K as AvSideNavigationStub,
531
+ P as AvStepperStub,
530
532
  O as AvTabStub,
531
533
  R as AvTabsStub,
532
534
  $ as AvTagPickerStub,
533
535
  A as AvTagStub,
534
- H as AvToggleStub,
536
+ E as AvToggleStub,
535
537
  G as BddTest
536
538
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@avenirs-esr/avenirs-dsav",
3
3
  "type": "module",
4
- "version": "0.1.130",
4
+ "version": "0.1.132",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/avenirs-esr/avenirs-dsav"
@@ -32,9 +32,9 @@
32
32
  --light-foreground-critical: #7040F1;
33
33
  --light-foreground-neutral: #666769;
34
34
  --base: #14171A;
35
- --title: #14171AEB;
36
- --text1: #14171ACC;
37
- --text2: #14171AA3;
35
+ --title: #161616;
36
+ --text1: #3A3A3A;
37
+ --text2: #656565;
38
38
  --icon: #14171A7A;
39
39
  --icon-filter: invert(65%) sepia(6%) saturate(100%) hue-rotate(180deg) brightness(75%) contrast(85%);
40
40
  --divider: #14171A5C;
@@ -1,11 +1,19 @@
1
+ @use "sass:map";
2
+
3
+ $radius: (
4
+ none: 0, /* 0px */
5
+ xxs: 0.0625rem, /* 1px */
6
+ xs: 0.125rem, /* 2px */
7
+ sm: 0.25rem, /* 4px */
8
+ md: 0.5rem, /* 8px */
9
+ lg: 0.75rem, /* 12px */
10
+ xl: 1rem, /* 16px */
11
+ hg: 2rem, /* 32px */
12
+ full: 62.5rem, /* 1000px */
13
+ ) !default;
14
+
1
15
  :root {
2
- --radius-none: 0;
3
- --radius-xxs: 0.0625rem; /* 1px */
4
- --radius-xs: 0.125rem; /* 2px */
5
- --radius-sm: 0.25rem; /* 4px */
6
- --radius-md: 0.5rem; /* 8px */
7
- --radius-lg: 0.75rem; /* 12px */
8
- --radius-xl: 1rem; /* 16px */
9
- --radius-hg: 2rem; /* 32px */
10
- --radius-full: 62.5rem; /* 1000px */
16
+ @each $key, $value in $radius {
17
+ --radius-#{$key}: #{$value};
18
+ }
11
19
  }
@@ -28,6 +28,8 @@
28
28
  @use './utilities/helpers' as *;
29
29
  @use './utilities/spacing' as *;
30
30
  @use './utilities/layout' as *;
31
+ @use './utilities/palette' as *;
32
+ @use './utilities/border' as *;
31
33
 
32
34
  // === Global ===
33
35
  :root {
@@ -0,0 +1,70 @@
1
+ ---
2
+ layout: page
3
+ lastUpdated: true
4
+ ---
5
+
6
+ # Border
7
+
8
+ ## ✨ Introduction
9
+
10
+ This `border` utility generates border width, border style and border radius classes for all defined sizes.
11
+
12
+ ## 🏷️ Class patterns
13
+
14
+ | Class pattern | Description | Responsive variants |
15
+ |---------------|-------------|---------------------|
16
+ | `.av-border-width-{widthSize}` | Applies `border-width` with the specified size | `--sm`, `--md`, `--lg`, `--xl` |
17
+ | `.av-border-style-{style}` | Applies `border-style` with the specified style | `solid`, `dashed`, `dotted`, `none` |
18
+ | `.av-radius-{radiusSize}` | Applies `border-radius` with the specified size | `--sm`, `--md`, `--lg`, `--xl` |
19
+
20
+ 📝 Notes:
21
+ - `{widthSize}` corresponds to the border width scale defined in this file: `none` (`0`), `sm` (`0.0625rem`), `md` (`0.125rem`), `lg` (`0.25rem`).
22
+ - `{radiusSize}` corresponds to the radius scale defined in the core: `none`, `xxs`, `xs`, `sm`, `md`, `lg`, `xl`, `hg`, `full`.
23
+
24
+ ## 🎨 Some CSS results
25
+
26
+ ### Border width classes
27
+
28
+ ```css
29
+ .av-border-width-sm {
30
+ border-width: 0.0625rem !important;
31
+ }
32
+
33
+ .av-border-width-md {
34
+ border-width: 0.125rem !important;
35
+ }
36
+ ```
37
+
38
+ ### Border style classes
39
+
40
+ ```css
41
+ .av-border-style-solid {
42
+ border-style: solid !important;
43
+ }
44
+
45
+ .av-border-style-dashed {
46
+ border-style: dashed !important;
47
+ }
48
+ ```
49
+
50
+ ### Border radius classes
51
+
52
+ ```css
53
+ .av-radius-sm {
54
+ border-radius: var(--radius-sm) !important;
55
+ }
56
+
57
+ .av-radius-md {
58
+ border-radius: var(--radius-md) !important;
59
+ }
60
+ ```
61
+
62
+ ## 💡 Examples of use
63
+
64
+ ```html
65
+ <div class="av-border-width-sm av-border-style-solid av-radius-sm">
66
+ <!-- border-width-sm: border width sm (0.0625rem) on all screens -->
67
+ <!-- border-style-solid: solid border style on all screens -->
68
+ <!-- radius-sm: border radius sm (var(--radius-sm)) on all screens -->
69
+ </div>
70
+ ```
@@ -0,0 +1,45 @@
1
+ @use '../core/radius' as r;
2
+ @use '../mixins/responsive-utility' as *;
3
+ @use "sass:map";
4
+
5
+ // === Border widths ===
6
+ $border-widths: (
7
+ none: 0, /* 0px */
8
+ sm: 0.0625rem, /* 1px */
9
+ md: 0.125rem, /* 2px */
10
+ lg: 0.25rem, /* 4px */
11
+ );
12
+
13
+ // === Border styles ===
14
+ $border-styles: (
15
+ solid,
16
+ dashed,
17
+ dotted,
18
+ none,
19
+ );
20
+
21
+ // === BASE CLASSES ===
22
+
23
+ // === Border width classes ===
24
+ // Ex : .av-border-sm / .av-border-lg
25
+ @each $size, $value in $border-widths {
26
+ @include utility-base("border-width-#{$size}", (
27
+ border-width: #{$value} !important
28
+ ));
29
+ }
30
+
31
+ // === Border style classes ===
32
+ // Ex : .av-border-solid / .av-border-dashed
33
+ @each $style in $border-styles {
34
+ @include utility-base("border-style-#{$style}", (
35
+ border-style: #{$style} !important
36
+ ));
37
+ }
38
+
39
+ // === Border radius classes ===
40
+ // Ex : .av-radius-sm / .av-radius-lg
41
+ @each $size, $value in r.$radius {
42
+ @include utility-base("radius-#{$size}", (
43
+ border-radius: var(--radius-#{$size}) !important
44
+ ));
45
+ }
@@ -113,4 +113,12 @@ ol>li{
113
113
 
114
114
  li::marker{
115
115
  content: counter(li-counter, ".") ". ";
116
+ }
117
+
118
+ // === List reset class ===
119
+ // Ex: .av-list-reset
120
+ @include ns("list-reset") {
121
+ list-style: none;
122
+ padding: var(--spacing-none);
123
+ margin: var(--spacing-none);
116
124
  }
@@ -0,0 +1,14 @@
1
+ @use '../core/namespace' as *;
2
+
3
+ // === Usual text color classes ===
4
+ @include ns("text-text1") {
5
+ color: var(--text1);
6
+ }
7
+
8
+ @include ns("text-text2") {
9
+ color: var(--text2);
10
+ }
11
+
12
+ @include ns("text-title") {
13
+ color: var(--title);
14
+ }