@openremote/or-vaadin-components 1.30.0 → 1.30.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{custom-elements-jsx.d.ts → build/custom-elements-jsx.d.ts} +4287 -2741
- package/{custom-elements.json → build/custom-elements.json} +27880 -23389
- package/build/dist/umd/index.bundle.js +3924 -0
- package/build/lib/index.d.ts +28 -0
- package/build/lib/index.d.ts.map +1 -0
- package/build/lib/index.js +1 -0
- package/build/lib/index.js.map +1 -0
- package/build/lib/or-vaadin-badge.d.ts.map +1 -0
- package/build/lib/or-vaadin-badge.js.map +1 -0
- package/build/lib/or-vaadin-button.d.ts.map +1 -0
- package/build/lib/or-vaadin-button.js.map +1 -0
- package/build/lib/or-vaadin-checkbox-group.d.ts.map +1 -0
- package/build/lib/or-vaadin-checkbox-group.js.map +1 -0
- package/build/lib/or-vaadin-checkbox.d.ts.map +1 -0
- package/build/lib/or-vaadin-checkbox.js.map +1 -0
- package/build/lib/or-vaadin-combo-box.d.ts.map +1 -0
- package/build/lib/or-vaadin-combo-box.js.map +1 -0
- package/build/lib/or-vaadin-confirm-dialog.d.ts.map +1 -0
- package/build/lib/or-vaadin-confirm-dialog.js.map +1 -0
- package/build/lib/or-vaadin-date-picker.d.ts.map +1 -0
- package/build/lib/or-vaadin-date-picker.js.map +1 -0
- package/build/lib/or-vaadin-date-time-picker.d.ts.map +1 -0
- package/build/lib/or-vaadin-date-time-picker.js.map +1 -0
- package/build/lib/or-vaadin-dialog.d.ts.map +1 -0
- package/build/lib/or-vaadin-dialog.js.map +1 -0
- package/build/lib/or-vaadin-email-field.d.ts.map +1 -0
- package/build/lib/or-vaadin-email-field.js.map +1 -0
- package/build/lib/or-vaadin-input.d.ts.map +1 -0
- package/build/lib/or-vaadin-input.js.map +1 -0
- package/build/lib/or-vaadin-item.d.ts.map +1 -0
- package/build/lib/or-vaadin-item.js.map +1 -0
- package/build/lib/or-vaadin-list-box.d.ts.map +1 -0
- package/build/lib/or-vaadin-list-box.js.map +1 -0
- package/build/lib/or-vaadin-menu-bar.d.ts.map +1 -0
- package/build/lib/or-vaadin-menu-bar.js.map +1 -0
- package/build/lib/or-vaadin-multi-select-combo-box.d.ts.map +1 -0
- package/build/lib/or-vaadin-multi-select-combo-box.js.map +1 -0
- package/build/lib/or-vaadin-number-field.d.ts.map +1 -0
- package/build/lib/or-vaadin-number-field.js.map +1 -0
- package/build/lib/or-vaadin-password-field.d.ts.map +1 -0
- package/build/lib/or-vaadin-password-field.js.map +1 -0
- package/build/lib/or-vaadin-radio-group.d.ts.map +1 -0
- package/build/lib/or-vaadin-radio-group.js.map +1 -0
- package/build/lib/or-vaadin-select.d.ts.map +1 -0
- package/build/lib/or-vaadin-select.js.map +1 -0
- package/build/lib/or-vaadin-slider.d.ts.map +1 -0
- package/build/lib/or-vaadin-slider.js.map +1 -0
- package/build/lib/or-vaadin-text-area.d.ts.map +1 -0
- package/build/lib/or-vaadin-text-area.js.map +1 -0
- package/build/lib/or-vaadin-text-field.d.ts.map +1 -0
- package/build/lib/or-vaadin-text-field.js.map +1 -0
- package/build/lib/or-vaadin-time-picker.d.ts.map +1 -0
- package/build/lib/or-vaadin-time-picker.js.map +1 -0
- package/build/lib/or-vaadin-toggle-group.d.ts.map +1 -0
- package/build/lib/or-vaadin-toggle-group.js.map +1 -0
- package/build/lib/or-vaadin-toggle.d.ts.map +1 -0
- package/build/lib/or-vaadin-toggle.js.map +1 -0
- package/build/lib/util.d.ts.map +1 -0
- package/build/lib/util.js.map +1 -0
- package/build/lib/value-input-provider.d.ts.map +1 -0
- package/build/lib/value-input-provider.js.map +1 -0
- package/package.json +43 -34
- package/custom-elements-manifest.config.mjs +0 -139
- package/lib/or-vaadin-badge.d.ts.map +0 -1
- package/lib/or-vaadin-badge.js.map +0 -1
- package/lib/or-vaadin-button.d.ts.map +0 -1
- package/lib/or-vaadin-button.js.map +0 -1
- package/lib/or-vaadin-checkbox-group.d.ts.map +0 -1
- package/lib/or-vaadin-checkbox-group.js.map +0 -1
- package/lib/or-vaadin-checkbox.d.ts.map +0 -1
- package/lib/or-vaadin-checkbox.js.map +0 -1
- package/lib/or-vaadin-combo-box.d.ts.map +0 -1
- package/lib/or-vaadin-combo-box.js.map +0 -1
- package/lib/or-vaadin-confirm-dialog.d.ts.map +0 -1
- package/lib/or-vaadin-confirm-dialog.js.map +0 -1
- package/lib/or-vaadin-date-picker.d.ts.map +0 -1
- package/lib/or-vaadin-date-picker.js.map +0 -1
- package/lib/or-vaadin-date-time-picker.d.ts.map +0 -1
- package/lib/or-vaadin-date-time-picker.js.map +0 -1
- package/lib/or-vaadin-dialog.d.ts.map +0 -1
- package/lib/or-vaadin-dialog.js.map +0 -1
- package/lib/or-vaadin-email-field.d.ts.map +0 -1
- package/lib/or-vaadin-email-field.js.map +0 -1
- package/lib/or-vaadin-input.d.ts.map +0 -1
- package/lib/or-vaadin-input.js.map +0 -1
- package/lib/or-vaadin-item.d.ts.map +0 -1
- package/lib/or-vaadin-item.js.map +0 -1
- package/lib/or-vaadin-list-box.d.ts.map +0 -1
- package/lib/or-vaadin-list-box.js.map +0 -1
- package/lib/or-vaadin-menu-bar.d.ts.map +0 -1
- package/lib/or-vaadin-menu-bar.js.map +0 -1
- package/lib/or-vaadin-multi-select-combo-box.d.ts.map +0 -1
- package/lib/or-vaadin-multi-select-combo-box.js.map +0 -1
- package/lib/or-vaadin-number-field.d.ts.map +0 -1
- package/lib/or-vaadin-number-field.js.map +0 -1
- package/lib/or-vaadin-password-field.d.ts.map +0 -1
- package/lib/or-vaadin-password-field.js.map +0 -1
- package/lib/or-vaadin-radio-group.d.ts.map +0 -1
- package/lib/or-vaadin-radio-group.js.map +0 -1
- package/lib/or-vaadin-select.d.ts.map +0 -1
- package/lib/or-vaadin-select.js.map +0 -1
- package/lib/or-vaadin-slider.d.ts.map +0 -1
- package/lib/or-vaadin-slider.js.map +0 -1
- package/lib/or-vaadin-text-area.d.ts.map +0 -1
- package/lib/or-vaadin-text-area.js.map +0 -1
- package/lib/or-vaadin-text-field.d.ts.map +0 -1
- package/lib/or-vaadin-text-field.js.map +0 -1
- package/lib/or-vaadin-time-picker.d.ts.map +0 -1
- package/lib/or-vaadin-time-picker.js.map +0 -1
- package/lib/or-vaadin-toggle-group.d.ts.map +0 -1
- package/lib/or-vaadin-toggle-group.js.map +0 -1
- package/lib/or-vaadin-toggle.d.ts.map +0 -1
- package/lib/or-vaadin-toggle.js.map +0 -1
- package/lib/util.d.ts.map +0 -1
- package/lib/util.js.map +0 -1
- package/lib/value-input-provider.d.ts.map +0 -1
- package/lib/value-input-provider.js.map +0 -1
- package/stories/or-vaadin-button.stories.ts +0 -74
- package/stories/or-vaadin-checkbox.stories.ts +0 -57
- package/stories/or-vaadin-combo-box.stories.ts +0 -58
- package/stories/or-vaadin-confirm-dialog.stories.ts +0 -80
- package/stories/or-vaadin-date-time-picker.stories.ts +0 -59
- package/stories/or-vaadin-dialog.stories.ts +0 -129
- package/stories/or-vaadin-list-box.stories.ts +0 -67
- package/stories/or-vaadin-number-field.stories.ts +0 -60
- package/stories/or-vaadin-select.stories.ts +0 -56
- package/stories/or-vaadin-text-area.stories.ts +0 -108
- package/stories/or-vaadin-text-field.stories.ts +0 -61
- package/stories/or-vaadin-toggle.stories.ts +0 -145
- /package/{lib → build/lib}/or-vaadin-badge.d.ts +0 -0
- /package/{lib → build/lib}/or-vaadin-badge.js +0 -0
- /package/{lib → build/lib}/or-vaadin-button.d.ts +0 -0
- /package/{lib → build/lib}/or-vaadin-button.js +0 -0
- /package/{lib → build/lib}/or-vaadin-checkbox-group.d.ts +0 -0
- /package/{lib → build/lib}/or-vaadin-checkbox-group.js +0 -0
- /package/{lib → build/lib}/or-vaadin-checkbox.d.ts +0 -0
- /package/{lib → build/lib}/or-vaadin-checkbox.js +0 -0
- /package/{lib → build/lib}/or-vaadin-combo-box.d.ts +0 -0
- /package/{lib → build/lib}/or-vaadin-combo-box.js +0 -0
- /package/{lib → build/lib}/or-vaadin-confirm-dialog.d.ts +0 -0
- /package/{lib → build/lib}/or-vaadin-confirm-dialog.js +0 -0
- /package/{lib → build/lib}/or-vaadin-date-picker.d.ts +0 -0
- /package/{lib → build/lib}/or-vaadin-date-picker.js +0 -0
- /package/{lib → build/lib}/or-vaadin-date-time-picker.d.ts +0 -0
- /package/{lib → build/lib}/or-vaadin-date-time-picker.js +0 -0
- /package/{lib → build/lib}/or-vaadin-dialog.d.ts +0 -0
- /package/{lib → build/lib}/or-vaadin-dialog.js +0 -0
- /package/{lib → build/lib}/or-vaadin-email-field.d.ts +0 -0
- /package/{lib → build/lib}/or-vaadin-email-field.js +0 -0
- /package/{lib → build/lib}/or-vaadin-input.d.ts +0 -0
- /package/{lib → build/lib}/or-vaadin-input.js +0 -0
- /package/{lib → build/lib}/or-vaadin-item.d.ts +0 -0
- /package/{lib → build/lib}/or-vaadin-item.js +0 -0
- /package/{lib → build/lib}/or-vaadin-list-box.d.ts +0 -0
- /package/{lib → build/lib}/or-vaadin-list-box.js +0 -0
- /package/{lib → build/lib}/or-vaadin-menu-bar.d.ts +0 -0
- /package/{lib → build/lib}/or-vaadin-menu-bar.js +0 -0
- /package/{lib → build/lib}/or-vaadin-multi-select-combo-box.d.ts +0 -0
- /package/{lib → build/lib}/or-vaadin-multi-select-combo-box.js +0 -0
- /package/{lib → build/lib}/or-vaadin-number-field.d.ts +0 -0
- /package/{lib → build/lib}/or-vaadin-number-field.js +0 -0
- /package/{lib → build/lib}/or-vaadin-password-field.d.ts +0 -0
- /package/{lib → build/lib}/or-vaadin-password-field.js +0 -0
- /package/{lib → build/lib}/or-vaadin-radio-group.d.ts +0 -0
- /package/{lib → build/lib}/or-vaadin-radio-group.js +0 -0
- /package/{lib → build/lib}/or-vaadin-select.d.ts +0 -0
- /package/{lib → build/lib}/or-vaadin-select.js +0 -0
- /package/{lib → build/lib}/or-vaadin-slider.d.ts +0 -0
- /package/{lib → build/lib}/or-vaadin-slider.js +0 -0
- /package/{lib → build/lib}/or-vaadin-text-area.d.ts +0 -0
- /package/{lib → build/lib}/or-vaadin-text-area.js +0 -0
- /package/{lib → build/lib}/or-vaadin-text-field.d.ts +0 -0
- /package/{lib → build/lib}/or-vaadin-text-field.js +0 -0
- /package/{lib → build/lib}/or-vaadin-time-picker.d.ts +0 -0
- /package/{lib → build/lib}/or-vaadin-time-picker.js +0 -0
- /package/{lib → build/lib}/or-vaadin-toggle-group.d.ts +0 -0
- /package/{lib → build/lib}/or-vaadin-toggle-group.js +0 -0
- /package/{lib → build/lib}/or-vaadin-toggle.d.ts +0 -0
- /package/{lib → build/lib}/or-vaadin-toggle.js +0 -0
- /package/{lib → build/lib}/util.d.ts +0 -0
- /package/{lib → build/lib}/util.js +0 -0
- /package/{lib → build/lib}/value-input-provider.d.ts +0 -0
- /package/{lib → build/lib}/value-input-provider.js +0 -0
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2026, OpenRemote Inc.
|
|
3
|
-
*
|
|
4
|
-
* This program is free software: you can redistribute it and/or modify
|
|
5
|
-
* it under the terms of the GNU Affero General Public License as
|
|
6
|
-
* published by the Free Software Foundation, either version 3 of the
|
|
7
|
-
* License, or (at your option) any later version.
|
|
8
|
-
*
|
|
9
|
-
* This program is distributed in the hope that it will be useful,
|
|
10
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
-
* GNU Affero General Public License for more details.
|
|
13
|
-
*
|
|
14
|
-
* You should have received a copy of the GNU Affero General Public License
|
|
15
|
-
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
16
|
-
*
|
|
17
|
-
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
18
|
-
*/
|
|
19
|
-
import { setCustomElementsManifest, type Meta, type StoryObj } from "@storybook/web-components";
|
|
20
|
-
import { getORStorybookHelpers } from "../../storybook-utils";
|
|
21
|
-
import customElements from "../custom-elements.json" with { type: "json" };
|
|
22
|
-
import packageJson from "../package.json" with { type: "json" };
|
|
23
|
-
import { html } from "lit";
|
|
24
|
-
import {
|
|
25
|
-
dialogFooterRenderer,
|
|
26
|
-
dialogHeaderRenderer,
|
|
27
|
-
dialogRenderer,
|
|
28
|
-
type OrVaadinDialog,
|
|
29
|
-
} from "../src/or-vaadin-dialog";
|
|
30
|
-
import manager from "@openremote/core";
|
|
31
|
-
import "../src/or-vaadin-button";
|
|
32
|
-
import "../src/or-vaadin-dialog";
|
|
33
|
-
import "../src/or-vaadin-number-field";
|
|
34
|
-
import "@openremote/or-map";
|
|
35
|
-
|
|
36
|
-
const tagName = "or-vaadin-dialog";
|
|
37
|
-
type Story = StoryObj;
|
|
38
|
-
setCustomElementsManifest(customElements);
|
|
39
|
-
|
|
40
|
-
const { events, args, argTypes, template } = getORStorybookHelpers(tagName);
|
|
41
|
-
|
|
42
|
-
const meta: Meta = {
|
|
43
|
-
title: "Playground/or-vaadin-components/dialog",
|
|
44
|
-
component: tagName,
|
|
45
|
-
args,
|
|
46
|
-
argTypes,
|
|
47
|
-
render: (storyArgs) => template(storyArgs),
|
|
48
|
-
excludeStories: /^[a-z].*/,
|
|
49
|
-
parameters: {
|
|
50
|
-
actions: {
|
|
51
|
-
handles: events,
|
|
52
|
-
},
|
|
53
|
-
docs: {
|
|
54
|
-
subtitle: `<${tagName}>`,
|
|
55
|
-
description:
|
|
56
|
-
"Dialog is a small window that can be used to present information and user interface elements in an overlay.",
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
export const Primary: Story = {
|
|
62
|
-
render: (_args) => {
|
|
63
|
-
return html`
|
|
64
|
-
<or-vaadin-dialog ${dialogHeaderRenderer(() => html`<h2>Dialog title</h2>`)}>
|
|
65
|
-
<p>Content</p>
|
|
66
|
-
</or-vaadin-dialog>
|
|
67
|
-
<or-vaadin-button @click="${() => (document.querySelector("or-vaadin-dialog") as OrVaadinDialog).open()}"
|
|
68
|
-
>Show dialog</or-vaadin-button
|
|
69
|
-
>
|
|
70
|
-
`;
|
|
71
|
-
},
|
|
72
|
-
parameters: {
|
|
73
|
-
docs: {
|
|
74
|
-
story: {
|
|
75
|
-
height: "360px",
|
|
76
|
-
},
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
export const MapExample: Story = {
|
|
82
|
-
render: (_args) => {
|
|
83
|
-
const footer = () => html`
|
|
84
|
-
<or-vaadin-button theme="tertiary">Cancel</or-vaadin-button>
|
|
85
|
-
<or-vaadin-button theme="primary">Save</or-vaadin-button>
|
|
86
|
-
`;
|
|
87
|
-
return html`
|
|
88
|
-
<or-vaadin-dialog header-title="Configure area" ${dialogFooterRenderer(footer)}>
|
|
89
|
-
<or-map style="aspect-ratio: 1/1;"></or-map>
|
|
90
|
-
<or-vaadin-number-field label="Radius (min. 100m)" min="100" value="100"></or-vaadin-number-field>
|
|
91
|
-
</or-vaadin-dialog>
|
|
92
|
-
<or-vaadin-button @click="${() => (document.querySelector("or-vaadin-dialog") as OrVaadinDialog).open()}"
|
|
93
|
-
>Show dialog</or-vaadin-button
|
|
94
|
-
>
|
|
95
|
-
`;
|
|
96
|
-
},
|
|
97
|
-
parameters: {
|
|
98
|
-
docs: {
|
|
99
|
-
story: {
|
|
100
|
-
height: "640px",
|
|
101
|
-
},
|
|
102
|
-
},
|
|
103
|
-
},
|
|
104
|
-
loaders: [
|
|
105
|
-
async (storyArgs) => ({
|
|
106
|
-
orManager: await loadOrManager(),
|
|
107
|
-
}),
|
|
108
|
-
],
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
export const examples: Story[] = [MapExample];
|
|
112
|
-
|
|
113
|
-
export { customElements, packageJson };
|
|
114
|
-
|
|
115
|
-
/* ------------------------------------------------------- */
|
|
116
|
-
/* UTILITY FUNCTIONS */
|
|
117
|
-
/* ------------------------------------------------------- */
|
|
118
|
-
|
|
119
|
-
async function loadOrManager() {
|
|
120
|
-
if (await manager.init({ managerUrl: "http://127.0.0.1:8080", realm: "smartcity" })) {
|
|
121
|
-
if (!manager.authenticated) {
|
|
122
|
-
manager.login();
|
|
123
|
-
}
|
|
124
|
-
return manager;
|
|
125
|
-
}
|
|
126
|
-
throw new Error("Manager could not be initialized");
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
export default meta;
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2026, OpenRemote Inc.
|
|
3
|
-
*
|
|
4
|
-
* This program is free software: you can redistribute it and/or modify
|
|
5
|
-
* it under the terms of the GNU Affero General Public License as
|
|
6
|
-
* published by the Free Software Foundation, either version 3 of the
|
|
7
|
-
* License, or (at your option) any later version.
|
|
8
|
-
*
|
|
9
|
-
* This program is distributed in the hope that it will be useful,
|
|
10
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
-
* GNU Affero General Public License for more details.
|
|
13
|
-
*
|
|
14
|
-
* You should have received a copy of the GNU Affero General Public License
|
|
15
|
-
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
16
|
-
*
|
|
17
|
-
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
18
|
-
*/
|
|
19
|
-
import { setCustomElementsManifest, type Meta, type StoryObj } from "@storybook/web-components";
|
|
20
|
-
import { getORStorybookHelpers } from "../../storybook-utils";
|
|
21
|
-
import customElements from "../custom-elements.json" with { type: "json" };
|
|
22
|
-
import packageJson from "../package.json" with { type: "json" };
|
|
23
|
-
import "../src/or-vaadin-list-box";
|
|
24
|
-
import "../src/or-vaadin-item";
|
|
25
|
-
import { html } from "lit";
|
|
26
|
-
|
|
27
|
-
const tagName = "or-vaadin-list-box";
|
|
28
|
-
type Story = StoryObj;
|
|
29
|
-
setCustomElementsManifest(customElements);
|
|
30
|
-
|
|
31
|
-
const { events, args, argTypes, template } = getORStorybookHelpers(tagName);
|
|
32
|
-
|
|
33
|
-
const meta: Meta = {
|
|
34
|
-
title: "Playground/or-vaadin-components/list-box",
|
|
35
|
-
component: tagName,
|
|
36
|
-
args,
|
|
37
|
-
argTypes,
|
|
38
|
-
render: (storyArgs) => template(storyArgs),
|
|
39
|
-
excludeStories: /^[a-z].*/,
|
|
40
|
-
parameters: {
|
|
41
|
-
actions: {
|
|
42
|
-
handles: events,
|
|
43
|
-
},
|
|
44
|
-
docs: {
|
|
45
|
-
subtitle: `<${tagName}>`,
|
|
46
|
-
description: "List Box allows the user to select one or more values from a scrollable list of items.",
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
export const Primary: Story = {
|
|
52
|
-
render: (args) =>
|
|
53
|
-
template(
|
|
54
|
-
args,
|
|
55
|
-
html`
|
|
56
|
-
<or-vaadin-item>Item 1</or-vaadin-item>
|
|
57
|
-
<or-vaadin-item>Item 2</or-vaadin-item>
|
|
58
|
-
<or-vaadin-item>Item 3</or-vaadin-item>
|
|
59
|
-
`
|
|
60
|
-
),
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
export const examples: Story[] = [];
|
|
64
|
-
|
|
65
|
-
export { customElements, packageJson };
|
|
66
|
-
|
|
67
|
-
export default meta;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2026, OpenRemote Inc.
|
|
3
|
-
*
|
|
4
|
-
* This program is free software: you can redistribute it and/or modify
|
|
5
|
-
* it under the terms of the GNU Affero General Public License as
|
|
6
|
-
* published by the Free Software Foundation, either version 3 of the
|
|
7
|
-
* License, or (at your option) any later version.
|
|
8
|
-
*
|
|
9
|
-
* This program is distributed in the hope that it will be useful,
|
|
10
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
-
* GNU Affero General Public License for more details.
|
|
13
|
-
*
|
|
14
|
-
* You should have received a copy of the GNU Affero General Public License
|
|
15
|
-
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
16
|
-
*
|
|
17
|
-
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
18
|
-
*/
|
|
19
|
-
import { setCustomElementsManifest, type Meta, type StoryObj } from "@storybook/web-components";
|
|
20
|
-
import { getORStorybookHelpers } from "../../storybook-utils";
|
|
21
|
-
import customElements from "../custom-elements.json" with { type: "json" };
|
|
22
|
-
import packageJson from "../package.json" with { type: "json" };
|
|
23
|
-
import "../src/or-vaadin-number-field";
|
|
24
|
-
|
|
25
|
-
const tagName = "or-vaadin-number-field";
|
|
26
|
-
type Story = StoryObj;
|
|
27
|
-
setCustomElementsManifest(customElements);
|
|
28
|
-
|
|
29
|
-
const { events, args, argTypes, template } = getORStorybookHelpers(tagName);
|
|
30
|
-
|
|
31
|
-
const meta: Meta = {
|
|
32
|
-
title: "Playground/or-vaadin-components/number-field",
|
|
33
|
-
component: tagName,
|
|
34
|
-
args,
|
|
35
|
-
argTypes,
|
|
36
|
-
render: (storyArgs) => template(storyArgs),
|
|
37
|
-
excludeStories: /^[a-z].*/,
|
|
38
|
-
parameters: {
|
|
39
|
-
actions: {
|
|
40
|
-
handles: events,
|
|
41
|
-
},
|
|
42
|
-
docs: {
|
|
43
|
-
subtitle: `<${tagName}>`,
|
|
44
|
-
description:
|
|
45
|
-
"Number Field is an input field that accepts only numeric input. The input can be a decimal or an integer.",
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
export const Primary: Story = {
|
|
51
|
-
args: {
|
|
52
|
-
value: 100,
|
|
53
|
-
},
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
export const examples: Story[] = [];
|
|
57
|
-
|
|
58
|
-
export { customElements, packageJson };
|
|
59
|
-
|
|
60
|
-
export default meta;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2026, OpenRemote Inc.
|
|
3
|
-
*
|
|
4
|
-
* This program is free software: you can redistribute it and/or modify
|
|
5
|
-
* it under the terms of the GNU Affero General Public License as
|
|
6
|
-
* published by the Free Software Foundation, either version 3 of the
|
|
7
|
-
* License, or (at your option) any later version.
|
|
8
|
-
*
|
|
9
|
-
* This program is distributed in the hope that it will be useful,
|
|
10
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
-
* GNU Affero General Public License for more details.
|
|
13
|
-
*
|
|
14
|
-
* You should have received a copy of the GNU Affero General Public License
|
|
15
|
-
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
16
|
-
*
|
|
17
|
-
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
18
|
-
*/
|
|
19
|
-
import { setCustomElementsManifest, type Meta, type StoryObj } from "@storybook/web-components";
|
|
20
|
-
import { getORStorybookHelpers } from "../../storybook-utils";
|
|
21
|
-
import customElements from "../custom-elements.json" with { type: "json" };
|
|
22
|
-
import packageJson from "../package.json" with { type: "json" };
|
|
23
|
-
import { html } from "lit";
|
|
24
|
-
import "../src/or-vaadin-select";
|
|
25
|
-
|
|
26
|
-
const tagName = "or-vaadin-select";
|
|
27
|
-
type Story = StoryObj;
|
|
28
|
-
setCustomElementsManifest(customElements);
|
|
29
|
-
|
|
30
|
-
const { events, args, argTypes, template } = getORStorybookHelpers(tagName);
|
|
31
|
-
|
|
32
|
-
const meta: Meta = {
|
|
33
|
-
title: "Playground/or-vaadin-components/select",
|
|
34
|
-
component: tagName,
|
|
35
|
-
args,
|
|
36
|
-
argTypes,
|
|
37
|
-
render: (storyArgs) => template(storyArgs),
|
|
38
|
-
excludeStories: /^[a-z].*/,
|
|
39
|
-
parameters: {
|
|
40
|
-
actions: {
|
|
41
|
-
handles: events,
|
|
42
|
-
},
|
|
43
|
-
docs: {
|
|
44
|
-
subtitle: `<${tagName}>`,
|
|
45
|
-
description: "A select allows users to choose a single value from a list of options presented in an overlay.",
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
export const Primary: Story = {
|
|
51
|
-
render: (args) => template(args, html`<span slot="label">Select your option</span>`),
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
export { customElements, packageJson };
|
|
55
|
-
|
|
56
|
-
export default meta;
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2026, OpenRemote Inc.
|
|
3
|
-
*
|
|
4
|
-
* This program is free software: you can redistribute it and/or modify
|
|
5
|
-
* it under the terms of the GNU Affero General Public License as
|
|
6
|
-
* published by the Free Software Foundation, either version 3 of the
|
|
7
|
-
* License, or (at your option) any later version.
|
|
8
|
-
*
|
|
9
|
-
* This program is distributed in the hope that it will be useful,
|
|
10
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
-
* GNU Affero General Public License for more details.
|
|
13
|
-
*
|
|
14
|
-
* You should have received a copy of the GNU Affero General Public License
|
|
15
|
-
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
16
|
-
*
|
|
17
|
-
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
18
|
-
*/
|
|
19
|
-
import { setCustomElementsManifest, type Meta, type StoryObj } from "@storybook/web-components";
|
|
20
|
-
import { getORStorybookHelpers } from "../../storybook-utils";
|
|
21
|
-
import customElements from "../custom-elements.json" with { type: "json" };
|
|
22
|
-
import packageJson from "../package.json" with { type: "json" };
|
|
23
|
-
import "../src/or-vaadin-text-area";
|
|
24
|
-
|
|
25
|
-
const tagName = "or-vaadin-text-area";
|
|
26
|
-
type Story = StoryObj;
|
|
27
|
-
setCustomElementsManifest(customElements);
|
|
28
|
-
|
|
29
|
-
const { events, args, argTypes, template } = getORStorybookHelpers(tagName);
|
|
30
|
-
|
|
31
|
-
const meta: Meta = {
|
|
32
|
-
title: "Playground/or-vaadin-components/text-area",
|
|
33
|
-
component: tagName,
|
|
34
|
-
args,
|
|
35
|
-
argTypes,
|
|
36
|
-
render: (storyArgs) => template(storyArgs),
|
|
37
|
-
excludeStories: /^[a-z].*/,
|
|
38
|
-
parameters: {
|
|
39
|
-
actions: {
|
|
40
|
-
handles: events,
|
|
41
|
-
},
|
|
42
|
-
docs: {
|
|
43
|
-
subtitle: `<${tagName}>`,
|
|
44
|
-
description:
|
|
45
|
-
"Text Area is a multi-line text input. By default it automatically resizes with its content, bounded by `min-rows`/`max-rows`; set `manualresize` for a fixed height (starting at `min-rows`) with a native resize handle.",
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
// Default: automatically resizes with the content.
|
|
51
|
-
export const Primary: Story = {
|
|
52
|
-
args: {
|
|
53
|
-
label: "Notes",
|
|
54
|
-
value: "OpenRemote",
|
|
55
|
-
},
|
|
56
|
-
parameters: {
|
|
57
|
-
docs: {
|
|
58
|
-
story: {
|
|
59
|
-
height: "120px",
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
// Fixed height with a native vertical resize handle; overflow scrolls until dragged.
|
|
66
|
-
export const ManualResize: Story = {
|
|
67
|
-
parameters: {
|
|
68
|
-
title: "Manual resizing",
|
|
69
|
-
summary:
|
|
70
|
-
"With `manualresize` the field starts at `min-rows`, keeps a fixed height, and shows the native resize handle. Overflowing content scrolls until the handle is dragged.",
|
|
71
|
-
docs: {
|
|
72
|
-
story: {
|
|
73
|
-
height: "180px",
|
|
74
|
-
},
|
|
75
|
-
},
|
|
76
|
-
},
|
|
77
|
-
args: {
|
|
78
|
-
label: "Notes",
|
|
79
|
-
minRows: 5,
|
|
80
|
-
manualresize: true,
|
|
81
|
-
value: "one\ntwo\nthree\nfour\nfive\nsix\nseven\neight",
|
|
82
|
-
},
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
// Automatic resizing constrained to a number of rows.
|
|
86
|
-
export const BoundedAutoresize: Story = {
|
|
87
|
-
parameters: {
|
|
88
|
-
title: "Bounded automatic resizing",
|
|
89
|
-
summary:
|
|
90
|
-
"`min-rows` and `max-rows` bound the automatic resizing: the field starts at `min-rows` and grows with the content until `max-rows`, after which it scrolls.",
|
|
91
|
-
docs: {
|
|
92
|
-
story: {
|
|
93
|
-
height: "140px",
|
|
94
|
-
},
|
|
95
|
-
},
|
|
96
|
-
},
|
|
97
|
-
args: {
|
|
98
|
-
label: "Notes",
|
|
99
|
-
minRows: 2,
|
|
100
|
-
maxRows: 6,
|
|
101
|
-
},
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
export const examples: Story[] = [ManualResize, BoundedAutoresize];
|
|
105
|
-
|
|
106
|
-
export { customElements, packageJson };
|
|
107
|
-
|
|
108
|
-
export default meta;
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2026, OpenRemote Inc.
|
|
3
|
-
*
|
|
4
|
-
* This program is free software: you can redistribute it and/or modify
|
|
5
|
-
* it under the terms of the GNU Affero General Public License as
|
|
6
|
-
* published by the Free Software Foundation, either version 3 of the
|
|
7
|
-
* License, or (at your option) any later version.
|
|
8
|
-
*
|
|
9
|
-
* This program is distributed in the hope that it will be useful,
|
|
10
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
-
* GNU Affero General Public License for more details.
|
|
13
|
-
*
|
|
14
|
-
* You should have received a copy of the GNU Affero General Public License
|
|
15
|
-
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
16
|
-
*
|
|
17
|
-
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
18
|
-
*/
|
|
19
|
-
import { setCustomElementsManifest, type Meta, type StoryObj } from "@storybook/web-components";
|
|
20
|
-
import { getORStorybookHelpers } from "../../storybook-utils";
|
|
21
|
-
import customElements from "../custom-elements.json" with { type: "json" };
|
|
22
|
-
import packageJson from "../package.json" with { type: "json" };
|
|
23
|
-
import "../src/or-vaadin-text-field";
|
|
24
|
-
|
|
25
|
-
const tagName = "or-vaadin-text-field";
|
|
26
|
-
type Story = StoryObj;
|
|
27
|
-
setCustomElementsManifest(customElements);
|
|
28
|
-
|
|
29
|
-
const { events, args, argTypes, template } = getORStorybookHelpers(tagName);
|
|
30
|
-
|
|
31
|
-
const meta: Meta = {
|
|
32
|
-
title: "Playground/or-vaadin-components/text-field",
|
|
33
|
-
component: tagName,
|
|
34
|
-
args,
|
|
35
|
-
argTypes,
|
|
36
|
-
render: (storyArgs) => template(storyArgs),
|
|
37
|
-
excludeStories: /^[a-z].*/,
|
|
38
|
-
parameters: {
|
|
39
|
-
actions: {
|
|
40
|
-
handles: events,
|
|
41
|
-
},
|
|
42
|
-
docs: {
|
|
43
|
-
subtitle: `<${tagName}>`,
|
|
44
|
-
description:
|
|
45
|
-
"Text Field allows users to enter text. Prefix and suffix components, such as icons, are also supported.",
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
export const Primary: Story = {
|
|
51
|
-
args: {
|
|
52
|
-
label: "Organization",
|
|
53
|
-
value: "OpenRemote",
|
|
54
|
-
},
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
export const examples: Story[] = [];
|
|
58
|
-
|
|
59
|
-
export { customElements, packageJson };
|
|
60
|
-
|
|
61
|
-
export default meta;
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2026, OpenRemote Inc.
|
|
3
|
-
*
|
|
4
|
-
* This program is free software: you can redistribute it and/or modify
|
|
5
|
-
* it under the terms of the GNU Affero General Public License as
|
|
6
|
-
* published by the Free Software Foundation, either version 3 of the
|
|
7
|
-
* License, or (at your option) any later version.
|
|
8
|
-
*
|
|
9
|
-
* This program is distributed in the hope that it will be useful,
|
|
10
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
-
* GNU Affero General Public License for more details.
|
|
13
|
-
*
|
|
14
|
-
* You should have received a copy of the GNU Affero General Public License
|
|
15
|
-
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
16
|
-
*
|
|
17
|
-
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
18
|
-
*/
|
|
19
|
-
import { setCustomElementsManifest, type Meta, type StoryObj } from "@storybook/web-components";
|
|
20
|
-
import { getORStorybookHelpers } from "../../storybook-utils";
|
|
21
|
-
import customElements from "../custom-elements.json" with { type: "json" };
|
|
22
|
-
import packageJson from "../package.json" with { type: "json" };
|
|
23
|
-
import { html } from "lit";
|
|
24
|
-
import "../src/or-vaadin-toggle";
|
|
25
|
-
import "../src/or-vaadin-toggle-group";
|
|
26
|
-
|
|
27
|
-
const tagName = "or-vaadin-toggle";
|
|
28
|
-
type Story = StoryObj;
|
|
29
|
-
setCustomElementsManifest(customElements);
|
|
30
|
-
|
|
31
|
-
const { events, args, argTypes, template } = getORStorybookHelpers(tagName);
|
|
32
|
-
|
|
33
|
-
const meta: Meta = {
|
|
34
|
-
title: "Playground/or-vaadin-components/toggle",
|
|
35
|
-
component: tagName,
|
|
36
|
-
args,
|
|
37
|
-
argTypes,
|
|
38
|
-
render: (storyArgs) => template(storyArgs),
|
|
39
|
-
excludeStories: /^[a-z].*/,
|
|
40
|
-
parameters: {
|
|
41
|
-
actions: {
|
|
42
|
-
handles: events,
|
|
43
|
-
},
|
|
44
|
-
docs: {
|
|
45
|
-
subtitle: `<${tagName}>`,
|
|
46
|
-
description:
|
|
47
|
-
"Toggle is an input field representing a binary on/off choice. It reuses the Vaadin checkbox as its base, so it supports the same states (checked, disabled, readonly, required) and events (`change`, `checked-changed`), while being exposed to assistive technology as a switch.",
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
export const Primary: Story = {
|
|
53
|
-
args: {
|
|
54
|
-
label: "Toggle",
|
|
55
|
-
checked: true,
|
|
56
|
-
},
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
/** Disabled and readonly toggles, in both the off and on state. */
|
|
60
|
-
export const DisabledReadonly: Story = {
|
|
61
|
-
name: "Disabled & Readonly",
|
|
62
|
-
parameters: {
|
|
63
|
-
title: "Disabled & Readonly",
|
|
64
|
-
summary:
|
|
65
|
-
"Use `disabled` to block interaction entirely and `readonly` to show a value that cannot be edited. Both combine with `checked`.",
|
|
66
|
-
docs: {
|
|
67
|
-
story: {
|
|
68
|
-
height: "130px",
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
render: () => html`
|
|
73
|
-
<div style="display: grid; grid-template-columns: repeat(2, max-content); gap: 24px 64px; padding: 8px;">
|
|
74
|
-
<or-vaadin-toggle label="Disabled, off" disabled></or-vaadin-toggle>
|
|
75
|
-
<or-vaadin-toggle label="Disabled, on" checked disabled></or-vaadin-toggle>
|
|
76
|
-
<or-vaadin-toggle label="Readonly, off" readonly></or-vaadin-toggle>
|
|
77
|
-
<or-vaadin-toggle label="Readonly, on" checked readonly></or-vaadin-toggle>
|
|
78
|
-
</div>
|
|
79
|
-
`,
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
/** Several toggles combined inside a toggle group, in both orientations. */
|
|
83
|
-
export const Groups: Story = {
|
|
84
|
-
name: "Groups",
|
|
85
|
-
parameters: {
|
|
86
|
-
title: "Groups",
|
|
87
|
-
summary:
|
|
88
|
-
'Multiple toggles can be combined inside an `<or-vaadin-toggle-group>` to share a group label, helper text and validation. Under the theme the group is horizontal by default; use `theme="vertical"` to stack them.',
|
|
89
|
-
docs: {
|
|
90
|
-
story: {
|
|
91
|
-
height: "280px",
|
|
92
|
-
},
|
|
93
|
-
},
|
|
94
|
-
},
|
|
95
|
-
render: () => html`
|
|
96
|
-
<div style="display: flex; flex-direction: column; gap: 32px; padding: 8px;">
|
|
97
|
-
<or-vaadin-toggle-group
|
|
98
|
-
label="Notifications (vertical)"
|
|
99
|
-
theme="vertical"
|
|
100
|
-
helper-text="Choose how you want to be notified"
|
|
101
|
-
>
|
|
102
|
-
<or-vaadin-toggle label="Email" value="email" checked></or-vaadin-toggle>
|
|
103
|
-
<or-vaadin-toggle label="SMS" value="sms"></or-vaadin-toggle>
|
|
104
|
-
<or-vaadin-toggle label="Push" value="push" checked></or-vaadin-toggle>
|
|
105
|
-
</or-vaadin-toggle-group>
|
|
106
|
-
|
|
107
|
-
<or-vaadin-toggle-group label="Notifications (horizontal)" helper-text="Choose how you want to be notified">
|
|
108
|
-
<or-vaadin-toggle label="Email" value="email" checked></or-vaadin-toggle>
|
|
109
|
-
<or-vaadin-toggle label="SMS" value="sms"></or-vaadin-toggle>
|
|
110
|
-
<or-vaadin-toggle label="Push" value="push" checked></or-vaadin-toggle>
|
|
111
|
-
</or-vaadin-toggle-group>
|
|
112
|
-
</div>
|
|
113
|
-
`,
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
/** Helper text gives extra context below the toggle. */
|
|
117
|
-
export const HelperText: Story = {
|
|
118
|
-
name: "Helper text",
|
|
119
|
-
parameters: {
|
|
120
|
-
title: "Helper text",
|
|
121
|
-
summary:
|
|
122
|
-
"Use `helper-text` to show additional context below the toggle, for example to explain why a choice is `required`.",
|
|
123
|
-
docs: {
|
|
124
|
-
story: {
|
|
125
|
-
height: "110px",
|
|
126
|
-
},
|
|
127
|
-
},
|
|
128
|
-
},
|
|
129
|
-
render: () => html`
|
|
130
|
-
<div style="display: grid; grid-template-columns: repeat(2, max-content); gap: 24px 64px; padding: 8px;">
|
|
131
|
-
<or-vaadin-toggle
|
|
132
|
-
label="With helper text"
|
|
133
|
-
checked
|
|
134
|
-
helper-text="Additional context shown below the toggle"
|
|
135
|
-
></or-vaadin-toggle>
|
|
136
|
-
<or-vaadin-toggle label="Required" required helper-text="This choice is required"></or-vaadin-toggle>
|
|
137
|
-
</div>
|
|
138
|
-
`,
|
|
139
|
-
};
|
|
140
|
-
|
|
141
|
-
export const examples = [DisabledReadonly, Groups, HelperText];
|
|
142
|
-
|
|
143
|
-
export { customElements, packageJson };
|
|
144
|
-
|
|
145
|
-
export default meta;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|