@xqmsg/ui-core 0.26.0 → 0.26.2

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/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.26.0",
2
+ "version": "0.26.2",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -113,10 +113,10 @@ const Template: Story<InputProps<StoryFormSchema>> = args => {
113
113
  return (
114
114
  <Form formHandler={formHandler}>
115
115
  <Input
116
- label="Pilled Text Input - scroll mode"
116
+ label={args.label + ' - Pilled Text - scroll mode'}
117
117
  name="recipients"
118
118
  inputType="pilled-text"
119
- placeholder="Enter email address..."
119
+ placeholder={args.placeholder ?? 'Enter email address...'}
120
120
  isInvalid={!!form.formState.errors['prop5']?.message}
121
121
  errorText={form.formState.errors['prop5']?.message}
122
122
  control={form.control}
@@ -129,10 +129,10 @@ const Template: Story<InputProps<StoryFormSchema>> = args => {
129
129
  overflowMode="scroll"
130
130
  />
131
131
  <Input
132
- label="Pilled Text - wrap mode"
132
+ label={args.label + ' - Pilled Text - wrap mod'}
133
133
  name="recipients"
134
134
  inputType="pilled-text"
135
- placeholder="Enter email address..."
135
+ placeholder={args.placeholder ?? 'Enter email address...'}
136
136
  isInvalid={!!form.formState.errors['prop5']?.message}
137
137
  errorText={form.formState.errors['prop5']?.message}
138
138
  control={form.control}
@@ -147,6 +147,7 @@ const Template: Story<InputProps<StoryFormSchema>> = args => {
147
147
  <Input
148
148
  {...args}
149
149
  inputType="multi-select"
150
+ label={args.label + ' - multi-select'}
150
151
  setValue={form.setValue}
151
152
  setError={form.setError}
152
153
  clearErrors={form.clearErrors}
@@ -156,6 +157,7 @@ const Template: Story<InputProps<StoryFormSchema>> = args => {
156
157
  />
157
158
  <Input
158
159
  {...args}
160
+ label={args.label + ' - multi-select'}
159
161
  inputType="multi-select"
160
162
  variant="mobile"
161
163
  setValue={form.setValue}
@@ -168,6 +170,7 @@ const Template: Story<InputProps<StoryFormSchema>> = args => {
168
170
  />
169
171
  <Input
170
172
  {...args}
173
+ label={args.label + ' - text'}
171
174
  inputType="text"
172
175
  name="prop3"
173
176
  onChange={e => form.setValue('prop3', e.target.value)}
@@ -175,6 +178,7 @@ const Template: Story<InputProps<StoryFormSchema>> = args => {
175
178
  <Input
176
179
  {...args}
177
180
  inputType="text"
181
+ label={args.label + ' - text - variant mobile'}
178
182
  variant="mobile"
179
183
  name="prop3"
180
184
  onChange={e => form.setValue('prop3', e.target.value)}
@@ -182,6 +186,7 @@ const Template: Story<InputProps<StoryFormSchema>> = args => {
182
186
  <Input
183
187
  {...args}
184
188
  inputType="text"
189
+ label={args.label + ' - text - tooltip as react node'}
185
190
  name="prop3"
186
191
  onChange={e => form.setValue('prop3', e.target.value)}
187
192
  tooltipText={
@@ -194,6 +199,7 @@ const Template: Story<InputProps<StoryFormSchema>> = args => {
194
199
  <Input
195
200
  {...args}
196
201
  inputType="text"
202
+ label={args.label + ' - text - tooltip as string'}
197
203
  name="prop3"
198
204
  onChange={e => form.setValue('prop3', e.target.value)}
199
205
  tooltipText="test text"
@@ -201,12 +207,14 @@ const Template: Story<InputProps<StoryFormSchema>> = args => {
201
207
  <Input
202
208
  {...args}
203
209
  inputType="textarea"
210
+ label={args.label + ' - textarea'}
204
211
  name="prop2"
205
212
  onChange={e => form.setValue('prop2', e.target.value)}
206
213
  />
207
214
  <Input
208
215
  {...args}
209
216
  inputType="textarea"
217
+ label={args.label + ' - textarea - variant mobile'}
210
218
  variant="mobile"
211
219
  name="prop2"
212
220
  onChange={e => form.setValue('prop2', e.target.value)}
@@ -215,6 +223,7 @@ const Template: Story<InputProps<StoryFormSchema>> = args => {
215
223
  {...args}
216
224
  name="prop"
217
225
  inputType="pilled-text"
226
+ label={args.label + ' - Pilled Text'}
218
227
  setValue={form.setValue}
219
228
  setError={form.setError}
220
229
  clearErrors={form.clearErrors}
@@ -226,6 +235,7 @@ const Template: Story<InputProps<StoryFormSchema>> = args => {
226
235
  name="prop"
227
236
  variant="mobile"
228
237
  inputType="pilled-text"
238
+ label={args.label + ' - Pilled Text - variant mobile'}
229
239
  setValue={form.setValue}
230
240
  setError={form.setError}
231
241
  clearErrors={form.clearErrors}
@@ -235,6 +245,7 @@ const Template: Story<InputProps<StoryFormSchema>> = args => {
235
245
  <Input
236
246
  {...args}
237
247
  inputType="select"
248
+ label={args.label + ' - select'}
238
249
  setValue={form.setValue}
239
250
  name="prop4"
240
251
  defaultValue={'value1'}
@@ -242,6 +253,8 @@ const Template: Story<InputProps<StoryFormSchema>> = args => {
242
253
  <Input
243
254
  {...args}
244
255
  inputType="select"
256
+ label={args.label + ' - select - variant mobile'}
257
+ variant="mobile"
245
258
  setValue={form.setValue}
246
259
  name="prop4"
247
260
  defaultValue={'value1'}
@@ -250,6 +263,7 @@ const Template: Story<InputProps<StoryFormSchema>> = args => {
250
263
  <Input
251
264
  {...args}
252
265
  inputType="select"
266
+ label={args.label + ' - select - tooltip as react node'}
253
267
  setValue={form.setValue}
254
268
  name="prop4"
255
269
  defaultValue={'value1'}
@@ -263,6 +277,7 @@ const Template: Story<InputProps<StoryFormSchema>> = args => {
263
277
  />
264
278
  <SelectNative
265
279
  {...args}
280
+ label={args.label + ' - select native'}
266
281
  setValue={form.setValue}
267
282
  name="prop4"
268
283
  setError={form.setError}
@@ -280,6 +295,7 @@ const Template: Story<InputProps<StoryFormSchema>> = args => {
280
295
  {...args}
281
296
  name="prop6"
282
297
  inputType="switch"
298
+ label={args.label + ' - switch'}
283
299
  setValue={form.setValue}
284
300
  />
285
301
  <Input
@@ -287,6 +303,7 @@ const Template: Story<InputProps<StoryFormSchema>> = args => {
287
303
  name="prop6"
288
304
  variant="mobile"
289
305
  inputType="switch"
306
+ label={args.label + ' - switch - variant mobile'}
290
307
  setValue={form.setValue}
291
308
  />
292
309
  <Input
@@ -299,6 +316,7 @@ const Template: Story<InputProps<StoryFormSchema>> = args => {
299
316
  {...args}
300
317
  name="prop6"
301
318
  inputType="checkbox"
319
+ label={args.label + ' - checkbox - variant mobile'}
302
320
  variant="mobile"
303
321
  setValue={form.setValue}
304
322
  />
@@ -35,7 +35,7 @@ const StackedInput = React.forwardRef<HTMLInputElement, StackedInputProps>(
35
35
  {label}
36
36
  <Input
37
37
  {...props}
38
- placeholder={placeholder}
38
+ placeholder={props.placeholder ?? placeholder}
39
39
  type={type}
40
40
  isRequired={isRequired}
41
41
  ref={_ref}
@@ -1,18 +1,13 @@
1
- import {
2
- createBreakpoints,
3
- BaseBreakpointConfig,
4
- } from '@chakra-ui/theme-tools';
1
+ import { BaseBreakpointConfig } from '@chakra-ui/theme-tools';
5
2
 
6
3
  /**
7
4
  * Breakpoints for responsive design
8
5
  */
9
- const breakpointValues: BaseBreakpointConfig = {
6
+ const breakpoints: BaseBreakpointConfig = {
10
7
  sm: '30em',
11
8
  md: '48em',
12
9
  lg: '62em',
13
10
  xl: '80em',
14
11
  };
15
12
 
16
- const breakpoints = createBreakpoints(breakpointValues);
17
-
18
13
  export default breakpoints;