@norges-domstoler/dds-components 22.8.2 → 22.10.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.mjs CHANGED
@@ -49,9 +49,11 @@ var typographyStyles_default = {
49
49
  "heading-xlarge--margins": "typographyStyles_heading-xlarge--margins",
50
50
  "heading-xxlarge": "typographyStyles_heading-xxlarge",
51
51
  "heading-xxlarge--margins": "typographyStyles_heading-xxlarge--margins",
52
+ "heading--margins-over-input": "typographyStyles_heading--margins-over-input",
52
53
  "label-medium": "typographyStyles_label-medium",
53
54
  "label-medium--margins": "typographyStyles_label-medium--margins",
54
55
  legend: "typographyStyles_legend",
56
+ "legend--margins-over-input": "typographyStyles_legend--margins-over-input",
55
57
  caption: "typographyStyles_caption",
56
58
  "caption--withMargins": "typographyStyles_caption--withMargins",
57
59
  bold: "typographyStyles_bold",
@@ -378,6 +380,12 @@ function cn(...classNames) {
378
380
  function convertCamelToHyphen(value) {
379
381
  return value.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/([a-z])([0-9])/g, "$1-$2").toLowerCase();
380
382
  }
383
+ function optAttr(value, keepZero) {
384
+ if (keepZero && value === 0) {
385
+ return value;
386
+ }
387
+ return value ? value : void 0;
388
+ }
381
389
 
382
390
  // src/utils/getFocusableElements.ts
383
391
  function getFocusableElements(elementRef) {
@@ -3934,6 +3942,8 @@ var Heading = ({
3934
3942
  children,
3935
3943
  typographyType,
3936
3944
  level,
3945
+ withMargins,
3946
+ withMarginsOverInput,
3937
3947
  ...rest
3938
3948
  }) => {
3939
3949
  const headingElement = getHeadingElement(level);
@@ -3941,9 +3951,19 @@ var Heading = ({
3941
3951
  return /* @__PURE__ */ jsx199(
3942
3952
  Typography,
3943
3953
  {
3944
- ...getBaseHTMLProps(id, className, style, htmlProps, rest),
3954
+ ...getBaseHTMLProps(
3955
+ id,
3956
+ cn(
3957
+ className,
3958
+ withMarginsOverInput && typographyStyles_default["heading--margins-over-input"]
3959
+ ),
3960
+ style,
3961
+ htmlProps,
3962
+ rest
3963
+ ),
3945
3964
  typographyType: standardTypographyType,
3946
3965
  as: headingElement,
3966
+ withMargins: optAttr(withMargins || withMarginsOverInput),
3947
3967
  children
3948
3968
  }
3949
3969
  );
@@ -4022,14 +4042,26 @@ var Legend = ({
4022
4042
  style,
4023
4043
  htmlProps,
4024
4044
  typographyType = "headingLarge",
4045
+ withMarginsOverInput,
4046
+ withMargins,
4025
4047
  ...rest
4026
4048
  }) => {
4027
4049
  return /* @__PURE__ */ jsx201(
4028
4050
  Typography,
4029
4051
  {
4030
- ...getBaseHTMLProps(id, className, style, htmlProps, rest),
4052
+ ...getBaseHTMLProps(
4053
+ id,
4054
+ cn(
4055
+ className,
4056
+ withMarginsOverInput && typographyStyles_default["legend--margins-over-input"]
4057
+ ),
4058
+ style,
4059
+ htmlProps,
4060
+ rest
4061
+ ),
4031
4062
  as: "legend",
4032
- typographyType
4063
+ typographyType,
4064
+ withMargins: optAttr(withMargins || withMarginsOverInput)
4033
4065
  }
4034
4066
  );
4035
4067
  };
@@ -4428,7 +4460,8 @@ var texts2 = createTexts({
4428
4460
  });
4429
4461
 
4430
4462
  // src/components/OverflowMenu/OverflowMenu.tsx
4431
- import { useEffect as useEffect14 } from "react";
4463
+ import { useContext as useContext6, useEffect as useEffect14 } from "react";
4464
+ import { createPortal } from "react-dom";
4432
4465
 
4433
4466
  // src/components/OverflowMenu/OverflowMenu.context.tsx
4434
4467
  import {
@@ -4483,6 +4516,8 @@ import { jsx as jsx210 } from "react/jsx-runtime";
4483
4516
  var OverflowMenu = ({
4484
4517
  placement = "bottom-end",
4485
4518
  offset = 2,
4519
+ parentElement,
4520
+ portal = true,
4486
4521
  className,
4487
4522
  htmlProps = {},
4488
4523
  ref,
@@ -4490,11 +4525,16 @@ var OverflowMenu = ({
4490
4525
  ...rest
4491
4526
  }) => {
4492
4527
  const { isOpen, floatStyling, setFloatOptions, menuRef, menuId } = useOverflowMenuContext();
4528
+ const themeContext = useContext6(ThemeContext);
4529
+ if (portal && !themeContext) {
4530
+ throw new Error("OverflowMenu must be used within a DdsProvider");
4531
+ }
4532
+ const portalTarget = parentElement != null ? parentElement : themeContext == null ? void 0 : themeContext.el;
4493
4533
  useEffect14(() => {
4494
4534
  setFloatOptions == null ? void 0 : setFloatOptions({ placement, offset });
4495
4535
  }, [placement, offset]);
4496
4536
  const openCn = isOpen ? "open" : "closed";
4497
- return /* @__PURE__ */ jsx210(
4537
+ const menu = /* @__PURE__ */ jsx210(
4498
4538
  Paper,
4499
4539
  {
4500
4540
  overflowY: "auto",
@@ -4521,6 +4561,7 @@ var OverflowMenu = ({
4521
4561
  border: "border-default"
4522
4562
  }
4523
4563
  );
4564
+ return portal && portalTarget ? createPortal(menu, portalTarget) : menu;
4524
4565
  };
4525
4566
  OverflowMenu.displayName = "OverflowMenu";
4526
4567
 
@@ -5017,7 +5058,7 @@ var Breadcrumbs = ({
5017
5058
  "aria-label": bChildrenTruncated.length > 1 ? t(texts3.showHiddenTo(bChildren.length - 1)) : t(texts3.showHidden)
5018
5059
  }
5019
5060
  ),
5020
- /* @__PURE__ */ jsx222(OverflowMenu, { children: /* @__PURE__ */ jsx222(OverflowMenuList, { children: bChildrenTruncated }) })
5061
+ /* @__PURE__ */ jsx222(OverflowMenu, { portal: false, children: /* @__PURE__ */ jsx222(OverflowMenuList, { children: bChildrenTruncated }) })
5021
5062
  ] })
5022
5063
  ] }),
5023
5064
  /* @__PURE__ */ jsxs77(HStack, { ...responsiveLiProps, children: [
@@ -5339,10 +5380,10 @@ CardExpandableBody.displayName = "CardExpandableBody";
5339
5380
  import { useId as useId5 } from "react";
5340
5381
 
5341
5382
  // src/components/SelectionControl/Checkbox/CheckboxGroupContext.tsx
5342
- import { createContext as createContext6, useContext as useContext6 } from "react";
5383
+ import { createContext as createContext6, useContext as useContext7 } from "react";
5343
5384
  var CheckboxGroupContext = createContext6(null);
5344
5385
  var useCheckboxGroup = () => {
5345
- return useContext6(CheckboxGroupContext);
5386
+ return useContext7(CheckboxGroupContext);
5346
5387
  };
5347
5388
 
5348
5389
  // src/components/SelectionControl/SelectionControl.module.css
@@ -5680,10 +5721,10 @@ CheckboxGroup.displayName = "CheckboxGroup";
5680
5721
  import { useId as useId7 } from "react";
5681
5722
 
5682
5723
  // src/components/SelectionControl/RadioButton/RadioButtonGroupContext.tsx
5683
- import { createContext as createContext7, useContext as useContext7 } from "react";
5724
+ import { createContext as createContext7, useContext as useContext8 } from "react";
5684
5725
  var RadioButtonGroupContext = createContext7(null);
5685
5726
  var useRadioButtonGroup = () => {
5686
- return useContext7(RadioButtonGroupContext);
5727
+ return useContext8(RadioButtonGroupContext);
5687
5728
  };
5688
5729
 
5689
5730
  // src/components/SelectionControl/RadioButton/RadioButton.tsx
@@ -5872,9 +5913,9 @@ var RadioButtonGroup = ({
5872
5913
  RadioButtonGroup.displayName = "RadioButtonGroup";
5873
5914
 
5874
5915
  // src/components/Card/CardSelectionControl/CardSelectable.context.tsx
5875
- import { createContext as createContext8, useContext as useContext8 } from "react";
5916
+ import { createContext as createContext8, useContext as useContext9 } from "react";
5876
5917
  var CardSelectableContext = createContext8({});
5877
- var useCardSelectableContext = () => useContext8(CardSelectableContext);
5918
+ var useCardSelectableContext = () => useContext9(CardSelectableContext);
5878
5919
 
5879
5920
  // src/components/Card/CardSelectionControl/CardSelectable.tsx
5880
5921
  import { jsx as jsx234 } from "react/jsx-runtime";
@@ -6273,7 +6314,7 @@ import {
6273
6314
  import { useLocale as useLocale2 } from "@react-aria/i18n";
6274
6315
  import { useCalendarState } from "@react-stately/calendar";
6275
6316
  import {
6276
- useContext as useContext11
6317
+ useContext as useContext12
6277
6318
  } from "react";
6278
6319
 
6279
6320
  // src/components/date-inputs/DatePicker/Calendar/CalendarGrid.tsx
@@ -6282,7 +6323,7 @@ import {
6282
6323
  useCalendarGrid
6283
6324
  } from "@react-aria/calendar";
6284
6325
  import { useLocale } from "@react-aria/i18n";
6285
- import { useContext as useContext10 } from "react";
6326
+ import { useContext as useContext11 } from "react";
6286
6327
 
6287
6328
  // src/components/date-inputs/DatePicker/Calendar/CalendarCell.tsx
6288
6329
  import { isToday } from "@internationalized/date";
@@ -6414,11 +6455,11 @@ function isLeapYear(date) {
6414
6455
  // src/components/date-inputs/DatePicker/CalendarPopover.tsx
6415
6456
  import {
6416
6457
  createContext as createContext9,
6417
- useContext as useContext9,
6458
+ useContext as useContext10,
6418
6459
  useEffect as useEffect18,
6419
6460
  useRef as useRef13
6420
6461
  } from "react";
6421
- import { createPortal } from "react-dom";
6462
+ import { createPortal as createPortal2 } from "react-dom";
6422
6463
  import { Fragment as Fragment6, jsx as jsx242, jsxs as jsxs89 } from "react/jsx-runtime";
6423
6464
  var CalendarPopoverContext = createContext9({
6424
6465
  anchorRef: null,
@@ -6446,7 +6487,7 @@ var CalendarPopover = ({
6446
6487
  var CalendarPopoverAnchor = ({
6447
6488
  children
6448
6489
  }) => {
6449
- const { anchorRef } = useContext9(CalendarPopoverContext);
6490
+ const { anchorRef } = useContext10(CalendarPopoverContext);
6450
6491
  return /* @__PURE__ */ jsx242("div", { ref: anchorRef != null ? anchorRef : void 0, children });
6451
6492
  };
6452
6493
  var CalendarPopoverContent = ({
@@ -6459,13 +6500,13 @@ var CalendarPopoverContent = ({
6459
6500
  const { refs, styles: floatingStyles } = useFloatPosition(null, {
6460
6501
  placement: "bottom-start"
6461
6502
  });
6462
- const themeContext = useContext9(ThemeContext);
6503
+ const themeContext = useContext10(ThemeContext);
6463
6504
  if (!themeContext) {
6464
6505
  throw new Error("DatePicker must be used within a ThemeProvider");
6465
6506
  }
6466
6507
  const portalTarget = themeContext.el;
6467
6508
  const { t } = useTranslation();
6468
- const { isOpen, onClose, anchorRef, closeButtonRef } = useContext9(
6509
+ const { isOpen, onClose, anchorRef, closeButtonRef } = useContext10(
6469
6510
  CalendarPopoverContext
6470
6511
  );
6471
6512
  const hasTransitionedIn = useMountTransition(isOpen, 500);
@@ -6500,7 +6541,7 @@ var CalendarPopoverContent = ({
6500
6541
  padding: "x0.75"
6501
6542
  };
6502
6543
  return /* @__PURE__ */ jsxs89(Fragment6, { children: [
6503
- portalTarget && hasBreakpoint && createPortal(
6544
+ portalTarget && hasBreakpoint && createPortal2(
6504
6545
  /* @__PURE__ */ jsx242(ShowHide, { showBelow: smallScreenBreakpoint, children: /* @__PURE__ */ jsx242(Backdrop, { zIndex: "modal", isMounted, children: /* @__PURE__ */ jsxs89(
6505
6546
  Paper,
6506
6547
  {
@@ -6559,7 +6600,7 @@ function CalendarGrid({ state, ...props }) {
6559
6600
  { short: t(texts6.sa), full: t(texts6.saturday) },
6560
6601
  { short: t(texts6.su), full: t(texts6.sunday) }
6561
6602
  ];
6562
- const { showWeekNumbers, onClose } = useContext10(CalendarPopoverContext);
6603
+ const { showWeekNumbers, onClose } = useContext11(CalendarPopoverContext);
6563
6604
  const thCn = cn(
6564
6605
  DateInput_default["calendar__grid-element"],
6565
6606
  typographyStyles_default["text-color--subtle"],
@@ -6744,7 +6785,7 @@ function Calendar(props) {
6744
6785
  nextButtonProps: { onPress: onNext },
6745
6786
  title
6746
6787
  } = useCalendar(props, state);
6747
- const { onClose, closeButtonRef } = useContext11(CalendarPopoverContext);
6788
+ const { onClose, closeButtonRef } = useContext12(CalendarPopoverContext);
6748
6789
  const closeOnKeyboardBlurBack = (event) => {
6749
6790
  var _a;
6750
6791
  if (event.key === "Tab" && event.shiftKey === true) {
@@ -7021,7 +7062,7 @@ var ClearButton = ({
7021
7062
  ClearButton.displayName = "ClearButton";
7022
7063
 
7023
7064
  // src/components/date-inputs/common/DateInput.tsx
7024
- import { useContext as useContext12 } from "react";
7065
+ import { useContext as useContext13 } from "react";
7025
7066
 
7026
7067
  // src/components/helpers/Input/Input.tsx
7027
7068
  import { jsx as jsx248 } from "react/jsx-runtime";
@@ -7111,7 +7152,7 @@ function DateInput({
7111
7152
  ...props
7112
7153
  }) {
7113
7154
  const hasErrorMessage = !!errorMessage;
7114
- const { isOpen } = useContext12(CalendarPopoverContext);
7155
+ const { isOpen } = useContext13(CalendarPopoverContext);
7115
7156
  return /* @__PURE__ */ jsxs93(
7116
7157
  "div",
7117
7158
  {
@@ -7614,9 +7655,9 @@ var DescriptionListGroup = ({
7614
7655
  DescriptionListGroup.displayName = "DescriptionListGroup";
7615
7656
 
7616
7657
  // src/components/DetailList/DetailList.context.tsx
7617
- import { createContext as createContext10, useContext as useContext13 } from "react";
7658
+ import { createContext as createContext10, useContext as useContext14 } from "react";
7618
7659
  var DetailListContext = createContext10({});
7619
- var useDetailListContext = () => useContext13(DetailListContext);
7660
+ var useDetailListContext = () => useContext14(DetailListContext);
7620
7661
 
7621
7662
  // src/components/DetailList/DetailList.module.css
7622
7663
  var DetailList_default = {
@@ -7739,11 +7780,11 @@ DetailListTerm.displayName = "DetailListTerm";
7739
7780
 
7740
7781
  // src/components/Drawer/Drawer.tsx
7741
7782
  import {
7742
- useContext as useContext15,
7783
+ useContext as useContext16,
7743
7784
  useEffect as useEffect19,
7744
7785
  useRef as useRef20
7745
7786
  } from "react";
7746
- import { createPortal as createPortal2 } from "react-dom";
7787
+ import { createPortal as createPortal3 } from "react-dom";
7747
7788
 
7748
7789
  // src/components/Drawer/Drawer.module.css
7749
7790
  var Drawer_default = {
@@ -7760,9 +7801,9 @@ var Drawer_default = {
7760
7801
  };
7761
7802
 
7762
7803
  // src/components/Drawer/Drawer.context.tsx
7763
- import { createContext as createContext11, useContext as useContext14 } from "react";
7804
+ import { createContext as createContext11, useContext as useContext15 } from "react";
7764
7805
  var DrawerContext = createContext11({});
7765
- var useDrawerContext = () => useContext14(DrawerContext);
7806
+ var useDrawerContext = () => useContext15(DrawerContext);
7766
7807
 
7767
7808
  // src/components/Drawer/Drawer.tsx
7768
7809
  import { jsx as jsx262, jsxs as jsxs97 } from "react/jsx-runtime";
@@ -7783,7 +7824,7 @@ var Drawer = ({
7783
7824
  ref,
7784
7825
  ...rest
7785
7826
  }) => {
7786
- const themeContext = useContext15(ThemeContext);
7827
+ const themeContext = useContext16(ThemeContext);
7787
7828
  if (!themeContext) {
7788
7829
  throw new Error("Drawer must be used within a ThemeProvider");
7789
7830
  }
@@ -7911,7 +7952,7 @@ var Drawer = ({
7911
7952
  children: drawer
7912
7953
  }
7913
7954
  ) : drawer;
7914
- return (isOpen || hasTransitionedIn) && portalTarget ? createPortal2(component, portalTarget) : null;
7955
+ return (isOpen || hasTransitionedIn) && portalTarget ? createPortal3(component, portalTarget) : null;
7915
7956
  };
7916
7957
  Drawer.displayName = "Drawer";
7917
7958
 
@@ -9864,14 +9905,14 @@ import { useRef as useRef26 } from "react";
9864
9905
  // src/components/InlineEdit/InlineEdit.context.tsx
9865
9906
  import {
9866
9907
  createContext as createContext12,
9867
- useContext as useContext16,
9908
+ useContext as useContext17,
9868
9909
  useState as useState19
9869
9910
  } from "react";
9870
9911
  import { jsx as jsx293 } from "react/jsx-runtime";
9871
9912
  var InlineEditContext = createContext12(
9872
9913
  {}
9873
9914
  );
9874
- var useInlineEditContext = () => useContext16(InlineEditContext);
9915
+ var useInlineEditContext = () => useContext17(InlineEditContext);
9875
9916
  var InlineEditContextProvider = (props) => {
9876
9917
  const {
9877
9918
  emptiable,
@@ -10530,12 +10571,12 @@ LocalMessage.displayName = "LocalMessage";
10530
10571
 
10531
10572
  // src/components/Modal/Modal.tsx
10532
10573
  import {
10533
- useContext as useContext17,
10574
+ useContext as useContext18,
10534
10575
  useEffect as useEffect25,
10535
10576
  useId as useId20,
10536
10577
  useRef as useRef29
10537
10578
  } from "react";
10538
- import { createPortal as createPortal3 } from "react-dom";
10579
+ import { createPortal as createPortal4 } from "react-dom";
10539
10580
 
10540
10581
  // src/components/Modal/Modal.module.css
10541
10582
  var Modal_default = {
@@ -10577,7 +10618,7 @@ var Modal = ({
10577
10618
  onClose();
10578
10619
  }
10579
10620
  };
10580
- const themeContext = useContext17(ThemeContext);
10621
+ const themeContext = useContext18(ThemeContext);
10581
10622
  if (!themeContext) {
10582
10623
  throw new Error("Modal must be used within a ThemeProvider");
10583
10624
  }
@@ -10599,7 +10640,7 @@ var Modal = ({
10599
10640
  };
10600
10641
  useOnKeyDown(["Escape", "Esc"], () => handleClose());
10601
10642
  const hasTransitionedIn = useMountTransition(isOpen, 200);
10602
- return (isOpen || hasTransitionedIn) && portalTarget ? createPortal3(
10643
+ return (isOpen || hasTransitionedIn) && portalTarget ? createPortal4(
10603
10644
  /* @__PURE__ */ jsx301(
10604
10645
  Backdrop,
10605
10646
  {
@@ -10758,7 +10799,7 @@ function PaginationGenerator(pagesAmount, activePage) {
10758
10799
  // src/components/Select/Select.tsx
10759
10800
  import {
10760
10801
  useCallback as useCallback7,
10761
- useContext as useContext18,
10802
+ useContext as useContext19,
10762
10803
  useId as useId21
10763
10804
  } from "react";
10764
10805
  import {
@@ -11165,7 +11206,7 @@ function Select({
11165
11206
  hideSelectedOptions,
11166
11207
  ...rest
11167
11208
  }) {
11168
- const themeContext = useContext18(ThemeContext);
11209
+ const themeContext = useContext19(ThemeContext);
11169
11210
  if (!themeContext) {
11170
11211
  throw new Error("Select must be used within a ThemeProvider");
11171
11212
  }
@@ -12513,11 +12554,11 @@ var texts23 = createTexts({
12513
12554
 
12514
12555
  // src/components/Popover/Popover.tsx
12515
12556
  import {
12516
- useContext as useContext20,
12557
+ useContext as useContext21,
12517
12558
  useEffect as useEffect28,
12518
12559
  useId as useId24
12519
12560
  } from "react";
12520
- import { createPortal as createPortal4 } from "react-dom";
12561
+ import { createPortal as createPortal5 } from "react-dom";
12521
12562
 
12522
12563
  // src/components/Popover/Popover.module.css
12523
12564
  var Popover_default = {
@@ -12530,10 +12571,10 @@ var Popover_default = {
12530
12571
  // src/components/Popover/Popover.context.tsx
12531
12572
  import {
12532
12573
  createContext as createContext13,
12533
- useContext as useContext19
12574
+ useContext as useContext20
12534
12575
  } from "react";
12535
12576
  var PopoverContext = createContext13({});
12536
- var usePopoverContext = () => useContext19(PopoverContext);
12577
+ var usePopoverContext = () => useContext20(PopoverContext);
12537
12578
 
12538
12579
  // src/components/Popover/Popover.tsx
12539
12580
  import { jsx as jsx309, jsxs as jsxs120 } from "react/jsx-runtime";
@@ -12564,7 +12605,7 @@ var Popover = ({
12564
12605
  });
12565
12606
  const { maxHeight, maxWidth, minHeight, minWidth, height, width } = sizeProps;
12566
12607
  const context = usePopoverContext();
12567
- const themeContext = useContext20(ThemeContext);
12608
+ const themeContext = useContext21(ThemeContext);
12568
12609
  const portalTarget = parentElement != null ? parentElement : themeContext == null ? void 0 : themeContext.el;
12569
12610
  const {
12570
12611
  floatStyling: contextFloatStyling,
@@ -12678,7 +12719,7 @@ var Popover = ({
12678
12719
  ]
12679
12720
  }
12680
12721
  );
12681
- return isOpen || hasTransitionedIn ? portal && portalTarget ? createPortal4(popover, portalTarget) : popover : null;
12722
+ return isOpen || hasTransitionedIn ? portal && portalTarget ? createPortal5(popover, portalTarget) : popover : null;
12682
12723
  };
12683
12724
  Popover.displayName = "Popover";
12684
12725
 
@@ -12781,14 +12822,14 @@ import {
12781
12822
  } from "react";
12782
12823
 
12783
12824
  // src/components/ProgressTracker/ProgressTracker.context.tsx
12784
- import { createContext as createContext14, useContext as useContext21 } from "react";
12825
+ import { createContext as createContext14, useContext as useContext22 } from "react";
12785
12826
  var ProgressTrackerContext = createContext14(
12786
12827
  {
12787
12828
  activeStep: 0,
12788
12829
  direction: "column"
12789
12830
  }
12790
12831
  );
12791
- var useProgressTrackerContext = () => useContext21(ProgressTrackerContext);
12832
+ var useProgressTrackerContext = () => useContext22(ProgressTrackerContext);
12792
12833
 
12793
12834
  // src/components/ProgressTracker/ProgressTracker.module.css
12794
12835
  var ProgressTracker_default = {
@@ -13150,11 +13191,11 @@ import {
13150
13191
  // src/components/Search/AutocompleteSearch.context.tsx
13151
13192
  import {
13152
13193
  createContext as createContext15,
13153
- useContext as useContext22
13194
+ useContext as useContext23
13154
13195
  } from "react";
13155
13196
  var AutocompleteSearchContext = createContext15({});
13156
13197
  var useAutocompleteSearch = () => {
13157
- return useContext22(AutocompleteSearchContext);
13198
+ return useContext23(AutocompleteSearchContext);
13158
13199
  };
13159
13200
 
13160
13201
  // src/components/Search/Search.module.css
@@ -13696,12 +13737,12 @@ import {
13696
13737
  } from "react";
13697
13738
 
13698
13739
  // src/components/Table/collapsible/Table.context.tsx
13699
- import { createContext as createContext16, useContext as useContext23 } from "react";
13740
+ import { createContext as createContext16, useContext as useContext24 } from "react";
13700
13741
  var CollapsibleTableContext = createContext16({
13701
13742
  headerValues: [],
13702
13743
  definingColumnIndex: [0]
13703
13744
  });
13704
- var useCollapsibleTableContext = () => useContext23(CollapsibleTableContext);
13745
+ var useCollapsibleTableContext = () => useContext24(CollapsibleTableContext);
13705
13746
 
13706
13747
  // src/components/Table/normal/Body.tsx
13707
13748
  import { jsx as jsx321 } from "react/jsx-runtime";
@@ -13709,12 +13750,12 @@ var Body = (props) => /* @__PURE__ */ jsx321("tbody", { ...props });
13709
13750
  Body.displayName = "Table.Body";
13710
13751
 
13711
13752
  // src/components/Table/normal/Head.tsx
13712
- import { createContext as createContext17, useContext as useContext24 } from "react";
13753
+ import { createContext as createContext17, useContext as useContext25 } from "react";
13713
13754
  import { jsx as jsx322 } from "react/jsx-runtime";
13714
13755
  var Head = ({ children, ...rest }) => /* @__PURE__ */ jsx322("thead", { ...rest, children: /* @__PURE__ */ jsx322(HeadContext, { value: true, children }) });
13715
13756
  var HeadContext = createContext17(false);
13716
13757
  function useIsInTableHead() {
13717
- const isInTableHead = useContext24(HeadContext);
13758
+ const isInTableHead = useContext25(HeadContext);
13718
13759
  return isInTableHead;
13719
13760
  }
13720
13761
 
@@ -13880,14 +13921,14 @@ Table.displayName = "Table";
13880
13921
 
13881
13922
  // src/components/Table/normal/TableWrapper.tsx
13882
13923
  import {
13883
- useContext as useContext25,
13924
+ useContext as useContext26,
13884
13925
  useEffect as useEffect32,
13885
13926
  useRef as useRef35,
13886
13927
  useState as useState30
13887
13928
  } from "react";
13888
13929
  import { jsx as jsx328 } from "react/jsx-runtime";
13889
13930
  var TableWrapper = ({ className, ...rest }) => {
13890
- const themeContext = useContext25(ThemeContext);
13931
+ const themeContext = useContext26(ThemeContext);
13891
13932
  const container2 = themeContext == null ? void 0 : themeContext.el;
13892
13933
  const containerWidth = container2 ? container2.clientWidth : 0;
13893
13934
  const [overflowX, setOverflowX] = useState30(false);
@@ -14082,7 +14123,7 @@ CollapsibleTable2.Row = CollapsibleRow;
14082
14123
  import { useRef as useRef36 } from "react";
14083
14124
 
14084
14125
  // src/components/Tabs/Tabs.context.tsx
14085
- import { createContext as createContext18, useContext as useContext26 } from "react";
14126
+ import { createContext as createContext18, useContext as useContext27 } from "react";
14086
14127
  var TabsContext = createContext18({
14087
14128
  activeTab: 0,
14088
14129
  tabsId: "",
@@ -14095,7 +14136,7 @@ var TabsContext = createContext18({
14095
14136
  tabContentDirection: "row",
14096
14137
  addTabButtonProps: void 0
14097
14138
  });
14098
- var useTabsContext = () => useContext26(TabsContext);
14139
+ var useTabsContext = () => useContext27(TabsContext);
14099
14140
 
14100
14141
  // src/components/Tabs/Tabs.module.css
14101
14142
  var Tabs_default = {
@@ -14115,7 +14156,7 @@ var Tabs_default = {
14115
14156
  // src/components/Tabs/TabWidthContext.tsx
14116
14157
  import {
14117
14158
  createContext as createContext19,
14118
- useContext as useContext27,
14159
+ useContext as useContext28,
14119
14160
  useLayoutEffect as useLayoutEffect4
14120
14161
  } from "react";
14121
14162
  import { jsx as jsx331 } from "react/jsx-runtime";
@@ -14148,7 +14189,7 @@ function TabWidthContextProvider({
14148
14189
  );
14149
14190
  }
14150
14191
  function useSetTabWidth(index, width) {
14151
- const context = useContext27(TabContext);
14192
+ const context = useContext28(TabContext);
14152
14193
  useLayoutEffect4(() => {
14153
14194
  context == null ? void 0 : context.updateWidth(index, width);
14154
14195
  return () => context == null ? void 0 : context.removeTab(index);
@@ -14797,12 +14838,12 @@ TextInput.displayName = "TextInput";
14797
14838
  import { useId as useId30, useState as useState35 } from "react";
14798
14839
 
14799
14840
  // src/components/ToggleBar/ToggleBar.context.tsx
14800
- import { createContext as createContext20, useContext as useContext28 } from "react";
14841
+ import { createContext as createContext20, useContext as useContext29 } from "react";
14801
14842
  var ToggleBarContext = createContext20({
14802
14843
  size: "medium",
14803
14844
  purpose: "primary"
14804
14845
  });
14805
- var useToggleBarContext = () => useContext28(ToggleBarContext);
14846
+ var useToggleBarContext = () => useContext29(ToggleBarContext);
14806
14847
 
14807
14848
  // src/components/ToggleBar/ToggleBar.module.css
14808
14849
  var ToggleBar_default = {