@ouestfrance/sipa-bms-ui 8.50.0 → 8.51.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/dist/sipa-bms-ui.css +21 -21
- package/dist/sipa-bms-ui.es.js +9 -5
- package/dist/sipa-bms-ui.es.js.map +1 -1
- package/dist/sipa-bms-ui.umd.js +9 -5
- package/dist/sipa-bms-ui.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/button/BmsSwitchIconButton.stories.js +24 -0
- package/src/components/button/BmsSwitchIconButton.vue +9 -5
package/dist/sipa-bms-ui.css
CHANGED
|
@@ -427,15 +427,15 @@
|
|
|
427
427
|
left: 50%;
|
|
428
428
|
transform: translateX(-50%);
|
|
429
429
|
width: 1em;
|
|
430
|
-
}.bms-switch-icon-button[data-v-
|
|
430
|
+
}.bms-switch-icon-button[data-v-72b8f219] {
|
|
431
431
|
position: relative;
|
|
432
432
|
display: inline-flex;
|
|
433
433
|
border-radius: var(--bms-border-radius, 0.25em);
|
|
434
434
|
}
|
|
435
|
-
.bms-switch-icon-button[data-v-
|
|
435
|
+
.bms-switch-icon-button[data-v-72b8f219]:hover:not(.bms-switch-icon-button--disabled) {
|
|
436
436
|
background-color: light-dark(var(--bms-main-25), var(--bms-grey-140));
|
|
437
437
|
}
|
|
438
|
-
.bms-switch-icon-button__button[data-v-
|
|
438
|
+
.bms-switch-icon-button__button[data-v-72b8f219] {
|
|
439
439
|
display: flex;
|
|
440
440
|
align-items: center;
|
|
441
441
|
gap: 0.25em;
|
|
@@ -446,26 +446,26 @@
|
|
|
446
446
|
border-radius: inherit;
|
|
447
447
|
transition: background-color 0.2s;
|
|
448
448
|
}
|
|
449
|
-
.bms-switch-icon-button__button[data-v-
|
|
449
|
+
.bms-switch-icon-button__button[data-v-72b8f219]:hover:not(.bms-switch-icon-button__button--disabled) {
|
|
450
450
|
background-color: light-dark(var(--bms-main-25), var(--bms-grey-140));
|
|
451
451
|
}
|
|
452
|
-
.bms-switch-icon-button__button--disabled[data-v-
|
|
452
|
+
.bms-switch-icon-button__button--disabled[data-v-72b8f219] {
|
|
453
453
|
cursor: default;
|
|
454
454
|
}
|
|
455
|
-
.bms-switch-icon-button__button--disabled .bms-switch-icon-button__button__icon-container[data-v-
|
|
455
|
+
.bms-switch-icon-button__button--disabled .bms-switch-icon-button__button__icon-container[data-v-72b8f219] {
|
|
456
456
|
background-color: var(--bms-field-disabled-background);
|
|
457
457
|
}
|
|
458
|
-
.bms-switch-icon-button__button--disabled .bms-switch-icon-button__button__icon[data-v-
|
|
459
|
-
.bms-switch-icon-button__button--disabled .bms-switch-icon-button__button__chevron[data-v-
|
|
458
|
+
.bms-switch-icon-button__button--disabled .bms-switch-icon-button__button__icon[data-v-72b8f219],
|
|
459
|
+
.bms-switch-icon-button__button--disabled .bms-switch-icon-button__button__chevron[data-v-72b8f219] {
|
|
460
460
|
color: var(--bms-field-disabled-text-color);
|
|
461
461
|
}
|
|
462
|
-
.bms-switch-icon-button__button--outlined .bms-switch-icon-button__button__icon-container[data-v-
|
|
462
|
+
.bms-switch-icon-button__button--outlined .bms-switch-icon-button__button__icon-container[data-v-72b8f219] {
|
|
463
463
|
background-color: inherit;
|
|
464
464
|
}
|
|
465
|
-
.bms-switch-icon-button__button--outlined .bms-switch-icon-button__button__icon[data-v-
|
|
465
|
+
.bms-switch-icon-button__button--outlined .bms-switch-icon-button__button__icon[data-v-72b8f219] {
|
|
466
466
|
color: var(--bms-main-100);
|
|
467
467
|
}
|
|
468
|
-
.bms-switch-icon-button__button__icon-container[data-v-
|
|
468
|
+
.bms-switch-icon-button__button__icon-container[data-v-72b8f219] {
|
|
469
469
|
display: flex;
|
|
470
470
|
align-items: center;
|
|
471
471
|
justify-content: center;
|
|
@@ -475,24 +475,24 @@
|
|
|
475
475
|
transition: background-color 0.2s;
|
|
476
476
|
background-color: var(--bms-main-100);
|
|
477
477
|
}
|
|
478
|
-
.bms-switch-icon-button__button:not(.bms-switch-icon-button__button--small) .bms-switch-icon-button__button__icon-container[data-v-
|
|
478
|
+
.bms-switch-icon-button__button:not(.bms-switch-icon-button__button--small) .bms-switch-icon-button__button__icon-container[data-v-72b8f219] {
|
|
479
479
|
width: 2.25em;
|
|
480
480
|
height: 2.25em;
|
|
481
481
|
}
|
|
482
|
-
.bms-switch-icon-button__button__icon[data-v-
|
|
482
|
+
.bms-switch-icon-button__button__icon[data-v-72b8f219] {
|
|
483
483
|
display: flex;
|
|
484
484
|
align-items: center;
|
|
485
485
|
justify-content: center;
|
|
486
486
|
color: var(--bms-white);
|
|
487
487
|
}
|
|
488
|
-
.bms-switch-icon-button__button__chevron[data-v-
|
|
488
|
+
.bms-switch-icon-button__button__chevron[data-v-72b8f219] {
|
|
489
489
|
display: flex;
|
|
490
490
|
align-items: center;
|
|
491
491
|
color: var(--bms-main-100);
|
|
492
492
|
flex-shrink: 0;
|
|
493
493
|
transition: color 0.2s;
|
|
494
494
|
}
|
|
495
|
-
.bms-switch-icon-button__menu[data-v-
|
|
495
|
+
.bms-switch-icon-button__menu[data-v-72b8f219] {
|
|
496
496
|
position: absolute;
|
|
497
497
|
background-color: var(--bms-white);
|
|
498
498
|
border: 1px solid var(--bms-border-color);
|
|
@@ -506,7 +506,7 @@
|
|
|
506
506
|
box-shadow: var(--bms-box-shadow-elevated);
|
|
507
507
|
width: max-content;
|
|
508
508
|
}
|
|
509
|
-
.bms-switch-icon-button__menu__item[data-v-
|
|
509
|
+
.bms-switch-icon-button__menu__item[data-v-72b8f219] {
|
|
510
510
|
min-height: 2.5em;
|
|
511
511
|
padding: 0.5em 1em;
|
|
512
512
|
display: flex;
|
|
@@ -517,27 +517,27 @@
|
|
|
517
517
|
width: 100%;
|
|
518
518
|
box-sizing: border-box;
|
|
519
519
|
}
|
|
520
|
-
.bms-switch-icon-button__menu__item[data-v-
|
|
520
|
+
.bms-switch-icon-button__menu__item[data-v-72b8f219]:hover {
|
|
521
521
|
background-color: light-dark(var(--bms-grey-10), var(--bms-grey-100));
|
|
522
522
|
}
|
|
523
|
-
.bms-switch-icon-button__menu__item__check[data-v-
|
|
523
|
+
.bms-switch-icon-button__menu__item__check[data-v-72b8f219] {
|
|
524
524
|
flex-shrink: 0;
|
|
525
525
|
color: var(--bms-font-color);
|
|
526
526
|
width: 1em;
|
|
527
527
|
height: 1em;
|
|
528
528
|
}
|
|
529
|
-
.bms-switch-icon-button__menu__item__check-placeholder[data-v-
|
|
529
|
+
.bms-switch-icon-button__menu__item__check-placeholder[data-v-72b8f219] {
|
|
530
530
|
width: 1em;
|
|
531
531
|
height: 1em;
|
|
532
532
|
flex-shrink: 0;
|
|
533
533
|
}
|
|
534
|
-
.bms-switch-icon-button__menu__item__icon[data-v-
|
|
534
|
+
.bms-switch-icon-button__menu__item__icon[data-v-72b8f219] {
|
|
535
535
|
flex-shrink: 0;
|
|
536
536
|
color: var(--bms-font-color);
|
|
537
537
|
width: 1em;
|
|
538
538
|
height: 1em;
|
|
539
539
|
}
|
|
540
|
-
.bms-switch-icon-button__menu__item__label[data-v-
|
|
540
|
+
.bms-switch-icon-button__menu__item__label[data-v-72b8f219] {
|
|
541
541
|
white-space: nowrap;
|
|
542
542
|
font-size: 0.875em;
|
|
543
543
|
color: var(--bms-font-color);
|
package/dist/sipa-bms-ui.es.js
CHANGED
|
@@ -55115,13 +55115,17 @@ var BmsSwitchIconButton_default = /*#__PURE__*/ _plugin_vue_export_helper_defaul
|
|
|
55115
55115
|
const props = __props;
|
|
55116
55116
|
const emits = __emit;
|
|
55117
55117
|
const isOpen = ref(false);
|
|
55118
|
+
const openUpward = ref(true);
|
|
55118
55119
|
const anchorElement = useTemplateRef("anchorElement");
|
|
55119
55120
|
const menuElement = useTemplateRef("menuElement");
|
|
55120
|
-
const { height } = useElementBounding(anchorElement);
|
|
55121
|
-
const menuStyle = computed(() =>
|
|
55121
|
+
const { height, top, bottom } = useElementBounding(anchorElement);
|
|
55122
|
+
const menuStyle = computed(() => openUpward.value ? { bottom: `${height.value}px` } : { top: `${height.value}px` });
|
|
55122
55123
|
const selectedOption = computed(() => props.options.find((option) => option.value === props.modelValue));
|
|
55123
55124
|
const toggleMenu = () => {
|
|
55124
|
-
if (!props.disabled)
|
|
55125
|
+
if (!props.disabled) {
|
|
55126
|
+
if (!isOpen.value) openUpward.value = top.value > window.innerHeight - bottom.value;
|
|
55127
|
+
isOpen.value = !isOpen.value;
|
|
55128
|
+
}
|
|
55125
55129
|
};
|
|
55126
55130
|
const selectOption = (value) => {
|
|
55127
55131
|
emits("update:modelValue", value);
|
|
@@ -55151,7 +55155,7 @@ var BmsSwitchIconButton_default = /*#__PURE__*/ _plugin_vue_export_helper_defaul
|
|
|
55151
55155
|
key: 0,
|
|
55152
55156
|
size: 16,
|
|
55153
55157
|
class: "bms-switch-icon-button__button__icon"
|
|
55154
|
-
})) : createCommentVNode("", true)]),
|
|
55158
|
+
})) : createCommentVNode("", true)]), openUpward.value !== isOpen.value ? (openBlock(), createBlock(unref(ChevronUp), {
|
|
55155
55159
|
key: 0,
|
|
55156
55160
|
size: 10,
|
|
55157
55161
|
class: "bms-switch-icon-button__button__chevron"
|
|
@@ -55185,7 +55189,7 @@ var BmsSwitchIconButton_default = /*#__PURE__*/ _plugin_vue_export_helper_defaul
|
|
|
55185
55189
|
}), 128))], 4), [[vShow, isOpen.value]])], 2);
|
|
55186
55190
|
};
|
|
55187
55191
|
}
|
|
55188
|
-
}), [["__scopeId", "data-v-
|
|
55192
|
+
}), [["__scopeId", "data-v-72b8f219"]]);
|
|
55189
55193
|
//#endregion
|
|
55190
55194
|
//#region src/components/feedback/BmsAlert.vue?vue&type=script&setup=true&lang.ts
|
|
55191
55195
|
var _hoisted_1$63 = { class: "info-line" };
|