@shohojdhara/atomix 0.5.4 → 0.5.6

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.
Files changed (57) hide show
  1. package/README.md +43 -21
  2. package/dist/atomix.css +2489 -183
  3. package/dist/atomix.css.map +1 -1
  4. package/dist/atomix.min.css +5 -5
  5. package/dist/atomix.min.css.map +1 -1
  6. package/dist/config.js +2 -5
  7. package/dist/config.js.map +1 -1
  8. package/dist/core.d.ts +100 -8
  9. package/dist/core.js +89 -79
  10. package/dist/core.js.map +1 -1
  11. package/dist/forms.js +1 -7
  12. package/dist/forms.js.map +1 -1
  13. package/dist/heavy.js +7 -3
  14. package/dist/heavy.js.map +1 -1
  15. package/dist/index.d.ts +179 -54
  16. package/dist/index.esm.js +123 -105
  17. package/dist/index.esm.js.map +1 -1
  18. package/dist/index.js +128 -106
  19. package/dist/index.js.map +1 -1
  20. package/dist/index.min.js +1 -1
  21. package/dist/index.min.js.map +1 -1
  22. package/dist/theme.js +0 -4
  23. package/dist/theme.js.map +1 -1
  24. package/package.json +1 -1
  25. package/src/components/Accordion/Accordion.tsx +40 -25
  26. package/src/components/Breadcrumb/Breadcrumb.tsx +22 -13
  27. package/src/components/Button/Button.tsx +4 -5
  28. package/src/components/Callout/Callout.tsx +98 -96
  29. package/src/components/Card/Card.tsx +117 -103
  30. package/src/components/Card/index.ts +7 -5
  31. package/src/components/Dropdown/Dropdown.tsx +27 -8
  32. package/src/components/EdgePanel/EdgePanel.tsx +7 -2
  33. package/src/components/Modal/Modal.tsx +27 -8
  34. package/src/components/Spinner/Spinner.tsx +60 -43
  35. package/src/components/Tabs/Tabs.tsx +163 -149
  36. package/src/lib/composables/useInput.ts +11 -9
  37. package/src/lib/config/loader.ts +5 -2
  38. package/src/lib/types/components.ts +84 -0
  39. package/src/styles/01-settings/_settings.background.scss +35 -5
  40. package/src/styles/02-tools/_tools.background.scss +145 -61
  41. package/src/styles/06-components/_components.accordion.scss +2 -2
  42. package/src/styles/06-components/_components.badge.scss +1 -1
  43. package/src/styles/06-components/_components.button.scss +2 -2
  44. package/src/styles/06-components/_components.callout.scss +2 -2
  45. package/src/styles/06-components/_components.card.scss +3 -3
  46. package/src/styles/06-components/_components.dropdown.scss +1 -1
  47. package/src/styles/06-components/_components.dynamic-background.scss +69 -0
  48. package/src/styles/06-components/_components.edge-panel.scss +2 -2
  49. package/src/styles/06-components/_components.input.scss +3 -3
  50. package/src/styles/06-components/_components.messages.scss +6 -6
  51. package/src/styles/06-components/_components.modal.scss +1 -1
  52. package/src/styles/06-components/_components.navbar.scss +1 -1
  53. package/src/styles/06-components/_components.popover.scss +1 -1
  54. package/src/styles/06-components/_components.toggle.scss +1 -1
  55. package/src/styles/06-components/_components.tooltip.scss +3 -3
  56. package/src/styles/06-components/_index.scss +1 -0
  57. package/src/styles/99-utilities/_utilities.link.scss +4 -5
package/dist/index.esm.js CHANGED
@@ -8,10 +8,6 @@ import { Pause, Play, SkipBack, SkipForward, SpeakerX, SpeakerHigh, Gear, Downlo
8
8
 
9
9
  import { createPortal } from "react-dom";
10
10
 
11
- import { existsSync } from "fs";
12
-
13
- import { join } from "path";
14
-
15
11
  var commonjsGlobal = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {};
16
12
 
17
13
  function getDefaultExportFromCjs(x) {
@@ -4435,29 +4431,30 @@ const AccordionImpl = memo((({title: title, children: children, defaultOpen: de
4435
4431
  }), headerClassNames = generateHeaderClassNames(), panelClassNames = ACCORDION.SELECTORS.PANEL.replace(".", ""), hasCompoundComponents = React.Children.toArray(children).some((child => {
4436
4432
  var _context;
4437
4433
 
4438
- return React.isValidElement(child) && _includesInstanceProperty(_context = [ "AccordionHeader", "AccordionBody" ]).call(_context, child.type.displayName);
4434
+ return React.isValidElement(child) && _includesInstanceProperty(_context = [ "AccordionHeader", "AccordionBody" ]).call(_context, child.type.displayName || "");
4439
4435
  })), content = jsx("div", {
4440
4436
  className: generateClassNames(className) + (glass ? " c-accordion--glass" : ""),
4441
4437
  style: style,
4442
4438
  children: hasCompoundComponents ? React.Children.map(children, (child => {
4443
4439
  if ( React.isValidElement(child)) {
4440
+ const childProps = child.props;
4444
4441
  if ("AccordionHeader" === child.type.displayName)
4445
4442
  return React.cloneElement(child, {
4446
4443
  id: buttonId,
4447
- className: `${headerClassNames} ${child.props.className || ""}`.trim(),
4444
+ className: `${headerClassNames} ${childProps.className || ""}`.trim(),
4448
4445
  onClick: e => {
4449
- toggle(), child.props.onClick?.(e);
4446
+ toggle(), childProps?.onClick?.(e);
4450
4447
  },
4451
4448
  "aria-expanded": state.isOpen,
4452
4449
  "aria-controls": panelId,
4453
4450
  "aria-disabled": disabled,
4454
4451
  disabled: disabled,
4455
- iconPosition: child.props.iconPosition || iconPosition
4452
+ iconPosition: childProps.iconPosition || iconPosition
4456
4453
  });
4457
4454
  if ("AccordionBody" === child.type.displayName)
4458
4455
  return React.cloneElement(child, {
4459
4456
  id: panelId,
4460
- className: `${panelClassNames} ${child.props.className || ""}`.trim(),
4457
+ className: `${panelClassNames} ${childProps.className || ""}`.trim(),
4461
4458
  "aria-labelledby": buttonId,
4462
4459
  panelRef: panelRef,
4463
4460
  contentRef: contentRef
@@ -5137,8 +5134,9 @@ const BreadcrumbComponent = memo((function({items: items, divider: divider, cla
5137
5134
  const childrenCount = Children.count(children);
5138
5135
  content = Children.map(children, ((child, index) => {
5139
5136
  if ( isValidElement(child)) {
5140
- const isLast = index === childrenCount - 1, childProps = child.props, {active: active, linkAs: linkAs, ...otherProps} = childProps;
5141
-
5137
+ const isLast = index === childrenCount - 1, {active: active, linkAs: linkAs, ...otherProps} = child.props;
5138
+ // Extract props from the child element with proper typing
5139
+
5142
5140
  return cloneElement(child, {
5143
5141
  active: active ?? (!!isLast || void 0),
5144
5142
  linkAs: linkAs ?? linkComponent
@@ -5185,7 +5183,7 @@ function useSpinner(initialProps) {
5185
5183
 
5186
5184
  Breadcrumb.displayName = "Breadcrumb", Breadcrumb.Item = BreadcrumbItem;
5187
5185
 
5188
- const Spinner = memo((({size: size = "md", variant: variant = "primary", fullscreen: fullscreen = !1, className: className = "", style: style, glass: glass, "aria-label": ariaLabel, role: role = "status"}) => {
5186
+ const Spinner = memo( forwardRef((({size: size = "md", variant: variant = "primary", fullscreen: fullscreen = !1, className: className = "", style: style, glass: glass, "aria-label": ariaLabel, role: role = "status", "aria-live": ariaLive = "polite", "aria-describe": ariaDescribe, ...rest}, ref) => {
5189
5187
  const {generateSpinnerClass: generateSpinnerClass} = useSpinner({
5190
5188
  size: size,
5191
5189
  variant: variant,
@@ -5196,13 +5194,17 @@ const Spinner = memo((({size: size = "md", variant: variant = "primary", fullsc
5196
5194
  fullscreen: fullscreen,
5197
5195
  className: `${className} ${glass ? "c-spinner--glass" : ""}`.trim()
5198
5196
  }), spinnerContent = jsx("div", {
5197
+ ref: ref,
5199
5198
  className: spinnerClass,
5200
5199
  style: style,
5201
5200
  role: role,
5202
5201
  "aria-label": ariaLabel || "Loading",
5202
+ "aria-live": ariaLive,
5203
+ "aria-describe": ariaDescribe,
5204
+ ...rest,
5203
5205
  children: jsx("span", {
5204
5206
  className: SPINNER.VISUALLY_HIDDEN,
5205
- children: ariaLabel || "Loading..."
5207
+ children: ariaLabel || "Loading content..."
5206
5208
  })
5207
5209
  });
5208
5210
  if (glass) {
@@ -5221,7 +5223,7 @@ const Spinner = memo((({size: size = "md", variant: variant = "primary", fullsc
5221
5223
  });
5222
5224
  }
5223
5225
  return spinnerContent;
5224
- }));
5226
+ })));
5225
5227
 
5226
5228
  Spinner.displayName = "Spinner";
5227
5229
 
@@ -5739,7 +5741,7 @@ const Callout = memo((({title: title, children: children, icon: icon, variant:
5739
5741
  }, calloutContent = React.Children.toArray(children).some((child => {
5740
5742
  var _context3;
5741
5743
 
5742
- return React.isValidElement(child) && _includesInstanceProperty(_context3 = [ "CalloutIcon", "CalloutMessage", "CalloutTitle", "CalloutText", "CalloutActions", "CalloutContent" ]).call(_context3, child.type.displayName);
5744
+ return React.isValidElement(child) && _includesInstanceProperty(_context3 = [ "CalloutIcon", "CalloutMessage", "CalloutTitle", "CalloutText", "CalloutActions", "CalloutContent" ]).call(_context3, child.type.displayName || "");
5743
5745
  })) ? children : jsxs(Fragment, {
5744
5746
  children: [ jsxs("div", {
5745
5747
  className: "c-callout__content",
@@ -5824,7 +5826,66 @@ Callout.Icon = CalloutIcon, Callout.Message = CalloutMessage, Callout.Title = Ca
5824
5826
  Callout.Text = CalloutText, Callout.Actions = CalloutActions, Callout.CloseButton = CalloutCloseButton,
5825
5827
  Callout.Content = CalloutContent;
5826
5828
 
5827
- const Card = React.memo( forwardRef((({
5829
+ const CardHeader = forwardRef((({title: title, subtitle: subtitle, action: action, icon: icon, children: children, className: className = "", ...props}, ref) => {
5830
+ const headerClasses = `${CARD.SELECTORS.HEADER.substring(1)} ${className}`.trim();
5831
+ return jsxs("div", {
5832
+ ref: ref,
5833
+ className: headerClasses,
5834
+ ...props,
5835
+ children: [ icon && jsx("div", {
5836
+ className: CARD.SELECTORS.ICON.substring(1),
5837
+ children: icon
5838
+ }), (title || subtitle) && jsxs("div", {
5839
+ children: [ title && jsx("h3", {
5840
+ className: CARD.SELECTORS.TITLE.substring(1),
5841
+ children: title
5842
+ }), subtitle && jsx("p", {
5843
+ className: CARD.SELECTORS.TEXT.substring(1),
5844
+ children: subtitle
5845
+ }) ]
5846
+ }), action && jsx("div", {
5847
+ className: CARD.SELECTORS.ACTIONS.substring(1),
5848
+ children: action
5849
+ }), children ]
5850
+ });
5851
+ }));
5852
+
5853
+ CardHeader.displayName = "CardHeader";
5854
+
5855
+ const CardBody = forwardRef((({scrollable: scrollable = !1, maxHeight: maxHeight, children: children, className: className = "", style: style, ...props}, ref) => {
5856
+ const bodyClasses = `${CARD.SELECTORS.BODY.substring(1)} ${scrollable ? "c-card__body--scrollable" : ""} ${className}`.trim(), bodyStyle = {
5857
+ ...style,
5858
+ ...scrollable && maxHeight ? {
5859
+ maxHeight: "number" == typeof maxHeight ? `${maxHeight}px` : maxHeight,
5860
+ overflowY: "auto"
5861
+ } : {}
5862
+ };
5863
+ return jsx("div", {
5864
+ ref: ref,
5865
+ className: bodyClasses,
5866
+ style: bodyStyle,
5867
+ ...props,
5868
+ children: children
5869
+ });
5870
+ }));
5871
+
5872
+ CardBody.displayName = "CardBody";
5873
+
5874
+ const CardFooter = forwardRef((({align: align, children: children, className: className = "", style: style, ...props}, ref) => {
5875
+ const footerClasses = `${CARD.SELECTORS.FOOTER.substring(1)} ${align ? `c-card__footer--align-${align}` : ""} ${className}`.trim();
5876
+ return jsx("div", {
5877
+ ref: ref,
5878
+ className: footerClasses,
5879
+ style: style,
5880
+ ...props,
5881
+ children: children
5882
+ });
5883
+ }));
5884
+
5885
+ CardFooter.displayName = "CardFooter";
5886
+
5887
+ // Main Card component implementation
5888
+ const CardImpl = React.memo( forwardRef((({
5828
5889
  // Variants
5829
5890
  size: size = "md", variant: variant = "", appearance: appearance = "filled", elevation: elevation = "none", hoverable: hoverable = !1, hoverElevation: hoverElevation = "md",
5830
5891
  // Layout
@@ -5955,75 +6016,15 @@ className: className = "", style: style, ...rest}, ref) => {
5955
6016
  }) : divElement;
5956
6017
  })));
5957
6018
 
5958
- Card.displayName = "Card";
6019
+ CardImpl.displayName = "Card";
5959
6020
 
5960
- const CardHeader = forwardRef((({title: title, subtitle: subtitle, action: action, icon: icon, children: children, className: className = "", ...props}, ref) => {
5961
- const headerClasses = `${CARD.SELECTORS.HEADER.substring(1)} ${className}`.trim();
5962
- return jsxs("div", {
5963
- ref: ref,
5964
- className: headerClasses,
5965
- ...props,
5966
- children: [ icon && jsx("div", {
5967
- className: CARD.SELECTORS.ICON.substring(1),
5968
- children: icon
5969
- }), (title || subtitle) && jsxs("div", {
5970
- children: [ title && jsx("h3", {
5971
- className: CARD.SELECTORS.TITLE.substring(1),
5972
- children: title
5973
- }), subtitle && jsx("p", {
5974
- className: CARD.SELECTORS.TEXT.substring(1),
5975
- children: subtitle
5976
- }) ]
5977
- }), action && jsx("div", {
5978
- className: CARD.SELECTORS.ACTIONS.substring(1),
5979
- children: action
5980
- }), children ]
5981
- });
5982
- }));
6021
+ // Create compound component with proper typing
6022
+ const CardWithSubcomponents = CardImpl;
5983
6023
 
5984
- CardHeader.displayName = "CardHeader";
6024
+ CardWithSubcomponents.Header = CardHeader, CardWithSubcomponents.Body = CardBody,
6025
+ CardWithSubcomponents.Footer = CardFooter;
5985
6026
 
5986
- const CardBody = forwardRef((({scrollable: scrollable = !1, maxHeight: maxHeight, children: children, className: className = "", style: style, ...props}, ref) => {
5987
- const bodyClasses = `${CARD.SELECTORS.BODY.substring(1)} ${scrollable ? "c-card__body--scrollable" : ""} ${className}`.trim(), bodyStyle = {
5988
- ...style,
5989
- ...scrollable && maxHeight ? {
5990
- maxHeight: "number" == typeof maxHeight ? `${maxHeight}px` : maxHeight,
5991
- overflowY: "auto"
5992
- } : {}
5993
- };
5994
- return jsx("div", {
5995
- ref: ref,
5996
- className: bodyClasses,
5997
- style: bodyStyle,
5998
- ...props,
5999
- children: children
6000
- });
6001
- }));
6002
-
6003
- CardBody.displayName = "CardBody";
6004
-
6005
- const CardFooter = forwardRef((({align: align, children: children, className: className = "", style: style, ...props}, ref) => {
6006
- const footerClasses = `${CARD.SELECTORS.FOOTER.substring(1)} ${align ? `c-card__footer--align-${align}` : ""} ${className}`.trim();
6007
- return jsx("div", {
6008
- ref: ref,
6009
- className: footerClasses,
6010
- style: style,
6011
- ...props,
6012
- children: children
6013
- });
6014
- }));
6015
-
6016
- CardFooter.displayName = "CardFooter",
6017
- // Attach subcomponents to Card
6018
- Card.Header = CardHeader, Card.Body = CardBody, Card.Footer = CardFooter;
6019
-
6020
- /**
6021
- * Hook for managing Card component state and behaviors
6022
- *
6023
- * @param options - Configuration options for the card
6024
- * @returns Card state and handlers
6025
- */
6026
- const ElevationCard = ({elevationClass: elevationClass = "is-elevated", className: className = "", style: style, children: children, onClick: onClick, ...props}) => {
6027
+ const Card = CardWithSubcomponents, ElevationCard = ({elevationClass: elevationClass = "is-elevated", className: className = "", style: style, children: children, onClick: onClick, ...props}) => {
6027
6028
  const {getCardProps: getCardProps} = ((options = {}) => {
6028
6029
  const {elevationEffect: elevationEffect = !1, elevationClass: elevationClass = CARD.CLASSES.ACTIVE, flipEffect: flipEffect = !1, flipTrigger: flipTrigger = "click", focusEffect: focusEffect = !1, clickable: clickable = !1, onClick: onClick} = options, cardRef = useRef(null), frontRef = useRef(null), backRef = useRef(null), [isFlipped, setIsFlipped] = useState(!1), [isElevated, setIsElevated] = useState(!1), [isFocused, setIsFocused] = useState(!1), [isHovered, setIsHovered] = useState(!1), handleClick = useCallback((event => {
6029
6030
  flipEffect && "click" === flipTrigger && setIsFlipped((prev => !prev)), onClick && onClick(event);
@@ -6094,6 +6095,12 @@ const ElevationCard = ({elevationClass: elevationClass = "is-elevated", classNam
6094
6095
  });
6095
6096
  };
6096
6097
 
6098
+ /**
6099
+ * Hook for managing Card component state and behaviors
6100
+ *
6101
+ * @param options - Configuration options for the card
6102
+ * @returns Card state and handlers
6103
+ */
6097
6104
  /**
6098
6105
  * Comprehensive chart hook with shared functionality
6099
6106
  * @param initialProps - Initial chart properties
@@ -10844,23 +10851,29 @@ const DropdownStyleContext = createContext({}), Dropdown = memo((function({chi
10844
10851
  React.Children.toArray(children).some((child => {
10845
10852
  var _context;
10846
10853
 
10847
- return React.isValidElement(child) && _includesInstanceProperty(_context = [ "DropdownTrigger", "DropdownMenu" ]).call(_context, child.type.displayName);
10854
+ return React.isValidElement(child) && _includesInstanceProperty(_context = [ "DropdownTrigger", "DropdownMenu" ]).call(_context, child.type.displayName || "");
10848
10855
  })) ?
10849
10856
  // Find Trigger and Menu in children
10850
10857
  React.Children.forEach(children, (child => {
10851
- React.isValidElement(child) && ("DropdownTrigger" === child.type.displayName ? triggerContent = React.cloneElement(child, {
10852
- ref: toggleRef,
10853
- onClick: e => {
10854
- handleToggleClick(e), child.props.onClick?.(e);
10855
- },
10856
- onKeyDown: e => {
10857
- handleToggleKeyDown(e), child.props.onKeyDown?.(e);
10858
- },
10859
- "aria-haspopup": "menu",
10860
- "aria-expanded": isOpen,
10861
- "aria-controls": dropdownId,
10862
- tabIndex: 0
10863
- }) : "DropdownMenu" === child.type.displayName && (menuContentNode = child));
10858
+ if ( React.isValidElement(child)) {
10859
+ const component = child.type;
10860
+ if ("DropdownTrigger" === component.displayName) {
10861
+ const triggerProps = {
10862
+ ref: toggleRef,
10863
+ onClick: e => {
10864
+ handleToggleClick(e), child.props.onClick?.(e);
10865
+ },
10866
+ onKeyDown: e => {
10867
+ handleToggleKeyDown(e), child.props.onKeyDown?.(e);
10868
+ },
10869
+ "aria-haspopup": "menu",
10870
+ "aria-expanded": isOpen,
10871
+ "aria-controls": dropdownId,
10872
+ tabIndex: 0
10873
+ };
10874
+ triggerContent = React.cloneElement(child, triggerProps);
10875
+ } else "DropdownMenu" === component.displayName && (menuContentNode = child);
10876
+ }
10864
10877
  })) : (
10865
10878
  // Legacy mode
10866
10879
  triggerContent = jsx("div", {
@@ -12234,7 +12247,7 @@ const EdgePanel = memo((({title: title, children: children, position: position
12234
12247
  }, panelContent = React.Children.toArray(children).some((child => {
12235
12248
  var _context;
12236
12249
 
12237
- return React.isValidElement(child) && _includesInstanceProperty(_context = [ "EdgePanelHeader", "EdgePanelBody", "EdgePanelFooter" ]).call(_context, child.type.displayName);
12250
+ return React.isValidElement(child) && _includesInstanceProperty(_context = [ "EdgePanelHeader", "EdgePanelBody", "EdgePanelFooter" ]).call(_context, child.type.displayName || "");
12238
12251
  })) ? children : jsxs(Fragment, {
12239
12252
  children: [ jsxs("div", {
12240
12253
  className: "c-edge-panel__header",
@@ -12400,11 +12413,6 @@ const FormGroup = ({children: children, label: label, helperText: helperText, ht
12400
12413
  });
12401
12414
  };
12402
12415
 
12403
- /**
12404
- * Input state and functionality
12405
- * @param initialProps - Initial input properties
12406
- * @returns Input state and methods
12407
- */
12408
12416
  function useInput(initialProps) {
12409
12417
  // Default input properties
12410
12418
  const defaultProps = {
@@ -15363,11 +15371,12 @@ const ModalImpl = memo((({children: children, isOpen: isOpen = !1, onOpenChange
15363
15371
  const modalClasses = [ "c-modal", isOpenState ? MODAL.CLASSES.IS_OPEN : "", size ? `c-modal--${size}` : "", glass ? "c-modal--glass" : "", className ].filter(Boolean).join(" "), hasCompoundComponents = React.Children.toArray(children).some((child => {
15364
15372
  var _context;
15365
15373
 
15366
- return React.isValidElement(child) && _includesInstanceProperty(_context = [ "ModalHeader", "ModalBody", "ModalFooter" ]).call(_context, child.type.displayName);
15374
+ return React.isValidElement(child) && _includesInstanceProperty(_context = [ "ModalHeader", "ModalBody", "ModalFooter" ]).call(_context, child.type.displayName || "");
15367
15375
  })), modalContent = jsx("div", {
15368
15376
  className: "c-modal__content",
15369
15377
  ref: contentRef,
15370
15378
  children: hasCompoundComponents ? React.Children.map(children, (child => React.isValidElement(child) && "ModalHeader" === child.type.displayName ? React.cloneElement(child, {
15379
+ ...child.props,
15371
15380
  onClose: child.props.onClose || close,
15372
15381
  id: titleId
15373
15382
  }) : child)) : jsxs(Fragment, {
@@ -21257,6 +21266,12 @@ function createTokens(overrides) {
21257
21266
  * @returns DesignTokens from theme configuration
21258
21267
  * @throws Error if config loading is not available in browser environment
21259
21268
  */
21269
+ /**
21270
+ * Atomix Config Loader
21271
+ *
21272
+ * Helper functions to load atomix.config.ts from external projects.
21273
+ * Now also supports atomix.config.js and atomix.config.json
21274
+ */
21260
21275
  /**
21261
21276
  * Validate Atomix configuration structure
21262
21277
  *
@@ -21437,8 +21452,11 @@ function validateConfig$1(config) {
21437
21452
  */ function resolveConfigPath(configPath) {
21438
21453
  // In browser environments, config resolution is not possible
21439
21454
  if ("undefined" != typeof window) return null;
21440
- // If a specific config path is provided, check if it exists
21441
- if (configPath) {
21455
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
21456
+ const {existsSync: existsSync} = require("fs"), {join: join} = require("path");
21457
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
21458
+ // If a specific config path is provided, check if it exists
21459
+ if (configPath) {
21442
21460
  const absPath = join(process.cwd(), configPath);
21443
21461
  return existsSync(absPath) ? absPath : null;
21444
21462
  }