@frollo/frollo-web-ui 9.0.7 → 9.0.9
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/cjs/index.js +53 -43
- package/esm/fw-navigation-menu.js +43 -32
- package/esm/fw-switch.js +8 -9
- package/frollo-web-ui.esm.js +53 -43
- package/index.d.ts +15 -4
- package/package.json +1 -1
- package/types/components/fw-navigation-menu/fw-navigation-menu.vue.d.ts +12 -0
- package/types/components/fw-navigation-menu/index.types.d.ts +1 -0
- package/types/components/fw-switch/fw-switch.vue.d.ts +2 -4
- package/web-components/index.js +55 -45
package/cjs/index.js
CHANGED
|
@@ -8524,7 +8524,7 @@ var _hoisted_12$3 = {
|
|
|
8524
8524
|
var _hoisted_13$3 = {
|
|
8525
8525
|
"class": "text-p text-body leading-none"
|
|
8526
8526
|
};
|
|
8527
|
-
var _hoisted_14$
|
|
8527
|
+
var _hoisted_14$3 = {
|
|
8528
8528
|
key: 0,
|
|
8529
8529
|
"class": "text-p-small text-body leading-none"
|
|
8530
8530
|
};
|
|
@@ -8588,7 +8588,7 @@ function render$s(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
8588
8588
|
key: 0,
|
|
8589
8589
|
src: option.image_url,
|
|
8590
8590
|
"class": "w-[20px] h-[20px]"
|
|
8591
|
-
}, null, 8, ["src"])) : vue.createCommentVNode("", true), vue.createElementVNode("div", _hoisted_12$3, [vue.createElementVNode("span", _hoisted_13$3, vue.toDisplayString(option.label), 1), option.description ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_14$
|
|
8591
|
+
}, null, 8, ["src"])) : vue.createCommentVNode("", true), vue.createElementVNode("div", _hoisted_12$3, [vue.createElementVNode("span", _hoisted_13$3, vue.toDisplayString(option.label), 1), option.description ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_14$3, vue.toDisplayString(option.description), 1)) : vue.createCommentVNode("", true)])])], 10, _hoisted_10$5);
|
|
8592
8592
|
}), 128))], 10, _hoisted_9$6), [[vue.vShow, _ctx.isOpen]])];
|
|
8593
8593
|
}),
|
|
8594
8594
|
_: 1
|
|
@@ -8647,7 +8647,7 @@ __default__$d.__scopeId = "data-v-4790b470";var script$i = vue.defineComponent({
|
|
|
8647
8647
|
/** v-model If provided, it is the source of truth. */
|
|
8648
8648
|
modelValue: {
|
|
8649
8649
|
type: Boolean,
|
|
8650
|
-
|
|
8650
|
+
"default": undefined
|
|
8651
8651
|
},
|
|
8652
8652
|
/**
|
|
8653
8653
|
* Progmatically set the checked state of the input.
|
|
@@ -8655,8 +8655,7 @@ __default__$d.__scopeId = "data-v-4790b470";var script$i = vue.defineComponent({
|
|
|
8655
8655
|
*/
|
|
8656
8656
|
isChecked: {
|
|
8657
8657
|
type: Boolean,
|
|
8658
|
-
required: false
|
|
8659
|
-
"default": false
|
|
8658
|
+
required: false
|
|
8660
8659
|
}
|
|
8661
8660
|
},
|
|
8662
8661
|
emits: ['change', 'update:modelValue', 'update:isChecked'],
|
|
@@ -8666,14 +8665,14 @@ __default__$d.__scopeId = "data-v-4790b470";var script$i = vue.defineComponent({
|
|
|
8666
8665
|
vue.watch(function () {
|
|
8667
8666
|
return props.modelValue;
|
|
8668
8667
|
}, function (val) {
|
|
8669
|
-
if (val && val !== localChecked.value) {
|
|
8668
|
+
if (val !== undefined && val !== localChecked.value) {
|
|
8670
8669
|
localChecked.value = val;
|
|
8671
8670
|
}
|
|
8672
8671
|
});
|
|
8673
8672
|
vue.watch(function () {
|
|
8674
8673
|
return props.isChecked;
|
|
8675
8674
|
}, function (val) {
|
|
8676
|
-
if (
|
|
8675
|
+
if (val !== localChecked.value) {
|
|
8677
8676
|
localChecked.value = val;
|
|
8678
8677
|
}
|
|
8679
8678
|
});
|
|
@@ -8691,7 +8690,7 @@ __default__$d.__scopeId = "data-v-4790b470";var script$i = vue.defineComponent({
|
|
|
8691
8690
|
// always emit change
|
|
8692
8691
|
ctx.emit('change', next);
|
|
8693
8692
|
// if using v-model, update it
|
|
8694
|
-
ctx.emit('update:modelValue', next);
|
|
8693
|
+
if (props.modelValue !== undefined) ctx.emit('update:modelValue', next);
|
|
8695
8694
|
// keep legacy API in sync too
|
|
8696
8695
|
ctx.emit('update:isChecked', next);
|
|
8697
8696
|
};
|
|
@@ -8762,10 +8761,10 @@ function render$r(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
8762
8761
|
}),
|
|
8763
8762
|
_: 1
|
|
8764
8763
|
}, 8, ["name", "value", "rules"]);
|
|
8765
|
-
}var css_248z$k = ".fw-switch[data-v-
|
|
8766
|
-
var stylesheet$k = ".fw-switch[data-v-
|
|
8764
|
+
}var css_248z$k = ".fw-switch[data-v-08b12caa]{-webkit-box-align:center;-moz-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;border-radius:9999px;cursor:pointer;display:-webkit-inline-box;display:-webkit-inline-flex;display:-moz-inline-box;display:-ms-inline-flexbox;display:inline-flex}.fwFadeIn-enter-active[data-v-08b12caa]{-webkit-animation:fwFadeIn-08b12caa .35s;-moz-animation:fwFadeIn-08b12caa .35s;animation:fwFadeIn-08b12caa .35s;-webkit-transition:opacity .35s ease-in;-moz-transition:opacity .35s ease-in;transition:opacity .35s ease-in}.fwFadeIn-leave-active[data-v-08b12caa]{animation:fwFadeIn-08b12caa .35s reverse;-webkit-transition:opacity .35s ease-out;-moz-transition:opacity .35s ease-out;transition:opacity .35s ease-out}@-webkit-keyframes fwFadeIn-08b12caa{0%{opacity:0}to{opacity:1}}@-moz-keyframes fwFadeIn-08b12caa{0%{opacity:0}to{opacity:1}}@keyframes fwFadeIn-08b12caa{0%{opacity:0}to{opacity:1}}";
|
|
8765
|
+
var stylesheet$k = ".fw-switch[data-v-08b12caa]{-webkit-box-align:center;-moz-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;border-radius:9999px;cursor:pointer;display:-webkit-inline-box;display:-webkit-inline-flex;display:-moz-inline-box;display:-ms-inline-flexbox;display:inline-flex}.fwFadeIn-enter-active[data-v-08b12caa]{-webkit-animation:fwFadeIn-08b12caa .35s;-moz-animation:fwFadeIn-08b12caa .35s;animation:fwFadeIn-08b12caa .35s;-webkit-transition:opacity .35s ease-in;-moz-transition:opacity .35s ease-in;transition:opacity .35s ease-in}.fwFadeIn-leave-active[data-v-08b12caa]{animation:fwFadeIn-08b12caa .35s reverse;-webkit-transition:opacity .35s ease-out;-moz-transition:opacity .35s ease-out;transition:opacity .35s ease-out}@-webkit-keyframes fwFadeIn-08b12caa{0%{opacity:0}to{opacity:1}}@-moz-keyframes fwFadeIn-08b12caa{0%{opacity:0}to{opacity:1}}@keyframes fwFadeIn-08b12caa{0%{opacity:0}to{opacity:1}}";
|
|
8767
8766
|
styleInject(css_248z$k);script$i.render = render$r;
|
|
8768
|
-
script$i.__scopeId = "data-v-
|
|
8767
|
+
script$i.__scopeId = "data-v-08b12caa";var __default__$c = vue.defineComponent({
|
|
8769
8768
|
name: 'FwCard',
|
|
8770
8769
|
props: {
|
|
8771
8770
|
/**
|
|
@@ -11322,6 +11321,12 @@ __default__$b.__scopeId = "data-v-6c5e1ef8";var script$f = vue.defineComponent({
|
|
|
11322
11321
|
reversedDesktopNavButton: {
|
|
11323
11322
|
type: Boolean,
|
|
11324
11323
|
"default": false
|
|
11324
|
+
},
|
|
11325
|
+
/**
|
|
11326
|
+
* Whether to force the logo to be displayed (forced for mobile themes that don't need a menu)
|
|
11327
|
+
*/
|
|
11328
|
+
forcedLogoSrc: {
|
|
11329
|
+
type: String
|
|
11325
11330
|
}
|
|
11326
11331
|
},
|
|
11327
11332
|
emits: ['action'],
|
|
@@ -11367,26 +11372,27 @@ __default__$b.__scopeId = "data-v-6c5e1ef8";var script$f = vue.defineComponent({
|
|
|
11367
11372
|
actionClicked: actionClicked
|
|
11368
11373
|
};
|
|
11369
11374
|
}
|
|
11370
|
-
});var _hoisted_1$u =
|
|
11371
|
-
|
|
11375
|
+
});var _hoisted_1$u = ["src"];
|
|
11376
|
+
var _hoisted_2$q = {
|
|
11377
|
+
key: 1,
|
|
11372
11378
|
"class": "hidden lg:!flex flex-shrink-0 items-center"
|
|
11373
11379
|
};
|
|
11374
|
-
var
|
|
11375
|
-
var _hoisted_3$m = {
|
|
11376
|
-
"class": "flex space-x-1"
|
|
11377
|
-
};
|
|
11380
|
+
var _hoisted_3$m = ["src"];
|
|
11378
11381
|
var _hoisted_4$c = {
|
|
11379
|
-
|
|
11380
|
-
"class": "hidden lg:flex items-center justify-center lg:ml-2"
|
|
11382
|
+
"class": "flex space-x-1 ml-auto"
|
|
11381
11383
|
};
|
|
11382
11384
|
var _hoisted_5$b = {
|
|
11383
|
-
|
|
11385
|
+
key: 3,
|
|
11386
|
+
"class": "hidden lg:flex items-center justify-center lg:ml-2"
|
|
11384
11387
|
};
|
|
11385
11388
|
var _hoisted_6$9 = {
|
|
11386
|
-
|
|
11387
|
-
"class": "flex items-center lg:hidden z-[53]"
|
|
11389
|
+
"class": "flex flex-col min-w-[180px] text-left"
|
|
11388
11390
|
};
|
|
11389
11391
|
var _hoisted_7$7 = {
|
|
11392
|
+
key: 4,
|
|
11393
|
+
"class": "flex items-center lg:hidden z-[53]"
|
|
11394
|
+
};
|
|
11395
|
+
var _hoisted_8$6 = {
|
|
11390
11396
|
"class": "block h-6 w-6",
|
|
11391
11397
|
xmlns: "http://www.w3.org/2000/svg",
|
|
11392
11398
|
fill: "none",
|
|
@@ -11394,20 +11400,20 @@ var _hoisted_7$7 = {
|
|
|
11394
11400
|
stroke: "currentColor",
|
|
11395
11401
|
"aria-hidden": "true"
|
|
11396
11402
|
};
|
|
11397
|
-
var
|
|
11398
|
-
var
|
|
11403
|
+
var _hoisted_9$5 = ["d"];
|
|
11404
|
+
var _hoisted_10$4 = {
|
|
11399
11405
|
key: 0,
|
|
11400
11406
|
"class": "flex-none lg:hidden items-start flex-shrink-0 pl-4"
|
|
11401
11407
|
};
|
|
11402
|
-
var
|
|
11403
|
-
var
|
|
11408
|
+
var _hoisted_11$3 = ["src"];
|
|
11409
|
+
var _hoisted_12$2 = {
|
|
11404
11410
|
key: 1,
|
|
11405
11411
|
"class": "w-full flex flex-col space-y-1 pt-6"
|
|
11406
11412
|
};
|
|
11407
|
-
var
|
|
11413
|
+
var _hoisted_13$2 = {
|
|
11408
11414
|
"class": "flex flex-col justify-between pt-6 h-full"
|
|
11409
11415
|
};
|
|
11410
|
-
var
|
|
11416
|
+
var _hoisted_14$2 = {
|
|
11411
11417
|
key: 0,
|
|
11412
11418
|
"class": "w-full flex flex-col space-y-1"
|
|
11413
11419
|
};
|
|
@@ -11417,22 +11423,26 @@ function render$m(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
11417
11423
|
var _component_UserSvg = vue.resolveComponent("UserSvg");
|
|
11418
11424
|
var _component_FwPopover = vue.resolveComponent("FwPopover");
|
|
11419
11425
|
return vue.openBlock(), vue.createElementBlock("nav", {
|
|
11420
|
-
"class": vue.normalizeClass(["fw-nav-menu z-50 h-[72px] bg-white shadow-bottom", [_ctx.transparent ? 'lg:bg-transparent lg:shadow-none' : 'lg:bg-brand-appBg lg:shadow-bottom', _ctx.isMobileMenuOpen ? 'bg-transparent' : '']])
|
|
11426
|
+
"class": vue.normalizeClass(["fw-nav-menu z-50 h-[72px] bg-white shadow-bottom", [_ctx.transparent ? 'lg:bg-transparent lg:shadow-none' : 'lg:bg-brand-appBg lg:shadow-bottom', _ctx.isMobileMenuOpen ? 'bg-transparent' : '', !!_ctx.forcedLogoSrc ? '!bg-transparent !shadow-none' : '']])
|
|
11421
11427
|
}, [vue.createElementVNode("div", {
|
|
11422
11428
|
"class": vue.normalizeClass(["px-6 lg:py-3 flex-1 h-full flex items-stretch justify-between mx-auto", [_ctx.containerClass, !_ctx.menuEnabled ? 'hidden lg:flex' : '']])
|
|
11423
|
-
}, [_ctx
|
|
11429
|
+
}, [!!_ctx.forcedLogoSrc ? (vue.openBlock(), vue.createElementBlock("img", {
|
|
11430
|
+
key: 0,
|
|
11431
|
+
src: _ctx.forcedLogoSrc,
|
|
11432
|
+
"class": "w-[42px]"
|
|
11433
|
+
}, null, 8, _hoisted_1$u)) : _ctx.$slots.logo || _ctx.logoSrc ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$q, [_ctx.$slots.logo ? vue.renderSlot(_ctx.$slots, "logo", {
|
|
11424
11434
|
key: 0
|
|
11425
11435
|
}) : _ctx.logoSrc ? (vue.openBlock(), vue.createElementBlock("img", {
|
|
11426
11436
|
key: 1,
|
|
11427
11437
|
src: _ctx.logoSrc,
|
|
11428
11438
|
"class": "w-[42px]"
|
|
11429
|
-
}, null, 8,
|
|
11430
|
-
key:
|
|
11431
|
-
"class": vue.normalizeClass(["container
|
|
11439
|
+
}, null, 8, _hoisted_3$m)) : vue.createCommentVNode("", true)])) : vue.createCommentVNode("", true), _ctx.menuEnabled && _ctx.parsedMenuItems && ((_ctx$parsedMenuItems = _ctx.parsedMenuItems) === null || _ctx$parsedMenuItems === void 0 ? void 0 : _ctx$parsedMenuItems.length) > 0 ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
11440
|
+
key: 2,
|
|
11441
|
+
"class": vue.normalizeClass(["container items-center justify-between", [_ctx.paddingClasses, !!_ctx.forcedLogoSrc ? 'flex' : 'hidden lg:flex']])
|
|
11432
11442
|
}, [_cache[1] || (_cache[1] = vue.createElementVNode("div", {
|
|
11433
11443
|
id: "menu-teleport",
|
|
11434
11444
|
"class": "hidden lg:flex items-center gap-x-2"
|
|
11435
|
-
}, null, -1)), vue.createElementVNode("div",
|
|
11445
|
+
}, null, -1)), vue.createElementVNode("div", _hoisted_4$c, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.parsedMenuItems, function (item, i) {
|
|
11436
11446
|
return vue.openBlock(), vue.createBlock(_component_FwButton, {
|
|
11437
11447
|
key: i,
|
|
11438
11448
|
variant: "transparent",
|
|
@@ -11450,13 +11460,13 @@ function render$m(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
11450
11460
|
}),
|
|
11451
11461
|
_: 2
|
|
11452
11462
|
}, 1032, ["class", "href", "to", "external", "onClick"]);
|
|
11453
|
-
}), 128))])], 2)) : vue.createCommentVNode("", true), _ctx.menuEnabled && _ctx.actionLabel && _ctx.authenticated ? (vue.openBlock(), vue.createElementBlock("div",
|
|
11463
|
+
}), 128))])], 2)) : vue.createCommentVNode("", true), _ctx.menuEnabled && _ctx.actionLabel && _ctx.authenticated ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$b, [vue.createVNode(_component_FwPopover, {
|
|
11454
11464
|
placement: "bottom-start",
|
|
11455
11465
|
"show-on-top": "",
|
|
11456
11466
|
trigger: "click"
|
|
11457
11467
|
}, {
|
|
11458
11468
|
content: vue.withCtx(function () {
|
|
11459
|
-
return [vue.createElementVNode("div",
|
|
11469
|
+
return [vue.createElementVNode("div", _hoisted_6$9, [vue.createVNode(_component_FwButton, {
|
|
11460
11470
|
size: "lg",
|
|
11461
11471
|
variant: "text",
|
|
11462
11472
|
rounded: false,
|
|
@@ -11486,7 +11496,7 @@ function render$m(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
11486
11496
|
})];
|
|
11487
11497
|
}),
|
|
11488
11498
|
_: 1
|
|
11489
|
-
})])) : vue.createCommentVNode("", true), _ctx.menuEnabled ? (vue.openBlock(), vue.createElementBlock("div",
|
|
11499
|
+
})])) : vue.createCommentVNode("", true), _ctx.menuEnabled && !_ctx.forcedLogoSrc ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7$7, [vue.createVNode(_component_FwButton, {
|
|
11490
11500
|
variant: _ctx.isMobileMenuOpen ? 'primary' : 'tertiary',
|
|
11491
11501
|
size: "sm",
|
|
11492
11502
|
rounded: false,
|
|
@@ -11496,18 +11506,18 @@ function render$m(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
11496
11506
|
"default": vue.withCtx(function () {
|
|
11497
11507
|
return [_cache[2] || (_cache[2] = vue.createElementVNode("span", {
|
|
11498
11508
|
"class": "sr-only"
|
|
11499
|
-
}, "Open main menu", -1)), (vue.openBlock(), vue.createElementBlock("svg",
|
|
11509
|
+
}, "Open main menu", -1)), (vue.openBlock(), vue.createElementBlock("svg", _hoisted_8$6, [vue.createElementVNode("path", {
|
|
11500
11510
|
"stroke-linecap": "round",
|
|
11501
11511
|
"stroke-linejoin": "round",
|
|
11502
11512
|
"stroke-width": "2",
|
|
11503
11513
|
d: _ctx.isMobileMenuOpen ? 'M6 18L18 6M6 6l12 12' : 'M4 6h16M4 12h16M4 18h16'
|
|
11504
|
-
}, null, 8,
|
|
11514
|
+
}, null, 8, _hoisted_9$5)]))];
|
|
11505
11515
|
}),
|
|
11506
11516
|
_: 1
|
|
11507
11517
|
}, 8, ["variant", "class", "onClick"])])) : vue.createCommentVNode("", true)], 2), _cache[4] || (_cache[4] = vue.createElementVNode("div", {
|
|
11508
11518
|
id: "menu-search-teleport",
|
|
11509
11519
|
"class": "absolute top-0 left-0 w-full z-[54]"
|
|
11510
|
-
}, null, -1)), _ctx.menuEnabled ? (vue.openBlock(), vue.createBlock(vue.Transition, {
|
|
11520
|
+
}, null, -1)), _ctx.menuEnabled && !_ctx.forcedLogoSrc ? (vue.openBlock(), vue.createBlock(vue.Transition, {
|
|
11511
11521
|
key: 0,
|
|
11512
11522
|
name: "slideInRight"
|
|
11513
11523
|
}, {
|
|
@@ -11515,13 +11525,13 @@ function render$m(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
11515
11525
|
return [_ctx.parsedMenuItems && _ctx.parsedMenuItems.length > 0 && _ctx.isMobileMenuOpen ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
11516
11526
|
key: 0,
|
|
11517
11527
|
"class": vue.normalizeClass(["fw-nav-menu--mobile pl-6 pb-12", _ctx.mobileMenuClass])
|
|
11518
|
-
}, [_ctx.$slots.mobileLogo || _ctx.mobileLogoSrc ? (vue.openBlock(), vue.createElementBlock("div",
|
|
11528
|
+
}, [_ctx.$slots.mobileLogo || _ctx.mobileLogoSrc ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_10$4, [_ctx.$slots.mobileLogo ? vue.renderSlot(_ctx.$slots, "mobileLogo", {
|
|
11519
11529
|
key: 0
|
|
11520
11530
|
}) : _ctx.mobileLogoSrc ? (vue.openBlock(), vue.createElementBlock("img", {
|
|
11521
11531
|
key: 1,
|
|
11522
11532
|
src: _ctx.mobileLogoSrc,
|
|
11523
11533
|
"class": "w-[42px]"
|
|
11524
|
-
}, null, 8,
|
|
11534
|
+
}, null, 8, _hoisted_11$3)) : vue.createCommentVNode("", true)])) : vue.createCommentVNode("", true), _ctx.parsedAdditionalMenuItems ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_12$2, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.parsedAdditionalMenuItems, function (item, i) {
|
|
11525
11535
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
11526
11536
|
key: i
|
|
11527
11537
|
}, [!item.disabled ? (vue.openBlock(), vue.createBlock(_component_FwButton, {
|
|
@@ -11544,7 +11554,7 @@ function render$m(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
11544
11554
|
}, 1032, ["href", "to", "external", "onClick"])) : vue.createCommentVNode("", true)], 64);
|
|
11545
11555
|
}), 128)), _cache[3] || (_cache[3] = vue.createElementVNode("div", {
|
|
11546
11556
|
"class": "w-[50px] relative bg-brand-border3 h-px !mt-6 ml-2"
|
|
11547
|
-
}, null, -1))])) : vue.createCommentVNode("", true), vue.createElementVNode("div",
|
|
11557
|
+
}, null, -1))])) : vue.createCommentVNode("", true), vue.createElementVNode("div", _hoisted_13$2, [_ctx.menuEnabled ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_14$2, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.parsedMenuItems, function (item, i) {
|
|
11548
11558
|
return vue.openBlock(), vue.createBlock(_component_FwButton, {
|
|
11549
11559
|
key: i,
|
|
11550
11560
|
"class": "w-full rounded-md !text-left !pl-2",
|
|
@@ -87,6 +87,12 @@ var script = defineComponent({
|
|
|
87
87
|
reversedDesktopNavButton: {
|
|
88
88
|
type: Boolean,
|
|
89
89
|
"default": false
|
|
90
|
+
},
|
|
91
|
+
/**
|
|
92
|
+
* Whether to force the logo to be displayed (forced for mobile themes that don't need a menu)
|
|
93
|
+
*/
|
|
94
|
+
forcedLogoSrc: {
|
|
95
|
+
type: String
|
|
90
96
|
}
|
|
91
97
|
},
|
|
92
98
|
emits: ['action'],
|
|
@@ -134,26 +140,27 @@ var script = defineComponent({
|
|
|
134
140
|
}
|
|
135
141
|
});
|
|
136
142
|
|
|
137
|
-
var _hoisted_1 =
|
|
138
|
-
|
|
143
|
+
var _hoisted_1 = ["src"];
|
|
144
|
+
var _hoisted_2 = {
|
|
145
|
+
key: 1,
|
|
139
146
|
"class": "hidden lg:!flex flex-shrink-0 items-center"
|
|
140
147
|
};
|
|
141
|
-
var
|
|
142
|
-
var _hoisted_3 = {
|
|
143
|
-
"class": "flex space-x-1"
|
|
144
|
-
};
|
|
148
|
+
var _hoisted_3 = ["src"];
|
|
145
149
|
var _hoisted_4 = {
|
|
146
|
-
|
|
147
|
-
"class": "hidden lg:flex items-center justify-center lg:ml-2"
|
|
150
|
+
"class": "flex space-x-1 ml-auto"
|
|
148
151
|
};
|
|
149
152
|
var _hoisted_5 = {
|
|
150
|
-
|
|
153
|
+
key: 3,
|
|
154
|
+
"class": "hidden lg:flex items-center justify-center lg:ml-2"
|
|
151
155
|
};
|
|
152
156
|
var _hoisted_6 = {
|
|
153
|
-
|
|
154
|
-
"class": "flex items-center lg:hidden z-[53]"
|
|
157
|
+
"class": "flex flex-col min-w-[180px] text-left"
|
|
155
158
|
};
|
|
156
159
|
var _hoisted_7 = {
|
|
160
|
+
key: 4,
|
|
161
|
+
"class": "flex items-center lg:hidden z-[53]"
|
|
162
|
+
};
|
|
163
|
+
var _hoisted_8 = {
|
|
157
164
|
"class": "block h-6 w-6",
|
|
158
165
|
xmlns: "http://www.w3.org/2000/svg",
|
|
159
166
|
fill: "none",
|
|
@@ -161,20 +168,20 @@ var _hoisted_7 = {
|
|
|
161
168
|
stroke: "currentColor",
|
|
162
169
|
"aria-hidden": "true"
|
|
163
170
|
};
|
|
164
|
-
var
|
|
165
|
-
var
|
|
171
|
+
var _hoisted_9 = ["d"];
|
|
172
|
+
var _hoisted_10 = {
|
|
166
173
|
key: 0,
|
|
167
174
|
"class": "flex-none lg:hidden items-start flex-shrink-0 pl-4"
|
|
168
175
|
};
|
|
169
|
-
var
|
|
170
|
-
var
|
|
176
|
+
var _hoisted_11 = ["src"];
|
|
177
|
+
var _hoisted_12 = {
|
|
171
178
|
key: 1,
|
|
172
179
|
"class": "w-full flex flex-col space-y-1 pt-6"
|
|
173
180
|
};
|
|
174
|
-
var
|
|
181
|
+
var _hoisted_13 = {
|
|
175
182
|
"class": "flex flex-col justify-between pt-6 h-full"
|
|
176
183
|
};
|
|
177
|
-
var
|
|
184
|
+
var _hoisted_14 = {
|
|
178
185
|
key: 0,
|
|
179
186
|
"class": "w-full flex flex-col space-y-1"
|
|
180
187
|
};
|
|
@@ -184,22 +191,26 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
184
191
|
var _component_UserSvg = resolveComponent("UserSvg");
|
|
185
192
|
var _component_FwPopover = resolveComponent("FwPopover");
|
|
186
193
|
return openBlock(), createElementBlock("nav", {
|
|
187
|
-
"class": normalizeClass(["fw-nav-menu z-50 h-[72px] bg-white shadow-bottom", [_ctx.transparent ? 'lg:bg-transparent lg:shadow-none' : 'lg:bg-brand-appBg lg:shadow-bottom', _ctx.isMobileMenuOpen ? 'bg-transparent' : '']])
|
|
194
|
+
"class": normalizeClass(["fw-nav-menu z-50 h-[72px] bg-white shadow-bottom", [_ctx.transparent ? 'lg:bg-transparent lg:shadow-none' : 'lg:bg-brand-appBg lg:shadow-bottom', _ctx.isMobileMenuOpen ? 'bg-transparent' : '', !!_ctx.forcedLogoSrc ? '!bg-transparent !shadow-none' : '']])
|
|
188
195
|
}, [createElementVNode("div", {
|
|
189
196
|
"class": normalizeClass(["px-6 lg:py-3 flex-1 h-full flex items-stretch justify-between mx-auto", [_ctx.containerClass, !_ctx.menuEnabled ? 'hidden lg:flex' : '']])
|
|
190
|
-
}, [_ctx
|
|
197
|
+
}, [!!_ctx.forcedLogoSrc ? (openBlock(), createElementBlock("img", {
|
|
198
|
+
key: 0,
|
|
199
|
+
src: _ctx.forcedLogoSrc,
|
|
200
|
+
"class": "w-[42px]"
|
|
201
|
+
}, null, 8, _hoisted_1)) : _ctx.$slots.logo || _ctx.logoSrc ? (openBlock(), createElementBlock("div", _hoisted_2, [_ctx.$slots.logo ? renderSlot(_ctx.$slots, "logo", {
|
|
191
202
|
key: 0
|
|
192
203
|
}) : _ctx.logoSrc ? (openBlock(), createElementBlock("img", {
|
|
193
204
|
key: 1,
|
|
194
205
|
src: _ctx.logoSrc,
|
|
195
206
|
"class": "w-[42px]"
|
|
196
|
-
}, null, 8,
|
|
197
|
-
key:
|
|
198
|
-
"class": normalizeClass(["container
|
|
207
|
+
}, null, 8, _hoisted_3)) : createCommentVNode("", true)])) : createCommentVNode("", true), _ctx.menuEnabled && _ctx.parsedMenuItems && ((_ctx$parsedMenuItems = _ctx.parsedMenuItems) === null || _ctx$parsedMenuItems === void 0 ? void 0 : _ctx$parsedMenuItems.length) > 0 ? (openBlock(), createElementBlock("div", {
|
|
208
|
+
key: 2,
|
|
209
|
+
"class": normalizeClass(["container items-center justify-between", [_ctx.paddingClasses, !!_ctx.forcedLogoSrc ? 'flex' : 'hidden lg:flex']])
|
|
199
210
|
}, [_cache[1] || (_cache[1] = createElementVNode("div", {
|
|
200
211
|
id: "menu-teleport",
|
|
201
212
|
"class": "hidden lg:flex items-center gap-x-2"
|
|
202
|
-
}, null, -1)), createElementVNode("div",
|
|
213
|
+
}, null, -1)), createElementVNode("div", _hoisted_4, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.parsedMenuItems, function (item, i) {
|
|
203
214
|
return openBlock(), createBlock(_component_FwButton, {
|
|
204
215
|
key: i,
|
|
205
216
|
variant: "transparent",
|
|
@@ -217,13 +228,13 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
217
228
|
}),
|
|
218
229
|
_: 2
|
|
219
230
|
}, 1032, ["class", "href", "to", "external", "onClick"]);
|
|
220
|
-
}), 128))])], 2)) : createCommentVNode("", true), _ctx.menuEnabled && _ctx.actionLabel && _ctx.authenticated ? (openBlock(), createElementBlock("div",
|
|
231
|
+
}), 128))])], 2)) : createCommentVNode("", true), _ctx.menuEnabled && _ctx.actionLabel && _ctx.authenticated ? (openBlock(), createElementBlock("div", _hoisted_5, [createVNode(_component_FwPopover, {
|
|
221
232
|
placement: "bottom-start",
|
|
222
233
|
"show-on-top": "",
|
|
223
234
|
trigger: "click"
|
|
224
235
|
}, {
|
|
225
236
|
content: withCtx(function () {
|
|
226
|
-
return [createElementVNode("div",
|
|
237
|
+
return [createElementVNode("div", _hoisted_6, [createVNode(_component_FwButton, {
|
|
227
238
|
size: "lg",
|
|
228
239
|
variant: "text",
|
|
229
240
|
rounded: false,
|
|
@@ -253,7 +264,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
253
264
|
})];
|
|
254
265
|
}),
|
|
255
266
|
_: 1
|
|
256
|
-
})])) : createCommentVNode("", true), _ctx.menuEnabled ? (openBlock(), createElementBlock("div",
|
|
267
|
+
})])) : createCommentVNode("", true), _ctx.menuEnabled && !_ctx.forcedLogoSrc ? (openBlock(), createElementBlock("div", _hoisted_7, [createVNode(_component_FwButton, {
|
|
257
268
|
variant: _ctx.isMobileMenuOpen ? 'primary' : 'tertiary',
|
|
258
269
|
size: "sm",
|
|
259
270
|
rounded: false,
|
|
@@ -263,18 +274,18 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
263
274
|
"default": withCtx(function () {
|
|
264
275
|
return [_cache[2] || (_cache[2] = createElementVNode("span", {
|
|
265
276
|
"class": "sr-only"
|
|
266
|
-
}, "Open main menu", -1)), (openBlock(), createElementBlock("svg",
|
|
277
|
+
}, "Open main menu", -1)), (openBlock(), createElementBlock("svg", _hoisted_8, [createElementVNode("path", {
|
|
267
278
|
"stroke-linecap": "round",
|
|
268
279
|
"stroke-linejoin": "round",
|
|
269
280
|
"stroke-width": "2",
|
|
270
281
|
d: _ctx.isMobileMenuOpen ? 'M6 18L18 6M6 6l12 12' : 'M4 6h16M4 12h16M4 18h16'
|
|
271
|
-
}, null, 8,
|
|
282
|
+
}, null, 8, _hoisted_9)]))];
|
|
272
283
|
}),
|
|
273
284
|
_: 1
|
|
274
285
|
}, 8, ["variant", "class", "onClick"])])) : createCommentVNode("", true)], 2), _cache[4] || (_cache[4] = createElementVNode("div", {
|
|
275
286
|
id: "menu-search-teleport",
|
|
276
287
|
"class": "absolute top-0 left-0 w-full z-[54]"
|
|
277
|
-
}, null, -1)), _ctx.menuEnabled ? (openBlock(), createBlock(Transition, {
|
|
288
|
+
}, null, -1)), _ctx.menuEnabled && !_ctx.forcedLogoSrc ? (openBlock(), createBlock(Transition, {
|
|
278
289
|
key: 0,
|
|
279
290
|
name: "slideInRight"
|
|
280
291
|
}, {
|
|
@@ -282,13 +293,13 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
282
293
|
return [_ctx.parsedMenuItems && _ctx.parsedMenuItems.length > 0 && _ctx.isMobileMenuOpen ? (openBlock(), createElementBlock("div", {
|
|
283
294
|
key: 0,
|
|
284
295
|
"class": normalizeClass(["fw-nav-menu--mobile pl-6 pb-12", _ctx.mobileMenuClass])
|
|
285
|
-
}, [_ctx.$slots.mobileLogo || _ctx.mobileLogoSrc ? (openBlock(), createElementBlock("div",
|
|
296
|
+
}, [_ctx.$slots.mobileLogo || _ctx.mobileLogoSrc ? (openBlock(), createElementBlock("div", _hoisted_10, [_ctx.$slots.mobileLogo ? renderSlot(_ctx.$slots, "mobileLogo", {
|
|
286
297
|
key: 0
|
|
287
298
|
}) : _ctx.mobileLogoSrc ? (openBlock(), createElementBlock("img", {
|
|
288
299
|
key: 1,
|
|
289
300
|
src: _ctx.mobileLogoSrc,
|
|
290
301
|
"class": "w-[42px]"
|
|
291
|
-
}, null, 8,
|
|
302
|
+
}, null, 8, _hoisted_11)) : createCommentVNode("", true)])) : createCommentVNode("", true), _ctx.parsedAdditionalMenuItems ? (openBlock(), createElementBlock("div", _hoisted_12, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.parsedAdditionalMenuItems, function (item, i) {
|
|
292
303
|
return openBlock(), createElementBlock(Fragment, {
|
|
293
304
|
key: i
|
|
294
305
|
}, [!item.disabled ? (openBlock(), createBlock(_component_FwButton, {
|
|
@@ -311,7 +322,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
311
322
|
}, 1032, ["href", "to", "external", "onClick"])) : createCommentVNode("", true)], 64);
|
|
312
323
|
}), 128)), _cache[3] || (_cache[3] = createElementVNode("div", {
|
|
313
324
|
"class": "w-[50px] relative bg-brand-border3 h-px !mt-6 ml-2"
|
|
314
|
-
}, null, -1))])) : createCommentVNode("", true), createElementVNode("div",
|
|
325
|
+
}, null, -1))])) : createCommentVNode("", true), createElementVNode("div", _hoisted_13, [_ctx.menuEnabled ? (openBlock(), createElementBlock("div", _hoisted_14, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.parsedMenuItems, function (item, i) {
|
|
315
326
|
return openBlock(), createBlock(_component_FwButton, {
|
|
316
327
|
key: i,
|
|
317
328
|
"class": "w-full rounded-md !text-left !pl-2",
|
package/esm/fw-switch.js
CHANGED
|
@@ -45,7 +45,7 @@ var script = defineComponent({
|
|
|
45
45
|
/** v-model If provided, it is the source of truth. */
|
|
46
46
|
modelValue: {
|
|
47
47
|
type: Boolean,
|
|
48
|
-
|
|
48
|
+
"default": undefined
|
|
49
49
|
},
|
|
50
50
|
/**
|
|
51
51
|
* Progmatically set the checked state of the input.
|
|
@@ -53,8 +53,7 @@ var script = defineComponent({
|
|
|
53
53
|
*/
|
|
54
54
|
isChecked: {
|
|
55
55
|
type: Boolean,
|
|
56
|
-
required: false
|
|
57
|
-
"default": false
|
|
56
|
+
required: false
|
|
58
57
|
}
|
|
59
58
|
},
|
|
60
59
|
emits: ['change', 'update:modelValue', 'update:isChecked'],
|
|
@@ -64,14 +63,14 @@ var script = defineComponent({
|
|
|
64
63
|
watch(function () {
|
|
65
64
|
return props.modelValue;
|
|
66
65
|
}, function (val) {
|
|
67
|
-
if (val && val !== localChecked.value) {
|
|
66
|
+
if (val !== undefined && val !== localChecked.value) {
|
|
68
67
|
localChecked.value = val;
|
|
69
68
|
}
|
|
70
69
|
});
|
|
71
70
|
watch(function () {
|
|
72
71
|
return props.isChecked;
|
|
73
72
|
}, function (val) {
|
|
74
|
-
if (
|
|
73
|
+
if (val !== localChecked.value) {
|
|
75
74
|
localChecked.value = val;
|
|
76
75
|
}
|
|
77
76
|
});
|
|
@@ -89,7 +88,7 @@ var script = defineComponent({
|
|
|
89
88
|
// always emit change
|
|
90
89
|
ctx.emit('change', next);
|
|
91
90
|
// if using v-model, update it
|
|
92
|
-
ctx.emit('update:modelValue', next);
|
|
91
|
+
if (props.modelValue !== undefined) ctx.emit('update:modelValue', next);
|
|
93
92
|
// keep legacy API in sync too
|
|
94
93
|
ctx.emit('update:isChecked', next);
|
|
95
94
|
};
|
|
@@ -164,11 +163,11 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
164
163
|
}, 8, ["name", "value", "rules"]);
|
|
165
164
|
}
|
|
166
165
|
|
|
167
|
-
var css_248z = ".fw-switch[data-v-
|
|
168
|
-
var stylesheet = ".fw-switch[data-v-
|
|
166
|
+
var css_248z = ".fw-switch[data-v-08b12caa]{-webkit-box-align:center;-moz-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;border-radius:9999px;cursor:pointer;display:-webkit-inline-box;display:-webkit-inline-flex;display:-moz-inline-box;display:-ms-inline-flexbox;display:inline-flex}.fwFadeIn-enter-active[data-v-08b12caa]{-webkit-animation:fwFadeIn-08b12caa .35s;-moz-animation:fwFadeIn-08b12caa .35s;animation:fwFadeIn-08b12caa .35s;-webkit-transition:opacity .35s ease-in;-moz-transition:opacity .35s ease-in;transition:opacity .35s ease-in}.fwFadeIn-leave-active[data-v-08b12caa]{animation:fwFadeIn-08b12caa .35s reverse;-webkit-transition:opacity .35s ease-out;-moz-transition:opacity .35s ease-out;transition:opacity .35s ease-out}@-webkit-keyframes fwFadeIn-08b12caa{0%{opacity:0}to{opacity:1}}@-moz-keyframes fwFadeIn-08b12caa{0%{opacity:0}to{opacity:1}}@keyframes fwFadeIn-08b12caa{0%{opacity:0}to{opacity:1}}";
|
|
167
|
+
var stylesheet = ".fw-switch[data-v-08b12caa]{-webkit-box-align:center;-moz-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;border-radius:9999px;cursor:pointer;display:-webkit-inline-box;display:-webkit-inline-flex;display:-moz-inline-box;display:-ms-inline-flexbox;display:inline-flex}.fwFadeIn-enter-active[data-v-08b12caa]{-webkit-animation:fwFadeIn-08b12caa .35s;-moz-animation:fwFadeIn-08b12caa .35s;animation:fwFadeIn-08b12caa .35s;-webkit-transition:opacity .35s ease-in;-moz-transition:opacity .35s ease-in;transition:opacity .35s ease-in}.fwFadeIn-leave-active[data-v-08b12caa]{animation:fwFadeIn-08b12caa .35s reverse;-webkit-transition:opacity .35s ease-out;-moz-transition:opacity .35s ease-out;transition:opacity .35s ease-out}@-webkit-keyframes fwFadeIn-08b12caa{0%{opacity:0}to{opacity:1}}@-moz-keyframes fwFadeIn-08b12caa{0%{opacity:0}to{opacity:1}}@keyframes fwFadeIn-08b12caa{0%{opacity:0}to{opacity:1}}";
|
|
169
168
|
styleInject(css_248z);
|
|
170
169
|
|
|
171
170
|
script.render = render;
|
|
172
|
-
script.__scopeId = "data-v-
|
|
171
|
+
script.__scopeId = "data-v-08b12caa";
|
|
173
172
|
|
|
174
173
|
export { script as FwSwitch };
|