@adamosuiteservices/ui 1.6.7 → 1.7.8
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/dist/combobox.cjs +2 -2
- package/dist/combobox.js +377 -345
- package/dist/components/ui/combobox/combobox.d.ts +20 -1
- package/dist/components/ui/combobox/combobox.stories.d.ts +4 -0
- package/dist/custom-layered-styles.css +1 -1
- package/dist/styles.css +1 -1
- package/docs/components/ui/combobox.md +654 -631
- package/package.json +1 -1
|
@@ -51,19 +51,22 @@ type ComboboxClassNames = {
|
|
|
51
51
|
/**
|
|
52
52
|
* Render prop functions for customizing component rendering.
|
|
53
53
|
* Each render prop receives relevant data and allows complete control over that part of the UI.
|
|
54
|
+
* All render props also receive an 'Original' component that renders the default implementation,
|
|
55
|
+
* allowing you to wrap or enhance the default behavior without reimplementing it.
|
|
54
56
|
*/
|
|
55
57
|
type ComboboxRenderProps = {
|
|
56
58
|
/**
|
|
57
59
|
* Custom renderer for the entire trigger button.
|
|
60
|
+
* @param props.Original - Default trigger button component
|
|
58
61
|
* @param props.open - Whether the popover is open
|
|
59
62
|
* @param props.value - Current selected value(s)
|
|
60
63
|
* @param props.displayText - Formatted display text for selected value(s)
|
|
61
64
|
* @param props.placeholder - Placeholder text
|
|
62
65
|
* @param props.hasValue - Whether any value is selected
|
|
63
66
|
* @param props.icon - Optional icon component
|
|
64
|
-
* @param props.showIcon - Whether to show the icon
|
|
65
67
|
*/
|
|
66
68
|
trigger?: (props: {
|
|
69
|
+
Original: ComponentType;
|
|
67
70
|
open: boolean;
|
|
68
71
|
value: string | string[];
|
|
69
72
|
displayText: string | null;
|
|
@@ -75,70 +78,86 @@ type ComboboxRenderProps = {
|
|
|
75
78
|
}) => ReactNode;
|
|
76
79
|
/**
|
|
77
80
|
* Custom renderer for the trigger dropdown icon.
|
|
81
|
+
* @param props.Original - Default chevron icon component
|
|
78
82
|
* @param props.open - Whether the popover is open
|
|
79
83
|
*/
|
|
80
84
|
triggerIcon?: (props: {
|
|
85
|
+
Original: ComponentType;
|
|
81
86
|
open: boolean;
|
|
82
87
|
}) => ReactNode;
|
|
83
88
|
/**
|
|
84
89
|
* Custom renderer for the placeholder text.
|
|
90
|
+
* @param props.Original - Default placeholder component
|
|
85
91
|
* @param props.text - The placeholder text
|
|
86
92
|
* @param props.hasValue - Whether any value is selected
|
|
87
93
|
*/
|
|
88
94
|
placeholder?: (props: {
|
|
95
|
+
Original: ComponentType;
|
|
89
96
|
text: string;
|
|
90
97
|
hasValue: boolean;
|
|
91
98
|
}) => ReactNode;
|
|
92
99
|
/**
|
|
93
100
|
* Custom renderer for displaying selected value(s).
|
|
101
|
+
* @param props.Original - Default display value component
|
|
94
102
|
* @param props.text - Formatted display text
|
|
95
103
|
* @param props.value - Current selected value(s)
|
|
96
104
|
*/
|
|
97
105
|
displayValue?: (props: {
|
|
106
|
+
Original: ComponentType;
|
|
98
107
|
text: string | null;
|
|
99
108
|
value: string | string[];
|
|
100
109
|
}) => ReactNode;
|
|
101
110
|
/**
|
|
102
111
|
* Custom renderer for an entire option item.
|
|
112
|
+
* @param props.Original - Default option item component
|
|
103
113
|
* @param props.option - The option data
|
|
104
114
|
* @param props.isSelected - Whether this option is currently selected
|
|
105
115
|
* @param props.selectedFeedback - Type of selection feedback ("checkbox" or "check")
|
|
106
116
|
*/
|
|
107
117
|
option?: (props: {
|
|
118
|
+
Original: ComponentType;
|
|
108
119
|
option: ComboboxOption;
|
|
109
120
|
isSelected: boolean;
|
|
110
121
|
selectedFeedback: "checkbox" | "check";
|
|
111
122
|
}) => ReactNode;
|
|
112
123
|
/**
|
|
113
124
|
* Custom renderer for just the option label text.
|
|
125
|
+
* @param props.Original - Default option label component
|
|
114
126
|
* @param props.option - The option data
|
|
115
127
|
*/
|
|
116
128
|
optionLabel?: (props: {
|
|
129
|
+
Original: ComponentType;
|
|
117
130
|
option: ComboboxOption;
|
|
118
131
|
}) => ReactNode;
|
|
119
132
|
/**
|
|
120
133
|
* Custom renderer for the selection feedback indicator (checkbox or check).
|
|
134
|
+
* @param props.Original - Default feedback indicator component
|
|
121
135
|
* @param props.option - The option data
|
|
122
136
|
* @param props.isSelected - Whether this option is currently selected
|
|
123
137
|
* @param props.type - Type of feedback indicator
|
|
124
138
|
*/
|
|
125
139
|
selectedFeedback?: (props: {
|
|
140
|
+
Original: ComponentType;
|
|
126
141
|
option: ComboboxOption;
|
|
127
142
|
isSelected: boolean;
|
|
128
143
|
type: "checkbox" | "check";
|
|
129
144
|
}) => ReactNode;
|
|
130
145
|
/**
|
|
131
146
|
* Custom renderer for the empty state when no options match.
|
|
147
|
+
* @param props.Original - Default empty state component
|
|
132
148
|
* @param props.text - The "no items found" message
|
|
133
149
|
*/
|
|
134
150
|
empty?: (props: {
|
|
151
|
+
Original: ComponentType;
|
|
135
152
|
text: string;
|
|
136
153
|
}) => ReactNode;
|
|
137
154
|
/**
|
|
138
155
|
* Custom renderer for the search input field.
|
|
156
|
+
* @param props.Original - Default search input component
|
|
139
157
|
* @param props.placeholder - Placeholder text for the search input
|
|
140
158
|
*/
|
|
141
159
|
searchInput?: (props: {
|
|
160
|
+
Original: ComponentType;
|
|
142
161
|
placeholder: string;
|
|
143
162
|
}) => ReactNode;
|
|
144
163
|
};
|
|
@@ -34,3 +34,7 @@ export declare const CustomEmptyState: Story;
|
|
|
34
34
|
export declare const CustomSelectedFeedback: Story;
|
|
35
35
|
export declare const WithIconAndPlaceholder: Story;
|
|
36
36
|
export declare const ValuePositionLeft: Story;
|
|
37
|
+
export declare const WrappedTrigger: Story;
|
|
38
|
+
export declare const EnhancedDisplayValue: Story;
|
|
39
|
+
export declare const WrappedOptions: Story;
|
|
40
|
+
export declare const EnhancedEmptyState: Story;
|