@warp-ds/elements 2.2.0-next.9 → 2.2.0
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 +188 -26
- package/dist/.storybook/utilities.js +52 -0
- package/dist/api.js.map +1 -1
- package/dist/custom-elements.json +1381 -2711
- package/dist/index.d.ts +942 -25
- package/dist/packages/affix/affix.react.stories.d.ts +9 -0
- package/dist/packages/affix/affix.react.stories.js +10 -0
- package/dist/packages/affix/affix.stories.js +25 -0
- package/dist/packages/affix/affix.test.js +9 -0
- package/dist/packages/affix/index.d.ts +0 -17
- package/dist/packages/affix/index.js +5 -5
- package/dist/packages/affix/index.js.map +4 -4
- package/dist/packages/affix/react.d.ts +1 -1
- package/dist/packages/affix/react.js +15 -2482
- package/dist/packages/affix/styles.js +2 -0
- package/dist/packages/alert/alert.react.stories.d.ts +13 -0
- package/dist/packages/alert/alert.react.stories.js +44 -0
- package/dist/packages/alert/alert.stories.js +68 -0
- package/dist/packages/alert/alert.test.js +18 -0
- package/dist/packages/alert/index.d.ts +1 -6
- package/dist/packages/alert/index.js +4 -4
- package/dist/packages/alert/index.js.map +4 -4
- package/dist/packages/alert/react.d.ts +1 -1
- package/dist/packages/alert/react.js +11 -2492
- package/dist/packages/alert/styles.js +2 -0
- package/dist/packages/attention/attention.react.stories.d.ts +15 -0
- package/dist/packages/attention/attention.react.stories.js +92 -0
- package/dist/packages/attention/attention.stories.d.ts +1 -0
- package/dist/packages/attention/attention.stories.js +180 -0
- package/dist/packages/attention/attention.test.js +11 -0
- package/dist/packages/attention/index.d.ts +3 -29
- package/dist/packages/attention/index.js +249 -19
- package/dist/packages/attention/index.js.map +4 -4
- package/dist/packages/attention/layout-styles.js +905 -0
- package/dist/packages/attention/locales/da/messages.mjs +1 -0
- package/dist/packages/attention/locales/en/messages.mjs +1 -0
- package/dist/packages/attention/locales/fi/messages.mjs +1 -0
- package/dist/packages/attention/locales/nb/messages.mjs +1 -0
- package/dist/packages/attention/locales/sv/messages.mjs +1 -0
- package/dist/packages/attention/react.d.ts +15 -1
- package/dist/packages/attention/react.js +17 -3405
- package/dist/packages/attention/styles.js +2 -0
- package/dist/packages/badge/badge.react.stories.d.ts +18 -0
- package/dist/packages/badge/badge.react.stories.js +60 -0
- package/dist/packages/badge/badge.stories.js +68 -0
- package/dist/packages/badge/badge.test.js +9 -0
- package/dist/packages/badge/index.d.ts +0 -5
- package/dist/packages/badge/index.js +1 -1
- package/dist/packages/badge/index.js.map +4 -4
- package/dist/packages/badge/react.d.ts +1 -1
- package/dist/packages/badge/react.js +11 -2465
- package/dist/packages/badge/styles.js +2 -0
- package/dist/packages/box/box.react.stories.d.ts +15 -0
- package/dist/packages/box/box.react.stories.js +45 -0
- package/dist/packages/box/box.stories.js +59 -0
- package/dist/packages/box/box.test.js +9 -0
- package/dist/packages/box/index.d.ts +0 -5
- package/dist/packages/box/index.js +11 -4
- package/dist/packages/box/index.js.map +4 -4
- package/dist/packages/box/react.d.ts +1 -1
- package/dist/packages/box/react.js +11 -2465
- package/dist/packages/box/slot.test.js +9 -0
- package/dist/packages/box/styles.js +2 -0
- package/dist/packages/breadcrumbs/breadcrumbs.react.stories.d.ts +13 -0
- package/dist/packages/breadcrumbs/breadcrumbs.react.stories.js +40 -0
- package/dist/packages/breadcrumbs/breadcrumbs.stories.js +60 -0
- package/dist/packages/breadcrumbs/breadcrumbs.test.js +16 -0
- package/dist/packages/breadcrumbs/index.d.ts +0 -12
- package/dist/packages/breadcrumbs/index.js +6 -6
- package/dist/packages/breadcrumbs/index.js.map +4 -4
- package/dist/packages/breadcrumbs/locales/da/messages.mjs +1 -0
- package/dist/packages/breadcrumbs/locales/en/messages.mjs +1 -0
- package/dist/packages/breadcrumbs/locales/fi/messages.mjs +1 -0
- package/dist/packages/breadcrumbs/locales/nb/messages.mjs +1 -0
- package/dist/packages/breadcrumbs/locales/sv/messages.mjs +1 -0
- package/dist/packages/breadcrumbs/react.d.ts +1 -1
- package/dist/packages/breadcrumbs/react.js +11 -2475
- package/dist/packages/breadcrumbs/styles.js +2 -0
- package/dist/packages/button/button.react.stories.d.ts +22 -0
- package/dist/packages/button/button.react.stories.js +102 -0
- package/dist/packages/button/button.stories.d.ts +4 -0
- package/dist/packages/button/button.stories.js +151 -0
- package/dist/packages/button/button.test.js +25 -0
- package/dist/packages/button/index.d.ts +0 -66
- package/dist/packages/button/index.js +17 -11
- package/dist/packages/button/index.js.map +4 -4
- package/dist/packages/button/locales/da/messages.mjs +1 -0
- package/dist/packages/button/locales/en/messages.mjs +1 -0
- package/dist/packages/button/locales/fi/messages.mjs +1 -0
- package/dist/packages/button/locales/nb/messages.mjs +1 -0
- package/dist/packages/button/locales/sv/messages.mjs +1 -0
- package/dist/packages/button/react.d.ts +1 -1
- package/dist/packages/button/react.js +10 -2684
- package/dist/packages/button/styles.js +2 -0
- package/dist/packages/card/card.react.stories.d.ts +16 -0
- package/dist/packages/card/card.react.stories.js +63 -0
- package/dist/packages/card/card.stories.js +82 -0
- package/dist/packages/card/card.test.js +9 -0
- package/dist/packages/card/index.d.ts +1 -18
- package/dist/packages/card/index.js +4 -4
- package/dist/packages/card/index.js.map +4 -4
- package/dist/packages/card/locales/da/messages.mjs +1 -0
- package/dist/packages/card/locales/en/messages.mjs +1 -0
- package/dist/packages/card/locales/fi/messages.mjs +1 -0
- package/dist/packages/card/locales/nb/messages.mjs +1 -0
- package/dist/packages/card/locales/sv/messages.mjs +1 -0
- package/dist/packages/card/react.d.ts +1 -1
- package/dist/packages/card/react.js +11 -2487
- package/dist/packages/card/styles.js +2 -0
- package/dist/packages/expandable/expandable.react.stories.d.ts +18 -0
- package/dist/packages/expandable/expandable.react.stories.js +103 -0
- package/dist/packages/expandable/expandable.stories.js +132 -0
- package/dist/packages/expandable/expandable.test.js +24 -0
- package/dist/packages/expandable/index.d.ts +2 -33
- package/dist/packages/expandable/index.js +20 -11
- package/dist/packages/expandable/index.js.map +4 -4
- package/dist/packages/expandable/react.d.ts +1 -1
- package/dist/packages/expandable/react.js +11 -2495
- package/dist/packages/expandable/styles.js +2 -0
- package/dist/packages/i18n.js +45 -0
- package/dist/packages/link/index.d.ts +0 -5
- package/dist/packages/link/index.js +93 -2640
- package/dist/packages/link/styles.js +200 -0
- package/dist/packages/modal/index.js +24 -41
- package/dist/packages/modal/index.js.map +4 -4
- package/dist/packages/modal/locales/da/messages.mjs +1 -0
- package/dist/packages/modal/locales/en/messages.mjs +1 -0
- package/dist/packages/modal/locales/fi/messages.mjs +1 -0
- package/dist/packages/modal/locales/nb/messages.mjs +1 -0
- package/dist/packages/modal/locales/sv/messages.mjs +1 -0
- package/dist/packages/modal/modal-footer.d.ts +0 -5
- package/dist/packages/{dead-toggle/index.js → modal/modal-footer.js} +20 -47
- package/dist/packages/modal/modal-footer.js.map +7 -0
- package/dist/packages/modal/modal-header.d.ts +0 -5
- package/dist/packages/{steps/index.js → modal/modal-header.js} +122 -20
- package/dist/packages/modal/modal-header.js.map +7 -0
- package/dist/packages/modal/modal-main.d.ts +0 -5
- package/dist/packages/{dead-toggle/react.js → modal/modal-main.js} +124 -59
- package/dist/packages/{box/react.js.map → modal/modal-main.js.map} +4 -4
- package/dist/packages/modal/modal.react.stories.d.ts +14 -0
- package/dist/packages/modal/modal.react.stories.js +27 -0
- package/dist/packages/modal/modal.stories.d.ts +3 -3
- package/dist/packages/modal/modal.stories.js +254 -0
- package/dist/packages/modal/react.d.ts +11 -3
- package/dist/packages/modal/react.js +31 -2754
- package/dist/packages/modal/util.js +21 -0
- package/dist/packages/pill/index.d.ts +0 -17
- package/dist/packages/pill/index.js +5 -5
- package/dist/packages/pill/index.js.map +2 -2
- package/dist/packages/pill/locales/da/messages.mjs +1 -0
- package/dist/packages/pill/locales/en/messages.mjs +1 -0
- package/dist/packages/pill/locales/fi/messages.mjs +1 -0
- package/dist/packages/pill/locales/nb/messages.mjs +1 -0
- package/dist/packages/pill/locales/sv/messages.mjs +1 -0
- package/dist/packages/pill/pill.react.stories.d.ts +23 -0
- package/dist/packages/pill/pill.react.stories.js +22 -0
- package/dist/packages/pill/pill.stories.js +33 -0
- package/dist/packages/pill/pill.test.js +25 -0
- package/dist/packages/pill/react.d.ts +7 -0
- package/dist/packages/pill/react.js +17 -0
- package/dist/packages/pill/styles.js +2 -0
- package/dist/packages/select/index.d.ts +4 -29
- package/dist/packages/select/index.js +25 -18
- package/dist/packages/select/index.js.map +3 -3
- package/dist/packages/select/locales/da/messages.mjs +1 -0
- package/dist/packages/select/locales/en/messages.mjs +1 -0
- package/dist/packages/select/locales/fi/messages.mjs +1 -0
- package/dist/packages/select/locales/nb/messages.mjs +1 -0
- package/dist/packages/select/locales/sv/messages.mjs +1 -0
- package/dist/packages/select/react.d.ts +6 -2
- package/dist/packages/select/react.js +20 -2494
- package/dist/packages/select/select.react.stories.d.ts +18 -0
- package/dist/packages/select/select.react.stories.js +28 -0
- package/dist/packages/select/select.stories.d.ts +7 -0
- package/dist/packages/select/select.stories.js +100 -0
- package/dist/packages/select/select.test.js +31 -0
- package/dist/packages/select/styles.js +2 -0
- package/dist/packages/{switch/index.js → styles.js} +5 -18
- package/dist/packages/textfield/index.d.ts +12 -26
- package/dist/packages/textfield/index.js +86 -28
- package/dist/packages/textfield/index.js.map +4 -4
- package/dist/packages/textfield/react.d.ts +11 -2
- package/dist/packages/textfield/react.js +21 -2490
- package/dist/packages/textfield/styles/w-textfield.styles.d.ts +1 -0
- package/dist/packages/textfield/styles/w-textfield.styles.js +55 -0
- package/dist/packages/textfield/styles.js +2 -0
- package/dist/packages/textfield/textfield.react.stories.d.ts +37 -0
- package/dist/packages/textfield/textfield.react.stories.js +88 -0
- package/dist/packages/textfield/textfield.stories.d.ts +1 -0
- package/dist/packages/textfield/textfield.stories.js +105 -0
- package/dist/packages/textfield/textfield.test.d.ts +1 -0
- package/dist/packages/textfield/textfield.test.js +68 -0
- package/dist/packages/toast/api.d.ts +1 -1
- package/dist/packages/toast/api.js +41 -0
- package/dist/packages/toast/index.d.ts +1 -1
- package/dist/packages/toast/index.js +17 -17
- package/dist/packages/toast/index.js.map +4 -4
- package/dist/packages/toast/locales/da/messages.mjs +1 -0
- package/dist/packages/toast/locales/en/messages.mjs +1 -0
- package/dist/packages/toast/locales/fi/messages.mjs +1 -0
- package/dist/packages/toast/locales/nb/messages.mjs +1 -0
- package/dist/packages/toast/locales/sv/messages.mjs +1 -0
- package/dist/packages/toast/styles.js +2 -0
- package/dist/packages/toast/toast-container.d.ts +1 -1
- package/dist/packages/{switch/react.js → toast/toast-container.js} +21 -38
- package/dist/packages/toast/toast-container.js.map +7 -0
- package/dist/packages/{pagination/index.js → toast/toast.js} +21 -49
- package/dist/packages/toast/toast.js.map +7 -0
- package/dist/packages/toast/toast.stories.js +50 -0
- package/dist/packages/toast/types.js +1 -0
- package/dist/packages/utils/expand-transition.d.ts +3 -3
- package/dist/packages/utils/expand-transition.js +59 -0
- package/dist/packages/utils/index.js +37 -0
- package/dist/packages/utils/unstyled-heading.d.ts +2 -3
- package/dist/packages/utils/unstyled-heading.js +22 -0
- package/dist/packages/utils/window-exists.js +1 -0
- package/dist/setup-tests.js +1 -0
- package/dist/web-types.json +150 -438
- package/package.json +39 -32
- package/dist/index.css +0 -2
- package/dist/index.css.map +0 -7
- package/dist/index.js +0 -4285
- package/dist/index.js.map +0 -7
- package/dist/packages/affix/react.js.map +0 -7
- package/dist/packages/alert/react.js.map +0 -7
- package/dist/packages/attention/react.js.map +0 -7
- package/dist/packages/badge/react.js.map +0 -7
- package/dist/packages/breadcrumbs/react.js.map +0 -7
- package/dist/packages/button/react.js.map +0 -7
- package/dist/packages/card/react.js.map +0 -7
- package/dist/packages/datepicker/DatePicker.test.d.ts +0 -1
- package/dist/packages/datepicker/datepicker.d.ts +0 -107
- package/dist/packages/datepicker/datepicker.stories.d.ts +0 -11
- package/dist/packages/datepicker/datepicker.test.d.ts +0 -2
- package/dist/packages/datepicker/index.d.ts +0 -1
- package/dist/packages/datepicker/index.js +0 -2785
- package/dist/packages/datepicker/index.js.map +0 -7
- package/dist/packages/datepicker/locales/da/messages.d.mts +0 -1
- package/dist/packages/datepicker/locales/en/messages.d.mts +0 -1
- package/dist/packages/datepicker/locales/fi/messages.d.mts +0 -1
- package/dist/packages/datepicker/locales/nb/messages.d.mts +0 -1
- package/dist/packages/datepicker/locales/sv/messages.d.mts +0 -1
- package/dist/packages/datepicker/react.d.ts +0 -2
- package/dist/packages/datepicker/react.js +0 -2805
- package/dist/packages/datepicker/react.js.map +0 -7
- package/dist/packages/datepicker/styles/w-datepicker-calendar.styles.d.ts +0 -1
- package/dist/packages/datepicker/styles/w-datepicker-day.styles.d.ts +0 -1
- package/dist/packages/datepicker/styles/w-datepicker-month.styles.d.ts +0 -1
- package/dist/packages/datepicker/styles/w-datepicker.styles.d.ts +0 -1
- package/dist/packages/datepicker/utils.d.ts +0 -13
- package/dist/packages/dead-toggle/dead-toggle.stories.d.ts +0 -10
- package/dist/packages/dead-toggle/dead-toggle.test.d.ts +0 -1
- package/dist/packages/dead-toggle/index.d.ts +0 -21
- package/dist/packages/dead-toggle/index.js.map +0 -7
- package/dist/packages/dead-toggle/react.d.ts +0 -2
- package/dist/packages/dead-toggle/react.js.map +0 -7
- package/dist/packages/expandable/react.js.map +0 -7
- package/dist/packages/link/index.js.map +0 -7
- package/dist/packages/link/link.stories.d.ts +0 -20
- package/dist/packages/link/link.test.d.ts +0 -1
- package/dist/packages/link/react.d.ts +0 -2
- package/dist/packages/link/react.js +0 -2666
- package/dist/packages/link/react.js.map +0 -7
- package/dist/packages/modal/react.js.map +0 -7
- package/dist/packages/pageindicator/index.d.ts +0 -14
- package/dist/packages/pageindicator/index.js +0 -32
- package/dist/packages/pageindicator/index.js.map +0 -7
- package/dist/packages/pageindicator/pageindicator.stories.d.ts +0 -32
- package/dist/packages/pageindicator/react.d.ts +0 -2
- package/dist/packages/pageindicator/react.js +0 -52
- package/dist/packages/pageindicator/react.js.map +0 -7
- package/dist/packages/pageindicator/style.d.ts +0 -1
- package/dist/packages/pagination/index.d.ts +0 -37
- package/dist/packages/pagination/index.js.map +0 -7
- package/dist/packages/pagination/locales/da/messages.d.mts +0 -1
- package/dist/packages/pagination/locales/en/messages.d.mts +0 -1
- package/dist/packages/pagination/locales/fi/messages.d.mts +0 -1
- package/dist/packages/pagination/locales/nb/messages.d.mts +0 -1
- package/dist/packages/pagination/locales/sv/messages.d.mts +0 -1
- package/dist/packages/pagination/pagination.stories.d.ts +0 -14
- package/dist/packages/pagination/pagination.test.d.ts +0 -1
- package/dist/packages/pagination/react.d.ts +0 -2
- package/dist/packages/pagination/react.js +0 -2514
- package/dist/packages/pagination/react.js.map +0 -7
- package/dist/packages/pagination/styles.d.ts +0 -1
- package/dist/packages/rip-and-tear-checkbox/checkbox.d.ts +0 -64
- package/dist/packages/rip-and-tear-checkbox/index.css +0 -2
- package/dist/packages/rip-and-tear-checkbox/index.css.map +0 -7
- package/dist/packages/rip-and-tear-checkbox/index.d.ts +0 -6
- package/dist/packages/rip-and-tear-checkbox/index.js +0 -36
- package/dist/packages/rip-and-tear-checkbox/index.js.map +0 -7
- package/dist/packages/rip-and-tear-radio/base-element.d.ts +0 -46
- package/dist/packages/rip-and-tear-radio/custom-error-validator.d.ts +0 -6
- package/dist/packages/rip-and-tear-radio/form-associated-element.d.ts +0 -103
- package/dist/packages/rip-and-tear-radio/index.css +0 -2
- package/dist/packages/rip-and-tear-radio/index.css.map +0 -7
- package/dist/packages/rip-and-tear-radio/index.d.ts +0 -8
- package/dist/packages/rip-and-tear-radio/index.js +0 -34
- package/dist/packages/rip-and-tear-radio/index.js.map +0 -7
- package/dist/packages/rip-and-tear-radio/invalid.d.ts +0 -8
- package/dist/packages/rip-and-tear-radio/math.d.ts +0 -1
- package/dist/packages/rip-and-tear-radio/radio-group.d.ts +0 -72
- package/dist/packages/rip-and-tear-radio/radio.d.ts +0 -38
- package/dist/packages/rip-and-tear-radio/required-validator.d.ts +0 -11
- package/dist/packages/rip-and-tear-radio/slot.d.ts +0 -20
- package/dist/packages/rip-and-tear-radio/watch.d.ts +0 -26
- package/dist/packages/select/react.js.map +0 -7
- package/dist/packages/steps/index.d.ts +0 -43
- package/dist/packages/steps/index.js.map +0 -7
- package/dist/packages/steps/locales/da/messages.d.mts +0 -1
- package/dist/packages/steps/locales/en/messages.d.mts +0 -1
- package/dist/packages/steps/locales/fi/messages.d.mts +0 -1
- package/dist/packages/steps/locales/nb/messages.d.mts +0 -1
- package/dist/packages/steps/locales/sv/messages.d.mts +0 -1
- package/dist/packages/steps/react.d.ts +0 -3
- package/dist/packages/steps/react.js +0 -2485
- package/dist/packages/steps/react.js.map +0 -7
- package/dist/packages/steps/steps.stories.d.ts +0 -12
- package/dist/packages/steps/styles.d.ts +0 -1
- package/dist/packages/switch/index.d.ts +0 -20
- package/dist/packages/switch/index.js.map +0 -7
- package/dist/packages/switch/react.d.ts +0 -2
- package/dist/packages/switch/react.js.map +0 -7
- package/dist/packages/switch/styles.d.ts +0 -1
- package/dist/packages/switch/switch.stories.d.ts +0 -9
- package/dist/packages/textfield/react.js.map +0 -7
- package/dist/vscode.css-custom-data.json +0 -6
- package/dist/vscode.html-custom-data.json +0 -421
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
import { Affix } from './react';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: import("@lit/react").ReactWebComponent<import(".").WarpAffix, {}>;
|
|
6
|
+
};
|
|
7
|
+
export default _default;
|
|
8
|
+
export type Story = StoryObj<typeof Affix>;
|
|
9
|
+
export declare const Default: Story;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { spread } from '@open-wc/lit-helpers';
|
|
2
|
+
import { getStorybookHelpers } from '@wc-toolkit/storybook-helpers';
|
|
3
|
+
import { html } from 'lit';
|
|
4
|
+
import { prespread } from '../../.storybook/utilities.js';
|
|
5
|
+
import './index.js';
|
|
6
|
+
const { events, args, argTypes } = getStorybookHelpers('w-affix');
|
|
7
|
+
const meta = {
|
|
8
|
+
title: 'Forms/Affix',
|
|
9
|
+
render(args) {
|
|
10
|
+
return html `<w-affix ${spread(prespread(args))}></w-affix>`;
|
|
11
|
+
},
|
|
12
|
+
args,
|
|
13
|
+
argTypes,
|
|
14
|
+
parameters: {
|
|
15
|
+
actions: {
|
|
16
|
+
handles: events,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
export default meta;
|
|
21
|
+
export const Default = {
|
|
22
|
+
args: {
|
|
23
|
+
label: 'kr',
|
|
24
|
+
},
|
|
25
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
import { expect, test } from 'vitest';
|
|
3
|
+
import { render } from 'vitest-browser-lit';
|
|
4
|
+
import './index.js';
|
|
5
|
+
test('renders the affix', async () => {
|
|
6
|
+
const component = html `<w-affix label="kr"></w-affix>`;
|
|
7
|
+
const page = render(component);
|
|
8
|
+
await expect.element(page.getByText('kr')).toBeVisible();
|
|
9
|
+
});
|
|
@@ -1,18 +1,6 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
2
|
import '@warp-ds/icons/elements/search-16';
|
|
3
3
|
import '@warp-ds/icons/elements/close-16';
|
|
4
|
-
export declare const ccSuffix: {
|
|
5
|
-
wrapper: string;
|
|
6
|
-
wrapperWithLabel: string;
|
|
7
|
-
wrapperWithIcon: string;
|
|
8
|
-
label: string;
|
|
9
|
-
};
|
|
10
|
-
export declare const ccPrefix: {
|
|
11
|
-
wrapper: string;
|
|
12
|
-
wrapperWithLabel: string;
|
|
13
|
-
wrapperWithIcon: string;
|
|
14
|
-
label: string;
|
|
15
|
-
};
|
|
16
4
|
/**
|
|
17
5
|
* This component is usually used in other components like form elements to show a prefix or suffix. See for example `w-textfield`.
|
|
18
6
|
*
|
|
@@ -54,8 +42,3 @@ declare class WarpAffix extends LitElement {
|
|
|
54
42
|
render(): import("lit").TemplateResult<1>;
|
|
55
43
|
}
|
|
56
44
|
export { WarpAffix };
|
|
57
|
-
declare global {
|
|
58
|
-
interface HTMLElementTagNameMap {
|
|
59
|
-
'w-affix': WarpAffix;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var be=Object.create;var S=Object.defineProperty;var A=Object.getOwnPropertyDescriptor;var pe=Object.getOwnPropertyNames;var ue=Object.getPrototypeOf,ge=Object.prototype.hasOwnProperty;var R=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var he=(r,e,o,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of pe(e))!ge.call(r,a)&&a!==o&&S(r,a,{get:()=>e[a],enumerable:!(t=A(e,a))||t.enumerable});return r};var me=(r,e,o)=>(o=r!=null?be(ue(r)):{},he(e||!r||!r.__esModule?S(o,"default",{value:r,enumerable:!0}):o,r));var x=(r,e,o,t)=>{for(var a=t>1?void 0:t?A(e,o):e,s=r.length-1,i;s>=0;s--)(i=r[s])&&(a=(t?i(e,o,a):i(a))||a);return t&&a&&S(e,o,a),a};var
|
|
2
|
-
`],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function ze(r){return _e.get(r)||r}var Ee=/\\(?:(\\)|x([\s\S]{0,2})|u(\{[^}]*\}?)|u([\s\S]{4})\\u([^{][\s\S]{0,3})|u([\s\S]{0,4})|([0-3]?[0-7]{1,2})|([\s\S])|$)/g;function q(r,e=!1){return r.replace(Ee,function(o,t,a,s,i,n,l,d,h){if(t!==void 0)return"\\";if(a!==void 0)return we(a);if(s!==void 0)return ke(s);if(i!==void 0)return J(i,n);if(l!==void 0)return J(l);if(d==="0")return"\0";if(d!==void 0)return ye(d,!e);if(h!==void 0)return ze(h);throw new SyntaxError(c.errorMessages.get(c.ErrorType.EndOfString))})}p.unraw=q;p.default=q});
|
|
1
|
+
var be=Object.create;var S=Object.defineProperty;var A=Object.getOwnPropertyDescriptor;var pe=Object.getOwnPropertyNames;var ue=Object.getPrototypeOf,ge=Object.prototype.hasOwnProperty;var R=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var he=(r,e,o,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of pe(e))!ge.call(r,a)&&a!==o&&S(r,a,{get:()=>e[a],enumerable:!(t=A(e,a))||t.enumerable});return r};var me=(r,e,o)=>(o=r!=null?be(ue(r)):{},he(e||!r||!r.__esModule?S(o,"default",{value:r,enumerable:!0}):o,r));var x=(r,e,o,t)=>{for(var a=t>1?void 0:t?A(e,o):e,s=r.length-1,i;s>=0;s--)(i=r[s])&&(a=(t?i(e,o,a):i(a))||a);return t&&a&&S(e,o,a),a};var H=R(v=>{"use strict";Object.defineProperty(v,"__esModule",{value:!0});v.errorMessages=v.ErrorType=void 0;var w;(function(r){r.MalformedUnicode="MALFORMED_UNICODE",r.MalformedHexadecimal="MALFORMED_HEXADECIMAL",r.CodePointLimit="CODE_POINT_LIMIT",r.OctalDeprecation="OCTAL_DEPRECATION",r.EndOfString="END_OF_STRING"})(w=v.ErrorType||(v.ErrorType={}));v.errorMessages=new Map([[w.MalformedUnicode,"malformed Unicode character escape sequence"],[w.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[w.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[w.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[w.EndOfString,"malformed escape sequence at end of string"]])});var K=R(p=>{"use strict";Object.defineProperty(p,"__esModule",{value:!0});p.unraw=p.errorMessages=p.ErrorType=void 0;var c=H();Object.defineProperty(p,"ErrorType",{enumerable:!0,get:function(){return c.ErrorType}});Object.defineProperty(p,"errorMessages",{enumerable:!0,get:function(){return c.errorMessages}});function fe(r){return!r.match(/[^a-f0-9]/i)?parseInt(r,16):NaN}function _(r,e,o){let t=fe(r);if(Number.isNaN(t)||o!==void 0&&o!==r.length)throw new SyntaxError(c.errorMessages.get(e));return t}function we(r){let e=_(r,c.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(e)}function J(r,e){let o=_(r,c.ErrorType.MalformedUnicode,4);if(e!==void 0){let t=_(e,c.ErrorType.MalformedUnicode,4);return String.fromCharCode(o,t)}return String.fromCharCode(o)}function xe(r){return r.charAt(0)==="{"&&r.charAt(r.length-1)==="}"}function ke(r){if(!xe(r))throw new SyntaxError(c.errorMessages.get(c.ErrorType.MalformedUnicode));let e=r.slice(1,-1),o=_(e,c.ErrorType.MalformedUnicode);try{return String.fromCodePoint(o)}catch(t){throw t instanceof RangeError?new SyntaxError(c.errorMessages.get(c.ErrorType.CodePointLimit)):t}}function ye(r,e=!1){if(e)throw new SyntaxError(c.errorMessages.get(c.ErrorType.OctalDeprecation));let o=parseInt(r,8);return String.fromCharCode(o)}var _e=new Map([["b","\b"],["f","\f"],["n",`
|
|
2
|
+
`],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function ze(r){return _e.get(r)||r}var Ee=/\\(?:(\\)|x([\s\S]{0,2})|u(\{[^}]*\}?)|u([\s\S]{4})\\u([^{][\s\S]{0,3})|u([\s\S]{0,4})|([0-3]?[0-7]{1,2})|([\s\S])|$)/g;function q(r,e=!1){return r.replace(Ee,function(o,t,a,s,i,n,l,d,h){if(t!==void 0)return"\\";if(a!==void 0)return we(a);if(s!==void 0)return ke(s);if(i!==void 0)return J(i,n);if(l!==void 0)return J(l);if(d==="0")return"\0";if(d!==void 0)return ye(d,!e);if(h!==void 0)return ze(h);throw new SyntaxError(c.errorMessages.get(c.ErrorType.EndOfString))})}p.unraw=q;p.default=q});var N=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return r.reduce(function(o,t){return o.concat(typeof t=="string"?t:Array.isArray(t)?N.apply(void 0,t):typeof t=="object"&&t?Object.keys(t).map(function(a){return t[a]?a:""}):"")},[]).join(" ")};import{html as L,LitElement as cr}from"lit";import{property as C}from"lit/decorators.js";import{ifDefined as le}from"lit/directives/if-defined.js";import{css as U}from"lit";var X=U`
|
|
3
3
|
*,
|
|
4
4
|
:before,
|
|
5
5
|
:after {
|
|
@@ -2438,7 +2438,7 @@ var be=Object.create;var S=Object.defineProperty;var A=Object.getOwnPropertyDesc
|
|
|
2438
2438
|
display: none
|
|
2439
2439
|
}
|
|
2440
2440
|
}
|
|
2441
|
-
`;import{css as ve}from"lit";var
|
|
2441
|
+
`;import{css as ve}from"lit";var Z=ve`*,:before,:after{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.focus\\:\\[--w-outline-offset\\:-2px\\]:focus{--w-outline-offset:-2px}.bg-transparent{background-color:#0000}.rounded-4{border-radius:4px}.block{display:block}.flex{display:flex}.focusable:focus{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:focus-visible{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:not(:focus-visible){outline:none}.items-center{align-items:center}.bottom-0{bottom:0}.left-0{left:0}.right-0{right:0}.top-0{top:0}.justify-center{justify-content:center}.absolute{position:absolute}.relative{position:relative}.static{position:static}.s-text{color:var(--w-s-color-text)}.w-40{width:4rem}.w-max{width:max-content}.pb-0{padding-bottom:0}.pl-12{padding-left:1.2rem}.pr-12{padding-right:1.2rem}.cursor-default{cursor:default}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-smoothing:grayscale}.font-bold{font-weight:700}.text-xs{font-size:var(--w-font-size-xs);line-height:var(--w-line-height-xs)}`;import{LitElement as Be}from"lit";import{unsafeStatic as Ye,html as Pe}from"lit/static-html.js";var Q=me(K(),1);var u=r=>typeof r=="string",Le=r=>typeof r=="function",G=new Map,W="en";function I(r){return[...Array.isArray(r)?r:[r],W]}function T(r,e,o){let t=I(r);o||(o="default");let a;if(typeof o=="string")switch(a={day:"numeric",month:"short",year:"numeric"},o){case"full":a.weekday="long";case"long":a.month="long";break;case"short":a.month="numeric";break}else a=o;return z(()=>E("date",t,o),()=>new Intl.DateTimeFormat(t,a)).format(u(e)?new Date(e):e)}function Ce(r,e,o){let t;if(o||(o="default"),typeof o=="string")switch(t={second:"numeric",minute:"numeric",hour:"numeric"},o){case"full":case"long":t.timeZoneName="short";break;case"short":delete t.second}else t=o;return T(r,e,t)}function j(r,e,o){let t=I(r);return z(()=>E("number",t,o),()=>new Intl.NumberFormat(t,o)).format(e)}function V(r,e,o,{offset:t=0,...a}){var n,l;let s=I(r),i=e?z(()=>E("plural-ordinal",s),()=>new Intl.PluralRules(s,{type:"ordinal"})):z(()=>E("plural-cardinal",s),()=>new Intl.PluralRules(s,{type:"cardinal"}));return(l=(n=a[o])!=null?n:a[i.select(o-t)])!=null?l:a.other}function z(r,e){let o=r(),t=G.get(o);return t||(t=e(),G.set(o,t)),t}function E(r,e,o){let t=e.join("-");return`${r}-${t}-${JSON.stringify(o)}`}var ee=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,re="%__lingui_octothorpe__%",Me=(r,e,o={})=>{let t=e||r,a=i=>typeof i=="object"?i:o[i],s=(i,n)=>{let l=Object.keys(o).length?a("number"):void 0,d=j(t,i,l);return n.replace(new RegExp(re,"g"),d)};return{plural:(i,n)=>{let{offset:l=0}=n,d=V(t,!1,i,n);return s(i-l,d)},selectordinal:(i,n)=>{let{offset:l=0}=n,d=V(t,!0,i,n);return s(i-l,d)},select:Oe,number:(i,n)=>j(t,i,a(n)||{style:n}),date:(i,n)=>T(t,i,a(n)||n),time:(i,n)=>Ce(t,i,a(n)||n)}},Oe=(r,e)=>{var o;return(o=e[r])!=null?o:e.other};function Se(r,e,o){return(t={},a)=>{let s=Me(e,o,a),i=(l,d=!1)=>Array.isArray(l)?l.reduce((h,k)=>{if(k==="#"&&d)return h+re;if(u(k))return h+k;let[P,m,$]=k,M={};m==="plural"||m==="selectordinal"||m==="select"?Object.entries($).forEach(([O,de])=>{M[O]=i(de,m==="plural"||m==="selectordinal")}):M=$;let y;if(m){let O=s[m];y=O(t[P],M)}else y=t[P];return y==null?h:h+y},""):l,n=i(r);return u(n)&&ee.test(n)?(0,Q.unraw)(n):u(n)?n:n?String(n):""}}var Ne=Object.defineProperty,je=(r,e,o)=>e in r?Ne(r,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[e]=o,De=(r,e,o)=>(je(r,typeof e!="symbol"?e+"":e,o),o),D=class{constructor(){De(this,"_events",{})}on(e,o){var a;var t;return(a=(t=this._events)[e])!=null||(t[e]=[]),this._events[e].push(o),()=>this.removeListener(e,o)}removeListener(e,o){let t=this._getListeners(e);if(!t)return;let a=t.indexOf(o);~a&&t.splice(a,1)}emit(e,...o){let t=this._getListeners(e);t&&t.map(a=>a.apply(this,o))}_getListeners(e){let o=this._events[e];return Array.isArray(o)?o:!1}},Fe=Object.defineProperty,Ie=(r,e,o)=>e in r?Fe(r,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[e]=o,f=(r,e,o)=>(Ie(r,typeof e!="symbol"?e+"":e,o),o),F=class extends D{constructor(e){var o;super(),f(this,"_locale",""),f(this,"_locales"),f(this,"_localeData",{}),f(this,"_messages",{}),f(this,"_missing"),f(this,"_messageCompiler"),f(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((o=e.locale)!=null?o:W,e.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){var e;return(e=this._messages[this._locale])!=null?e:{}}get localeData(){var e;return(e=this._localeData[this._locale])!=null?e:{}}_loadLocaleData(e,o){let t=this._localeData[e];t?Object.assign(t,o):this._localeData[e]=o}setMessagesCompiler(e){return this._messageCompiler=e,this}loadLocaleData(e,o){typeof e=="string"?this._loadLocaleData(e,o):Object.keys(e).forEach(t=>this._loadLocaleData(t,e[t])),this.emit("change")}_load(e,o){let t=this._messages[e];t?Object.assign(t,o):this._messages[e]=o}load(e,o){typeof e=="string"&&typeof o=="object"?this._load(e,o):Object.entries(e).forEach(([t,a])=>this._load(t,a)),this.emit("change")}loadAndActivate({locale:e,locales:o,messages:t}){this._locale=e,this._locales=o||void 0,this._messages[this._locale]=t,this.emit("change")}activate(e,o){this._locale=e,this._locales=o,this.emit("change")}_(e,o,t){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=t==null?void 0:t.message;e||(e=""),u(e)||(o=e.values||o,a=e.message,e=e.id);let s=this.messages[e],i=s===void 0,n=this._missing;if(n&&i)return Le(n)?n(this._locale,e):n;i&&this.emit("missing",{id:e,locale:this._locale});let l=s||a||e;return u(l)&&(this._messageCompiler?l=this._messageCompiler(l):console.warn(`Uncompiled message detected! Message:
|
|
2442
2442
|
|
|
2443
2443
|
> ${l}
|
|
2444
2444
|
|
|
@@ -2446,7 +2446,7 @@ That means you use raw catalog or your catalog doesn't have a translation for th
|
|
|
2446
2446
|
ICU features such as interpolation and plurals will not work properly for that message.
|
|
2447
2447
|
|
|
2448
2448
|
Please compile your catalog first.
|
|
2449
|
-
`)),u(l)&&ee.test(l)?JSON.parse(`"${l}"`):u(l)?l:Se(l,this._locale,this._locales)(o,t==null?void 0:t.formats)}date(e,o){return
|
|
2449
|
+
`)),u(l)&&ee.test(l)?JSON.parse(`"${l}"`):u(l)?l:Se(l,this._locale,this._locales)(o,t==null?void 0:t.formats)}date(e,o){return T(this._locales||this._locale,e,o)}number(e,o){return j(this._locales||this._locale,e,o)}};function Te(r={}){return new F(r)}var b=Te();var $e=JSON.parse('{"icon.title.search":["Forst\xF8rrelsesglass"]}'),Ae=JSON.parse('{"icon.title.search":["Magnifying glass"]}'),Re=JSON.parse('{"icon.title.search":["Suurennuslasi"]}'),Ue=JSON.parse('{"icon.title.search":["Forst\xF8rrelsesglas"]}'),Xe=JSON.parse('{"icon.title.search":["F\xF6rstoringsglas"]}'),oe=["en","nb","fi","da","sv"],te="en",Ze=()=>{var r;let e;switch((r=process==null?void 0:process.env)==null?void 0:r.NMP_BRAND){case"FINN":e="nb";break;case"TORI":e="fi";break;case"BLOCKET":e="sv";break;case"DBA":e="da";break;default:e="en"}return e},ae=()=>{var r;let e=(r=document==null?void 0:document.location)==null?void 0:r.hostname;return e!=null&&e.includes("finn")?"nb":e.includes("tori")?"fi":e.includes("blocket")?"sv":e.includes("dba")?"da":te},B=r=>oe.find(e=>r===e||r.toLowerCase().includes(e))||ae();function He(){var r;if(typeof window=="undefined"){let e=Ze();return B(e)}try{let e=(r=document==null?void 0:document.documentElement)==null?void 0:r.lang,o=ae();return oe.includes(e)?B(e!=null?e:o):(console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname"),B(o))}catch(e){return console.warn("could not detect locale, falling back to source locale",e),te}}var Je=(r,e,o,t,a,s)=>r==="nb"?o:r==="fi"?t:r==="da"?a:r==="sv"?s:e,qe=(r,e,o,t,a)=>{let s=He(),i=Je(s,r,e,o,t,a);b.load(s,i),b.activate(s)};qe(Ae,$e,Re,Ue,Xe);var Ke=class extends Be{render(){let r=b.t({message:"Magnifying glass",id:"icon.title.search",comment:"Title for search icon"});return Pe`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-search-16-part">${Ye(`<title>${r}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M8.905 12.102A6.042 6.042 0 1 0 4.18.981a6.042 6.042 0 0 0 4.726 11.121Zm1.909-1.289L15.5 15.5"></path></svg>`}};customElements.get("w-icon-search-16")||customElements.define("w-icon-search-16",Ke);import{LitElement as Ge}from"lit";import{unsafeStatic as Ve,html as Qe}from"lit/static-html.js";var We=JSON.parse('{"icon.title.close":["Kryss"]}'),er=JSON.parse('{"icon.title.close":["Cross"]}'),rr=JSON.parse('{"icon.title.close":["Rasti"]}'),or=JSON.parse('{"icon.title.close":["Kryds"]}'),tr=JSON.parse('{"icon.title.close":["Kryss"]}'),ie=["en","nb","fi","da","sv"],ne="en",ar=()=>{var r;let e;switch((r=process==null?void 0:process.env)==null?void 0:r.NMP_BRAND){case"FINN":e="nb";break;case"TORI":e="fi";break;case"BLOCKET":e="sv";break;case"DBA":e="da";break;default:e="en"}return e},se=()=>{var r;let e=(r=document==null?void 0:document.location)==null?void 0:r.hostname;return e!=null&&e.includes("finn")?"nb":e.includes("tori")?"fi":e.includes("blocket")?"sv":e.includes("dba")?"da":ne},Y=r=>ie.find(e=>r===e||r.toLowerCase().includes(e))||se();function ir(){var r;if(typeof window=="undefined"){let e=ar();return Y(e)}try{let e=(r=document==null?void 0:document.documentElement)==null?void 0:r.lang,o=se();return ie.includes(e)?Y(e!=null?e:o):(console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname"),Y(o))}catch(e){return console.warn("could not detect locale, falling back to source locale",e),ne}}var nr=(r,e,o,t,a,s)=>r==="nb"?o:r==="fi"?t:r==="da"?a:r==="sv"?s:e,sr=(r,e,o,t,a)=>{let s=ir(),i=nr(s,r,e,o,t,a);b.load(s,i),b.activate(s)};sr(er,We,rr,or,tr);var lr=class extends Ge{render(){let r=b.t({message:"Cross",id:"icon.title.close",comment:"Title for close icon"});return Qe`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-close-16-part">${Ve(`<title>${r}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m12.5 3.5-9 9m0-9 9 9"></path></svg>`}};customElements.get("w-icon-close-16")||customElements.define("w-icon-close-16",lr);var ce="absolute top-0 bottom-0 flex justify-center items-center focusable rounded-4 focus:[--w-outline-offset:-2px] bg-transparent ",dr={wrapper:ce+"right-0",wrapperWithLabel:"w-max pr-12",wrapperWithIcon:"w-40",label:"antialiased block relative cursor-default pb-0 font-bold text-xs s-text"},br={wrapper:ce+"left-0",wrapperWithLabel:"w-max pl-12",wrapperWithIcon:"w-40",label:"antialiased block relative cursor-default pb-0 font-bold text-xs s-text"},g=class extends cr{constructor(){super(...arguments);this.clear=!1;this.search=!1}get _classBase(){return this.slot==="suffix"?dr:br}get _classes(){return N([this._classBase.wrapper,this.label?this._classBase.wrapperWithLabel:this._classBase.wrapperWithIcon])}get _searchButton(){return L`
|
|
2450
2450
|
<button aria-label="${le(this.ariaLabel)}" class="${this._classes}" type="submit">
|
|
2451
2451
|
<w-icon-search-16></w-icon-search-16>
|
|
2452
2452
|
</button>
|
|
@@ -2458,5 +2458,5 @@ Please compile your catalog first.
|
|
|
2458
2458
|
<div class="${this._classes}">
|
|
2459
2459
|
<span class="${this._classBase.label}">${this.label}</span>
|
|
2460
2460
|
</div>
|
|
2461
|
-
`}get _markup(){if(this.label)return this._text;if(this.search)return this._searchButton;if(this.clear)return this._clearButton}render(){return L`${this._markup}`}};g.styles=[X,
|
|
2461
|
+
`}get _markup(){if(this.label)return this._text;if(this.search)return this._searchButton;if(this.clear)return this._clearButton}render(){return L`${this._markup}`}};g.styles=[X,Z],x([C({attribute:"aria-label"})],g.prototype,"ariaLabel",2),x([C({type:Boolean})],g.prototype,"clear",2),x([C({type:Boolean})],g.prototype,"search",2),x([C()],g.prototype,"label",2);customElements.get("w-affix")||customElements.define("w-affix",g);export{g as WarpAffix};
|
|
2462
2462
|
//# sourceMappingURL=index.js.map
|