@veracity/vui 2.25.5-beta.1 → 2.25.5
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/cjs/input/helpText.d.ts.map +1 -1
- package/dist/cjs/input/helpText.js +1 -1
- package/dist/cjs/input/helpText.js.map +1 -1
- package/dist/cjs/select/select.d.ts.map +1 -1
- package/dist/cjs/select/select.js +1 -1
- package/dist/cjs/select/select.js.map +1 -1
- package/dist/cjs/textarea/textarea.d.ts.map +1 -1
- package/dist/cjs/textarea/textarea.js +1 -1
- package/dist/cjs/textarea/textarea.js.map +1 -1
- package/dist/esm/input/helpText.d.ts.map +1 -1
- package/dist/esm/input/helpText.js +1 -1
- package/dist/esm/input/helpText.js.map +1 -1
- package/dist/esm/select/select.d.ts.map +1 -1
- package/dist/esm/select/select.js +2 -2
- package/dist/esm/select/select.js.map +1 -1
- package/dist/esm/textarea/textarea.d.ts.map +1 -1
- package/dist/esm/textarea/textarea.js +3 -3
- package/dist/esm/textarea/textarea.js.map +1 -1
- package/dist/tsconfig.legacy.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/input/helpText.tsx +1 -2
- package/src/select/select.tsx +44 -42
- package/src/textarea/textarea.tsx +3 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veracity/vui",
|
|
3
|
-
"version": "2.25.5
|
|
3
|
+
"version": "2.25.5",
|
|
4
4
|
"description": "Veracity UI is a React component library crafted for use within Veracity applications and pages. Based on Styled Components and @xstyled.",
|
|
5
5
|
"module": "./dist/esm/index.js",
|
|
6
6
|
"main": "./dist/cjs/index.js",
|
package/src/input/helpText.tsx
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
|
|
3
1
|
import { useStyleConfig, vui } from '../core'
|
|
4
2
|
import Icon from '../icon'
|
|
5
3
|
import P from '../p'
|
|
@@ -23,6 +21,7 @@ export const HelpText = vui<'div', HelpTextProps>((props, ref) => {
|
|
|
23
21
|
className={cs('vui-inputHelpText', className)}
|
|
24
22
|
color={color}
|
|
25
23
|
display="flex"
|
|
24
|
+
fontSize={isError ? 'md' : 'sm'}
|
|
26
25
|
pt={0.5}
|
|
27
26
|
ref={ref}
|
|
28
27
|
{...styles.helpText}
|
package/src/select/select.tsx
CHANGED
|
@@ -87,48 +87,50 @@ export function Select(props: SelectProps) {
|
|
|
87
87
|
|
|
88
88
|
return (
|
|
89
89
|
<SelectProvider value={context}>
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
<
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
{
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
{
|
|
130
|
-
|
|
131
|
-
|
|
90
|
+
<Box className="vui-selectContainer" column>
|
|
91
|
+
{label && (
|
|
92
|
+
<SelectLabel
|
|
93
|
+
disabled={disabled}
|
|
94
|
+
id={id}
|
|
95
|
+
label={label}
|
|
96
|
+
labelMarkOptional={labelMarkOptional}
|
|
97
|
+
labelTooltipText={labelTooltipText}
|
|
98
|
+
/>
|
|
99
|
+
)}
|
|
100
|
+
<Popover matchWidth={matchWidth} {...rest}>
|
|
101
|
+
<>
|
|
102
|
+
{selectButton ?? <SelectButton {...selectButtonProps} />}
|
|
103
|
+
<SelectContent overflow="hidden">
|
|
104
|
+
{showOptionsFilter && (
|
|
105
|
+
<Box mr={2}>
|
|
106
|
+
<Input
|
|
107
|
+
iconLeft="falSearch"
|
|
108
|
+
id={id} // should be select on the button instead?
|
|
109
|
+
m={1}
|
|
110
|
+
mt={0}
|
|
111
|
+
onChange={onQueryChange}
|
|
112
|
+
placeholder="Filter…"
|
|
113
|
+
size={size}
|
|
114
|
+
value={query}
|
|
115
|
+
/>
|
|
116
|
+
</Box>
|
|
117
|
+
)}
|
|
118
|
+
<SelectGroup maxH={maxHeight} overflowY="auto" tabIndex={1000}>
|
|
119
|
+
{children ??
|
|
120
|
+
filteredOptions?.map?.(option => (
|
|
121
|
+
<SelectOption closeOnScroll={closeOnScroll} key={option.value} title={option.text} {...option} />
|
|
122
|
+
))}
|
|
123
|
+
</SelectGroup>
|
|
124
|
+
</SelectContent>
|
|
125
|
+
</>
|
|
126
|
+
</Popover>
|
|
127
|
+
{!!helpText && <HelpText size={helpTextSize[size]}>{helpText}</HelpText>}
|
|
128
|
+
{!!errorText && (
|
|
129
|
+
<HelpText isError size={helpTextSize[size]}>
|
|
130
|
+
{errorText}
|
|
131
|
+
</HelpText>
|
|
132
|
+
)}
|
|
133
|
+
</Box>
|
|
132
134
|
</SelectProvider>
|
|
133
135
|
)
|
|
134
136
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { useEffect, useId, useState } from 'react'
|
|
2
2
|
|
|
3
|
-
import { Label } from '..'
|
|
3
|
+
import { Box, Label } from '..'
|
|
4
4
|
import { omitThemingProps, styled, useStyleConfig, vui } from '../core'
|
|
5
5
|
import { helpTextSize, inputColors } from '../input/consts'
|
|
6
6
|
import HelpText from '../input/helpText'
|
|
7
|
-
import label from '../label'
|
|
8
7
|
import T from '../t'
|
|
9
8
|
import { ChangeEvent, cs, filterUndefined, isString } from '../utils'
|
|
10
9
|
import { getInitialCount } from './helpers'
|
|
@@ -104,7 +103,7 @@ export const Textarea = vui<'div', TextareaProps>((props, ref) => {
|
|
|
104
103
|
}, [value])
|
|
105
104
|
|
|
106
105
|
return (
|
|
107
|
-
|
|
106
|
+
<Box className="vui-textareaContainer" column>
|
|
108
107
|
{isString(label) ? (
|
|
109
108
|
<Label
|
|
110
109
|
aria-disabled={disabled}
|
|
@@ -172,7 +171,7 @@ export const Textarea = vui<'div', TextareaProps>((props, ref) => {
|
|
|
172
171
|
</HelpText>
|
|
173
172
|
)}
|
|
174
173
|
</TextareaBase>
|
|
175
|
-
|
|
174
|
+
</Box>
|
|
176
175
|
)
|
|
177
176
|
})
|
|
178
177
|
|