@warp-ds/elements 2.3.0-next.3 → 2.3.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 +1139 -144
- package/dist/index.d.ts +413 -34
- package/dist/packages/affix/index.js.map +2 -2
- package/dist/packages/affix/react.d.ts +1 -1
- package/dist/packages/alert/index.js.map +2 -2
- package/dist/packages/alert/react.d.ts +1 -1
- package/dist/packages/attention/attention.stories.js +4 -1
- package/dist/packages/attention/index.js +58 -22
- package/dist/packages/attention/index.js.map +3 -3
- package/dist/packages/attention/react.d.ts +1 -1
- package/dist/packages/attention/styles.js +1 -1
- package/dist/packages/badge/index.js.map +2 -2
- package/dist/packages/badge/react.d.ts +1 -1
- package/dist/packages/box/index.js.map +2 -2
- package/dist/packages/box/react.d.ts +1 -1
- package/dist/packages/breadcrumbs/index.js.map +2 -2
- package/dist/packages/breadcrumbs/react.d.ts +1 -1
- package/dist/packages/button/button.react.stories.d.ts +1 -1
- package/dist/packages/button/button.stories.d.ts +4 -4
- package/dist/packages/button/button.stories.js +4 -4
- package/dist/packages/button/button.test.js +30 -1
- package/dist/packages/button/index.d.ts +2 -0
- package/dist/packages/button/index.js +52 -16
- package/dist/packages/button/index.js.map +3 -3
- package/dist/packages/button/react.d.ts +1 -1
- package/dist/packages/card/index.js.map +2 -2
- package/dist/packages/card/react.d.ts +1 -1
- package/dist/packages/checkbox/checkbox-group.d.ts +10 -0
- package/dist/packages/checkbox/checkbox-group.js +7 -0
- package/dist/packages/checkbox/checkbox-group.js.map +7 -0
- package/dist/packages/{rip-and-tear-checkbox → checkbox}/checkbox.d.ts +2 -2
- package/dist/packages/{rip-and-tear-checkbox → checkbox}/checkbox.js +3 -4
- package/dist/packages/checkbox/checkbox.js.map +7 -0
- package/dist/packages/{rip-and-tear-checkbox → checkbox}/checkbox.stories.d.ts +3 -0
- package/dist/packages/checkbox/checkbox.stories.js +25 -0
- package/dist/packages/checkbox/index.d.ts +2 -0
- package/dist/packages/checkbox/index.js +2 -0
- package/dist/packages/checkbox/react.d.ts +7 -0
- package/dist/packages/{rip-and-tear-checkbox → checkbox}/react.js +5 -0
- package/dist/packages/combobox/combobox.react.stories.d.ts +1 -1
- package/dist/packages/combobox/combobox.stories.d.ts +1 -0
- package/dist/packages/combobox/combobox.stories.js +29 -3
- package/dist/packages/combobox/index.d.ts +7 -1
- package/dist/packages/combobox/index.js +20 -19
- package/dist/packages/combobox/index.js.map +4 -4
- package/dist/packages/combobox/react.d.ts +1 -1
- package/dist/packages/combobox/styles.js +2 -1
- package/dist/packages/datepicker/datepicker.d.ts +1 -0
- package/dist/packages/datepicker/datepicker.js +35 -35
- package/dist/packages/datepicker/datepicker.js.map +3 -3
- package/dist/packages/datepicker/datepicker.react.stories.d.ts +1 -1
- package/dist/packages/datepicker/datepicker.test.js +27 -0
- package/dist/packages/datepicker/react.d.ts +1 -1
- package/dist/packages/{dead-toggle → deadtoggle}/index.js +2 -3
- package/dist/packages/deadtoggle/index.js.map +7 -0
- package/dist/packages/{dead-toggle → deadtoggle}/react.d.ts +1 -1
- package/dist/packages/expandable/index.js.map +2 -2
- package/dist/packages/expandable/react.d.ts +1 -1
- package/dist/packages/link/index.d.ts +2 -8
- package/dist/packages/link/index.js +46 -10
- package/dist/packages/link/index.js.map +4 -4
- package/dist/packages/link/link.react.stories.d.ts +6 -3
- package/dist/packages/link/link.react.stories.js +27 -10
- package/dist/packages/link/link.stories.d.ts +5 -2
- package/dist/packages/link/link.stories.js +27 -10
- package/dist/packages/link/react.d.ts +1 -1
- package/dist/packages/link/styles.js +39 -3
- package/dist/packages/modal/index.js.map +2 -2
- package/dist/packages/modal/modal-header.js.map +2 -2
- package/dist/packages/modal/modal.stories.d.ts +3 -3
- package/dist/packages/modal/modal.stories.js +32 -32
- package/dist/packages/modal/react.d.ts +1 -1
- package/dist/packages/pageindicator/react.d.ts +1 -1
- package/dist/packages/pagination/index.js.map +2 -2
- package/dist/packages/pagination/react.d.ts +1 -1
- package/dist/packages/pill/index.js.map +2 -2
- package/dist/packages/pill/react.d.ts +1 -1
- package/dist/packages/radio/index.d.ts +2 -0
- package/dist/packages/radio/index.js +2 -0
- package/dist/packages/{rip-and-tear-radio → radio}/radio-group-styles.js.map +1 -1
- package/dist/packages/{rip-and-tear-radio → radio}/radio-group.js +7 -8
- package/dist/packages/radio/radio-group.js.map +7 -0
- package/dist/packages/{rip-and-tear-radio → radio}/radio.js +3 -4
- package/dist/packages/radio/radio.js.map +7 -0
- package/dist/packages/radio/radio.stories.d.ts +15 -0
- package/dist/packages/radio/radio.stories.js +3702 -0
- package/dist/packages/radio/radio.stories.js.map +7 -0
- package/dist/packages/{rip-and-tear-radio → radio}/react.d.ts +2 -2
- package/dist/packages/select/index.d.ts +26 -5
- package/dist/packages/select/index.js +17 -16
- package/dist/packages/select/index.js.map +3 -3
- package/dist/packages/select/react.d.ts +1 -1
- package/dist/packages/select/select.react.stories.d.ts +1 -1
- package/dist/packages/select/select.stories.d.ts +1 -1
- package/dist/packages/select/select.stories.js +3 -4
- package/dist/packages/select/select.test.js +30 -0
- package/dist/packages/slider/locales/da/messages.mjs +1 -0
- package/dist/packages/slider/locales/en/messages.mjs +1 -0
- package/dist/packages/slider/locales/fi/messages.mjs +1 -0
- package/dist/packages/slider/locales/nb/messages.mjs +1 -0
- package/dist/packages/slider/locales/sv/messages.mjs +1 -0
- package/dist/packages/slider/react.d.ts +2 -2
- package/dist/packages/slider/slider-thumb.d.ts +13 -7
- package/dist/packages/slider/slider-thumb.js +92 -49
- package/dist/packages/slider/slider-thumb.js.map +4 -4
- package/dist/packages/slider/slider.d.ts +12 -3
- package/dist/packages/slider/slider.js +109 -31
- package/dist/packages/slider/slider.js.map +4 -4
- package/dist/packages/slider/slider.react.stories.d.ts +1 -0
- package/dist/packages/slider/slider.react.stories.js +22 -0
- package/dist/packages/slider/slider.stories.d.ts +3 -0
- package/dist/packages/slider/slider.stories.js +240 -33
- package/dist/packages/slider/slider.test.js +28 -0
- package/dist/packages/slider/styles/w-slider-thumb.styles.js +24 -16
- package/dist/packages/slider/styles/w-slider.styles.js +65 -18
- package/dist/packages/{steps → stepindicator}/index.d.ts +3 -2
- package/dist/packages/{steps → stepindicator}/index.js +8 -8
- package/dist/packages/stepindicator/index.js.map +7 -0
- package/dist/packages/stepindicator/locales/da/messages.d.mts +1 -0
- package/dist/packages/stepindicator/locales/en/messages.d.mts +1 -0
- package/dist/packages/stepindicator/locales/fi/messages.d.mts +1 -0
- package/dist/packages/stepindicator/locales/nb/messages.d.mts +1 -0
- package/dist/packages/stepindicator/locales/sv/messages.d.mts +1 -0
- package/dist/packages/stepindicator/react.d.ts +3 -0
- package/dist/packages/{steps → stepindicator}/react.js +2 -2
- package/dist/packages/{steps/steps.react.stories.d.ts → stepindicator/stepindicator.react.stories.d.ts} +4 -4
- package/dist/packages/{steps/steps.react.stories.js → stepindicator/stepindicator.react.stories.js} +11 -11
- package/dist/packages/{steps/steps.stories.js → stepindicator/stepindicator.stories.js} +16 -16
- package/dist/packages/switch/index.d.ts +10 -2
- package/dist/packages/switch/index.js +7 -6
- package/dist/packages/switch/index.js.map +4 -4
- package/dist/packages/switch/react.d.ts +1 -1
- package/dist/packages/switch/styles.js +1 -1
- package/dist/packages/switch/switch.react.stories.js +4 -4
- package/dist/packages/switch/switch.stories.js +6 -5
- package/dist/packages/switch/switch.test.d.ts +1 -0
- package/dist/packages/switch/switch.test.js +40 -0
- package/dist/packages/tabs/tab.js +4 -3
- package/dist/packages/tabs/tab.js.map +2 -2
- package/dist/packages/tabs/tabs.js +5 -5
- package/dist/packages/tabs/tabs.js.map +3 -3
- package/dist/packages/tabs/tabs.stories.d.ts +3 -0
- package/dist/packages/tabs/tabs.stories.js +16 -7
- package/dist/packages/textarea/index.d.ts +1 -0
- package/dist/packages/textarea/index.js +1 -0
- package/dist/packages/textarea/locales/da/messages.d.mts +1 -0
- package/dist/packages/textarea/locales/da/messages.mjs +1 -0
- package/dist/packages/textarea/locales/en/messages.d.mts +1 -0
- package/dist/packages/textarea/locales/en/messages.mjs +1 -0
- package/dist/packages/textarea/locales/fi/messages.d.mts +1 -0
- package/dist/packages/textarea/locales/fi/messages.mjs +1 -0
- package/dist/packages/textarea/locales/nb/messages.d.mts +1 -0
- package/dist/packages/textarea/locales/nb/messages.mjs +1 -0
- package/dist/packages/textarea/locales/sv/messages.d.mts +1 -0
- package/dist/packages/textarea/locales/sv/messages.mjs +1 -0
- package/dist/packages/textarea/react.d.ts +11 -0
- package/dist/packages/textarea/react.js +21 -0
- package/dist/packages/textarea/styles.d.ts +1 -0
- package/dist/packages/textarea/styles.js +2 -0
- package/dist/packages/textarea/textarea.d.ts +49 -0
- package/dist/packages/{rip-and-tear-radio/radio.stories.js → textarea/textarea.js} +35 -214
- package/dist/packages/textarea/textarea.js.map +7 -0
- package/dist/packages/textarea/textarea.react.stories.d.ts +33 -0
- package/dist/packages/textarea/textarea.react.stories.js +41 -0
- package/dist/packages/textarea/textarea.stories.d.ts +19 -0
- package/dist/packages/textarea/textarea.stories.js +85 -0
- package/dist/packages/textarea/textarea.test.d.ts +1 -0
- package/dist/packages/textarea/textarea.test.js +68 -0
- package/dist/packages/textfield/index.d.ts +6 -0
- package/dist/packages/textfield/index.js +21 -20
- package/dist/packages/textfield/index.js.map +3 -3
- package/dist/packages/textfield/react.d.ts +1 -1
- package/dist/packages/textfield/textfield.react.stories.d.ts +1 -1
- package/dist/packages/textfield/textfield.stories.d.ts +1 -0
- package/dist/packages/textfield/textfield.stories.js +17 -0
- package/dist/packages/toggle-styles.js +2 -3
- package/dist/web-types.json +473 -30
- package/package.json +37 -31
- package/dist/packages/dead-toggle/index.js.map +0 -7
- package/dist/packages/rip-and-tear-checkbox/checkbox.js.map +0 -7
- 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 -4
- package/dist/packages/rip-and-tear-checkbox/react.d.ts +0 -5
- package/dist/packages/rip-and-tear-radio/index.d.ts +0 -1
- package/dist/packages/rip-and-tear-radio/index.js +0 -6
- package/dist/packages/rip-and-tear-radio/radio-group.js.map +0 -7
- 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.map +0 -7
- package/dist/packages/steps/index.js.map +0 -7
- package/dist/packages/steps/react.d.ts +0 -3
- /package/dist/packages/{rip-and-tear-checkbox/rip-and-tear-checkbox.react.stories.d.ts → checkbox/checkbox.react.stories.d.ts} +0 -0
- /package/dist/packages/{rip-and-tear-checkbox/rip-and-tear-checkbox.react.stories.js → checkbox/checkbox.react.stories.js} +0 -0
- /package/dist/packages/{rip-and-tear-checkbox → checkbox}/styles.d.ts +0 -0
- /package/dist/packages/{rip-and-tear-checkbox → checkbox}/styles.js +0 -0
- /package/dist/packages/{dead-toggle → deadtoggle}/dead-toggle.react.stories.d.ts +0 -0
- /package/dist/packages/{dead-toggle → deadtoggle}/dead-toggle.react.stories.js +0 -0
- /package/dist/packages/{dead-toggle → deadtoggle}/dead-toggle.stories.d.ts +0 -0
- /package/dist/packages/{dead-toggle → deadtoggle}/dead-toggle.stories.js +0 -0
- /package/dist/packages/{dead-toggle → deadtoggle}/dead-toggle.test.d.ts +0 -0
- /package/dist/packages/{dead-toggle → deadtoggle}/dead-toggle.test.js +0 -0
- /package/dist/packages/{dead-toggle → deadtoggle}/index.d.ts +0 -0
- /package/dist/packages/{dead-toggle → deadtoggle}/react.js +0 -0
- /package/dist/packages/{rip-and-tear-radio → radio}/base-element.d.ts +0 -0
- /package/dist/packages/{rip-and-tear-radio → radio}/base-element.js +0 -0
- /package/dist/packages/{rip-and-tear-radio → radio}/custom-error-validator.d.ts +0 -0
- /package/dist/packages/{rip-and-tear-radio → radio}/custom-error-validator.js +0 -0
- /package/dist/packages/{rip-and-tear-radio → radio}/form-associated-element.d.ts +0 -0
- /package/dist/packages/{rip-and-tear-radio → radio}/form-associated-element.js +0 -0
- /package/dist/packages/{rip-and-tear-radio → radio}/host-styles.d.ts +0 -0
- /package/dist/packages/{rip-and-tear-radio → radio}/host-styles.js +0 -0
- /package/dist/packages/{rip-and-tear-radio → radio}/invalid.d.ts +0 -0
- /package/dist/packages/{rip-and-tear-radio → radio}/invalid.js +0 -0
- /package/dist/packages/{rip-and-tear-radio → radio}/math.d.ts +0 -0
- /package/dist/packages/{rip-and-tear-radio → radio}/math.js +0 -0
- /package/dist/packages/{rip-and-tear-radio → radio}/radio-group-styles.d.ts +0 -0
- /package/dist/packages/{rip-and-tear-radio → radio}/radio-group-styles.js +0 -0
- /package/dist/packages/{rip-and-tear-radio → radio}/radio-group.d.ts +0 -0
- /package/dist/packages/{rip-and-tear-radio → radio}/radio-styles.d.ts +0 -0
- /package/dist/packages/{rip-and-tear-radio → radio}/radio-styles.js +0 -0
- /package/dist/packages/{rip-and-tear-radio → radio}/radio-styles.js.map +0 -0
- /package/dist/packages/{rip-and-tear-radio → radio}/radio.d.ts +0 -0
- /package/dist/packages/{rip-and-tear-radio/rip-and-tear-radio.react.stories.d.ts → radio/radio.react.stories.d.ts} +0 -0
- /package/dist/packages/{rip-and-tear-radio/rip-and-tear-radio.react.stories.js → radio/radio.react.stories.js} +0 -0
- /package/dist/packages/{rip-and-tear-radio → radio}/react.js +0 -0
- /package/dist/packages/{rip-and-tear-radio → radio}/required-validator.d.ts +0 -0
- /package/dist/packages/{rip-and-tear-radio → radio}/required-validator.js +0 -0
- /package/dist/packages/{rip-and-tear-radio → radio}/slot.d.ts +0 -0
- /package/dist/packages/{rip-and-tear-radio → radio}/slot.js +0 -0
- /package/dist/packages/{rip-and-tear-radio → radio}/watch.d.ts +0 -0
- /package/dist/packages/{rip-and-tear-radio → radio}/watch.js +0 -0
- /package/dist/packages/{steps → slider}/locales/da/messages.d.mts +0 -0
- /package/dist/packages/{steps → slider}/locales/en/messages.d.mts +0 -0
- /package/dist/packages/{steps → slider}/locales/fi/messages.d.mts +0 -0
- /package/dist/packages/{steps → slider}/locales/nb/messages.d.mts +0 -0
- /package/dist/packages/{steps → slider}/locales/sv/messages.d.mts +0 -0
- /package/dist/packages/{steps → stepindicator}/locales/da/messages.mjs +0 -0
- /package/dist/packages/{steps → stepindicator}/locales/en/messages.mjs +0 -0
- /package/dist/packages/{steps → stepindicator}/locales/fi/messages.mjs +0 -0
- /package/dist/packages/{steps → stepindicator}/locales/nb/messages.mjs +0 -0
- /package/dist/packages/{steps → stepindicator}/locales/sv/messages.mjs +0 -0
- /package/dist/packages/{steps/steps.stories.d.ts → stepindicator/stepindicator.stories.d.ts} +0 -0
- /package/dist/packages/{steps → stepindicator}/styles.d.ts +0 -0
- /package/dist/packages/{steps → stepindicator}/styles.js +0 -0
package/dist/packages/{steps/steps.react.stories.js → stepindicator/stepindicator.react.stories.js}
RENAMED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Step, StepIndicator } from './react';
|
|
3
3
|
export default {
|
|
4
|
-
title: 'Components/
|
|
5
|
-
component:
|
|
4
|
+
title: 'Components/Step Indicator',
|
|
5
|
+
component: StepIndicator,
|
|
6
6
|
};
|
|
7
7
|
export const Default = {
|
|
8
8
|
args: {
|
|
9
9
|
horizontal: false,
|
|
10
10
|
right: false,
|
|
11
11
|
},
|
|
12
|
-
render: (args) => (React.createElement(
|
|
12
|
+
render: (args) => (React.createElement(StepIndicator, { horizontal: args.horizontal, right: args.right },
|
|
13
13
|
React.createElement(Step, { completed: true },
|
|
14
14
|
React.createElement("h3", null, "Step 1: Account Setup"),
|
|
15
15
|
React.createElement("p", null, "Create your account and verify your email address.")),
|
|
@@ -28,7 +28,7 @@ export const Horizontal = {
|
|
|
28
28
|
horizontal: true,
|
|
29
29
|
right: false,
|
|
30
30
|
},
|
|
31
|
-
render: (args) => (React.createElement(
|
|
31
|
+
render: (args) => (React.createElement(StepIndicator, { horizontal: args.horizontal, right: args.right },
|
|
32
32
|
React.createElement(Step, { completed: true },
|
|
33
33
|
React.createElement("h4", null, "Setup"),
|
|
34
34
|
React.createElement("p", null, "Account created")),
|
|
@@ -47,7 +47,7 @@ export const RightAligned = {
|
|
|
47
47
|
horizontal: false,
|
|
48
48
|
right: true,
|
|
49
49
|
},
|
|
50
|
-
render: (args) => (React.createElement(
|
|
50
|
+
render: (args) => (React.createElement(StepIndicator, { horizontal: args.horizontal, right: args.right },
|
|
51
51
|
React.createElement(Step, { completed: true },
|
|
52
52
|
React.createElement("h3", null, "Order Placed"),
|
|
53
53
|
React.createElement("p", null, "Your order has been received and is being processed."),
|
|
@@ -63,8 +63,8 @@ export const RightAligned = {
|
|
|
63
63
|
React.createElement("h3", null, "Shipped"),
|
|
64
64
|
React.createElement("p", null, "Your order is on its way!")))),
|
|
65
65
|
};
|
|
66
|
-
export const
|
|
67
|
-
render: () => (React.createElement(
|
|
66
|
+
export const SimpleStepIndicator = {
|
|
67
|
+
render: () => (React.createElement(StepIndicator, null,
|
|
68
68
|
React.createElement(Step, { completed: true },
|
|
69
69
|
React.createElement("strong", null, "Step 1")),
|
|
70
70
|
React.createElement(Step, { completed: true },
|
|
@@ -77,7 +77,7 @@ export const SimpleSteps = {
|
|
|
77
77
|
React.createElement("strong", null, "Step 5")))),
|
|
78
78
|
};
|
|
79
79
|
export const SimpleHorizontal = {
|
|
80
|
-
render: () => (React.createElement(
|
|
80
|
+
render: () => (React.createElement(StepIndicator, { horizontal: true },
|
|
81
81
|
React.createElement(Step, { completed: true },
|
|
82
82
|
React.createElement("strong", null, "Start")),
|
|
83
83
|
React.createElement(Step, { completed: true },
|
|
@@ -90,7 +90,7 @@ export const SimpleHorizontal = {
|
|
|
90
90
|
React.createElement("strong", null, "End")))),
|
|
91
91
|
};
|
|
92
92
|
export const AllCompleted = {
|
|
93
|
-
render: () => (React.createElement(
|
|
93
|
+
render: () => (React.createElement(StepIndicator, null,
|
|
94
94
|
React.createElement(Step, { completed: true },
|
|
95
95
|
React.createElement("h3", null, "Registration"),
|
|
96
96
|
React.createElement("p", null, "Account successfully created")),
|
|
@@ -105,7 +105,7 @@ export const AllCompleted = {
|
|
|
105
105
|
React.createElement("p", null, "You're all set to get started!")))),
|
|
106
106
|
};
|
|
107
107
|
export const MinimalExample = {
|
|
108
|
-
render: () => (React.createElement(
|
|
108
|
+
render: () => (React.createElement(StepIndicator, null,
|
|
109
109
|
React.createElement(Step, { completed: true }, "First"),
|
|
110
110
|
React.createElement(Step, { active: true }, "Second"),
|
|
111
111
|
React.createElement(Step, null, "Third"))),
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { html } from 'lit';
|
|
2
2
|
import './index.js';
|
|
3
3
|
const meta = {
|
|
4
|
-
title: 'Components/
|
|
5
|
-
component: 'w-
|
|
4
|
+
title: 'Components/Step Indicator',
|
|
5
|
+
component: 'w-step-indicator',
|
|
6
6
|
argTypes: {
|
|
7
7
|
horizontal: {
|
|
8
8
|
control: { type: 'boolean' },
|
|
@@ -23,7 +23,7 @@ export const Default = {
|
|
|
23
23
|
right: false,
|
|
24
24
|
},
|
|
25
25
|
render: (args) => html `
|
|
26
|
-
<w-
|
|
26
|
+
<w-step-indicator ?horizontal=${args.horizontal} ?right=${args.right}>
|
|
27
27
|
<w-step completed>
|
|
28
28
|
<h3>Step 1: Account Setup</h3>
|
|
29
29
|
<p>Create your account and verify your email address.</p>
|
|
@@ -40,7 +40,7 @@ export const Default = {
|
|
|
40
40
|
<h3>Step 4: Confirmation</h3>
|
|
41
41
|
<p>Review and confirm your information.</p>
|
|
42
42
|
</w-step>
|
|
43
|
-
</w-
|
|
43
|
+
</w-step-indicator>
|
|
44
44
|
`,
|
|
45
45
|
};
|
|
46
46
|
export const Horizontal = {
|
|
@@ -49,7 +49,7 @@ export const Horizontal = {
|
|
|
49
49
|
right: false,
|
|
50
50
|
},
|
|
51
51
|
render: (args) => html `
|
|
52
|
-
<w-
|
|
52
|
+
<w-step-indicator ?horizontal=${args.horizontal} ?right=${args.right}>
|
|
53
53
|
<w-step completed>
|
|
54
54
|
<h4>Setup</h4>
|
|
55
55
|
<p>Account created</p>
|
|
@@ -66,7 +66,7 @@ export const Horizontal = {
|
|
|
66
66
|
<h4>Done</h4>
|
|
67
67
|
<p>Complete setup</p>
|
|
68
68
|
</w-step>
|
|
69
|
-
</w-
|
|
69
|
+
</w-step-indicator>
|
|
70
70
|
`,
|
|
71
71
|
};
|
|
72
72
|
export const RightAligned = {
|
|
@@ -75,7 +75,7 @@ export const RightAligned = {
|
|
|
75
75
|
right: true,
|
|
76
76
|
},
|
|
77
77
|
render: (args) => html `
|
|
78
|
-
<w-
|
|
78
|
+
<w-step-indicator ?horizontal=${args.horizontal} ?right=${args.right}>
|
|
79
79
|
<w-step completed>
|
|
80
80
|
<h3>Order Placed</h3>
|
|
81
81
|
<p>Your order has been received and is being processed.</p>
|
|
@@ -94,12 +94,12 @@ export const RightAligned = {
|
|
|
94
94
|
<h3>Shipped</h3>
|
|
95
95
|
<p>Your order is on its way!</p>
|
|
96
96
|
</w-step>
|
|
97
|
-
</w-
|
|
97
|
+
</w-step-indicator>
|
|
98
98
|
`,
|
|
99
99
|
};
|
|
100
100
|
export const SimpleSteps = {
|
|
101
101
|
render: () => html `
|
|
102
|
-
<w-
|
|
102
|
+
<w-step-indicator>
|
|
103
103
|
<w-step completed>
|
|
104
104
|
<strong>Step 1</strong>
|
|
105
105
|
</w-step>
|
|
@@ -115,12 +115,12 @@ export const SimpleSteps = {
|
|
|
115
115
|
<w-step>
|
|
116
116
|
<strong>Step 5</strong>
|
|
117
117
|
</w-step>
|
|
118
|
-
</w-
|
|
118
|
+
</w-step-indicator>
|
|
119
119
|
`,
|
|
120
120
|
};
|
|
121
121
|
export const SimpleHorizontal = {
|
|
122
122
|
render: () => html `
|
|
123
|
-
<w-
|
|
123
|
+
<w-step-indicator horizontal>
|
|
124
124
|
<w-step completed>
|
|
125
125
|
<strong>Start</strong>
|
|
126
126
|
</w-step>
|
|
@@ -136,12 +136,12 @@ export const SimpleHorizontal = {
|
|
|
136
136
|
<w-step>
|
|
137
137
|
<strong>End</strong>
|
|
138
138
|
</w-step>
|
|
139
|
-
</w-
|
|
139
|
+
</w-step-indicator>
|
|
140
140
|
`,
|
|
141
141
|
};
|
|
142
142
|
export const AllCompleted = {
|
|
143
143
|
render: () => html `
|
|
144
|
-
<w-
|
|
144
|
+
<w-step-indicator>
|
|
145
145
|
<w-step completed>
|
|
146
146
|
<h3>Registration</h3>
|
|
147
147
|
<p>Account successfully created</p>
|
|
@@ -158,15 +158,15 @@ export const AllCompleted = {
|
|
|
158
158
|
<h3>Welcome</h3>
|
|
159
159
|
<p>You're all set to get started!</p>
|
|
160
160
|
</w-step>
|
|
161
|
-
</w-
|
|
161
|
+
</w-step-indicator>
|
|
162
162
|
`,
|
|
163
163
|
};
|
|
164
164
|
export const MinimalExample = {
|
|
165
165
|
render: () => html `
|
|
166
|
-
<w-
|
|
166
|
+
<w-step-indicator>
|
|
167
167
|
<w-step completed>First</w-step>
|
|
168
168
|
<w-step active>Second</w-step>
|
|
169
169
|
<w-step>Third</w-step>
|
|
170
|
-
</w-
|
|
170
|
+
</w-step-indicator>
|
|
171
171
|
`,
|
|
172
172
|
};
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
declare const WarpSwitch_base: import("@open-wc/form-control").Constructor<import("@open-wc/form-control").FormControlInterface> & typeof LitElement;
|
|
3
|
+
export declare class WarpSwitch extends WarpSwitch_base {
|
|
4
|
+
#private;
|
|
5
|
+
name: string;
|
|
6
|
+
value: string;
|
|
7
|
+
checked: boolean;
|
|
4
8
|
disabled: boolean;
|
|
5
9
|
static styles: import("lit").CSSResult[];
|
|
6
10
|
/** @internal */
|
|
@@ -11,5 +15,9 @@ export declare class WarpSwitch extends LitElement {
|
|
|
11
15
|
get _handleClasses(): string;
|
|
12
16
|
/** @internal */
|
|
13
17
|
_handleClick(): void;
|
|
18
|
+
connectedCallback(): void;
|
|
19
|
+
willUpdate(changedProperties: any): void;
|
|
20
|
+
resetFormControl(): void;
|
|
14
21
|
render(): import("lit").TemplateResult<1>;
|
|
15
22
|
}
|
|
23
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var K=Object.defineProperty;var Q=Object.getOwnPropertyDescriptor;var $=t=>{throw TypeError(t)};var F=(t,e,a,o)=>{for(var n=o>1?void 0:o?Q(e,a):e,p=t.length-1,w;p>=0;p--)(w=t[p])&&(n=(o?w(e,a,n):w(n))||n);return o&&n&&K(e,a,n),n};var N=(t,e,a)=>e.has(t)||$("Cannot "+a);var U=(t,e,a)=>(N(t,e,"read from private field"),a?a.call(t):e.get(t)),L=(t,e,a)=>e.has(t)?$("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,a),G=(t,e,a,o)=>(N(t,e,"write to private field"),o?o.call(t,a):e.set(t,a),a);var Y=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return t.reduce(function(a,o){return a.concat(typeof o=="string"?o:Array.isArray(o)?Y.apply(void 0,o):typeof o=="object"&&o?Object.keys(o).map(function(n){return o[n]?n:""}):"")},[]).join(" ")};var s=function(t,e,a,o){if(a==="a"&&!o)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return a==="m"?o:a==="a"?o.call(t):o?o.value:e.get(t)},d=function(t,e,a,o,n){if(o==="m")throw new TypeError("Private method is not writable");if(o==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return o==="a"?n.call(t,a):n?n.value=a:e.set(t,a),a};function I(t){var e,a,o,n,p,w,m,H,k,X,A,Z,M,x,E,v,P,T,S;class J extends t{constructor(...r){var i,l,c;super(...r),e.add(this),this.internals=this.attachInternals(),a.set(this,!1),o.set(this,!1),n.set(this,!1),p.set(this,void 0),w.set(this,void 0),m.set(this,!0),k.set(this,""),X.set(this,()=>{d(this,n,!0,"f"),d(this,a,!0,"f"),s(this,e,"m",v).call(this)}),A.set(this,()=>{d(this,a,!1,"f"),s(this,e,"m",P).call(this,this.shouldFormValueUpdate()?s(this,k,"f"):""),!this.validity.valid&&s(this,n,"f")&&d(this,o,!0,"f");let g=s(this,e,"m",v).call(this);this.validationMessageCallback&&this.validationMessageCallback(g?this.internals.validationMessage:"")}),Z.set(this,()=>{var g;s(this,m,"f")&&this.validationTarget&&(this.internals.setValidity(this.validity,this.validationMessage,this.validationTarget),d(this,m,!1,"f")),d(this,n,!0,"f"),d(this,o,!0,"f"),s(this,e,"m",v).call(this),(g=this===null||this===void 0?void 0:this.validationMessageCallback)===null||g===void 0||g.call(this,this.showError?this.internals.validationMessage:"")}),M.set(this,void 0),x.set(this,!1),E.set(this,Promise.resolve()),(i=this.addEventListener)===null||i===void 0||i.call(this,"focus",s(this,X,"f")),(l=this.addEventListener)===null||l===void 0||l.call(this,"blur",s(this,A,"f")),(c=this.addEventListener)===null||c===void 0||c.call(this,"invalid",s(this,Z,"f")),this.setValue(null)}static get formAssociated(){return!0}static get validators(){return this.formControlValidators||[]}static get observedAttributes(){let r=this.validators.map(c=>c.attribute).flat(),i=super.observedAttributes||[];return[...new Set([...i,...r])]}static getValidator(r){return this.validators.find(i=>i.attribute===r)||null}static getValidators(r){return this.validators.filter(i=>{var l;if(i.attribute===r||!((l=i.attribute)===null||l===void 0)&&l.includes(r))return!0})}get form(){return this.internals.form}get showError(){return s(this,e,"m",v).call(this)}checkValidity(){return this.internals.checkValidity()}get validity(){return this.internals.validity}get validationMessage(){return this.internals.validationMessage}attributeChangedCallback(r,i,l){var c;(c=super.attributeChangedCallback)===null||c===void 0||c.call(this,r,i,l);let z=this.constructor.getValidators(r);z!=null&&z.length&&this.validationTarget&&this.setValue(s(this,k,"f"))}setValue(r){var i;d(this,o,!1,"f"),(i=this.validationMessageCallback)===null||i===void 0||i.call(this,""),d(this,k,r,"f");let c=this.shouldFormValueUpdate()?r:null;this.internals.setFormValue(c),s(this,e,"m",P).call(this,c),this.valueChangedCallback&&this.valueChangedCallback(c),s(this,e,"m",v).call(this)}shouldFormValueUpdate(){return!0}get validationComplete(){return new Promise(r=>r(s(this,E,"f")))}formResetCallback(){var r,i;d(this,n,!1,"f"),d(this,o,!1,"f"),s(this,e,"m",v).call(this),(r=this.resetFormControl)===null||r===void 0||r.call(this),(i=this.validationMessageCallback)===null||i===void 0||i.call(this,s(this,e,"m",v).call(this)?this.validationMessage:"")}}return a=new WeakMap,o=new WeakMap,n=new WeakMap,p=new WeakMap,w=new WeakMap,m=new WeakMap,k=new WeakMap,X=new WeakMap,A=new WeakMap,Z=new WeakMap,M=new WeakMap,x=new WeakMap,E=new WeakMap,e=new WeakSet,H=function(){let r=this.getRootNode(),i=`${this.localName}[name="${this.getAttribute("name")}"]`;return r.querySelectorAll(i)},v=function(){if(this.hasAttribute("disabled"))return!1;let r=s(this,o,"f")||s(this,n,"f")&&!this.validity.valid&&!s(this,a,"f");return r&&this.internals.states?this.internals.states.add("--show-error"):this.internals.states&&this.internals.states.delete("--show-error"),r},P=function(r){let i=this.constructor,l={},c=i.validators,g=[],z=c.some(h=>h.isValid instanceof Promise);s(this,x,"f")||(d(this,E,new Promise(h=>{d(this,M,h,"f")}),"f"),d(this,x,!0,"f")),s(this,p,"f")&&(s(this,p,"f").abort(),d(this,w,s(this,p,"f"),"f"));let _=new AbortController;d(this,p,_,"f");let C,W=!1;c.length&&(c.forEach(h=>{let O=h.key||"customError",f=h.isValid(this,r,_.signal);f instanceof Promise?(g.push(f),f.then(D=>{D!=null&&(l[O]=!D,C=s(this,e,"m",S).call(this,h,r),s(this,e,"m",T).call(this,l,C))})):(l[O]=!f,this.validity[O]!==!f&&(W=!0),!f&&!C&&(C=s(this,e,"m",S).call(this,h,r)))}),Promise.allSettled(g).then(()=>{var h;_!=null&&_.signal.aborted||(d(this,x,!1,"f"),(h=s(this,M,"f"))===null||h===void 0||h.call(this))}),(W||!z)&&s(this,e,"m",T).call(this,l,C))},T=function(r,i){if(this.validationTarget)this.internals.setValidity(r,i,this.validationTarget),d(this,m,!1,"f");else{if(this.internals.setValidity(r,i),this.internals.validity.valid)return;d(this,m,!0,"f")}},S=function(r,i){if(this.validityCallback){let l=this.validityCallback(r.key||"customError");if(l)return l}return r.message instanceof Function?r.message(this,i):r.message},J}import{html as re,LitElement as oe}from"lit";import{property as j}from"lit/decorators.js";import{css as R}from"lit";var q=R`
|
|
2
2
|
*,
|
|
3
3
|
:before,
|
|
4
4
|
:after {
|
|
@@ -271,7 +271,7 @@ var h=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var c=(a,t,n,r
|
|
|
271
271
|
svg {
|
|
272
272
|
pointer-events: none;
|
|
273
273
|
}
|
|
274
|
-
`,
|
|
274
|
+
`,le=R`*, :before, :after {
|
|
275
275
|
--w-rotate: 0;
|
|
276
276
|
--w-rotate-x: 0;
|
|
277
277
|
--w-rotate-y: 0;
|
|
@@ -2437,19 +2437,20 @@ var h=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var c=(a,t,n,r
|
|
|
2437
2437
|
display: none
|
|
2438
2438
|
}
|
|
2439
2439
|
}
|
|
2440
|
-
`;import{css as
|
|
2440
|
+
`;import{css as ee}from"lit";var B=ee`*,: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}.bg-\\[--w-s-color-border-strong\\]{background-color:var(--w-s-color-border-strong)}.group:hover .group-hover\\:bg-\\[--w-s-color-border-strong-hover\\]{background-color:var(--w-s-color-border-strong-hover)}.border{border-width:1px}.rounded-full{border-radius:9999px}.block{display:block}.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}.left-0{left:0}.left-4{left:.4rem}.top-0{top:0}.top-4{top:.4rem}.absolute{position:absolute}.relative{position:relative}.static{position:static}.s-bg{background-color:var(--w-s-color-background)}.s-bg-disabled{background-color:var(--w-s-color-background-disabled)}.s-bg-disabled-subtle{background-color:var(--w-s-color-background-disabled-subtle)}.s-bg-primary{background-color:var(--w-s-color-background-primary)}.group:hover .group-hover\\:s-bg-hover{background-color:var(--w-s-color-background-hover)}.group:hover .group-hover\\:s-bg-primary-hover{background-color:var(--w-s-color-background-primary-hover)}.s-border-disabled{border-color:var(--w-s-color-border-disabled)}.s-border-strong{border-color:var(--w-s-color-border-strong)}.group:hover .group-hover\\:s-border-strong-hover{border-color:var(--w-s-color-border-strong-hover)}.h-16{height:1.6rem}.h-24{height:2.4rem}.h-full{height:100%}.w-16{width:1.6rem}.w-44{width:4.4rem}.w-full{width:100%}.cursor-pointer{cursor:pointer}.pointer-events-none{pointer-events:none}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.translate-x-20{--w-translate-x:2rem;transform:translateX(var(--w-translate-x))translateY(var(--w-translate-y))translateZ(var(--w-translate-z))rotate(var(--w-rotate))rotateX(var(--w-rotate-x))rotateY(var(--w-rotate-y))rotateZ(var(--w-rotate-z))skewX(var(--w-skew-x))skewY(var(--w-skew-y))scaleX(var(--w-scale-x))scaleY(var(--w-scale-y))scaleZ(var(--w-scale-z))}.transform-gpu{transform:translate3d(var(--w-translate-x),var(--w-translate-y),var(--w-translate-z))rotate(var(--w-rotate))rotateX(var(--w-rotate-x))rotateY(var(--w-rotate-y))rotateZ(var(--w-rotate-z))skewX(var(--w-skew-x))skewY(var(--w-skew-y))scaleX(var(--w-scale-x))scaleY(var(--w-scale-y))scaleZ(var(--w-scale-z))}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-transform{transition-property:transform;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}`;var b={base:"block relative h-24 w-44 cursor-pointer group focusable rounded-full",disabled:"pointer-events-none",track:"absolute top-0 left-0 h-full w-full rounded-full transition-colors",trackActive:"s-bg-primary group-hover:s-bg-primary-hover",trackInactive:"s-bg border s-border-strong group-hover:s-bg-hover group-hover:s-border-strong-hover",trackDisabledOn:"s-bg-disabled",trackDisabledOff:"s-bg-disabled-subtle border s-border-disabled",handle:"absolute transform-gpu h-16 w-16 top-4 left-4 rounded-full transition-transform",handleSelected:"translate-x-20",handleActive:"s-bg",handleNotDisabled:"bg-[--w-s-color-border-strong] group-hover:bg-[--w-s-color-border-strong-hover]",handleDisabledOn:"s-bg-disabled-subtle",handleDisabledOff:"s-bg-disabled",a11y:"sr-only"},V,u=class extends I(oe){constructor(){super(...arguments);this.name="";this.value="";this.checked=!1;this.disabled=!1;L(this,V,null)}get _baseClasses(){return Y([b.base,this.disabled&&b.disabled])}get _trackClasses(){return Y([b.track,this.disabled?this.checked?b.trackDisabledOn:b.trackDisabledOff:this.checked?b.trackActive:b.trackInactive])}get _handleClasses(){return Y([b.handle,this.checked&&b.handleSelected,this.disabled?this.checked?b.handleDisabledOn:b.handleDisabledOff:this.checked?b.handleActive:b.handleNotDisabled])}_handleClick(){this.disabled||(this.checked=!this.checked,this.dispatchEvent(new CustomEvent("change",{detail:{checked:this.checked,value:this.value||null},bubbles:!0,composed:!0})))}connectedCallback(){G(this,V,this.checked),super.connectedCallback(),this.disabled||this.setValue(this.checked&&this.value?this.value:null)}willUpdate(a){a.has("checked")&&(this.disabled||this.setValue(this.checked&&this.value?this.value:null))}resetFormControl(){this.checked=U(this,V)}render(){return re`
|
|
2441
2441
|
<div>
|
|
2442
2442
|
<button
|
|
2443
2443
|
type="button"
|
|
2444
2444
|
role="switch"
|
|
2445
|
-
aria-checked=${this.
|
|
2445
|
+
aria-checked=${this.checked}
|
|
2446
2446
|
class=${this._baseClasses}
|
|
2447
2447
|
aria-disabled=${this.disabled}
|
|
2448
2448
|
?disabled=${this.disabled}
|
|
2449
|
-
@click=${this._handleClick}
|
|
2449
|
+
@click=${this._handleClick}
|
|
2450
|
+
>
|
|
2450
2451
|
<span data-testid="track" class=${this._trackClasses}></span>
|
|
2451
2452
|
<span data-testid="handle" class=${this._handleClasses}></span>
|
|
2452
2453
|
</button>
|
|
2453
2454
|
</div>
|
|
2454
|
-
`}};
|
|
2455
|
+
`}};V=new WeakMap,u.styles=[q,B],F([j({type:String,reflect:!0})],u.prototype,"name",2),F([j({type:String,reflect:!0})],u.prototype,"value",2),F([j({type:Boolean,reflect:!0})],u.prototype,"checked",2),F([j({type:Boolean,reflect:!0})],u.prototype,"disabled",2);customElements.get("w-switch")||customElements.define("w-switch",u);export{u as WarpSwitch};
|
|
2455
2456
|
//# sourceMappingURL=index.js.map
|