forked from hero/www_hero
hero_web
This commit is contained in:
16
node_modules/flowbite/lib/esm/components/collapse/index.d.ts
generated
vendored
Normal file
16
node_modules/flowbite/lib/esm/components/collapse/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
import type { CollapseOptions } from './types';
|
||||
import { CollapseInterface } from './interface';
|
||||
declare class Collapse implements CollapseInterface {
|
||||
_targetEl: HTMLElement | null;
|
||||
_triggerEl: HTMLElement | null;
|
||||
_options: CollapseOptions;
|
||||
_visible: boolean;
|
||||
constructor(targetEl?: HTMLElement | null, triggerEl?: HTMLElement | null, options?: CollapseOptions);
|
||||
_init(): void;
|
||||
collapse(): void;
|
||||
expand(): void;
|
||||
toggle(): void;
|
||||
}
|
||||
export declare function initCollapses(): void;
|
||||
export default Collapse;
|
||||
//# sourceMappingURL=index.d.ts.map
|
1
node_modules/flowbite/lib/esm/components/collapse/index.d.ts.map
generated
vendored
Normal file
1
node_modules/flowbite/lib/esm/components/collapse/index.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/collapse/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAQhD,cAAM,QAAS,YAAW,iBAAiB;IACvC,SAAS,EAAE,WAAW,GAAG,IAAI,CAAC;IAC9B,UAAU,EAAE,WAAW,GAAG,IAAI,CAAC;IAC/B,QAAQ,EAAE,eAAe,CAAC;IAC1B,QAAQ,EAAE,OAAO,CAAC;gBAGd,QAAQ,GAAE,WAAW,GAAG,IAAW,EACnC,SAAS,GAAE,WAAW,GAAG,IAAW,EACpC,OAAO,GAAE,eAAyB;IAStC,KAAK;IAgBL,QAAQ;IAWR,MAAM;IAWN,MAAM;CAST;AAED,wBAAgB,aAAa,SAmB5B;AAOD,eAAe,QAAQ,CAAC"}
|
94
node_modules/flowbite/lib/esm/components/collapse/index.js
generated
vendored
Normal file
94
node_modules/flowbite/lib/esm/components/collapse/index.js
generated
vendored
Normal file
@@ -0,0 +1,94 @@
|
||||
var __assign = (this && this.__assign) || function () {
|
||||
__assign = Object.assign || function(t) {
|
||||
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
||||
s = arguments[i];
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
||||
t[p] = s[p];
|
||||
}
|
||||
return t;
|
||||
};
|
||||
return __assign.apply(this, arguments);
|
||||
};
|
||||
var Default = {
|
||||
onCollapse: function () { },
|
||||
onExpand: function () { },
|
||||
onToggle: function () { },
|
||||
};
|
||||
var Collapse = /** @class */ (function () {
|
||||
function Collapse(targetEl, triggerEl, options) {
|
||||
if (targetEl === void 0) { targetEl = null; }
|
||||
if (triggerEl === void 0) { triggerEl = null; }
|
||||
if (options === void 0) { options = Default; }
|
||||
this._targetEl = targetEl;
|
||||
this._triggerEl = triggerEl;
|
||||
this._options = __assign(__assign({}, Default), options);
|
||||
this._visible = false;
|
||||
this._init();
|
||||
}
|
||||
Collapse.prototype._init = function () {
|
||||
var _this = this;
|
||||
if (this._triggerEl) {
|
||||
if (this._triggerEl.hasAttribute('aria-expanded')) {
|
||||
this._visible =
|
||||
this._triggerEl.getAttribute('aria-expanded') === 'true';
|
||||
}
|
||||
else {
|
||||
// fix until v2 not to break previous single collapses which became dismiss
|
||||
this._visible = !this._targetEl.classList.contains('hidden');
|
||||
}
|
||||
this._triggerEl.addEventListener('click', function () {
|
||||
_this.toggle();
|
||||
});
|
||||
}
|
||||
};
|
||||
Collapse.prototype.collapse = function () {
|
||||
this._targetEl.classList.add('hidden');
|
||||
if (this._triggerEl) {
|
||||
this._triggerEl.setAttribute('aria-expanded', 'false');
|
||||
}
|
||||
this._visible = false;
|
||||
// callback function
|
||||
this._options.onCollapse(this);
|
||||
};
|
||||
Collapse.prototype.expand = function () {
|
||||
this._targetEl.classList.remove('hidden');
|
||||
if (this._triggerEl) {
|
||||
this._triggerEl.setAttribute('aria-expanded', 'true');
|
||||
}
|
||||
this._visible = true;
|
||||
// callback function
|
||||
this._options.onExpand(this);
|
||||
};
|
||||
Collapse.prototype.toggle = function () {
|
||||
if (this._visible) {
|
||||
this.collapse();
|
||||
}
|
||||
else {
|
||||
this.expand();
|
||||
}
|
||||
// callback function
|
||||
this._options.onToggle(this);
|
||||
};
|
||||
return Collapse;
|
||||
}());
|
||||
export function initCollapses() {
|
||||
document
|
||||
.querySelectorAll('[data-collapse-toggle]')
|
||||
.forEach(function ($triggerEl) {
|
||||
var targetId = $triggerEl.getAttribute('data-collapse-toggle');
|
||||
var $targetEl = document.getElementById(targetId);
|
||||
// check if the target element exists
|
||||
if ($targetEl) {
|
||||
new Collapse($targetEl, $triggerEl);
|
||||
}
|
||||
else {
|
||||
console.error("The target element with id \"".concat(targetId, "\" does not exist. Please check the data-collapse-toggle attribute."));
|
||||
}
|
||||
});
|
||||
}
|
||||
if (typeof window !== 'undefined') {
|
||||
window.Collapse = Collapse;
|
||||
window.initCollapses = initCollapses;
|
||||
}
|
||||
export default Collapse;
|
||||
//# sourceMappingURL=index.js.map
|
1
node_modules/flowbite/lib/esm/components/collapse/index.js.map
generated
vendored
Normal file
1
node_modules/flowbite/lib/esm/components/collapse/index.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/collapse/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAIA,IAAM,OAAO,GAAoB;IAC7B,UAAU,EAAE,cAAO,CAAC;IACpB,QAAQ,EAAE,cAAO,CAAC;IAClB,QAAQ,EAAE,cAAO,CAAC;CACrB,CAAC;AAEF;IAMI,kBACI,QAAmC,EACnC,SAAoC,EACpC,OAAkC;QAFlC,yBAAA,EAAA,eAAmC;QACnC,0BAAA,EAAA,gBAAoC;QACpC,wBAAA,EAAA,iBAAkC;QAElC,IAAI,CAAC,SAAS,GAAG,QAAQ,CA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MAAM,CAAC,CAAC;SACzD;QACD,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QAErB,oBAAoB;QACpB,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;IAED,yBAAM,GAAN;QACI,IAAI,IAAI,CAAC,QAAQ,EAAE;YACf,IAAI,CAAC,QAAQ,EAAE,CAAC;SACnB;aAAM;YACH,IAAI,CAAC,MAAM,EAAE,CAAC;SACjB;QACD,oBAAoB;QACpB,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;IACL,eAAC;AAAD,CAAC,AAjED,IAiEC;AAED,MAAM,UAAU,aAAa;IACzB,QAAQ;SACH,gBAAgB,CAAC,wBAAwB,CAAC;SAC1C,OAAO,CAAC,UAAC,UAAU;QAChB,IAAM,QAAQ,GAAG,UAAU,CAAC,YAAY,CAAC,sBAAsB,CAAC,CAAC;QACjE,IAAM,SAAS,GAAG,QAAQ,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;QAEpD,qCAAqC;QACrC,IAAI,SAAS,EAAE;YACX,IAAI,QAAQ,CACR,SAAwB,EACxB,UAAyB,CAC5B,CAAC;SACL;aAAM;YACH,OAAO,CAAC,KAAK,CACT,uCAA+B,QAAQ,wEAAoE,CAC9G,CAAC;SACL;IACL,CAAC,CAAC,CAAC;AACX,CAAC;AAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IAC/B,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,MAAM,CAAC,aAAa,GAAG,aAAa,CAAC;CACxC;AAED,eAAe,QAAQ,CAAC"}
|
12
node_modules/flowbite/lib/esm/components/collapse/interface.d.ts
generated
vendored
Normal file
12
node_modules/flowbite/lib/esm/components/collapse/interface.d.ts
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
import { CollapseOptions } from './types';
|
||||
export declare interface CollapseInterface {
|
||||
_targetEl: HTMLElement | null;
|
||||
_triggerEl: HTMLElement | null;
|
||||
_options: CollapseOptions;
|
||||
_visible: boolean;
|
||||
_init(): void;
|
||||
collapse(): void;
|
||||
expand(): void;
|
||||
toggle(): void;
|
||||
}
|
||||
//# sourceMappingURL=interface.d.ts.map
|
1
node_modules/flowbite/lib/esm/components/collapse/interface.d.ts.map
generated
vendored
Normal file
1
node_modules/flowbite/lib/esm/components/collapse/interface.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../src/components/collapse/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,MAAM,CAAC,OAAO,WAAW,iBAAiB;IACtC,SAAS,EAAE,WAAW,GAAG,IAAI,CAAC;IAC9B,UAAU,EAAE,WAAW,GAAG,IAAI,CAAC;IAC/B,QAAQ,EAAE,eAAe,CAAC;IAC1B,QAAQ,EAAE,OAAO,CAAC;IAElB,KAAK,IAAI,IAAI,CAAC;IACd,QAAQ,IAAI,IAAI,CAAC;IACjB,MAAM,IAAI,IAAI,CAAC;IACf,MAAM,IAAI,IAAI,CAAC;CAClB"}
|
2
node_modules/flowbite/lib/esm/components/collapse/interface.js
generated
vendored
Normal file
2
node_modules/flowbite/lib/esm/components/collapse/interface.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export {};
|
||||
//# sourceMappingURL=interface.js.map
|
1
node_modules/flowbite/lib/esm/components/collapse/interface.js.map
generated
vendored
Normal file
1
node_modules/flowbite/lib/esm/components/collapse/interface.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/components/collapse/interface.ts"],"names":[],"mappings":""}
|
7
node_modules/flowbite/lib/esm/components/collapse/types.d.ts
generated
vendored
Normal file
7
node_modules/flowbite/lib/esm/components/collapse/types.d.ts
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import { CollapseInterface } from './interface';
|
||||
export declare type CollapseOptions = {
|
||||
onCollapse?: (collapse: CollapseInterface) => void;
|
||||
onExpand?: (collapse: CollapseInterface) => void;
|
||||
onToggle?: (collapse: CollapseInterface) => void;
|
||||
};
|
||||
//# sourceMappingURL=types.d.ts.map
|
1
node_modules/flowbite/lib/esm/components/collapse/types.d.ts.map
generated
vendored
Normal file
1
node_modules/flowbite/lib/esm/components/collapse/types.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/collapse/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,CAAC,OAAO,MAAM,eAAe,GAAG;IAClC,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACnD,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACjD,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,iBAAiB,KAAK,IAAI,CAAC;CACpD,CAAC"}
|
2
node_modules/flowbite/lib/esm/components/collapse/types.js
generated
vendored
Normal file
2
node_modules/flowbite/lib/esm/components/collapse/types.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export {};
|
||||
//# sourceMappingURL=types.js.map
|
1
node_modules/flowbite/lib/esm/components/collapse/types.js.map
generated
vendored
Normal file
1
node_modules/flowbite/lib/esm/components/collapse/types.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/collapse/types.ts"],"names":[],"mappings":""}
|
Reference in New Issue
Block a user