@hinen/pro-element-plus 1.7.17 → 1.8.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.
Files changed (148) hide show
  1. package/dist/components/DataTable/DataTable.vue.d.ts +24 -6
  2. package/dist/components/DataTable/DataTable.vue.d.ts.map +1 -1
  3. package/dist/components/DataTable/props.d.ts +11 -2
  4. package/dist/components/DataTable/props.d.ts.map +1 -1
  5. package/dist/components/DataTable/types.d.ts +13 -1
  6. package/dist/components/DataTable/types.d.ts.map +1 -1
  7. package/dist/components/DataTable/useDataTable.d.ts.map +1 -1
  8. package/dist/components/FormFields/FormCascadeSelect/FormCascadeSelect.vue.d.ts +136 -146
  9. package/dist/components/FormFields/FormCascadeSelect/FormCascadeSelect.vue.d.ts.map +1 -1
  10. package/dist/components/FormFields/FormCascadeSelect/props.d.ts +112 -114
  11. package/dist/components/FormFields/FormCascadeSelect/props.d.ts.map +1 -1
  12. package/dist/components/FormFields/FormCascadeSelect/types.d.ts +24 -1
  13. package/dist/components/FormFields/FormCascadeSelect/types.d.ts.map +1 -1
  14. package/dist/components/FormFields/FormTagInput/FormTagInput.vue.d.ts.map +1 -1
  15. package/dist/components/FormFields/FormTreeSelect/props.d.ts +3 -1
  16. package/dist/components/FormFields/FormTreeSelect/props.d.ts.map +1 -1
  17. package/dist/index.cjs +32 -32
  18. package/dist/index.js +2947 -2570
  19. package/dist/skills/building-form-workflows/SKILL.md +77 -0
  20. package/dist/skills/building-form-workflows/references/examples.md +47 -0
  21. package/dist/skills/building-form-workflows/references/field-selection.md +16 -0
  22. package/dist/skills/building-form-workflows/references/gotchas.md +10 -0
  23. package/dist/skills/building-form-workflows/references/workflow.md +21 -0
  24. package/dist/skills/building-modal-workflows/SKILL.md +79 -0
  25. package/dist/skills/building-modal-workflows/references/examples.md +104 -0
  26. package/dist/skills/building-modal-workflows/references/gotchas.md +19 -0
  27. package/dist/skills/building-modal-workflows/references/workflow.md +17 -0
  28. package/dist/skills/building-query-pages/SKILL.md +81 -0
  29. package/dist/skills/building-query-pages/references/examples.md +64 -0
  30. package/dist/skills/building-query-pages/references/field-selection.md +24 -0
  31. package/dist/skills/building-query-pages/references/gotchas.md +10 -0
  32. package/dist/skills/building-query-pages/references/workflow.md +22 -0
  33. package/dist/skills/building-selection-inputs/SKILL.md +85 -0
  34. package/dist/skills/building-selection-inputs/references/examples.md +87 -0
  35. package/dist/skills/building-selection-inputs/references/gotchas.md +19 -0
  36. package/dist/skills/building-selection-inputs/references/selection-guide.md +47 -0
  37. package/dist/skills/choosing-components/SKILL.md +78 -0
  38. package/dist/skills/choosing-components/references/component-groups.md +37 -0
  39. package/dist/skills/choosing-components/references/examples.md +91 -0
  40. package/dist/skills/choosing-components/references/gotchas.md +10 -0
  41. package/dist/skills/choosing-components/references/selection-guide.md +40 -0
  42. package/dist/skills/optimizing-component-skills/REVIEW.md +775 -0
  43. package/dist/skills/using-checkbox-group/SKILL.md +91 -0
  44. package/dist/skills/using-checkbox-group/references/examples.md +55 -0
  45. package/dist/skills/using-checkbox-group/references/gotchas.md +13 -0
  46. package/dist/skills/using-checkbox-group/references/props.md +83 -0
  47. package/dist/skills/using-config-provider/SKILL.md +96 -0
  48. package/dist/skills/using-config-provider/references/examples.md +38 -0
  49. package/dist/skills/using-config-provider/references/gotchas.md +13 -0
  50. package/dist/skills/using-config-provider/references/props.md +38 -0
  51. package/dist/skills/using-data-select/SKILL.md +127 -0
  52. package/dist/skills/using-data-select/references/examples.md +67 -0
  53. package/dist/skills/using-data-select/references/gotchas.md +19 -0
  54. package/dist/skills/using-data-select/references/props.md +126 -0
  55. package/dist/skills/using-data-table/SKILL.md +289 -0
  56. package/dist/skills/using-data-table/references/examples.md +347 -0
  57. package/dist/skills/using-data-table/references/gotchas.md +114 -0
  58. package/dist/skills/using-data-table/references/props.md +375 -0
  59. package/dist/skills/using-drawer/SKILL.md +104 -0
  60. package/dist/skills/using-drawer/references/examples.md +109 -0
  61. package/dist/skills/using-drawer/references/gotchas.md +16 -0
  62. package/dist/skills/using-drawer/references/props.md +105 -0
  63. package/dist/skills/using-ellipsis-text/SKILL.md +105 -0
  64. package/dist/skills/using-ellipsis-text/references/examples.md +71 -0
  65. package/dist/skills/using-ellipsis-text/references/gotchas.md +19 -0
  66. package/dist/skills/using-ellipsis-text/references/props.md +97 -0
  67. package/dist/skills/using-form-autocomplete/SKILL.md +87 -0
  68. package/dist/skills/using-form-autocomplete/references/examples.md +62 -0
  69. package/dist/skills/using-form-autocomplete/references/gotchas.md +13 -0
  70. package/dist/skills/using-form-autocomplete/references/props.md +100 -0
  71. package/dist/skills/using-form-cascade-select/SKILL.md +82 -0
  72. package/dist/skills/using-form-cascade-select/references/examples.md +59 -0
  73. package/dist/skills/using-form-cascade-select/references/gotchas.md +13 -0
  74. package/dist/skills/using-form-cascade-select/references/props.md +138 -0
  75. package/dist/skills/using-form-checkbox-group/SKILL.md +83 -0
  76. package/dist/skills/using-form-checkbox-group/references/examples.md +61 -0
  77. package/dist/skills/using-form-checkbox-group/references/gotchas.md +13 -0
  78. package/dist/skills/using-form-checkbox-group/references/props.md +85 -0
  79. package/dist/skills/using-form-date-picker/SKILL.md +79 -0
  80. package/dist/skills/using-form-date-picker/references/examples.md +54 -0
  81. package/dist/skills/using-form-date-picker/references/gotchas.md +10 -0
  82. package/dist/skills/using-form-date-picker/references/props.md +99 -0
  83. package/dist/skills/using-form-fields/SKILL.md +101 -0
  84. package/dist/skills/using-form-fields/references/examples.md +45 -0
  85. package/dist/skills/using-form-fields/references/gotchas.md +6 -0
  86. package/dist/skills/using-form-fields/references/props.md +57 -0
  87. package/dist/skills/using-form-item/SKILL.md +92 -0
  88. package/dist/skills/using-form-item/references/examples.md +59 -0
  89. package/dist/skills/using-form-item/references/gotchas.md +13 -0
  90. package/dist/skills/using-form-item/references/props.md +85 -0
  91. package/dist/skills/using-form-number/SKILL.md +82 -0
  92. package/dist/skills/using-form-number/references/examples.md +66 -0
  93. package/dist/skills/using-form-number/references/gotchas.md +13 -0
  94. package/dist/skills/using-form-number/references/props.md +82 -0
  95. package/dist/skills/using-form-radio-group/SKILL.md +83 -0
  96. package/dist/skills/using-form-radio-group/references/examples.md +53 -0
  97. package/dist/skills/using-form-radio-group/references/gotchas.md +13 -0
  98. package/dist/skills/using-form-radio-group/references/props.md +81 -0
  99. package/dist/skills/using-form-rate/SKILL.md +86 -0
  100. package/dist/skills/using-form-rate/references/examples.md +60 -0
  101. package/dist/skills/using-form-rate/references/gotchas.md +16 -0
  102. package/dist/skills/using-form-rate/references/props.md +88 -0
  103. package/dist/skills/using-form-select/SKILL.md +94 -0
  104. package/dist/skills/using-form-select/references/examples.md +67 -0
  105. package/dist/skills/using-form-select/references/gotchas.md +13 -0
  106. package/dist/skills/using-form-select/references/props.md +87 -0
  107. package/dist/skills/using-form-switch/SKILL.md +81 -0
  108. package/dist/skills/using-form-switch/references/examples.md +54 -0
  109. package/dist/skills/using-form-switch/references/gotchas.md +10 -0
  110. package/dist/skills/using-form-switch/references/props.md +83 -0
  111. package/dist/skills/using-form-tag-input/SKILL.md +83 -0
  112. package/dist/skills/using-form-tag-input/references/examples.md +53 -0
  113. package/dist/skills/using-form-tag-input/references/gotchas.md +13 -0
  114. package/dist/skills/using-form-tag-input/references/props.md +80 -0
  115. package/dist/skills/using-form-text/SKILL.md +82 -0
  116. package/dist/skills/using-form-text/references/examples.md +66 -0
  117. package/dist/skills/using-form-text/references/gotchas.md +13 -0
  118. package/dist/skills/using-form-text/references/props.md +98 -0
  119. package/dist/skills/using-form-time-picker/SKILL.md +78 -0
  120. package/dist/skills/using-form-time-picker/references/examples.md +53 -0
  121. package/dist/skills/using-form-time-picker/references/gotchas.md +10 -0
  122. package/dist/skills/using-form-time-picker/references/props.md +89 -0
  123. package/dist/skills/using-form-tree-select/SKILL.md +82 -0
  124. package/dist/skills/using-form-tree-select/references/examples.md +55 -0
  125. package/dist/skills/using-form-tree-select/references/gotchas.md +13 -0
  126. package/dist/skills/using-form-tree-select/references/props.md +86 -0
  127. package/dist/skills/using-image/SKILL.md +88 -0
  128. package/dist/skills/using-image/references/examples.md +31 -0
  129. package/dist/skills/using-image/references/gotchas.md +13 -0
  130. package/dist/skills/using-image/references/props.md +91 -0
  131. package/dist/skills/using-modal/SKILL.md +113 -0
  132. package/dist/skills/using-modal/references/examples.md +122 -0
  133. package/dist/skills/using-modal/references/gotchas.md +16 -0
  134. package/dist/skills/using-modal/references/props.md +100 -0
  135. package/dist/skills/using-query-form/SKILL.md +134 -0
  136. package/dist/skills/using-query-form/references/examples.md +103 -0
  137. package/dist/skills/using-query-form/references/gotchas.md +19 -0
  138. package/dist/skills/using-query-form/references/props.md +146 -0
  139. package/dist/skills/using-radio-group/SKILL.md +91 -0
  140. package/dist/skills/using-radio-group/references/examples.md +55 -0
  141. package/dist/skills/using-radio-group/references/gotchas.md +13 -0
  142. package/dist/skills/using-radio-group/references/props.md +83 -0
  143. package/dist/skills/using-select/SKILL.md +93 -0
  144. package/dist/skills/using-select/references/examples.md +50 -0
  145. package/dist/skills/using-select/references/gotchas.md +13 -0
  146. package/dist/skills/using-select/references/props.md +90 -0
  147. package/dist/style.css +1 -1
  148. package/package.json +1 -1
@@ -0,0 +1,82 @@
1
+ ---
2
+ name: using-form-text
3
+ description: Use when a wrapped field should combine FormItem semantics with text-like Element Plus input behavior such as plain text, password, textarea, or simple numeric text entry.
4
+ ---
5
+
6
+ # Using FormText
7
+
8
+ ## Overview
9
+
10
+ Use `FormText` for a **text-style wrapped field** that combines `FormItem` wrapper behavior with Element Plus input behavior.
11
+
12
+ It is the right abstraction when text-like entry should stay inside the `Form*` wrapper family instead of composing `FormItem` and `ElInput` manually every time.
13
+
14
+ ## Use it when
15
+
16
+ - a form schema needs text, password, or textarea input with built-in label and validation behavior
17
+ - you want one wrapper to expose both input props and `FormItem` props
18
+ - the field should expose both `formItem` and `field` refs through one instance
19
+ - wrapper-level tooltip, label, or error behavior should stay consistent with the rest of the form family
20
+
21
+ ## Prefer something else when
22
+
23
+ - you need step-based numeric input with numeric control semantics
24
+ → use `../using-form-number/SKILL.md`
25
+ - you need select-style choice behavior
26
+ → use `../using-form-select/SKILL.md`
27
+ - you only need wrapper behavior around custom content
28
+ → use `../using-form-item/SKILL.md`
29
+
30
+ ## Decision guide
31
+
32
+ Use `FormText` if the answer is yes for **two or more** of these:
33
+
34
+ - Is the stored value fundamentally text-like?
35
+ - Should the field support modes like plain text, password, or textarea?
36
+ - Do you want the wrapper and input refs exposed together?
37
+ - Should label, rules, tooltip, and error rendering come from the shared form-wrapper family?
38
+
39
+ If not, another concrete `Form*` wrapper is probably a better fit.
40
+
41
+ ## Start with
42
+
43
+ 1. Decide whether the field is plain text, password, textarea, or a simple input `type` variation.
44
+ 2. Add the normal `FormItem` props such as `label`, `prop`, and `rules`.
45
+ 3. Pass `ElInput`-style props only after the wrapper fit is clear.
46
+ 4. Use slots only when the built-in text field shell is not enough.
47
+
48
+ ## Minimal patterns
49
+
50
+ ### Standard wrapped text input
51
+
52
+ ```vue
53
+ <FormText label="Name" prop="name" placeholder="Please enter" />
54
+ ```
55
+
56
+ ### Password mode
57
+
58
+ Use `type="password"` when the field is still text-like but needs password behavior.
59
+
60
+ ### Textarea mode
61
+
62
+ Use `type="textarea"` when the field should stay in the text-wrapper family but needs multi-line editing.
63
+
64
+ ## Common mistakes
65
+
66
+ - using `FormText` for step-based numeric control when `FormNumber` is the better fit
67
+ - forgetting that this wrapper mixes both `FormItem` props and input props
68
+ - assuming every `ElInput` event is exhaustively documented by the wrapper examples
69
+ - reaching for manual `FormItem` plus `ElInput` composition when the standard wrapper already fits
70
+
71
+ ## Related skills
72
+
73
+ - Wrapper-family selection: `../using-form-fields/SKILL.md`
74
+ - Base wrapper only: `../using-form-item/SKILL.md`
75
+ - Numeric wrapped field: `../using-form-number/SKILL.md`
76
+ - Select wrapped field: `../using-form-select/SKILL.md`
77
+
78
+ ## References
79
+
80
+ - Props: `./references/props.md`
81
+ - Examples: `./references/examples.md`
82
+ - Gotchas: `./references/gotchas.md`
@@ -0,0 +1,66 @@
1
+ # FormText examples
2
+
3
+ ## 1. Standard wrapped text field
4
+
5
+ Use `FormText` when a normal text input should inherit the wrapper-family label, tooltip, and validation behavior.
6
+
7
+ Minimal pattern:
8
+
9
+ ```vue
10
+ <FormText label="Name" prop="name" />
11
+ ```
12
+
13
+ Typical fit:
14
+
15
+ - names
16
+ - titles
17
+ - identifiers
18
+ - short descriptions
19
+
20
+ ## 2. Password field inside the wrapper family
21
+
22
+ Use `type="password"` and related input props when the field is still text-like but needs hidden input behavior.
23
+
24
+ Minimal pattern:
25
+
26
+ ```vue
27
+ <FormText label="Password" prop="password" type="password" />
28
+ ```
29
+
30
+ Typical fit:
31
+
32
+ - password creation
33
+ - secret entry
34
+ - temporary token input
35
+
36
+ ## 3. Textarea field inside the wrapper family
37
+
38
+ Use `type="textarea"` when the field should stay in the same wrapper family but needs multi-line entry.
39
+
40
+ Minimal pattern:
41
+
42
+ ```vue
43
+ <FormText label="Notes" prop="notes" type="textarea" />
44
+ ```
45
+
46
+ Typical fit:
47
+
48
+ - notes
49
+ - comments
50
+ - longer descriptions
51
+
52
+ ## 4. Instance-oriented field control
53
+
54
+ Use the combined `{ formItem, field }` instance when parent code needs both wrapper validation access and direct input control.
55
+
56
+ Minimal pattern:
57
+
58
+ ```vue
59
+ <FormText ref="nameField" label="Name" prop="name" />
60
+ ```
61
+
62
+ Typical fit:
63
+
64
+ - manual focus after validation
65
+ - explicit validation triggers from toolbar actions
66
+ - form helpers that need the wrapped input ref
@@ -0,0 +1,13 @@
1
+ # FormText gotchas
2
+
3
+ - `FormText` mixes wrapper props and input props
4
+ Keep clear which settings belong to the form-item shell versus the inner input.
5
+
6
+ - Not every numeric-looking field should use `FormText`
7
+ If the feature needs step, bounds, or numeric control semantics, prefer `../using-form-number/SKILL.md`.
8
+
9
+ - Styling can target different layers
10
+ Use wrapper classes for shell styling and `inputStyle` or `inputClass` for the inner input element.
11
+
12
+ - The exposed instance is split into `formItem` and `field`
13
+ Validation methods live on `formItem`; direct input methods such as focus live on `field`.
@@ -0,0 +1,98 @@
1
+ # FormText props
2
+
3
+ ## Overview
4
+
5
+ `FormText` combines `FormItem` props with Element Plus input props.
6
+
7
+ Use it when text-like field behavior should live inside the standard form-wrapper family instead of manually composing `FormItem` and `ElInput`.
8
+
9
+ ## Minimum setup
10
+
11
+ Typical useful props:
12
+
13
+ - `label`
14
+ - `prop`
15
+ - `modelValue`
16
+ - `placeholder`
17
+
18
+ Mode-specific optional props:
19
+
20
+ - `type`
21
+ - `showPassword`
22
+ - `rows`
23
+ - `clearable`
24
+
25
+ ## Core props
26
+
27
+ ### Wrapper props from `FormItem`
28
+
29
+ Includes wrapper-level props such as:
30
+
31
+ - `label`
32
+ - `prop`
33
+ - `rules`
34
+ - `required`
35
+ - `tooltip`
36
+ - `htmlFor`
37
+
38
+ ### Text-field props from `ElInput`
39
+
40
+ Commonly useful field props include:
41
+
42
+ - `modelValue`
43
+ - `type`
44
+ - `placeholder`
45
+ - `clearable`
46
+ - `maxlength`
47
+ - `showWordLimit`
48
+ - `readonly`
49
+ - `autofocus`
50
+
51
+ ### `inputStyle` and `inputClass`
52
+
53
+ Use these to style the inner input element rather than the outer wrapper shell.
54
+
55
+ ### `min`, `max`, and `step`
56
+
57
+ Use these only for simple numeric-text input cases.
58
+
59
+ If the field really needs step-based numeric control semantics such as bounded stepping, precision, or true numeric input behavior, prefer `../using-form-number/SKILL.md` instead.
60
+
61
+ ## Slots
62
+
63
+ The wrapper supports both wrapper-level and input-level slots.
64
+
65
+ Useful examples include:
66
+
67
+ - `label`
68
+ - `error`
69
+ - `prepend`
70
+ - `append`
71
+ - `prefix`
72
+ - `suffix`
73
+
74
+ ## Instance API
75
+
76
+ The exposed instance combines:
77
+
78
+ - `formItem`
79
+ - `field`
80
+
81
+ Use this when parent code needs both wrapper validation methods and direct input methods such as focus.
82
+
83
+ ## Events
84
+
85
+ `FormText` keeps the main Element Plus input events, including:
86
+
87
+ - `update:modelValue`
88
+ - `change`
89
+ - `input`
90
+ - `focus`
91
+ - `blur`
92
+ - `clear`
93
+
94
+ ## Import
95
+
96
+ ```ts
97
+ import { FormText } from '@hinen/pro-element-plus';
98
+ ```
@@ -0,0 +1,78 @@
1
+ ---
2
+ name: using-form-time-picker
3
+ description: Use when a wrapped field should combine FormItem semantics with time or time-range picking behavior inside the Form* wrapper family.
4
+ ---
5
+
6
+ # Using FormTimePicker
7
+
8
+ ## Overview
9
+
10
+ Use `FormTimePicker` for a **time-oriented wrapped field** that combines `FormItem` behavior with Element Plus time picker behavior.
11
+
12
+ It fits fields where the value is time-like or time-range-like and the field should stay inside the same wrapper family as sibling fields.
13
+
14
+ ## Use it when
15
+
16
+ - a field captures time values or time ranges
17
+ - you want time-picker behavior plus built-in `FormItem` label and validation support
18
+ - disabled-time callbacks or range behavior are part of the field contract
19
+ - the field should expose both `formItem` and time-picker `field` refs together
20
+
21
+ ## Prefer something else when
22
+
23
+ - the field needs date or date-range semantics
24
+ → use `../using-form-date-picker/SKILL.md`
25
+ - you only need wrapper behavior around custom content
26
+ → use `../using-form-item/SKILL.md`
27
+
28
+ ## Decision guide
29
+
30
+ Use `FormTimePicker` if the answer is yes for **two or more** of these:
31
+
32
+ - Is the stored value fundamentally time-like rather than date-like?
33
+ - Do time range or disabled-time rules matter to normal usage?
34
+ - Should the field stay inside the shared form-wrapper family?
35
+ - Do you want wrapper validation access and time-picker instance access together?
36
+
37
+ If not, `FormDatePicker` or another wrapper is probably a better fit.
38
+
39
+ ## Start with
40
+
41
+ 1. Decide whether the field is single-time or range-based.
42
+ 2. Add the normal `FormItem` props such as `label`, `prop`, and `rules`.
43
+ 3. Add time-specific props such as `isRange` or disabled-time callbacks after the wrapper choice is clear.
44
+ 4. Use date-oriented wrappers instead if the value is not time-only.
45
+
46
+ ## Minimal patterns
47
+
48
+ ### Standard wrapped time field
49
+
50
+ ```vue
51
+ <FormTimePicker label="Start Time" prop="startTime" />
52
+ ```
53
+
54
+ ### Time range field
55
+
56
+ Use `isRange` when the field stores a start and end time together.
57
+
58
+ ### Limited-time field
59
+
60
+ Use disabled hour or minute callbacks when the valid time window matters to the product flow.
61
+
62
+ ## Common mistakes
63
+
64
+ - using `FormTimePicker` when the field is really date-oriented
65
+ - forgetting that time range fields have a different value contract than single-time fields
66
+ - mixing wrapper concerns and field concerns without deciding the time contract first
67
+
68
+ ## Related skills
69
+
70
+ - Wrapper-family selection: `../using-form-fields/SKILL.md`
71
+ - Base wrapper only: `../using-form-item/SKILL.md`
72
+ - Wrapped date picker: `../using-form-date-picker/SKILL.md`
73
+
74
+ ## References
75
+
76
+ - Props: `./references/props.md`
77
+ - Examples: `./references/examples.md`
78
+ - Gotchas: `./references/gotchas.md`
@@ -0,0 +1,53 @@
1
+ # FormTimePicker examples
2
+
3
+ ## 1. Standard time field
4
+
5
+ Use `FormTimePicker` when the field stores one time-like value inside a wrapped form flow.
6
+
7
+ Minimal pattern:
8
+
9
+ ```vue
10
+ <FormTimePicker label="Start Time" prop="startTime" />
11
+ ```
12
+
13
+ Typical fit:
14
+
15
+ - start time
16
+ - opening time
17
+ - reminder time
18
+
19
+ ## 2. Time range field
20
+
21
+ Use `isRange` when the field stores a start and end time together.
22
+
23
+ Minimal pattern:
24
+
25
+ ```vue
26
+ <FormTimePicker label="Hours" prop="hours" is-range />
27
+ ```
28
+
29
+ Typical fit:
30
+
31
+ - opening hours
32
+ - meeting windows
33
+ - service availability blocks
34
+
35
+ ## 3. Limited-time selection
36
+
37
+ Use disabled hour, minute, or second callbacks when the valid time window is constrained by product rules.
38
+
39
+ Minimal pattern:
40
+
41
+ ```vue
42
+ <FormTimePicker
43
+ label="Appointment Time"
44
+ prop="appointmentTime"
45
+ :disabled-hours="disabledHours"
46
+ />
47
+ ```
48
+
49
+ Typical fit:
50
+
51
+ - business-hour selection
52
+ - appointment boundaries
53
+ - restricted booking slots
@@ -0,0 +1,10 @@
1
+ # FormTimePicker gotchas
2
+
3
+ - Time-only and date-oriented fields are different wrapper choices
4
+ Use `../using-form-date-picker/SKILL.md` when calendar semantics matter.
5
+
6
+ - `isRange` changes the field contract
7
+ A time range is not just a single time with extra placeholders.
8
+
9
+ - Disabled-time callbacks are core behavior
10
+ Treat them as part of the field semantics, not just visual polish.
@@ -0,0 +1,89 @@
1
+ # FormTimePicker props
2
+
3
+ ## Overview
4
+
5
+ `FormTimePicker` combines `FormItem` props with Element Plus time picker props.
6
+
7
+ Use it when time and time-range semantics should stay inside the shared form-wrapper family.
8
+
9
+ ## Minimum setup
10
+
11
+ A minimal working setup is usually just:
12
+
13
+ ```vue
14
+ <FormTimePicker label="Start Time" prop="startTime" />
15
+ ```
16
+
17
+ That is enough when the field stores one time-like value inside a wrapped form flow.
18
+
19
+ Typical useful props:
20
+
21
+ - `label`
22
+ - `prop`
23
+ - `modelValue`
24
+
25
+ Common optional field props:
26
+
27
+ - `isRange`
28
+ - `placeholder`
29
+ - `startPlaceholder`
30
+ - `endPlaceholder`
31
+
32
+ ## Core props
33
+
34
+ ### Wrapper props from `FormItem`
35
+
36
+ Includes wrapper-level props such as:
37
+
38
+ - `label`
39
+ - `prop`
40
+ - `rules`
41
+ - `required`
42
+ - `tooltip`
43
+
44
+ ### Time-picker props
45
+
46
+ Useful field props include:
47
+
48
+ - `isRange`
49
+ - `modelValue`
50
+ - `placeholder`
51
+ - `rangeSeparator`
52
+ - `startPlaceholder`
53
+ - `endPlaceholder`
54
+ - `arrowControl`
55
+ - `valueFormat`
56
+
57
+ `modelValue` is the current stored time value or time-range value for the field. `valueFormat` matters when the parent expects a specific serialized time shape instead of the picker default.
58
+
59
+ ### Disabled-time callbacks
60
+
61
+ Use these when valid hours, minutes, or seconds depend on business rules.
62
+
63
+ ## Slots
64
+
65
+ Useful slots include wrapper-level `label` and `error`, plus normal time-picker customization slots where supported.
66
+
67
+ ## Instance API
68
+
69
+ The exposed instance combines:
70
+
71
+ - `formItem`
72
+ - `field`
73
+
74
+ ## Events
75
+
76
+ Important events include:
77
+
78
+ - `update:modelValue`
79
+ - `change`
80
+ - `focus`
81
+ - `blur`
82
+ - `clear`
83
+ - `visible-change`
84
+
85
+ ## Import
86
+
87
+ ```ts
88
+ import { FormTimePicker } from '@hinen/pro-element-plus';
89
+ ```
@@ -0,0 +1,82 @@
1
+ ---
2
+ name: using-form-tree-select
3
+ description: Use when a wrapped field should combine FormItem semantics with tree-node selection behavior inside the Form* wrapper family.
4
+ ---
5
+
6
+ # Using FormTreeSelect
7
+
8
+ ## Overview
9
+
10
+ Use `FormTreeSelect` for a **tree-oriented hierarchical wrapped field** that combines `FormItem` behavior with Element Plus tree-select behavior.
11
+
12
+ It fits fields where node semantics, tree expansion, checkbox selection, or lazy tree loading matter more than simple cascader path traversal.
13
+
14
+ ## Use it when
15
+
16
+ - a field should pick from tree-shaped data with node semantics
17
+ - you need checkboxes, multiple selection, or lazy tree loading inside the FormFields family
18
+ - tree node rendering or tree-event behavior matters to the field contract
19
+ - the field should expose both `formItem` and tree-select `field` refs together
20
+
21
+ ## Prefer something else when
22
+
23
+ - a cascader path is the simpler UX
24
+ → use `../using-form-cascade-select/SKILL.md`
25
+ - a flat local choice list is enough
26
+ → use `../using-form-select/SKILL.md`
27
+ - you only need wrapper behavior around custom content
28
+ → use `../using-form-item/SKILL.md`
29
+
30
+ ## Decision guide
31
+
32
+ Use `FormTreeSelect` if the answer is yes for **two or more** of these:
33
+
34
+ - Should users interact with nodes in a visible tree rather than a path-only cascader?
35
+ - Do checkboxes, node expansion, or lazy tree loading matter to normal usage?
36
+ - Should the field stay inside the shared form-wrapper family?
37
+ - Do you want wrapper validation access and tree-select instance access together?
38
+
39
+ If not, `FormCascadeSelect`, `FormSelect`, or another wrapper may fit better.
40
+
41
+ ## Start with
42
+
43
+ 1. Decide whether the hierarchy should behave like tree nodes or a cascader path.
44
+ 2. Add the normal `FormItem` props such as `label`, `prop`, and `rules`.
45
+ 3. Add `data`, mapping props, and tree interaction props only after the wrapper choice is clear.
46
+ 4. Use cascader-oriented wrappers instead if path traversal is the primary UX.
47
+
48
+ ## Minimal patterns
49
+
50
+ ### Standard wrapped tree select
51
+
52
+ ```vue
53
+ <FormTreeSelect label="Department" prop="department" :data="data" />
54
+ ```
55
+
56
+ ### Checkbox or multi-select tree
57
+
58
+ Use tree-select props like `showCheckbox` or `multiple` when the field should support richer node selection behavior.
59
+
60
+ ### Lazy-loaded tree field
61
+
62
+ Use lazy tree props when children should load on demand instead of being preloaded.
63
+
64
+ ## Common mistakes
65
+
66
+ - using `FormTreeSelect` when a cascader path would be simpler and clearer
67
+ - treating visible tree selection and cascader traversal as interchangeable
68
+ - forgetting that tree interaction props and events are part of the field contract, not just extra features
69
+
70
+ ## Related skills
71
+
72
+ - Business-form workflow router: `../building-form-workflows/SKILL.md`
73
+ - Wrapper-family selection: `../using-form-fields/SKILL.md`
74
+ - Base wrapper only: `../using-form-item/SKILL.md`
75
+ - Wrapped cascader: `../using-form-cascade-select/SKILL.md`
76
+ - Wrapped local select: `../using-form-select/SKILL.md`
77
+
78
+ ## References
79
+
80
+ - Props: `./references/props.md`
81
+ - Examples: `./references/examples.md`
82
+ - Gotchas: `./references/gotchas.md`
@@ -0,0 +1,55 @@
1
+ # FormTreeSelect examples
2
+
3
+ ## 1. Standard tree-backed field
4
+
5
+ Use `FormTreeSelect` when users should select values from visible tree-shaped data inside a wrapped form flow.
6
+
7
+ Minimal pattern:
8
+
9
+ ```vue
10
+ <FormTreeSelect label="Department" prop="department" :data="data" />
11
+ ```
12
+
13
+ Typical fit:
14
+
15
+ - department trees
16
+ - category trees
17
+ - nested organization structures
18
+
19
+ ## 2. Checkbox or multi-select tree field
20
+
21
+ Use `showCheckbox`, `multiple`, or `checkStrictly` when selection behavior should support richer tree semantics.
22
+
23
+ Minimal pattern:
24
+
25
+ ```vue
26
+ <FormTreeSelect
27
+ label="Permissions"
28
+ prop="permissions"
29
+ :data="data"
30
+ show-checkbox
31
+ multiple
32
+ />
33
+ ```
34
+
35
+ Typical fit:
36
+
37
+ - permission assignment
38
+ - many-node category selection
39
+ - parent or child selection rules
40
+
41
+ ## 3. Lazy-loaded tree field
42
+
43
+ Use lazy loading when the full tree is too large to preload.
44
+
45
+ Minimal pattern:
46
+
47
+ ```vue
48
+ <FormTreeSelect label="Org Unit" prop="orgUnit" :data="data" lazy />
49
+ ```
50
+
51
+ Typical fit:
52
+
53
+ - remote org charts
54
+ - deep nested data sets
55
+ - server-backed node expansion
@@ -0,0 +1,13 @@
1
+ # FormTreeSelect gotchas
2
+
3
+ - Tree selection and cascader traversal are different UX choices
4
+ Use `../using-form-cascade-select/SKILL.md` when path traversal is the clearer interaction.
5
+
6
+ - Tree interaction props change the field contract
7
+ Checkbox mode, strict checking, and lazy loading are not minor details.
8
+
9
+ - A flat list should not become a fake tree
10
+ If hierarchy is not part of the product model, `../using-form-select/SKILL.md` is usually clearer.
11
+
12
+ - Checkbox tree selection changes the stored value contract
13
+ Once `showCheckbox`, `multiple`, or strict checking enters the design, treat the field as a richer node-selection problem, not as a simple select with indentation.