@optiaxiom/proteus 0.1.22 → 0.1.23

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/esm/index.js CHANGED
@@ -1,5 +1,4 @@
1
1
  export { ProteusAction } from './proteus-action/ProteusAction.js';
2
- export { ProteusCancelAction } from './proteus-action/ProteusCancelAction.js';
3
2
  export { ProteusChart } from './proteus-chart/ProteusChart.js';
4
3
  export { ProteusDataTable } from './proteus-data-table/ProteusDataTable.js';
5
4
  export { ProteusDocumentRenderer } from './proteus-document/ProteusDocumentRenderer.js';
@@ -5,7 +5,6 @@ import { Time, Range } from '@optiaxiom/react/unstable';
5
5
  import { lazy, Suspense } from 'react';
6
6
  import { IconCalendar } from '../icons/IconCalendar.js';
7
7
  import { ProteusAction } from '../proteus-action/ProteusAction.js';
8
- import { ProteusCancelAction } from '../proteus-action/ProteusCancelAction.js';
9
8
  import { ProteusDataTable } from '../proteus-data-table/ProteusDataTable.js';
10
9
  import { useProteusDocumentContext } from '../proteus-document/ProteusDocumentContext.js';
11
10
  import { useProteusDocumentPathContext } from '../proteus-document/ProteusDocumentPathContext.js';
@@ -66,8 +65,8 @@ const ProteusElement = ({
66
65
  return /* @__PURE__ */ jsx(Avatar, { ...resolve(element) });
67
66
  case "Badge":
68
67
  return /* @__PURE__ */ jsx(Badge, { ...resolve(element) });
69
- case "CancelAction":
70
- return /* @__PURE__ */ jsx(ProteusCancelAction, { ...resolve(element) });
68
+ case "Button":
69
+ return /* @__PURE__ */ jsx(ProteusAction, { ...resolve(element) });
71
70
  case "Card":
72
71
  return /* @__PURE__ */ jsx(Card, { ...resolve(element) });
73
72
  case "CardHeader":
@@ -2704,7 +2704,7 @@ var definitions = {
2704
2704
  $ref: "#/definitions/ProteusBadge"
2705
2705
  },
2706
2706
  {
2707
- $ref: "#/definitions/ProteusCancelAction"
2707
+ $ref: "#/definitions/ProteusButton"
2708
2708
  },
2709
2709
  {
2710
2710
  $ref: "#/definitions/ProteusCard"
@@ -3703,17 +3703,18 @@ var definitions = {
3703
3703
  ],
3704
3704
  type: "object"
3705
3705
  },
3706
- ProteusCancelAction: {
3706
+ ProteusButton: {
3707
3707
  additionalProperties: false,
3708
3708
  examples: [
3709
3709
  {
3710
- $type: "CancelAction",
3711
- children: "Cancel"
3710
+ $type: "Button",
3711
+ appearance: "primary",
3712
+ children: "Action"
3712
3713
  }
3713
3714
  ],
3714
3715
  properties: {
3715
3716
  $type: {
3716
- "const": "CancelAction"
3717
+ "const": "Button"
3717
3718
  },
3718
3719
  alignItems: {
3719
3720
  $ref: "#/definitions/SprinkleProp_alignItems"
@@ -3724,6 +3725,38 @@ var definitions = {
3724
3725
  animation: {
3725
3726
  $ref: "#/definitions/SprinkleProp_animation"
3726
3727
  },
3728
+ appearance: {
3729
+ anyOf: [
3730
+ {
3731
+ "const": "default"
3732
+ },
3733
+ {
3734
+ "const": "danger"
3735
+ },
3736
+ {
3737
+ "const": "primary"
3738
+ },
3739
+ {
3740
+ "const": "subtle"
3741
+ },
3742
+ {
3743
+ "const": "danger-outline"
3744
+ },
3745
+ {
3746
+ "const": "default-opal"
3747
+ },
3748
+ {
3749
+ "const": "inverse"
3750
+ },
3751
+ {
3752
+ "const": "primary-opal"
3753
+ },
3754
+ {
3755
+ $ref: "#/definitions/ProteusExpression"
3756
+ }
3757
+ ],
3758
+ description: "Control the appearance by selecting between the different button types."
3759
+ },
3727
3760
  backgroundImage: {
3728
3761
  $ref: "#/definitions/SprinkleProp_backgroundImage"
3729
3762
  },
@@ -3880,6 +3913,23 @@ var definitions = {
3880
3913
  transition: {
3881
3914
  $ref: "#/definitions/SprinkleProp_transition"
3882
3915
  },
3916
+ type: {
3917
+ anyOf: [
3918
+ {
3919
+ "const": "button"
3920
+ },
3921
+ {
3922
+ "const": "reset"
3923
+ },
3924
+ {
3925
+ "const": "submit"
3926
+ },
3927
+ {
3928
+ $ref: "#/definitions/ProteusExpression"
3929
+ }
3930
+ ],
3931
+ description: "The default behavior of the button."
3932
+ },
3883
3933
  w: {
3884
3934
  $ref: "#/definitions/SprinkleProp_w"
3885
3935
  },
@@ -3889,9 +3939,9 @@ var definitions = {
3889
3939
  z: {
3890
3940
  $ref: "#/definitions/SprinkleProp_z"
3891
3941
  },
3892
- placeholder: {
3893
- description: "Placeholder text for the text input field",
3894
- type: "string"
3942
+ onClick: {
3943
+ $ref: "#/definitions/ProteusEventHandler",
3944
+ description: "Action triggered when button is clicked"
3895
3945
  }
3896
3946
  },
3897
3947
  required: [
@@ -2692,7 +2692,7 @@ var definitions = {
2692
2692
  $ref: "#/definitions/ProteusBadge"
2693
2693
  },
2694
2694
  {
2695
- $ref: "#/definitions/ProteusCancelAction"
2695
+ $ref: "#/definitions/ProteusButton"
2696
2696
  },
2697
2697
  {
2698
2698
  $ref: "#/definitions/ProteusCard"
@@ -3683,16 +3683,17 @@ var definitions = {
3683
3683
  ],
3684
3684
  type: "object"
3685
3685
  },
3686
- ProteusCancelAction: {
3686
+ ProteusButton: {
3687
3687
  examples: [
3688
3688
  {
3689
- $type: "CancelAction",
3690
- children: "Cancel"
3689
+ $type: "Button",
3690
+ appearance: "primary",
3691
+ children: "Action"
3691
3692
  }
3692
3693
  ],
3693
3694
  properties: {
3694
3695
  $type: {
3695
- "const": "CancelAction"
3696
+ "const": "Button"
3696
3697
  },
3697
3698
  alignItems: {
3698
3699
  $ref: "#/definitions/SprinkleProp_alignItems"
@@ -3703,6 +3704,38 @@ var definitions = {
3703
3704
  animation: {
3704
3705
  $ref: "#/definitions/SprinkleProp_animation"
3705
3706
  },
3707
+ appearance: {
3708
+ anyOf: [
3709
+ {
3710
+ "const": "default"
3711
+ },
3712
+ {
3713
+ "const": "danger"
3714
+ },
3715
+ {
3716
+ "const": "primary"
3717
+ },
3718
+ {
3719
+ "const": "subtle"
3720
+ },
3721
+ {
3722
+ "const": "danger-outline"
3723
+ },
3724
+ {
3725
+ "const": "default-opal"
3726
+ },
3727
+ {
3728
+ "const": "inverse"
3729
+ },
3730
+ {
3731
+ "const": "primary-opal"
3732
+ },
3733
+ {
3734
+ $ref: "#/definitions/ProteusExpression"
3735
+ }
3736
+ ],
3737
+ description: "Control the appearance by selecting between the different button types."
3738
+ },
3706
3739
  backgroundImage: {
3707
3740
  $ref: "#/definitions/SprinkleProp_backgroundImage"
3708
3741
  },
@@ -3859,6 +3892,23 @@ var definitions = {
3859
3892
  transition: {
3860
3893
  $ref: "#/definitions/SprinkleProp_transition"
3861
3894
  },
3895
+ type: {
3896
+ anyOf: [
3897
+ {
3898
+ "const": "button"
3899
+ },
3900
+ {
3901
+ "const": "reset"
3902
+ },
3903
+ {
3904
+ "const": "submit"
3905
+ },
3906
+ {
3907
+ $ref: "#/definitions/ProteusExpression"
3908
+ }
3909
+ ],
3910
+ description: "The default behavior of the button."
3911
+ },
3862
3912
  w: {
3863
3913
  $ref: "#/definitions/SprinkleProp_w"
3864
3914
  },
@@ -3868,9 +3918,9 @@ var definitions = {
3868
3918
  z: {
3869
3919
  $ref: "#/definitions/SprinkleProp_z"
3870
3920
  },
3871
- placeholder: {
3872
- description: "Placeholder text for the text input field",
3873
- type: "string"
3921
+ onClick: {
3922
+ $ref: "#/definitions/ProteusEventHandler",
3923
+ description: "Action triggered when button is clicked"
3874
3924
  }
3875
3925
  },
3876
3926
  required: [
package/dist/index.d.ts CHANGED
@@ -2,18 +2,6 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { BoxProps, SelectProps, Disclosure, ButtonProps, InputProps, TextareaProps } from '@optiaxiom/react';
3
3
  import { ReactNode, ComponentPropsWithoutRef } from 'react';
4
4
 
5
- type ProteusCancelActionProps = {
6
- children?: ReactNode;
7
- /**
8
- * Placeholder text for the text input field
9
- */
10
- placeholder?: string;
11
- };
12
- declare function ProteusCancelAction({ children, placeholder, }: ProteusCancelActionProps): react_jsx_runtime.JSX.Element;
13
- declare namespace ProteusCancelAction {
14
- var displayName: string;
15
- }
16
-
17
5
  type Series = {
18
6
  dataKey: string;
19
7
  name?: string;
@@ -332,5 +320,5 @@ declare namespace ProteusTextarea {
332
320
 
333
321
  declare function useProteusValue(element: ProteusValueProps): any;
334
322
 
335
- export { ProteusAction, ProteusCancelAction, ProteusChart, ProteusDataTable, ProteusDocumentRenderer, ProteusDocumentShell, ProteusImage, ProteusImageCarousel, ProteusInput, ProteusMap, ProteusSelect, ProteusShow, ProteusTextarea, safeParseDocument, useProteusValue };
323
+ export { ProteusAction, ProteusChart, ProteusDataTable, ProteusDocumentRenderer, ProteusDocumentShell, ProteusImage, ProteusImageCarousel, ProteusInput, ProteusMap, ProteusSelect, ProteusShow, ProteusTextarea, safeParseDocument, useProteusValue };
336
324
  export type { ProteusDocumentRendererProps, ProteusDocumentShellProps };