@warp-ds/elements 2.2.0-next.29 → 2.2.0-next.30
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 +973 -5050
- package/dist/index.d.ts +87 -995
- package/dist/packages/link/index.js +93 -2640
- package/dist/packages/modal/index.js +5 -2717
- package/dist/packages/select/select.react.stories.d.ts +1 -1
- package/dist/packages/textfield/textfield.react.stories.d.ts +1 -1
- package/dist/packages/toast/index.js +3 -2483
- package/dist/packages/utils/index.js +37 -2
- package/dist/vscode.html-custom-data.json +13 -456
- package/dist/web-types.json +166 -1203
- package/package.json +1 -1
- package/dist/packages/combobox/combobox.react.stories.d.ts +0 -28
- package/dist/packages/combobox/combobox.react.stories.js +0 -90
- package/dist/packages/combobox/combobox.stories.d.ts +0 -18
- package/dist/packages/combobox/combobox.stories.js +0 -117
- package/dist/packages/combobox/index.d.ts +0 -95
- package/dist/packages/combobox/index.js +0 -2492
- package/dist/packages/combobox/index.js.map +0 -7
- package/dist/packages/combobox/locales/da/messages.d.mts +0 -1
- package/dist/packages/combobox/locales/da/messages.mjs +0 -1
- package/dist/packages/combobox/locales/en/messages.d.mts +0 -1
- package/dist/packages/combobox/locales/en/messages.mjs +0 -1
- package/dist/packages/combobox/locales/fi/messages.d.mts +0 -1
- package/dist/packages/combobox/locales/fi/messages.mjs +0 -1
- package/dist/packages/combobox/locales/nb/messages.d.mts +0 -1
- package/dist/packages/combobox/locales/nb/messages.mjs +0 -1
- package/dist/packages/combobox/locales/sv/messages.d.mts +0 -1
- package/dist/packages/combobox/locales/sv/messages.mjs +0 -1
- package/dist/packages/combobox/react.d.ts +0 -7
- package/dist/packages/combobox/react.js +0 -17
- package/dist/packages/combobox/styles.d.ts +0 -1
- package/dist/packages/combobox/styles.js +0 -2
- package/dist/packages/datepicker/DatePicker.test.d.ts +0 -2
- package/dist/packages/datepicker/DatePicker.test.js +0 -69
- package/dist/packages/datepicker/datepicker.d.ts +0 -102
- package/dist/packages/datepicker/datepicker.js +0 -2785
- package/dist/packages/datepicker/datepicker.js.map +0 -7
- package/dist/packages/datepicker/datepicker.react.stories.d.ts +0 -18
- package/dist/packages/datepicker/datepicker.react.stories.js +0 -26
- package/dist/packages/datepicker/datepicker.stories.d.ts +0 -12
- package/dist/packages/datepicker/datepicker.stories.js +0 -51
- package/dist/packages/datepicker/datepicker.test.d.ts +0 -2
- package/dist/packages/datepicker/datepicker.test.js +0 -62
- 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/da/messages.mjs +0 -1
- package/dist/packages/datepicker/locales/en/messages.d.mts +0 -1
- package/dist/packages/datepicker/locales/en/messages.mjs +0 -1
- package/dist/packages/datepicker/locales/fi/messages.d.mts +0 -1
- package/dist/packages/datepicker/locales/fi/messages.mjs +0 -1
- package/dist/packages/datepicker/locales/nb/messages.d.mts +0 -1
- package/dist/packages/datepicker/locales/nb/messages.mjs +0 -1
- package/dist/packages/datepicker/locales/sv/messages.d.mts +0 -1
- package/dist/packages/datepicker/locales/sv/messages.mjs +0 -1
- package/dist/packages/datepicker/react.d.ts +0 -5
- package/dist/packages/datepicker/react.js +0 -15
- package/dist/packages/datepicker/styles/w-datepicker-calendar.styles.d.ts +0 -1
- package/dist/packages/datepicker/styles/w-datepicker-calendar.styles.js +0 -15
- package/dist/packages/datepicker/styles/w-datepicker-day.styles.d.ts +0 -1
- package/dist/packages/datepicker/styles/w-datepicker-day.styles.js +0 -64
- package/dist/packages/datepicker/styles/w-datepicker-month.styles.d.ts +0 -1
- package/dist/packages/datepicker/styles/w-datepicker-month.styles.js +0 -72
- package/dist/packages/datepicker/styles/w-datepicker.styles.d.ts +0 -1
- package/dist/packages/datepicker/styles/w-datepicker.styles.js +0 -101
- package/dist/packages/datepicker/utils.d.ts +0 -13
- package/dist/packages/datepicker/utils.js +0 -28
- package/dist/packages/dead-toggle/dead-toggle.react.stories.d.ts +0 -15
- package/dist/packages/dead-toggle/dead-toggle.react.stories.js +0 -34
- package/dist/packages/dead-toggle/dead-toggle.stories.d.ts +0 -14
- package/dist/packages/dead-toggle/dead-toggle.stories.js +0 -45
- package/dist/packages/dead-toggle/dead-toggle.test.d.ts +0 -1
- package/dist/packages/dead-toggle/dead-toggle.test.js +0 -9
- package/dist/packages/dead-toggle/index.d.ts +0 -17
- package/dist/packages/dead-toggle/index.js +0 -2548
- 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 +0 -11
- package/dist/packages/link/index.js.map +0 -7
- package/dist/packages/link/link.react.stories.d.ts +0 -21
- package/dist/packages/link/link.react.stories.js +0 -96
- package/dist/packages/link/link.stories.d.ts +0 -20
- package/dist/packages/link/link.stories.js +0 -110
- package/dist/packages/link/link.test.d.ts +0 -1
- package/dist/packages/link/link.test.js +0 -9
- package/dist/packages/link/react.d.ts +0 -2
- package/dist/packages/link/react.js +0 -11
- package/dist/packages/modal/index.js.map +0 -7
- package/dist/packages/pageindicator/index.d.ts +0 -10
- package/dist/packages/pageindicator/index.js +0 -32
- package/dist/packages/pageindicator/index.js.map +0 -7
- package/dist/packages/pageindicator/pageindicator.react.stories.d.ts +0 -19
- package/dist/packages/pageindicator/pageindicator.react.stories.js +0 -20
- package/dist/packages/pageindicator/pageindicator.stories.d.ts +0 -32
- package/dist/packages/pageindicator/pageindicator.stories.js +0 -71
- package/dist/packages/pageindicator/react.d.ts +0 -2
- package/dist/packages/pageindicator/react.js +0 -11
- package/dist/packages/pageindicator/style.d.ts +0 -1
- package/dist/packages/pageindicator/style.js +0 -26
- package/dist/packages/pagination/index.d.ts +0 -32
- package/dist/packages/pagination/index.js +0 -2500
- 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/da/messages.mjs +0 -1
- package/dist/packages/pagination/locales/en/messages.d.mts +0 -1
- package/dist/packages/pagination/locales/en/messages.mjs +0 -1
- package/dist/packages/pagination/locales/fi/messages.d.mts +0 -1
- package/dist/packages/pagination/locales/fi/messages.mjs +0 -1
- package/dist/packages/pagination/locales/nb/messages.d.mts +0 -1
- package/dist/packages/pagination/locales/nb/messages.mjs +0 -1
- package/dist/packages/pagination/locales/sv/messages.d.mts +0 -1
- package/dist/packages/pagination/locales/sv/messages.mjs +0 -1
- package/dist/packages/pagination/pagination.react.stories.d.ts +0 -21
- package/dist/packages/pagination/pagination.react.stories.js +0 -45
- package/dist/packages/pagination/pagination.stories.d.ts +0 -14
- package/dist/packages/pagination/pagination.stories.js +0 -56
- package/dist/packages/pagination/pagination.test.d.ts +0 -1
- package/dist/packages/pagination/pagination.test.js +0 -76
- package/dist/packages/pagination/react.d.ts +0 -5
- package/dist/packages/pagination/react.js +0 -15
- package/dist/packages/pagination/styles.d.ts +0 -1
- package/dist/packages/pagination/styles.js +0 -2
- package/dist/packages/rip-and-tear-checkbox/checkbox.d.ts +0 -66
- package/dist/packages/rip-and-tear-checkbox/checkbox.js +0 -2592
- package/dist/packages/rip-and-tear-checkbox/checkbox.js.map +0 -7
- package/dist/packages/rip-and-tear-checkbox/checkbox.stories.d.ts +0 -8
- package/dist/packages/rip-and-tear-checkbox/checkbox.stories.js +0 -11
- package/dist/packages/rip-and-tear-checkbox/index.d.ts +0 -1
- package/dist/packages/rip-and-tear-checkbox/index.js +0 -2592
- package/dist/packages/rip-and-tear-checkbox/index.js.map +0 -7
- package/dist/packages/rip-and-tear-checkbox/react.d.ts +0 -5
- package/dist/packages/rip-and-tear-checkbox/react.js +0 -15
- package/dist/packages/rip-and-tear-checkbox/rip-and-tear-checkbox.react.stories.d.ts +0 -12
- package/dist/packages/rip-and-tear-checkbox/rip-and-tear-checkbox.react.stories.js +0 -10
- package/dist/packages/rip-and-tear-checkbox/styles.d.ts +0 -0
- package/dist/packages/rip-and-tear-checkbox/styles.js +0 -0
- package/dist/packages/rip-and-tear-radio/base-element.d.ts +0 -46
- package/dist/packages/rip-and-tear-radio/base-element.js +0 -100
- package/dist/packages/rip-and-tear-radio/custom-error-validator.d.ts +0 -6
- package/dist/packages/rip-and-tear-radio/custom-error-validator.js +0 -22
- package/dist/packages/rip-and-tear-radio/form-associated-element.d.ts +0 -103
- package/dist/packages/rip-and-tear-radio/form-associated-element.js +0 -282
- package/dist/packages/rip-and-tear-radio/host-styles.d.ts +0 -1
- package/dist/packages/rip-and-tear-radio/host-styles.js +0 -12
- package/dist/packages/rip-and-tear-radio/index.d.ts +0 -1
- package/dist/packages/rip-and-tear-radio/index.js +0 -2649
- 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/invalid.js +0 -5
- package/dist/packages/rip-and-tear-radio/math.d.ts +0 -1
- package/dist/packages/rip-and-tear-radio/math.js +0 -4
- package/dist/packages/rip-and-tear-radio/radio-group-styles.d.ts +0 -1
- package/dist/packages/rip-and-tear-radio/radio-group-styles.js +0 -59
- package/dist/packages/rip-and-tear-radio/radio-group-styles.js.map +0 -7
- package/dist/packages/rip-and-tear-radio/radio-group.d.ts +0 -72
- package/dist/packages/rip-and-tear-radio/radio-group.js +0 -2649
- package/dist/packages/rip-and-tear-radio/radio-group.js.map +0 -7
- package/dist/packages/rip-and-tear-radio/radio-styles.d.ts +0 -0
- package/dist/packages/rip-and-tear-radio/radio-styles.js +0 -1
- package/dist/packages/rip-and-tear-radio/radio-styles.js.map +0 -7
- package/dist/packages/rip-and-tear-radio/radio.d.ts +0 -38
- package/dist/packages/rip-and-tear-radio/radio.js +0 -2563
- package/dist/packages/rip-and-tear-radio/radio.js.map +0 -7
- package/dist/packages/rip-and-tear-radio/radio.stories.d.ts +0 -8
- package/dist/packages/rip-and-tear-radio/radio.stories.js +0 -2654
- package/dist/packages/rip-and-tear-radio/radio.stories.js.map +0 -7
- package/dist/packages/rip-and-tear-radio/react.d.ts +0 -9
- package/dist/packages/rip-and-tear-radio/react.js +0 -22
- package/dist/packages/rip-and-tear-radio/required-validator.d.ts +0 -11
- package/dist/packages/rip-and-tear-radio/required-validator.js +0 -34
- package/dist/packages/rip-and-tear-radio/rip-and-tear-radio.react.stories.d.ts +0 -9
- package/dist/packages/rip-and-tear-radio/rip-and-tear-radio.react.stories.js +0 -10
- package/dist/packages/rip-and-tear-radio/slot.d.ts +0 -20
- package/dist/packages/rip-and-tear-radio/slot.js +0 -71
- package/dist/packages/rip-and-tear-radio/watch.d.ts +0 -26
- package/dist/packages/rip-and-tear-radio/watch.js +0 -39
- package/dist/packages/slider/Slider.d.ts +0 -2
- package/dist/packages/slider/Slider.js +0 -8
- package/dist/packages/slider/SliderThumb.d.ts +0 -2
- package/dist/packages/slider/SliderThumb.js +0 -8
- package/dist/packages/slider/index.d.ts +0 -2
- package/dist/packages/slider/index.js +0 -2851
- package/dist/packages/slider/index.js.map +0 -7
- package/dist/packages/slider/oddbird-css-anchor-positioning.d.ts +0 -2
- package/dist/packages/slider/oddbird-css-anchor-positioning.js +0 -3
- package/dist/packages/slider/react.d.ts +0 -8
- package/dist/packages/slider/react.js +0 -20
- package/dist/packages/slider/slider-thumb.d.ts +0 -57
- package/dist/packages/slider/slider-thumb.js +0 -2705
- package/dist/packages/slider/slider-thumb.js.map +0 -7
- package/dist/packages/slider/slider.d.ts +0 -46
- package/dist/packages/slider/slider.js +0 -2587
- package/dist/packages/slider/slider.js.map +0 -7
- package/dist/packages/slider/slider.react.stories.d.ts +0 -18
- package/dist/packages/slider/slider.react.stories.js +0 -118
- package/dist/packages/slider/slider.stories.d.ts +0 -18
- package/dist/packages/slider/slider.stories.js +0 -197
- package/dist/packages/slider/slider.test.d.ts +0 -4
- package/dist/packages/slider/slider.test.js +0 -83
- package/dist/packages/slider/styles/w-slider-thumb.styles.d.ts +0 -1
- package/dist/packages/slider/styles/w-slider-thumb.styles.js +0 -167
- package/dist/packages/slider/styles/w-slider.styles.d.ts +0 -1
- package/dist/packages/slider/styles/w-slider.styles.js +0 -134
- package/dist/packages/slider/styles.d.ts +0 -1
- package/dist/packages/slider/styles.js +0 -2
- package/dist/packages/steps/index.d.ts +0 -36
- package/dist/packages/steps/index.js +0 -2465
- 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/da/messages.mjs +0 -1
- package/dist/packages/steps/locales/en/messages.d.mts +0 -1
- package/dist/packages/steps/locales/en/messages.mjs +0 -1
- package/dist/packages/steps/locales/fi/messages.d.mts +0 -1
- package/dist/packages/steps/locales/fi/messages.mjs +0 -1
- package/dist/packages/steps/locales/nb/messages.d.mts +0 -1
- package/dist/packages/steps/locales/nb/messages.mjs +0 -1
- package/dist/packages/steps/locales/sv/messages.d.mts +0 -1
- package/dist/packages/steps/locales/sv/messages.mjs +0 -1
- package/dist/packages/steps/react.d.ts +0 -3
- package/dist/packages/steps/react.js +0 -16
- package/dist/packages/steps/steps.react.stories.d.ts +0 -15
- package/dist/packages/steps/steps.react.stories.js +0 -112
- package/dist/packages/steps/steps.stories.d.ts +0 -12
- package/dist/packages/steps/steps.stories.js +0 -172
- package/dist/packages/steps/styles.d.ts +0 -1
- package/dist/packages/steps/styles.js +0 -2
- package/dist/packages/switch/index.d.ts +0 -15
- package/dist/packages/switch/index.js +0 -2455
- package/dist/packages/switch/index.js.map +0 -7
- package/dist/packages/switch/react.d.ts +0 -5
- package/dist/packages/switch/react.js +0 -15
- package/dist/packages/switch/styles.d.ts +0 -1
- package/dist/packages/switch/styles.js +0 -2
- package/dist/packages/switch/switch.react.stories.d.ts +0 -15
- package/dist/packages/switch/switch.react.stories.js +0 -29
- package/dist/packages/switch/switch.stories.d.ts +0 -9
- package/dist/packages/switch/switch.stories.js +0 -34
- package/dist/packages/tabs/index.d.ts +0 -4
- package/dist/packages/tabs/index.js +0 -2470
- package/dist/packages/tabs/index.js.map +0 -7
- package/dist/packages/tabs/react.d.ts +0 -12
- package/dist/packages/tabs/react.js +0 -31
- package/dist/packages/tabs/styles.d.ts +0 -1
- package/dist/packages/tabs/styles.js +0 -2
- package/dist/packages/tabs/tab-panel.d.ts +0 -20
- package/dist/packages/tabs/tab-panel.js +0 -2441
- package/dist/packages/tabs/tab-panel.js.map +0 -7
- package/dist/packages/tabs/tab.d.ts +0 -18
- package/dist/packages/tabs/tab.js +0 -2463
- package/dist/packages/tabs/tab.js.map +0 -7
- package/dist/packages/tabs/tabs.d.ts +0 -40
- package/dist/packages/tabs/tabs.js +0 -2448
- package/dist/packages/tabs/tabs.js.map +0 -7
- package/dist/packages/tabs/tabs.react.stories.d.ts +0 -15
- package/dist/packages/tabs/tabs.react.stories.js +0 -51
- package/dist/packages/tabs/tabs.stories.d.ts +0 -8
- package/dist/packages/tabs/tabs.stories.js +0 -2545
- package/dist/packages/tabs/tabs.stories.js.map +0 -7
- package/dist/packages/toast/index.js.map +0 -7
- package/dist/packages/toggle-styles.d.ts +0 -1
- package/dist/packages/toggle-styles.js +0 -109
- package/dist/packages/utils/index.js.map +0 -7
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const messages: any;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*eslint-disable*/ export const messages = JSON.parse("{\"datepicker.toggle.changeDate\":[\"Change date, \",[\"currentDate\"]],\"datepicker.toggle.chooseDate\":[\"Choose date\"],\"datepicker.calendar.roleDescription\":[\"Date picker\"],\"datepicker.calendar.nextMonth\":[\"Next month\"],\"datepicker.calendar.previousMonth\":[\"Previous month\"]}");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const messages: any;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*eslint-disable*/ export const messages = JSON.parse("{\"datepicker.toggle.changeDate\":[\"Change date, \",[\"currentDate\"]],\"datepicker.toggle.chooseDate\":[\"Choose date\"],\"datepicker.calendar.roleDescription\":[\"Date picker\"],\"datepicker.calendar.nextMonth\":[\"Next month\"],\"datepicker.calendar.previousMonth\":[\"Previous month\"]}");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const messages: any;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*eslint-disable*/ export const messages = JSON.parse("{\"datepicker.toggle.changeDate\":[\"Change date, \",[\"currentDate\"]],\"datepicker.toggle.chooseDate\":[\"Choose date\"],\"datepicker.calendar.roleDescription\":[\"Date picker\"],\"datepicker.calendar.nextMonth\":[\"Next month\"],\"datepicker.calendar.previousMonth\":[\"Previous month\"]}");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const messages: any;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*eslint-disable*/ export const messages = JSON.parse("{\"datepicker.toggle.changeDate\":[\"Endre dato, \",[\"currentDate\"]],\"datepicker.toggle.chooseDate\":[\"Velg dato\"],\"datepicker.calendar.roleDescription\":[\"datovelger\"],\"datepicker.calendar.nextMonth\":[\"Gå til neste måned\"],\"datepicker.calendar.previousMonth\":[\"Gå til forrige måned\"]}");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const messages: any;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*eslint-disable*/ export const messages = JSON.parse("{\"datepicker.toggle.changeDate\":[\"Change date, \",[\"currentDate\"]],\"datepicker.toggle.chooseDate\":[\"Choose date\"],\"datepicker.calendar.roleDescription\":[\"Date picker\"],\"datepicker.calendar.nextMonth\":[\"Next month\"],\"datepicker.calendar.previousMonth\":[\"Previous month\"]}");
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
2
|
-
import { createComponent } from '@lit/react';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
// decouple from CDN by providing a dummy class
|
|
5
|
-
class Component extends LitElement {
|
|
6
|
-
}
|
|
7
|
-
export const DatePicker = createComponent({
|
|
8
|
-
tagName: 'w-datepicker',
|
|
9
|
-
elementClass: Component,
|
|
10
|
-
react: React,
|
|
11
|
-
events: {
|
|
12
|
-
onChange: 'change',
|
|
13
|
-
onchange: 'change',
|
|
14
|
-
},
|
|
15
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const wDatepickerCalendarStyles: import("lit").CSSResult;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { css } from 'lit';
|
|
2
|
-
export const wDatepickerCalendarStyles = css `
|
|
3
|
-
.w-datepicker__calendar {
|
|
4
|
-
--_calendar-border-color: var(--calendar-border-color, initial);
|
|
5
|
-
--_calendar-border-style: var(--calendar-border-style, none);
|
|
6
|
-
--_calendar-border-width: var(--calendar-border-width, 0);
|
|
7
|
-
--_calendar-border-radius: var(--calendar-border-radius, 0);
|
|
8
|
-
position: relative;
|
|
9
|
-
z-index: 30;
|
|
10
|
-
|
|
11
|
-
border: var(--_calendar-border-width) var(--_calendar-border-style) var(--_calendar-border-color);
|
|
12
|
-
border-radius: var(--_calendar-border-radius);
|
|
13
|
-
padding: 16px;
|
|
14
|
-
}
|
|
15
|
-
`;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const wDatepickerDayStyles: import("lit").CSSResult;
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { css } from 'lit';
|
|
2
|
-
export const wDatepickerDayStyles = css `
|
|
3
|
-
/* === Day Cell === */
|
|
4
|
-
.w-datepicker__day {
|
|
5
|
-
/* No longer in use? */
|
|
6
|
-
--_day-in-range-background: var(--day-in-range-background, var(--w-s-color-background-primary-subtle-active));
|
|
7
|
-
|
|
8
|
-
text-align: center;
|
|
9
|
-
cursor: pointer;
|
|
10
|
-
outline: none;
|
|
11
|
-
position: relative;
|
|
12
|
-
|
|
13
|
-
color: var(--day-color, var(--w-s-color-text));
|
|
14
|
-
background-color: var(--day-background, transparent);
|
|
15
|
-
width: var(--day-width, 40px);
|
|
16
|
-
height: var(--day-height, 40px);
|
|
17
|
-
padding: var(--day-padding, 0);
|
|
18
|
-
font-weight: var(--day-font-weight, normal);
|
|
19
|
-
font-size: var(--w-font-size-s);
|
|
20
|
-
line-height: var(--w-line-height-s);
|
|
21
|
-
border-radius: var(--day-border-radius, 50%);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.w-datepicker__day:hover {
|
|
25
|
-
--day-color: var(--w-s-color-text);
|
|
26
|
-
--day-background: var(--w-s-color-background-hover);
|
|
27
|
-
--day-border-radius: 50%;
|
|
28
|
-
}
|
|
29
|
-
.w-datepicker__day:active {
|
|
30
|
-
--day-color: var(--w-s-color-text);
|
|
31
|
-
--day-background: var(--w-s-color-background-active);
|
|
32
|
-
--day-border-radius: 50%;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.w-datepicker__day:focus-visible {
|
|
36
|
-
text-decoration: none;
|
|
37
|
-
outline: 2px solid var(--w-s-color-border-focus);
|
|
38
|
-
outline-offset: var(--w-outline-offset, -2px);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/* === Day variants === */
|
|
42
|
-
.w-datepicker__day--today {
|
|
43
|
-
--day-font-weight: bold;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.w-datepicker__day--selected {
|
|
47
|
-
--day-background: var(--w-s-color-background-primary);
|
|
48
|
-
--day-color: var(--w-s-color-text-inverted);
|
|
49
|
-
--day-font-weight: bold;
|
|
50
|
-
}
|
|
51
|
-
.w-datepicker__day--selected:hover,
|
|
52
|
-
.w-datepicker__day--selected:focus-visible {
|
|
53
|
-
--day-background: var(--w-s-color-background-primary-hover);
|
|
54
|
-
--day-color: var(--w-s-color-text-inverted);
|
|
55
|
-
--day-font-weight: bold;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.w-datepicker__day--disabled,
|
|
59
|
-
.w-datepicker__day--disabled:hover {
|
|
60
|
-
--day-color: var(--w-s-color-text-disabled);
|
|
61
|
-
cursor: not-allowed;
|
|
62
|
-
pointer-events: none;
|
|
63
|
-
}
|
|
64
|
-
`;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const wDatepickerMonthStyles: import("lit").CSSResult;
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { css } from 'lit';
|
|
2
|
-
export const wDatepickerMonthStyles = css `
|
|
3
|
-
.w-datepicker__month {
|
|
4
|
-
/* Sets default used in the day fragment */
|
|
5
|
-
--day-width: 40px;
|
|
6
|
-
|
|
7
|
-
--_month-color: var(--month-color, var(--w-s-color-text));
|
|
8
|
-
--_month-font-size: var(--month-font-size, var(--w-font-size-m));
|
|
9
|
-
--_month-line-height: var(--month-line-height, var(--w-line-height-m));
|
|
10
|
-
|
|
11
|
-
--_month-table-min-width: var(--month-table-min-width, calc(var(--day-width) * 7));
|
|
12
|
-
|
|
13
|
-
--_weekdays-font-size: var(--weekdays-font-size, var(--w-font-size-xs));
|
|
14
|
-
--_weekdays-line-height: var(--weekdays-font-size, var(--w-line-height-xs));
|
|
15
|
-
--_weekdays-font-weight: var(--weekdays-font-weight, bold);
|
|
16
|
-
|
|
17
|
-
--_weekdays-padding: var(--weekdays-padding, 8px 0 4px 0);
|
|
18
|
-
|
|
19
|
-
text-align: center;
|
|
20
|
-
user-select: none;
|
|
21
|
-
display: inline-block;
|
|
22
|
-
|
|
23
|
-
color: var(--_month-color);
|
|
24
|
-
font-size: var(--_month-font-size);
|
|
25
|
-
line-height: var(--_month-line-height);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.w-datepicker__month__nav {
|
|
29
|
-
margin: 0 0 8px 0;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.w-datepicker__month__nav__header {
|
|
33
|
-
text-align: center;
|
|
34
|
-
font-weight: Bold;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.w-datepicker__table {
|
|
38
|
-
width: 100%;
|
|
39
|
-
border-spacing: 0;
|
|
40
|
-
border-collapse: collapse;
|
|
41
|
-
display: block;
|
|
42
|
-
min-width: var(--_month-table-min-width);
|
|
43
|
-
padding-top: 8px;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.w-datepicker__weekday {
|
|
47
|
-
text-align: center;
|
|
48
|
-
font-size: var(--_weekdays-font-size);
|
|
49
|
-
line-height: var(--_weekdays-line-height);
|
|
50
|
-
font-weight: var(--_weekdays-font-weight);
|
|
51
|
-
padding: var(--_weekdays-padding);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.w-datepicker__month-nav {
|
|
55
|
-
display: flex;
|
|
56
|
-
align-items: center;
|
|
57
|
-
justify-content: space-between;
|
|
58
|
-
width: 100%;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.w-datepicker__month__nav__button {
|
|
62
|
-
flex-shrink: 0;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.w-datepicker__month__nav__header {
|
|
66
|
-
flex: 1;
|
|
67
|
-
display: flex;
|
|
68
|
-
align-items: center;
|
|
69
|
-
justify-content: center;
|
|
70
|
-
text-align: center;
|
|
71
|
-
}
|
|
72
|
-
`;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const wDatepickerStyles: import("lit").CSSResult;
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import { css } from 'lit';
|
|
2
|
-
export const wDatepickerStyles = css `
|
|
3
|
-
/* CustomDatePicker.css */
|
|
4
|
-
|
|
5
|
-
/* container */
|
|
6
|
-
.w-datepicker-wrapper {
|
|
7
|
-
position: relative;
|
|
8
|
-
display: inline-block;
|
|
9
|
-
width: 100%;
|
|
10
|
-
font-size: var(--w-font-size-m);
|
|
11
|
-
line-height: var(--w-line-height-m);
|
|
12
|
-
}
|
|
13
|
-
.w-datepicker-input-wrapper {
|
|
14
|
-
position: relative;
|
|
15
|
-
}
|
|
16
|
-
/* hide the browser’s calendar icon, and prevent the native popup */
|
|
17
|
-
.w-datepicker-input {
|
|
18
|
-
/* remove default arrows/appearance */
|
|
19
|
-
-webkit-appearance: none;
|
|
20
|
-
-moz-appearance: textfield;
|
|
21
|
-
appearance: none;
|
|
22
|
-
|
|
23
|
-
/* basic styling */
|
|
24
|
-
display: block;
|
|
25
|
-
padding: 1.2rem 0.8rem;
|
|
26
|
-
border: 1px solid #ccc;
|
|
27
|
-
border-radius: 4px;
|
|
28
|
-
width: 100%;
|
|
29
|
-
height: 48px;
|
|
30
|
-
cursor: pointer;
|
|
31
|
-
font-size: var(--w-font-size-m);
|
|
32
|
-
line-height: var(--w-line-height-m);
|
|
33
|
-
background-color: var(--w-s-color-background);
|
|
34
|
-
}
|
|
35
|
-
.w-datepicker-input:hover {
|
|
36
|
-
border-color: var(--w-s-color-border-hover);
|
|
37
|
-
}
|
|
38
|
-
.w-datepicker-input:active {
|
|
39
|
-
border-color: var(--w-s-color-border-selected);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.w-datepicker-input:focus,
|
|
43
|
-
.w-datepicker-input:focus-visible {
|
|
44
|
-
outline: 2px solid var(--w-s-color-border-focus);
|
|
45
|
-
outline-offset: -2px;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.w-datepicker-input-label {
|
|
49
|
-
font-size: var(--w-font-size-s);
|
|
50
|
-
line-height: var(--w-line-height-s);
|
|
51
|
-
font-weight: 700;
|
|
52
|
-
cursor: pointer;
|
|
53
|
-
padding-bottom: 0.4rem;
|
|
54
|
-
color: var(--w-s-color-text);
|
|
55
|
-
display: block;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/* custom calendar button */
|
|
59
|
-
.w-datepicker-button {
|
|
60
|
-
position: absolute;
|
|
61
|
-
right: 2px;
|
|
62
|
-
top: 2px;
|
|
63
|
-
height: 44px;
|
|
64
|
-
width: 44px !important;
|
|
65
|
-
border-radius: 2px !important;
|
|
66
|
-
border: none;
|
|
67
|
-
cursor: pointer;
|
|
68
|
-
pointer-events: auto; /* override parent’s none */
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.w-datepicker-button:not(:hover) {
|
|
72
|
-
background-color: var(--w-s-color-background) !important;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
input[type='date']::-webkit-inner-spin-button,
|
|
76
|
-
input[type='date']::-webkit-calendar-picker-indicator {
|
|
77
|
-
display: none;
|
|
78
|
-
-webkit-appearance: none;
|
|
79
|
-
}
|
|
80
|
-
input[type='date'],
|
|
81
|
-
input[type='time'],
|
|
82
|
-
input[type='datetime-local'],
|
|
83
|
-
input[type='month'] {
|
|
84
|
-
-webkit-appearance: none;
|
|
85
|
-
-moz-appearance: none;
|
|
86
|
-
appearance: none;
|
|
87
|
-
}
|
|
88
|
-
/* Temporary dropdown, should probably use the appropriate component when it is done */
|
|
89
|
-
.w-dropdown__popover {
|
|
90
|
-
position: absolute;
|
|
91
|
-
width: max-content;
|
|
92
|
-
background-color: var(--w-s-color-background);
|
|
93
|
-
box-shadow: var(--w-shadow-s);
|
|
94
|
-
z-index: 100;
|
|
95
|
-
border-radius: 8px;
|
|
96
|
-
visibility: hidden;
|
|
97
|
-
}
|
|
98
|
-
.w-dropdown__popover--open {
|
|
99
|
-
visibility: visible;
|
|
100
|
-
}
|
|
101
|
-
`;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Parses an ISO-8601 string into a JS Date.
|
|
3
|
-
*
|
|
4
|
-
* Supports:
|
|
5
|
-
* - YYYY-MM-DD
|
|
6
|
-
* - YYYY-MM-DDThh:mm:ss(.sss)?(Z|±hh:mm)?
|
|
7
|
-
*
|
|
8
|
-
* @param {string} isoString
|
|
9
|
-
* @returns {Date}
|
|
10
|
-
* @throws {TypeError} if input isn’t a string
|
|
11
|
-
* @throws {Error} if string is not a valid ISO-8601 date
|
|
12
|
-
*/
|
|
13
|
-
export declare function fromISOToDate(isoString: string): Date | null;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
const dateOnlyRe = /^\d{4}-\d{2}-\d{2}$/;
|
|
2
|
-
/**
|
|
3
|
-
* Parses an ISO-8601 string into a JS Date.
|
|
4
|
-
*
|
|
5
|
-
* Supports:
|
|
6
|
-
* - YYYY-MM-DD
|
|
7
|
-
* - YYYY-MM-DDThh:mm:ss(.sss)?(Z|±hh:mm)?
|
|
8
|
-
*
|
|
9
|
-
* @param {string} isoString
|
|
10
|
-
* @returns {Date}
|
|
11
|
-
* @throws {TypeError} if input isn’t a string
|
|
12
|
-
* @throws {Error} if string is not a valid ISO-8601 date
|
|
13
|
-
*/
|
|
14
|
-
export function fromISOToDate(isoString) {
|
|
15
|
-
if (typeof isoString !== 'string') {
|
|
16
|
-
return null;
|
|
17
|
-
}
|
|
18
|
-
// If it's a bare date (YYYY-MM-DD), treat it as UTC midnight
|
|
19
|
-
let normalized = isoString;
|
|
20
|
-
if (dateOnlyRe.test(isoString)) {
|
|
21
|
-
normalized = `${isoString}T00:00:00Z`;
|
|
22
|
-
}
|
|
23
|
-
const timestamp = Date.parse(normalized);
|
|
24
|
-
if (Number.isNaN(timestamp)) {
|
|
25
|
-
return null;
|
|
26
|
-
}
|
|
27
|
-
return new Date(timestamp);
|
|
28
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { StoryObj } from '@storybook/react';
|
|
3
|
-
import { DeadToggle } from './react';
|
|
4
|
-
declare const _default: {
|
|
5
|
-
title: string;
|
|
6
|
-
render(args: Omit<React.HTMLAttributes<import(".").WarpDeadToggle>, "render" | "renderOptions" | "connectedCallback" | "disconnectedCallback" | "renderRoot" | "isUpdatePending" | "hasUpdated" | "addController" | "removeController" | "attributeChangedCallback" | "requestUpdate" | "updateComplete" | "disabled" | "type" | "invalid" | "checked" | "indeterminate" | "indeterminateMarker"> & {} & Partial<Omit<import(".").WarpDeadToggle, keyof HTMLElement>> & React.RefAttributes<import(".").WarpDeadToggle>): React.JSX.Element;
|
|
7
|
-
component: import("@lit/react").ReactWebComponent<import(".").WarpDeadToggle, {}>;
|
|
8
|
-
};
|
|
9
|
-
export default _default;
|
|
10
|
-
export type Story = StoryObj<typeof DeadToggle>;
|
|
11
|
-
export declare const Radio: Story;
|
|
12
|
-
export declare const Checkbox: Story;
|
|
13
|
-
export declare const Indeterminate: Story;
|
|
14
|
-
export declare const Checked: Story;
|
|
15
|
-
export declare const Invalid: Story;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { DeadToggle } from './react';
|
|
3
|
-
export default {
|
|
4
|
-
title: 'Forms/Dead toggle',
|
|
5
|
-
render(args) {
|
|
6
|
-
return React.createElement(DeadToggle, { ...args });
|
|
7
|
-
},
|
|
8
|
-
component: DeadToggle,
|
|
9
|
-
};
|
|
10
|
-
export const Radio = {
|
|
11
|
-
args: {
|
|
12
|
-
type: 'radio',
|
|
13
|
-
},
|
|
14
|
-
};
|
|
15
|
-
export const Checkbox = {
|
|
16
|
-
args: {
|
|
17
|
-
type: 'checkbox',
|
|
18
|
-
},
|
|
19
|
-
};
|
|
20
|
-
export const Indeterminate = {
|
|
21
|
-
args: {
|
|
22
|
-
indeterminate: true,
|
|
23
|
-
},
|
|
24
|
-
};
|
|
25
|
-
export const Checked = {
|
|
26
|
-
args: {
|
|
27
|
-
checked: true,
|
|
28
|
-
},
|
|
29
|
-
};
|
|
30
|
-
export const Invalid = {
|
|
31
|
-
args: {
|
|
32
|
-
invalid: true,
|
|
33
|
-
},
|
|
34
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/web-components-vite';
|
|
2
|
-
import type { WarpDeadToggle } from './index.js';
|
|
3
|
-
import './index.js';
|
|
4
|
-
declare const args: Partial<WarpDeadToggle> & {
|
|
5
|
-
[key: string]: any;
|
|
6
|
-
};
|
|
7
|
-
declare const meta: Meta<typeof args>;
|
|
8
|
-
export default meta;
|
|
9
|
-
type Story = StoryObj<typeof args>;
|
|
10
|
-
export declare const Radio: Story;
|
|
11
|
-
export declare const Checkbox: Story;
|
|
12
|
-
export declare const Indeterminate: Story;
|
|
13
|
-
export declare const Checked: Story;
|
|
14
|
-
export declare const Invalid: Story;
|
|
@@ -1,45 +0,0 @@
|
|
|
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-dead-toggle');
|
|
7
|
-
const meta = {
|
|
8
|
-
title: 'Forms/Dead toggle',
|
|
9
|
-
render(args) {
|
|
10
|
-
return html `<w-dead-toggle ${spread(prespread(args))}></w-dead-toggle>`;
|
|
11
|
-
},
|
|
12
|
-
args,
|
|
13
|
-
argTypes,
|
|
14
|
-
parameters: {
|
|
15
|
-
actions: {
|
|
16
|
-
handles: events,
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
};
|
|
20
|
-
export default meta;
|
|
21
|
-
export const Radio = {
|
|
22
|
-
args: {
|
|
23
|
-
type: 'radio',
|
|
24
|
-
},
|
|
25
|
-
};
|
|
26
|
-
export const Checkbox = {
|
|
27
|
-
args: {
|
|
28
|
-
type: 'checkbox',
|
|
29
|
-
},
|
|
30
|
-
};
|
|
31
|
-
export const Indeterminate = {
|
|
32
|
-
args: {
|
|
33
|
-
indeterminate: true,
|
|
34
|
-
},
|
|
35
|
-
};
|
|
36
|
-
export const Checked = {
|
|
37
|
-
args: {
|
|
38
|
-
checked: true,
|
|
39
|
-
},
|
|
40
|
-
};
|
|
41
|
-
export const Invalid = {
|
|
42
|
-
args: {
|
|
43
|
-
invalid: true,
|
|
44
|
-
},
|
|
45
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import './index.js';
|
|
@@ -1,9 +0,0 @@
|
|
|
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 dead toggle', async () => {
|
|
6
|
-
const component = html `<w-dead-toggle data-testid="dead-toggle"></w-dead-toggle>`;
|
|
7
|
-
const page = render(component);
|
|
8
|
-
await expect.element(page.getByTestId('dead-toggle')).toBeVisible();
|
|
9
|
-
});
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { CSSResultGroup, LitElement } from 'lit';
|
|
2
|
-
/**
|
|
3
|
-
* Dead toggle can be used where the appearance of a checkbox or radio is needed - but for accessibility purposes an actual input element should not be present.
|
|
4
|
-
*
|
|
5
|
-
* [See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/forms-dead-toggle--docs)
|
|
6
|
-
*/
|
|
7
|
-
export declare class WarpDeadToggle extends LitElement {
|
|
8
|
-
type: 'radio' | 'checkbox';
|
|
9
|
-
checked: boolean;
|
|
10
|
-
indeterminate: boolean;
|
|
11
|
-
invalid: boolean;
|
|
12
|
-
disabled: boolean;
|
|
13
|
-
/** @internal */
|
|
14
|
-
get indeterminateMarker(): "" | "–";
|
|
15
|
-
render(): import("lit").TemplateResult<1>;
|
|
16
|
-
static styles?: CSSResultGroup | undefined;
|
|
17
|
-
}
|