@equinor/echo-components 0.12.5 → 0.12.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/echo-components",
3
- "version": "0.12.5",
3
+ "version": "0.12.7",
4
4
  "dependencies": {
5
5
  "chart.js": "4.4.9",
6
6
  "react-datepicker": "7.5.0",
@@ -21,5 +21,5 @@
21
21
  },
22
22
  "main": "./index.cjs.js",
23
23
  "type": "commonjs",
24
- "types": "./index.cjs.d.ts"
24
+ "types": "./index.d.ts"
25
25
  }
@@ -1,15 +1,27 @@
1
1
  import React from 'react';
2
2
  interface AccordionWithSwitchProps {
3
+ /** Title of the accordion */
3
4
  title: string;
5
+ /** Description of the accordion */
4
6
  description: string;
7
+ /** Function to handle the switch click event */
5
8
  handleSwitchClick: () => void;
9
+ /** Optional children to be rendered inside the accordion */
6
10
  children?: React.ReactNode;
11
+ /** Optional heading for the description section */
7
12
  descriptionHeading?: string;
13
+ /** Optional prop for disabling the accordion if true */
14
+ disableAccordionOnSwitchOff?: boolean;
15
+ /** Optional prop to control the expanded state of the accordion */
8
16
  isExpanded?: boolean;
17
+ /** Optional prop to control the toggle state of the switch */
9
18
  isToggledOn?: boolean;
19
+ /** Optional aria label for the switch */
10
20
  switchAriaLabel?: string;
21
+ /** Optional prop to disable the switch */
11
22
  switchDisabled?: boolean;
23
+ /** Optional warning element to be displayed */
12
24
  warning?: JSX.Element;
13
25
  }
14
- export declare const AccordionWithSwitch: ({ title, description, handleSwitchClick, children, descriptionHeading, isExpanded, isToggledOn, switchDisabled, switchAriaLabel, warning }: AccordionWithSwitchProps) => import("react/jsx-runtime").JSX.Element;
26
+ export declare const AccordionWithSwitch: ({ title, description, handleSwitchClick, children, descriptionHeading, disableAccordionOnSwitchOff, isExpanded, isToggledOn, switchDisabled, switchAriaLabel, warning }: AccordionWithSwitchProps) => import("react/jsx-runtime").JSX.Element;
15
27
  export {};
@@ -47,6 +47,7 @@ export * from './secondaryMarker/SecondaryMarker';
47
47
  export * from './secondaryMarker/SecondaryMarkerExpander';
48
48
  export * from './secondaryMarker/SecondaryMarkerWithChip';
49
49
  export * from './secondaryMarker/SecondaryMarkerWrapper';
50
+ export * from './selectTextOnFocusAutocomplete/SelectTextOnFocusAutocomplete';
50
51
  export * from './sidebarButton/SidebarButton';
51
52
  export * from './sidesheet';
52
53
  export * from './splitView';
@@ -0,0 +1,19 @@
1
+ import { Autocomplete } from '@equinor/eds-core-react';
2
+ import React from 'react';
3
+ interface SelectTextOnFocusAutocompleteProps<T> extends Omit<React.ComponentProps<typeof Autocomplete<T>>, 'ref'> {
4
+ ariaPressed?: boolean;
5
+ style?: React.CSSProperties;
6
+ wrapperClassName?: string;
7
+ children?: React.ReactNode;
8
+ }
9
+ /**
10
+ * A reusable component that wraps the EDS Autocomplete in a button.
11
+ * When the button is clicked or activated with keyboard (Enter/Space),
12
+ * the input inside the Autocomplete is automatically focused and its text is selected.
13
+ *
14
+ * @template T - The type of the Autocomplete options.
15
+ * @param props - All Autocomplete props (except 'ref'), plus optional ariaPressed, style, and className for the button.
16
+ * @returns A button-wrapped Autocomplete with auto-select-on-focus behavior.
17
+ */
18
+ export declare function SelectTextOnFocusAutocomplete<T>(props: Readonly<SelectTextOnFocusAutocompleteProps<T>>): import("react/jsx-runtime").JSX.Element;
19
+ export {};
@@ -1,4 +1,9 @@
1
1
  export declare const themeConst: {
2
+ xSmall: string;
3
+ small: string;
4
+ medium: string;
5
+ large: string;
6
+ xLarge: string;
2
7
  weakLightGray: string;
3
8
  weakGrey: string;
4
9
  weakBlue: string;
@@ -57,6 +62,7 @@ export declare const themeConst: {
57
62
  readonly equiGreen3: string;
58
63
  equiGreen4: string;
59
64
  echoText: string;
65
+ noColor: string;
60
66
  disabledBackgroundColor: string;
61
67
  disabledColor: string;
62
68
  readonly pm01: string;
@@ -124,6 +130,7 @@ export declare const themeConst: {
124
130
  readonly toggleInactive: string;
125
131
  hoverIcon: string;
126
132
  readonly hoverIconWithNotification: string;
133
+ eqEchoFontFamily: string;
127
134
  tertiaryText: string;
128
135
  secondaryText: string;
129
136
  backgroundDark: string;
File without changes