@payfit/unity-components 2.1.4 → 2.2.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 (35) hide show
  1. package/dist/esm/components/avatar/Avatar.context.d.ts +2 -1
  2. package/dist/esm/components/avatar/Avatar.context.js +13 -11
  3. package/dist/esm/components/avatar/Avatar.d.ts +126 -0
  4. package/dist/esm/components/avatar/Avatar.js +34 -20
  5. package/dist/esm/components/avatar/Avatar.variants.d.ts +39 -0
  6. package/dist/esm/components/avatar/Avatar.variants.js +22 -4
  7. package/dist/esm/components/avatar/parts/AvatarFallback.d.ts +52 -0
  8. package/dist/esm/components/avatar/parts/AvatarIcon.d.ts +31 -0
  9. package/dist/esm/components/avatar/parts/AvatarIcon.js +40 -0
  10. package/dist/esm/components/button/Button.js +8 -7
  11. package/dist/esm/components/dialog/Dialog.js +32 -31
  12. package/dist/esm/components/dialog/test-utils.d.ts +7 -1
  13. package/dist/esm/components/dialog/test-utils.js +39 -28
  14. package/dist/esm/components/inline-field-group/InlineFieldGroup.context.d.ts +23 -0
  15. package/dist/esm/components/inline-field-group/InlineFieldGroup.context.js +6 -0
  16. package/dist/esm/components/inline-field-group/InlineFieldGroup.d.ts +119 -0
  17. package/dist/esm/components/inline-field-group/InlineFieldGroup.js +185 -0
  18. package/dist/esm/components/inline-field-group/hooks/useInlineFieldGroupMode.d.ts +46 -0
  19. package/dist/esm/components/inline-field-group/hooks/useInlineFieldGroupMode.js +27 -0
  20. package/dist/esm/components/inline-field-group/parts/InlineFieldGroupEditView.d.ts +64 -0
  21. package/dist/esm/components/inline-field-group/parts/InlineFieldGroupEditView.js +56 -0
  22. package/dist/esm/components/inline-field-group/parts/InlineFieldGroupHeader.d.ts +95 -0
  23. package/dist/esm/components/inline-field-group/parts/InlineFieldGroupHeader.js +106 -0
  24. package/dist/esm/components/inline-field-group/parts/InlineFieldGroupReadView.d.ts +56 -0
  25. package/dist/esm/components/inline-field-group/parts/InlineFieldGroupReadView.js +28 -0
  26. package/dist/esm/components/side-panel/parts/SidePanelFooter.js +19 -10
  27. package/dist/esm/hooks/tanstack-form-context.d.ts +1 -1
  28. package/dist/esm/hooks/use-tanstack-form.d.ts +32 -8
  29. package/dist/esm/hooks/use-tanstack-form.js +71 -48
  30. package/dist/esm/index.d.ts +1 -0
  31. package/dist/esm/index.js +445 -443
  32. package/i18n/en-GB.json +6 -0
  33. package/i18n/es-ES.json +6 -0
  34. package/i18n/fr-FR.json +6 -0
  35. package/package.json +21 -21
@@ -1,12 +1,12 @@
1
1
  import { lazy as e } from "react";
2
2
  import { createFormHook as o } from "@tanstack/react-form";
3
3
  import { TanstackForm as n } from "../components/form/TanstackForm.js";
4
- import { formContext as c, fieldContext as l } from "./tanstack-form-context.js";
5
- const r = e(
4
+ import { formContext as l, fieldContext as c } from "./tanstack-form-context.js";
5
+ const i = e(
6
6
  () => import("../components/checkbox-field/TanstackCheckboxField.js").then((t) => ({
7
7
  default: t.TanstackCheckboxField
8
8
  }))
9
- ), i = e(
9
+ ), r = e(
10
10
  () => import("../components/form-field/parts/TanstackFormFeedbackText.js").then(
11
11
  (t) => ({
12
12
  default: t.TanstackFormFeedbackText
@@ -20,13 +20,13 @@ const r = e(
20
20
  () => import("../components/form-field/parts/TanstackFormLabel.js").then((t) => ({
21
21
  default: t.TanstackFormLabel
22
22
  }))
23
- ), s = e(
23
+ ), p = e(
24
24
  () => import("../components/form-field/parts/TanstackRawFormContextualLink.js").then(
25
25
  (t) => ({
26
26
  default: t.TanstackRawFormContextualLink
27
27
  })
28
28
  )
29
- ), p = e(
29
+ ), s = e(
30
30
  () => import("../components/form-field/TanstackFormField.js").then((t) => ({
31
31
  default: t.TanstackFormField
32
32
  }))
@@ -42,11 +42,11 @@ const r = e(
42
42
  () => import("../components/date-picker/TanstackDatePicker.js").then((t) => ({
43
43
  default: t.TanstackDatePicker
44
44
  }))
45
- ), h = e(
45
+ ), F = e(
46
46
  () => import("../components/multi-select/TanstackMultiSelect.js").then((t) => ({
47
47
  default: t.TanstackMultiSelect
48
48
  }))
49
- ), F = e(
49
+ ), h = e(
50
50
  () => import("../components/phone-number/TanstackPhoneNumberInput.js").then((t) => ({
51
51
  default: t.TanstackPhoneNumberInput
52
52
  }))
@@ -60,17 +60,17 @@ const r = e(
60
60
  () => import("../components/number-input/TanstackNumberInput.js").then((t) => ({
61
61
  default: t.TanstackNumberInput
62
62
  }))
63
- ), S = e(
63
+ ), G = e(
64
64
  () => import("../components/radio-button-group/TanstackRadioButtonGroup.js").then(
65
65
  (t) => ({
66
66
  default: t.TanstackRadioButtonGroup
67
67
  })
68
68
  )
69
- ), C = e(
69
+ ), S = e(
70
70
  () => import("../components/selectable-button-group/TanstackSelectableButtonGroup.js").then((t) => ({
71
71
  default: t.TanstackSelectableButtonGroup
72
72
  }))
73
- ), G = e(
73
+ ), C = e(
74
74
  () => import("../components/selectable-card/selectable-card-checkbox-group/TanstackSelectableCardCheckboxGroup.js").then((t) => ({
75
75
  default: t.TanstackSelectableCardCheckboxGroup
76
76
  }))
@@ -78,11 +78,11 @@ const r = e(
78
78
  () => import("../components/selectable-card/selectable-card-radio-group/TanstackSelectableCardRadioGroup.js").then((t) => ({
79
79
  default: t.TanstackSelectableCardRadioGroup
80
80
  }))
81
- ), g = e(
81
+ ), I = e(
82
82
  () => import("../components/select/TanstackSelect.js").then((t) => ({
83
83
  default: t.TanstackSelect
84
84
  }))
85
- ), I = e(
85
+ ), g = e(
86
86
  () => import("../components/text-area/TanstackTextArea.js").then((t) => ({
87
87
  default: t.TanstackTextArea
88
88
  }))
@@ -112,21 +112,21 @@ const r = e(
112
112
  default: t.TanstackDatePickerField
113
113
  })
114
114
  )
115
- ), D = e(
115
+ ), H = e(
116
116
  () => import("../components/multi-select-field/TanstackMultiSelectField.js").then(
117
117
  (t) => ({
118
118
  default: t.TanstackMultiSelectField
119
119
  })
120
120
  )
121
- ), L = e(
121
+ ), D = e(
122
122
  () => import("../components/number-field/TanstackNumberField.js").then((t) => ({
123
123
  default: t.TanstackNumberField
124
124
  }))
125
- ), M = e(
125
+ ), L = e(
126
126
  () => import("../components/radio-button-group-field/TanstackRadioButtonGroupField.js").then((t) => ({
127
127
  default: t.TanstackRadioButtonGroupField
128
128
  }))
129
- ), H = e(
129
+ ), M = e(
130
130
  () => import("../components/select-field/TanstackSelectField.js").then((t) => ({
131
131
  default: t.TanstackSelectField
132
132
  }))
@@ -134,76 +134,99 @@ const r = e(
134
134
  () => import("../components/selectable-button-group-field/TanstackSelectableButtonGroupField.js").then((t) => ({
135
135
  default: t.TanstackSelectableButtonGroupField
136
136
  }))
137
- ), y = e(
137
+ ), V = e(
138
138
  () => import("../components/selectable-card-checkbox-group-field/TanstackSelectableCardCheckboxGroupField.js").then((t) => ({
139
139
  default: t.TanstackSelectableCardCheckboxGroupField
140
140
  }))
141
- ), z = e(
141
+ ), y = e(
142
142
  () => import("../components/selectable-card-radio-group-field/TanstackSelectableCardRadioGroupField.js").then((t) => ({
143
143
  default: t.TanstackSelectableCardRadioGroupField
144
144
  }))
145
- ), U = e(
145
+ ), E = e(
146
146
  () => import("../components/text-field/TanstackTextField.js").then((t) => ({
147
147
  default: t.TanstackTextField
148
148
  }))
149
- ), j = e(
149
+ ), z = e(
150
150
  () => import("../components/toggle-switch-field/TanstackToggleSwitchField.js").then(
151
151
  (t) => ({
152
152
  default: t.TanstackToggleSwitchField
153
153
  })
154
154
  )
155
- ), q = e(
155
+ ), U = e(
156
156
  () => import("../components/toggle-switch-group-field/TanstackToggleSwitchGroupField.js").then((t) => ({
157
157
  default: t.TanstackToggleSwitchGroupField
158
158
  }))
159
+ ), j = e(
160
+ () => import("../components/inline-field-group/InlineFieldGroup.js").then((t) => ({
161
+ default: t.InlineFieldGroup
162
+ }))
163
+ ), q = e(
164
+ () => import("../components/inline-field-group/parts/InlineFieldGroupHeader.js").then(
165
+ (t) => ({
166
+ default: t.InlineFieldGroupHeader
167
+ })
168
+ )
169
+ ), v = e(
170
+ () => import("../components/inline-field-group/parts/InlineFieldGroupReadView.js").then((t) => ({
171
+ default: t.InlineFieldGroupReadView
172
+ }))
173
+ ), J = e(
174
+ () => import("../components/inline-field-group/parts/InlineFieldGroupEditView.js").then((t) => ({
175
+ default: t.InlineFieldGroupEditView
176
+ }))
159
177
  ), a = o({
160
178
  fieldComponents: {
161
179
  // Base components for field building
162
- FieldFeedbackText: i,
180
+ FieldFeedbackText: r,
163
181
  FieldHelperText: u,
164
182
  FieldLabel: d,
165
- FieldRawContextualLink: s,
166
- Field: p,
183
+ FieldRawContextualLink: p,
184
+ Field: s,
167
185
  // bound input components
168
186
  CheckboxGroupInput: k,
169
187
  CheckboxInput: T,
170
188
  DatePickerInput: m,
171
- MultiSelectInput: h,
172
- PhoneNumberInput: F,
189
+ MultiSelectInput: F,
190
+ PhoneNumberInput: h,
173
191
  NumberInput: f,
174
- RadioButtonInput: S,
175
- SelectableButtonGroupInput: C,
176
- SelectableCardCheckboxGroupInput: G,
192
+ RadioButtonInput: G,
193
+ SelectableButtonGroupInput: S,
194
+ SelectableCardCheckboxGroupInput: C,
177
195
  SelectableCardRadioGroupInput: x,
178
- SelectInput: g,
179
- TextAreaInput: I,
196
+ SelectInput: I,
197
+ TextAreaInput: g,
180
198
  TextInput: w,
181
199
  ToggleSwitchGroupInput: R,
182
200
  ToggleSwitchInput: B,
183
201
  // Field organisms
184
- CheckboxField: r,
202
+ CheckboxField: i,
185
203
  CheckboxGroupField: N,
186
204
  DatePickerField: P,
187
- MultiSelectField: D,
188
- NumberField: L,
205
+ MultiSelectField: H,
206
+ NumberField: D,
189
207
  PhoneNumberField: b,
190
- RadioButtonGroupField: M,
208
+ RadioButtonGroupField: L,
191
209
  SelectableButtonGroupField: A,
192
- SelectableCardCheckboxGroupField: y,
193
- SelectableCardRadioGroupField: z,
194
- SelectField: H,
195
- TextField: U,
196
- ToggleSwitchField: j,
197
- ToggleSwitchGroupField: q
210
+ SelectableCardCheckboxGroupField: V,
211
+ SelectableCardRadioGroupField: y,
212
+ SelectField: M,
213
+ TextField: E,
214
+ ToggleSwitchField: z,
215
+ ToggleSwitchGroupField: U
198
216
  },
199
217
  formComponents: {
200
- Form: n
218
+ Form: n,
219
+ // Inline Edition components
220
+ InlineFieldGroup: j,
221
+ InlineFieldGroupHeader: q,
222
+ InlineFieldGroupReadView: v,
223
+ InlineFieldGroupEditView: J
201
224
  },
202
- fieldContext: l,
203
- formContext: c
204
- }), O = a.useAppForm, Q = a.withForm, V = a.withFieldGroup;
225
+ fieldContext: c,
226
+ formContext: l
227
+ }), X = a.useAppForm, Y = a.withForm, Z = a.withFieldGroup;
205
228
  export {
206
- O as useTanstackUnityForm,
207
- V as withFieldGroup,
208
- Q as withForm
229
+ X as useTanstackUnityForm,
230
+ Z as withFieldGroup,
231
+ Y as withForm
209
232
  };
@@ -18,6 +18,7 @@ export * from './components/autocomplete/parts/AutocompleteItem.js';
18
18
  export * from './components/autocomplete/parts/AutocompleteItemGroup.js';
19
19
  export * from './components/avatar/Avatar.js';
20
20
  export * from './components/avatar/parts/AvatarFallback.js';
21
+ export * from './components/avatar/parts/AvatarIcon.js';
21
22
  export * from './components/avatar/parts/AvatarImage.js';
22
23
  export * from './components/avatar/parts/AvatarPair.js';
23
24
  export * from './components/avatar/utils.js';