@ssa-ui-kit/core 2.19.1 → 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
@@ -12255,8 +12255,6 @@ const ColorPickerTrigger = () => {
12255
12255
  })
12256
12256
  });
12257
12257
  };
12258
- ;// external "@rc-component/color-picker/assets/index.css"
12259
- const index_css_namespaceObject = require("@rc-component/color-picker/assets/index.css");
12260
12258
  ;// ./src/components/ColorPicker/ColorPicker.tsx
12261
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)."; }
12262
12260
 
@@ -12269,10 +12267,6 @@ function ColorPicker_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried t
12269
12267
 
12270
12268
 
12271
12269
  var ColorPicker_ref = true ? {
12272
- name: "dl37cv",
12273
- 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)"
12274
- } : 0;
12275
- var ColorPicker_ref2 = true ? {
12276
12270
  name: "xyzkeb",
12277
12271
  styles: "align-self:flex-start"
12278
12272
  } : 0;
@@ -12282,6 +12276,7 @@ const ColorPicker = ({
12282
12276
  colorsPalette = COLORS_PALETTE,
12283
12277
  ...rest
12284
12278
  }) => {
12279
+ const theme = (0,react_namespaceObject.useTheme)();
12285
12280
  const tabsConfig = {
12286
12281
  colorPalette: {
12287
12282
  tabId: 'color-palette',
@@ -12310,10 +12305,17 @@ const ColorPicker = ({
12310
12305
  interactionsEnabled: 'click',
12311
12306
  placement: 'top-start',
12312
12307
  children: [(0,jsx_runtime_namespaceObject.jsx)(ColorPickerTrigger, {}), (0,jsx_runtime_namespaceObject.jsxs)(PopoverContent, {
12313
- css: ColorPicker_ref,
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),
12314
12316
  className: rest.classnames?.content,
12315
12317
  children: [(0,jsx_runtime_namespaceObject.jsxs)(TabBar_TabBar, {
12316
- css: ColorPicker_ref2,
12318
+ css: ColorPicker_ref,
12317
12319
  children: [(0,jsx_runtime_namespaceObject.jsx)(Tab_Tab, {
12318
12320
  ...tabsConfig.colorPalette
12319
12321
  }), (0,jsx_runtime_namespaceObject.jsx)(Tab_Tab, {
@@ -13170,6 +13172,7 @@ const DatePickerMonthsSwitch = () => {
13170
13172
  calendarViewDateTime,
13171
13173
  dateMinDT,
13172
13174
  dateMaxDT,
13175
+ classNames,
13173
13176
  setCalendarViewDateTime,
13174
13177
  onMonthChange
13175
13178
  } = useDatePickerContext();
@@ -13200,6 +13203,7 @@ const DatePickerMonthsSwitch = () => {
13200
13203
  }
13201
13204
  return (0,jsx_runtime_namespaceObject.jsxs)(Wrapper_Wrapper, {
13202
13205
  css: DatePickerMonthsSwitch_ref,
13206
+ className: classNames?.monthsSwitch?.wrapper,
13203
13207
  children: [(0,jsx_runtime_namespaceObject.jsx)(Button_Button, {
13204
13208
  endIcon: (0,jsx_runtime_namespaceObject.jsx)(Icon_Icon, {
13205
13209
  name: "carrot-left",
@@ -13207,6 +13211,7 @@ const DatePickerMonthsSwitch = () => {
13207
13211
  tooltip: "Previous month",
13208
13212
  color: isMinMonthReached ? theme.colors.grey : theme.colors.greyDarker
13209
13213
  }),
13214
+ className: classNames?.monthsSwitch?.previousMonth,
13210
13215
  variant: 'tertiary',
13211
13216
  "aria-label": "Previous month",
13212
13217
  "data-testid": "previous-month",
@@ -13227,6 +13232,7 @@ const DatePickerMonthsSwitch = () => {
13227
13232
  tooltip: "Next month",
13228
13233
  color: isMaxMonthReached ? theme.colors.grey : theme.colors.greyDarker
13229
13234
  }),
13235
+ className: classNames?.monthsSwitch?.nextMonth,
13230
13236
  variant: 'tertiary',
13231
13237
  onClick: handleNextMonth,
13232
13238
  isDisabled: isMaxMonthReached,
@@ -13261,7 +13267,8 @@ const DatePickerHeader = () => {
13261
13267
  const {
13262
13268
  calendarType,
13263
13269
  setCalendarType,
13264
- calendarViewDateTime
13270
+ calendarViewDateTime,
13271
+ classNames
13265
13272
  } = useDatePickerContext();
13266
13273
  const handleCalendarTypeChange = () => {
13267
13274
  if (calendarType === 'days') {
@@ -13272,6 +13279,7 @@ const DatePickerHeader = () => {
13272
13279
  };
13273
13280
  return (0,jsx_runtime_namespaceObject.jsxs)(PopoverHeading, {
13274
13281
  css: DatePickerHeader_ref,
13282
+ className: classNames?.header,
13275
13283
  as: 'div',
13276
13284
  children: [(0,jsx_runtime_namespaceObject.jsx)(Button_Button, {
13277
13285
  endIcon: (0,jsx_runtime_namespaceObject.jsx)(Icon_Icon, {
@@ -13306,11 +13314,12 @@ const DatePickerCalendar = () => {
13306
13314
  years: YearsView
13307
13315
  };
13308
13316
  const {
13309
- calendarType
13317
+ calendarType,
13318
+ classNames
13310
13319
  } = useDatePickerContext();
13311
13320
  const Component = components[calendarType];
13312
13321
  return (0,jsx_runtime_namespaceObject.jsxs)(PopoverContent, {
13313
- className: "popover",
13322
+ className: ['popover', classNames?.calendar].filter(Boolean).join(' '),
13314
13323
  css: /*#__PURE__*/(0,react_namespaceObject.css)({
13315
13324
  background: theme.colors.white,
13316
13325
  boxShadow: `-4px 4px 14px 0px ${theme.colors.greyDarker14}`,
@@ -13344,6 +13353,7 @@ const DatePickerTrigger = () => {
13344
13353
  format,
13345
13354
  name,
13346
13355
  label,
13356
+ classNames,
13347
13357
  openCalendarMode,
13348
13358
  inputRef,
13349
13359
  inputProps,
@@ -13384,6 +13394,7 @@ const DatePickerTrigger = () => {
13384
13394
  return (0,jsx_runtime_namespaceObject.jsxs)((external_react_default()).Fragment, {
13385
13395
  children: [label && (0,jsx_runtime_namespaceObject.jsx)(Label_Label, {
13386
13396
  htmlFor: name,
13397
+ className: classNames?.label,
13387
13398
  children: label
13388
13399
  }), (0,jsx_runtime_namespaceObject.jsx)(PopoverTrigger, {
13389
13400
  asChild: true,
@@ -13392,6 +13403,7 @@ const DatePickerTrigger = () => {
13392
13403
  placeholder: format,
13393
13404
  ref: inputRef,
13394
13405
  disabled: disabled,
13406
+ className: classNames?.trigger?.input,
13395
13407
  register: register,
13396
13408
  inputProps: {
13397
13409
  onBlur: handleBlur,
@@ -13419,6 +13431,7 @@ const DatePickerTrigger = () => {
13419
13431
  variant: "tertiary",
13420
13432
  "aria-label": "Calendar",
13421
13433
  isDisabled: disabled,
13434
+ className: classNames?.trigger?.calendarIcon,
13422
13435
  css: /*#__PURE__*/(0,react_namespaceObject.css)({
13423
13436
  padding: 0,
13424
13437
  cursor: openCalendarMode === 'input' || disabled ? 'default' : 'pointer',
@@ -18461,7 +18474,7 @@ const TypeaheadOptionsBase = /*#__PURE__*/base_default()("ul", true ? {
18461
18474
  }) => `drop-shadow(-4px 4px 14px ${theme.colors.greyDarker14})`, ";overflow-y:auto;max-height:350px;" + ( true ? "" : 0));
18462
18475
  const TypeaheadOption = /*#__PURE__*/base_default()("li", true ? {
18463
18476
  target: "e1vig1dw5"
18464
- } : 0)("display:flex;align-items:center;padding:8px 16px;border:none;cursor:pointer;font-size:14px;gap:8px;padding:12px;height:40px;background:", ({
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:", ({
18465
18478
  isActive,
18466
18479
  theme
18467
18480
  }) => isActive ? theme.colors.blueRoyal12 : 'none', ";&:hover{background:rgba(72, 125, 225, 0.06);}" + ( true ? "" : 0));
@@ -18484,16 +18497,16 @@ const TypeaheadItem = /*#__PURE__*/base_default()("div", true ? {
18484
18497
  }) => theme.colors.grey, ";color:", ({
18485
18498
  theme,
18486
18499
  isDisabled
18487
- }) => isDisabled ? theme.colors.grey : theme.colors.greyDarker, ";font-weight:500;font-size:14px;height:32px;align-items:center;padding:6px;user-select:none;" + ( true ? "" : 0));
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));
18488
18501
  const TypeaheadItemLabel = /*#__PURE__*/base_default()("div", true ? {
18489
18502
  target: "e1vig1dw3"
18490
18503
  } : 0)("color:", ({
18491
18504
  theme,
18492
18505
  isDisabled
18493
- }) => isDisabled ? theme.colors.grey : theme.colors.greyDarker, ";font-size:14px;font-weight:500;display:flex;gap:6px;align-items:center;cursor:default;" + ( true ? "" : 0));
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));
18494
18507
  const TypeaheadItemCross = /*#__PURE__*/base_default()(Button_Button, true ? {
18495
18508
  target: "e1vig1dw2"
18496
- } : 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:", ({
18497
18510
  isDisabled
18498
18511
  }) => isDisabled ? 'default' : 'pointer', ";background:none;box-shadow:none;}&:disabled{background:none;}" + ( true ? "" : 0));
18499
18512
  const TypeaheadInputsGroupWrapper = /*#__PURE__*/base_default()(Wrapper_Wrapper, true ? {
@@ -18869,19 +18882,35 @@ function TypeaheadOption_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tri
18869
18882
 
18870
18883
 
18871
18884
 
18885
+
18872
18886
  var TypeaheadOption_ref = true ? {
18873
- name: "1o3nkn",
18874
- styles: "margin-left:auto"
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"
18875
18897
  } : 0;
18876
18898
  const TypeaheadOption_TypeaheadOption = ({
18877
18899
  children,
18878
18900
  ...rest
18879
18901
  }) => (0,jsx_runtime_namespaceObject.jsxs)(TypeaheadOption, {
18880
18902
  ...rest,
18881
- children: [children, ' ', rest.isActive && (0,jsx_runtime_namespaceObject.jsx)(Icon_Icon, {
18882
- name: "check",
18883
- size: 10,
18884
- css: TypeaheadOption_ref
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
+ })
18885
18914
  })]
18886
18915
  });
18887
18916
  ;// ./src/components/Typeahead/components/TypeaheadItem.ts
@@ -18897,8 +18926,8 @@ const TypeaheadItemImage = /*#__PURE__*/base_default()("img", true ? {
18897
18926
  const TypeaheadItemIcon = /*#__PURE__*/base_default()(Icon_Icon, true ? {
18898
18927
  target: "e1rxxx7l0"
18899
18928
  } : 0)( true ? {
18900
- name: "1hziu2d",
18901
- 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"
18902
18931
  } : 0);
18903
18932
  ;// ./src/components/Typeahead/utils.tsx
18904
18933