ptechcore_ui 1.0.86 → 1.0.87

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.cjs CHANGED
@@ -229,14 +229,15 @@ var PrimaryButton = ({
229
229
  children,
230
230
  classname = "",
231
231
  variant = "full",
232
+ type = "button",
232
233
  ...props
233
234
  }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
234
235
  "button",
235
236
  {
236
- type: "submit",
237
+ ...props,
238
+ type,
237
239
  disabled: loading || props.disabled,
238
240
  className: `px-4 py-2 text-sm rounded-lg hover:opacity-80 transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex justify-center items-center ${classname} ${variant === "full" ? "bg-[var(--color-primary)] text-[var(--color-text-inverse)]" : variant === "outline" ? "border border-[var(--color-primary)] text-[var(--color-primary)] bg-transparent" : variant === "ghost" ? "bg-transparent text-[var(--color-text-secondary)] hover:bg-[var(--color-background-secondary)]" : "bg-transparent text-[var(--color-primary)]"}`,
239
- ...props,
240
241
  children: loading ? "Chargement..." : children
241
242
  }
242
243
  );
@@ -19935,7 +19936,9 @@ var FormPurchaseRequest = ({
19935
19936
  PrimaryButton,
19936
19937
  {
19937
19938
  type: "button",
19938
- onClick: () => {
19939
+ onClick: (e) => {
19940
+ e.preventDefault();
19941
+ e.stopPropagation();
19939
19942
  const currentIndex = tabs.findIndex((t) => t.id === activeTab);
19940
19943
  if (currentIndex < tabs.length - 1) {
19941
19944
  setActiveTab(tabs[currentIndex + 1].id);
@@ -20933,7 +20936,10 @@ var PurchaseRequestsPage = () => {
20933
20936
  FormPurchaseRequest,
20934
20937
  {
20935
20938
  isOpen: showModal,
20936
- onClose: () => setShowModal(false),
20939
+ onClose: () => {
20940
+ setShowModal(false);
20941
+ setSelectedPurchaseRequest(null);
20942
+ },
20937
20943
  refresh: loadPurchaseRequests,
20938
20944
  object: selectedPurchaseRequest
20939
20945
  },
package/dist/index.js CHANGED
@@ -5,14 +5,15 @@ var PrimaryButton = ({
5
5
  children,
6
6
  classname = "",
7
7
  variant = "full",
8
+ type = "button",
8
9
  ...props
9
10
  }) => /* @__PURE__ */ jsx(
10
11
  "button",
11
12
  {
12
- type: "submit",
13
+ ...props,
14
+ type,
13
15
  disabled: loading || props.disabled,
14
16
  className: `px-4 py-2 text-sm rounded-lg hover:opacity-80 transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex justify-center items-center ${classname} ${variant === "full" ? "bg-[var(--color-primary)] text-[var(--color-text-inverse)]" : variant === "outline" ? "border border-[var(--color-primary)] text-[var(--color-primary)] bg-transparent" : variant === "ghost" ? "bg-transparent text-[var(--color-text-secondary)] hover:bg-[var(--color-background-secondary)]" : "bg-transparent text-[var(--color-primary)]"}`,
15
- ...props,
16
17
  children: loading ? "Chargement..." : children
17
18
  }
18
19
  );
@@ -19912,7 +19913,9 @@ var FormPurchaseRequest = ({
19912
19913
  PrimaryButton,
19913
19914
  {
19914
19915
  type: "button",
19915
- onClick: () => {
19916
+ onClick: (e) => {
19917
+ e.preventDefault();
19918
+ e.stopPropagation();
19916
19919
  const currentIndex = tabs.findIndex((t) => t.id === activeTab);
19917
19920
  if (currentIndex < tabs.length - 1) {
19918
19921
  setActiveTab(tabs[currentIndex + 1].id);
@@ -20910,7 +20913,10 @@ var PurchaseRequestsPage = () => {
20910
20913
  FormPurchaseRequest,
20911
20914
  {
20912
20915
  isOpen: showModal,
20913
- onClose: () => setShowModal(false),
20916
+ onClose: () => {
20917
+ setShowModal(false);
20918
+ setSelectedPurchaseRequest(null);
20919
+ },
20914
20920
  refresh: loadPurchaseRequests,
20915
20921
  object: selectedPurchaseRequest
20916
20922
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ptechcore_ui",
3
- "version": "1.0.86",
3
+ "version": "1.0.87",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",