@warp-ds/elements 2.1.1 → 2.2.0-next.10
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/README.md +27 -17
- package/dist/.storybook/utilities.d.ts +28 -0
- package/dist/api.js +1 -49
- package/dist/api.js.map +4 -4
- package/dist/custom-elements.json +4282 -0
- package/dist/index.css +2 -0
- package/dist/index.css.map +7 -0
- package/dist/index.js +4561 -6638
- package/dist/index.js.map +4 -4
- package/dist/packages/affix/affix.stories.d.ts +10 -0
- package/dist/packages/affix/affix.test.d.ts +1 -0
- package/dist/packages/affix/index.d.ts +52 -24
- package/dist/packages/affix/index.js +2571 -2240
- package/dist/packages/affix/index.js.map +4 -4
- package/dist/packages/affix/react.d.ts +2 -0
- package/dist/packages/affix/styles.d.ts +1 -0
- package/dist/packages/alert/alert.stories.d.ts +15 -0
- package/dist/packages/alert/alert.test.d.ts +1 -0
- package/dist/packages/alert/index.d.ts +27 -17
- package/dist/packages/alert/index.js +2568 -2446
- package/dist/packages/alert/index.js.map +4 -4
- package/dist/packages/alert/react.d.ts +2 -0
- package/dist/packages/alert/styles.d.ts +1 -0
- package/dist/packages/attention/attention.stories.d.ts +15 -0
- package/dist/packages/attention/attention.test.d.ts +1 -0
- package/dist/packages/attention/index.d.ts +62 -90
- package/dist/packages/attention/index.js +3497 -3984
- package/dist/packages/attention/index.js.map +4 -4
- package/dist/packages/attention/layout-styles.d.ts +1 -0
- package/dist/packages/attention/react.d.ts +1 -0
- package/dist/packages/attention/styles.d.ts +1 -0
- package/dist/packages/badge/badge.stories.d.ts +17 -0
- package/dist/packages/badge/badge.test.d.ts +1 -0
- package/dist/packages/badge/index.d.ts +17 -11
- package/dist/packages/badge/index.js +2550 -300
- package/dist/packages/badge/index.js.map +4 -4
- package/dist/packages/badge/react.d.ts +2 -0
- package/dist/packages/badge/styles.d.ts +1 -0
- package/dist/packages/box/box.stories.d.ts +14 -0
- package/dist/packages/box/box.test.d.ts +1 -0
- package/dist/packages/box/index.d.ts +22 -20
- package/dist/packages/box/index.js +2550 -304
- package/dist/packages/box/index.js.map +4 -4
- package/dist/packages/box/react.d.ts +2 -0
- package/dist/packages/box/slot.test.d.ts +1 -0
- package/dist/packages/box/styles.d.ts +1 -0
- package/dist/packages/breadcrumbs/breadcrumbs.stories.d.ts +12 -0
- package/dist/packages/breadcrumbs/breadcrumbs.test.d.ts +1 -0
- package/dist/packages/breadcrumbs/index.d.ts +24 -16
- package/dist/packages/breadcrumbs/index.js +2511 -2051
- package/dist/packages/breadcrumbs/index.js.map +4 -4
- package/dist/packages/breadcrumbs/react.d.ts +2 -0
- package/dist/packages/breadcrumbs/styles.d.ts +1 -0
- package/dist/packages/button/button.stories.d.ts +21 -0
- package/dist/packages/button/button.test.d.ts +1 -0
- package/dist/packages/button/index.d.ts +111 -56
- package/dist/packages/button/index.js +2735 -2130
- package/dist/packages/button/index.js.map +4 -4
- package/dist/packages/button/react.d.ts +2 -0
- package/dist/packages/button/styles.d.ts +1 -0
- package/dist/packages/card/card.stories.d.ts +15 -0
- package/dist/packages/card/card.test.d.ts +1 -0
- package/dist/packages/card/index.d.ts +33 -16
- package/dist/packages/card/index.js +2530 -2078
- package/dist/packages/card/index.js.map +4 -4
- package/dist/packages/card/react.d.ts +2 -0
- package/dist/packages/card/styles.d.ts +1 -0
- package/dist/packages/datepicker/DatePicker.test.d.ts +1 -0
- package/dist/packages/datepicker/datepicker.d.ts +107 -0
- package/dist/packages/datepicker/datepicker.js +2929 -0
- package/dist/packages/datepicker/datepicker.js.map +7 -0
- package/dist/packages/datepicker/datepicker.stories.d.ts +11 -0
- package/dist/packages/datepicker/datepicker.test.d.ts +2 -0
- package/dist/packages/datepicker/index.d.ts +1 -0
- package/dist/packages/datepicker/index.js +2929 -0
- package/dist/packages/datepicker/index.js.map +7 -0
- package/dist/packages/datepicker/locales/da/messages.d.mts +1 -0
- package/dist/packages/datepicker/locales/en/messages.d.mts +1 -0
- package/dist/packages/datepicker/locales/fi/messages.d.mts +1 -0
- package/dist/packages/datepicker/locales/nb/messages.d.mts +1 -0
- package/dist/packages/datepicker/locales/sv/messages.d.mts +1 -0
- package/dist/packages/datepicker/react.d.ts +2 -0
- package/dist/packages/datepicker/styles/w-datepicker-calendar.styles.d.ts +1 -0
- package/dist/packages/datepicker/styles/w-datepicker-day.styles.d.ts +1 -0
- package/dist/packages/datepicker/styles/w-datepicker-month.styles.d.ts +1 -0
- package/dist/packages/datepicker/styles/w-datepicker.styles.d.ts +1 -0
- package/dist/packages/datepicker/utils.d.ts +13 -0
- package/dist/packages/dead-toggle/dead-toggle.stories.d.ts +10 -0
- package/dist/packages/dead-toggle/dead-toggle.test.d.ts +1 -0
- package/dist/packages/dead-toggle/index.d.ts +21 -0
- package/dist/packages/dead-toggle/index.js +2610 -0
- package/dist/packages/dead-toggle/index.js.map +7 -0
- package/dist/packages/dead-toggle/react.d.ts +2 -0
- package/dist/packages/expandable/expandable.stories.d.ts +19 -0
- package/dist/packages/expandable/expandable.test.d.ts +1 -0
- package/dist/packages/expandable/index.d.ts +55 -50
- package/dist/packages/expandable/index.js +2545 -2293
- package/dist/packages/expandable/index.js.map +4 -4
- package/dist/packages/expandable/react.d.ts +2 -0
- package/dist/packages/expandable/styles.d.ts +1 -0
- package/dist/packages/link/index.d.ts +39 -0
- package/dist/packages/link/index.js +2769 -0
- package/dist/packages/link/index.js.map +7 -0
- package/dist/packages/link/link.stories.d.ts +20 -0
- package/dist/packages/link/link.test.d.ts +1 -0
- package/dist/packages/link/react.d.ts +2 -0
- package/dist/packages/link/styles.d.ts +1 -0
- package/dist/packages/modal/index.d.ts +4 -5
- package/dist/packages/modal/index.js +2765 -2569
- package/dist/packages/modal/index.js.map +4 -4
- package/dist/packages/modal/modal-footer.d.ts +18 -11
- package/dist/packages/modal/modal-footer.js +2499 -0
- package/dist/packages/modal/modal-footer.js.map +7 -0
- package/dist/packages/modal/modal-header.d.ts +30 -31
- package/dist/packages/modal/modal-header.js +2700 -0
- package/dist/packages/modal/modal-header.js.map +7 -0
- package/dist/packages/modal/modal-main.d.ts +32 -31
- package/dist/packages/modal/modal-main.js +2681 -0
- package/dist/packages/modal/modal-main.js.map +7 -0
- package/dist/packages/modal/modal.stories.d.ts +19 -0
- package/dist/packages/modal/react.d.ts +4 -0
- package/dist/packages/modal/util.d.ts +7 -17
- package/dist/packages/pageindicator/index.d.ts +14 -0
- package/dist/packages/pageindicator/index.js +169 -0
- package/dist/packages/pageindicator/index.js.map +7 -0
- package/dist/packages/pageindicator/pageindicator.stories.d.ts +32 -0
- package/dist/packages/pageindicator/react.d.ts +2 -0
- package/dist/packages/pageindicator/style.d.ts +1 -0
- package/dist/packages/pagination/index.d.ts +37 -0
- package/dist/packages/pagination/index.js +2610 -0
- package/dist/packages/pagination/index.js.map +7 -0
- package/dist/packages/pagination/locales/da/messages.d.mts +1 -0
- package/dist/packages/pagination/locales/en/messages.d.mts +1 -0
- package/dist/packages/pagination/locales/fi/messages.d.mts +1 -0
- package/dist/packages/pagination/locales/nb/messages.d.mts +1 -0
- package/dist/packages/pagination/locales/sv/messages.d.mts +1 -0
- package/dist/packages/pagination/pagination.stories.d.ts +14 -0
- package/dist/packages/pagination/pagination.test.d.ts +1 -0
- package/dist/packages/pagination/react.d.ts +2 -0
- package/dist/packages/pagination/styles.d.ts +1 -0
- package/dist/packages/pill/index.d.ts +44 -23
- package/dist/packages/pill/index.js +2524 -2175
- package/dist/packages/pill/index.js.map +4 -4
- package/dist/packages/pill/pill.stories.d.ts +12 -0
- package/dist/packages/pill/pill.test.d.ts +1 -0
- package/dist/packages/pill/styles.d.ts +1 -0
- package/dist/packages/rip-and-tear-checkbox/checkbox.d.ts +64 -0
- package/dist/packages/rip-and-tear-checkbox/index.css +2 -0
- package/dist/packages/rip-and-tear-checkbox/index.css.map +7 -0
- package/dist/packages/rip-and-tear-checkbox/index.d.ts +6 -0
- package/dist/packages/rip-and-tear-checkbox/index.js +187 -0
- package/dist/packages/rip-and-tear-checkbox/index.js.map +7 -0
- package/dist/packages/rip-and-tear-radio/base-element.d.ts +46 -0
- package/dist/packages/rip-and-tear-radio/custom-error-validator.d.ts +6 -0
- package/dist/packages/rip-and-tear-radio/form-associated-element.d.ts +103 -0
- package/dist/packages/rip-and-tear-radio/index.css +2 -0
- package/dist/packages/rip-and-tear-radio/index.css.map +7 -0
- package/dist/packages/rip-and-tear-radio/index.d.ts +8 -0
- package/dist/packages/rip-and-tear-radio/index.js +157 -0
- package/dist/packages/rip-and-tear-radio/index.js.map +7 -0
- package/dist/packages/rip-and-tear-radio/invalid.d.ts +8 -0
- package/dist/packages/rip-and-tear-radio/math.d.ts +1 -0
- package/dist/packages/rip-and-tear-radio/radio-group.d.ts +72 -0
- package/dist/packages/rip-and-tear-radio/radio.d.ts +38 -0
- package/dist/packages/rip-and-tear-radio/required-validator.d.ts +11 -0
- package/dist/packages/rip-and-tear-radio/slot.d.ts +20 -0
- package/dist/packages/rip-and-tear-radio/watch.d.ts +26 -0
- package/dist/packages/select/index.d.ts +59 -48
- package/dist/packages/select/index.js +2565 -2236
- package/dist/packages/select/index.js.map +4 -4
- package/dist/packages/select/react.d.ts +2 -0
- package/dist/packages/select/select.stories.d.ts +10 -0
- package/dist/packages/select/select.test.d.ts +1 -0
- package/dist/packages/select/styles.d.ts +1 -0
- package/dist/packages/steps/index.d.ts +43 -0
- package/dist/packages/steps/index.js +2581 -0
- package/dist/packages/steps/index.js.map +7 -0
- package/dist/packages/steps/locales/da/messages.d.mts +1 -0
- package/dist/packages/steps/locales/en/messages.d.mts +1 -0
- package/dist/packages/steps/locales/fi/messages.d.mts +1 -0
- package/dist/packages/steps/locales/nb/messages.d.mts +1 -0
- package/dist/packages/steps/locales/sv/messages.d.mts +1 -0
- package/dist/packages/steps/react.d.ts +3 -0
- package/dist/packages/steps/steps.stories.d.ts +12 -0
- package/dist/packages/steps/styles.d.ts +1 -0
- package/dist/packages/styles.d.ts +2 -0
- package/dist/packages/switch/index.d.ts +20 -0
- package/dist/packages/switch/index.js +2564 -0
- package/dist/packages/switch/index.js.map +7 -0
- package/dist/packages/switch/react.d.ts +2 -0
- package/dist/packages/switch/styles.d.ts +1 -0
- package/dist/packages/switch/switch.stories.d.ts +9 -0
- package/dist/packages/tabs/index.d.ts +4 -0
- package/dist/packages/tabs/index.js +2579 -0
- package/dist/packages/tabs/index.js.map +7 -0
- package/dist/packages/tabs/react.d.ts +4 -0
- package/dist/packages/tabs/styles.d.ts +1 -0
- package/dist/packages/tabs/tab-panel.d.ts +20 -0
- package/dist/packages/tabs/tab.d.ts +23 -0
- package/dist/packages/tabs/tabs.d.ts +38 -0
- package/dist/packages/tabs/tabs.stories.d.ts +8 -0
- package/dist/packages/textfield/index.d.ts +72 -74
- package/dist/packages/textfield/index.js +2572 -413
- package/dist/packages/textfield/index.js.map +4 -4
- package/dist/packages/textfield/react.d.ts +2 -0
- package/dist/packages/textfield/styles.d.ts +1 -0
- package/dist/packages/textfield/textfield.stories.d.ts +17 -0
- package/dist/packages/textfield/textfield.test.d.ts +1 -0
- package/dist/packages/toast/api.d.ts +4 -45
- package/dist/packages/toast/index.d.ts +3 -0
- package/dist/packages/toast/index.js +2610 -2787
- package/dist/packages/toast/index.js.map +4 -4
- package/dist/packages/toast/styles.d.ts +1 -0
- package/dist/packages/toast/toast-container.d.ts +12 -63
- package/dist/packages/toast/toast.d.ts +34 -29
- package/dist/packages/toast/toast.stories.d.ts +12 -0
- package/dist/packages/toast/types.d.ts +15 -0
- package/dist/packages/utils/expand-transition.d.ts +3 -2
- package/dist/packages/utils/index.d.ts +1 -1
- package/dist/packages/utils/index.js +27 -0
- package/dist/packages/utils/index.js.map +7 -0
- package/dist/packages/utils/unstyled-heading.d.ts +4 -3
- package/dist/setup-tests.d.ts +1 -0
- package/dist/styles.css +1 -0
- package/dist/vscode.css-custom-data.json +6 -0
- package/dist/vscode.html-custom-data.json +421 -0
- package/dist/web-types.json +949 -0
- package/package.json +74 -28
- package/dist/index.d.ts +0 -19
- package/dist/packages/broadcast/component.d.ts +0 -36
- package/dist/packages/broadcast/index.d.ts +0 -2
- package/dist/packages/broadcast/index.js +0 -87
- package/dist/packages/broadcast/index.js.map +0 -7
package/README.md
CHANGED
|
@@ -38,7 +38,7 @@ This project builds both the whole Elements package and separate component packa
|
|
|
38
38
|
```js
|
|
39
39
|
import '@warp-ds/elements';
|
|
40
40
|
```
|
|
41
|
-
or a specific component:
|
|
41
|
+
or a specific component:
|
|
42
42
|
```js
|
|
43
43
|
import '@warp-ds/elements/components/toast';
|
|
44
44
|
```
|
|
@@ -48,30 +48,40 @@ import '@warp-ds/elements/components/toast';
|
|
|
48
48
|
For information on the components available in the package and how to use them,
|
|
49
49
|
see the [Warp Design System documentation](https://warp-ds.github.io/tech-docs/).
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
This project is continuously published to [NPM](https://www.npmjs.com/package/@warp-ds/elements) and [Eik](https://assets.finn.no/pkg/@warp-ds/elements) using a `next` tag (e.g. `1.1.0-next.1`).
|
|
54
|
-
Anyone needing to use the latest changes of this package can point to the `next` version while waiting for the stable release.
|
|
55
|
-
|
|
56
|
-
## Changelog
|
|
51
|
+
### Editor integration
|
|
57
52
|
|
|
58
|
-
|
|
53
|
+
#### Visual Studio Code
|
|
59
54
|
|
|
60
|
-
|
|
55
|
+
This module includes [Custom HTML and CSS data for Visual Studio Code](https://code.visualstudio.com/blogs/2020/02/24/custom-data-format).
|
|
61
56
|
|
|
62
|
-
|
|
57
|
+
Add this to your `settings.json` and restart VS Code to get IntelliSense and inline documentation for Warp elements.
|
|
63
58
|
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"html.customData": [
|
|
62
|
+
"./node_modules/@warp-ds/elements/dist/vscode.html-custom-data.json"
|
|
63
|
+
],
|
|
64
|
+
"css.customData": [
|
|
65
|
+
"./node_modules/@warp-ds/elements/dist/vscode.css-custom-data.json"
|
|
69
66
|
]
|
|
67
|
+
}
|
|
70
68
|
```
|
|
71
69
|
|
|
72
|
-
|
|
70
|
+
#### JetBrains products
|
|
71
|
+
|
|
72
|
+
We ship `web-types.json` which should get picked up automatically by JetBrains IDEA and similar products.
|
|
73
|
+
|
|
74
|
+
You should see code completions and inline docs for Warp elements when writing HTML.
|
|
73
75
|
|
|
74
|
-
|
|
76
|
+
|
|
77
|
+
## Releases
|
|
78
|
+
|
|
79
|
+
This project is continuously published to [NPM](https://www.npmjs.com/package/@warp-ds/elements) and [Eik](https://assets.finn.no/pkg/@warp-ds/elements) using a `next` tag (e.g. `1.1.0-next.1`).
|
|
80
|
+
Anyone needing to use the latest changes of this package can point to the `next` version while waiting for the stable release.
|
|
81
|
+
|
|
82
|
+
## Changelog
|
|
83
|
+
|
|
84
|
+
Detailed changes for each release can be found in the [CHANGELOG](CHANGELOG.md) file.
|
|
75
85
|
|
|
76
86
|
## License
|
|
77
87
|
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Massages storybook args before being spread to HTML attributes.
|
|
3
|
+
*
|
|
4
|
+
* - Empty strings are treated as not set.
|
|
5
|
+
* - Boolean false don't get set.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* import { html } from 'lit';
|
|
10
|
+
* import { spread } from '@open-wc/lit-helpers';
|
|
11
|
+
* import { prespread } from '../../.storybook/utilities.js';
|
|
12
|
+
*
|
|
13
|
+
* type Args = {
|
|
14
|
+
* required: boolean;
|
|
15
|
+
* };
|
|
16
|
+
*
|
|
17
|
+
* const meta: Meta<Args> = {
|
|
18
|
+
* component: 'w-component',
|
|
19
|
+
* render(args) {
|
|
20
|
+
* return html`<w-component ${spread(prespread(args))}></w-component>`;
|
|
21
|
+
* },
|
|
22
|
+
* argTypes: {
|
|
23
|
+
* required: { type: 'boolean' },
|
|
24
|
+
* },
|
|
25
|
+
* };
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export declare function prespread(args: Record<string, unknown>): Record<string, unknown>;
|
package/dist/api.js
CHANGED
|
@@ -1,50 +1,2 @@
|
|
|
1
|
-
var
|
|
2
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
-
var __spreadValues = (a, b) => {
|
|
7
|
-
for (var prop in b || (b = {}))
|
|
8
|
-
if (__hasOwnProp.call(b, prop))
|
|
9
|
-
__defNormalProp(a, prop, b[prop]);
|
|
10
|
-
if (__getOwnPropSymbols)
|
|
11
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
-
if (__propIsEnum.call(b, prop))
|
|
13
|
-
__defNormalProp(a, prop, b[prop]);
|
|
14
|
-
}
|
|
15
|
-
return a;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
// packages/utils/window-exists.js
|
|
19
|
-
var windowExists = typeof window !== "undefined";
|
|
20
|
-
|
|
21
|
-
// packages/toast/api.js
|
|
22
|
-
function toast(message, options) {
|
|
23
|
-
if (!windowExists) return;
|
|
24
|
-
const toast2 = customElements.get("w-toast-container").init();
|
|
25
|
-
const data = __spreadValues({
|
|
26
|
-
id: Date.now().toString(36) + Math.random().toString(36).slice(2, 5),
|
|
27
|
-
text: message,
|
|
28
|
-
duration: 5e3,
|
|
29
|
-
type: "success"
|
|
30
|
-
}, options);
|
|
31
|
-
toast2.set(data);
|
|
32
|
-
return data;
|
|
33
|
-
}
|
|
34
|
-
function removeToast(id) {
|
|
35
|
-
if (!windowExists) return;
|
|
36
|
-
const toast2 = customElements.get("w-toast-container").init();
|
|
37
|
-
return toast2.del(id);
|
|
38
|
-
}
|
|
39
|
-
function updateToast(id, options) {
|
|
40
|
-
if (!windowExists) return;
|
|
41
|
-
const toast2 = customElements.get("w-toast-container").init();
|
|
42
|
-
toast2.set(__spreadValues(__spreadValues({}, toast2.get(id)), options));
|
|
43
|
-
return toast2.get(id);
|
|
44
|
-
}
|
|
45
|
-
export {
|
|
46
|
-
removeToast,
|
|
47
|
-
toast,
|
|
48
|
-
updateToast
|
|
49
|
-
};
|
|
1
|
+
var e=typeof window!="undefined";function r(){return customElements.get("w-toast-container")}function p(t,o){if(!e)return;let n=r().init(),s={id:Date.now().toString(36)+Math.random().toString(36).slice(2,5),text:t,duration:5e3,type:"success",...o};return n.set(s),s}function u(t){return e?r().init().del(t):void 0}function c(t,o){if(!e)return;let n=r().init();return n.set({...n.get(t),...o}),n.get(t)}export{u as removeToast,p as toast,c as updateToast};
|
|
50
2
|
//# sourceMappingURL=api.js.map
|
package/dist/api.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../packages/utils/window-exists.js", "../packages/toast/api.
|
|
4
|
-
"sourcesContent": ["export const windowExists = typeof window !== 'undefined';\n", "import { windowExists } from '../utils/window-exists';\n\
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["toast"]
|
|
3
|
+
"sources": ["../packages/utils/window-exists.js", "../packages/toast/api.ts"],
|
|
4
|
+
"sourcesContent": ["export const windowExists = typeof window !== 'undefined';\n", "import { windowExists } from '../utils/window-exists';\n\nimport { WarpToastContainer } from './toast-container';\nimport type { ToastOptions, ToastInternal } from './types';\n\nfunction getToastContainer() {\n const container = customElements.get('w-toast-container');\n return container as typeof WarpToastContainer;\n}\n\n/**\n * Creates a new toast\n */\nexport function toast(message: string, options?: ToastOptions) {\n if (!windowExists) return;\n\n const toast = getToastContainer().init() as WarpToastContainer;\n\n const data: ToastOptions = {\n id: Date.now().toString(36) + Math.random().toString(36).slice(2, 5),\n text: message,\n duration: 5000,\n type: 'success',\n ...options,\n };\n\n toast.set(data);\n return data;\n}\n\n/**\n * Remove an existing toast\n */\nexport function removeToast(id: string | number): Promise<boolean> | undefined {\n if (!windowExists) return;\n\n const toast = getToastContainer().init() as WarpToastContainer;\n return toast.del(id);\n}\n\n/**\n * Update an existing toast\n */\nexport function updateToast(id: string | number, options?: ToastOptions): ToastInternal | undefined {\n if (!windowExists) return;\n\n const toast = getToastContainer().init() as WarpToastContainer;\n toast.set({ ...toast.get(id), ...options });\n return toast.get(id);\n}\n"],
|
|
5
|
+
"mappings": "AAAO,IAAMA,EAAe,OAAO,QAAW,YCK9C,SAASC,GAAoB,CAE3B,OADkB,eAAe,IAAI,mBAAmB,CAE1D,CAKO,SAASC,EAAMC,EAAiBC,EAAwB,CAC7D,GAAI,CAACC,EAAc,OAEnB,IAAMH,EAAQD,EAAkB,EAAE,KAAK,EAEjCK,EAAqB,CACzB,GAAI,KAAK,IAAI,EAAE,SAAS,EAAE,EAAI,KAAK,OAAO,EAAE,SAAS,EAAE,EAAE,MAAM,EAAG,CAAC,EACnE,KAAMH,EACN,SAAU,IACV,KAAM,UACN,GAAGC,CACL,EAEA,OAAAF,EAAM,IAAII,CAAI,EACPA,CACT,CAKO,SAASC,EAAYC,EAAmD,CAC7E,OAAKH,EAESJ,EAAkB,EAAE,KAAK,EAC1B,IAAIO,CAAE,EAHA,MAIrB,CAKO,SAASC,EAAYD,EAAqBJ,EAAmD,CAClG,GAAI,CAACC,EAAc,OAEnB,IAAMH,EAAQD,EAAkB,EAAE,KAAK,EACvC,OAAAC,EAAM,IAAI,CAAE,GAAGA,EAAM,IAAIM,CAAE,EAAG,GAAGJ,CAAQ,CAAC,EACnCF,EAAM,IAAIM,CAAE,CACrB",
|
|
6
|
+
"names": ["windowExists", "getToastContainer", "toast", "message", "options", "windowExists", "data", "removeToast", "id", "updateToast"]
|
|
7
7
|
}
|