xmlui 0.11.12 → 0.11.15

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.
@@ -4633,7 +4633,7 @@ const TextBox = forwardRef(function TextBox2({
4633
4633
  required: required2
4634
4634
  }
4635
4635
  ),
4636
- !readOnly2 && enabled2 && localValue.length > 0 && type == "search" && /* @__PURE__ */ jsx(
4636
+ !readOnly2 && enabled2 && type == "search" && localValue?.length > 0 && /* @__PURE__ */ jsx(
4637
4637
  Adornment,
4638
4638
  {
4639
4639
  "data-part-id": PART_END_ADORNMENT,
@@ -6776,6 +6776,7 @@ const XmlUiThemeDefinition = {
6776
6776
  resources: {
6777
6777
  // "font.inter": "https://rsms.me/inter/inter.css",
6778
6778
  },
6779
+ color: "$color-primary-500",
6779
6780
  themeVars: {
6780
6781
  "font-size": "15px",
6781
6782
  "boxShadow-Input": "$boxShadow-sm"
@@ -6797,46 +6798,55 @@ const XmlUiThemeDefinition = {
6797
6798
  const XmlUiGreenThemeDefinition = {
6798
6799
  id: "xmlui-green",
6799
6800
  extends: "xmlui",
6801
+ color: "$color-primary-500",
6800
6802
  themeVars: { ...greenThemeColors }
6801
6803
  };
6802
6804
  const XmlUiGrayThemeDefinition = {
6803
6805
  id: "xmlui-gray",
6804
6806
  extends: "xmlui",
6807
+ color: "$color-primary-500",
6805
6808
  themeVars: { ...grayThemeColors }
6806
6809
  };
6807
6810
  const XmlUiOrangeThemeDefinition = {
6808
6811
  id: "xmlui-orange",
6809
6812
  extends: "xmlui",
6813
+ color: "$color-primary-500",
6810
6814
  themeVars: { ...orangeThemeColors }
6811
6815
  };
6812
6816
  const XmlUiPurpleThemeDefinition = {
6813
6817
  id: "xmlui-purple",
6814
6818
  extends: "xmlui",
6819
+ color: "$color-primary-500",
6815
6820
  themeVars: { ...purpleThemeColors }
6816
6821
  };
6817
6822
  const XmlUiCyanThemeDefinition = {
6818
6823
  id: "xmlui-cyan",
6819
6824
  extends: "xmlui",
6825
+ color: "$color-primary-500",
6820
6826
  themeVars: { ...cyanThemeColors }
6821
6827
  };
6822
6828
  const XmlUiRedThemeDefinition = {
6823
6829
  id: "xmlui-red",
6824
6830
  extends: "xmlui",
6831
+ color: "$color-primary-500",
6825
6832
  themeVars: { ...redThemeColors }
6826
6833
  };
6827
6834
  const XmlUiDocsThemeDefinition = {
6828
6835
  id: "xmlui-docs",
6829
6836
  extends: "xmlui",
6837
+ color: "$color-primary-500",
6830
6838
  themeVars: {}
6831
6839
  };
6832
6840
  const XmlUiBlogThemeDefinition = {
6833
6841
  id: "xmlui-blog",
6834
6842
  extends: "xmlui",
6843
+ color: "$color-primary-500",
6835
6844
  themeVars: {}
6836
6845
  };
6837
6846
  const XmlUiWebThemeDefinition = {
6838
6847
  id: "xmlui-web",
6839
6848
  extends: "xmlui",
6849
+ color: "$color-primary-500",
6840
6850
  themeVars: {
6841
6851
  // --- Fundamental colors & typography
6842
6852
  "maxWidth-content-AppHeader": "1280px",
@@ -17635,20 +17645,22 @@ const checkboxComponentRenderer = createComponentRenderer(
17635
17645
  }
17636
17646
  );
17637
17647
  const themeVars$K = `'{"backgroundColor-ContentSeparator": "var(--xmlui-backgroundColor-ContentSeparator)", "thickness-ContentSeparator": "var(--xmlui-thickness-ContentSeparator)", "length-ContentSeparator": "var(--xmlui-length-ContentSeparator)", "marginTop-ContentSeparator": "var(--xmlui-marginTop-ContentSeparator)", "marginBottom-ContentSeparator": "var(--xmlui-marginBottom-ContentSeparator)", "marginVertical-ContentSeparator": "var(--xmlui-marginVertical-ContentSeparator)", "marginLeft-ContentSeparator": "var(--xmlui-marginLeft-ContentSeparator)", "marginRight-ContentSeparator": "var(--xmlui-marginRight-ContentSeparator)", "marginHorizontal-ContentSeparator": "var(--xmlui-marginHorizontal-ContentSeparator)", "paddingTop-ContentSeparator": "var(--xmlui-paddingTop-ContentSeparator)", "paddingBottom-ContentSeparator": "var(--xmlui-paddingBottom-ContentSeparator)", "paddingVertical-ContentSeparator": "var(--xmlui-paddingVertical-ContentSeparator)", "paddingLeft-ContentSeparator": "var(--xmlui-paddingLeft-ContentSeparator)", "paddingRight-ContentSeparator": "var(--xmlui-paddingRight-ContentSeparator)", "paddingHorizontal-ContentSeparator": "var(--xmlui-paddingHorizontal-ContentSeparator)"}'`;
17638
- const separator = "_separator_1r9lf_14";
17639
- const horizontal$3 = "_horizontal_1r9lf_27";
17640
- const vertical$3 = "_vertical_1r9lf_31";
17648
+ const separator = "_separator_hmp7g_14";
17649
+ const horizontal$3 = "_horizontal_hmp7g_27";
17650
+ const stretchToFit = "_stretchToFit_hmp7g_31";
17651
+ const vertical$3 = "_vertical_hmp7g_35";
17641
17652
  const styles$$ = {
17642
17653
  themeVars: themeVars$K,
17643
17654
  separator,
17644
17655
  horizontal: horizontal$3,
17656
+ stretchToFit,
17645
17657
  vertical: vertical$3
17646
17658
  };
17647
17659
  const defaultProps$W = {
17648
17660
  orientation: "horizontal"
17649
17661
  };
17650
17662
  const ContentSeparator = forwardRef(
17651
- ({ orientation = defaultProps$W.orientation, thickness, length, style: style2, className, ...rest }, ref) => {
17663
+ ({ orientation = defaultProps$W.orientation, thickness, length, hasExplicitLength = false, style: style2, className, ...rest }, ref) => {
17652
17664
  const inlineStyles = {};
17653
17665
  if (thickness !== void 0) {
17654
17666
  if (orientation === "horizontal") {
@@ -17673,7 +17685,8 @@ const ContentSeparator = forwardRef(
17673
17685
  styles$$.separator,
17674
17686
  {
17675
17687
  [styles$$.horizontal]: orientation === "horizontal",
17676
- [styles$$.vertical]: orientation === "vertical"
17688
+ [styles$$.vertical]: orientation === "vertical",
17689
+ [styles$$.stretchToFit]: !hasExplicitLength
17677
17690
  },
17678
17691
  className
17679
17692
  ),
@@ -17726,12 +17739,16 @@ const contentSeparatorComponentRenderer = createComponentRenderer(
17726
17739
  COMP$1k,
17727
17740
  ContentSeparatorMd,
17728
17741
  ({ node, className, extractValue }) => {
17742
+ const orientation = extractValue(node.props.orientation);
17743
+ const length = extractValue.asSize(node.props.length);
17744
+ const hasExplicitLength = length !== void 0 || orientation === "vertical" && node.props.height !== void 0 || orientation === "horizontal" && node.props.width !== void 0;
17729
17745
  return /* @__PURE__ */ jsx(
17730
17746
  ContentSeparator,
17731
17747
  {
17732
- orientation: extractValue(node.props.orientation),
17748
+ orientation,
17733
17749
  thickness: extractValue.asSize(node.props.thickness),
17734
- length: extractValue.asSize(node.props.length),
17750
+ length,
17751
+ hasExplicitLength,
17735
17752
  className
17736
17753
  }
17737
17754
  );
@@ -18393,17 +18410,19 @@ const datePickerComponentRenderer = createComponentRenderer(
18393
18410
  }
18394
18411
  );
18395
18412
  const themeVars$I = `'{"backgroundColor-DropdownMenu": "var(--xmlui-backgroundColor-DropdownMenu)", "borderRadius-DropdownMenu": "var(--xmlui-borderRadius-DropdownMenu)", "boxShadow-DropdownMenu": "var(--xmlui-boxShadow-DropdownMenu)", "borderColor-DropdownMenu-content": "var(--xmlui-borderColor-DropdownMenu-content)", "borderWidth-DropdownMenu-content": "var(--xmlui-borderWidth-DropdownMenu-content)", "borderStyle-DropdownMenu-content": "var(--xmlui-borderStyle-DropdownMenu-content)", "minWidth-DropdownMenu": "var(--xmlui-minWidth-DropdownMenu)", "backgroundColor-MenuItem": "var(--xmlui-backgroundColor-MenuItem)", "color-MenuItem": "var(--xmlui-color-MenuItem)", "fontFamily-MenuItem": "var(--xmlui-fontFamily-MenuItem)", "gap-MenuItem": "var(--xmlui-gap-MenuItem)", "fontSize-MenuItem": "var(--xmlui-fontSize-MenuItem)", "paddingVertical-MenuItem": "var(--xmlui-paddingVertical-MenuItem)", "paddingHorizontal-MenuItem": "var(--xmlui-paddingHorizontal-MenuItem)", "backgroundColor-MenuItem--hover": "var(--xmlui-backgroundColor-MenuItem--hover)", "backgroundColor-MenuItem--active": "var(--xmlui-backgroundColor-MenuItem--active)", "backgroundColor-MenuItem--active--hover": "var(--xmlui-backgroundColor-MenuItem--active--hover)", "color-MenuItem--hover": "var(--xmlui-color-MenuItem--hover)", "color-MenuItem--active": "var(--xmlui-color-MenuItem--active)", "color-MenuItem--active--hover": "var(--xmlui-color-MenuItem--active--hover)", "color-MenuItem--disabled": "var(--xmlui-color-MenuItem--disabled)", "marginTop-MenuSeparator": "var(--xmlui-marginTop-MenuSeparator)", "marginBottom-MenuSeparator": "var(--xmlui-marginBottom-MenuSeparator)", "width-MenuSeparator": "var(--xmlui-width-MenuSeparator)", "height-MenuSeparator": "var(--xmlui-height-MenuSeparator)", "color-MenuSeparator": "var(--xmlui-color-MenuSeparator)"}'`;
18396
- const DropdownMenuContent = "_DropdownMenuContent_19u51_14";
18397
- const DropdownMenuSubContent = "_DropdownMenuSubContent_19u51_19";
18398
- const DropdownMenuItem = "_DropdownMenuItem_19u51_29";
18399
- const DropdownMenuSubTrigger = "_DropdownMenuSubTrigger_19u51_30";
18400
- const active$2 = "_active_19u51_53";
18401
- const disabled$8 = "_disabled_19u51_63";
18402
- const wrapper$h = "_wrapper_19u51_74";
18403
- const DropdownMenuSeparator = "_DropdownMenuSeparator_19u51_78";
18413
+ const DropdownMenuContent = "_DropdownMenuContent_tklrk_14";
18414
+ const compact = "_compact_tklrk_18";
18415
+ const DropdownMenuSubContent = "_DropdownMenuSubContent_tklrk_22";
18416
+ const DropdownMenuItem = "_DropdownMenuItem_tklrk_32";
18417
+ const DropdownMenuSubTrigger = "_DropdownMenuSubTrigger_tklrk_33";
18418
+ const active$2 = "_active_tklrk_56";
18419
+ const disabled$8 = "_disabled_tklrk_66";
18420
+ const wrapper$h = "_wrapper_tklrk_81";
18421
+ const DropdownMenuSeparator = "_DropdownMenuSeparator_tklrk_85";
18404
18422
  const styles$Z = {
18405
18423
  themeVars: themeVars$I,
18406
18424
  DropdownMenuContent,
18425
+ compact,
18407
18426
  DropdownMenuSubContent,
18408
18427
  DropdownMenuItem,
18409
18428
  DropdownMenuSubTrigger,
@@ -18439,6 +18458,7 @@ const DropdownMenu = forwardRef(function DropdownMenu2({
18439
18458
  triggerButtonThemeColor = defaultDropdownMenuProps.triggerButtonThemeColor,
18440
18459
  triggerButtonIcon = defaultDropdownMenuProps.triggerButtonIcon,
18441
18460
  triggerButtonIconPosition = defaultDropdownMenuProps.triggerButtonIconPosition,
18461
+ compact: compact2 = false,
18442
18462
  ...rest
18443
18463
  }, ref) {
18444
18464
  const { root: root2 } = useTheme();
@@ -18543,7 +18563,7 @@ const DropdownMenu = forwardRef(function DropdownMenu2({
18543
18563
  ref: contentRef,
18544
18564
  align: alignment,
18545
18565
  style: style2,
18546
- className: classnames(styles$Z.DropdownMenuContent, className),
18566
+ className: classnames(styles$Z.DropdownMenuContent, className, { [styles$Z.compact]: compact2 }),
18547
18567
  onOpenAutoFocus: (e) => {
18548
18568
  e.preventDefault();
18549
18569
  contentRef.current?.focus();
@@ -18571,7 +18591,8 @@ const MenuItem = forwardRef(function MenuItem2({
18571
18591
  icon: icon2,
18572
18592
  iconPosition = defaultMenuItemProps.iconPosition,
18573
18593
  active: active2 = defaultMenuItemProps.active,
18574
- enabled: enabled2 = true
18594
+ enabled: enabled2 = true,
18595
+ compact: compact2 = false
18575
18596
  }, ref) {
18576
18597
  const iconToStart = iconPosition === "start";
18577
18598
  const context = useDropdownMenuContext();
@@ -18606,7 +18627,8 @@ const MenuItem = forwardRef(function MenuItem2({
18606
18627
  style: style2,
18607
18628
  className: classnames(className, styles$Z.DropdownMenuItem, {
18608
18629
  [styles$Z.active]: active2,
18609
- [styles$Z.disabled]: !enabled2
18630
+ [styles$Z.disabled]: !enabled2,
18631
+ [styles$Z.compact]: compact2
18610
18632
  }),
18611
18633
  ref,
18612
18634
  onClick: handleClick,
@@ -21306,14 +21328,18 @@ const Form = forwardRef(function({
21306
21328
  dispatch(formSubmitting());
21307
21329
  try {
21308
21330
  const filteredSubject = validationResult.data;
21309
- const canSubmit = await onWillSubmit?.(filteredSubject);
21310
- if (canSubmit === false) {
21331
+ const willSubmitResult = await onWillSubmit?.(filteredSubject);
21332
+ if (willSubmitResult === false) {
21311
21333
  dispatch(
21312
21334
  backendValidationArrived({ generalValidationResults: [], fieldValidationResults: {} })
21313
21335
  );
21314
21336
  return;
21315
21337
  }
21316
- const result = await onSubmit?.(filteredSubject, {
21338
+ let dataToSubmit = filteredSubject;
21339
+ if (willSubmitResult !== null && willSubmitResult !== void 0 && willSubmitResult !== "" && typeof willSubmitResult === "object" && !Array.isArray(willSubmitResult)) {
21340
+ dataToSubmit = willSubmitResult;
21341
+ }
21342
+ const result = await onSubmit?.(dataToSubmit, {
21317
21343
  passAsDefaultBody: true
21318
21344
  });
21319
21345
  dispatch(formSubmitted());
@@ -21642,7 +21668,7 @@ const FormMd = createMetadata({
21642
21668
  },
21643
21669
  events: {
21644
21670
  willSubmit: d(
21645
- `The form infrastructure fires this event just before the form is submitted. The event argument is the current \`data\` value to be submitted. You can cancel the submission by returning \`false\` from the event handler.`
21671
+ `The form infrastructure fires this event just before the form is submitted. The event argument is the current \`data\` value to be submitted. The return value controls submission behavior: returning \`false\` cancels the submission; returning a plain object submits that object instead; returning \`null\`, \`undefined\`, an empty string, or any non-object value proceeds with normal submission.`
21646
21672
  ),
21647
21673
  submit: d(
21648
21674
  `The form infrastructure fires this event when the form is submitted. The event argument is the current \`data\` value to save.`
@@ -25245,11 +25271,11 @@ function requireClient() {
25245
25271
  var clientExports = /* @__PURE__ */ requireClient();
25246
25272
  const ReactDOM = /* @__PURE__ */ getDefaultExportFromCjs(clientExports);
25247
25273
  const themeVars$p = `'{"backgroundColor-ResponsiveBar": "var(--xmlui-backgroundColor-ResponsiveBar)", "padding-ResponsiveBar": "var(--xmlui-padding-ResponsiveBar)", "margin-ResponsiveBar": "var(--xmlui-margin-ResponsiveBar)"}'`;
25248
- const responsiveBar = "_responsiveBar_9ttfw_14";
25249
- const vertical$2 = "_vertical_9ttfw_26";
25250
- const horizontal$1 = "_horizontal_9ttfw_33";
25251
- const visibleItems = "_visibleItems_9ttfw_39";
25252
- const overflowDropdown = "_overflowDropdown_9ttfw_65";
25274
+ const responsiveBar = "_responsiveBar_1euow_14";
25275
+ const vertical$2 = "_vertical_1euow_26";
25276
+ const horizontal$1 = "_horizontal_1euow_33";
25277
+ const visibleItems = "_visibleItems_1euow_39";
25278
+ const overflowDropdown = "_overflowDropdown_1euow_65";
25253
25279
  const styles$F = {
25254
25280
  themeVars: themeVars$p,
25255
25281
  responsiveBar,
@@ -25258,26 +25284,55 @@ const styles$F = {
25258
25284
  visibleItems,
25259
25285
  overflowDropdown
25260
25286
  };
25287
+ const PART_OVERFLOW = "overflow";
25261
25288
  const ResponsiveBarDropdown = ({
25262
25289
  overflowIcon,
25290
+ dropdownText,
25291
+ dropdownAlignment,
25292
+ triggerTemplate,
25263
25293
  children,
25264
- className
25265
- }) => /* @__PURE__ */ jsx("div", { className, children: /* @__PURE__ */ jsx(DropdownMenu, { label: "More options", triggerButtonIcon: overflowIcon, children }) });
25294
+ className,
25295
+ onWillOpen,
25296
+ registerComponentApi
25297
+ }) => /* @__PURE__ */ jsx("div", { className, "data-part-id": PART_OVERFLOW, children: /* @__PURE__ */ jsx(
25298
+ DropdownMenu,
25299
+ {
25300
+ label: dropdownText,
25301
+ triggerButtonIcon: overflowIcon,
25302
+ triggerTemplate,
25303
+ alignment: dropdownAlignment,
25304
+ compact: true,
25305
+ onWillOpen,
25306
+ registerComponentApi,
25307
+ children
25308
+ }
25309
+ ) });
25266
25310
  const defaultResponsiveBarProps = {
25267
25311
  overflowIcon: "ellipsisHorizontal:ResponsiveBar",
25312
+ dropdownText: "More options",
25268
25313
  gap: 0,
25269
- orientation: "horizontal"
25314
+ orientation: "horizontal",
25315
+ reverse: false
25270
25316
  };
25271
25317
  const ResponsiveBar = forwardRef(function ResponsiveBar2({
25272
25318
  children,
25319
+ childNodes,
25320
+ renderChildFn,
25273
25321
  overflowIcon = defaultResponsiveBarProps.overflowIcon,
25322
+ dropdownText = defaultResponsiveBarProps.dropdownText,
25323
+ dropdownAlignment,
25324
+ triggerTemplate,
25274
25325
  gap = defaultResponsiveBarProps.gap,
25275
25326
  orientation = defaultResponsiveBarProps.orientation,
25327
+ reverse: reverse2 = defaultResponsiveBarProps.reverse,
25276
25328
  style: style2,
25277
25329
  className,
25278
25330
  onClick,
25331
+ onWillOpen,
25332
+ registerComponentApi,
25279
25333
  ...rest
25280
25334
  }, ref) {
25335
+ const effectiveAlignment = dropdownAlignment ?? (reverse2 ? "start" : "end");
25281
25336
  const containerRef = useRef(null);
25282
25337
  const measurementDropdownRef = useRef(null);
25283
25338
  const isCalculatingRef = useRef(false);
@@ -25285,8 +25340,10 @@ const ResponsiveBar = forwardRef(function ResponsiveBar2({
25285
25340
  const lastChildrenCount = useRef(0);
25286
25341
  useRef(null);
25287
25342
  const layoutCompletedRef = useRef(false);
25343
+ const dropdownApiRef = useRef(null);
25288
25344
  const [isInMeasurementPhase, setIsInMeasurementPhase] = useState(true);
25289
25345
  const [measuredWidths, setMeasuredWidths] = useState([]);
25346
+ const [measuredDropdownSize, setMeasuredDropdownSize] = useState(0);
25290
25347
  const [layout, setLayout] = useState({
25291
25348
  visibleItems: [],
25292
25349
  overflowItems: []
@@ -25298,6 +25355,21 @@ const ResponsiveBar = forwardRef(function ResponsiveBar2({
25298
25355
  return result;
25299
25356
  }, [children]);
25300
25357
  const childrenCount = childrenArray.length;
25358
+ useEffect(() => {
25359
+ if (registerComponentApi) {
25360
+ registerComponentApi({
25361
+ open: () => {
25362
+ dropdownApiRef.current?.open();
25363
+ },
25364
+ close: () => {
25365
+ dropdownApiRef.current?.close();
25366
+ },
25367
+ hasOverflow: () => {
25368
+ return layout.overflowItems.length > 0;
25369
+ }
25370
+ });
25371
+ }
25372
+ }, [registerComponentApi, layout.overflowItems.length]);
25301
25373
  const measureItems = () => {
25302
25374
  if (!containerRef.current) return;
25303
25375
  const items = [];
@@ -25317,7 +25389,16 @@ const ResponsiveBar = forwardRef(function ResponsiveBar2({
25317
25389
  const rect = item2.getBoundingClientRect();
25318
25390
  return orientation === "horizontal" ? rect.width : rect.height;
25319
25391
  });
25392
+ let dropdownSize = orientation === "horizontal" ? 147 : 47;
25393
+ if (measurementDropdownRef.current) {
25394
+ const dropdownRect = measurementDropdownRef.current.getBoundingClientRect();
25395
+ const measuredSize = orientation === "horizontal" ? dropdownRect.width : dropdownRect.height;
25396
+ if (measuredSize > 0) {
25397
+ dropdownSize = measuredSize;
25398
+ }
25399
+ }
25320
25400
  setMeasuredWidths(measurements);
25401
+ setMeasuredDropdownSize(dropdownSize);
25321
25402
  setIsInMeasurementPhase(false);
25322
25403
  };
25323
25404
  const calculateOverflowLayout = () => {
@@ -25331,7 +25412,6 @@ const ResponsiveBar = forwardRef(function ResponsiveBar2({
25331
25412
  if (containerSize === 0 || containerSize === lastSize) {
25332
25413
  return;
25333
25414
  }
25334
- console.log(`ResponsiveBar ${orientation}: containerSize=${containerSize}, children=${childrenArray.length}`);
25335
25415
  isCalculatingRef.current = true;
25336
25416
  lastContainerSize.current = containerSize;
25337
25417
  const gapValue = gap;
@@ -25342,25 +25422,23 @@ const ResponsiveBar = forwardRef(function ResponsiveBar2({
25342
25422
  const gapSize = i > 0 ? gapValue : 0;
25343
25423
  totalSize += gapSize + childSize;
25344
25424
  }
25345
- console.log(`Total size needed: ${totalSize}, available: ${containerSize}`);
25346
25425
  let visibleItems2;
25347
25426
  let overflowItems;
25348
25427
  if (totalSize <= containerSize) {
25349
25428
  visibleItems2 = childrenArray;
25350
25429
  overflowItems = [];
25351
25430
  } else {
25352
- let dropdownSize = orientation === "horizontal" ? 147 : 47;
25431
+ let dropdownSize = measuredDropdownSize > 0 ? measuredDropdownSize : orientation === "horizontal" ? 147 : 47;
25353
25432
  const existingDropdown = container2.querySelector(
25354
25433
  `.${styles$F.overflowDropdown}`
25355
25434
  );
25356
25435
  if (existingDropdown) {
25357
25436
  const dropdownRect = existingDropdown.getBoundingClientRect();
25358
- dropdownSize = orientation === "horizontal" ? dropdownRect.width : dropdownRect.height;
25359
- } else if (measurementDropdownRef.current) {
25360
- const dropdownRect = measurementDropdownRef.current.getBoundingClientRect();
25361
- dropdownSize = orientation === "horizontal" ? dropdownRect.width : dropdownRect.height;
25437
+ const currentSize = orientation === "horizontal" ? dropdownRect.width : dropdownRect.height;
25438
+ if (currentSize > 0) {
25439
+ dropdownSize = currentSize;
25440
+ }
25362
25441
  }
25363
- console.log(`Dropdown size: ${dropdownSize}`);
25364
25442
  let accumulatedSize = 0;
25365
25443
  let visibleCount = 0;
25366
25444
  for (let i = 0; i < childrenArray.length; i++) {
@@ -25369,7 +25447,6 @@ const ResponsiveBar = forwardRef(function ResponsiveBar2({
25369
25447
  const gapSize = i > 0 ? gapValue : 0;
25370
25448
  const proposedSize = accumulatedSize + gapSize + childSize;
25371
25449
  const totalSizeWithDropdown = proposedSize + gapValue + dropdownSize;
25372
- console.log(`Item ${i}: size=${childSize}, proposed=${proposedSize}, withDropdown=${totalSizeWithDropdown}`);
25373
25450
  if (totalSizeWithDropdown <= containerSize) {
25374
25451
  accumulatedSize = proposedSize;
25375
25452
  visibleCount++;
@@ -25383,18 +25460,14 @@ const ResponsiveBar = forwardRef(function ResponsiveBar2({
25383
25460
  if (visibleCount >= childrenArray.length) {
25384
25461
  visibleItems2 = childrenArray;
25385
25462
  overflowItems = [];
25386
- console.log(`All items fit, no dropdown needed`);
25387
25463
  } else if (visibleCount === 0) {
25388
25464
  visibleItems2 = childrenArray.slice(0, 1);
25389
25465
  overflowItems = childrenArray.slice(1);
25390
- console.log(`No items fit, forcing one visible: visible=1, overflow=${overflowItems.length}`);
25391
25466
  } else {
25392
25467
  visibleItems2 = childrenArray.slice(0, visibleCount);
25393
25468
  overflowItems = childrenArray.slice(visibleCount);
25394
- console.log(`Split items: visible=${visibleItems2.length}, overflow=${overflowItems.length}`);
25395
25469
  }
25396
25470
  }
25397
- console.log(`Final layout: visible=${visibleItems2.length}, overflow=${overflowItems.length}`);
25398
25471
  if (visibleItems2.length !== layout.visibleItems.length || overflowItems.length !== layout.overflowItems.length) {
25399
25472
  setLayout({
25400
25473
  visibleItems: visibleItems2,
@@ -25416,6 +25489,7 @@ const ResponsiveBar = forwardRef(function ResponsiveBar2({
25416
25489
  lastChildrenCount.current = childrenCount;
25417
25490
  setIsInMeasurementPhase(true);
25418
25491
  setMeasuredWidths([]);
25492
+ setMeasuredDropdownSize(0);
25419
25493
  }
25420
25494
  }, [childrenCount]);
25421
25495
  useEffect(() => {
@@ -25461,7 +25535,7 @@ const ResponsiveBar = forwardRef(function ResponsiveBar2({
25461
25535
  ...style2,
25462
25536
  gap: `${gap}px`,
25463
25537
  // Gap between visibleItems and overflowDropdown
25464
- flexDirection: orientation === "horizontal" ? "row" : "column",
25538
+ flexDirection: orientation === "horizontal" ? reverse2 ? "row-reverse" : "row" : reverse2 ? "column-reverse" : "column",
25465
25539
  height: orientation === "vertical" ? "100%" : void 0,
25466
25540
  width: orientation === "horizontal" ? "100%" : void 0
25467
25541
  },
@@ -25483,7 +25557,7 @@ const ResponsiveBar = forwardRef(function ResponsiveBar2({
25483
25557
  visibility: "hidden",
25484
25558
  opacity: 0,
25485
25559
  pointerEvents: "none",
25486
- flexDirection: orientation === "horizontal" ? "row" : "column"
25560
+ flexDirection: orientation === "horizontal" ? reverse2 ? "row-reverse" : "row" : reverse2 ? "column-reverse" : "column"
25487
25561
  },
25488
25562
  children: childrenArray.map((child, index) => /* @__PURE__ */ jsx("div", { children: child }, `item-${index}`))
25489
25563
  }
@@ -25501,7 +25575,13 @@ const ResponsiveBar = forwardRef(function ResponsiveBar2({
25501
25575
  ResponsiveBarDropdown,
25502
25576
  {
25503
25577
  overflowIcon,
25578
+ dropdownText,
25579
+ dropdownAlignment: effectiveAlignment,
25580
+ triggerTemplate,
25504
25581
  className: styles$F.overflowDropdown,
25582
+ onWillOpen,
25583
+ registerComponentApi: (api) => {
25584
+ },
25505
25585
  children: childrenArray.length > 0 && /* @__PURE__ */ jsx(MenuItem, { children: childrenArray[0] })
25506
25586
  }
25507
25587
  )
@@ -25521,11 +25601,11 @@ const ResponsiveBar = forwardRef(function ResponsiveBar2({
25521
25601
  style: {
25522
25602
  gap: `${gap}px`,
25523
25603
  // Gap between visible items
25524
- flexDirection: orientation === "horizontal" ? "row" : "column"
25604
+ flexDirection: orientation === "horizontal" ? reverse2 ? "row-reverse" : "row" : reverse2 ? "column-reverse" : "column"
25525
25605
  },
25526
25606
  children: childrenArray.map((child, index) => {
25527
25607
  const isVisible = layout.visibleItems.length > 0 ? index < layout.visibleItems.length : true;
25528
- return /* @__PURE__ */ jsx("div", { style: { display: isVisible ? "block" : "none" }, children: child }, `item-${index}`);
25608
+ return /* @__PURE__ */ jsx("div", { style: { display: isVisible ? "flex" : "none", alignItems: "stretch" }, children: renderChildFn && childNodes ? renderChildFn(childNodes[index], false) : child }, `item-${index}`);
25529
25609
  })
25530
25610
  }
25531
25611
  ),
@@ -25533,8 +25613,19 @@ const ResponsiveBar = forwardRef(function ResponsiveBar2({
25533
25613
  ResponsiveBarDropdown,
25534
25614
  {
25535
25615
  overflowIcon,
25616
+ dropdownText,
25617
+ dropdownAlignment: effectiveAlignment,
25618
+ triggerTemplate,
25536
25619
  className: styles$F.overflowDropdown,
25537
- children: layout.overflowItems.map((item2, index) => /* @__PURE__ */ jsx(MenuItem, { children: item2 }, index))
25620
+ onWillOpen,
25621
+ registerComponentApi: (api) => {
25622
+ dropdownApiRef.current = api;
25623
+ },
25624
+ children: layout.overflowItems.map((item2, index) => {
25625
+ const originalIndex = layout.visibleItems.length + index;
25626
+ const renderedChild = renderChildFn && childNodes ? renderChildFn(childNodes[originalIndex], true) : item2;
25627
+ return /* @__PURE__ */ jsx(MenuItem, { compact: true, children: renderedChild }, index);
25628
+ })
25538
25629
  }
25539
25630
  )
25540
25631
  ] })
@@ -25542,6 +25633,21 @@ const ResponsiveBar = forwardRef(function ResponsiveBar2({
25542
25633
  }
25543
25634
  );
25544
25635
  });
25636
+ const ResponsiveBarItem = memo(
25637
+ ({ node, isOverflow, renderChild: renderChild2, layoutContext }) => {
25638
+ const nodeWithContext = useMemo(() => {
25639
+ return {
25640
+ type: "Container",
25641
+ contextVars: {
25642
+ $overflow: isOverflow
25643
+ },
25644
+ children: Array.isArray(node) ? node : [node]
25645
+ };
25646
+ }, [node, isOverflow]);
25647
+ return /* @__PURE__ */ jsx(Fragment, { children: renderChild2(nodeWithContext, layoutContext) });
25648
+ }
25649
+ );
25650
+ ResponsiveBarItem.displayName = "ResponsiveBarItem";
25545
25651
  const COMP$1c = "ResponsiveBar";
25546
25652
  const ResponsiveBarMd = createMetadata({
25547
25653
  status: "stable",
@@ -25559,17 +25665,54 @@ const ResponsiveBarMd = createMetadata({
25559
25665
  valueType: "string",
25560
25666
  defaultValue: defaultResponsiveBarProps.overflowIcon
25561
25667
  },
25668
+ dropdownText: {
25669
+ description: "Text to display in the dropdown trigger button label when items overflow. This text is used for accessibility and appears alongside the overflow icon.",
25670
+ valueType: "string",
25671
+ defaultValue: defaultResponsiveBarProps.dropdownText
25672
+ },
25673
+ dropdownAlignment: {
25674
+ description: "Alignment of the dropdown menu relative to the trigger button. By default, uses 'end' when reverse is false (dropdown on the right/bottom) and 'start' when reverse is true (dropdown on the left/top).",
25675
+ valueType: "string",
25676
+ availableValues: alignmentOptionMd
25677
+ },
25678
+ triggerTemplate: dTriggerTemplate(COMP$1c),
25562
25679
  gap: {
25563
25680
  description: "Gap between child elements in pixels. Controls the spacing between items in the responsive bar layout.",
25564
25681
  valueType: "number",
25565
25682
  defaultValue: defaultResponsiveBarProps.gap
25683
+ },
25684
+ reverse: {
25685
+ description: "Reverses the direction of child elements. In horizontal mode, items are arranged from right to left instead of left to right. In vertical mode, items are arranged from bottom to top instead of top to bottom. The dropdown menu position also adjusts to appear at the start (left/top) instead of the end (right/bottom).",
25686
+ valueType: "boolean",
25687
+ defaultValue: defaultResponsiveBarProps.reverse
25566
25688
  }
25567
25689
  },
25568
25690
  events: {
25569
- click: dClick(COMP$1c)
25691
+ click: dClick(COMP$1c),
25692
+ willOpen: d(
25693
+ `This event fires when the \`${COMP$1c}\` overflow dropdown menu is about to be opened. You can prevent opening the menu by returning \`false\` from the event handler. Otherwise, the menu will open at the end of the event handler like normal.`
25694
+ )
25695
+ },
25696
+ apis: {
25697
+ close: {
25698
+ description: `This method closes the overflow dropdown menu.`,
25699
+ signature: "close(): void"
25700
+ },
25701
+ open: {
25702
+ description: `This method opens the overflow dropdown menu.`,
25703
+ signature: "open(): void"
25704
+ },
25705
+ hasOverflow: {
25706
+ description: `This method returns true if the ResponsiveBar currently has an overflow menu (i.e., some items don't fit and are in the dropdown).`,
25707
+ signature: "hasOverflow(): boolean"
25708
+ }
25709
+ },
25710
+ contextVars: {
25711
+ $overflow: {
25712
+ description: "Boolean indicating whether the child component is displayed in the overflow dropdown menu (true) or visible in the main bar (false).",
25713
+ valueType: "boolean"
25714
+ }
25570
25715
  },
25571
- apis: {},
25572
- contextVars: {},
25573
25716
  themeVars: parseScssVar(styles$F.themeVars),
25574
25717
  limitThemeVarsToComponent: true,
25575
25718
  defaultThemeVars: {
@@ -25581,16 +25724,43 @@ const ResponsiveBarMd = createMetadata({
25581
25724
  const responsiveBarComponentRenderer = createComponentRenderer(
25582
25725
  COMP$1c,
25583
25726
  ResponsiveBarMd,
25584
- ({ node, extractValue, renderChild: renderChild2, className, lookupEventHandler }) => {
25727
+ ({ node, extractValue, renderChild: renderChild2, className, lookupEventHandler, registerComponentApi, layoutContext }) => {
25728
+ const children = Array.isArray(node.children) ? node.children : node.children ? [node.children] : [];
25729
+ const renderChildWithContext = (childNode, isOverflow) => /* @__PURE__ */ jsx(
25730
+ ResponsiveBarItem,
25731
+ {
25732
+ node: childNode,
25733
+ isOverflow,
25734
+ renderChild: renderChild2,
25735
+ layoutContext
25736
+ }
25737
+ );
25585
25738
  return /* @__PURE__ */ jsx(
25586
25739
  ResponsiveBar,
25587
25740
  {
25588
25741
  orientation: extractValue(node.props?.orientation),
25589
25742
  overflowIcon: extractValue(node.props?.overflowIcon),
25743
+ dropdownText: extractValue(node.props?.dropdownText),
25744
+ dropdownAlignment: extractValue(node.props?.dropdownAlignment),
25745
+ triggerTemplate: renderChild2(node.props?.triggerTemplate),
25590
25746
  gap: extractValue(node.props?.gap),
25747
+ reverse: extractValue.asOptionalBoolean(node.props?.reverse),
25591
25748
  onClick: lookupEventHandler("click"),
25749
+ onWillOpen: lookupEventHandler("willOpen"),
25750
+ registerComponentApi,
25592
25751
  className,
25593
- children: renderChild2(node.children)
25752
+ childNodes: children,
25753
+ renderChildFn: renderChildWithContext,
25754
+ children: children.map((child, index) => /* @__PURE__ */ jsx(
25755
+ ResponsiveBarItem,
25756
+ {
25757
+ node: child,
25758
+ isOverflow: false,
25759
+ renderChild: renderChild2,
25760
+ layoutContext
25761
+ },
25762
+ index
25763
+ ))
25594
25764
  }
25595
25765
  );
25596
25766
  }
@@ -25783,8 +25953,6 @@ const NavLinkMd = createMetadata({
25783
25953
  [`fontFamily-${COMP$19}`]: "$fontFamily",
25784
25954
  [`textColor-${COMP$19}`]: "$textColor-primary",
25785
25955
  [`textColor-${COMP$19}--active`]: "$color-primary-500",
25786
- [`fontWeight-${COMP$19}--active`]: "$fontWeight-bold",
25787
- [`fontWeight-${COMP$19}--pressed`]: "$fontWeight-bold",
25788
25956
  [`thickness-indicator-${COMP$19}`]: "$space-0_5",
25789
25957
  [`outlineColor-${COMP$19}--focus`]: "$outlineColor--focus",
25790
25958
  [`outlineWidth-${COMP$19}--focus`]: "$outlineWidth--focus",
@@ -48080,7 +48248,7 @@ function IconProvider({ children }) {
48080
48248
  /* @__PURE__ */ jsx("svg", { style: { display: "none" }, ref: spriteRootRef })
48081
48249
  ] });
48082
48250
  }
48083
- const version = "0.11.12";
48251
+ const version = "0.11.15";
48084
48252
  const miscellaneousUtils = {
48085
48253
  capitalize,
48086
48254
  pluralize: pluralize$1,
@@ -55730,7 +55898,7 @@ function ApiInterceptorProvider({
55730
55898
  return;
55731
55899
  }
55732
55900
  void (async () => {
55733
- const { initMock } = await import("./initMock-Dm6pyFPh.js");
55901
+ const { initMock } = await import("./initMock-DROjRCvI.js");
55734
55902
  const apiInstance2 = await initMock(interceptor);
55735
55903
  setApiInstance(apiInstance2);
55736
55904
  setInitialized(true);
@@ -55747,7 +55915,7 @@ function ApiInterceptorProvider({
55747
55915
  if (define_process_env_default.VITE_MOCK_ENABLED) {
55748
55916
  const [{ createApiInterceptorWorker }, { initMock }] = await Promise.all([
55749
55917
  useWorker ? import("./apiInterceptorWorker-Wgm2_zjg.js") : Promise.resolve({ createApiInterceptorWorker: () => null }),
55750
- import("./initMock-Dm6pyFPh.js")
55918
+ import("./initMock-DROjRCvI.js")
55751
55919
  ]);
55752
55920
  if (interceptor || forceInitialize) {
55753
55921
  const apiInstance2 = await initMock(interceptor || {});
@@ -55784,7 +55952,7 @@ function ApiInterceptorProvider({
55784
55952
  void (async () => {
55785
55953
  const [{ createApiInterceptorWorker }, { initMock }] = await Promise.all([
55786
55954
  import("./apiInterceptorWorker-Wgm2_zjg.js"),
55787
- import("./initMock-Dm6pyFPh.js")
55955
+ import("./initMock-DROjRCvI.js")
55788
55956
  ]);
55789
55957
  const apiInstance2 = await initMock(interceptor);
55790
55958
  await createApiInterceptorWorker(apiInstance2, parentInterceptorWorker);
@@ -58698,6 +58866,7 @@ const collectedComponentMetadata = {
58698
58866
  RadioGroup: RadioGroupMd,
58699
58867
  RealTimeAdapter: RealTimeAdapterMd,
58700
58868
  Redirect: RedirectMd,
58869
+ ResponsiveBar: ResponsiveBarMd,
58701
58870
  Select: SelectMd,
58702
58871
  SelectionStore: SelectionStoreMd,
58703
58872
  Slider: SliderMd,
@@ -1,6 +1,6 @@
1
1
  import { delay as delay$1, HttpResponse, matchRequestUrl } from "msw";
2
2
  import { isArray, isObject, mapValues } from "lodash-es";
3
- import { r as runEventHandlerCode, g as getDate, d as delay, m as miscellaneousUtils, a as dateFunctions, o as orderBy, T as ThrowStatementError } from "./collectedComponentMetadata-CCJh2wtR.js";
3
+ import { r as runEventHandlerCode, g as getDate, d as delay, m as miscellaneousUtils, a as dateFunctions, o as orderBy, T as ThrowStatementError } from "./collectedComponentMetadata-Bn_obqca.js";
4
4
  import Dexie from "dexie";
5
5
  var HttpStatusCode = /* @__PURE__ */ ((HttpStatusCode2) => {
6
6
  HttpStatusCode2[HttpStatusCode2["Continue"] = 100] = "Continue";