@warp-ds/elements 2.10.0 → 2.10.1-next.1
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/dist/custom-elements.json +51 -46
- package/dist/docs/affix/affix.md +1 -9
- package/dist/docs/alert/alert.md +1 -1
- package/dist/docs/attention/attention.md +3 -1
- package/dist/docs/box/box.md +2 -0
- package/dist/docs/breadcrumb-item/breadcrumb-item.md +2 -0
- package/dist/docs/breadcrumbs/breadcrumbs.md +3 -0
- package/dist/docs/button/button.md +3 -0
- package/dist/docs/card/card.md +2 -0
- package/dist/docs/checkbox/api.md +0 -9
- package/dist/docs/checkbox/checkbox.md +5 -10
- package/dist/docs/checkbox-group/checkbox-group.md +3 -10
- package/dist/docs/combobox/combobox.md +2 -0
- package/dist/docs/datepicker/datepicker.md +2 -2
- package/dist/docs/expandable/expandable.md +2 -0
- package/dist/docs/icon/icon.md +1 -1
- package/dist/docs/index.md +35 -35
- package/dist/docs/link/link.md +3 -1
- package/dist/docs/modal/modal.md +2 -0
- package/dist/docs/modal-footer/modal-footer.md +2 -0
- package/dist/docs/modal-header/modal-header.md +2 -0
- package/dist/docs/page-indicator/page-indicator.md +2 -0
- package/dist/docs/pagination/pagination.md +2 -0
- package/dist/docs/pill/pill.md +2 -0
- package/dist/docs/radio/radio.md +5 -1
- package/dist/docs/radio-group/radio-group.md +3 -1
- package/dist/docs/select/select.md +2 -0
- package/dist/docs/slider/slider.md +2 -0
- package/dist/docs/snackbar/snackbar.md +2 -0
- package/dist/docs/snackbar-item/snackbar-item.md +2 -0
- package/dist/docs/step/step.md +3 -1
- package/dist/docs/step-indicator/step-indicator.md +2 -0
- package/dist/docs/switch/switch.md +2 -0
- package/dist/docs/tab/tab.md +2 -0
- package/dist/docs/tab-panel/tab-panel.md +3 -0
- package/dist/docs/tabs/api.md +1 -1
- package/dist/docs/tabs/tabs.md +3 -1
- package/dist/docs/textarea/textarea.md +1 -5
- package/dist/docs/textfield/textfield.md +2 -0
- package/dist/entrypoint-react.d.ts +38 -0
- package/dist/entrypoint-react.js +39 -0
- package/dist/index.d.ts +150 -118
- package/dist/packages/affix/affix.d.ts +6 -11
- package/dist/packages/affix/affix.js +9 -9
- package/dist/packages/affix/affix.js.map +2 -2
- package/dist/packages/affix/affix.react.stories.d.ts +1 -1
- package/dist/packages/affix/react.d.ts +7 -2
- package/dist/packages/affix/react.js +5 -0
- package/dist/packages/alert/alert.d.ts +6 -3
- package/dist/packages/alert/alert.js +3 -3
- package/dist/packages/alert/alert.js.map +2 -2
- package/dist/packages/alert/react.d.ts +8 -1
- package/dist/packages/alert/react.js +7 -0
- package/dist/packages/attention/attention.d.ts +3 -1
- package/dist/packages/attention/attention.js +12 -12
- package/dist/packages/attention/attention.js.map +2 -2
- package/dist/packages/attention/react.d.ts +13 -3
- package/dist/packages/attention/react.js +9 -0
- package/dist/packages/badge/badge.d.ts +5 -0
- package/dist/packages/badge/badge.js.map +2 -2
- package/dist/packages/badge/react.d.ts +6 -1
- package/dist/packages/badge/react.js +5 -0
- package/dist/packages/box/box.d.ts +6 -1
- package/dist/packages/box/box.js +3 -3
- package/dist/packages/box/box.js.map +2 -2
- package/dist/packages/box/box.react.stories.d.ts +1 -1
- package/dist/packages/box/react.d.ts +6 -1
- package/dist/packages/box/react.js +5 -0
- package/dist/packages/breadcrumb-item/breadcrumb-item.d.ts +6 -1
- package/dist/packages/breadcrumb-item/breadcrumb-item.js +2 -2
- package/dist/packages/breadcrumb-item/breadcrumb-item.js.map +2 -2
- package/dist/packages/breadcrumb-item/react.d.ts +7 -1
- package/dist/packages/breadcrumb-item/react.js +6 -0
- package/dist/packages/breadcrumbs/breadcrumbs.d.ts +7 -1
- package/dist/packages/breadcrumbs/breadcrumbs.js +3 -3
- package/dist/packages/breadcrumbs/breadcrumbs.js.map +2 -2
- package/dist/packages/breadcrumbs/react.d.ts +8 -1
- package/dist/packages/breadcrumbs/react.js +7 -0
- package/dist/packages/button/button.d.ts +2 -1
- package/dist/packages/button/button.js.map +2 -2
- package/dist/packages/button/button.react.stories.d.ts +2 -2
- package/dist/packages/button/react.d.ts +9 -2
- package/dist/packages/button/react.js +7 -0
- package/dist/packages/card/card.d.ts +6 -1
- package/dist/packages/card/card.js +2 -2
- package/dist/packages/card/card.js.map +2 -2
- package/dist/packages/card/card.react.stories.d.ts +1 -1
- package/dist/packages/card/react.d.ts +6 -1
- package/dist/packages/card/react.js +5 -0
- package/dist/packages/checkbox/checkbox.d.ts +6 -0
- package/dist/packages/checkbox/checkbox.js +1 -1
- package/dist/packages/checkbox/checkbox.js.map +2 -2
- package/dist/packages/checkbox/checkbox.react.stories.d.ts +2 -2
- package/dist/packages/checkbox/react.d.ts +12 -3
- package/dist/packages/checkbox/react.js +7 -0
- package/dist/packages/checkbox-group/checkbox-group.d.ts +3 -10
- package/dist/packages/checkbox-group/checkbox-group.js.map +2 -2
- package/dist/packages/checkbox-group/react.d.ts +9 -2
- package/dist/packages/checkbox-group/react.js +7 -0
- package/dist/packages/combobox/combobox.d.ts +6 -1
- package/dist/packages/combobox/combobox.js +3 -3
- package/dist/packages/combobox/combobox.js.map +2 -2
- package/dist/packages/combobox/combobox.react.stories.d.ts +18 -2
- package/dist/packages/combobox/react.d.ts +15 -2
- package/dist/packages/combobox/react.js +9 -0
- package/dist/packages/datepicker/datepicker.d.ts +7 -4
- package/dist/packages/datepicker/datepicker.js +3 -3
- package/dist/packages/datepicker/datepicker.js.map +2 -2
- package/dist/packages/datepicker/datepicker.react.stories.d.ts +14 -14
- package/dist/packages/datepicker/react.d.ts +14 -8
- package/dist/packages/datepicker/react.js +5 -0
- package/dist/packages/expandable/expandable.d.ts +7 -0
- package/dist/packages/expandable/expandable.js +4 -4
- package/dist/packages/expandable/expandable.js.map +2 -2
- package/dist/packages/expandable/react.d.ts +6 -1
- package/dist/packages/expandable/react.js +5 -0
- package/dist/packages/icon/icon.d.ts +3 -0
- package/dist/packages/icon/icon.js.map +2 -2
- package/dist/packages/icon/react.d.ts +4 -1
- package/dist/packages/icon/react.js +3 -0
- package/dist/packages/link/link.d.ts +7 -2
- package/dist/packages/link/link.js +5 -5
- package/dist/packages/link/link.js.map +2 -2
- package/dist/packages/link/link.react.stories.d.ts +2 -2
- package/dist/packages/link/react.d.ts +7 -2
- package/dist/packages/link/react.js +5 -0
- package/dist/packages/modal/modal.d.ts +7 -0
- package/dist/packages/modal/modal.js +4 -4
- package/dist/packages/modal/modal.js.map +2 -2
- package/dist/packages/modal/react.d.ts +3 -1
- package/dist/packages/modal/react.js +2 -0
- package/dist/packages/modal-footer/modal-footer.d.ts +7 -0
- package/dist/packages/modal-footer/modal-footer.js +1 -1
- package/dist/packages/modal-footer/modal-footer.js.map +2 -2
- package/dist/packages/modal-footer/react.d.ts +6 -1
- package/dist/packages/modal-footer/react.js +5 -0
- package/dist/packages/modal-header/modal-header.d.ts +7 -0
- package/dist/packages/modal-header/modal-header.js +5 -5
- package/dist/packages/modal-header/modal-header.js.map +2 -2
- package/dist/packages/modal-header/react.d.ts +8 -3
- package/dist/packages/modal-header/react.js +5 -0
- package/dist/packages/page-indicator/page-indicator.d.ts +7 -0
- package/dist/packages/page-indicator/page-indicator.js +4 -4
- package/dist/packages/page-indicator/page-indicator.js.map +2 -2
- package/dist/packages/page-indicator/react.d.ts +8 -1
- package/dist/packages/page-indicator/react.js +7 -0
- package/dist/packages/pagination/pagination.d.ts +7 -0
- package/dist/packages/pagination/pagination.js +5 -5
- package/dist/packages/pagination/pagination.js.map +2 -2
- package/dist/packages/pagination/pagination.react.stories.d.ts +12 -4
- package/dist/packages/pagination/react.d.ts +12 -3
- package/dist/packages/pagination/react.js +5 -0
- package/dist/packages/pill/pill.d.ts +7 -0
- package/dist/packages/pill/pill.js.map +2 -2
- package/dist/packages/pill/pill.react.stories.d.ts +12 -8
- package/dist/packages/pill/pill.react.stories.js +4 -0
- package/dist/packages/pill/react.d.ts +10 -5
- package/dist/packages/pill/react.js +7 -2
- package/dist/packages/radio/radio.d.ts +6 -0
- package/dist/packages/radio/radio.js.map +2 -2
- package/dist/packages/radio/react.d.ts +8 -1
- package/dist/packages/radio/react.js +7 -0
- package/dist/packages/radio-group/radio-group.d.ts +3 -10
- package/dist/packages/radio-group/radio-group.js.map +2 -2
- package/dist/packages/radio-group/react.d.ts +11 -4
- package/dist/packages/radio-group/react.js +8 -0
- package/dist/packages/select/react.d.ts +10 -4
- package/dist/packages/select/react.js +5 -0
- package/dist/packages/select/select.d.ts +8 -2
- package/dist/packages/select/select.js +5 -5
- package/dist/packages/select/select.js.map +2 -2
- package/dist/packages/select/select.react.stories.d.ts +6 -6
- package/dist/packages/select/select.react.stories.js +4 -4
- package/dist/packages/slider/react.d.ts +7 -2
- package/dist/packages/slider/react.js +5 -0
- package/dist/packages/slider/slider.d.ts +7 -0
- package/dist/packages/slider/slider.js +6 -6
- package/dist/packages/slider/slider.js.map +2 -2
- package/dist/packages/slider/slider.react.stories.d.ts +1 -1
- package/dist/packages/slider-thumb/react.d.ts +15 -4
- package/dist/packages/slider-thumb/react.js +5 -0
- package/dist/packages/slider-thumb/slider-thumb.d.ts +5 -0
- package/dist/packages/slider-thumb/slider-thumb.js +4 -4
- package/dist/packages/slider-thumb/slider-thumb.js.map +2 -2
- package/dist/packages/snackbar/react.d.ts +40 -1
- package/dist/packages/snackbar/react.js +39 -0
- package/dist/packages/snackbar/snackbar.d.ts +2 -0
- package/dist/packages/snackbar/snackbar.js.map +2 -2
- package/dist/packages/snackbar-item/react.d.ts +8 -1
- package/dist/packages/snackbar-item/react.js +7 -0
- package/dist/packages/snackbar-item/snackbar-item.d.ts +2 -0
- package/dist/packages/snackbar-item/snackbar-item.js.map +2 -2
- package/dist/packages/step/react.d.ts +6 -1
- package/dist/packages/step/react.js +5 -0
- package/dist/packages/step/step.d.ts +8 -1
- package/dist/packages/step/step.js +7 -7
- package/dist/packages/step/step.js.map +2 -2
- package/dist/packages/step-indicator/react.d.ts +6 -1
- package/dist/packages/step-indicator/react.js +5 -0
- package/dist/packages/step-indicator/step-indicator.d.ts +7 -0
- package/dist/packages/step-indicator/step-indicator.js +2 -2
- package/dist/packages/step-indicator/step-indicator.js.map +2 -2
- package/dist/packages/switch/react.d.ts +9 -3
- package/dist/packages/switch/react.js +5 -0
- package/dist/packages/switch/switch.d.ts +7 -0
- package/dist/packages/switch/switch.js +3 -3
- package/dist/packages/switch/switch.js.map +2 -2
- package/dist/packages/switch/switch.react.stories.d.ts +2 -2
- package/dist/packages/tab/react.d.ts +9 -6
- package/dist/packages/tab/react.js +5 -2
- package/dist/packages/tab/tab.d.ts +7 -0
- package/dist/packages/tab/tab.js.map +2 -2
- package/dist/packages/tab-panel/react.d.ts +8 -1
- package/dist/packages/tab-panel/react.js +7 -0
- package/dist/packages/tab-panel/tab-panel.d.ts +3 -0
- package/dist/packages/tab-panel/tab-panel.js.map +2 -2
- package/dist/packages/tabs/react.d.ts +7 -3
- package/dist/packages/tabs/react.js +6 -2
- package/dist/packages/tabs/tabs.d.ts +3 -1
- package/dist/packages/tabs/tabs.js.map +2 -2
- package/dist/packages/textarea/react.d.ts +16 -10
- package/dist/packages/textarea/react.js +5 -0
- package/dist/packages/textarea/textarea.d.ts +6 -5
- package/dist/packages/textarea/textarea.js +5 -5
- package/dist/packages/textarea/textarea.js.map +2 -2
- package/dist/packages/textarea/textarea.react.stories.d.ts +18 -18
- package/dist/packages/textfield/react.d.ts +16 -10
- package/dist/packages/textfield/react.js +5 -0
- package/dist/packages/textfield/react.test.d.ts +1 -0
- package/dist/packages/textfield/react.test.js +20 -0
- package/dist/packages/textfield/textfield.d.ts +7 -5
- package/dist/packages/textfield/textfield.js +8 -8
- package/dist/packages/textfield/textfield.js.map +3 -3
- package/dist/packages/textfield/textfield.react.stories.d.ts +18 -18
- package/dist/packages/toast/toast.d.ts +5 -0
- package/dist/packages/toast/toast.js +4 -4
- package/dist/packages/toast/toast.js.map +2 -2
- package/dist/packages/toast-container/toast-container.d.ts +6 -1
- package/dist/packages/toast-container/toast-container.js +3 -3
- package/dist/packages/toast-container/toast-container.js.map +2 -2
- package/dist/packages/types.d.ts +16 -0
- package/dist/packages/types.js +1 -0
- package/dist/web-types.json +42 -42
- package/eik/index.js +13 -13
- package/package.json +4 -112
- package/dist/packages/slider/Slider.d.ts +0 -2
- package/dist/packages/slider/Slider.js +0 -8
- package/dist/packages/slider-thumb/SliderThumb.d.ts +0 -2
- package/dist/packages/slider-thumb/SliderThumb.js +0 -8
|
@@ -3,11 +3,11 @@ import React from "react";
|
|
|
3
3
|
import { Button } from "./react";
|
|
4
4
|
declare const _default: {
|
|
5
5
|
title: string;
|
|
6
|
-
render(args: Omit<Omit<Omit<React.HTMLAttributes<import("./button").WarpButton>, "
|
|
6
|
+
render(args: Omit<Omit<Omit<React.HTMLAttributes<import("./button").WarpButton>, "name" | "type" | "disabled" | "value" | "renderRoot" | "isUpdatePending" | "hasUpdated" | "addController" | "removeController" | "connectedCallback" | "disconnectedCallback" | "attributeChangedCallback" | "requestUpdate" | "updateComplete" | "updated" | "firstUpdated" | "resetFormControl" | "render" | "validationTarget" | "form" | "internals" | "showError" | "validationMessage" | "validity" | "validationComplete" | "checkValidity" | "formResetCallback" | "valueChangedCallback" | "validityCallback" | "validationMessageCallback" | "setValue" | "shouldFormValueUpdate" | "renderOptions" | "small" | "rel" | "variant" | "quiet" | "href" | "target" | "fullWidth" | "iconOnly" | "loading" | "buttonClass" | "commandfor" | "command" | "_handleButtonClick"> & {} & Partial<Omit<import("./button").WarpButton, keyof HTMLElement>> & React.RefAttributes<import("./button").WarpButton>, "ref">, "full-width" | "icon-only"> & {
|
|
7
7
|
fullWidth?: boolean;
|
|
8
8
|
iconOnly?: boolean;
|
|
9
9
|
} & React.RefAttributes<import("./button").WarpButton>): React.JSX.Element;
|
|
10
|
-
component: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.HTMLAttributes<import("./button").WarpButton>, "
|
|
10
|
+
component: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.HTMLAttributes<import("./button").WarpButton>, "name" | "type" | "disabled" | "value" | "renderRoot" | "isUpdatePending" | "hasUpdated" | "addController" | "removeController" | "connectedCallback" | "disconnectedCallback" | "attributeChangedCallback" | "requestUpdate" | "updateComplete" | "updated" | "firstUpdated" | "resetFormControl" | "render" | "validationTarget" | "form" | "internals" | "showError" | "validationMessage" | "validity" | "validationComplete" | "checkValidity" | "formResetCallback" | "valueChangedCallback" | "validityCallback" | "validationMessageCallback" | "setValue" | "shouldFormValueUpdate" | "renderOptions" | "small" | "rel" | "variant" | "quiet" | "href" | "target" | "fullWidth" | "iconOnly" | "loading" | "buttonClass" | "commandfor" | "command" | "_handleButtonClick"> & {} & Partial<Omit<import("./button").WarpButton, keyof HTMLElement>> & React.RefAttributes<import("./button").WarpButton>, "ref">, "full-width" | "icon-only"> & {
|
|
11
11
|
fullWidth?: boolean;
|
|
12
12
|
iconOnly?: boolean;
|
|
13
13
|
} & React.RefAttributes<import("./button").WarpButton>>;
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { WarpButton } from "./button.js";
|
|
3
|
-
|
|
2
|
+
import type { WarpButton } from "./button.js";
|
|
3
|
+
/**
|
|
4
|
+
* Performs an action or renders a link with button styling.
|
|
5
|
+
*
|
|
6
|
+
* Use button variants to match action priority, risk, and context.
|
|
7
|
+
*
|
|
8
|
+
* [Warp component reference](https://warp-ds.github.io/docs/components/button/frameworks/elements)
|
|
9
|
+
*/
|
|
10
|
+
export declare const Button: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.HTMLAttributes<WarpButton>, "name" | "type" | "disabled" | "value" | "renderRoot" | "isUpdatePending" | "hasUpdated" | "addController" | "removeController" | "connectedCallback" | "disconnectedCallback" | "attributeChangedCallback" | "requestUpdate" | "updateComplete" | "updated" | "firstUpdated" | "resetFormControl" | "render" | "validationTarget" | "form" | "internals" | "showError" | "validationMessage" | "validity" | "validationComplete" | "checkValidity" | "formResetCallback" | "valueChangedCallback" | "validityCallback" | "validationMessageCallback" | "setValue" | "shouldFormValueUpdate" | "renderOptions" | "small" | "rel" | "variant" | "quiet" | "href" | "target" | "fullWidth" | "iconOnly" | "loading" | "buttonClass" | "commandfor" | "command" | "_handleButtonClick"> & {} & Partial<Omit<WarpButton, keyof HTMLElement>> & React.RefAttributes<WarpButton>, "ref">, "full-width" | "icon-only"> & {
|
|
4
11
|
fullWidth?: boolean;
|
|
5
12
|
iconOnly?: boolean;
|
|
6
13
|
} & React.RefAttributes<WarpButton>>;
|
|
@@ -9,6 +9,13 @@ const BaseButton = createComponent({
|
|
|
9
9
|
elementClass: Component,
|
|
10
10
|
react: React,
|
|
11
11
|
});
|
|
12
|
+
/**
|
|
13
|
+
* Performs an action or renders a link with button styling.
|
|
14
|
+
*
|
|
15
|
+
* Use button variants to match action priority, risk, and context.
|
|
16
|
+
*
|
|
17
|
+
* [Warp component reference](https://warp-ds.github.io/docs/components/button/frameworks/elements)
|
|
18
|
+
*/
|
|
12
19
|
export const Button = React.forwardRef(({ fullWidth, iconOnly, ...props }, ref) => React.createElement(BaseButton, {
|
|
13
20
|
...props,
|
|
14
21
|
...(fullWidth ? { "full-width": true } : {}),
|
|
@@ -2,7 +2,7 @@ import { LitElement } from "lit";
|
|
|
2
2
|
/**
|
|
3
3
|
* Card is a layout component used for separating content areas on a page.
|
|
4
4
|
*
|
|
5
|
-
* [
|
|
5
|
+
* [Warp component reference](https://warp-ds.github.io/docs/components/card/frameworks/elements)
|
|
6
6
|
*/
|
|
7
7
|
declare class WarpCard extends LitElement {
|
|
8
8
|
static styles: import("lit").CSSResult[];
|
|
@@ -36,4 +36,9 @@ declare class WarpCard extends LitElement {
|
|
|
36
36
|
keypressed(e: KeyboardEvent): void;
|
|
37
37
|
render(): import("lit").TemplateResult<1>;
|
|
38
38
|
}
|
|
39
|
+
declare global {
|
|
40
|
+
interface HTMLElementTagNameMap {
|
|
41
|
+
"w-card": WarpCard;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
39
44
|
export { WarpCard };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var te=Object.defineProperty;var ae=Object.getOwnPropertyDescriptor;var f=(t,e,r,o)=>{for(var a=o>1?void 0:o?ae(e,r):e,s=t.length-1,i;s>=0;s--)(i=t[s])&&(a=(o?i(e,r,a):i(a))||a);return o&&a&&te(e,r,a),a};var x=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return t.reduce(function(r,o){return r.concat(typeof o=="string"?o:Array.isArray(o)?x.apply(void 0,o):typeof o=="object"&&o?Object.keys(o).map(function(a){return o[a]?a:""}):"")},[]).join(" ")};var b=t=>typeof t=="string",ie=t=>typeof t=="function",A=new Map,$="en";function
|
|
1
|
+
var te=Object.defineProperty;var ae=Object.getOwnPropertyDescriptor;var f=(t,e,r,o)=>{for(var a=o>1?void 0:o?ae(e,r):e,s=t.length-1,i;s>=0;s--)(i=t[s])&&(a=(o?i(e,r,a):i(a))||a);return o&&a&&te(e,r,a),a};var x=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return t.reduce(function(r,o){return r.concat(typeof o=="string"?o:Array.isArray(o)?x.apply(void 0,o):typeof o=="object"&&o?Object.keys(o).map(function(a){return o[a]?a:""}):"")},[]).join(" ")};var b=t=>typeof t=="string",ie=t=>typeof t=="function",A=new Map,$="en";function N(t){return[...Array.isArray(t)?t:[t],$]}function Y(t,e,r){let o=N(t);r||(r="default");let a;if(typeof r=="string")switch(a={day:"numeric",month:"short",year:"numeric"},r){case"full":a.weekday="long";case"long":a.month="long";break;case"short":a.month="numeric";break}else a=r;return k(()=>y("date",o,r),()=>new Intl.DateTimeFormat(o,a)).format(b(e)?new Date(e):e)}function ne(t,e,r){let o;if(r||(r="default"),typeof r=="string")switch(o={second:"numeric",minute:"numeric",hour:"numeric"},r){case"full":case"long":o.timeZoneName="short";break;case"short":delete o.second}else o=r;return Y(t,e,o)}function M(t,e,r){let o=N(t);return k(()=>y("number",o,r),()=>new Intl.NumberFormat(o,r)).format(e)}function P(t,e,r,{offset:o=0,...a}){let s=N(t),i=e?k(()=>y("plural-ordinal",s),()=>new Intl.PluralRules(s,{type:"ordinal"})):k(()=>y("plural-cardinal",s),()=>new Intl.PluralRules(s,{type:"cardinal"}));return a[r]??a[i.select(r-o)]??a.other}function k(t,e){let r=t(),o=A.get(r);return o||(o=e(),A.set(r,o)),o}function y(t,e,r){let o=e.join("-");return`${t}-${o}-${JSON.stringify(r)}`}var T=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,X=t=>t.replace(/\\u([a-fA-F0-9]{4})|\\x([a-fA-F0-9]{2})/g,(e,r,o)=>{if(r){let a=parseInt(r,16);return String.fromCharCode(a)}else{let a=parseInt(o,16);return String.fromCharCode(a)}}),I="%__lingui_octothorpe__%",se=(t,e,r={})=>{let o=e||t,a=i=>typeof i=="object"?i:r[i],s=(i,n)=>{let c=Object.keys(r).length?a("number"):void 0,p=M(o,i,c);return n.replace(new RegExp(I,"g"),p)};return{plural:(i,n)=>{let{offset:c=0}=n,p=P(o,!1,i,n);return s(i-c,p)},selectordinal:(i,n)=>{let{offset:c=0}=n,p=P(o,!0,i,n);return s(i-c,p)},select:ce,number:(i,n)=>M(o,i,a(n)||{style:n}),date:(i,n)=>Y(o,i,a(n)||n),time:(i,n)=>ne(o,i,a(n)||n)}},ce=(t,e)=>e[t]??e.other;function le(t,e,r){return(o={},a)=>{let s=se(e,r,a),i=(c,p=!1)=>Array.isArray(c)?c.reduce((h,m)=>{if(m==="#"&&p)return h+I;if(b(m))return h+m;let[F,g,O]=m,E={};g==="plural"||g==="selectordinal"||g==="select"?Object.entries(O).forEach(([L,oe])=>{E[L]=i(oe,g==="plural"||g==="selectordinal")}):E=O;let w;if(g){let L=s[g];w=L(o[F],E)}else w=o[F];return w==null?h:h+w},""):c,n=i(t);return b(n)&&T.test(n)?X(n):b(n)?n:n?String(n):""}}var de=Object.defineProperty,be=(t,e,r)=>e in t?de(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,pe=(t,e,r)=>(be(t,typeof e!="symbol"?e+"":e,r),r),S=class{constructor(){pe(this,"_events",{})}on(e,r){var o;return(o=this._events)[e]??(o[e]=[]),this._events[e].push(r),()=>this.removeListener(e,r)}removeListener(e,r){let o=this._getListeners(e);if(!o)return;let a=o.indexOf(r);~a&&o.splice(a,1)}emit(e,...r){let o=this._getListeners(e);o&&o.map(a=>a.apply(this,r))}_getListeners(e){let r=this._events[e];return Array.isArray(r)?r:!1}},ge=Object.defineProperty,ue=(t,e,r)=>e in t?ge(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,u=(t,e,r)=>(ue(t,typeof e!="symbol"?e+"":e,r),r),j=class extends S{constructor(e){super(),u(this,"_locale",""),u(this,"_locales"),u(this,"_localeData",{}),u(this,"_messages",{}),u(this,"_missing"),u(this,"_messageCompiler"),u(this,"t",this._.bind(this)),e.missing!=null&&(this._missing=e.missing),e.messages!=null&&this.load(e.messages),e.localeData!=null&&this.loadLocaleData(e.localeData),(typeof e.locale=="string"||e.locales)&&this.activate(e.locale??$,e.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){return this._messages[this._locale]??{}}get localeData(){return this._localeData[this._locale]??{}}_loadLocaleData(e,r){let o=this._localeData[e];o?Object.assign(o,r):this._localeData[e]=r}setMessagesCompiler(e){return this._messageCompiler=e,this}loadLocaleData(e,r){typeof e=="string"?this._loadLocaleData(e,r):Object.keys(e).forEach(o=>this._loadLocaleData(o,e[o])),this.emit("change")}_load(e,r){let o=this._messages[e];o?Object.assign(o,r):this._messages[e]=r}load(e,r){typeof e=="string"&&typeof r=="object"?this._load(e,r):Object.entries(e).forEach(([o,a])=>this._load(o,a)),this.emit("change")}loadAndActivate({locale:e,locales:r,messages:o}){this._locale=e,this._locales=r||void 0,this._messages[this._locale]=o,this.emit("change")}activate(e,r){this._locale=e,this._locales=r,this.emit("change")}_(e,r,o){if(!this.locale)throw new Error("Lingui: Attempted to call a translation function without setting a locale.\nMake sure to call `i18n.activate(locale)` before using Lingui functions.\nThis issue may also occur due to a race condition in your initialization logic.");let a=o?.message;e||(e=""),b(e)||(r=e.values||r,a=e.message,e=e.id);let s=this.messages[e],i=s===void 0,n=this._missing;if(n&&i)return ie(n)?n(this._locale,e):n;i&&this.emit("missing",{id:e,locale:this._locale});let c=s||a||e;return b(c)&&(this._messageCompiler?c=this._messageCompiler(c):console.warn(`Uncompiled message detected! Message:
|
|
2
2
|
|
|
3
3
|
> ${c}
|
|
4
4
|
|
|
@@ -6,7 +6,7 @@ That means you use raw catalog or your catalog doesn't have a translation for th
|
|
|
6
6
|
ICU features such as interpolation and plurals will not work properly for that message.
|
|
7
7
|
|
|
8
8
|
Please compile your catalog first.
|
|
9
|
-
`)),b(c)&&
|
|
9
|
+
`)),b(c)&&T.test(c)?X(c):b(c)?c:le(c,this._locale,this._locales)(r,o?.formats)}date(e,r){return Y(this._locales||this._locale,e,r)}number(e,r){return M(this._locales||this._locale,e,r)}};function ve(t={}){return new j(t)}var l=ve();import{css as ze,html as z,LitElement as Ee}from"lit";import{property as D}from"lit/decorators.js";import{ifDefined as Le}from"lit/directives/if-defined.js";var he=["en","nb","fi","da","sv"],C="en",_=t=>he.find(e=>t===e||t.toLowerCase().includes(e))||C;function U(){if(typeof window>"u"){let t=process.env.NMP_LANGUAGE||Intl.DateTimeFormat().resolvedOptions().locale;return _(t)}try{let t=R(document);if(t)return _(t);let e=xe();if(e)return _(e);let r=R(J());return r?_(r):C}catch(t){return console.warn("could not detect locale, falling back to source locale",t),C}}var V=(t,e,r,o,a)=>{l.load("en",t),l.load("nb",e),l.load("fi",r),l.load("da",o),l.load("sv",a);let s=U();l.activate(s),H(),we()},me="warp-i18n-change";function H(){typeof window>"u"||window.dispatchEvent(new Event(me))}var Z=!1;function we(){if(Z||typeof window>"u"||!document?.documentElement)return;Z=!0;let t=()=>{let a=U();l.locale!==a&&(l.activate(a),H())},e=new MutationObserver(a=>{for(let s of a)if(s.type==="attributes"&&s.attributeName==="lang"){t();break}});e.observe(document.documentElement,{attributes:!0,attributeFilter:["lang"]});let r=J();r&&r.documentElement&&r!==document&&e.observe(r.documentElement,{attributes:!0,attributeFilter:["lang"]});let o=fe();o&&e.observe(o,{attributes:!0,attributeFilter:["lang"]})}function J(){try{return window.parent?.document??null}catch{return null}}function R(t){try{return t?.documentElement?.lang??""}catch{return""}}function fe(){try{return window.frameElement??null}catch{return null}}function xe(){try{return window.frameElement?.getAttribute?.("lang")??""}catch{return""}}import{css as ke}from"lit";import{unsafeCSS as ye}from"lit";var K=ke`
|
|
10
10
|
*,
|
|
11
11
|
:before,
|
|
12
12
|
:after {
|