@tachui/forms 0.8.8 → 0.8.10-alpha.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.
package/README.md CHANGED
@@ -84,12 +84,12 @@ import { required, email } from '@tachui/forms/validation'
84
84
 
85
85
  ## Migration from v1.x
86
86
 
87
- ### From @tachui/forms + @tachui/advanced-forms
87
+ ### From legacy split form packages
88
88
 
89
89
  ```typescript
90
90
  // Old approach (488KB total)
91
91
  import { TextField, Form } from '@tachui/forms'
92
- import { DatePicker, Stepper } from '@tachui/advanced-forms'
92
+ import { DatePicker, Stepper } from '@tachui/forms'
93
93
 
94
94
  // New unified approach (390KB total)
95
95
  import { TextField, Form, DatePicker, Stepper } from '@tachui/forms'
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Advanced Form Components
3
3
  *
4
- * Stepper and Slider components from @tachui/advanced-forms
4
+ * Stepper and Slider components
5
5
  */
6
6
  export { Stepper } from './Stepper';
7
7
  export { Slider } from './Slider';
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Date Picker Component
3
3
  *
4
- * Rich calendar interface for date selection from @tachui/advanced-forms
4
+ * Rich calendar interface for date selection
5
5
  */
6
6
  export { DatePicker } from './DatePicker';
7
7
  export type { DatePickerProps, DatePickerDisplayComponents, DatePickerStyle, } from './DatePicker';
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * TachUI Forms - Comprehensive Form Components and Validation
3
3
  *
4
- * Unified package combining all form functionality from @tachui/forms and @tachui/advanced-forms
4
+ * Unified package combining all form functionality from legacy split form packages
5
5
  * Provides 27 components with comprehensive validation and optimal tree-shaking
6
6
  */
7
7
  export * from './components/form-container';
@@ -1,6 +1,6 @@
1
1
  import { registerModifierWithMetadata as s } from "@tachui/core/modifiers";
2
- import { validateValue as T } from "../validation/index.js";
3
- import { isSignal as h } from "@tachui/core";
2
+ import { validateValue as h } from "../validation/index.js";
3
+ import { isSignal as T } from "@tachui/core";
4
4
  const l = 74, c = /* @__PURE__ */ new WeakMap();
5
5
  function p(t) {
6
6
  const e = [];
@@ -13,7 +13,7 @@ function m(t, e) {
13
13
  }
14
14
  function L(t, e) {
15
15
  return () => {
16
- const r = t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement || t instanceof HTMLSelectElement ? t.value : t.textContent ?? "", i = T(r, e);
16
+ const r = t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement || t instanceof HTMLSelectElement ? t.value : t.textContent ?? "", i = h(r, e);
17
17
  m(t, i);
18
18
  };
19
19
  }
@@ -52,7 +52,7 @@ function b(t, e) {
52
52
  }
53
53
  const A = 70;
54
54
  function H(t) {
55
- return typeof t == "function" && h(t) || typeof t == "function" ? t() : t ?? "";
55
+ return typeof t == "function" && T(t) || typeof t == "function" ? t() : t ?? "";
56
56
  }
57
57
  const u = /* @__PURE__ */ new WeakMap();
58
58
  function d(t, e) {
@@ -136,7 +136,7 @@ function V(t, e) {
136
136
  e
137
137
  );
138
138
  }
139
- const S = "0.8.8", O = S, _ = {
139
+ const S = "0.8.10-alpha.0", O = S, _ = {
140
140
  name: "@tachui/forms",
141
141
  version: O,
142
142
  author: "TachUI Team",
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Forms Package Component Validation
3
3
  *
4
- * Validation for @tachui/advanced-forms components that registers with the Core
4
+ * Validation for @tachui/forms components that registers with the Core
5
5
  * validation system, following proper plugin architecture.
6
6
  */
7
7
  /**
@@ -4,7 +4,7 @@ class s extends Error {
4
4
  }
5
5
  getFormattedMessage() {
6
6
  const { component: t, suggestion: r, example: a, documentation: n } = this.context;
7
- let i = `❌ [@tachui/advanced-forms] ${t} Component Error: ${this.message}
7
+ let i = `❌ [@tachui/forms] ${t} Component Error: ${this.message}
8
8
  `;
9
9
  return r && (i += `
10
10
  💡 Suggestion: ${r}
@@ -24,7 +24,7 @@ const l = {
24
24
  {
25
25
  component: "TextField",
26
26
  suggestion: 'Add name property: TextField({ name: "fieldName" })',
27
- documentation: "https://docs.tachui.dev/advanced-forms/components/textfield",
27
+ documentation: "https://docs.tachui.dev/forms/components/textfield",
28
28
  example: {
29
29
  wrong: "TextField()",
30
30
  correct: 'TextField({ name: "email", value: emailSignal })'
@@ -63,7 +63,7 @@ const l = {
63
63
  {
64
64
  component: "EmailField",
65
65
  suggestion: 'Add name property: EmailField({ name: "email" })',
66
- documentation: "https://docs.tachui.dev/advanced-forms/components/emailfield",
66
+ documentation: "https://docs.tachui.dev/forms/components/emailfield",
67
67
  example: {
68
68
  wrong: "EmailField()",
69
69
  correct: 'EmailField({ name: "email", value: emailSignal })'
@@ -102,7 +102,7 @@ const l = {
102
102
  {
103
103
  component: "PasswordField",
104
104
  suggestion: 'Add name property: PasswordField({ name: "password" })',
105
- documentation: "https://docs.tachui.dev/advanced-forms/components/passwordfield",
105
+ documentation: "https://docs.tachui.dev/forms/components/passwordfield",
106
106
  example: {
107
107
  wrong: "PasswordField()",
108
108
  correct: 'PasswordField({ name: "password", value: passwordSignal })'
@@ -141,7 +141,7 @@ const l = {
141
141
  {
142
142
  component: "PhoneField",
143
143
  suggestion: 'Add name property: PhoneField({ name: "phone" })',
144
- documentation: "https://docs.tachui.dev/advanced-forms/components/phonefield",
144
+ documentation: "https://docs.tachui.dev/forms/components/phonefield",
145
145
  example: {
146
146
  wrong: "PhoneField()",
147
147
  correct: 'PhoneField({ name: "phone", format: "US" })'
@@ -180,7 +180,7 @@ const l = {
180
180
  {
181
181
  component: "NumberField",
182
182
  suggestion: 'Add name property: NumberField({ name: "amount" })',
183
- documentation: "https://docs.tachui.dev/advanced-forms/components/numberfield",
183
+ documentation: "https://docs.tachui.dev/forms/components/numberfield",
184
184
  example: {
185
185
  wrong: "NumberField()",
186
186
  correct: 'NumberField({ name: "amount", min: 0, max: 100 })'
@@ -219,7 +219,7 @@ const l = {
219
219
  {
220
220
  component: "CreditCardField",
221
221
  suggestion: 'Add name property: CreditCardField({ name: "cardNumber" })',
222
- documentation: "https://docs.tachui.dev/advanced-forms/components/creditcardfield",
222
+ documentation: "https://docs.tachui.dev/forms/components/creditcardfield",
223
223
  example: {
224
224
  wrong: "CreditCardField()",
225
225
  correct: 'CreditCardField({ name: "cardNumber", onChange: handleChange })'
@@ -259,32 +259,32 @@ const l = {
259
259
  function p() {
260
260
  return [
261
261
  {
262
- packageName: "advanced-forms",
262
+ packageName: "forms",
263
263
  componentName: "TextField",
264
264
  validate: l.validateTextField
265
265
  },
266
266
  {
267
- packageName: "advanced-forms",
267
+ packageName: "forms",
268
268
  componentName: "EmailField",
269
269
  validate: l.validateEmailField
270
270
  },
271
271
  {
272
- packageName: "advanced-forms",
272
+ packageName: "forms",
273
273
  componentName: "PasswordField",
274
274
  validate: l.validatePasswordField
275
275
  },
276
276
  {
277
- packageName: "advanced-forms",
277
+ packageName: "forms",
278
278
  componentName: "PhoneField",
279
279
  validate: l.validatePhoneField
280
280
  },
281
281
  {
282
- packageName: "advanced-forms",
282
+ packageName: "forms",
283
283
  componentName: "NumberField",
284
284
  validate: l.validateNumberField
285
285
  },
286
286
  {
287
- packageName: "advanced-forms",
287
+ packageName: "forms",
288
288
  componentName: "CreditCardField",
289
289
  validate: l.validateCreditCardField
290
290
  }
@@ -297,11 +297,11 @@ async function g() {
297
297
  for (const r of t)
298
298
  e(r);
299
299
  process.env.NODE_ENV !== "production" && console.info(
300
- `🔍 [@tachui/advanced-forms] Registered ${t.length} component validators`
300
+ `🔍 [@tachui/forms] Registered ${t.length} component validators`
301
301
  );
302
302
  } catch (e) {
303
303
  process.env.NODE_ENV !== "production" && console.warn(
304
- "⚠️ [@tachui/advanced-forms] Could not register validators with Core:",
304
+ "⚠️ [@tachui/forms] Could not register validators with Core:",
305
305
  e
306
306
  );
307
307
  }
@@ -461,10 +461,10 @@ const m = {
461
461
  };
462
462
  }
463
463
  }, c = /* @__PURE__ */ new Map();
464
- function v(e) {
464
+ function F(e) {
465
465
  c.set(e.name, e);
466
466
  }
467
- function F(e) {
467
+ function v(e) {
468
468
  c.delete(e);
469
469
  }
470
470
  function N() {
@@ -682,8 +682,8 @@ export {
682
682
  C as defaultMessageFormatter,
683
683
  N as getValidationRules,
684
684
  g as registerFormsValidators,
685
- v as registerValidationRule,
686
- F as unregisterValidationRule,
685
+ F as registerValidationRule,
686
+ v as unregisterValidationRule,
687
687
  b as validateField,
688
688
  u as validateValue,
689
689
  f as validateValueAsync
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tachui/forms",
3
- "version": "0.8.8",
4
- "description": "Unified form components and validation system for tachUI (formerly @tachui/forms + @tachui/advanced-forms)",
3
+ "version": "0.8.10-alpha.0",
4
+ "description": "Unified form components and validation system for tachUI",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",
@@ -42,7 +42,7 @@
42
42
  }
43
43
  },
44
44
  "peerDependencies": {
45
- "@tachui/core": ">=0.8.8"
45
+ "@tachui/core": ">=0.8.10-alpha.0"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@types/node": "^20.10.0",
@@ -66,10 +66,10 @@
66
66
  "directory": "packages/forms"
67
67
  },
68
68
  "dependencies": {
69
- "@tachui/core": "0.8.8",
70
- "@tachui/modifiers": "0.8.8",
71
- "@tachui/primitives": "0.8.8",
72
- "@tachui/registry": "0.8.8"
69
+ "@tachui/core": "0.8.10-alpha.0",
70
+ "@tachui/modifiers": "0.8.10-alpha.0",
71
+ "@tachui/primitives": "0.8.10-alpha.0",
72
+ "@tachui/registry": "0.8.10-alpha.0"
73
73
  },
74
74
  "scripts": {
75
75
  "dev": "vite build --watch --mode development",
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Advanced Form Components
3
3
  *
4
- * Stepper and Slider components from @tachui/advanced-forms
4
+ * Stepper and Slider components
5
5
  */
6
6
 
7
7
  // Import and re-export the complete implementations
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Date Picker Component
3
3
  *
4
- * Rich calendar interface for date selection from @tachui/advanced-forms
4
+ * Rich calendar interface for date selection
5
5
  */
6
6
 
7
7
  // Import and re-export the complete DatePicker implementation
package/src/index.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * TachUI Forms - Comprehensive Form Components and Validation
3
3
  *
4
- * Unified package combining all form functionality from @tachui/forms and @tachui/advanced-forms
4
+ * Unified package combining all form functionality from legacy split form packages
5
5
  * Provides 27 components with comprehensive validation and optimal tree-shaking
6
6
  */
7
7
 
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Forms Package Component Validation
3
3
  *
4
- * Validation for @tachui/advanced-forms components that registers with the Core
4
+ * Validation for @tachui/forms components that registers with the Core
5
5
  * validation system, following proper plugin architecture.
6
6
  */
7
7
 
@@ -41,7 +41,7 @@ export class FormsValidationError extends Error {
41
41
  getFormattedMessage(): string {
42
42
  const { component, suggestion, example, documentation } = this.context
43
43
 
44
- let formatted = `❌ [@tachui/advanced-forms] ${component} Component Error: ${this.message}\n`
44
+ let formatted = `❌ [@tachui/forms] ${component} Component Error: ${this.message}\n`
45
45
 
46
46
  if (suggestion) {
47
47
  formatted += `\n💡 Suggestion: ${suggestion}\n`
@@ -73,7 +73,7 @@ export const FormsComponentValidation = {
73
73
  component: 'TextField',
74
74
  suggestion: 'Add name property: TextField({ name: "fieldName" })',
75
75
  documentation:
76
- 'https://docs.tachui.dev/advanced-forms/components/textfield',
76
+ 'https://docs.tachui.dev/forms/components/textfield',
77
77
  example: {
78
78
  wrong: 'TextField()',
79
79
  correct: 'TextField({ name: "email", value: emailSignal })',
@@ -119,7 +119,7 @@ export const FormsComponentValidation = {
119
119
  component: 'EmailField',
120
120
  suggestion: 'Add name property: EmailField({ name: "email" })',
121
121
  documentation:
122
- 'https://docs.tachui.dev/advanced-forms/components/emailfield',
122
+ 'https://docs.tachui.dev/forms/components/emailfield',
123
123
  example: {
124
124
  wrong: 'EmailField()',
125
125
  correct: 'EmailField({ name: "email", value: emailSignal })',
@@ -165,7 +165,7 @@ export const FormsComponentValidation = {
165
165
  component: 'PasswordField',
166
166
  suggestion: 'Add name property: PasswordField({ name: "password" })',
167
167
  documentation:
168
- 'https://docs.tachui.dev/advanced-forms/components/passwordfield',
168
+ 'https://docs.tachui.dev/forms/components/passwordfield',
169
169
  example: {
170
170
  wrong: 'PasswordField()',
171
171
  correct:
@@ -213,7 +213,7 @@ export const FormsComponentValidation = {
213
213
  component: 'PhoneField',
214
214
  suggestion: 'Add name property: PhoneField({ name: "phone" })',
215
215
  documentation:
216
- 'https://docs.tachui.dev/advanced-forms/components/phonefield',
216
+ 'https://docs.tachui.dev/forms/components/phonefield',
217
217
  example: {
218
218
  wrong: 'PhoneField()',
219
219
  correct: 'PhoneField({ name: "phone", format: "US" })',
@@ -259,7 +259,7 @@ export const FormsComponentValidation = {
259
259
  component: 'NumberField',
260
260
  suggestion: 'Add name property: NumberField({ name: "amount" })',
261
261
  documentation:
262
- 'https://docs.tachui.dev/advanced-forms/components/numberfield',
262
+ 'https://docs.tachui.dev/forms/components/numberfield',
263
263
  example: {
264
264
  wrong: 'NumberField()',
265
265
  correct: 'NumberField({ name: "amount", min: 0, max: 100 })',
@@ -306,7 +306,7 @@ export const FormsComponentValidation = {
306
306
  suggestion:
307
307
  'Add name property: CreditCardField({ name: "cardNumber" })',
308
308
  documentation:
309
- 'https://docs.tachui.dev/advanced-forms/components/creditcardfield',
309
+ 'https://docs.tachui.dev/forms/components/creditcardfield',
310
310
  example: {
311
311
  wrong: 'CreditCardField()',
312
312
  correct:
@@ -359,32 +359,32 @@ export const FormsComponentValidation = {
359
359
  export function createFormsValidators(): ComponentValidator[] {
360
360
  return [
361
361
  {
362
- packageName: 'advanced-forms',
362
+ packageName: 'forms',
363
363
  componentName: 'TextField',
364
364
  validate: FormsComponentValidation.validateTextField,
365
365
  },
366
366
  {
367
- packageName: 'advanced-forms',
367
+ packageName: 'forms',
368
368
  componentName: 'EmailField',
369
369
  validate: FormsComponentValidation.validateEmailField,
370
370
  },
371
371
  {
372
- packageName: 'advanced-forms',
372
+ packageName: 'forms',
373
373
  componentName: 'PasswordField',
374
374
  validate: FormsComponentValidation.validatePasswordField,
375
375
  },
376
376
  {
377
- packageName: 'advanced-forms',
377
+ packageName: 'forms',
378
378
  componentName: 'PhoneField',
379
379
  validate: FormsComponentValidation.validatePhoneField,
380
380
  },
381
381
  {
382
- packageName: 'advanced-forms',
382
+ packageName: 'forms',
383
383
  componentName: 'NumberField',
384
384
  validate: FormsComponentValidation.validateNumberField,
385
385
  },
386
386
  {
387
- packageName: 'advanced-forms',
387
+ packageName: 'forms',
388
388
  componentName: 'CreditCardField',
389
389
  validate: FormsComponentValidation.validateCreditCardField,
390
390
  },
@@ -410,13 +410,13 @@ export async function registerFormsValidators(): Promise<void> {
410
410
 
411
411
  if (process.env.NODE_ENV !== 'production') {
412
412
  console.info(
413
- `🔍 [@tachui/advanced-forms] Registered ${validators.length} component validators`
413
+ `🔍 [@tachui/forms] Registered ${validators.length} component validators`
414
414
  )
415
415
  }
416
416
  } catch (error) {
417
417
  if (process.env.NODE_ENV !== 'production') {
418
418
  console.warn(
419
- '⚠️ [@tachui/advanced-forms] Could not register validators with Core:',
419
+ '⚠️ [@tachui/forms] Could not register validators with Core:',
420
420
  error
421
421
  )
422
422
  }