@warp-ds/elements 2.9.0-next.4 → 2.9.0-next.5
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 +3346 -3296
- package/dist/docs/affix/accessibility.md +7 -0
- package/dist/docs/affix/affix.md +172 -10
- package/dist/docs/affix/api.md +26 -10
- package/dist/docs/affix/examples.md +92 -0
- package/dist/docs/affix/usage.md +47 -0
- package/dist/index.d.ts +225 -225
- package/dist/packages/affix/affix.d.ts +23 -14
- package/dist/packages/affix/affix.js +24 -11
- package/dist/packages/affix/affix.js.map +4 -4
- package/dist/packages/affix/affix.stories.d.ts +3 -0
- package/dist/packages/affix/affix.stories.js +16 -0
- package/dist/packages/affix/affix.test.js +7 -0
- package/dist/packages/affix/locales/da/messages.d.mts +1 -0
- package/dist/packages/affix/locales/da/messages.mjs +1 -0
- package/dist/packages/affix/locales/en/messages.d.mts +1 -0
- package/dist/packages/affix/locales/en/messages.mjs +1 -0
- package/dist/packages/affix/locales/fi/messages.d.mts +1 -0
- package/dist/packages/affix/locales/fi/messages.mjs +1 -0
- package/dist/packages/affix/locales/nb/messages.d.mts +1 -0
- package/dist/packages/affix/locales/nb/messages.mjs +1 -0
- package/dist/packages/affix/locales/sv/messages.d.mts +1 -0
- package/dist/packages/affix/locales/sv/messages.mjs +1 -0
- package/dist/packages/badge/badge.react.stories.d.ts +1 -1
- package/dist/packages/box/box.react.stories.d.ts +1 -1
- package/dist/packages/breadcrumbs/breadcrumbs.react.stories.d.ts +1 -1
- package/dist/packages/button/button.react.stories.d.ts +1 -1
- package/dist/packages/card/card.react.stories.d.ts +1 -1
- package/dist/packages/combobox/combobox.react.stories.d.ts +1 -1
- package/dist/packages/datepicker/datepicker.react.stories.d.ts +1 -1
- package/dist/packages/expandable/expandable.react.stories.d.ts +1 -1
- package/dist/packages/link/link.react.stories.d.ts +1 -1
- package/dist/packages/page-indicator/page-indicator.react.stories.d.ts +1 -1
- package/dist/packages/pagination/pagination.react.stories.d.ts +1 -1
- package/dist/packages/pill/pill.react.stories.d.ts +1 -1
- package/dist/packages/select/select.react.stories.d.ts +1 -1
- package/dist/packages/textarea/textarea.react.stories.d.ts +1 -1
- package/dist/packages/textfield/textfield.react.stories.d.ts +1 -1
- package/dist/packages/textfield/textfield.stories.d.ts +3 -0
- package/dist/packages/textfield/textfield.stories.js +45 -0
- package/dist/web-types.json +111 -82
- package/package.json +2 -2
|
@@ -23,3 +23,19 @@ export const Default = {
|
|
|
23
23
|
label: 'kr',
|
|
24
24
|
},
|
|
25
25
|
};
|
|
26
|
+
export const Search = {
|
|
27
|
+
args: {
|
|
28
|
+
search: true,
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
export const Clear = {
|
|
32
|
+
args: {
|
|
33
|
+
clear: true,
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
export const Icon = {
|
|
37
|
+
args: {
|
|
38
|
+
icon: 'AwardMedal',
|
|
39
|
+
ariaLabel: 'Award Medal',
|
|
40
|
+
},
|
|
41
|
+
};
|
|
@@ -7,3 +7,10 @@ test('renders the affix', async () => {
|
|
|
7
7
|
const page = render(component);
|
|
8
8
|
await expect.element(page.getByText('kr')).toBeVisible();
|
|
9
9
|
});
|
|
10
|
+
test('renders an icon when icon prop is set', async () => {
|
|
11
|
+
const page = render(html `<w-affix data-testid="affix" icon="AwardMedal"></w-affix>`);
|
|
12
|
+
const affix = (await page.getByTestId('affix').element());
|
|
13
|
+
const icon = affix.shadowRoot?.querySelector('w-icon');
|
|
14
|
+
expect(icon).toBeTruthy();
|
|
15
|
+
expect(icon?.getAttribute('name')).toBe('AwardMedal');
|
|
16
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const messages: any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*eslint-disable*/ export const messages = JSON.parse("{\"affix.aria.clearInput\":[\"Ryd input\"],\"affix.aria.search\":[\"Søg\"]}");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const messages: any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*eslint-disable*/ export const messages = JSON.parse("{\"affix.aria.clearInput\":[\"Clear input\"],\"affix.aria.search\":[\"Search\"]}");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const messages: any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*eslint-disable*/ export const messages = JSON.parse("{\"affix.aria.clearInput\":[\"Tyhjennä syöte\"],\"affix.aria.search\":[\"Hae\"]}");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const messages: any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*eslint-disable*/ export const messages = JSON.parse("{\"affix.aria.clearInput\":[\"Tøm inndata\"],\"affix.aria.search\":[\"Søk\"]}");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const messages: any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*eslint-disable*/ export const messages = JSON.parse("{\"affix.aria.clearInput\":[\"Rensa inmatning\"],\"affix.aria.search\":[\"Sök\"]}");
|
|
@@ -4,7 +4,7 @@ import { Badge } from './react';
|
|
|
4
4
|
declare const _default: {
|
|
5
5
|
title: string;
|
|
6
6
|
component: import("@lit/react").ReactWebComponent<import("./badge").WarpBadge, {}>;
|
|
7
|
-
render(args: Omit<React.HTMLAttributes<import("./badge").WarpBadge>, "
|
|
7
|
+
render(args: Omit<React.HTMLAttributes<import("./badge").WarpBadge>, "renderRoot" | "isUpdatePending" | "hasUpdated" | "addController" | "removeController" | "connectedCallback" | "disconnectedCallback" | "attributeChangedCallback" | "requestUpdate" | "updateComplete" | "render" | "renderOptions" | "variant" | "position" | "_class"> & {} & Partial<Omit<import("./badge").WarpBadge, keyof HTMLElement>> & React.RefAttributes<import("./badge").WarpBadge>): React.JSX.Element;
|
|
8
8
|
};
|
|
9
9
|
export default _default;
|
|
10
10
|
export type Story = StoryObj<typeof Badge>;
|
|
@@ -4,7 +4,7 @@ import { Box } from './react';
|
|
|
4
4
|
declare const _default: {
|
|
5
5
|
title: string;
|
|
6
6
|
component: import("@lit/react").ReactWebComponent<import("./box").WarpBox, {}>;
|
|
7
|
-
render(args: Omit<React.HTMLAttributes<import("./box").WarpBox>, "
|
|
7
|
+
render(args: Omit<React.HTMLAttributes<import("./box").WarpBox>, "renderRoot" | "isUpdatePending" | "hasUpdated" | "addController" | "removeController" | "connectedCallback" | "disconnectedCallback" | "attributeChangedCallback" | "requestUpdate" | "updateComplete" | "render" | "renderOptions" | "info" | "neutral" | "_class" | "bleed" | "bordered" | "_optOutRoleWithDefault"> & {} & Partial<Omit<import("./box").WarpBox, keyof HTMLElement>> & React.RefAttributes<import("./box").WarpBox>): React.JSX.Element;
|
|
8
8
|
};
|
|
9
9
|
export default _default;
|
|
10
10
|
export type Story = StoryObj<typeof Box>;
|
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import { Breadcrumbs } from './react';
|
|
4
4
|
declare const _default: {
|
|
5
5
|
title: string;
|
|
6
|
-
render(args: Omit<React.HTMLAttributes<import("./breadcrumbs").WarpBreadcrumbs>, "
|
|
6
|
+
render(args: Omit<React.HTMLAttributes<import("./breadcrumbs").WarpBreadcrumbs>, "renderRoot" | "isUpdatePending" | "hasUpdated" | "addController" | "removeController" | "connectedCallback" | "disconnectedCallback" | "attributeChangedCallback" | "requestUpdate" | "updateComplete" | "render" | "renderOptions" | "_children"> & {} & Partial<Omit<import("./breadcrumbs").WarpBreadcrumbs, keyof HTMLElement>> & React.RefAttributes<import("./breadcrumbs").WarpBreadcrumbs>): React.JSX.Element;
|
|
7
7
|
component: import("@lit/react").ReactWebComponent<import("./breadcrumbs").WarpBreadcrumbs, {}>;
|
|
8
8
|
};
|
|
9
9
|
export default _default;
|
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import { Button } from './react';
|
|
4
4
|
declare const _default: {
|
|
5
5
|
title: string;
|
|
6
|
-
render(args: Omit<React.HTMLAttributes<import("./button").WarpButton>, "value" | "form" | "small" | "name" | "
|
|
6
|
+
render(args: Omit<React.HTMLAttributes<import("./button").WarpButton>, "value" | "form" | "small" | "name" | "disabled" | "type" | "renderRoot" | "isUpdatePending" | "hasUpdated" | "addController" | "removeController" | "connectedCallback" | "disconnectedCallback" | "attributeChangedCallback" | "requestUpdate" | "updateComplete" | "updated" | "firstUpdated" | "resetFormControl" | "render" | "validationTarget" | "internals" | "showError" | "validationMessage" | "validity" | "validationComplete" | "checkValidity" | "formResetCallback" | "valueChangedCallback" | "validityCallback" | "validationMessageCallback" | "setValue" | "shouldFormValueUpdate" | "renderOptions" | "target" | "rel" | "variant" | "quiet" | "href" | "fullWidth" | "iconOnly" | "loading" | "buttonClass" | "ariaValueTextLoading" | "_handleButtonClick"> & {} & Partial<Omit<import("./button").WarpButton, keyof HTMLElement>> & React.RefAttributes<import("./button").WarpButton>): React.JSX.Element;
|
|
7
7
|
component: import("@lit/react").ReactWebComponent<import("./button").WarpButton, {}>;
|
|
8
8
|
};
|
|
9
9
|
export default _default;
|
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import { Card } from './react';
|
|
4
4
|
declare const _default: {
|
|
5
5
|
title: string;
|
|
6
|
-
render(args: Omit<React.HTMLAttributes<import("./card").WarpCard>, "flat" | "
|
|
6
|
+
render(args: Omit<React.HTMLAttributes<import("./card").WarpCard>, "flat" | "renderRoot" | "isUpdatePending" | "hasUpdated" | "addController" | "removeController" | "connectedCallback" | "disconnectedCallback" | "attributeChangedCallback" | "requestUpdate" | "updateComplete" | "render" | "renderOptions" | "keypressed" | "buttonText" | "selected" | "clickable" | "_containerClasses" | "_outlineClasses" | "_interactiveElement"> & {} & Partial<Omit<import("./card").WarpCard, keyof HTMLElement>> & React.RefAttributes<import("./card").WarpCard>): React.JSX.Element;
|
|
7
7
|
component: import("@lit/react").ReactWebComponent<import("./card").WarpCard, {}>;
|
|
8
8
|
};
|
|
9
9
|
export default _default;
|
|
@@ -9,7 +9,7 @@ declare const _default: {
|
|
|
9
9
|
onChange: string;
|
|
10
10
|
onchange: string;
|
|
11
11
|
}>;
|
|
12
|
-
render(args: Omit<React.HTMLAttributes<import("./combobox").WarpCombobox>, "value" | "form" | "label" | "name" | "
|
|
12
|
+
render(args: Omit<React.HTMLAttributes<import("./combobox").WarpCombobox>, "value" | "form" | "label" | "name" | "disabled" | "invalid" | "helpText" | "placeholder" | "required" | "autocomplete" | "renderRoot" | "isUpdatePending" | "hasUpdated" | "addController" | "removeController" | "connectedCallback" | "disconnectedCallback" | "attributeChangedCallback" | "requestUpdate" | "updateComplete" | "onchange" | "onselect" | "updated" | "firstUpdated" | "resetFormControl" | "render" | "validationTarget" | "internals" | "showError" | "validationMessage" | "validity" | "validationComplete" | "checkValidity" | "formResetCallback" | "valueChangedCallback" | "validityCallback" | "validationMessageCallback" | "setValue" | "shouldFormValueUpdate" | "renderOptions" | "onChange" | "onSelect" | "optional" | "options" | "openOnFocus" | "selectOnBlur" | "matchTextSegments" | "disableStaticFiltering"> & {
|
|
13
13
|
onSelect?: (e: Event) => void;
|
|
14
14
|
onselect?: (e: Event) => void;
|
|
15
15
|
onChange?: (e: Event) => void;
|
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import { DatePicker } from './react';
|
|
4
4
|
declare const _default: {
|
|
5
5
|
title: string;
|
|
6
|
-
render(args: Omit<React.HTMLAttributes<import("./datepicker").WarpDatepicker>, "value" | "input" | "form" | "label" | "name" | "locale" | "
|
|
6
|
+
render(args: Omit<React.HTMLAttributes<import("./datepicker").WarpDatepicker>, "value" | "input" | "form" | "label" | "name" | "locale" | "renderRoot" | "isUpdatePending" | "hasUpdated" | "addController" | "removeController" | "connectedCallback" | "disconnectedCallback" | "attributeChangedCallback" | "requestUpdate" | "updateComplete" | "onchange" | "updated" | "resetFormControl" | "render" | "validationTarget" | "internals" | "showError" | "validationMessage" | "validity" | "validationComplete" | "checkValidity" | "formResetCallback" | "valueChangedCallback" | "validityCallback" | "validationMessageCallback" | "setValue" | "shouldFormValueUpdate" | "renderOptions" | "onChange" | "month" | "calendar" | "wrapper" | "headerFormat" | "weekdayFormat" | "isDayDisabled" | "dayFormat" | "isCalendarOpen" | "navigationDate" | "selectedDate" | "weeks" | "toggleButton" | "previousMonthButton" | "todayCell" | "selectedCell"> & {
|
|
7
7
|
onChange?: (e: Event) => void;
|
|
8
8
|
onchange?: (e: Event) => void;
|
|
9
9
|
} & Partial<Omit<import("./datepicker").WarpDatepicker, keyof HTMLElement>> & React.RefAttributes<import("./datepicker").WarpDatepicker>): React.JSX.Element;
|
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import { Expandable } from './react';
|
|
4
4
|
declare const _default: {
|
|
5
5
|
title: string;
|
|
6
|
-
render(args: Omit<React.HTMLAttributes<import("./expandable").WarpExpandable>, "
|
|
6
|
+
render(args: Omit<React.HTMLAttributes<import("./expandable").WarpExpandable>, "renderRoot" | "isUpdatePending" | "hasUpdated" | "addController" | "removeController" | "connectedCallback" | "disconnectedCallback" | "attributeChangedCallback" | "requestUpdate" | "updateComplete" | "updated" | "firstUpdated" | "render" | "renderOptions" | "buttonClass" | "bleed" | "expanded" | "box" | "contentClass" | "noChevron" | "animated" | "headingLevel" | "_hasTitle" | "_showChevronUp" | "_expandableSlot"> & {} & Partial<Omit<import("./expandable").WarpExpandable, keyof HTMLElement>> & React.RefAttributes<import("./expandable").WarpExpandable>): React.JSX.Element;
|
|
7
7
|
component: import("@lit/react").ReactWebComponent<import("./expandable").WarpExpandable, {}>;
|
|
8
8
|
};
|
|
9
9
|
export default _default;
|
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import { Link } from './react';
|
|
4
4
|
declare const _default: {
|
|
5
5
|
title: string;
|
|
6
|
-
render(args: Omit<React.HTMLAttributes<import("./link").WarpLink>, "small" | "
|
|
6
|
+
render(args: Omit<React.HTMLAttributes<import("./link").WarpLink>, "small" | "disabled" | "renderRoot" | "isUpdatePending" | "hasUpdated" | "addController" | "removeController" | "connectedCallback" | "disconnectedCallback" | "attributeChangedCallback" | "requestUpdate" | "updateComplete" | "firstUpdated" | "render" | "renderOptions" | "target" | "rel" | "variant" | "href" | "fullWidth"> & {} & Partial<Omit<import("./link").WarpLink, keyof HTMLElement>> & React.RefAttributes<import("./link").WarpLink>): React.JSX.Element;
|
|
7
7
|
component: import("@lit/react").ReactWebComponent<import("./link").WarpLink, {}>;
|
|
8
8
|
};
|
|
9
9
|
export default _default;
|
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import { PageIndicator } from './react';
|
|
4
4
|
declare const _default: {
|
|
5
5
|
title: string;
|
|
6
|
-
render: ({ pageCount, selectedPage }: Omit<React.HTMLAttributes<import("./page-indicator").WarpPageIndicator>, "
|
|
6
|
+
render: ({ pageCount, selectedPage }: Omit<React.HTMLAttributes<import("./page-indicator").WarpPageIndicator>, "renderRoot" | "isUpdatePending" | "hasUpdated" | "addController" | "removeController" | "connectedCallback" | "disconnectedCallback" | "attributeChangedCallback" | "requestUpdate" | "updateComplete" | "render" | "renderOptions" | "selectedPage" | "pageCount"> & {} & Partial<Omit<import("./page-indicator").WarpPageIndicator, keyof HTMLElement>> & React.RefAttributes<import("./page-indicator").WarpPageIndicator>) => React.JSX.Element;
|
|
7
7
|
component: import("@lit/react").ReactWebComponent<import("./page-indicator").WarpPageIndicator, {}>;
|
|
8
8
|
};
|
|
9
9
|
export default _default;
|
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import { Pagination } from './react';
|
|
4
4
|
declare const _default: {
|
|
5
5
|
title: string;
|
|
6
|
-
render(args: Omit<React.HTMLAttributes<import("./pagination").WarpPagination>, "
|
|
6
|
+
render(args: Omit<React.HTMLAttributes<import("./pagination").WarpPagination>, "renderRoot" | "isUpdatePending" | "hasUpdated" | "addController" | "removeController" | "connectedCallback" | "disconnectedCallback" | "attributeChangedCallback" | "requestUpdate" | "updateComplete" | "render" | "renderOptions" | "baseUrl" | "pages" | "currentPageNumber" | "visiblePages" | "onPageClick" | "onpage-click" | "_currentPage" | "_visiblePages" | "shouldShowShowFirstPageButton" | "shouldShowPreviousPageButton" | "shouldShowNextPageButton" | "currentPageIndex" | "visiblePageNumbers"> & {
|
|
7
7
|
onPageClick?: (e: Event) => void;
|
|
8
8
|
'onpage-click'?: (e: Event) => void;
|
|
9
9
|
} & Partial<Omit<import("./pagination").WarpPagination, keyof HTMLElement>> & React.RefAttributes<import("./pagination").WarpPagination>): React.JSX.Element;
|
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import { Pill } from './react';
|
|
4
4
|
declare const _default: {
|
|
5
5
|
title: string;
|
|
6
|
-
render(args: Omit<React.HTMLAttributes<import("./pill").WarpPill>, "
|
|
6
|
+
render(args: Omit<React.HTMLAttributes<import("./pill").WarpPill>, "renderRoot" | "isUpdatePending" | "hasUpdated" | "addController" | "removeController" | "connectedCallback" | "disconnectedCallback" | "attributeChangedCallback" | "requestUpdate" | "updateComplete" | "onclick" | "onclose" | "render" | "renderOptions" | "onClick" | "canClose" | "onClose" | "suggestion" | "openSrLabel" | "openAriaLabel" | "closeSrLabel" | "closeAriaLabel" | "openFilterSrText" | "removeFilterSrText" | "_labelClasses" | "_closeClasses" | "_onClick" | "_onClose"> & {
|
|
7
7
|
onClick?: (e: Event) => void;
|
|
8
8
|
onclick?: (e: Event) => void;
|
|
9
9
|
onClose?: (e: Event) => void;
|
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import { Select } from './react';
|
|
4
4
|
declare const _default: {
|
|
5
5
|
title: string;
|
|
6
|
-
render(args: Omit<React.HTMLAttributes<import("./select").WarpSelect>, "value" | "form" | "label" | "name" | "
|
|
6
|
+
render(args: Omit<React.HTMLAttributes<import("./select").WarpSelect>, "value" | "form" | "label" | "name" | "disabled" | "invalid" | "helpText" | "readOnly" | "readonly" | "renderRoot" | "isUpdatePending" | "hasUpdated" | "addController" | "removeController" | "connectedCallback" | "disconnectedCallback" | "attributeChangedCallback" | "requestUpdate" | "updateComplete" | "onchange" | "updated" | "firstUpdated" | "resetFormControl" | "render" | "validationTarget" | "internals" | "showError" | "validationMessage" | "validity" | "validationComplete" | "checkValidity" | "formResetCallback" | "valueChangedCallback" | "validityCallback" | "validationMessageCallback" | "setValue" | "shouldFormValueUpdate" | "renderOptions" | "autoFocus" | "onChange" | "optional" | "willUpdate" | "formStateRestoreCallback" | "always" | "hint" | "_options" | "_setValue" | "handleKeyDown"> & {
|
|
7
7
|
onChange?: (e: Event) => void;
|
|
8
8
|
onchange?: (e: Event) => void;
|
|
9
9
|
} & Partial<Omit<import("./select").WarpSelect, keyof HTMLElement>> & React.RefAttributes<import("./select").WarpSelect>): React.JSX.Element;
|
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import { Textarea } from './react';
|
|
4
4
|
declare const _default: {
|
|
5
5
|
title: string;
|
|
6
|
-
render(args: Omit<React.HTMLAttributes<import("./textarea").WarpTextarea>, "value" | "form" | "label" | "name" | "
|
|
6
|
+
render(args: Omit<React.HTMLAttributes<import("./textarea").WarpTextarea>, "value" | "form" | "label" | "name" | "disabled" | "invalid" | "helpText" | "placeholder" | "readOnly" | "readonly" | "required" | "renderRoot" | "isUpdatePending" | "hasUpdated" | "addController" | "removeController" | "connectedCallback" | "disconnectedCallback" | "attributeChangedCallback" | "requestUpdate" | "updateComplete" | "onblur" | "onchange" | "onfocus" | "oninput" | "updated" | "firstUpdated" | "resetFormControl" | "_helptextstyles" | "_helpId" | "_id" | "_error" | "handler" | "render" | "validationTarget" | "internals" | "showError" | "validationMessage" | "validity" | "validationComplete" | "checkValidity" | "formResetCallback" | "valueChangedCallback" | "validityCallback" | "validationMessageCallback" | "setValue" | "shouldFormValueUpdate" | "renderOptions" | "onFocus" | "onBlur" | "onChange" | "onInput" | "reportValidity" | "optional" | "setCustomValidity" | "maxRows" | "minRows" | "minHeight" | "maxHeight" | "_textareaStyles"> & {
|
|
7
7
|
onBlur?: (e: Event) => void;
|
|
8
8
|
onblur?: (e: Event) => void;
|
|
9
9
|
onChange?: (e: Event) => void;
|
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import { TextField } from './react';
|
|
4
4
|
declare const _default: {
|
|
5
5
|
title: string;
|
|
6
|
-
render(args: Omit<React.HTMLAttributes<import("./textfield").WarpTextField>, "value" | "form" | "label" | "mask" | "pattern" | "name" | "size" | "
|
|
6
|
+
render(args: Omit<React.HTMLAttributes<import("./textfield").WarpTextField>, "value" | "form" | "label" | "mask" | "pattern" | "name" | "size" | "disabled" | "invalid" | "helpText" | "max" | "min" | "minLength" | "maxLength" | "placeholder" | "readOnly" | "readonly" | "required" | "type" | "step" | "autocomplete" | "formatter" | "renderRoot" | "isUpdatePending" | "hasUpdated" | "addController" | "removeController" | "connectedCallback" | "disconnectedCallback" | "attributeChangedCallback" | "requestUpdate" | "updateComplete" | "onblur" | "onchange" | "onfocus" | "oninput" | "_hasPrefix" | "_hasSuffix" | "updated" | "firstUpdated" | "resetFormControl" | "_inputstyles" | "_helptextstyles" | "_label" | "_helpId" | "_id" | "_error" | "handler" | "prefixSlotChange" | "suffixSlotChange" | "render" | "validationTarget" | "internals" | "showError" | "validationMessage" | "validity" | "validationComplete" | "checkValidity" | "formResetCallback" | "valueChangedCallback" | "validityCallback" | "validationMessageCallback" | "setValue" | "shouldFormValueUpdate" | "renderOptions" | "onFocus" | "onBlur" | "onChange" | "onInput"> & {
|
|
7
7
|
onBlur?: (e: Event) => void;
|
|
8
8
|
onblur?: (e: Event) => void;
|
|
9
9
|
onChange?: (e: Event) => void;
|
|
@@ -17,5 +17,8 @@ export declare const ReadOnly: Story;
|
|
|
17
17
|
export declare const Required: Story;
|
|
18
18
|
export declare const WithSuffix: Story;
|
|
19
19
|
export declare const WithPrefix: Story;
|
|
20
|
+
export declare const WithClearAffixResetTextfield: Story;
|
|
21
|
+
export declare const WithSearchAndClearAffixForm: Story;
|
|
22
|
+
export declare const WithIconAffix: Story;
|
|
20
23
|
export declare const Masking: Story;
|
|
21
24
|
export declare const FormParticipation: Story;
|
|
@@ -99,6 +99,51 @@ export const WithPrefix = {
|
|
|
99
99
|
`;
|
|
100
100
|
},
|
|
101
101
|
};
|
|
102
|
+
export const WithClearAffixResetTextfield = {
|
|
103
|
+
args: {
|
|
104
|
+
placeholder: '1 000 000',
|
|
105
|
+
type: 'text',
|
|
106
|
+
},
|
|
107
|
+
render(args) {
|
|
108
|
+
return html `
|
|
109
|
+
<w-textfield ${spread(prespread(args))}>
|
|
110
|
+
<w-affix slot="suffix" clear></w-affix>
|
|
111
|
+
</w-textfield>
|
|
112
|
+
`;
|
|
113
|
+
},
|
|
114
|
+
};
|
|
115
|
+
export const WithSearchAndClearAffixForm = {
|
|
116
|
+
args: {
|
|
117
|
+
label: 'Price',
|
|
118
|
+
placeholder: '1 000 000',
|
|
119
|
+
type: 'text',
|
|
120
|
+
},
|
|
121
|
+
render(args) {
|
|
122
|
+
return html `
|
|
123
|
+
<form action="javascript:alert('Form submitted!');" method="GET">
|
|
124
|
+
<w-textfield ${spread(prespread(args))}>
|
|
125
|
+
<w-affix slot="prefix" search aria-label="Search"></w-affix>
|
|
126
|
+
<w-affix slot="suffix" clear aria-label="Clear"></w-affix>
|
|
127
|
+
</w-textfield>
|
|
128
|
+
</form>
|
|
129
|
+
`;
|
|
130
|
+
},
|
|
131
|
+
};
|
|
132
|
+
export const WithIconAffix = {
|
|
133
|
+
args: {
|
|
134
|
+
label: 'Price',
|
|
135
|
+
placeholder: '1 000 000',
|
|
136
|
+
type: 'text',
|
|
137
|
+
},
|
|
138
|
+
render(args) {
|
|
139
|
+
return html `
|
|
140
|
+
<w-textfield ${spread(prespread(args))}>
|
|
141
|
+
<w-affix slot="prefix" icon="AwardMedal" aria-label="Search"></w-affix>
|
|
142
|
+
<w-affix slot="suffix" icon="Search" aria-label="Clear"></w-affix>
|
|
143
|
+
</w-textfield>
|
|
144
|
+
`;
|
|
145
|
+
},
|
|
146
|
+
};
|
|
102
147
|
export const Masking = {
|
|
103
148
|
args: {
|
|
104
149
|
label: 'Price',
|
package/dist/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"name": "@warp-ds/elements",
|
|
4
|
-
"version": "2.9.0-next.
|
|
4
|
+
"version": "2.9.0-next.4",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -49,12 +49,89 @@
|
|
|
49
49
|
"events": []
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
|
+
{
|
|
53
|
+
"name": "w-textfield",
|
|
54
|
+
"description": "A single line text input element.\n\n[See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/forms-textfield--docs)\n---\n",
|
|
55
|
+
"doc-url": "",
|
|
56
|
+
"attributes": [
|
|
57
|
+
{
|
|
58
|
+
"name": "disabled",
|
|
59
|
+
"value": { "type": "boolean", "default": "false" }
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"name": "invalid",
|
|
63
|
+
"value": { "type": "boolean", "default": "false" }
|
|
64
|
+
},
|
|
65
|
+
{ "name": "id", "value": { "type": "string" } },
|
|
66
|
+
{ "name": "label", "value": { "type": "string" } },
|
|
67
|
+
{ "name": "help-text", "value": { "type": "string" } },
|
|
68
|
+
{ "name": "size", "value": { "type": "string" } },
|
|
69
|
+
{ "name": "max", "value": { "type": "number" } },
|
|
70
|
+
{ "name": "min", "value": { "type": "number" } },
|
|
71
|
+
{ "name": "min-length", "value": { "type": "number" } },
|
|
72
|
+
{ "name": "max-length", "value": { "type": "number" } },
|
|
73
|
+
{ "name": "pattern", "value": { "type": "string" } },
|
|
74
|
+
{ "name": "placeholder", "value": { "type": "string" } },
|
|
75
|
+
{
|
|
76
|
+
"name": "read-only",
|
|
77
|
+
"value": { "type": "boolean", "default": "false" }
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"name": "readonly",
|
|
81
|
+
"value": { "type": "boolean", "default": "false" }
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"name": "required",
|
|
85
|
+
"value": { "type": "boolean", "default": "false" }
|
|
86
|
+
},
|
|
87
|
+
{ "name": "type", "value": { "type": "string" } },
|
|
88
|
+
{ "name": "value", "value": { "type": "string" } },
|
|
89
|
+
{ "name": "name", "value": { "type": "string" } },
|
|
90
|
+
{ "name": "step", "value": { "type": "number" } },
|
|
91
|
+
{
|
|
92
|
+
"name": "autocomplete",
|
|
93
|
+
"value": { "type": "string | undefined" }
|
|
94
|
+
}
|
|
95
|
+
],
|
|
96
|
+
"events": [],
|
|
97
|
+
"js": {
|
|
98
|
+
"properties": [
|
|
99
|
+
{ "name": "disabled", "type": "boolean" },
|
|
100
|
+
{ "name": "invalid", "type": "boolean" },
|
|
101
|
+
{ "name": "id", "type": "string" },
|
|
102
|
+
{ "name": "label", "type": "string" },
|
|
103
|
+
{ "name": "helpText", "type": "string" },
|
|
104
|
+
{ "name": "size", "type": "string" },
|
|
105
|
+
{ "name": "max", "type": "number" },
|
|
106
|
+
{ "name": "min", "type": "number" },
|
|
107
|
+
{ "name": "minLength", "type": "number" },
|
|
108
|
+
{ "name": "maxLength", "type": "number" },
|
|
109
|
+
{ "name": "pattern", "type": "string" },
|
|
110
|
+
{ "name": "placeholder", "type": "string" },
|
|
111
|
+
{ "name": "readOnly", "type": "boolean" },
|
|
112
|
+
{ "name": "readonly", "type": "boolean" },
|
|
113
|
+
{ "name": "required", "type": "boolean" },
|
|
114
|
+
{ "name": "type", "type": "string" },
|
|
115
|
+
{ "name": "value", "type": "string" },
|
|
116
|
+
{ "name": "name", "type": "string" },
|
|
117
|
+
{ "name": "step", "type": "number" },
|
|
118
|
+
{ "name": "autocomplete", "type": "string | undefined" },
|
|
119
|
+
{ "name": "formatter", "type": "(value: string) => string" },
|
|
120
|
+
{ "name": "_hasPrefix" },
|
|
121
|
+
{ "name": "_hasSuffix" }
|
|
122
|
+
],
|
|
123
|
+
"events": []
|
|
124
|
+
}
|
|
125
|
+
},
|
|
52
126
|
{
|
|
53
127
|
"name": "w-affix",
|
|
54
128
|
"description": "This component is usually used in other components like form elements to show a prefix or suffix. See for example `w-textfield`.\n\n[See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/forms-affix--docs)\n---\n",
|
|
55
129
|
"doc-url": "",
|
|
56
130
|
"attributes": [
|
|
57
|
-
{
|
|
131
|
+
{
|
|
132
|
+
"name": "aria-label",
|
|
133
|
+
"value": { "type": "string | null", "default": "null" }
|
|
134
|
+
},
|
|
58
135
|
{
|
|
59
136
|
"name": "clear",
|
|
60
137
|
"description": "Add this property to render a clickable Warp close icon.\n\nSet an `aria-label` that explains the action when using this.",
|
|
@@ -62,18 +139,44 @@
|
|
|
62
139
|
},
|
|
63
140
|
{
|
|
64
141
|
"name": "search",
|
|
65
|
-
"description": "Add this property to render a clickable Warp search icon
|
|
142
|
+
"description": "Add this property to render a clickable Warp search icon.",
|
|
66
143
|
"value": { "type": "boolean", "default": "false" }
|
|
67
144
|
},
|
|
68
|
-
{ "name": "label", "value": { "type": "string" } }
|
|
145
|
+
{ "name": "label", "value": { "type": "string", "default": "''" } },
|
|
146
|
+
{
|
|
147
|
+
"name": "icon",
|
|
148
|
+
"value": { "type": "string | null", "default": "null" }
|
|
149
|
+
}
|
|
69
150
|
],
|
|
70
151
|
"events": [],
|
|
71
152
|
"js": {
|
|
72
153
|
"properties": [
|
|
73
|
-
{
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
154
|
+
{
|
|
155
|
+
"name": "ariaLabel",
|
|
156
|
+
"description": "Used to override the default `aria-label`s for the internal button when `search` or `clear` is enabled.",
|
|
157
|
+
"type": "string | null"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"name": "clear",
|
|
161
|
+
"description": "Shows a clickable close icon meant for reset/clear actions, typically in a suffix slot.",
|
|
162
|
+
"type": "boolean"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"name": "search",
|
|
166
|
+
"description": "Shows a clickable search icon, typically in a prefix slot for search fields.",
|
|
167
|
+
"type": "boolean"
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"name": "label",
|
|
171
|
+
"description": "Displays plain text such as a currency or unit label (for example `kr` or `%`) instead of an icon button.",
|
|
172
|
+
"type": "string"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"name": "icon",
|
|
176
|
+
"description": "Displays a non-interactive `w-icon` in the affix area using the provided icon name (for example `Search` or `Close`) instead of text.",
|
|
177
|
+
"type": "string | null"
|
|
178
|
+
},
|
|
179
|
+
{ "name": "_icon" }
|
|
77
180
|
],
|
|
78
181
|
"events": []
|
|
79
182
|
}
|
|
@@ -1242,80 +1345,6 @@
|
|
|
1242
1345
|
"events": [{ "name": "change", "type": "CustomEvent" }]
|
|
1243
1346
|
}
|
|
1244
1347
|
},
|
|
1245
|
-
{
|
|
1246
|
-
"name": "w-textfield",
|
|
1247
|
-
"description": "A single line text input element.\n\n[See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/forms-textfield--docs)\n---\n",
|
|
1248
|
-
"doc-url": "",
|
|
1249
|
-
"attributes": [
|
|
1250
|
-
{
|
|
1251
|
-
"name": "disabled",
|
|
1252
|
-
"value": { "type": "boolean", "default": "false" }
|
|
1253
|
-
},
|
|
1254
|
-
{
|
|
1255
|
-
"name": "invalid",
|
|
1256
|
-
"value": { "type": "boolean", "default": "false" }
|
|
1257
|
-
},
|
|
1258
|
-
{ "name": "id", "value": { "type": "string" } },
|
|
1259
|
-
{ "name": "label", "value": { "type": "string" } },
|
|
1260
|
-
{ "name": "help-text", "value": { "type": "string" } },
|
|
1261
|
-
{ "name": "size", "value": { "type": "string" } },
|
|
1262
|
-
{ "name": "max", "value": { "type": "number" } },
|
|
1263
|
-
{ "name": "min", "value": { "type": "number" } },
|
|
1264
|
-
{ "name": "min-length", "value": { "type": "number" } },
|
|
1265
|
-
{ "name": "max-length", "value": { "type": "number" } },
|
|
1266
|
-
{ "name": "pattern", "value": { "type": "string" } },
|
|
1267
|
-
{ "name": "placeholder", "value": { "type": "string" } },
|
|
1268
|
-
{
|
|
1269
|
-
"name": "read-only",
|
|
1270
|
-
"value": { "type": "boolean", "default": "false" }
|
|
1271
|
-
},
|
|
1272
|
-
{
|
|
1273
|
-
"name": "readonly",
|
|
1274
|
-
"value": { "type": "boolean", "default": "false" }
|
|
1275
|
-
},
|
|
1276
|
-
{
|
|
1277
|
-
"name": "required",
|
|
1278
|
-
"value": { "type": "boolean", "default": "false" }
|
|
1279
|
-
},
|
|
1280
|
-
{ "name": "type", "value": { "type": "string" } },
|
|
1281
|
-
{ "name": "value", "value": { "type": "string" } },
|
|
1282
|
-
{ "name": "name", "value": { "type": "string" } },
|
|
1283
|
-
{ "name": "step", "value": { "type": "number" } },
|
|
1284
|
-
{
|
|
1285
|
-
"name": "autocomplete",
|
|
1286
|
-
"value": { "type": "string | undefined" }
|
|
1287
|
-
}
|
|
1288
|
-
],
|
|
1289
|
-
"events": [],
|
|
1290
|
-
"js": {
|
|
1291
|
-
"properties": [
|
|
1292
|
-
{ "name": "disabled", "type": "boolean" },
|
|
1293
|
-
{ "name": "invalid", "type": "boolean" },
|
|
1294
|
-
{ "name": "id", "type": "string" },
|
|
1295
|
-
{ "name": "label", "type": "string" },
|
|
1296
|
-
{ "name": "helpText", "type": "string" },
|
|
1297
|
-
{ "name": "size", "type": "string" },
|
|
1298
|
-
{ "name": "max", "type": "number" },
|
|
1299
|
-
{ "name": "min", "type": "number" },
|
|
1300
|
-
{ "name": "minLength", "type": "number" },
|
|
1301
|
-
{ "name": "maxLength", "type": "number" },
|
|
1302
|
-
{ "name": "pattern", "type": "string" },
|
|
1303
|
-
{ "name": "placeholder", "type": "string" },
|
|
1304
|
-
{ "name": "readOnly", "type": "boolean" },
|
|
1305
|
-
{ "name": "readonly", "type": "boolean" },
|
|
1306
|
-
{ "name": "required", "type": "boolean" },
|
|
1307
|
-
{ "name": "type", "type": "string" },
|
|
1308
|
-
{ "name": "value", "type": "string" },
|
|
1309
|
-
{ "name": "name", "type": "string" },
|
|
1310
|
-
{ "name": "step", "type": "number" },
|
|
1311
|
-
{ "name": "autocomplete", "type": "string | undefined" },
|
|
1312
|
-
{ "name": "formatter", "type": "(value: string) => string" },
|
|
1313
|
-
{ "name": "_hasPrefix" },
|
|
1314
|
-
{ "name": "_hasSuffix" }
|
|
1315
|
-
],
|
|
1316
|
-
"events": []
|
|
1317
|
-
}
|
|
1318
|
-
},
|
|
1319
1348
|
{
|
|
1320
1349
|
"name": "w-slider-thumb",
|
|
1321
1350
|
"description": "Component to place inside a `<w-slider>`.\n\n[See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/forms-slider-and-range-slider--docs)\n---\n\n\n### **Events:**\n - **thumbreset**\n- **slidervalidity**",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@warp-ds/elements",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.9.0-next.
|
|
4
|
+
"version": "2.9.0-next.5",
|
|
5
5
|
"packageManager": "pnpm@10.33.0",
|
|
6
6
|
"description": "Custom elements for Warp",
|
|
7
7
|
"exports": {
|
|
@@ -299,7 +299,7 @@
|
|
|
299
299
|
"test:module-resolution": "cd tests/module-resolution && ./setup.sh && ./test.sh",
|
|
300
300
|
"test:output-validation": "node tests/output-validation/validate-eik-output.js",
|
|
301
301
|
"test:eik-backwards-compat": "node tests/output-validation/validate-eik-backwards-compat.js",
|
|
302
|
-
"watch:
|
|
302
|
+
"watch:docs": "node ./build/docs-watch.js"
|
|
303
303
|
},
|
|
304
304
|
"repository": {
|
|
305
305
|
"type": "git",
|