@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veracity/vui",
3
- "version": "2.25.5-beta.1",
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",
@@ -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}
@@ -87,48 +87,50 @@ export function Select(props: SelectProps) {
87
87
 
88
88
  return (
89
89
  <SelectProvider value={context}>
90
- {label && (
91
- <SelectLabel
92
- disabled={disabled}
93
- id={id}
94
- label={label}
95
- labelMarkOptional={labelMarkOptional}
96
- labelTooltipText={labelTooltipText}
97
- />
98
- )}
99
- <Popover matchWidth={matchWidth} {...rest}>
100
- <>
101
- {selectButton ?? <SelectButton {...selectButtonProps} />}
102
- <SelectContent overflow="hidden">
103
- {showOptionsFilter && (
104
- <Box mr={2}>
105
- <Input
106
- iconLeft="falSearch"
107
- id={id} // should be select on the button instead?
108
- m={1}
109
- mt={0}
110
- onChange={onQueryChange}
111
- placeholder="Filter…"
112
- size={size}
113
- value={query}
114
- />
115
- </Box>
116
- )}
117
- <SelectGroup maxH={maxHeight} overflowY="auto" tabIndex={1000}>
118
- {children ??
119
- filteredOptions?.map?.(option => (
120
- <SelectOption closeOnScroll={closeOnScroll} key={option.value} title={option.text} {...option} />
121
- ))}
122
- </SelectGroup>
123
- </SelectContent>
124
- </>
125
- </Popover>
126
- {!!helpText && <HelpText size={helpTextSize[size]}>{helpText}</HelpText>}
127
- {!!errorText && (
128
- <HelpText isError size={helpTextSize[size]}>
129
- {errorText}
130
- </HelpText>
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