@primer-io/primer-js 0.3.3 → 0.3.5

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.
@@ -139,7 +139,15 @@ export type CollapsableComponentProps = {
139
139
  "onexpanded-changed"?: (e: CustomEvent<CustomEvent>) => void;
140
140
  };
141
141
 
142
- export type DialogComponentProps = {};
142
+ export type DialogComponentProps = {
143
+ /** */
144
+ size?: "flex" | "large";
145
+ /** */
146
+ showCloseButton?: boolean;
147
+
148
+ /** */
149
+ "onprimer-dialog-close"?: (e: CustomEvent<CustomEvent>) => void;
150
+ };
143
151
 
144
152
  export type ErrorMessageComponentProps = {
145
153
  /** The error message text to display */
@@ -344,6 +352,19 @@ export type PaymentMethodContainerComponentProps = {
344
352
  clientOptions?: ClientOptionsContextType;
345
353
  };
346
354
 
355
+ export type PortalDialogComponentProps = {
356
+ /** */
357
+ size?: "flex" | "large";
358
+ /** */
359
+ showCloseButton?: boolean;
360
+ /** */
361
+ onOpen?: () => void | undefined;
362
+ /** */
363
+ secureHtmlContent?: SecureHtmlContentAccess | undefined;
364
+ /** */
365
+ open?: boolean;
366
+ };
367
+
347
368
  export type PrimerCheckoutCompleteComponentProps = {};
348
369
 
349
370
  export type PrimerCheckoutErrorComponentProps = {
@@ -668,6 +689,12 @@ export type CustomElements = {
668
689
  *
669
690
  * ---
670
691
  *
692
+ *
693
+ * ### **Events:**
694
+ * - **primer-dialog-close**
695
+ *
696
+ * ### **Methods:**
697
+ * - **startExitAnimation(): _void_** - Public method to trigger exit animation programmatically
671
698
  */
672
699
  "primer-dialog": Partial<DialogComponentProps & BaseProps & BaseEvents>;
673
700
 
@@ -849,6 +876,17 @@ export type CustomElements = {
849
876
  */
850
877
  "primer-payment-method-container": Partial<PaymentMethodContainerComponentProps & BaseProps & BaseEvents>;
851
878
 
879
+ /**
880
+ *
881
+ * ---
882
+ *
883
+ *
884
+ * ### **Methods:**
885
+ * - **openDialog(): _void_** - Opens the content dialog
886
+ * - **closeDialog(): _void_** - Closes the dialog with animation
887
+ */
888
+ "primer-portal-dialog": Partial<PortalDialogComponentProps & BaseProps & BaseEvents>;
889
+
852
890
  /**
853
891
  *
854
892
  * ---
@@ -2047,7 +2047,20 @@ declare global {
2047
2047
  }
2048
2048
  declare class DialogComponent extends LitElement {
2049
2049
  static styles: import("lit").CSSResult[];
2050
+ size: "flex" | "large";
2051
+ showCloseButton: boolean;
2052
+ private _animationState;
2053
+ private _isVisible;
2054
+ private _animationTimeout?;
2050
2055
  private _handleCloseClick;
2056
+ /**
2057
+ * Public method to trigger exit animation programmatically
2058
+ */
2059
+ startExitAnimation(): void;
2060
+ connectedCallback(): void;
2061
+ disconnectedCallback(): void;
2062
+ private _startEnterAnimation;
2063
+ private _startExitAnimation;
2051
2064
  render(): import("lit-html").TemplateResult<1>;
2052
2065
  }
2053
2066
  declare global {
@@ -2223,6 +2236,50 @@ declare global {
2223
2236
  "primer-redirect-payment": RedirectPaymentComponent;
2224
2237
  }
2225
2238
  }
2239
+ /**
2240
+ * Interface for secure htmlContent access
2241
+ */
2242
+ export interface SecureHtmlContentAccess {
2243
+ token: symbol;
2244
+ content: string;
2245
+ }
2246
+ export interface PortalDialogData {
2247
+ size?: "flex" | "large";
2248
+ showCloseButton?: boolean;
2249
+ onOpen?: () => void;
2250
+ }
2251
+ export declare class PortalDialogComponent extends LitElement {
2252
+ static styles: import("lit").CSSResult[];
2253
+ size: "flex" | "large";
2254
+ showCloseButton: boolean;
2255
+ onOpen?: () => void;
2256
+ secureHtmlContent?: SecureHtmlContentAccess;
2257
+ open: boolean;
2258
+ /**
2259
+ * Opens the content dialog
2260
+ */
2261
+ openDialog(): void;
2262
+ /**
2263
+ * Closes the dialog with animation
2264
+ */
2265
+ closeDialog(): void;
2266
+ /**
2267
+ * Renders the content inside the dialog
2268
+ */
2269
+ private renderContent;
2270
+ /**
2271
+ * Renders secure HTML content if valid token is provided
2272
+ * Only sdk-core can pass HTML content - Token creation is restricted to sdk-core package
2273
+ */
2274
+ private renderSecureHtmlContent;
2275
+ /**
2276
+ * Renders the dialog with portal
2277
+ */
2278
+ private renderDialog;
2279
+ connectedCallback(): void;
2280
+ updated(changedProperties: Map<string, unknown>): void;
2281
+ render(): import("lit-html").TemplateResult<1>;
2282
+ }
2226
2283
  /**
2227
2284
  * Events emitted by the vault manager components
2228
2285
  */