@ssa-ui-kit/core 3.3.0 → 3.5.0

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/index.js CHANGED
@@ -15239,7 +15239,7 @@ const TextareaBase = /*#__PURE__*/base_default()('textarea', true ? {
15239
15239
  status = 'basic'
15240
15240
  }) => getStatusBoxShadow(theme, status, 'rest'), ";color:", ({
15241
15241
  theme
15242
- }) => theme.colors.greyDarker, ";width:100%;min-height:114px;padding:14px;font-weight:400;font-size:0.875rem;line-height:1rem;&::placeholder{color:", ({
15242
+ }) => theme.colors.greyDarker, ";width:100%;max-width:100%;box-sizing:border-box;min-height:114px;padding:14px;font-weight:400;font-size:0.875rem;line-height:1rem;&::placeholder{color:", ({
15243
15243
  theme
15244
15244
  }) => theme.colors.greyDarker60, ";}&[readonly]{cursor:default;}&:disabled{color:", ({
15245
15245
  theme
@@ -15247,7 +15247,7 @@ const TextareaBase = /*#__PURE__*/base_default()('textarea', true ? {
15247
15247
  theme
15248
15248
  }) => `inset 0 0 1.5px 0 ${theme.colors.grey}`, ";background:", ({
15249
15249
  theme
15250
- }) => theme.colors.greyLighter, ";&::placeholder{color:", ({
15250
+ }) => theme.colors.greyLighter, ";resize:none;&::placeholder{color:", ({
15251
15251
  theme
15252
15252
  }) => theme.colors.grey, ";}}&:hover:not(:disabled, [readonly]){box-shadow:", ({
15253
15253
  theme,
@@ -15357,7 +15357,8 @@ const Textarea = /*#__PURE__*/external_react_default().forwardRef(function Texta
15357
15357
  onPaste,
15358
15358
  register,
15359
15359
  setCountChar,
15360
- status = 'basic'
15360
+ status = 'basic',
15361
+ ...rest
15361
15362
  }, ref) {
15362
15363
  (0,external_react_namespaceObject.useEffect)(() => {
15363
15364
  if (!register) {
@@ -15376,6 +15377,7 @@ const Textarea = /*#__PURE__*/external_react_default().forwardRef(function Texta
15376
15377
  onPaste: onPaste,
15377
15378
  title: title,
15378
15379
  status: status,
15380
+ ...rest,
15379
15381
  ...registerResult,
15380
15382
  onChange: (0,utils_namespaceObject.callAll)(setCountChar, onChange),
15381
15383
  ref: (0,external_floating_ui_react_namespaceObject.useMergeRefs)([registerResult?.ref, ref])
@@ -17033,7 +17035,9 @@ const DropdownContext = /*#__PURE__*/external_react_namespaceObject.createContex
17033
17035
  onChange: () => {
17034
17036
  /* noop */
17035
17037
  },
17036
- maxHeight: 200
17038
+ maxHeight: 200,
17039
+ listRef: undefined,
17040
+ placement: 'bottom'
17037
17041
  });
17038
17042
  function useDropdownContext() {
17039
17043
  return external_react_namespaceObject.useContext(DropdownContext);
@@ -17074,7 +17078,9 @@ function DropdownOptions_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tri
17074
17078
 
17075
17079
  const DropdownOptionsBase = /*#__PURE__*/base_default()("ul", true ? {
17076
17080
  target: "e1qg2z4z0"
17077
- } : 0)("position:absolute;width:100%;min-width:max-content;list-style:none;margin:4px 0 0;padding:0;background:", ({
17081
+ } : 0)("position:absolute;width:100%;min-width:max-content;list-style:none;padding:0;", ({
17082
+ placement = 'bottom'
17083
+ }) => placement === 'top' ? 'bottom: 100%; top: auto; margin: 0 0 4px;' : 'top: 100%; bottom: auto; margin: 4px 0 0;', " background:", ({
17078
17084
  theme
17079
17085
  }) => theme.colors.white, ";border-radius:8px;max-height:", ({
17080
17086
  maxHeight = 200
@@ -17102,6 +17108,11 @@ const noItemsMsg = {
17102
17108
  * Renders the scrollable list of options that appears when the dropdown is open.
17103
17109
  * Provides proper ARIA attributes for accessibility and keyboard navigation.
17104
17110
  *
17111
+ * Placement (opening upward or downward) is driven entirely by the parent
17112
+ * Dropdown via context — this component does not calculate position itself.
17113
+ * A ref is attached to the list element so Dropdown can measure its actual
17114
+ * rendered height when determining the correct placement on each open.
17115
+ *
17105
17116
  * @category Form Controls
17106
17117
  * @subcategory Selection
17107
17118
  *
@@ -17135,7 +17146,9 @@ const DropdownOptions = ({
17135
17146
  const {
17136
17147
  onChange,
17137
17148
  activeItem,
17138
- maxHeight
17149
+ maxHeight,
17150
+ listRef,
17151
+ placement
17139
17152
  } = useDropdownContext();
17140
17153
  const childrenArray = external_react_default().Children.toArray(children).filter(Boolean);
17141
17154
 
@@ -17169,11 +17182,13 @@ const DropdownOptions = ({
17169
17182
  }, noItemsMsg.id));
17170
17183
  }
17171
17184
  return (0,jsx_runtime_namespaceObject.jsx)(DropdownOptionsBase, {
17185
+ ref: listRef,
17172
17186
  role: "listbox",
17173
17187
  tabindex: "-1",
17174
17188
  id: id,
17175
17189
  "aria-labelledby": ariaLabelledby,
17176
17190
  maxHeight: maxHeight,
17191
+ placement: placement,
17177
17192
  children: options
17178
17193
  });
17179
17194
  };
@@ -17223,6 +17238,64 @@ const Avatar = /*#__PURE__*/base_default()("div", true ? {
17223
17238
  image
17224
17239
  }) => `url(${image})`, " center/contain no-repeat;" + ( true ? "" : 0));
17225
17240
  /* harmony default export */ const Avatar_Avatar = (Avatar);
17241
+ ;// ./src/components/Dropdown/types.ts
17242
+ let DropdownPositions = /*#__PURE__*/function (DropdownPositions) {
17243
+ DropdownPositions["top"] = "top";
17244
+ DropdownPositions["bottom"] = "bottom";
17245
+ DropdownPositions["auto"] = "auto";
17246
+ return DropdownPositions;
17247
+ }({});
17248
+
17249
+ /**
17250
+ * Props that are controlled by Dropdown component
17251
+ * These props cannot be passed via dropdownProps.toggleButton
17252
+ */
17253
+
17254
+ /**
17255
+ * Props for the Dropdown component
17256
+ *
17257
+ * A select-like dropdown component that allows users to choose one option from
17258
+ * a list. Uses compound component pattern with DropdownOption children.
17259
+ * Provides keyboard navigation, accessibility, customizable styling, and
17260
+ * automatic viewport-aware placement of the options list.
17261
+ *
17262
+ * @example
17263
+ * ```tsx
17264
+ * const items = [
17265
+ * { id: 1, value: 'Option 1' },
17266
+ * { id: 2, value: 'Option 2' },
17267
+ * ];
17268
+ *
17269
+ * <Dropdown
17270
+ * selectedItem={items[0]}
17271
+ * onChange={(item) => console.log(item)}
17272
+ * placeholder="Select an option"
17273
+ * >
17274
+ * {items.map(item => (
17275
+ * <DropdownOption key={item.id} value={item.id}>
17276
+ * {item.value}
17277
+ * </DropdownOption>
17278
+ * ))}
17279
+ * </Dropdown>
17280
+ * ```
17281
+ *
17282
+ * @example
17283
+ * ```tsx
17284
+ * // Force the list to always open upward (e.g. component near the bottom of the page)
17285
+ * <Dropdown
17286
+ * selectedItem={selected}
17287
+ * onChange={handleChange}
17288
+ * dropdownProps={{ dropdownPosition: DropdownPositions.top }}
17289
+ * >
17290
+ * ...
17291
+ * </Dropdown>
17292
+ * ```
17293
+ */
17294
+
17295
+ /**
17296
+ * Dropdown context value
17297
+ * Provides selection state and change handler to child DropdownOption components
17298
+ */
17226
17299
  ;// ./src/components/Dropdown/Dropdown.tsx
17227
17300
 
17228
17301
  function Dropdown_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)."; }
@@ -17235,6 +17308,7 @@ function Dropdown_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to s
17235
17308
 
17236
17309
 
17237
17310
 
17311
+
17238
17312
  const DropdownBase = /*#__PURE__*/base_default()("div", true ? {
17239
17313
  target: "eizhqtp1"
17240
17314
  } : 0)( true ? {
@@ -17253,8 +17327,13 @@ const SelectedContent = /*#__PURE__*/base_default()("span", true ? {
17253
17327
  *
17254
17328
  * A flexible dropdown component that allows users to select one option from
17255
17329
  * a list of choices. Uses a compound component pattern with DropdownOption
17256
- * children. Provides keyboard navigation, accessibility features, and click-outside
17257
- * to close functionality.
17330
+ * children. Provides keyboard navigation, accessibility features, click-outside
17331
+ * to close functionality, and automatic viewport-aware placement of the options list.
17332
+ *
17333
+ * On every open the component measures available space below the toggle button
17334
+ * and flips the list upward when there is not enough room, preventing the list
17335
+ * from being clipped by the viewport edge. This behavior can be overridden via
17336
+ * dropdownProps.dropdownPosition.
17258
17337
  *
17259
17338
  * Component structure:
17260
17339
  * - Dropdown (root container with context)
@@ -17305,14 +17384,15 @@ const SelectedContent = /*#__PURE__*/base_default()("span", true ? {
17305
17384
  *
17306
17385
  * @example
17307
17386
  * ```tsx
17308
- * // With custom props for sub-components
17387
+ * // With custom props for sub-components and forced upward placement
17309
17388
  * <Dropdown
17310
17389
  * selectedItem={selected}
17311
17390
  * onChange={handleChange}
17312
17391
  * dropdownProps={{
17313
17392
  * base: { id: 'my-dropdown' },
17314
17393
  * toggleButton: { 'data-testid': 'dropdown-toggle' },
17315
- * toggleButtonArrow: { className: 'custom-arrow' }
17394
+ * toggleButtonArrow: { className: 'custom-arrow' },
17395
+ * dropdownPosition: DropdownPositions.top,
17316
17396
  * }}
17317
17397
  * >
17318
17398
  * {options.map(opt => (
@@ -17347,14 +17427,19 @@ const Dropdown = ({
17347
17427
  maxHeight = 200,
17348
17428
  dropdownProps: componentProps
17349
17429
  }) => {
17430
+ const {
17431
+ dropdownPosition = DropdownPositions.auto
17432
+ } = componentProps ?? {};
17350
17433
  const theme = (0,react_namespaceObject.useTheme)();
17351
17434
  const dropdownRef = (0,external_react_namespaceObject.useRef)(null);
17435
+ const listRef = (0,external_react_namespaceObject.useRef)(null);
17352
17436
  const dropdownId = (0,external_react_namespaceObject.useId)();
17353
17437
  const options = [];
17354
17438
  const [isFocused, setIsFocused] = (0,external_react_namespaceObject.useState)(false);
17355
17439
  const [isOpen, setIsOpen] = (0,external_react_namespaceObject.useState)(isInitOpen || false);
17356
17440
  const [colors, setColors] = (0,external_react_namespaceObject.useState)([]);
17357
17441
  const [activeItem, setActiveItem] = (0,external_react_namespaceObject.useState)(selectedItem);
17442
+ const [placement, setPlacement] = (0,external_react_namespaceObject.useState)('bottom');
17358
17443
  const onChange = item => {
17359
17444
  const innerItem = options.filter(option => option.value === item)[0];
17360
17445
  setIsOpen(false);
@@ -17387,6 +17472,17 @@ const Dropdown = ({
17387
17472
  setIsOpen(false);
17388
17473
  }
17389
17474
  }, [isDisabled]);
17475
+ (0,external_react_namespaceObject.useLayoutEffect)(() => {
17476
+ if (!isOpen || !dropdownRef.current) return;
17477
+ if (dropdownPosition !== DropdownPositions.auto) {
17478
+ setPlacement(dropdownPosition);
17479
+ return;
17480
+ }
17481
+ const rect = dropdownRef.current.getBoundingClientRect();
17482
+ const listHeight = listRef.current?.offsetHeight || maxHeight;
17483
+ const spaceBelow = window.innerHeight - rect.bottom;
17484
+ setPlacement(spaceBelow < listHeight ? 'top' : 'bottom');
17485
+ }, [isOpen]);
17390
17486
  const childrenArray = external_react_default().Children.toArray(children).filter(Boolean);
17391
17487
 
17392
17488
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -17401,8 +17497,10 @@ const Dropdown = ({
17401
17497
  const contextValue = external_react_default().useMemo(() => ({
17402
17498
  onChange,
17403
17499
  activeItem,
17404
- maxHeight
17405
- }), [onChange, activeItem, maxHeight]);
17500
+ maxHeight,
17501
+ listRef,
17502
+ placement
17503
+ }), [onChange, activeItem, maxHeight, placement]);
17406
17504
  const value = activeItem ? activeItem.label || activeItem.children || activeItem.value || activeItem || placeholder : placeholder;
17407
17505
  const rawAvatar = activeItem && activeItem.avatar;
17408
17506
  const selectedAvatar = rawAvatar != null ? typeof rawAvatar === 'string' ? (0,jsx_runtime_namespaceObject.jsx)(Avatar_Avatar, {
@@ -40289,21 +40387,6 @@ const BarLineComplexChartTooltip = /*#__PURE__*/(0,external_react_namespaceObjec
40289
40387
  });
40290
40388
  ;// ./src/components/Charts/BarLineComplexChart/constants.ts
40291
40389
  const FONT_FAMILY = 'Manrope, sans-serif';
40292
- const TITLE_PADDING_LEFT = {
40293
- mobile: 10,
40294
- md: 10,
40295
- other: 20
40296
- };
40297
- const TITLE_PADDING_TOP = {
40298
- mobile: 13,
40299
- md: 18,
40300
- other: 20
40301
- };
40302
- const TITLE_FONT_SIZE = {
40303
- mobile: 16,
40304
- md: 16,
40305
- other: 20
40306
- };
40307
40390
  ;// ./src/components/Charts/hooks/usePlotlyDefaultConfig.ts
40308
40391
 
40309
40392
  const usePlotlyDefaultConfig = () => {
@@ -40348,6 +40431,7 @@ function BarLineComplexChartView_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You
40348
40431
 
40349
40432
 
40350
40433
 
40434
+
40351
40435
  var BarLineComplexChartView_ref = true ? {
40352
40436
  name: "sj7adp",
40353
40437
  styles: "background:#fff;border-radius:8px;box-shadow:-2px 2px 8px 0px rgba(43, 45, 49, 0.24);padding:4px 8px"
@@ -40366,7 +40450,6 @@ const BarLineComplexChartView = ({
40366
40450
  const theme = (0,react_namespaceObject.useTheme)();
40367
40451
  const plotlyWrapperRef = (0,external_react_namespaceObject.useRef)(null);
40368
40452
  const plotlyDefaultLayoutConfig = usePlotlyDefaultConfig();
40369
- const deviceType = (0,hooks_namespaceObject.useDeviceType)();
40370
40453
  const {
40371
40454
  data
40372
40455
  } = useBarLineComplexChartContext();
@@ -40381,6 +40464,9 @@ const BarLineComplexChartView = ({
40381
40464
  const {
40382
40465
  setIsOpen
40383
40466
  } = useTooltipContext();
40467
+ const {
40468
+ features
40469
+ } = useBarLineComplexChartContext();
40384
40470
  const {
40385
40471
  layout = {},
40386
40472
  config = {},
@@ -40388,8 +40474,6 @@ const BarLineComplexChartView = ({
40388
40474
  } = props;
40389
40475
  const {
40390
40476
  margin = {},
40391
- title = {},
40392
- titlefont = {},
40393
40477
  yaxis = {},
40394
40478
  yaxis2 = {},
40395
40479
  xaxis = {},
@@ -40402,9 +40486,6 @@ const BarLineComplexChartView = ({
40402
40486
  size: isFullscreenMode ? 16 : 12,
40403
40487
  weight: 500
40404
40488
  };
40405
- if (typeof props.cardProps?.title === 'string' && typeof title !== 'string' && typeof title.text !== 'string') {
40406
- title.text = props.cardProps.title;
40407
- }
40408
40489
  const formattedTicks = timestamps.map((timestamp, index) => {
40409
40490
  const dateTime = new Date(timestamp);
40410
40491
  const monthYear = dateTime.toLocaleDateString('en-US', {
@@ -40474,11 +40555,15 @@ const BarLineComplexChartView = ({
40474
40555
  window.removeEventListener('resize', handleDebouncedFn, false);
40475
40556
  };
40476
40557
  }, []);
40558
+ // title is rendered as an absolutely positioned overlay so it shares the same
40559
+ // visual row as Plotly's mode bar buttons, matching the original Plotly title behavior.
40560
+ // Plotly does not support JSX in layout.title, so this DOM overlay is used instead.
40561
+ // The Wrapper is kept `position: relative` so the overlay coordinates are relative to the chart.
40477
40562
  return (0,jsx_runtime_namespaceObject.jsxs)(Wrapper_Wrapper, {
40478
40563
  className: "bar-line-complex-chart-wrapper",
40479
40564
  ref: plotlyWrapperRef,
40480
40565
  css: /*#__PURE__*/(0,react_namespaceObject.css)({
40481
- position: isFullscreenMode ? 'fixed' : 'static',
40566
+ position: isFullscreenMode ? 'fixed' : 'relative',
40482
40567
  top: isFullscreenMode ? '2.5%' : 'unset',
40483
40568
  left: isFullscreenMode ? '2.5%' : 'unset',
40484
40569
  width: isFullscreenMode ? '95%' : width,
@@ -40486,6 +40571,7 @@ const BarLineComplexChartView = ({
40486
40571
  borderRadius: 20,
40487
40572
  zIndex: isFullscreenMode ? 2 : 1,
40488
40573
  overflow: 'hidden',
40574
+ background: theme.colors.white,
40489
40575
  boxShadow: 'rgba(42, 48, 57, 0.08) 0px 10px 40px 0px',
40490
40576
  '& .plotly': {
40491
40577
  '& > div': isFullscreenMode && {
@@ -40499,7 +40585,28 @@ const BarLineComplexChartView = ({
40499
40585
  }
40500
40586
  }
40501
40587
  }, true ? "" : 0, true ? "" : 0),
40502
- children: [(0,jsx_runtime_namespaceObject.jsx)((external_react_plotly_js_default()), {
40588
+ children: [features?.includes('header') && props.cardProps?.title && (0,jsx_runtime_namespaceObject.jsx)(CardHeader_CardHeader, {
40589
+ css: /*#__PURE__*/(0,react_namespaceObject.css)({
40590
+ position: 'absolute',
40591
+ top: isFullscreenMode ? '13px' : '10px',
40592
+ left: '10px',
40593
+ width: 'auto',
40594
+ marginBottom: 0,
40595
+ zIndex: 1
40596
+ }, true ? "" : 0, true ? "" : 0),
40597
+ children: (0,jsx_runtime_namespaceObject.jsx)(WidgetCardTitle, {
40598
+ variant: "h3",
40599
+ weight: "bold",
40600
+ css: /*#__PURE__*/(0,react_namespaceObject.css)({
40601
+ flexDirection: 'row',
40602
+ fontSize: isFullscreenMode ? '24px' : '12px',
40603
+ [theme.mediaQueries.md]: {
40604
+ fontSize: isFullscreenMode ? '24px' : '16px'
40605
+ }
40606
+ }, true ? "" : 0, true ? "" : 0),
40607
+ children: props.cardProps.title
40608
+ })
40609
+ }), (0,jsx_runtime_namespaceObject.jsx)((external_react_plotly_js_default()), {
40503
40610
  divId: 'bar-line-complex-chart-graph',
40504
40611
  css: /*#__PURE__*/(0,react_namespaceObject.css)({
40505
40612
  width: isFullscreenMode ? '100%' : width,
@@ -40519,27 +40626,12 @@ const BarLineComplexChartView = ({
40519
40626
  orientation: 1,
40520
40627
  margin: {
40521
40628
  b: isFullscreenMode ? 15 : 0,
40522
- l: orientation === 'v' ? (0,utils_namespaceObject.propOr)(TITLE_PADDING_LEFT.other, deviceType)(TITLE_PADDING_LEFT) : isFullscreenMode ? 30 : 15,
40629
+ l: orientation === 'v' ? 10 : isFullscreenMode ? 30 : 15,
40523
40630
  r: orientation === 'v' ? 40 : 0,
40524
- t: (0,utils_namespaceObject.propOr)(TITLE_PADDING_TOP.other, deviceType)(TITLE_PADDING_TOP) + 25,
40631
+ t: features?.includes('header') && props.cardProps?.title ? isFullscreenMode ? 45 : 43 : 10,
40525
40632
  pad: 10,
40526
40633
  ...margin
40527
40634
  },
40528
- title: typeof title === 'string' ? title : {
40529
- x: 0,
40530
- y: 1,
40531
- font: {
40532
- size: isFullscreenMode ? 24 : (0,utils_namespaceObject.propOr)(TITLE_FONT_SIZE.other, deviceType)(TITLE_FONT_SIZE),
40533
- weight: 700,
40534
- family: FONT_FAMILY,
40535
- ...titlefont
40536
- },
40537
- pad: {
40538
- l: (0,utils_namespaceObject.propOr)(TITLE_PADDING_LEFT.other, deviceType)(TITLE_PADDING_LEFT),
40539
- t: (0,utils_namespaceObject.propOr)(TITLE_PADDING_TOP.other, deviceType)(TITLE_PADDING_TOP)
40540
- },
40541
- ...title
40542
- },
40543
40635
  barmode: 'group',
40544
40636
  autosize: false,
40545
40637
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -40689,6 +40781,8 @@ const BarLineComplexChartComponent = ({
40689
40781
  onFullscreenModeChange,
40690
40782
  ...rest
40691
40783
  }) => {
40784
+ const effectiveTitle = cardProps?.title ?? title;
40785
+ const effectiveFeatures = effectiveTitle && !features.includes('header') ? [...features, 'header'] : features;
40692
40786
  const tooltip = useTooltip();
40693
40787
  const {
40694
40788
  isFullscreenMode,
@@ -40711,14 +40805,14 @@ const BarLineComplexChartComponent = ({
40711
40805
  lineShape: lineShape,
40712
40806
  maxVisibleBars: maxVisibleBars,
40713
40807
  maxVisibleLines: maxVisibleLines,
40714
- features: features,
40808
+ features: effectiveFeatures,
40715
40809
  children: (0,jsx_runtime_namespaceObject.jsx)(TooltipContext.Provider, {
40716
40810
  value: tooltip,
40717
40811
  children: (0,jsx_runtime_namespaceObject.jsx)(BarLineComplexChartInternal, {
40718
40812
  ...rest,
40719
40813
  cardProps: {
40720
40814
  ...cardProps,
40721
- title: cardProps?.title || title
40815
+ title: effectiveTitle
40722
40816
  }
40723
40817
  })
40724
40818
  })
@@ -47706,6 +47800,7 @@ const getCandlestickPlotData = (style, data, increasingColor, decreasingColor) =
47706
47800
  }];
47707
47801
  };
47708
47802
  ;// ./src/components/Charts/CandlestickChart/CandlestickChart.tsx
47803
+
47709
47804
  function CandlestickChart_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)."; }
47710
47805
 
47711
47806
 
@@ -47716,14 +47811,23 @@ function CandlestickChart_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tr
47716
47811
 
47717
47812
 
47718
47813
 
47814
+
47719
47815
  var CandlestickChart_ref = true ? {
47816
+ name: "zxsb69",
47817
+ styles: "position:relative;width:100%;height:100%"
47818
+ } : 0;
47819
+ var CandlestickChart_ref2 = true ? {
47820
+ name: "1j8nx2m",
47821
+ styles: "position:absolute;top:1px;left:10px;width:auto;margin-bottom:0;z-index:1"
47822
+ } : 0;
47823
+ var CandlestickChart_ref3 = true ? {
47720
47824
  name: "w1atjl",
47721
47825
  styles: "width:100%;height:100%"
47722
47826
  } : 0;
47723
47827
  const CandlestickChartComponent = ({
47724
47828
  title,
47725
47829
  data,
47726
- features,
47830
+ features = [],
47727
47831
  widgetCardProps,
47728
47832
  style = 'hollow',
47729
47833
  ...plotParams
@@ -47755,57 +47859,66 @@ const CandlestickChartComponent = ({
47755
47859
  gravity: '1'
47756
47860
  });
47757
47861
  }
47758
- return (0,jsx_runtime_namespaceObject.jsx)(WithWidgetCard, {
47759
- features: features,
47760
- cardProps: {
47761
- ...widgetCardProps
47762
- },
47763
- children: (0,jsx_runtime_namespaceObject.jsx)((external_react_plotly_js_default()), {
47764
- layout: {
47765
- ...plotlyDefaultLayoutConfig.layout,
47766
- title: {
47767
- text: title,
47768
- x: 0,
47769
- y: 1,
47770
- pad: {
47771
- l: 10,
47772
- t: 5
47773
- },
47774
- font: {
47775
- size: 24,
47776
- weight: 700,
47777
- family: 'Manrope, sans-serif'
47778
- }
47779
- },
47780
- dragmode: 'zoom',
47781
- xaxis: {
47782
- rangeslider: {
47783
- visible: false
47784
- }
47785
- },
47786
- yaxis: {
47787
- side: 'right'
47788
- },
47789
- margin: {
47790
- t: 20,
47791
- b: 40,
47792
- l: 20,
47793
- r: 20
47794
- },
47795
- showlegend: false,
47796
- ...layout
47797
- },
47798
- css: CandlestickChart_ref,
47799
- useResizeHandler: true,
47800
- data: plotData,
47801
- config: {
47802
- ...plotlyDefaultLayoutConfig.config,
47803
- modeBarButtons: [extraModeBarButtons, ['zoom2d', 'pan2d', 'select2d', 'zoomIn2d', 'zoomOut2d', 'autoScale2d', 'resetScale2d']],
47804
- ...config
47862
+ return (
47863
+ // title is rendered as an absolutely positioned overlay so it shares the same
47864
+ // visual row as Plotly's mode bar buttons, matching the original Plotly title behavior.
47865
+ // Plotly does not support JSX in layout.title, so this DOM overlay is used instead.
47866
+ (0,jsx_runtime_namespaceObject.jsx)(WithWidgetCard, {
47867
+ features: features,
47868
+ cardProps: {
47869
+ ...widgetCardProps
47805
47870
  },
47806
- ...restPlotParams
47871
+ children: (0,jsx_runtime_namespaceObject.jsxs)("div", {
47872
+ css: CandlestickChart_ref,
47873
+ children: [title && (0,jsx_runtime_namespaceObject.jsx)(CardHeader_CardHeader, {
47874
+ css: CandlestickChart_ref2,
47875
+ children: (0,jsx_runtime_namespaceObject.jsx)(WidgetCardTitle, {
47876
+ variant: "h3",
47877
+ weight: "bold",
47878
+ css: /*#__PURE__*/(0,react_namespaceObject.css)({
47879
+ flexDirection: 'row',
47880
+ lineHeight: 1,
47881
+ fontSize: '24px',
47882
+ [theme.mediaQueries.md]: {
47883
+ fontSize: '24px'
47884
+ }
47885
+ }, true ? "" : 0, true ? "" : 0),
47886
+ children: title
47887
+ })
47888
+ }), (0,jsx_runtime_namespaceObject.jsx)((external_react_plotly_js_default()), {
47889
+ layout: {
47890
+ ...plotlyDefaultLayoutConfig.layout,
47891
+ dragmode: 'zoom',
47892
+ xaxis: {
47893
+ rangeslider: {
47894
+ visible: false
47895
+ }
47896
+ },
47897
+ yaxis: {
47898
+ side: 'right'
47899
+ },
47900
+ margin: {
47901
+ t: 20,
47902
+ b: 40,
47903
+ l: 20,
47904
+ r: 20
47905
+ },
47906
+ showlegend: false,
47907
+ ...layout
47908
+ },
47909
+ css: CandlestickChart_ref3,
47910
+ useResizeHandler: true,
47911
+ data: plotData,
47912
+ config: {
47913
+ ...plotlyDefaultLayoutConfig.config,
47914
+ modeBarButtons: [extraModeBarButtons, ['zoom2d', 'pan2d', 'select2d', 'zoomIn2d', 'zoomOut2d', 'autoScale2d', 'resetScale2d']],
47915
+ ...config
47916
+ },
47917
+ ...restPlotParams
47918
+ })]
47919
+ })
47807
47920
  })
47808
- });
47921
+ );
47809
47922
  };
47810
47923
  const CandlestickChart = WithFullscreenMode(CandlestickChartComponent);
47811
47924
  ;// ./src/components/Charts/CandlestickChart/index.ts
@@ -49630,6 +49743,7 @@ const RowsPerPageDropdown = ({
49630
49743
  selectedItem = DEFAULT_PER_PAGE_VALUE,
49631
49744
  rowsPerPageList = ROWS_PER_PAGE_LIST,
49632
49745
  rowsPerPageText = 'Rows per page',
49746
+ dropdownPosition,
49633
49747
  ...rest
49634
49748
  }) => {
49635
49749
  const theme = (0,react_namespaceObject.useTheme)();
@@ -49675,7 +49789,8 @@ const RowsPerPageDropdown = ({
49675
49789
  stroke: theme.colors.greyDarker
49676
49790
  }
49677
49791
  }
49678
- }
49792
+ },
49793
+ dropdownPosition
49679
49794
  },
49680
49795
  ...rest,
49681
49796
  children: rowsPerPageList.map(item => (0,jsx_runtime_namespaceObject.jsx)(DropdownOption_DropdownOption, {