agroptima-design-system 0.31.11 → 0.31.12
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
|
@@ -25,6 +25,7 @@ export type DateRangePickerProps = {
|
|
|
25
25
|
onSelect?: (date: DateRange) => void
|
|
26
26
|
withInput?: boolean
|
|
27
27
|
label?: string
|
|
28
|
+
name?: string
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
export type DateRange = {
|
|
@@ -40,6 +41,7 @@ export function DateRangePicker({
|
|
|
40
41
|
required = false,
|
|
41
42
|
variant,
|
|
42
43
|
withInput = false,
|
|
44
|
+
name = 'date',
|
|
43
45
|
label = 'Date',
|
|
44
46
|
}: DateRangePickerProps): React.JSX.Element {
|
|
45
47
|
const inputType = withInput ? 'text' : 'hidden'
|
|
@@ -75,7 +77,7 @@ export function DateRangePicker({
|
|
|
75
77
|
datePickerIcon={isOpen ? 'AngleUp' : 'AngleDown'}
|
|
76
78
|
value={`${formatDatePickerFooterDate(selected.from, lng as string)} - ${formatDatePickerFooterDate(selected.to, lng as string)}`}
|
|
77
79
|
icon="Calendar"
|
|
78
|
-
name=
|
|
80
|
+
name={name}
|
|
79
81
|
placeholder={translations[lng].rangePlaceholder}
|
|
80
82
|
readOnly
|
|
81
83
|
/>
|
|
@@ -18,6 +18,7 @@ export type DateSinglePickerProps = {
|
|
|
18
18
|
lng: Locale
|
|
19
19
|
required?: boolean
|
|
20
20
|
className?: string
|
|
21
|
+
name?: string
|
|
21
22
|
defaultValue?: string
|
|
22
23
|
onSelect?: (date: string) => void
|
|
23
24
|
withInput?: boolean
|
|
@@ -29,6 +30,7 @@ export function DateSinglePicker({
|
|
|
29
30
|
defaultValue,
|
|
30
31
|
lng,
|
|
31
32
|
className,
|
|
33
|
+
name = 'date',
|
|
32
34
|
required = false,
|
|
33
35
|
variant,
|
|
34
36
|
withInput = false,
|
|
@@ -59,7 +61,7 @@ export function DateSinglePicker({
|
|
|
59
61
|
datePickerIcon={isOpen ? 'AngleUp' : 'AngleDown'}
|
|
60
62
|
value={formatDatePickerFooterDate(selected, lng as string)}
|
|
61
63
|
icon="Calendar"
|
|
62
|
-
name=
|
|
64
|
+
name={name}
|
|
63
65
|
placeholder={translations[lng].singlePlaceholder}
|
|
64
66
|
readOnly
|
|
65
67
|
/>
|
package/src/atoms/Select.scss
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
@use '../settings/typography/form' as typography;
|
|
3
3
|
@use '../settings/config';
|
|
4
4
|
@use '../settings/depth';
|
|
5
|
+
@use '../settings/mixins';
|
|
6
|
+
|
|
5
7
|
|
|
6
8
|
.select-group {
|
|
7
9
|
display: flex;
|
|
@@ -62,14 +64,8 @@
|
|
|
62
64
|
background: color_alias.$neutral-color-50;
|
|
63
65
|
color: color_alias.$neutral-color-400;
|
|
64
66
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
fill: color_alias.$neutral-color-400;
|
|
68
|
-
path {
|
|
69
|
-
fill: color_alias.$neutral-color-400;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
67
|
+
@include mixins.icon-color(color_alias.$neutral-color-400);
|
|
68
|
+
|
|
73
69
|
}
|
|
74
70
|
}
|
|
75
71
|
|
package/src/atoms/Select.tsx
CHANGED
|
@@ -4,6 +4,12 @@ import { Meta } from "@storybook/blocks";
|
|
|
4
4
|
|
|
5
5
|
# Changelog
|
|
6
6
|
|
|
7
|
+
## 0.31.12
|
|
8
|
+
|
|
9
|
+
* Fix background color in date picker calendar with input
|
|
10
|
+
* Fix selector close button when is disabled
|
|
11
|
+
* Add optional name to date picker input
|
|
12
|
+
|
|
7
13
|
## 0.31.11
|
|
8
14
|
|
|
9
15
|
* On DateSinglePicker component, Input component shows the selected date with the optional property withInput.
|