@nvidia-elements/forms 0.0.0 → 0.0.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.
Files changed (36) hide show
  1. package/package.json +6 -3
  2. package/dist/custom-elements-jsx.d.ts +0 -76
  3. package/dist/custom-elements-vue.d.ts +0 -15
  4. package/dist/custom-elements.json +0 -560
  5. package/dist/data.snippets.json +0 -1
  6. package/dist/examples/csv.examples.js +0 -6
  7. package/dist/examples/csv.examples.js.map +0 -1
  8. package/dist/examples/csv.examples.json +0 -17
  9. package/dist/examples/light.examples.js +0 -6
  10. package/dist/examples/light.examples.js.map +0 -1
  11. package/dist/examples/light.examples.json +0 -27
  12. package/dist/examples/simple.examples.js +0 -6
  13. package/dist/examples/simple.examples.js.map +0 -1
  14. package/dist/examples/simple.examples.json +0 -27
  15. package/dist/examples/visualization.examples.js +0 -6
  16. package/dist/examples/visualization.examples.js.map +0 -1
  17. package/dist/examples/visualization.examples.json +0 -25
  18. package/dist/index.d.ts +0 -2
  19. package/dist/index.js +0 -6
  20. package/dist/index.js.map +0 -1
  21. package/dist/internal/errors.d.ts +0 -3
  22. package/dist/internal/errors.js +0 -10
  23. package/dist/internal/errors.js.map +0 -1
  24. package/dist/internal/schema.d.ts +0 -9
  25. package/dist/internal/schema.js +0 -98
  26. package/dist/internal/schema.js.map +0 -1
  27. package/dist/internal/types.d.ts +0 -77
  28. package/dist/internal/utils.d.ts +0 -1
  29. package/dist/internal/utils.js +0 -10
  30. package/dist/internal/utils.js.map +0 -1
  31. package/dist/mixin/index.d.ts +0 -453
  32. package/dist/mixin/index.js +0 -182
  33. package/dist/mixin/index.js.map +0 -1
  34. package/dist/validators/index.d.ts +0 -18
  35. package/dist/validators/index.js +0 -22
  36. package/dist/validators/index.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nvidia-elements/forms",
3
- "version": "0.0.0",
3
+ "version": "0.0.1",
4
4
  "release": {
5
5
  "extends": "../../release.config.js"
6
6
  },
@@ -73,10 +73,10 @@
73
73
  "typescript": "6.0.2",
74
74
  "vite": "8.0.0",
75
75
  "vitest": "4.1.0",
76
- "@internals/vite": "0.0.0",
76
+ "@internals/eslint": "0.0.0",
77
77
  "@nvidia-elements/styles": "0.0.0",
78
78
  "@internals/testing": "0.0.0",
79
- "@internals/eslint": "0.0.0",
79
+ "@internals/vite": "0.0.0",
80
80
  "@nvidia-elements/lint": "0.0.0"
81
81
  },
82
82
  "wireit": {
@@ -214,6 +214,9 @@
214
214
  ]
215
215
  }
216
216
  },
217
+ "publishConfig": {
218
+ "provenance": true
219
+ },
217
220
  "scripts": {
218
221
  "ci": "wireit",
219
222
  "dev": "wireit",
@@ -1,76 +0,0 @@
1
- /**
2
- * This type can be used to create scoped tags for your components.
3
- *
4
- * Usage:
5
- *
6
- * ```ts
7
- * import type { ScopedElements } from "path/to/library/jsx-integration";
8
- *
9
- * declare module "my-library" {
10
- * namespace JSX {
11
- * interface IntrinsicElements
12
- * extends ScopedElements<'test-', ''> {}
13
- * }
14
- * }
15
- * ```
16
- *
17
- */
18
- export type ScopedElements<Prefix extends string = "", Suffix extends string = ""> = {
19
- [Key in keyof CustomElements as `${Prefix}${Key}${Suffix}`]: CustomElements[Key];
20
- };
21
-
22
- type BaseProps = {
23
- /** Content added between the opening and closing tags of the element */
24
- children?: any;
25
- /** Used for declaratively styling one or more elements using CSS (Cascading Stylesheets) */
26
- class?: string;
27
- /** Used for declaratively styling one or more elements using CSS (Cascading Stylesheets) */
28
- className?: string;
29
- /** 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. */
30
- classList?: Record<string, boolean | undefined>;
31
- /** Specifies the text direction of the element. */
32
- dir?: "ltr" | "rtl";
33
- /** Contains a space-separated list of the part names of the element that should be exposed on the host element. */
34
- exportparts?: string;
35
- /** For <label> and <output>, lets you associate the label with some control. */
36
- htmlFor?: string;
37
- /** Specifies whether the element should be hidden. */
38
- hidden?: boolean | string;
39
- /** A unique identifier for the element. */
40
- id?: string;
41
- /** Keys tell React which array item each component corresponds to */
42
- key?: string | number;
43
- /** Specifies the language of the element. */
44
- lang?: string;
45
- /** 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. */
46
- part?: string;
47
- /** Use the ref attribute with a variable to assign a DOM element to the variable once the element is rendered. */
48
- ref?: unknown | ((e: unknown) => void);
49
- /** Adds a reference for a custom element slot */
50
- slot?: string;
51
- /** Prop for setting inline styles */
52
- style?: Record<string, string | number>;
53
- /** Overrides the default Tab button behavior. Avoid using values other than -1 and 0. */
54
- tabIndex?: number;
55
- /** Specifies the tooltip text for the element. */
56
- title?: string;
57
- /** Passing 'no' excludes the element content from being translated. */
58
- translate?: "yes" | "no";
59
- };
60
-
61
- type BaseEvents = {
62
- onClick?: (event: MouseEvent) => void;
63
- onKeyDown?: (event: KeyboardEvent) => void;
64
- onKeyUp?: (event: KeyboardEvent) => void;
65
- onKeyPressed?: (event: KeyboardEvent) => void;
66
- onFocus?: (event: FocusEvent) => void;
67
- onBlur?: (event: FocusEvent) => void;
68
- onMouseEnter?: (event: MouseEvent) => void;
69
- onMouseLeave?: (event: FocusEvent) => void;
70
- onMouseMove?: (event: FocusEvent) => void;
71
- onPointerDown?: (event: PointerEvent) => void;
72
- onPointerUp?: (event: PointerEvent) => void;
73
- onPointerMove?: (event: PointerEvent) => void;
74
- };
75
-
76
- export type CustomElements = {};
@@ -1,15 +0,0 @@
1
- import type { DefineComponent } from "vue";
2
-
3
- export type CustomElements = {};
4
-
5
- declare module "vue" {
6
- // eslint-disable-next-line @typescript-eslint/no-empty-interface
7
- interface GlobalComponents extends CustomElements {}
8
- }
9
-
10
- declare global {
11
- namespace JSX {
12
- // eslint-disable-next-line @typescript-eslint/no-empty-interface
13
- interface IntrinsicElements extends CustomElements {}
14
- }
15
- }
@@ -1,560 +0,0 @@
1
- {
2
- "schemaVersion": "1.0.0",
3
- "readme": "",
4
- "modules": [
5
- {
6
- "kind": "javascript-module",
7
- "path": "/src/index.js",
8
- "declarations": [
9
- {
10
- "kind": "variable",
11
- "name": "VERSION",
12
- "type": {
13
- "text": "string"
14
- },
15
- "default": "'0.0.0'"
16
- }
17
- ],
18
- "exports": [
19
- {
20
- "kind": "js",
21
- "name": "VERSION",
22
- "declaration": {
23
- "name": "VERSION",
24
- "module": "/src/index.js"
25
- }
26
- },
27
- {
28
- "kind": "js",
29
- "name": "*",
30
- "declaration": {
31
- "name": "*",
32
- "module": "Users/crylan/dev/github-migration/repos/elements-github/projects/forms/src/internal/types.js"
33
- }
34
- }
35
- ]
36
- },
37
- {
38
- "kind": "javascript-module",
39
- "path": "/src/internal/errors.js",
40
- "declarations": [
41
- {
42
- "kind": "class",
43
- "description": "",
44
- "name": "FormControlError",
45
- "members": [
46
- {
47
- "kind": "field",
48
- "name": "name",
49
- "type": {
50
- "text": "string",
51
- "_sourceAliases": [],
52
- "values": [
53
- {
54
- "value": "string",
55
- "description": ""
56
- }
57
- ]
58
- },
59
- "default": "'FormControlError'"
60
- }
61
- ],
62
- "superclass": {
63
- "name": "Error",
64
- "module": "/src/internal/errors.js"
65
- }
66
- }
67
- ],
68
- "exports": [
69
- {
70
- "kind": "js",
71
- "name": "FormControlError",
72
- "declaration": {
73
- "name": "FormControlError",
74
- "module": "/src/internal/errors.js"
75
- }
76
- }
77
- ]
78
- },
79
- {
80
- "kind": "javascript-module",
81
- "path": "/src/internal/schema.js",
82
- "declarations": [
83
- {
84
- "kind": "function",
85
- "name": "parseValueSchema",
86
- "return": {
87
- "type": {
88
- "text": "T"
89
- }
90
- },
91
- "parameters": [
92
- {
93
- "name": "formControlName",
94
- "type": {
95
- "text": "string",
96
- "_sourceAliases": []
97
- }
98
- },
99
- {
100
- "name": "value",
101
- "type": {
102
- "text": "string",
103
- "_sourceAliases": []
104
- }
105
- },
106
- {
107
- "name": "schema",
108
- "type": {
109
- "text": "StringSchema | NumberSchema | BooleanSchema | ArraySchema | ObjectSchema | EnumSchema",
110
- "_sourceAliases": [
111
- "Schema"
112
- ]
113
- }
114
- }
115
- ]
116
- },
117
- {
118
- "kind": "function",
119
- "name": "validateSchema",
120
- "return": {
121
- "type": {
122
- "text": "ValidationResult"
123
- }
124
- },
125
- "parameters": [
126
- {
127
- "name": "schema",
128
- "type": {
129
- "text": "StringSchema | NumberSchema | BooleanSchema | ArraySchema | ObjectSchema | EnumSchema",
130
- "_sourceAliases": [
131
- "Schema"
132
- ]
133
- }
134
- },
135
- {
136
- "name": "value",
137
- "type": {
138
- "text": "unknown",
139
- "_sourceAliases": []
140
- }
141
- }
142
- ]
143
- },
144
- {
145
- "kind": "function",
146
- "name": "parseControlValue",
147
- "return": {
148
- "type": {
149
- "text": "T | undefined"
150
- }
151
- },
152
- "parameters": [
153
- {
154
- "name": "value",
155
- "type": {
156
- "text": "string",
157
- "_sourceAliases": []
158
- }
159
- },
160
- {
161
- "name": "schema",
162
- "type": {
163
- "text": "StringSchema | NumberSchema | BooleanSchema | ArraySchema | ObjectSchema | EnumSchema",
164
- "_sourceAliases": [
165
- "Schema"
166
- ]
167
- }
168
- }
169
- ]
170
- }
171
- ],
172
- "exports": [
173
- {
174
- "kind": "js",
175
- "name": "parseValueSchema",
176
- "declaration": {
177
- "name": "parseValueSchema",
178
- "module": "/src/internal/schema.js"
179
- }
180
- },
181
- {
182
- "kind": "js",
183
- "name": "validateSchema",
184
- "declaration": {
185
- "name": "validateSchema",
186
- "module": "/src/internal/schema.js"
187
- }
188
- },
189
- {
190
- "kind": "js",
191
- "name": "parseControlValue",
192
- "declaration": {
193
- "name": "parseControlValue",
194
- "module": "/src/internal/schema.js"
195
- }
196
- }
197
- ]
198
- },
199
- {
200
- "kind": "javascript-module",
201
- "path": "/src/internal/types.js",
202
- "declarations": [],
203
- "exports": []
204
- },
205
- {
206
- "kind": "javascript-module",
207
- "path": "/src/internal/utils.js",
208
- "declarations": [
209
- {
210
- "kind": "function",
211
- "name": "isObjectLiteral",
212
- "parameters": [
213
- {
214
- "name": "item",
215
- "type": {
216
- "text": "unknown",
217
- "_sourceAliases": []
218
- }
219
- }
220
- ]
221
- }
222
- ],
223
- "exports": [
224
- {
225
- "kind": "js",
226
- "name": "isObjectLiteral",
227
- "declaration": {
228
- "name": "isObjectLiteral",
229
- "module": "/src/internal/utils.js"
230
- }
231
- }
232
- ]
233
- },
234
- {
235
- "kind": "javascript-module",
236
- "path": "/src/mixin/index.js",
237
- "declarations": [
238
- {
239
- "kind": "mixin",
240
- "description": "",
241
- "name": "FormControlMixin",
242
- "members": [
243
- {
244
- "kind": "field",
245
- "name": "formAssociated",
246
- "type": {
247
- "text": "boolean"
248
- },
249
- "static": true,
250
- "default": "true"
251
- },
252
- {
253
- "kind": "field",
254
- "name": "metadata",
255
- "type": {
256
- "text": "FormControlMetadata"
257
- },
258
- "static": true
259
- },
260
- {
261
- "kind": "field",
262
- "name": "readOnly",
263
- "type": {
264
- "text": "boolean"
265
- },
266
- "description": "determine if component is in readonly/non-editable state"
267
- },
268
- {
269
- "kind": "field",
270
- "name": "disabled",
271
- "type": {
272
- "text": "boolean"
273
- },
274
- "description": "determine if component is in disabled state"
275
- },
276
- {
277
- "kind": "field",
278
- "name": "required",
279
- "type": {
280
- "text": "boolean"
281
- },
282
- "description": "determine if the component value requires input"
283
- },
284
- {
285
- "kind": "field",
286
- "name": "name",
287
- "description": "name associated to parent form"
288
- },
289
- {
290
- "kind": "field",
291
- "name": "noValidate",
292
- "type": {
293
- "text": "boolean"
294
- },
295
- "description": "set determine if component is in no validation state"
296
- },
297
- {
298
- "kind": "field",
299
- "name": "value",
300
- "description": "value state of the component",
301
- "type": {
302
- "text": "T | undefined"
303
- }
304
- },
305
- {
306
- "kind": "method",
307
- "name": "updateValue",
308
- "parameters": [
309
- {
310
- "name": "value",
311
- "type": {
312
- "text": "T"
313
- }
314
- }
315
- ],
316
- "privacy": "protected"
317
- },
318
- {
319
- "kind": "field",
320
- "name": "form",
321
- "description": "associated parent form",
322
- "readonly": true
323
- },
324
- {
325
- "kind": "field",
326
- "name": "willValidate",
327
- "description": "determine if the component is a candidate for constraint checking",
328
- "readonly": true
329
- },
330
- {
331
- "kind": "field",
332
- "name": "validity",
333
- "description": "validity state of the component",
334
- "readonly": true
335
- },
336
- {
337
- "kind": "field",
338
- "name": "validationMessage",
339
- "description": "validation message of the component",
340
- "readonly": true
341
- },
342
- {
343
- "kind": "field",
344
- "name": "valueAsString",
345
- "description": "stringified value of the component",
346
- "readonly": true
347
- },
348
- {
349
- "kind": "field",
350
- "name": "valueAsNumber",
351
- "type": {
352
- "text": "number"
353
- },
354
- "description": "parsed number value of the component"
355
- },
356
- {
357
- "kind": "field",
358
- "name": "type",
359
- "readonly": true
360
- },
361
- {
362
- "kind": "field",
363
- "name": "_internals",
364
- "privacy": "protected",
365
- "readonly": true
366
- },
367
- {
368
- "kind": "method",
369
- "name": "formResetCallback",
370
- "privacy": "protected"
371
- },
372
- {
373
- "kind": "method",
374
- "name": "formStateRestoreCallback",
375
- "parameters": [
376
- {
377
- "name": "state",
378
- "type": {
379
- "text": "T"
380
- }
381
- },
382
- {
383
- "name": "_reason",
384
- "type": {
385
- "text": "string"
386
- }
387
- }
388
- ],
389
- "privacy": "protected"
390
- },
391
- {
392
- "kind": "method",
393
- "name": "reportValidity",
394
- "description": "report validity of the component"
395
- },
396
- {
397
- "kind": "method",
398
- "name": "checkValidity",
399
- "description": "check validity of the component"
400
- },
401
- {
402
- "kind": "method",
403
- "name": "setValidity",
404
- "parameters": [
405
- {
406
- "name": "validity",
407
- "type": {
408
- "text": "Partial<ValidityState>"
409
- }
410
- },
411
- {
412
- "name": "message",
413
- "optional": true,
414
- "type": {
415
- "text": "string"
416
- }
417
- }
418
- ],
419
- "privacy": "protected"
420
- },
421
- {
422
- "kind": "method",
423
- "name": "dispatchInputEvent",
424
- "privacy": "protected"
425
- },
426
- {
427
- "kind": "method",
428
- "name": "dispatchChangeEvent",
429
- "privacy": "protected"
430
- },
431
- {
432
- "kind": "method",
433
- "name": "dispatchUpdateEvent",
434
- "parameters": [
435
- {
436
- "name": "type",
437
- "type": {
438
- "text": "'input' | 'change'"
439
- }
440
- }
441
- ],
442
- "privacy": "protected"
443
- },
444
- {
445
- "kind": "field",
446
- "name": "_initialValue"
447
- }
448
- ],
449
- "events": [
450
- {
451
- "name": "input",
452
- "type": {
453
- "text": "InputEvent"
454
- }
455
- },
456
- {
457
- "name": "change",
458
- "type": {
459
- "text": "Event"
460
- }
461
- }
462
- ],
463
- "parameters": [
464
- {
465
- "name": "SuperClass",
466
- "type": {
467
- "text": "TBase"
468
- }
469
- }
470
- ]
471
- }
472
- ],
473
- "exports": [
474
- {
475
- "kind": "js",
476
- "name": "FormControlMixin",
477
- "declaration": {
478
- "name": "FormControlMixin",
479
- "module": "/src/mixin/index.js"
480
- }
481
- }
482
- ]
483
- },
484
- {
485
- "kind": "javascript-module",
486
- "path": "/src/validators/index.js",
487
- "declarations": [
488
- {
489
- "kind": "function",
490
- "name": "valueSchemaValidator",
491
- "return": {
492
- "type": {
493
- "text": "ValidatorResult"
494
- }
495
- },
496
- "parameters": [
497
- {
498
- "name": "value",
499
- "type": {
500
- "text": "unknown",
501
- "_sourceAliases": []
502
- }
503
- },
504
- {
505
- "name": "element",
506
- "type": {
507
- "text": "FormControl",
508
- "_sourceAliases": []
509
- }
510
- }
511
- ],
512
- "description": "Given a json schema, check the value against the schema\nJSON Schema follows the OpenAI JSON Schema for structured outputs\nhttps://platform.openai.com/docs/guides/structured-outputs\n\n- All fields or function parameters must specify required\n- Require additionalProperties: false on all objects\n- Structured Outputs support the following types:\n - String\n - Number\n - Boolean\n - Object\n - Array\n - Enum"
513
- },
514
- {
515
- "kind": "function",
516
- "name": "requiredValidator",
517
- "return": {
518
- "type": {
519
- "text": "ValidatorResult"
520
- }
521
- },
522
- "parameters": [
523
- {
524
- "name": "value",
525
- "type": {
526
- "text": "unknown",
527
- "_sourceAliases": []
528
- }
529
- },
530
- {
531
- "name": "element",
532
- "type": {
533
- "text": "FormControl",
534
- "_sourceAliases": []
535
- }
536
- }
537
- ]
538
- }
539
- ],
540
- "exports": [
541
- {
542
- "kind": "js",
543
- "name": "valueSchemaValidator",
544
- "declaration": {
545
- "name": "valueSchemaValidator",
546
- "module": "/src/validators/index.js"
547
- }
548
- },
549
- {
550
- "kind": "js",
551
- "name": "requiredValidator",
552
- "declaration": {
553
- "name": "requiredValidator",
554
- "module": "/src/validators/index.js"
555
- }
556
- }
557
- ]
558
- }
559
- ]
560
- }
@@ -1 +0,0 @@
1
- {}
@@ -1,6 +0,0 @@
1
- //#region src/examples/csv.examples.ts
2
- var e = "";
3
- //#endregion
4
- export { e as default };
5
-
6
- //# sourceMappingURL=csv.examples.js.map