@ssa-ui-kit/core 2.19.0 → 2.19.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.
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
import { ColorPickerProps } from './types';
|
|
2
|
-
import '@rc-component/color-picker/assets/index.css';
|
|
3
2
|
export declare const ColorPicker: ({ color: providedColor, format: providedFormat, colorsPalette, ...rest }: ColorPickerProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -22,6 +22,20 @@ export type DatePickerProps = {
|
|
|
22
22
|
mode: 'dateFrom' | 'dateTo';
|
|
23
23
|
otherDate: Date | null;
|
|
24
24
|
};
|
|
25
|
+
classNames?: {
|
|
26
|
+
header?: string;
|
|
27
|
+
trigger?: {
|
|
28
|
+
input?: string;
|
|
29
|
+
calendarIcon?: string;
|
|
30
|
+
};
|
|
31
|
+
monthsSwitch?: {
|
|
32
|
+
wrapper?: string;
|
|
33
|
+
previousMonth?: string;
|
|
34
|
+
nextMonth?: string;
|
|
35
|
+
};
|
|
36
|
+
calendar?: string;
|
|
37
|
+
label?: string;
|
|
38
|
+
};
|
|
25
39
|
onChange?: (date?: Date) => void;
|
|
26
40
|
onOpen?: () => void;
|
|
27
41
|
onClose?: () => void;
|
package/dist/index.js
CHANGED
|
@@ -8175,12 +8175,13 @@ const AddNewAccountCard = ({
|
|
|
8175
8175
|
|
|
8176
8176
|
;// ./src/components/ButtonGroup/styles.ts
|
|
8177
8177
|
|
|
8178
|
-
const ButtonItem = theme => /*#__PURE__*/(0,react_namespaceObject.css)("justify-content:center;min-width:40px;height:auto;padding:8px;text-align:center;letter-spacing:0em;border-radius:0;box-shadow:none;user-select:none
|
|
8178
|
+
const ButtonItem = theme => /*#__PURE__*/(0,react_namespaceObject.css)("justify-content:center;min-width:40px;height:auto;padding:8px;text-align:center;letter-spacing:0em;border-radius:0;box-shadow:none;user-select:none;&:hover,&:focus,&:active{box-shadow:none;}&:first-of-type{border-radius:6px 0 0 6px;}&:last-child{border-radius:0 6px 6px 0;}&:not(:last-child){margin-right:1px;}&.active{background:", theme.colors.greyFocused, ";}&:disabled{background:", theme.colors.grey, ";p{color:", theme.colors.grey40, ";}}", theme.mediaQueries.md, "{min-width:65px;padding:12px;p{font-size:13.3px;line-height:15px;}}" + ( true ? "" : 0), true ? "" : 0);
|
|
8179
8179
|
;// ./src/components/ButtonGroup/ButtonGroup.tsx
|
|
8180
8180
|
|
|
8181
8181
|
|
|
8182
8182
|
|
|
8183
8183
|
|
|
8184
|
+
|
|
8184
8185
|
const ButtonGroup = ({
|
|
8185
8186
|
items,
|
|
8186
8187
|
buttonStyles,
|
|
@@ -8208,7 +8209,10 @@ const ButtonGroup = ({
|
|
|
8208
8209
|
onClick: handleClick(item),
|
|
8209
8210
|
css: [ButtonItem, buttonStyles, true ? "" : 0, true ? "" : 0],
|
|
8210
8211
|
className: isActive ? 'active' : '',
|
|
8211
|
-
children:
|
|
8212
|
+
children: (0,jsx_runtime_namespaceObject.jsx)(Typography_Typography, {
|
|
8213
|
+
variant: "body1",
|
|
8214
|
+
children: item.text
|
|
8215
|
+
})
|
|
8212
8216
|
}, item.id);
|
|
8213
8217
|
})
|
|
8214
8218
|
});
|
|
@@ -12251,8 +12255,6 @@ const ColorPickerTrigger = () => {
|
|
|
12251
12255
|
})
|
|
12252
12256
|
});
|
|
12253
12257
|
};
|
|
12254
|
-
;// external "@rc-component/color-picker/assets/index.css"
|
|
12255
|
-
const index_css_namespaceObject = require("@rc-component/color-picker/assets/index.css");
|
|
12256
12258
|
;// ./src/components/ColorPicker/ColorPicker.tsx
|
|
12257
12259
|
function ColorPicker_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)."; }
|
|
12258
12260
|
|
|
@@ -12265,10 +12267,6 @@ function ColorPicker_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried t
|
|
|
12265
12267
|
|
|
12266
12268
|
|
|
12267
12269
|
var ColorPicker_ref = true ? {
|
|
12268
|
-
name: "dl37cv",
|
|
12269
|
-
styles: "gap:16px;padding:16px;border-radius:8px;box-shadow:0px 3px 6px -4px rgba(0, 0, 0, 0.12), 0px 6px 16px 0px rgba(0, 0, 0, 0.08), 0px 9px 28px 8px rgba(0, 0, 0, 0.05)"
|
|
12270
|
-
} : 0;
|
|
12271
|
-
var ColorPicker_ref2 = true ? {
|
|
12272
12270
|
name: "xyzkeb",
|
|
12273
12271
|
styles: "align-self:flex-start"
|
|
12274
12272
|
} : 0;
|
|
@@ -12278,6 +12276,7 @@ const ColorPicker = ({
|
|
|
12278
12276
|
colorsPalette = COLORS_PALETTE,
|
|
12279
12277
|
...rest
|
|
12280
12278
|
}) => {
|
|
12279
|
+
const theme = (0,react_namespaceObject.useTheme)();
|
|
12281
12280
|
const tabsConfig = {
|
|
12282
12281
|
colorPalette: {
|
|
12283
12282
|
tabId: 'color-palette',
|
|
@@ -12306,10 +12305,17 @@ const ColorPicker = ({
|
|
|
12306
12305
|
interactionsEnabled: 'click',
|
|
12307
12306
|
placement: 'top-start',
|
|
12308
12307
|
children: [(0,jsx_runtime_namespaceObject.jsx)(ColorPickerTrigger, {}), (0,jsx_runtime_namespaceObject.jsxs)(PopoverContent, {
|
|
12309
|
-
css:
|
|
12308
|
+
css: /*#__PURE__*/(0,react_namespaceObject.css)({
|
|
12309
|
+
gap: 16,
|
|
12310
|
+
padding: 16,
|
|
12311
|
+
borderRadius: 8,
|
|
12312
|
+
backgroundColor: theme.colors.white,
|
|
12313
|
+
zIndex: 10,
|
|
12314
|
+
boxShadow: '0px 3px 6px -4px rgba(0, 0, 0, 0.12), 0px 6px 16px 0px rgba(0, 0, 0, 0.08), 0px 9px 28px 8px rgba(0, 0, 0, 0.05)'
|
|
12315
|
+
}, true ? "" : 0, true ? "" : 0),
|
|
12310
12316
|
className: rest.classnames?.content,
|
|
12311
12317
|
children: [(0,jsx_runtime_namespaceObject.jsxs)(TabBar_TabBar, {
|
|
12312
|
-
css:
|
|
12318
|
+
css: ColorPicker_ref,
|
|
12313
12319
|
children: [(0,jsx_runtime_namespaceObject.jsx)(Tab_Tab, {
|
|
12314
12320
|
...tabsConfig.colorPalette
|
|
12315
12321
|
}), (0,jsx_runtime_namespaceObject.jsx)(Tab_Tab, {
|
|
@@ -13166,6 +13172,7 @@ const DatePickerMonthsSwitch = () => {
|
|
|
13166
13172
|
calendarViewDateTime,
|
|
13167
13173
|
dateMinDT,
|
|
13168
13174
|
dateMaxDT,
|
|
13175
|
+
classNames,
|
|
13169
13176
|
setCalendarViewDateTime,
|
|
13170
13177
|
onMonthChange
|
|
13171
13178
|
} = useDatePickerContext();
|
|
@@ -13196,6 +13203,7 @@ const DatePickerMonthsSwitch = () => {
|
|
|
13196
13203
|
}
|
|
13197
13204
|
return (0,jsx_runtime_namespaceObject.jsxs)(Wrapper_Wrapper, {
|
|
13198
13205
|
css: DatePickerMonthsSwitch_ref,
|
|
13206
|
+
className: classNames?.monthsSwitch?.wrapper,
|
|
13199
13207
|
children: [(0,jsx_runtime_namespaceObject.jsx)(Button_Button, {
|
|
13200
13208
|
endIcon: (0,jsx_runtime_namespaceObject.jsx)(Icon_Icon, {
|
|
13201
13209
|
name: "carrot-left",
|
|
@@ -13203,6 +13211,7 @@ const DatePickerMonthsSwitch = () => {
|
|
|
13203
13211
|
tooltip: "Previous month",
|
|
13204
13212
|
color: isMinMonthReached ? theme.colors.grey : theme.colors.greyDarker
|
|
13205
13213
|
}),
|
|
13214
|
+
className: classNames?.monthsSwitch?.previousMonth,
|
|
13206
13215
|
variant: 'tertiary',
|
|
13207
13216
|
"aria-label": "Previous month",
|
|
13208
13217
|
"data-testid": "previous-month",
|
|
@@ -13223,6 +13232,7 @@ const DatePickerMonthsSwitch = () => {
|
|
|
13223
13232
|
tooltip: "Next month",
|
|
13224
13233
|
color: isMaxMonthReached ? theme.colors.grey : theme.colors.greyDarker
|
|
13225
13234
|
}),
|
|
13235
|
+
className: classNames?.monthsSwitch?.nextMonth,
|
|
13226
13236
|
variant: 'tertiary',
|
|
13227
13237
|
onClick: handleNextMonth,
|
|
13228
13238
|
isDisabled: isMaxMonthReached,
|
|
@@ -13257,7 +13267,8 @@ const DatePickerHeader = () => {
|
|
|
13257
13267
|
const {
|
|
13258
13268
|
calendarType,
|
|
13259
13269
|
setCalendarType,
|
|
13260
|
-
calendarViewDateTime
|
|
13270
|
+
calendarViewDateTime,
|
|
13271
|
+
classNames
|
|
13261
13272
|
} = useDatePickerContext();
|
|
13262
13273
|
const handleCalendarTypeChange = () => {
|
|
13263
13274
|
if (calendarType === 'days') {
|
|
@@ -13268,6 +13279,7 @@ const DatePickerHeader = () => {
|
|
|
13268
13279
|
};
|
|
13269
13280
|
return (0,jsx_runtime_namespaceObject.jsxs)(PopoverHeading, {
|
|
13270
13281
|
css: DatePickerHeader_ref,
|
|
13282
|
+
className: classNames?.header,
|
|
13271
13283
|
as: 'div',
|
|
13272
13284
|
children: [(0,jsx_runtime_namespaceObject.jsx)(Button_Button, {
|
|
13273
13285
|
endIcon: (0,jsx_runtime_namespaceObject.jsx)(Icon_Icon, {
|
|
@@ -13302,11 +13314,12 @@ const DatePickerCalendar = () => {
|
|
|
13302
13314
|
years: YearsView
|
|
13303
13315
|
};
|
|
13304
13316
|
const {
|
|
13305
|
-
calendarType
|
|
13317
|
+
calendarType,
|
|
13318
|
+
classNames
|
|
13306
13319
|
} = useDatePickerContext();
|
|
13307
13320
|
const Component = components[calendarType];
|
|
13308
13321
|
return (0,jsx_runtime_namespaceObject.jsxs)(PopoverContent, {
|
|
13309
|
-
className:
|
|
13322
|
+
className: ['popover', classNames?.calendar].filter(Boolean).join(' '),
|
|
13310
13323
|
css: /*#__PURE__*/(0,react_namespaceObject.css)({
|
|
13311
13324
|
background: theme.colors.white,
|
|
13312
13325
|
boxShadow: `-4px 4px 14px 0px ${theme.colors.greyDarker14}`,
|
|
@@ -13340,6 +13353,7 @@ const DatePickerTrigger = () => {
|
|
|
13340
13353
|
format,
|
|
13341
13354
|
name,
|
|
13342
13355
|
label,
|
|
13356
|
+
classNames,
|
|
13343
13357
|
openCalendarMode,
|
|
13344
13358
|
inputRef,
|
|
13345
13359
|
inputProps,
|
|
@@ -13380,6 +13394,7 @@ const DatePickerTrigger = () => {
|
|
|
13380
13394
|
return (0,jsx_runtime_namespaceObject.jsxs)((external_react_default()).Fragment, {
|
|
13381
13395
|
children: [label && (0,jsx_runtime_namespaceObject.jsx)(Label_Label, {
|
|
13382
13396
|
htmlFor: name,
|
|
13397
|
+
className: classNames?.label,
|
|
13383
13398
|
children: label
|
|
13384
13399
|
}), (0,jsx_runtime_namespaceObject.jsx)(PopoverTrigger, {
|
|
13385
13400
|
asChild: true,
|
|
@@ -13388,6 +13403,7 @@ const DatePickerTrigger = () => {
|
|
|
13388
13403
|
placeholder: format,
|
|
13389
13404
|
ref: inputRef,
|
|
13390
13405
|
disabled: disabled,
|
|
13406
|
+
className: classNames?.trigger?.input,
|
|
13391
13407
|
register: register,
|
|
13392
13408
|
inputProps: {
|
|
13393
13409
|
onBlur: handleBlur,
|
|
@@ -13415,6 +13431,7 @@ const DatePickerTrigger = () => {
|
|
|
13415
13431
|
variant: "tertiary",
|
|
13416
13432
|
"aria-label": "Calendar",
|
|
13417
13433
|
isDisabled: disabled,
|
|
13434
|
+
className: classNames?.trigger?.calendarIcon,
|
|
13418
13435
|
css: /*#__PURE__*/(0,react_namespaceObject.css)({
|
|
13419
13436
|
padding: 0,
|
|
13420
13437
|
cursor: openCalendarMode === 'input' || disabled ? 'default' : 'pointer',
|
|
@@ -18457,7 +18474,7 @@ const TypeaheadOptionsBase = /*#__PURE__*/base_default()("ul", true ? {
|
|
|
18457
18474
|
}) => `drop-shadow(-4px 4px 14px ${theme.colors.greyDarker14})`, ";overflow-y:auto;max-height:350px;" + ( true ? "" : 0));
|
|
18458
18475
|
const TypeaheadOption = /*#__PURE__*/base_default()("li", true ? {
|
|
18459
18476
|
target: "e1vig1dw5"
|
|
18460
|
-
} : 0)("display:flex;align-items:center;padding:
|
|
18477
|
+
} : 0)("display:flex;align-items:center;padding:0 16px;border:none;cursor:pointer;font-size:14px;gap:8px;padding:10px 12px;min-height:40px;line-height:20px;justify-content:space-between;overflow:hidden;text-overflow:ellipsis;background:", ({
|
|
18461
18478
|
isActive,
|
|
18462
18479
|
theme
|
|
18463
18480
|
}) => isActive ? theme.colors.blueRoyal12 : 'none', ";&:hover{background:rgba(72, 125, 225, 0.06);}" + ( true ? "" : 0));
|
|
@@ -18480,16 +18497,16 @@ const TypeaheadItem = /*#__PURE__*/base_default()("div", true ? {
|
|
|
18480
18497
|
}) => theme.colors.grey, ";color:", ({
|
|
18481
18498
|
theme,
|
|
18482
18499
|
isDisabled
|
|
18483
|
-
}) => isDisabled ? theme.colors.grey : theme.colors.greyDarker, ";font-weight:500;font-size:14px;height:
|
|
18500
|
+
}) => isDisabled ? theme.colors.grey : theme.colors.greyDarker, ";font-weight:500;font-size:14px;min-height:20px;align-items:center;padding:6px;user-select:none;overflow:hidden;" + ( true ? "" : 0));
|
|
18484
18501
|
const TypeaheadItemLabel = /*#__PURE__*/base_default()("div", true ? {
|
|
18485
18502
|
target: "e1vig1dw3"
|
|
18486
18503
|
} : 0)("color:", ({
|
|
18487
18504
|
theme,
|
|
18488
18505
|
isDisabled
|
|
18489
|
-
}) => isDisabled ? theme.colors.grey : theme.colors.greyDarker, ";font-size:14px;font-weight:500;display:
|
|
18506
|
+
}) => isDisabled ? theme.colors.grey : theme.colors.greyDarker, ";font-size:14px;font-weight:500;display:block;gap:6px;align-items:center;cursor:default;overflow:hidden;text-overflow:ellipsis;" + ( true ? "" : 0));
|
|
18490
18507
|
const TypeaheadItemCross = /*#__PURE__*/base_default()(Button_Button, true ? {
|
|
18491
18508
|
target: "e1vig1dw2"
|
|
18492
|
-
} : 0)("background:none;padding:0;padding-right:5;&:active,&:focus,&:hover{cursor:", ({
|
|
18509
|
+
} : 0)("background:none;padding:0;padding-right:5;height:auto;&:active,&:focus,&:hover{cursor:", ({
|
|
18493
18510
|
isDisabled
|
|
18494
18511
|
}) => isDisabled ? 'default' : 'pointer', ";background:none;box-shadow:none;}&:disabled{background:none;}" + ( true ? "" : 0));
|
|
18495
18512
|
const TypeaheadInputsGroupWrapper = /*#__PURE__*/base_default()(Wrapper_Wrapper, true ? {
|
|
@@ -18865,19 +18882,35 @@ function TypeaheadOption_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tri
|
|
|
18865
18882
|
|
|
18866
18883
|
|
|
18867
18884
|
|
|
18885
|
+
|
|
18868
18886
|
var TypeaheadOption_ref = true ? {
|
|
18869
|
-
name: "
|
|
18870
|
-
styles: "
|
|
18887
|
+
name: "1gz2b5f",
|
|
18888
|
+
styles: "overflow:hidden;text-overflow:ellipsis"
|
|
18889
|
+
} : 0;
|
|
18890
|
+
var TypeaheadOption_ref2 = true ? {
|
|
18891
|
+
name: "1kqn2f4",
|
|
18892
|
+
styles: "height:auto;padding:0"
|
|
18893
|
+
} : 0;
|
|
18894
|
+
var TypeaheadOption_ref3 = true ? {
|
|
18895
|
+
name: "abxjv3",
|
|
18896
|
+
styles: "margin-left:auto;min-width:10px"
|
|
18871
18897
|
} : 0;
|
|
18872
18898
|
const TypeaheadOption_TypeaheadOption = ({
|
|
18873
18899
|
children,
|
|
18874
18900
|
...rest
|
|
18875
18901
|
}) => (0,jsx_runtime_namespaceObject.jsxs)(TypeaheadOption, {
|
|
18876
18902
|
...rest,
|
|
18877
|
-
children: [
|
|
18878
|
-
|
|
18879
|
-
|
|
18880
|
-
|
|
18903
|
+
children: [(0,jsx_runtime_namespaceObject.jsxs)("div", {
|
|
18904
|
+
css: TypeaheadOption_ref,
|
|
18905
|
+
children: [children, ' ']
|
|
18906
|
+
}), rest.isActive && (0,jsx_runtime_namespaceObject.jsx)(Button_Button, {
|
|
18907
|
+
variant: "tertiary",
|
|
18908
|
+
css: TypeaheadOption_ref2,
|
|
18909
|
+
startIcon: (0,jsx_runtime_namespaceObject.jsx)(Icon_Icon, {
|
|
18910
|
+
name: "check",
|
|
18911
|
+
size: 10,
|
|
18912
|
+
css: TypeaheadOption_ref3
|
|
18913
|
+
})
|
|
18881
18914
|
})]
|
|
18882
18915
|
});
|
|
18883
18916
|
;// ./src/components/Typeahead/components/TypeaheadItem.ts
|
|
@@ -18893,8 +18926,8 @@ const TypeaheadItemImage = /*#__PURE__*/base_default()("img", true ? {
|
|
|
18893
18926
|
const TypeaheadItemIcon = /*#__PURE__*/base_default()(Icon_Icon, true ? {
|
|
18894
18927
|
target: "e1rxxx7l0"
|
|
18895
18928
|
} : 0)( true ? {
|
|
18896
|
-
name: "
|
|
18897
|
-
styles: "width:18px;height:18px;border-radius:50
|
|
18929
|
+
name: "ebppw3",
|
|
18930
|
+
styles: "width:18px;height:18px;border-radius:50%;margin-right:6px;vertical-align:middle"
|
|
18898
18931
|
} : 0);
|
|
18899
18932
|
;// ./src/components/Typeahead/utils.tsx
|
|
18900
18933
|
|