kahuna-base-react-components 1.4.0 → 1.4.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/dist/components/KDropdown/KDropdown.d.ts +1 -0
- package/dist/index.esm.js +2 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/languages/index.d.ts +6 -0
- package/dist/types.d.ts +1 -0
- package/package.json +1 -1
- package/src/components/KDropdown/KDropdown.tsx +5 -0
- package/src/components/KSelectRangeDate/KSelectRangeDate.tsx +4 -4
- package/src/languages/en.json +3 -0
- package/src/languages/tr.json +3 -0
|
@@ -24,6 +24,9 @@ export declare const getLanguageJson: () => {
|
|
|
24
24
|
last_three_days: string;
|
|
25
25
|
last_week: string;
|
|
26
26
|
last_two_weeks: string;
|
|
27
|
+
last_seven_days: string;
|
|
28
|
+
last_fourteen_days: string;
|
|
29
|
+
last_twenty_eight_days: string;
|
|
27
30
|
last_month: string;
|
|
28
31
|
last_three_months: string;
|
|
29
32
|
last_six_months: string;
|
|
@@ -60,6 +63,9 @@ export declare const lang: {
|
|
|
60
63
|
last_three_days: string;
|
|
61
64
|
last_week: string;
|
|
62
65
|
last_two_weeks: string;
|
|
66
|
+
last_seven_days: string;
|
|
67
|
+
last_fourteen_days: string;
|
|
68
|
+
last_twenty_eight_days: string;
|
|
63
69
|
last_month: string;
|
|
64
70
|
last_three_months: string;
|
|
65
71
|
last_six_months: string;
|
package/dist/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -56,6 +56,7 @@ export interface KDropdownProps {
|
|
|
56
56
|
onInputChange?: (text: string) => void
|
|
57
57
|
sortSelectedFirst?: boolean
|
|
58
58
|
dataTestId?: string
|
|
59
|
+
disableFilterOption?: boolean
|
|
59
60
|
}
|
|
60
61
|
|
|
61
62
|
const KDropdown: React.FC<KDropdownProps> = (props) => {
|
|
@@ -100,6 +101,7 @@ const KDropdown: React.FC<KDropdownProps> = (props) => {
|
|
|
100
101
|
const placeholderColor = props.placeholderColor || "#848484"
|
|
101
102
|
const enableIndicator = props.enableIndicator || false
|
|
102
103
|
const allowContainerShrink = props.allowContainerShrink || false
|
|
104
|
+
const disableFilterOption = props.disableFilterOption
|
|
103
105
|
|
|
104
106
|
const sortedOptions = useMemo<KSelectOption[]>(() => {
|
|
105
107
|
if (!props.sortSelectedFirst) {
|
|
@@ -129,6 +131,9 @@ const KDropdown: React.FC<KDropdownProps> = (props) => {
|
|
|
129
131
|
}
|
|
130
132
|
|
|
131
133
|
const customFilterOption = (option: FilterOptionOption<KSelectOption>, inputValue: string) => {
|
|
134
|
+
if (disableFilterOption) {
|
|
135
|
+
return true
|
|
136
|
+
}
|
|
132
137
|
return option.data.label.toLocaleLowerCase("en").includes(inputValue.toLocaleLowerCase("en"))
|
|
133
138
|
}
|
|
134
139
|
|
|
@@ -305,7 +305,7 @@ const KSelectRangeDate: React.FC<KSelectRangeDateProps> = (props) => {
|
|
|
305
305
|
width="140px"
|
|
306
306
|
background={shorthandIndex.current === 2 ? "#F7F7F7" : "#FFF"}
|
|
307
307
|
textColor={shorthandIndex.current === 2 ? "#000" : "#999"}
|
|
308
|
-
text={lang.button_text.
|
|
308
|
+
text={lang.button_text.last_seven_days}
|
|
309
309
|
borderRadius={8}
|
|
310
310
|
shadowDisabled
|
|
311
311
|
hoverBackground="#F0F0F0"
|
|
@@ -319,7 +319,7 @@ const KSelectRangeDate: React.FC<KSelectRangeDateProps> = (props) => {
|
|
|
319
319
|
width="140px"
|
|
320
320
|
background={shorthandIndex.current === 3 ? "#F7F7F7" : "#FFF"}
|
|
321
321
|
textColor={shorthandIndex.current === 3 ? "#000" : "#999"}
|
|
322
|
-
text={lang.button_text.
|
|
322
|
+
text={lang.button_text.last_fourteen_days}
|
|
323
323
|
borderRadius={8}
|
|
324
324
|
shadowDisabled
|
|
325
325
|
hoverBackground="#F0F0F0"
|
|
@@ -327,13 +327,13 @@ const KSelectRangeDate: React.FC<KSelectRangeDateProps> = (props) => {
|
|
|
327
327
|
/>
|
|
328
328
|
<KButton
|
|
329
329
|
onClick={() => {
|
|
330
|
-
shorthandDateSelection(
|
|
330
|
+
shorthandDateSelection(28)
|
|
331
331
|
setShorthandIndex({ ...shorthandIndex, current: 4 })
|
|
332
332
|
}}
|
|
333
333
|
width="140px"
|
|
334
334
|
background={shorthandIndex.current === 4 ? "#F7F7F7" : "#FFF"}
|
|
335
335
|
textColor={shorthandIndex.current === 4 ? "#000" : "#999"}
|
|
336
|
-
text={lang.button_text.
|
|
336
|
+
text={lang.button_text.last_twenty_eight_days}
|
|
337
337
|
borderRadius={8}
|
|
338
338
|
shadowDisabled
|
|
339
339
|
hoverBackground="#F0F0F0"
|
package/src/languages/en.json
CHANGED
|
@@ -22,6 +22,9 @@
|
|
|
22
22
|
"last_three_days": "Last 3 days",
|
|
23
23
|
"last_week": "Last week",
|
|
24
24
|
"last_two_weeks": "Last 2 weeks",
|
|
25
|
+
"last_seven_days": "Last 7 days",
|
|
26
|
+
"last_fourteen_days": "Last 14 days",
|
|
27
|
+
"last_twenty_eight_days": "Last 28 days",
|
|
25
28
|
"last_month": "Last Month",
|
|
26
29
|
"last_three_months": "Last 3 months",
|
|
27
30
|
"last_six_months": "Last 6 months",
|
package/src/languages/tr.json
CHANGED
|
@@ -22,6 +22,9 @@
|
|
|
22
22
|
"last_three_days": "Son 3 gün",
|
|
23
23
|
"last_week": "Son hafta",
|
|
24
24
|
"last_two_weeks": "Son 2 hafta",
|
|
25
|
+
"last_seven_days": "Son 7 gün",
|
|
26
|
+
"last_fourteen_days": "Son 14 gün",
|
|
27
|
+
"last_twenty_eight_days": "Son 28 gün",
|
|
25
28
|
"last_month": "Son ay",
|
|
26
29
|
"last_three_months": "Son 3 ay",
|
|
27
30
|
"last_six_months": "Son 6 ay",
|