@openwebf/react-cupertino-ui 0.3.10 → 0.3.12

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.d.mts CHANGED
@@ -1688,6 +1688,123 @@ declare const FlutterCupertinoIcon: React.ForwardRefExoticComponent<FlutterCuper
1688
1688
  children?: React.ReactNode;
1689
1689
  } & React.RefAttributes<FlutterCupertinoIconElement>>;
1690
1690
 
1691
+ /**
1692
+ * Properties for <flutter-cupertino-context-menu>.
1693
+ * Wraps Flutter's CupertinoContextMenu.
1694
+ */
1695
+ interface ContextMenuAction {
1696
+ /**
1697
+ * Button label text.
1698
+ */
1699
+ text: string;
1700
+ /**
1701
+ * Optional trailing icon name (Cupertino icon key).
1702
+ */
1703
+ icon?: string;
1704
+ /**
1705
+ * Marks this action as destructive (red).
1706
+ */
1707
+ destructive?: boolean;
1708
+ /**
1709
+ * Marks this action as the default action.
1710
+ */
1711
+ default?: boolean;
1712
+ /**
1713
+ * Optional event name associated with this action.
1714
+ * If omitted, a name may be derived from the text.
1715
+ */
1716
+ event?: string;
1717
+ }
1718
+ interface FlutterCupertinoContextMenuSelectDetail {
1719
+ /**
1720
+ * Zero-based index of the selected action.
1721
+ */
1722
+ index: number;
1723
+ /**
1724
+ * Action text.
1725
+ */
1726
+ text: string;
1727
+ /**
1728
+ * Event name for this action.
1729
+ */
1730
+ event: string;
1731
+ /**
1732
+ * Whether the action is destructive.
1733
+ */
1734
+ destructive: boolean;
1735
+ /**
1736
+ * Whether the action is the default one.
1737
+ */
1738
+ default: boolean;
1739
+ }
1740
+ interface FlutterCupertinoContextMenuProps {
1741
+ /**
1742
+ * Whether to enable haptic feedback when the menu is opened.
1743
+ * Default: false.
1744
+ */
1745
+ enableHapticFeedback?: boolean;
1746
+ /**
1747
+ * Fired when an action is selected.
1748
+ * detail contains metadata about the selected action.
1749
+ */
1750
+ onSelect?: (event: CustomEvent<FlutterCupertinoContextMenuSelectDetail>) => void;
1751
+ /**
1752
+ * HTML id attribute
1753
+ */
1754
+ id?: string;
1755
+ /**
1756
+ * Additional CSS styles
1757
+ */
1758
+ style?: React.CSSProperties;
1759
+ /**
1760
+ * Children elements
1761
+ */
1762
+ children?: React.ReactNode;
1763
+ /**
1764
+ * Additional CSS class names
1765
+ */
1766
+ className?: string;
1767
+ }
1768
+ /**
1769
+ * Element interface with methods accessible via ref
1770
+ * @example
1771
+ * ```tsx
1772
+ * const ref = useRef<FlutterCupertinoContextMenuElement>(null);
1773
+ * // Call methods on the element
1774
+ * ref.current?.finishRefresh('success');
1775
+ * ```
1776
+ */
1777
+ interface FlutterCupertinoContextMenuElement extends WebFElementWithMethods<{
1778
+ /**
1779
+ * Set the list of actions displayed in the context menu.
1780
+ */
1781
+ setActions(actions: ContextMenuAction[]): void;
1782
+ }> {
1783
+ }
1784
+ /**
1785
+ * FlutterCupertinoContextMenu - WebF FlutterCupertinoContextMenu component
1786
+ *
1787
+ * @example
1788
+ * ```tsx
1789
+ * const ref = useRef<FlutterCupertinoContextMenuElement>(null);
1790
+ *
1791
+ * <FlutterCupertinoContextMenu
1792
+ * ref={ref}
1793
+ * // Add props here
1794
+ * >
1795
+ * Content
1796
+ * </FlutterCupertinoContextMenu>
1797
+ *
1798
+ * // Call methods on the element
1799
+ * ref.current?.finishRefresh('success');
1800
+ * ```
1801
+ */
1802
+ declare const FlutterCupertinoContextMenu: React.ForwardRefExoticComponent<FlutterCupertinoContextMenuProps & {
1803
+ className?: string;
1804
+ style?: React.CSSProperties;
1805
+ children?: React.ReactNode;
1806
+ } & React.RefAttributes<FlutterCupertinoContextMenuElement>>;
1807
+
1691
1808
  interface FlutterCupertinoButtonProps {
1692
1809
  /**
1693
1810
  * Visual variant of the button.
@@ -1761,7 +1878,13 @@ declare const FlutterCupertinoButton: React.ForwardRefExoticComponent<FlutterCup
1761
1878
  } & React.RefAttributes<FlutterCupertinoButtonElement>>;
1762
1879
 
1763
1880
  interface FlutterCupertinoAlertOptions {
1881
+ /**
1882
+ * Optional override title for this show() call.
1883
+ */
1764
1884
  title?: string;
1885
+ /**
1886
+ * Optional override message for this show() call.
1887
+ */
1765
1888
  message?: string;
1766
1889
  }
1767
1890
  interface FlutterCupertinoAlertProps {
@@ -1882,6 +2005,130 @@ declare const FlutterCupertinoAlert: React.ForwardRefExoticComponent<FlutterCupe
1882
2005
  children?: React.ReactNode;
1883
2006
  } & React.RefAttributes<FlutterCupertinoAlertElement>>;
1884
2007
 
2008
+ interface FlutterCupertinoActionSheetAction {
2009
+ /**
2010
+ * Button label text.
2011
+ */
2012
+ text: string;
2013
+ /**
2014
+ * Marks this action as the default (emphasized) action.
2015
+ */
2016
+ isDefault?: boolean;
2017
+ /**
2018
+ * Marks this action as destructive (red).
2019
+ */
2020
+ isDestructive?: boolean;
2021
+ /**
2022
+ * Optional event name associated with this action.
2023
+ * If omitted, a name is derived from the text.
2024
+ */
2025
+ event?: string;
2026
+ }
2027
+ interface FlutterCupertinoActionSheetOptions {
2028
+ /**
2029
+ * Optional title text shown at the top of the sheet.
2030
+ */
2031
+ title?: string;
2032
+ /**
2033
+ * Optional message/body text shown below the title.
2034
+ */
2035
+ message?: string;
2036
+ /**
2037
+ * List of action buttons.
2038
+ * Each action maps to a row in the sheet.
2039
+ */
2040
+ actions?: FlutterCupertinoActionSheetAction[];
2041
+ /**
2042
+ * Optional cancel button displayed separately at the bottom.
2043
+ */
2044
+ cancelButton?: FlutterCupertinoActionSheetAction;
2045
+ }
2046
+ interface FlutterCupertinoActionSheetSelectDetail {
2047
+ /**
2048
+ * Action text.
2049
+ */
2050
+ text: string;
2051
+ /**
2052
+ * Event name for this action.
2053
+ */
2054
+ event: string;
2055
+ /**
2056
+ * Whether the action is the default one.
2057
+ */
2058
+ isDefault: boolean;
2059
+ /**
2060
+ * Whether the action is destructive.
2061
+ */
2062
+ isDestructive: boolean;
2063
+ /**
2064
+ * Zero-based index of the action within `actions`, if applicable.
2065
+ */
2066
+ index?: number;
2067
+ }
2068
+ interface FlutterCupertinoActionSheetProps {
2069
+ /**
2070
+ * Fired when any action (including cancel) is selected.
2071
+ * detail contains metadata about the selected action.
2072
+ */
2073
+ onSelect?: (event: CustomEvent<FlutterCupertinoActionSheetSelectDetail>) => void;
2074
+ /**
2075
+ * HTML id attribute
2076
+ */
2077
+ id?: string;
2078
+ /**
2079
+ * Additional CSS styles
2080
+ */
2081
+ style?: React.CSSProperties;
2082
+ /**
2083
+ * Children elements
2084
+ */
2085
+ children?: React.ReactNode;
2086
+ /**
2087
+ * Additional CSS class names
2088
+ */
2089
+ className?: string;
2090
+ }
2091
+ /**
2092
+ * Element interface with methods accessible via ref
2093
+ * @example
2094
+ * ```tsx
2095
+ * const ref = useRef<FlutterCupertinoActionSheetElement>(null);
2096
+ * // Call methods on the element
2097
+ * ref.current?.finishRefresh('success');
2098
+ * ```
2099
+ */
2100
+ interface FlutterCupertinoActionSheetElement extends WebFElementWithMethods<{
2101
+ /**
2102
+ * Show the action sheet with the given options.
2103
+ */
2104
+ show(options: FlutterCupertinoActionSheetOptions): void;
2105
+ }> {
2106
+ }
2107
+ /**
2108
+ * Properties for <flutter-cupertino-action-sheet>.
2109
+ Imperative wrapper around Flutter's CupertinoActionSheet.
2110
+ *
2111
+ * @example
2112
+ * ```tsx
2113
+ * const ref = useRef<FlutterCupertinoActionSheetElement>(null);
2114
+ *
2115
+ * <FlutterCupertinoActionSheet
2116
+ * ref={ref}
2117
+ * // Add props here
2118
+ * >
2119
+ * Content
2120
+ * </FlutterCupertinoActionSheet>
2121
+ *
2122
+ * // Call methods on the element
2123
+ * ref.current?.finishRefresh('success');
2124
+ * ```
2125
+ */
2126
+ declare const FlutterCupertinoActionSheet: React.ForwardRefExoticComponent<FlutterCupertinoActionSheetProps & {
2127
+ className?: string;
2128
+ style?: React.CSSProperties;
2129
+ children?: React.ReactNode;
2130
+ } & React.RefAttributes<FlutterCupertinoActionSheetElement>>;
2131
+
1885
2132
  interface FlutterCupertinoToastOptions {
1886
2133
  content: string;
1887
2134
  type?: 'normal' | 'success' | 'warning' | 'error' | 'loading';
@@ -3659,84 +3906,6 @@ declare const FlutterCupertinoDatePicker: React.ForwardRefExoticComponent<Flutte
3659
3906
  children?: React.ReactNode;
3660
3907
  } & React.RefAttributes<FlutterCupertinoDatePickerElement>>;
3661
3908
 
3662
- interface ContextMenuAction {
3663
- text: string;
3664
- icon?: string;
3665
- destructive?: boolean;
3666
- default?: boolean;
3667
- event?: string;
3668
- }
3669
- interface FlutterCupertinoContextMenuSelectDetail {
3670
- index: number;
3671
- text: string;
3672
- event: string;
3673
- destructive: boolean;
3674
- default: boolean;
3675
- }
3676
- interface FlutterCupertinoContextMenuProps {
3677
- /**
3678
- * enableHapticFeedback property
3679
- * @default undefined
3680
- */
3681
- enableHapticFeedback?: boolean;
3682
- /**
3683
- * select event handler
3684
- */
3685
- onSelect?: (event: CustomEvent<FlutterCupertinoContextMenuSelectDetail>) => void;
3686
- /**
3687
- * HTML id attribute
3688
- */
3689
- id?: string;
3690
- /**
3691
- * Additional CSS styles
3692
- */
3693
- style?: React.CSSProperties;
3694
- /**
3695
- * Children elements
3696
- */
3697
- children?: React.ReactNode;
3698
- /**
3699
- * Additional CSS class names
3700
- */
3701
- className?: string;
3702
- }
3703
- /**
3704
- * Element interface with methods accessible via ref
3705
- * @example
3706
- * ```tsx
3707
- * const ref = useRef<FlutterCupertinoContextMenuElement>(null);
3708
- * // Call methods on the element
3709
- * ref.current?.finishRefresh('success');
3710
- * ```
3711
- */
3712
- interface FlutterCupertinoContextMenuElement extends WebFElementWithMethods<{
3713
- setActions(actions: ContextMenuAction[]): void;
3714
- }> {
3715
- }
3716
- /**
3717
- * FlutterCupertinoContextMenu - WebF FlutterCupertinoContextMenu component
3718
- *
3719
- * @example
3720
- * ```tsx
3721
- * const ref = useRef<FlutterCupertinoContextMenuElement>(null);
3722
- *
3723
- * <FlutterCupertinoContextMenu
3724
- * ref={ref}
3725
- * // Add props here
3726
- * >
3727
- * Content
3728
- * </FlutterCupertinoContextMenu>
3729
- *
3730
- * // Call methods on the element
3731
- * ref.current?.finishRefresh('success');
3732
- * ```
3733
- */
3734
- declare const FlutterCupertinoContextMenu: React.ForwardRefExoticComponent<FlutterCupertinoContextMenuProps & {
3735
- className?: string;
3736
- style?: React.CSSProperties;
3737
- children?: React.ReactNode;
3738
- } & React.RefAttributes<FlutterCupertinoContextMenuElement>>;
3739
-
3740
3909
  interface FlutterCupertinoCheckboxProps {
3741
3910
  /**
3742
3911
  * val property
@@ -3815,82 +3984,4 @@ declare const FlutterCupertinoCheckbox: React.ForwardRefExoticComponent<FlutterC
3815
3984
  children?: React.ReactNode;
3816
3985
  } & React.RefAttributes<FlutterCupertinoCheckboxElement>>;
3817
3986
 
3818
- interface FlutterCupertinoActionSheetAction {
3819
- text: string;
3820
- isDefault?: boolean;
3821
- isDestructive?: boolean;
3822
- event?: string;
3823
- }
3824
- interface FlutterCupertinoActionSheetOptions {
3825
- title?: string;
3826
- message?: string;
3827
- actions?: FlutterCupertinoActionSheetAction[];
3828
- cancelButton?: FlutterCupertinoActionSheetAction;
3829
- }
3830
- interface FlutterCupertinoActionSheetSelectDetail {
3831
- text: string;
3832
- event: string;
3833
- isDefault: boolean;
3834
- isDestructive: boolean;
3835
- index?: number;
3836
- }
3837
- interface FlutterCupertinoActionSheetProps {
3838
- /**
3839
- * select event handler
3840
- */
3841
- onSelect?: (event: CustomEvent<FlutterCupertinoActionSheetSelectDetail>) => void;
3842
- /**
3843
- * HTML id attribute
3844
- */
3845
- id?: string;
3846
- /**
3847
- * Additional CSS styles
3848
- */
3849
- style?: React.CSSProperties;
3850
- /**
3851
- * Children elements
3852
- */
3853
- children?: React.ReactNode;
3854
- /**
3855
- * Additional CSS class names
3856
- */
3857
- className?: string;
3858
- }
3859
- /**
3860
- * Element interface with methods accessible via ref
3861
- * @example
3862
- * ```tsx
3863
- * const ref = useRef<FlutterCupertinoActionSheetElement>(null);
3864
- * // Call methods on the element
3865
- * ref.current?.finishRefresh('success');
3866
- * ```
3867
- */
3868
- interface FlutterCupertinoActionSheetElement extends WebFElementWithMethods<{
3869
- show(options: FlutterCupertinoActionSheetOptions): void;
3870
- }> {
3871
- }
3872
- /**
3873
- * FlutterCupertinoActionSheet - WebF FlutterCupertinoActionSheet component
3874
- *
3875
- * @example
3876
- * ```tsx
3877
- * const ref = useRef<FlutterCupertinoActionSheetElement>(null);
3878
- *
3879
- * <FlutterCupertinoActionSheet
3880
- * ref={ref}
3881
- * // Add props here
3882
- * >
3883
- * Content
3884
- * </FlutterCupertinoActionSheet>
3885
- *
3886
- * // Call methods on the element
3887
- * ref.current?.finishRefresh('success');
3888
- * ```
3889
- */
3890
- declare const FlutterCupertinoActionSheet: React.ForwardRefExoticComponent<FlutterCupertinoActionSheetProps & {
3891
- className?: string;
3892
- style?: React.CSSProperties;
3893
- children?: React.ReactNode;
3894
- } & React.RefAttributes<FlutterCupertinoActionSheetElement>>;
3895
-
3896
3987
  export { CupertinoColors, CupertinoIcons, FlutterCupertinoActionSheet, type FlutterCupertinoActionSheetElement, FlutterCupertinoAlert, type FlutterCupertinoAlertElement, FlutterCupertinoButton, type FlutterCupertinoButtonElement, FlutterCupertinoCheckbox, type FlutterCupertinoCheckboxElement, FlutterCupertinoContextMenu, type FlutterCupertinoContextMenuElement, FlutterCupertinoDatePicker, type FlutterCupertinoDatePickerElement, FlutterCupertinoFormRow, type FlutterCupertinoFormRowElement, FlutterCupertinoFormRowError, type FlutterCupertinoFormRowErrorElement, FlutterCupertinoFormRowHelper, type FlutterCupertinoFormRowHelperElement, FlutterCupertinoFormRowPrefix, type FlutterCupertinoFormRowPrefixElement, FlutterCupertinoFormSection, type FlutterCupertinoFormSectionElement, FlutterCupertinoFormSectionFooter, type FlutterCupertinoFormSectionFooterElement, FlutterCupertinoFormSectionHeader, type FlutterCupertinoFormSectionHeaderElement, FlutterCupertinoIcon, type FlutterCupertinoIconElement, FlutterCupertinoInput, type FlutterCupertinoInputElement, FlutterCupertinoInputPrefix, type FlutterCupertinoInputPrefixElement, FlutterCupertinoInputSuffix, type FlutterCupertinoInputSuffixElement, FlutterCupertinoListSection, type FlutterCupertinoListSectionElement, FlutterCupertinoListSectionFooter, type FlutterCupertinoListSectionFooterElement, FlutterCupertinoListSectionHeader, type FlutterCupertinoListSectionHeaderElement, FlutterCupertinoListTile, FlutterCupertinoListTileAdditionalInfo, type FlutterCupertinoListTileAdditionalInfoElement, type FlutterCupertinoListTileElement, FlutterCupertinoListTileLeading, type FlutterCupertinoListTileLeadingElement, FlutterCupertinoListTileSubtitle, type FlutterCupertinoListTileSubtitleElement, FlutterCupertinoListTileTrailing, type FlutterCupertinoListTileTrailingElement, FlutterCupertinoLoading, type FlutterCupertinoLoadingElement, FlutterCupertinoModalPopup, type FlutterCupertinoModalPopupElement, FlutterCupertinoPicker, type FlutterCupertinoPickerElement, FlutterCupertinoPickerItem, type FlutterCupertinoPickerItemElement, FlutterCupertinoRadio, type FlutterCupertinoRadioElement, FlutterCupertinoSearchInput, type FlutterCupertinoSearchInputElement, FlutterCupertinoSegmentedTab, type FlutterCupertinoSegmentedTabElement, FlutterCupertinoSlider, type FlutterCupertinoSliderElement, FlutterCupertinoSwitch, type FlutterCupertinoSwitchElement, FlutterCupertinoTabBar, type FlutterCupertinoTabBarElement, FlutterCupertinoTabBarItem, type FlutterCupertinoTabBarItemElement, FlutterCupertinoTabScaffold, type FlutterCupertinoTabScaffoldElement, FlutterCupertinoTabScaffoldTab, type FlutterCupertinoTabScaffoldTabElement, FlutterCupertinoTabView, type FlutterCupertinoTabViewElement, FlutterCupertinoTextarea, type FlutterCupertinoTextareaElement, FlutterCupertinoTimerPicker, type FlutterCupertinoTimerPickerElement, FlutterCupertinoToast, type FlutterCupertinoToastElement };