@xqmsg/ui-core 0.16.6 → 0.16.7

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.16.6",
2
+ "version": "0.16.7",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -5,6 +5,7 @@ import { Input, InputProps } from '.';
5
5
  import { useFormHandler } from '../form/hooks/useFormHandler';
6
6
  import * as Yup from 'yup';
7
7
  import { Form } from '../form';
8
+ import { Flex, Grid, GridItem } from '@chakra-ui/react';
8
9
 
9
10
  const meta: Meta<InputProps<StoryFormSchema>> = {
10
11
  title: 'Input example',
@@ -98,7 +99,7 @@ const Template: Story<InputProps<StoryFormSchema>> = args => {
98
99
 
99
100
  return (
100
101
  <Form formHandler={formHandler}>
101
- <Input
102
+ {/* <Input
102
103
  {...args}
103
104
  inputType="multi-select"
104
105
  setValue={form.setValue}
@@ -141,7 +142,57 @@ const Template: Story<InputProps<StoryFormSchema>> = args => {
141
142
  name="prop6"
142
143
  inputType="switch"
143
144
  setValue={form.setValue}
144
- />
145
+ /> */}
146
+ <Flex
147
+ flexDirection="row"
148
+ alignItems="center"
149
+ justifyContent="space-between"
150
+ >
151
+ <Grid templateColumns="repeat(8, 1fr)">
152
+ <GridItem colSpan={1} pr="10px">
153
+ <Input
154
+ label="Long example label"
155
+ inputType="text"
156
+ isRequired
157
+ name={`actions`}
158
+ ariaLabel="{actionInput.ariaLabel}"
159
+ control={form.control}
160
+ setValue={form.setValue}
161
+ defaultValue="{actionInput.defaultValue}"
162
+ setError={form.setError}
163
+ clearErrors={form.clearErrors}
164
+ />
165
+ </GridItem>
166
+ <GridItem colSpan={1} pr="10px">
167
+ <Input
168
+ label="hi"
169
+ inputType="text"
170
+ isRequired
171
+ setValue={form.setValue}
172
+ name={`actions.`}
173
+ ariaLabel="{adminInput.ariaLabel}"
174
+ control={form.control}
175
+ defaultValue="{adminInput.defaultValue}"
176
+ setError={form.setError}
177
+ clearErrors={form.clearErrors}
178
+ />
179
+ </GridItem>
180
+ <GridItem colSpan={6} pr="10px">
181
+ <Input
182
+ inputType="text"
183
+ isRequired
184
+ setValue={form.setValue}
185
+ name={`action`}
186
+ ariaLabel="{messageInput.ariaLabel}"
187
+ control={form.control}
188
+ defaultValue="{messageInput.defaultValue}"
189
+ setError={form.setError}
190
+ clearErrors={form.clearErrors}
191
+ maxLength={140}
192
+ />
193
+ </GridItem>
194
+ </Grid>
195
+ </Flex>
145
196
  </Form>
146
197
  );
147
198
  };
@@ -150,6 +201,9 @@ export const Default = Template.bind({});
150
201
  Default.args = {
151
202
  label: 'Input Label',
152
203
  inputType: 'text',
204
+ helperText:
205
+ ' M1 4.33325H15.1667M11 7.66659H16M11 10.9999H16M8.08333 7.66659H8.5M8.08333 10.9999H8.5',
206
+
153
207
  options: [
154
208
  { value: 'section_header', label: 'Section 1', sortValue: 0 },
155
209
  {
@@ -18,7 +18,7 @@ export const Label: React.FC<LabelProps> = ({
18
18
  label,
19
19
  }) => {
20
20
  return (
21
- <FormLabel display="flex" alignItems="center">
21
+ <FormLabel display="flex">
22
22
  {label}
23
23
  {isRequired && (
24
24
  <Box ml={1} color={colors.label.error}>
@@ -11,11 +11,9 @@ function baseStyleRequiredIndicator() {
11
11
 
12
12
  function baseStyleHelperText() {
13
13
  return {
14
- position: 'absolute',
15
- color: colors.label.secondary.light,
16
14
  mt: 1,
17
15
  ml: 1,
18
- bottom: 0,
16
+ color: colors.label.secondary.light,
19
17
  fontSize: '13px',
20
18
  };
21
19
  }