@openremote/or-attribute-input 1.11.0-snapshot.20251103144513 → 1.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,248 @@
1
+
2
+ import type { OrAttributeInputChangedEvent, getAttributeInputWrapper, getHelperText, jsonFormsInputTemplateProvider, OrAttributeInput } from "./lib/index.d.ts";
3
+
4
+ /**
5
+ * This type can be used to create scoped tags for your components.
6
+ *
7
+ * Usage:
8
+ *
9
+ * ```ts
10
+ * import type { ScopedElements } from "path/to/library/jsx-integration";
11
+ *
12
+ * declare module "my-library" {
13
+ * namespace JSX {
14
+ * interface IntrinsicElements
15
+ * extends ScopedElements<'test-', ''> {}
16
+ * }
17
+ * }
18
+ * ```
19
+ *
20
+ * @deprecated Runtime scoped elements result in duplicate types and can confusing for developers. It is recommended to use the `prefix` and `suffix` options to generate new types instead.
21
+ */
22
+ export type ScopedElements<
23
+ Prefix extends string = "",
24
+ Suffix extends string = ""
25
+ > = {
26
+ [Key in keyof CustomElements as `${Prefix}${Key}${Suffix}`]: CustomElements[Key];
27
+ };
28
+
29
+ type BaseProps<T extends HTMLElement> = {
30
+
31
+ /** Content added between the opening and closing tags of the element */
32
+ children?: any;
33
+ /** Used for declaratively styling one or more elements using CSS (Cascading Stylesheets) */
34
+ class?: string;
35
+ /** Used for declaratively styling one or more elements using CSS (Cascading Stylesheets) */
36
+ className?: string;
37
+ /** Takes an object where the key is the class name(s) and the value is a boolean expression. When true, the class is applied, and when false, it is removed. */
38
+ classList?: Record<string, boolean | undefined>;
39
+ /** Specifies the text direction of the element. */
40
+ dir?: "ltr" | "rtl";
41
+ /** Contains a space-separated list of the part names of the element that should be exposed on the host element. */
42
+ exportparts?: string;
43
+ /** For <label> and <output>, lets you associate the label with some control. */
44
+ htmlFor?: string;
45
+ /** Specifies whether the element should be hidden. */
46
+ hidden?: boolean | string;
47
+ /** A unique identifier for the element. */
48
+ id?: string;
49
+ /** Keys tell React which array item each component corresponds to */
50
+ key?: string | number;
51
+ /** Specifies the language of the element. */
52
+ lang?: string;
53
+ /** Contains a space-separated list of the part names of the element. Part names allows CSS to select and style specific elements in a shadow tree via the ::part pseudo-element. */
54
+ part?: string;
55
+ /** Use the ref attribute with a variable to assign a DOM element to the variable once the element is rendered. */
56
+ ref?: T | ((e: T) => void);
57
+ /** Adds a reference for a custom element slot */
58
+ slot?: string;
59
+ /** Prop for setting inline styles */
60
+ style?: Record<string, string | number>;
61
+ /** Overrides the default Tab button behavior. Avoid using values other than -1 and 0. */
62
+ tabIndex?: number;
63
+ /** Specifies the tooltip text for the element. */
64
+ title?: string;
65
+ /** Passing 'no' excludes the element content from being translated. */
66
+ translate?: "yes" | "no";
67
+ /** The popover global attribute is used to designate an element as a popover element. */
68
+ popover?: "auto" | "hint" | "manual";
69
+ /** Turns an element element into a popover control button; takes the ID of the popover element to control as its value. */
70
+ popovertarget?: "top" | "bottom" | "left" | "right" | "auto";
71
+ /** Specifies the action to be performed on a popover element being controlled by a control element. */
72
+ popovertargetaction?: "show" | "hide" | "toggle";
73
+
74
+ } ;
75
+
76
+ type BaseEvents = {
77
+
78
+
79
+ };
80
+
81
+
82
+
83
+ export type OrAttributeInputProps = {
84
+ /** */
85
+ "attribute"?: OrAttributeInput['attribute'];
86
+ /** */
87
+ "assetId"?: OrAttributeInput['assetId'];
88
+ /** */
89
+ "attributeDescriptor"?: OrAttributeInput['attributeDescriptor'];
90
+ /** */
91
+ "valueDescriptor"?: OrAttributeInput['valueDescriptor'];
92
+ /** */
93
+ "assetType"?: OrAttributeInput['assetType'];
94
+ /** */
95
+ "label"?: OrAttributeInput['label'];
96
+ /** */
97
+ "disabled"?: OrAttributeInput['disabled'];
98
+ /** */
99
+ "readonly"?: OrAttributeInput['readonly'];
100
+ /** */
101
+ "required"?: OrAttributeInput['required'];
102
+ /** */
103
+ "value"?: OrAttributeInput['value'];
104
+ /** */
105
+ "inputType"?: OrAttributeInput['inputType'];
106
+ /** */
107
+ "hasHelperText"?: OrAttributeInput['hasHelperText'];
108
+ /** */
109
+ "disableButton"?: OrAttributeInput['disableButton'];
110
+ /** */
111
+ "disableSubscribe"?: OrAttributeInput['disableSubscribe'];
112
+ /** */
113
+ "disableWrite"?: OrAttributeInput['disableWrite'];
114
+ /** */
115
+ "compact"?: OrAttributeInput['compact'];
116
+ /** */
117
+ "comfortable"?: OrAttributeInput['comfortable'];
118
+ /** */
119
+ "resizeVertical"?: OrAttributeInput['resizeVertical'];
120
+ /** */
121
+ "fullWidth"?: OrAttributeInput['fullWidth'];
122
+ /** */
123
+ "rounded"?: OrAttributeInput['rounded'];
124
+ /** */
125
+ "outlined"?: OrAttributeInput['outlined'];
126
+ /** */
127
+ "_attributeEvent"?: OrAttributeInput['_attributeEvent'];
128
+ /** */
129
+ "_writeTimeoutHandler"?: OrAttributeInput['_writeTimeoutHandler'];
130
+ /** */
131
+ "customProvider"?: OrAttributeInput['customProvider'];
132
+ /** */
133
+ "writeTimeout"?: OrAttributeInput['writeTimeout'];
134
+ /** */
135
+ "langChangedCallback"?: OrAttributeInput['langChangedCallback'];
136
+
137
+ /** */
138
+ "onnewValue"?: (e: CustomEvent<OrAttributeInputChangedEvent>) => void;
139
+ }
140
+
141
+ export type CustomElements = {
142
+
143
+
144
+ /**
145
+ *
146
+ *
147
+ * ## Attributes & Properties
148
+ *
149
+ * Component attributes and properties that can be applied to the element or by using JavaScript.
150
+ *
151
+ * - `attribute`: undefined
152
+ * - `assetId`: undefined
153
+ * - `attributeDescriptor`: undefined
154
+ * - `valueDescriptor`: undefined
155
+ * - `assetType`: undefined
156
+ * - `label`: undefined
157
+ * - `disabled`: undefined
158
+ * - `readonly`: undefined
159
+ * - `required`: undefined
160
+ * - `value`: undefined
161
+ * - `inputType`: undefined
162
+ * - `hasHelperText`: undefined
163
+ * - `disableButton`: undefined
164
+ * - `disableSubscribe`: undefined
165
+ * - `disableWrite`: undefined
166
+ * - `compact`: undefined
167
+ * - `comfortable`: undefined
168
+ * - `resizeVertical`: undefined
169
+ * - `fullWidth`: undefined
170
+ * - `rounded`: undefined
171
+ * - `outlined`: undefined
172
+ * - `_attributeEvent`: undefined
173
+ * - `_writeTimeoutHandler`: undefined
174
+ * - `customProvider`: undefined (property only)
175
+ * - `writeTimeout`: undefined (property only)
176
+ * - `langChangedCallback`: undefined (property only)
177
+ *
178
+ * ## Events
179
+ *
180
+ * Events that will be emitted by the component.
181
+ *
182
+ * - `newValue`: undefined
183
+ *
184
+ * ## Methods
185
+ *
186
+ * Methods that can be called to access component functionality.
187
+ *
188
+ * - `getLabel() => string | undefined`: undefined
189
+ * - `isReadonly() => boolean`: undefined
190
+ * - `_onEvent(event: SharedEvent) => void`: This is called by asset-mixin
191
+ * - `checkValidity() => boolean`: undefined
192
+ */
193
+ "or-attribute-input": Partial<OrAttributeInputProps & BaseProps<OrAttributeInput> & BaseEvents>;
194
+ }
195
+
196
+ export type CustomCssProperties = {
197
+
198
+ }
199
+
200
+
201
+ declare module 'react' {
202
+ namespace JSX {
203
+ interface IntrinsicElements extends CustomElements {}
204
+ }
205
+ export interface CSSProperties extends CustomCssProperties {}
206
+ }
207
+
208
+ declare module 'preact' {
209
+ namespace JSX {
210
+ interface IntrinsicElements extends CustomElements {}
211
+ }
212
+ export interface CSSProperties extends CustomCssProperties {}
213
+ }
214
+
215
+ declare module '@builder.io/qwik' {
216
+ namespace JSX {
217
+ interface IntrinsicElements extends CustomElements {}
218
+ }
219
+ export interface CSSProperties extends CustomCssProperties {}
220
+ }
221
+
222
+ declare module '@stencil/core' {
223
+ namespace JSX {
224
+ interface IntrinsicElements extends CustomElements {}
225
+ }
226
+ export interface CSSProperties extends CustomCssProperties {}
227
+ }
228
+
229
+ declare module 'hono/jsx' {
230
+ namespace JSX {
231
+ interface IntrinsicElements extends CustomElements {}
232
+ }
233
+ export interface CSSProperties extends CustomCssProperties {}
234
+ }
235
+
236
+ declare module 'react-native' {
237
+ namespace JSX {
238
+ interface IntrinsicElements extends CustomElements {}
239
+ }
240
+ export interface CSSProperties extends CustomCssProperties {}
241
+ }
242
+
243
+ declare global {
244
+ namespace JSX {
245
+ interface IntrinsicElements extends CustomElements {}
246
+ }
247
+ export interface CSSProperties extends CustomCssProperties {}
248
+ }
@@ -494,6 +494,9 @@
494
494
  "type": {
495
495
  "text": "string | undefined"
496
496
  }
497
+ },
498
+ "type": {
499
+ "text": "getLabel() => string | undefined"
497
500
  }
498
501
  },
499
502
  {
@@ -504,6 +507,9 @@
504
507
  "type": {
505
508
  "text": "boolean"
506
509
  }
510
+ },
511
+ "type": {
512
+ "text": "isReadonly() => boolean"
507
513
  }
508
514
  },
509
515
  {
@@ -547,7 +553,10 @@
547
553
  }
548
554
  }
549
555
  ],
550
- "description": "This is called by asset-mixin"
556
+ "description": "This is called by asset-mixin",
557
+ "type": {
558
+ "text": "_onEvent(event: SharedEvent) => void"
559
+ }
551
560
  },
552
561
  {
553
562
  "kind": "method",
@@ -557,6 +566,9 @@
557
566
  "type": {
558
567
  "text": "boolean"
559
568
  }
569
+ },
570
+ "type": {
571
+ "text": "checkValidity() => boolean"
560
572
  }
561
573
  },
562
574
  {
@@ -811,7 +823,9 @@
811
823
  "package": "lit"
812
824
  },
813
825
  "tagName": "or-attribute-input",
814
- "customElement": true
826
+ "customElement": true,
827
+ "modulePath": "src/index.ts",
828
+ "definitionPath": "src/index.ts"
815
829
  }
816
830
  ],
817
831
  "exports": [