Skip to content

Commit

Permalink
Changes:
Browse files Browse the repository at this point in the history
* Popover no longer requires additional CSS for its `btn-close` button, it's now included with the `btnClose` default template
  • Loading branch information
thednp committed Nov 18, 2024
1 parent a556cb0 commit 38a4740
Show file tree
Hide file tree
Showing 15 changed files with 31 additions and 35 deletions.
2 changes: 1 addition & 1 deletion dist/bootstrap-native.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/bootstrap-native.cjs.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/bootstrap-native.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/bootstrap-native.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/bootstrap-native.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1588,7 +1588,7 @@ const Cr = `[${ot}="${Ht}"],[data-tip="${Ht}"]`, xr = at({}, os, {
template: Eo(Ht),
content: "",
dismissible: !1,
btnClose: '<button class="btn-close" aria-label="Close"></button>'
btnClose: '<button class="btn-close position-absolute top-0 end-0 m-1" aria-label="Close"></button>'
}), Sr = (e) => F(e, ws), _r = (e) => new So(e);
class So extends Es {
static selector = Cr;
Expand Down
2 changes: 1 addition & 1 deletion dist/bootstrap-native.mjs.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/components/popover.cjs
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
"use strict";const n=require("./base-component-CEXwoid1.js"),i=require("./dataBsToggle-Dj-Ng54N.js"),t=require("./tooltip-DMsoGjJu.js"),r=`[${i.dataBsToggle}="${t.popoverString}"],[data-tip="${t.popoverString}"]`,a=n.N({},t.tooltipDefaults,{template:t.getTipTemplate(t.popoverString),content:"",dismissible:!1,btnClose:'<button class="btn-close" aria-label="Close"></button>'}),l=e=>n.to(e,t.popoverComponent),c=e=>new p(e);class p extends t.Tooltip{static selector=r;static init=c;static getInstance=l;static styleTip=t.styleTip;constructor(s,o){super(s,o)}get name(){return t.popoverComponent}get defaults(){return a}show=()=>{super.show();const{options:s,btn:o}=this;s.dismissible&&o&&setTimeout(()=>n.ao(o),17)}}module.exports=p;
"use strict";const n=require("./base-component-CEXwoid1.js"),i=require("./dataBsToggle-Dj-Ng54N.js"),t=require("./tooltip-DMsoGjJu.js"),r=`[${i.dataBsToggle}="${t.popoverString}"],[data-tip="${t.popoverString}"]`,a=n.N({},t.tooltipDefaults,{template:t.getTipTemplate(t.popoverString),content:"",dismissible:!1,btnClose:'<button class="btn-close position-absolute top-0 end-0 m-1" aria-label="Close"></button>'}),l=e=>n.to(e,t.popoverComponent),c=e=>new p(e);class p extends t.Tooltip{static selector=r;static init=c;static getInstance=l;static styleTip=t.styleTip;constructor(s,o){super(s,o)}get name(){return t.popoverComponent}get defaults(){return a}show=()=>{super.show();const{options:s,btn:o}=this;s.dismissible&&o&&setTimeout(()=>n.ao(o),17)}}module.exports=p;
//# sourceMappingURL=popover.cjs.map
2 changes: 1 addition & 1 deletion dist/components/popover.cjs.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 13 additions & 13 deletions dist/components/popover.mjs
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
import { N as p, t as i, M as n } from "./base-component-CQAH5ZXF.mjs";
import { d as r } from "./dataBsToggle-B84TS15h.mjs";
import { g as l, p as e, t as c, T as m, a, s as u } from "./tooltip-ClBo4cww.mjs";
const b = `[${r}="${e}"],[data-tip="${e}"]`, f = p({}, c, {
template: l(e),
import { d as l } from "./dataBsToggle-B84TS15h.mjs";
import { g as r, p as e, t as c, T as m, a, s as u } from "./tooltip-ClBo4cww.mjs";
const b = `[${l}="${e}"],[data-tip="${e}"]`, d = p({}, c, {
template: r(e),
content: "",
dismissible: !1,
btnClose: '<button class="btn-close" aria-label="Close"></button>'
}), g = (t) => i(t, a), d = (t) => new T(t);
btnClose: '<button class="btn-close position-absolute top-0 end-0 m-1" aria-label="Close"></button>'
}), f = (t) => i(t, a), g = (t) => new T(t);
class T extends m {
static selector = b;
static init = d;
static getInstance = g;
static init = g;
static getInstance = f;
static styleTip = u;
/**
* @param target the target element
* @param config the instance options
*/
constructor(o, s) {
super(o, s);
constructor(s, o) {
super(s, o);
}
/**
* Returns component name string.
Expand All @@ -29,12 +29,12 @@ class T extends m {
* Returns component default options.
*/
get defaults() {
return f;
return d;
}
show = () => {
super.show();
const { options: o, btn: s } = this;
o.dismissible && s && setTimeout(() => n(s), 17);
const { options: s, btn: o } = this;
s.dismissible && o && setTimeout(() => n(o), 17);
};
}
export {
Expand Down
2 changes: 1 addition & 1 deletion dist/components/popover.mjs.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 1 addition & 6 deletions docs/assets/css/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,7 @@ html {
}

/* misc */
.popover .close {line-height: 0.75;}
.popover .btn-close {position: absolute; right:0.75em}
[dir="rtl"] .popover .btn-close {
left: 0.75em;
right: auto;
}
.popover .btn-close {line-height: 1;}

/* bg */
.bg-bootstrap { background-color: #563d7c }
Expand Down
2 changes: 1 addition & 1 deletion docs/assets/js/bootstrap-native.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/assets/js/bootstrap-native.js.map

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/components/popover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ const popoverDefaults: PopoverOptions = ObjectAssign({}, tooltipDefaults, {
template: getTipTemplate(popoverString),
content: "",
dismissible: false,
btnClose: '<button class="btn-close" aria-label="Close"></button>',
btnClose:
'<button class="btn-close position-absolute top-0 end-0 m-1" aria-label="Close"></button>',
});

/**
Expand Down

0 comments on commit 38a4740

Please sign in to comment.