second commit
This commit is contained in:
21
node_modules/flowbite/lib/esm/components/dismiss/index.d.ts
generated
vendored
Normal file
21
node_modules/flowbite/lib/esm/components/dismiss/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
import type { DismissOptions } from './types';
|
||||
import type { InstanceOptions } from '../../dom/types';
|
||||
import { DismissInterface } from './interface';
|
||||
declare class Dismiss implements DismissInterface {
|
||||
_instanceId: string;
|
||||
_targetEl: HTMLElement | null;
|
||||
_triggerEl: HTMLElement | null;
|
||||
_options: DismissOptions;
|
||||
_initialized: boolean;
|
||||
_clickHandler: EventListenerOrEventListenerObject;
|
||||
constructor(targetEl?: HTMLElement | null, triggerEl?: HTMLElement | null, options?: DismissOptions, instanceOptions?: InstanceOptions);
|
||||
init(): void;
|
||||
destroy(): void;
|
||||
removeInstance(): void;
|
||||
destroyAndRemoveInstance(): void;
|
||||
hide(): void;
|
||||
updateOnHide(callback: () => void): void;
|
||||
}
|
||||
export declare function initDismisses(): void;
|
||||
export default Dismiss;
|
||||
//# sourceMappingURL=index.d.ts.map
|
1
node_modules/flowbite/lib/esm/components/dismiss/index.d.ts.map
generated
vendored
Normal file
1
node_modules/flowbite/lib/esm/components/dismiss/index.d.ts.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/dismiss/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAe/C,cAAM,OAAQ,YAAW,gBAAgB;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,WAAW,GAAG,IAAI,CAAC;IAC9B,UAAU,EAAE,WAAW,GAAG,IAAI,CAAC;IAC/B,QAAQ,EAAE,cAAc,CAAC;IACzB,YAAY,EAAE,OAAO,CAAC;IACtB,aAAa,EAAE,kCAAkC,CAAC;gBAG9C,QAAQ,GAAE,WAAW,GAAG,IAAW,EACnC,SAAS,GAAE,WAAW,GAAG,IAAW,EACpC,OAAO,GAAE,cAAwB,EACjC,eAAe,GAAE,eAAwC;IAkB7D,IAAI;IAUJ,OAAO;IAOP,cAAc;IAId,wBAAwB;IAKxB,IAAI;IAeJ,YAAY,CAAC,QAAQ,EAAE,MAAM,IAAI;CAGpC;AAED,wBAAgB,aAAa,SAa5B;AAOD,eAAe,OAAO,CAAC"}
|
93
node_modules/flowbite/lib/esm/components/dismiss/index.js
generated
vendored
Normal file
93
node_modules/flowbite/lib/esm/components/dismiss/index.js
generated
vendored
Normal file
@ -0,0 +1,93 @@
|
||||
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);
|
||||
};
|
||||
import instances from '../../dom/instances';
|
||||
var Default = {
|
||||
transition: 'transition-opacity',
|
||||
duration: 300,
|
||||
timing: 'ease-out',
|
||||
onHide: function () { },
|
||||
};
|
||||
var DefaultInstanceOptions = {
|
||||
id: null,
|
||||
override: true,
|
||||
};
|
||||
var Dismiss = /** @class */ (function () {
|
||||
function Dismiss(targetEl, triggerEl, options, instanceOptions) {
|
||||
if (targetEl === void 0) { targetEl = null; }
|
||||
if (triggerEl === void 0) { triggerEl = null; }
|
||||
if (options === void 0) { options = Default; }
|
||||
if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; }
|
||||
this._instanceId = instanceOptions.id
|
||||
? instanceOptions.id
|
||||
: targetEl.id;
|
||||
this._targetEl = targetEl;
|
||||
this._triggerEl = triggerEl;
|
||||
this._options = __assign(__assign({}, Default), options);
|
||||
this._initialized = false;
|
||||
this.init();
|
||||
instances.addInstance('Dismiss', this, this._instanceId, instanceOptions.override);
|
||||
}
|
||||
Dismiss.prototype.init = function () {
|
||||
var _this = this;
|
||||
if (this._triggerEl && this._targetEl && !this._initialized) {
|
||||
this._clickHandler = function () {
|
||||
_this.hide();
|
||||
};
|
||||
this._triggerEl.addEventListener('click', this._clickHandler);
|
||||
this._initialized = true;
|
||||
}
|
||||
};
|
||||
Dismiss.prototype.destroy = function () {
|
||||
if (this._triggerEl && this._initialized) {
|
||||
this._triggerEl.removeEventListener('click', this._clickHandler);
|
||||
this._initialized = false;
|
||||
}
|
||||
};
|
||||
Dismiss.prototype.removeInstance = function () {
|
||||
instances.removeInstance('Dismiss', this._instanceId);
|
||||
};
|
||||
Dismiss.prototype.destroyAndRemoveInstance = function () {
|
||||
this.destroy();
|
||||
this.removeInstance();
|
||||
};
|
||||
Dismiss.prototype.hide = function () {
|
||||
var _this = this;
|
||||
this._targetEl.classList.add(this._options.transition, "duration-".concat(this._options.duration), this._options.timing, 'opacity-0');
|
||||
setTimeout(function () {
|
||||
_this._targetEl.classList.add('hidden');
|
||||
}, this._options.duration);
|
||||
// callback function
|
||||
this._options.onHide(this, this._targetEl);
|
||||
};
|
||||
Dismiss.prototype.updateOnHide = function (callback) {
|
||||
this._options.onHide = callback;
|
||||
};
|
||||
return Dismiss;
|
||||
}());
|
||||
export function initDismisses() {
|
||||
document.querySelectorAll('[data-dismiss-target]').forEach(function ($triggerEl) {
|
||||
var targetId = $triggerEl.getAttribute('data-dismiss-target');
|
||||
var $dismissEl = document.querySelector(targetId);
|
||||
if ($dismissEl) {
|
||||
new Dismiss($dismissEl, $triggerEl);
|
||||
}
|
||||
else {
|
||||
console.error("The dismiss element with id \"".concat(targetId, "\" does not exist. Please check the data-dismiss-target attribute."));
|
||||
}
|
||||
});
|
||||
}
|
||||
if (typeof window !== 'undefined') {
|
||||
window.Dismiss = Dismiss;
|
||||
window.initDismisses = initDismisses;
|
||||
}
|
||||
export default Dismiss;
|
||||
//# sourceMappingURL=index.js.map
|
1
node_modules/flowbite/lib/esm/components/dismiss/index.js.map
generated
vendored
Normal file
1
node_modules/flowbite/lib/esm/components/dismiss/index.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/dismiss/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAIA,OAAO,SAAS,MAAM,qBAAqB,CAAC;AAE5C,IAAM,OAAO,GAAmB;IAC5B,UAAU,EAAE,oBAAoB;IAChC,QAAQ,EAAE,GAAG;IACb,MAAM,EAAE,UAAU;IAClB,MAAM,EAAE,cAAO,CAAC;CACnB,CAAC;AAEF,IAAM,sBAAsB,GAAoB;IAC5C,EAAE,EAAE,IAAI;IACR,QAAQ,EAAE,IAAI;CACjB,CAAC;AAEF;IAQI,iBACI,QAAmC,EACnC,SAAoC,EACpC,OAAiC,EACjC,eAAyD;QAHzD,yBAAA,EAAA,eAAmC;QACnC,0BAAA,EAAA,gBAAoC;QACpC,wBAAA,EAAA,iBAAiC;QACjC,gCAAA,EAAA,wCAAyD;QAEzD,IAAI,CAAC,WAAW,GAAG,eAAe,CAAC,EAAE;YACjC,CAAC,CAAC,eAAe,CAAC,EAAE;YACpB,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC;QAClB,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,QAAQ,yBAAQ,OAAO,GAAK,OAAO,CAAE,CAAC;QAC3C,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;QAC1B,IAAI,CAAC,IAAI,EAAE,CAAC;QACZ,SAAS,CAAC,WAAW,CACjB,SAAS,EACT,IAAI,EACJ,IAAI,CAAC,WAAW,EAChB,eAAe,CAAC,QAAQ,CAC3B,CAAC;IACN,CAAC;IAED,sBAAI,GAAJ;QAAA,iBAQC;QAPG,IAAI,IAAI,CAAC,UAAU,IAAI,IAAI,C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AAoB;QAC7B,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,QAAQ,CAAC;IACpC,CAAC;IACL,cAAC;AAAD,CAAC,AA1ED,IA0EC;AAED,MAAM,UAAU,aAAa;IACzB,QAAQ,CAAC,gBAAgB,CAAC,uBAAuB,CAAC,CAAC,OAAO,CAAC,UAAC,UAAU;QAClE,IAAM,QAAQ,GAAG,UAAU,CAAC,YAAY,CAAC,qBAAqB,CAAC,CAAC;QAChE,IAAM,UAAU,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;QAEpD,IAAI,UAAU,EAAE;YACZ,IAAI,OAAO,CAAC,UAAyB,EAAE,UAAyB,CAAC,CAAC;SACrE;aAAM;YACH,OAAO,CAAC,KAAK,CACT,wCAAgC,QAAQ,uEAAmE,CAC9G,CAAC;SACL;IACL,CAAC,CAAC,CAAC;AACP,CAAC;AAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IAC/B,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,MAAM,CAAC,aAAa,GAAG,aAAa,CAAC;CACxC;AAED,eAAe,OAAO,CAAC"}
|
12
node_modules/flowbite/lib/esm/components/dismiss/interface.d.ts
generated
vendored
Normal file
12
node_modules/flowbite/lib/esm/components/dismiss/interface.d.ts
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
import { DismissOptions } from './types';
|
||||
export declare interface DismissInterface {
|
||||
_targetEl: HTMLElement | null;
|
||||
_triggerEl: HTMLElement | null;
|
||||
_options: DismissOptions;
|
||||
init(): void;
|
||||
hide(): void;
|
||||
destroy(): void;
|
||||
removeInstance(): void;
|
||||
destroyAndRemoveInstance(): void;
|
||||
}
|
||||
//# sourceMappingURL=interface.d.ts.map
|
1
node_modules/flowbite/lib/esm/components/dismiss/interface.d.ts.map
generated
vendored
Normal file
1
node_modules/flowbite/lib/esm/components/dismiss/interface.d.ts.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../src/components/dismiss/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,MAAM,CAAC,OAAO,WAAW,gBAAgB;IACrC,SAAS,EAAE,WAAW,GAAG,IAAI,CAAC;IAC9B,UAAU,EAAE,WAAW,GAAG,IAAI,CAAC;IAC/B,QAAQ,EAAE,cAAc,CAAC;IAEzB,IAAI,IAAI,IAAI,CAAC;IACb,IAAI,IAAI,IAAI,CAAC;IAEb,OAAO,IAAI,IAAI,CAAC;IAChB,cAAc,IAAI,IAAI,CAAC;IACvB,wBAAwB,IAAI,IAAI,CAAC;CACpC"}
|
2
node_modules/flowbite/lib/esm/components/dismiss/interface.js
generated
vendored
Normal file
2
node_modules/flowbite/lib/esm/components/dismiss/interface.js
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
export {};
|
||||
//# sourceMappingURL=interface.js.map
|
1
node_modules/flowbite/lib/esm/components/dismiss/interface.js.map
generated
vendored
Normal file
1
node_modules/flowbite/lib/esm/components/dismiss/interface.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/components/dismiss/interface.ts"],"names":[],"mappings":""}
|
8
node_modules/flowbite/lib/esm/components/dismiss/types.d.ts
generated
vendored
Normal file
8
node_modules/flowbite/lib/esm/components/dismiss/types.d.ts
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
import { DismissInterface } from './interface';
|
||||
export declare type DismissOptions = {
|
||||
transition?: string;
|
||||
duration?: number;
|
||||
timing?: string;
|
||||
onHide?: (dismiss: DismissInterface, targetEl: HTMLElement) => void;
|
||||
};
|
||||
//# sourceMappingURL=types.d.ts.map
|
1
node_modules/flowbite/lib/esm/components/dismiss/types.d.ts.map
generated
vendored
Normal file
1
node_modules/flowbite/lib/esm/components/dismiss/types.d.ts.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/dismiss/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,MAAM,CAAC,OAAO,MAAM,cAAc,GAAG;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,WAAW,KAAK,IAAI,CAAC;CACvE,CAAC"}
|
2
node_modules/flowbite/lib/esm/components/dismiss/types.js
generated
vendored
Normal file
2
node_modules/flowbite/lib/esm/components/dismiss/types.js
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
export {};
|
||||
//# sourceMappingURL=types.js.map
|
1
node_modules/flowbite/lib/esm/components/dismiss/types.js.map
generated
vendored
Normal file
1
node_modules/flowbite/lib/esm/components/dismiss/types.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/dismiss/types.ts"],"names":[],"mappings":""}
|
Reference in New Issue
Block a user