agroptima-design-system 0.33.2-beta.0 → 0.33.2-beta.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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agroptima-design-system",
|
|
3
|
-
"version": "0.33.2-beta.
|
|
3
|
+
"version": "0.33.2-beta.2",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "npm run storybook",
|
|
6
6
|
"storybook": "storybook dev -p 6006 --ci",
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
"publish:beta": "npm publish --tag beta"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
+
"agroptima-design-system": "^0.33.2-beta.0",
|
|
18
19
|
"next": "^15.1.0",
|
|
19
20
|
"react": "^19.0.0",
|
|
20
21
|
"react-day-picker": "^9.5.0",
|
|
@@ -29,6 +29,7 @@ export type DateRangePickerProps = {
|
|
|
29
29
|
name?: string
|
|
30
30
|
helpText?: string
|
|
31
31
|
errors?: string[]
|
|
32
|
+
fullWidth?: boolean
|
|
32
33
|
}
|
|
33
34
|
|
|
34
35
|
export type DateRange = {
|
|
@@ -48,10 +49,12 @@ export function DateRangePicker({
|
|
|
48
49
|
label = 'Date',
|
|
49
50
|
errors,
|
|
50
51
|
helpText,
|
|
52
|
+
fullWidth = false,
|
|
51
53
|
}: DateRangePickerProps): JSX.Element {
|
|
52
54
|
const cssClasses = classNames('date-picker', variant, className, {
|
|
53
55
|
toggle: withInput,
|
|
54
56
|
invalid: errors?.length,
|
|
57
|
+
'full-width': fullWidth,
|
|
55
58
|
})
|
|
56
59
|
const helpTexts = buildHelpText(helpText, errors)
|
|
57
60
|
|
|
@@ -28,6 +28,7 @@ export type DateSinglePickerProps = {
|
|
|
28
28
|
label?: string
|
|
29
29
|
helpText?: string
|
|
30
30
|
errors?: string[]
|
|
31
|
+
fullWidth?: boolean
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
export function DateSinglePicker({
|
|
@@ -42,6 +43,7 @@ export function DateSinglePicker({
|
|
|
42
43
|
label = 'Date',
|
|
43
44
|
errors,
|
|
44
45
|
helpText,
|
|
46
|
+
fullWidth = false,
|
|
45
47
|
}: DateSinglePickerProps): JSX.Element {
|
|
46
48
|
const { isOpen, close, toggle } = useOpen(!withInput)
|
|
47
49
|
const pickerRef = useRef(null)
|
|
@@ -51,6 +53,7 @@ export function DateSinglePicker({
|
|
|
51
53
|
const cssClasses = classNames('date-picker', variant, className, {
|
|
52
54
|
toggle: withInput,
|
|
53
55
|
invalid: errors?.length,
|
|
56
|
+
'full-width': fullWidth,
|
|
54
57
|
})
|
|
55
58
|
|
|
56
59
|
const [selected, setSelected] = useState<Date | undefined>(
|
|
@@ -14,6 +14,7 @@ export interface QuantitySelectorProps extends Omit<InputProps, 'type'> {
|
|
|
14
14
|
hideLabel?: boolean
|
|
15
15
|
id?: string
|
|
16
16
|
variant?: Variant
|
|
17
|
+
fullWidth?: boolean
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
export function QuantitySelector({
|
|
@@ -24,6 +25,7 @@ export function QuantitySelector({
|
|
|
24
25
|
disabled,
|
|
25
26
|
hideLabel = false,
|
|
26
27
|
variant = 'primary',
|
|
28
|
+
fullWidth = false,
|
|
27
29
|
...props
|
|
28
30
|
}: QuantitySelectorProps): React.JSX.Element {
|
|
29
31
|
const inputRef = useRef<HTMLInputElement>(null)
|
|
@@ -41,7 +43,11 @@ export function QuantitySelector({
|
|
|
41
43
|
}
|
|
42
44
|
}
|
|
43
45
|
return (
|
|
44
|
-
<div
|
|
46
|
+
<div
|
|
47
|
+
className={classNames('quantity-selector-group', variant, className, {
|
|
48
|
+
'full-width': fullWidth,
|
|
49
|
+
})}
|
|
50
|
+
>
|
|
45
51
|
{!hideLabel && (
|
|
46
52
|
<Label required={props.required} htmlFor={id}>
|
|
47
53
|
{label}
|