@ssa-ui-kit/core 2.16.2-canary-1c17e94-20250507 → 2.16.3-canary-be61b75-20250507
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/DateRangePicker/styles.d.ts +10 -0
- package/dist/index.js +37 -14
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -32,3 +32,13 @@ export declare const MonthsViewCell: import("@emotion/styled").StyledComponent<{
|
|
|
32
32
|
isCalendarSecondDateSelected?: boolean;
|
|
33
33
|
isHighlighted: boolean;
|
|
34
34
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
35
|
+
export declare const TriggerWrapper: import("@emotion/styled").StyledComponent<{
|
|
36
|
+
theme?: import("@emotion/react").Theme;
|
|
37
|
+
as?: React.ElementType;
|
|
38
|
+
} & {
|
|
39
|
+
avatarSize?: number;
|
|
40
|
+
direction?: string;
|
|
41
|
+
alignItems?: string;
|
|
42
|
+
} & import("../..").CommonProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
|
43
|
+
theme?: import("@emotion/react").Theme;
|
|
44
|
+
}, {}, {}>;
|
package/dist/index.js
CHANGED
|
@@ -10551,9 +10551,10 @@ const DatesListWrapper = /*#__PURE__*/base_default()(Wrapper_Wrapper, true ? {
|
|
|
10551
10551
|
}) => theme.colors.greyLighter, ";}" + ( true ? "" : 0));
|
|
10552
10552
|
;// ./src/components/DateRangePicker/styles.ts
|
|
10553
10553
|
|
|
10554
|
+
function DateRangePicker_styles_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
10554
10555
|
|
|
10555
10556
|
const styles_DaysViewCell = /*#__PURE__*/base_default()(Wrapper_Wrapper, true ? {
|
|
10556
|
-
target: "
|
|
10557
|
+
target: "e19l41fq3"
|
|
10557
10558
|
} : 0)("position:relative;width:40px;height:40px;justify-content:center;font-size:14px;font-weight:500;border-radius:", ({
|
|
10558
10559
|
isHighlighted
|
|
10559
10560
|
}) => isHighlighted ? 0 : '6px', ";border:", ({
|
|
@@ -10589,7 +10590,7 @@ const styles_DaysViewCell = /*#__PURE__*/base_default()(Wrapper_Wrapper, true ?
|
|
|
10589
10590
|
isCalendarDateNow
|
|
10590
10591
|
}) => isCalendarDateNow && `1px solid ${theme.colors.greyFocused}`, ";}" + ( true ? "" : 0));
|
|
10591
10592
|
const styles_YearsViewCell = /*#__PURE__*/base_default()("div", true ? {
|
|
10592
|
-
target: "
|
|
10593
|
+
target: "e19l41fq2"
|
|
10593
10594
|
} : 0)("display:flex;justify-content:center;position:relative;align-items:center;width:70px;height:40px;border-radius:", ({
|
|
10594
10595
|
isCalendarFirstDateSelected,
|
|
10595
10596
|
isCalendarSecondDateSelected
|
|
@@ -10622,7 +10623,7 @@ const styles_YearsViewCell = /*#__PURE__*/base_default()("div", true ? {
|
|
|
10622
10623
|
theme
|
|
10623
10624
|
}) => theme.colors.blueRoyal16, ";}" + ( true ? "" : 0));
|
|
10624
10625
|
const styles_MonthsViewCell = /*#__PURE__*/base_default()("div", true ? {
|
|
10625
|
-
target: "
|
|
10626
|
+
target: "e19l41fq1"
|
|
10626
10627
|
} : 0)("display:flex;justify-content:center;position:relative;align-items:center;width:99px;height:40px;border-radius:", ({
|
|
10627
10628
|
isCalendarFirstDateSelected,
|
|
10628
10629
|
isCalendarSecondDateSelected
|
|
@@ -10659,6 +10660,12 @@ const styles_MonthsViewCell = /*#__PURE__*/base_default()("div", true ? {
|
|
|
10659
10660
|
}) => isCalendarFirstDateSelected ? '0' : 'auto', ";z-index:-1;background:", ({
|
|
10660
10661
|
theme
|
|
10661
10662
|
}) => theme.colors.blueRoyal16, ";}}" + ( true ? "" : 0));
|
|
10663
|
+
const TriggerWrapper = /*#__PURE__*/base_default()(Wrapper_Wrapper, true ? {
|
|
10664
|
+
target: "e19l41fq0"
|
|
10665
|
+
} : 0)( true ? {
|
|
10666
|
+
name: "1utaypi",
|
|
10667
|
+
styles: "padding:14px"
|
|
10668
|
+
} : 0);
|
|
10662
10669
|
;// ./src/components/DateRangePicker/utils/dates.ts
|
|
10663
10670
|
|
|
10664
10671
|
const dates_getDaysForCalendarMonth = date => {
|
|
@@ -11384,7 +11391,7 @@ const FieldLabel = ({
|
|
|
11384
11391
|
|
|
11385
11392
|
const FieldControlBase = /*#__PURE__*/base_default()("div", true ? {
|
|
11386
11393
|
target: "e1lr2tz0"
|
|
11387
|
-
} : 0)("display:flex;align-items:center;min-height:44px;height:auto;border-radius:
|
|
11394
|
+
} : 0)("display:flex;align-items:center;min-height:44px;height:auto;border-radius:16px;overflow:hidden;border:1px solid ", ({
|
|
11388
11395
|
status,
|
|
11389
11396
|
theme
|
|
11390
11397
|
}) => {
|
|
@@ -11577,6 +11584,7 @@ const TriggerInput = ({
|
|
|
11577
11584
|
disabled: disabled,
|
|
11578
11585
|
register: register,
|
|
11579
11586
|
className: className,
|
|
11587
|
+
wrapperClassName: /*#__PURE__*/(0,css_namespaceObject.css)("display:flex;padding-left:", datepickerType === 'from' ? 0 : 14, "px;" + ( true ? "" : 0), true ? "" : 0),
|
|
11580
11588
|
inputProps: {
|
|
11581
11589
|
onBlur: handleBlur,
|
|
11582
11590
|
onClick: handleOpen,
|
|
@@ -11585,8 +11593,8 @@ const TriggerInput = ({
|
|
|
11585
11593
|
'data-testid': `daterangepicker-input-${datepickerType}`,
|
|
11586
11594
|
autoComplete: 'off',
|
|
11587
11595
|
className: [/*#__PURE__*/(0,css_namespaceObject.css)( true ? {
|
|
11588
|
-
name: "
|
|
11589
|
-
styles: "border:none!important"
|
|
11596
|
+
name: "15obm9d",
|
|
11597
|
+
styles: "border:none!important;height:auto!important;padding:0!important;min-width:75px;line-height:16px;max-height:16px;letter-spacing:0.8px;border-radius:0!important;&::placeholder{letter-spacing:normal;}"
|
|
11590
11598
|
} : 0), datepickerType === 'from' ? classNames?.trigger?.inputFrom : classNames?.trigger?.inputTo].filter(Boolean).join(' '),
|
|
11591
11599
|
...inputElementProps
|
|
11592
11600
|
},
|
|
@@ -11613,9 +11621,10 @@ function Trigger_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to st
|
|
|
11613
11621
|
|
|
11614
11622
|
|
|
11615
11623
|
|
|
11624
|
+
|
|
11616
11625
|
var Trigger_ref = true ? {
|
|
11617
|
-
name: "
|
|
11618
|
-
styles: "margin:0
|
|
11626
|
+
name: "1ldd2k6",
|
|
11627
|
+
styles: "margin:0 3px"
|
|
11619
11628
|
} : 0;
|
|
11620
11629
|
var Trigger_ref2 = true ? {
|
|
11621
11630
|
name: "ud49p1",
|
|
@@ -11662,7 +11671,7 @@ const Trigger = () => {
|
|
|
11662
11671
|
className: classNames?.label,
|
|
11663
11672
|
children: label
|
|
11664
11673
|
}), (0,jsx_runtime_namespaceObject.jsx)(FieldControl, {
|
|
11665
|
-
children: (0,jsx_runtime_namespaceObject.jsxs)(
|
|
11674
|
+
children: (0,jsx_runtime_namespaceObject.jsxs)(TriggerWrapper, {
|
|
11666
11675
|
ref: wrapperRef,
|
|
11667
11676
|
className: classNames?.trigger?.controlsWrapper,
|
|
11668
11677
|
children: [(0,jsx_runtime_namespaceObject.jsx)(TriggerInput, {
|
|
@@ -11676,8 +11685,8 @@ const Trigger = () => {
|
|
|
11676
11685
|
}
|
|
11677
11686
|
}), (0,jsx_runtime_namespaceObject.jsx)(Icon_Icon, {
|
|
11678
11687
|
name: "carrot-right",
|
|
11679
|
-
size:
|
|
11680
|
-
color: theme.colors.
|
|
11688
|
+
size: 16,
|
|
11689
|
+
color: disabled ? theme.colors.grey : theme.colors.greyDarker,
|
|
11681
11690
|
className: classNames?.trigger?.arrowIcon,
|
|
11682
11691
|
css: Trigger_ref
|
|
11683
11692
|
}), (0,jsx_runtime_namespaceObject.jsx)(TriggerInput, {
|
|
@@ -11702,7 +11711,8 @@ const Trigger = () => {
|
|
|
11702
11711
|
className: classNames?.trigger?.calendarIcon,
|
|
11703
11712
|
css: /*#__PURE__*/(0,react_namespaceObject.css)({
|
|
11704
11713
|
padding: 0,
|
|
11705
|
-
margin: '0
|
|
11714
|
+
margin: '0 0 0 10px',
|
|
11715
|
+
height: 'auto',
|
|
11706
11716
|
cursor: openCalendarMode === 'input' || disabled ? 'default' : 'pointer',
|
|
11707
11717
|
'&:focus::before': {
|
|
11708
11718
|
display: 'none'
|
|
@@ -17209,7 +17219,7 @@ const SearchBoxWrapper = /*#__PURE__*/base_default()("div", true ? {
|
|
|
17209
17219
|
|
|
17210
17220
|
const SearchBoxInput = /*#__PURE__*/base_default()(Input_Input, true ? {
|
|
17211
17221
|
target: "e1kaxfzq0"
|
|
17212
|
-
} : 0)("height:30px;font-size:12px;border-radius:
|
|
17222
|
+
} : 0)("height:30px;font-size:12px;border-radius:12px;background-color:", ({
|
|
17213
17223
|
theme
|
|
17214
17224
|
}) => theme.colors.greyLighter, ";border:1px solid #dee0e8;color:", ({
|
|
17215
17225
|
theme
|
|
@@ -17627,6 +17637,7 @@ const useTypeahead = ({
|
|
|
17627
17637
|
} = (0,hooks_namespaceObject.useElementSize)();
|
|
17628
17638
|
const triggerRef = (0,external_react_namespaceObject.useRef)(null);
|
|
17629
17639
|
(0,external_react_hook_form_namespaceObject.useController)({
|
|
17640
|
+
control: form.control,
|
|
17630
17641
|
name,
|
|
17631
17642
|
rules: validationSchema,
|
|
17632
17643
|
defaultValue: isMultiple ? selectedItems : selectedItems[0]
|
|
@@ -17641,6 +17652,18 @@ const useTypeahead = ({
|
|
|
17641
17652
|
});
|
|
17642
17653
|
return opts;
|
|
17643
17654
|
}, [children]);
|
|
17655
|
+
(0,external_react_namespaceObject.useEffect)(() => {
|
|
17656
|
+
const validSelected = selectedItems.filter(item => optionsWithKey[item]);
|
|
17657
|
+
if (validSelected.length !== selectedItems.length) {
|
|
17658
|
+
setSelected(validSelected);
|
|
17659
|
+
const fieldValue = isMultiple ? validSelected : undefined;
|
|
17660
|
+
setValue?.(name, fieldValue);
|
|
17661
|
+
setRawInput(null);
|
|
17662
|
+
form.clearErrors(name);
|
|
17663
|
+
form.trigger(name);
|
|
17664
|
+
onEmptyChange?.(validSelected.length === 0);
|
|
17665
|
+
}
|
|
17666
|
+
}, [optionsWithKey, selectedItems]);
|
|
17644
17667
|
const inputValue = (0,external_react_namespaceObject.useMemo)(() => {
|
|
17645
17668
|
if (isMultiple) return rawInput ?? '';
|
|
17646
17669
|
if (rawInput != null) return rawInput;
|
|
@@ -17925,7 +17948,7 @@ const TypeaheadInputsGroupWrapper = /*#__PURE__*/base_default()(Wrapper_Wrapper,
|
|
|
17925
17948
|
}) => isOpen ? '50px' : 'auto', ";flex-direction:column!important;" + ( true ? "" : 0));
|
|
17926
17949
|
const TypeaheadTrigger = /*#__PURE__*/base_default()(PopoverTrigger, true ? {
|
|
17927
17950
|
target: "e1vig1dw0"
|
|
17928
|
-
} : 0)("position:relative;border-radius:
|
|
17951
|
+
} : 0)("position:relative;border-radius:12px;border:1px solid ", ({
|
|
17929
17952
|
status,
|
|
17930
17953
|
theme
|
|
17931
17954
|
}) => status === 'basic' ? theme.colors.grey : status === 'error' ? theme.colors.red : theme.colors.greenLighter, ";min-height:44px;height:auto;background:#fff;gap:8px;padding:5px 28px 5px 8px;width:100%;flex-wrap:wrap;border-color:", ({
|