@oliasoft-open-source/react-ui-library 4.16.0 → 4.16.1-beta-2

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/README.md CHANGED
@@ -37,7 +37,7 @@ To quickly start a new project using the React UI Library with Vite, you can use
37
37
  ```bash
38
38
  cd my-new-project
39
39
  ```
40
-
40
+
41
41
  3. **Install React UI Library: Add the React UI Library to your project:**
42
42
 
43
43
  ```bash
@@ -48,13 +48,13 @@ To quickly start a new project using the React UI Library with Vite, you can use
48
48
  ```bash
49
49
  yarn add @oliasoft-open-source/react-ui-library
50
50
  ```
51
-
51
+
52
52
  4. **Modify the Sample Page:** Open the src/App.jsx file and import a component from the React UI Library to use it:
53
53
 
54
54
  ```bash
55
55
  import React from 'react';
56
56
  import { Text } from '@oliasoft-open-source/react-ui-library';
57
-
57
+
58
58
  function App() {
59
59
  return (
60
60
  <div className="App">
@@ -62,7 +62,7 @@ To quickly start a new project using the React UI Library with Vite, you can use
62
62
  </div>
63
63
  );
64
64
  }
65
-
65
+
66
66
  export default App;
67
67
  ```
68
68
 
@@ -358,6 +358,7 @@ The `Button` component is a versatile interface element that supports various st
358
358
  | `disabled` | If true, disables the button. | `false` |
359
359
  | `groupOrder` | Specifies the button's position in a group (e.g., start, middle, end). | None (optional) |
360
360
  | `icon` | An icon to be displayed on the button. Deprecated in favor of using `label`. | None (optional) |
361
+ | `ignoreDisabledContext` | Allows the button to be enabled even when inside `DisabledContext`. | `false` |
361
362
  | `label` | The content of the button, which can be text or a ReactNode. | None (optional) |
362
363
  | `loading` | Shows an activity indicator, suggesting that an action is in progress. | `false` |
363
364
  | `name` | The name of the button, which can be used in forms. | None (optional) |
package/dist/index.d.ts CHANGED
@@ -43,7 +43,7 @@ export declare enum BreadcrumbLinkType {
43
43
  CUSTOM = "custom"
44
44
  }
45
45
 
46
- export declare const Button: ({ active, basic, colored, disabled, groupOrder, icon, label, loading, name, pill, round, small, styles, width, title, type, onClick, error, warning, testId, tooltip, inverted, component: Component, url, }: IButtonProps) => JSX_2.Element;
46
+ export declare const Button: ({ active, basic, colored, disabled, ignoreDisabledContext, groupOrder, icon, label, loading, name, pill, round, small, styles, width, title, type, onClick, error, warning, testId, tooltip, inverted, component: Component, url, }: IButtonProps) => JSX_2.Element;
47
47
 
48
48
  export declare const ButtonGroup: (props: IButtonGroupProps) => JSX_2.Element;
49
49
 
@@ -206,6 +206,7 @@ export declare interface IButtonProps {
206
206
  basic?: boolean;
207
207
  colored?: boolean | string;
208
208
  disabled?: boolean;
209
+ ignoreDisabledContext?: boolean;
209
210
  groupOrder?: string | null;
210
211
  icon?: ReactNode | string;
211
212
  label?: ReactNode | string | null;
package/dist/index.js CHANGED
@@ -4078,6 +4078,7 @@ const Button$1 = ({
4078
4078
  basic: basic2 = false,
4079
4079
  colored: colored2 = false,
4080
4080
  disabled: disabled2 = false,
4081
+ ignoreDisabledContext = false,
4081
4082
  groupOrder = null,
4082
4083
  icon: icon2 = null,
4083
4084
  label: label2 = "",
@@ -4133,6 +4134,7 @@ const Button$1 = ({
4133
4134
  }
4134
4135
  return "";
4135
4136
  })();
4137
+ const isDisabled = disabled2 || disabledContext && !ignoreDisabledContext;
4136
4138
  return /* @__PURE__ */ jsx(ButtonTooltipWrapper, { tooltip: tooltip2, children: /* @__PURE__ */ jsxs(
4137
4139
  Component2,
4138
4140
  {
@@ -4142,7 +4144,7 @@ const Button$1 = ({
4142
4144
  active2 ? buttonStyles.active : "",
4143
4145
  basic2 ? buttonStyles.basic : "",
4144
4146
  color2,
4145
- disabled2 || disabledContext ? buttonStyles.disabled : "",
4147
+ isDisabled ? buttonStyles.disabled : "",
4146
4148
  (icon2 || loading) && !label2 ? buttonStyles.iconOnly : "",
4147
4149
  inverted2 ? buttonStyles.inverted : "",
4148
4150
  order2,
@@ -4151,7 +4153,7 @@ const Button$1 = ({
4151
4153
  small2 ? buttonStyles.small : "",
4152
4154
  styles2
4153
4155
  ),
4154
- disabled: disabled2 || disabledContext,
4156
+ disabled: isDisabled,
4155
4157
  name: name2 ?? "",
4156
4158
  onClick,
4157
4159
  ...title2 ? { title: title2 } : {},
@@ -6688,7 +6690,8 @@ const Dialog = ({ dialog: dialog2 }) => {
6688
6690
  small: true,
6689
6691
  colored: "muted",
6690
6692
  onClick: onClose,
6691
- testId: testId && `${testId}-dismiss`
6693
+ testId: testId && `${testId}-dismiss`,
6694
+ ignoreDisabledContext: true
6692
6695
  }
6693
6696
  ) }) : null
6694
6697
  ] }),