ids-enterprise-typings 13.0.3 → 13.1.0

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/index.d.ts CHANGED
@@ -5,6 +5,7 @@
5
5
  /// <reference path="lib/soho.d.ts" />
6
6
  /// <reference path='lib/about/soho-about.d.ts' />
7
7
  /// <reference path='lib/accordion/soho-accordion.d.ts' />
8
+ /// <reference path='lib/actionsheet/soho-actionsheet.d.ts' />
8
9
  /// <reference path='lib/alert/soho-alert.d.ts' />
9
10
  /// <reference path='lib/application-menu/soho-application-menu.d.ts' />
10
11
  /// <reference path='lib/autocomplete/soho-autocomplete.d.ts' />
@@ -0,0 +1,81 @@
1
+ /**
2
+ * Soho Actionsheet.
3
+ *
4
+ * This file contains the TypeScript mappings for the public
5
+ * interface of the Soho Actionsheet control.
6
+ */
7
+
8
+ /**
9
+ * Actionsheet Options
10
+ */
11
+
12
+ type SohoActionsheetDisplay = false | 'responsive' | 'always';
13
+
14
+ type SohoActionsheetTrayBackgroundColors = 'slate' | 'ruby' | 'amber' | 'emerald' | 'azure' | 'turquoise' | 'amethyst';
15
+
16
+ interface SohoActionsheetOptions {
17
+ actions?: SohoActionsheetActions;
18
+ autoFocus?: boolean;
19
+ breakpoint?: string;
20
+ displayAsActionSheet?: SohoActionsheetDisplay;
21
+ overlayOpacity?: number;
22
+ onSelect?: Function;
23
+ onCancel?: Function;
24
+ tray?: boolean;
25
+ trayOpts?: SohoActionsheetTrayOptions;
26
+ showCancelButton?: boolean;
27
+ attributes?: Array<Object> | Object;
28
+ }
29
+
30
+ interface SohoActionsheetTrayOptions {
31
+ text?: string;
32
+ icon?: string;
33
+ backgroundColor?: SohoActionsheetTrayBackgroundColors;
34
+ }
35
+
36
+ interface SohoActionsheetActions {
37
+ icon?: string;
38
+ text?: string;
39
+ }
40
+
41
+ interface SohoActionsheetStatic {
42
+ settings: SohoActionsheetOptions;
43
+
44
+ /** Returns true if the Action Sheet is currently visible */
45
+ get visible(): boolean;
46
+
47
+ /** Returns true if the Action Sheet is currently visible */
48
+ get actionElems(): boolean;
49
+
50
+ /** Returns attached Popupmenu API, if available */
51
+ get popupmenuAPI(): SohoPopupMenuOptions;
52
+
53
+ /** Returns true if there is a currently-open Popupmenu attached to the trigger button */
54
+ get hasOpenPopupMenu(): boolean;
55
+
56
+ /** Returns {boolean} whether or not this Action Sheet instance should currently display in
57
+ * full size mode (uses the settings, but determined at runtime)
58
+ * */
59
+ get currentlyNeedsActionSheet(): boolean;
60
+
61
+ /** Opens the Action Sheet */
62
+ open(): void;
63
+
64
+ /** Opens a simple Popupmenu containing the same actions as the sheet. */
65
+ openPopupMenu(): void;
66
+
67
+ /** Tears down and removes any added markup and events. */
68
+ destroy(): void;
69
+
70
+ /** Triggers a UI Resync. */
71
+ updated(settings?: SohoActionsheetOptions): void;
72
+ }
73
+
74
+ /** jQuery Integration */
75
+ interface jQueryStatic {
76
+ actionsheet: SohoActionsheetStatic;
77
+ }
78
+
79
+ interface JQuery<TElement = HTMLElement> extends Iterable<TElement> {
80
+ actionsheet(options?: SohoActionsheetOptions): JQuery;
81
+ }
@@ -18,6 +18,11 @@
18
18
  */
19
19
  type SohoModalTriggerType = 'click' | 'immediate';
20
20
 
21
+ type SohoModalFocusChangeFunction = (
22
+ modal: HTMLElement,
23
+ el: HTMLElement
24
+ ) => void;
25
+
21
26
  /**
22
27
  * Soho Modal Dialog configuration options
23
28
  *
@@ -97,6 +102,9 @@ interface SohoModalOptions {
97
102
 
98
103
  /** Add extra attributes like id's to the component **/
99
104
  attributes?: Array<Object> | Object;
105
+
106
+ /** Fires when an element gets focus on the modal */
107
+ onFocusChange?: SohoModalFocusChangeFunction;
100
108
  }
101
109
 
102
110
  type SohoModalFullSize = false | 'responsive' | 'always';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ids-enterprise-typings",
3
3
  "slug": "ids-enterprise-typings",
4
- "version": "13.0.3",
4
+ "version": "13.1.0",
5
5
  "declaration": true,
6
6
  "types": "index.d.ts",
7
7
  "dependencies": {