@schematichq/schematic-components 2.22.2 → 2.24.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/README.md +7 -0
- package/dist/schematic-components.browser.cjs.js +2623 -1840
- package/dist/schematic-components.browser.esm.js +2544 -1761
- package/dist/schematic-components.cjs.js +2613 -1830
- package/dist/schematic-components.d.ts +102 -21
- package/dist/schematic-components.esm.js +2599 -1816
- package/package.json +11 -11
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ButtonHTMLAttributes } from 'react';
|
|
2
2
|
import { Context } from 'react';
|
|
3
3
|
import { CSSProperties } from 'react';
|
|
4
|
-
import { CSSProperties as CSSProperties_2 } from 'styled-components';
|
|
5
4
|
import { CSSPropertiesWithVars } from 'styled-components/dist/types';
|
|
6
5
|
import { DetailedHTMLProps } from 'react';
|
|
7
6
|
import { FastOmit } from 'styled-components';
|
|
@@ -109,6 +108,12 @@ declare interface BillingCreditBundleView {
|
|
|
109
108
|
* @memberof BillingCreditBundleView
|
|
110
109
|
*/
|
|
111
110
|
bundleType: BillingCreditBundleType;
|
|
111
|
+
/**
|
|
112
|
+
*
|
|
113
|
+
* @type {Array<string>}
|
|
114
|
+
* @memberof BillingCreditBundleView
|
|
115
|
+
*/
|
|
116
|
+
compatiblePlanIds: Array<string>;
|
|
112
117
|
/**
|
|
113
118
|
*
|
|
114
119
|
* @type {Date}
|
|
@@ -1052,9 +1057,10 @@ declare interface BillingPlanCreditGrantResponseData {
|
|
|
1052
1057
|
*/
|
|
1053
1058
|
autoTopupThresholdPercent?: number | null;
|
|
1054
1059
|
/**
|
|
1055
|
-
*
|
|
1060
|
+
* Deprecated: bundle availability is a per-bundle plan compatibility set now; use compatible_plan_ids on credit bundles instead.
|
|
1056
1061
|
* @type {boolean}
|
|
1057
1062
|
* @memberof BillingPlanCreditGrantResponseData
|
|
1063
|
+
* @deprecated
|
|
1058
1064
|
*/
|
|
1059
1065
|
canBuyBundles: boolean;
|
|
1060
1066
|
/**
|
|
@@ -3079,6 +3085,16 @@ export declare interface BypassConfig {
|
|
|
3079
3085
|
* currency is locked (the selector is already hidden in those cases).
|
|
3080
3086
|
*/
|
|
3081
3087
|
showCurrencySelector?: boolean;
|
|
3088
|
+
/**
|
|
3089
|
+
* Whether to show the recurring billing disclaimer beneath the checkout
|
|
3090
|
+
* totals (e.g. "You will be billed $0.00 for this subscription every month
|
|
3091
|
+
* on the 17th unless you unsubscribe."). Default: true.
|
|
3092
|
+
*
|
|
3093
|
+
* Set to false to hide that sentence when the host presents its own billing
|
|
3094
|
+
* terms. The scheduled-downgrade notice, which occupies the same spot, is
|
|
3095
|
+
* unaffected.
|
|
3096
|
+
*/
|
|
3097
|
+
showBillingDisclaimer?: boolean;
|
|
3082
3098
|
/**
|
|
3083
3099
|
* Pre-fill pay-in-advance quantities, keyed by feature id.
|
|
3084
3100
|
*
|
|
@@ -3228,11 +3244,11 @@ declare const ChargeType_2: {
|
|
|
3228
3244
|
|
|
3229
3245
|
declare type ChargeType_2 = (typeof ChargeType_2)[keyof typeof ChargeType_2];
|
|
3230
3246
|
|
|
3231
|
-
export declare const Checkbox: IStyledComponentBase<"web",
|
|
3247
|
+
export declare const Checkbox: IStyledComponentBase<"web", Omit<Omit<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "style"> & {
|
|
3232
3248
|
style?: CSSProperties | CSSPropertiesWithVars | undefined;
|
|
3233
|
-
},
|
|
3249
|
+
}, "type"> & Partial<Pick<Omit<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "style"> & {
|
|
3234
3250
|
style?: CSSProperties | CSSPropertiesWithVars | undefined;
|
|
3235
|
-
},
|
|
3251
|
+
}, "type">>> & string;
|
|
3236
3252
|
|
|
3237
3253
|
export declare const Checkout: ({ collectTaxId, customCheckoutFields, customFieldValues, isPaymentMethodRequired, onCustomFieldChange, taxIdValues, onTaxIdChange, onTaxIdBlur, taxIdError, optInRequired, optInTitle, optInText, optInAccepted, setOptInAccepted, setPaymentMethodId, promoCode, updatePromoCode, confirmPaymentIntentProps, financeData, onPaymentMethodSaved, }: CheckoutProps) => JSX.Element | null;
|
|
3238
3254
|
|
|
@@ -3249,6 +3265,17 @@ export declare interface CheckoutBillingDetails {
|
|
|
3249
3265
|
name?: string;
|
|
3250
3266
|
}
|
|
3251
3267
|
|
|
3268
|
+
/**
|
|
3269
|
+
*
|
|
3270
|
+
* @export
|
|
3271
|
+
*/
|
|
3272
|
+
declare const CheckoutBundlePurchaseBehavior: {
|
|
3273
|
+
readonly Individual: "individual";
|
|
3274
|
+
readonly Quantity: "quantity";
|
|
3275
|
+
};
|
|
3276
|
+
|
|
3277
|
+
declare type CheckoutBundlePurchaseBehavior = (typeof CheckoutBundlePurchaseBehavior)[keyof typeof CheckoutBundlePurchaseBehavior];
|
|
3278
|
+
|
|
3252
3279
|
export declare const CheckoutDialog: ({ top }: CheckoutDialogProps) => JSX.Element | null;
|
|
3253
3280
|
|
|
3254
3281
|
declare interface CheckoutDialogProps {
|
|
@@ -3651,6 +3678,7 @@ export declare type CheckoutState = {
|
|
|
3651
3678
|
hideSkippedStages?: boolean;
|
|
3652
3679
|
selectedCurrency?: string;
|
|
3653
3680
|
showCurrencySelector?: boolean;
|
|
3681
|
+
showBillingDisclaimer?: boolean;
|
|
3654
3682
|
startTrialIfAvailable?: boolean;
|
|
3655
3683
|
payInAdvanceQuantities?: Record<string, number>;
|
|
3656
3684
|
promoCode?: string;
|
|
@@ -5031,6 +5059,12 @@ declare interface ComponentCapabilities_2 {
|
|
|
5031
5059
|
* @interface ComponentCheckoutSettings
|
|
5032
5060
|
*/
|
|
5033
5061
|
declare interface ComponentCheckoutSettings {
|
|
5062
|
+
/**
|
|
5063
|
+
*
|
|
5064
|
+
* @type {CheckoutBundlePurchaseBehavior}
|
|
5065
|
+
* @memberof ComponentCheckoutSettings
|
|
5066
|
+
*/
|
|
5067
|
+
bundlePurchaseBehavior: CheckoutBundlePurchaseBehavior;
|
|
5034
5068
|
/**
|
|
5035
5069
|
*
|
|
5036
5070
|
* @type {boolean}
|
|
@@ -5620,6 +5654,10 @@ export declare const createActiveUsageBasedEntitlementsReducer: (entitlements: F
|
|
|
5620
5654
|
|
|
5621
5655
|
declare type Credit = Omit<CreditWithCompanyContext, "companyId" | "companyName" | "bundleId" | "total" | "grants"> & {
|
|
5622
5656
|
period?: string;
|
|
5657
|
+
/** flat (company-level) portion of the plan's grants on this credit */
|
|
5658
|
+
fixedQuantity: number;
|
|
5659
|
+
/** per-license portions; effective amount = amount × license quantity */
|
|
5660
|
+
perLicenseGrants: PerLicenseCreditGrant[];
|
|
5623
5661
|
};
|
|
5624
5662
|
|
|
5625
5663
|
declare type CreditBundle = BillingCreditBundleView & {
|
|
@@ -5988,12 +6026,14 @@ declare interface CreditGrantDetail {
|
|
|
5988
6026
|
quantity: number;
|
|
5989
6027
|
}
|
|
5990
6028
|
|
|
5991
|
-
export declare const Credits: ({ bundles, updateCount, currency }: CreditsProps) => JSX.Element;
|
|
6029
|
+
export declare const Credits: ({ isLoading, bundles, isIndividualPurchase, updateCount, toggle, currency, }: CreditsProps) => JSX.Element;
|
|
5992
6030
|
|
|
5993
6031
|
declare interface CreditsProps {
|
|
5994
6032
|
isLoading: boolean;
|
|
5995
6033
|
bundles: CreditBundle[];
|
|
6034
|
+
isIndividualPurchase: boolean;
|
|
5996
6035
|
updateCount: (id: string, count: number) => void;
|
|
6036
|
+
toggle: (id: string) => void;
|
|
5997
6037
|
currency?: string;
|
|
5998
6038
|
}
|
|
5999
6039
|
|
|
@@ -6171,6 +6211,12 @@ declare interface CustomPlanBillingResponseData {
|
|
|
6171
6211
|
* @memberof CustomPlanBillingResponseData
|
|
6172
6212
|
*/
|
|
6173
6213
|
activationStrategy: CustomPlanActivationStrategy;
|
|
6214
|
+
/**
|
|
6215
|
+
* The billing period renewal date pinned when the subscription started, when one was set. When no invoice exists yet, the first invoice is raised on this date.
|
|
6216
|
+
* @type {Date}
|
|
6217
|
+
* @memberof CustomPlanBillingResponseData
|
|
6218
|
+
*/
|
|
6219
|
+
billingCycleAnchor?: Date | null;
|
|
6174
6220
|
/**
|
|
6175
6221
|
*
|
|
6176
6222
|
* @type {string}
|
|
@@ -6641,7 +6687,7 @@ style?: CSSProperties | CSSPropertiesWithVars | undefined;
|
|
|
6641
6687
|
as?: WebTarget | undefined;
|
|
6642
6688
|
forwardedAs?: WebTarget | undefined;
|
|
6643
6689
|
}, "style"> & {
|
|
6644
|
-
style?: CSSProperties | CSSPropertiesWithVars | (
|
|
6690
|
+
style?: CSSProperties | CSSPropertiesWithVars | (CSSProperties & {
|
|
6645
6691
|
[key: `--${string}`]: string | number | undefined;
|
|
6646
6692
|
}) | undefined;
|
|
6647
6693
|
}> & string;
|
|
@@ -8378,7 +8424,7 @@ style?: CSSProperties | CSSPropertiesWithVars | undefined;
|
|
|
8378
8424
|
as?: WebTarget | undefined;
|
|
8379
8425
|
forwardedAs?: WebTarget | undefined;
|
|
8380
8426
|
}, "style"> & {
|
|
8381
|
-
style?: CSSProperties | CSSPropertiesWithVars | (
|
|
8427
|
+
style?: CSSProperties | CSSPropertiesWithVars | (CSSProperties & {
|
|
8382
8428
|
[key: `--${string}`]: string | number | undefined;
|
|
8383
8429
|
}) | undefined;
|
|
8384
8430
|
}> & string;
|
|
@@ -8402,14 +8448,14 @@ style?: CSSProperties | CSSPropertiesWithVars | undefined;
|
|
|
8402
8448
|
as?: WebTarget | undefined;
|
|
8403
8449
|
forwardedAs?: WebTarget | undefined;
|
|
8404
8450
|
}, "style"> & {
|
|
8405
|
-
style?: CSSProperties | CSSPropertiesWithVars | (
|
|
8451
|
+
style?: CSSProperties | CSSPropertiesWithVars | (CSSProperties & {
|
|
8406
8452
|
[key: `--${string}`]: string | number | undefined;
|
|
8407
8453
|
}) | undefined;
|
|
8408
8454
|
}, "as" | "forwardedAs"> & {
|
|
8409
8455
|
as?: WebTarget | undefined;
|
|
8410
8456
|
forwardedAs?: WebTarget | undefined;
|
|
8411
8457
|
}, "style"> & {
|
|
8412
|
-
style?: CSSProperties | CSSPropertiesWithVars | (
|
|
8458
|
+
style?: CSSProperties | CSSPropertiesWithVars | (CSSProperties & {
|
|
8413
8459
|
[key: `--${string}`]: string | number | undefined;
|
|
8414
8460
|
}) | undefined;
|
|
8415
8461
|
}> & string;
|
|
@@ -8936,7 +8982,7 @@ style?: CSSProperties | CSSPropertiesWithVars | undefined;
|
|
|
8936
8982
|
as?: WebTarget | undefined;
|
|
8937
8983
|
forwardedAs?: WebTarget | undefined;
|
|
8938
8984
|
}, "style"> & {
|
|
8939
|
-
style?: CSSProperties | CSSPropertiesWithVars | (
|
|
8985
|
+
style?: CSSProperties | CSSPropertiesWithVars | (CSSProperties & {
|
|
8940
8986
|
[key: `--${string}`]: string | number | undefined;
|
|
8941
8987
|
}) | undefined;
|
|
8942
8988
|
}> & string;
|
|
@@ -8947,14 +8993,14 @@ style?: CSSProperties | CSSPropertiesWithVars | undefined;
|
|
|
8947
8993
|
as?: WebTarget | undefined;
|
|
8948
8994
|
forwardedAs?: WebTarget | undefined;
|
|
8949
8995
|
}, "style"> & {
|
|
8950
|
-
style?: CSSProperties | CSSPropertiesWithVars | (
|
|
8996
|
+
style?: CSSProperties | CSSPropertiesWithVars | (CSSProperties & {
|
|
8951
8997
|
[key: `--${string}`]: string | number | undefined;
|
|
8952
8998
|
}) | undefined;
|
|
8953
8999
|
}, "as" | "forwardedAs"> & {
|
|
8954
9000
|
as?: WebTarget | undefined;
|
|
8955
9001
|
forwardedAs?: WebTarget | undefined;
|
|
8956
9002
|
}, "style"> & {
|
|
8957
|
-
style?: CSSProperties | CSSPropertiesWithVars | (
|
|
9003
|
+
style?: CSSProperties | CSSPropertiesWithVars | (CSSProperties & {
|
|
8958
9004
|
[key: `--${string}`]: string | number | undefined;
|
|
8959
9005
|
}) | undefined;
|
|
8960
9006
|
}> & string;
|
|
@@ -9100,6 +9146,13 @@ declare interface PaymentMethodResponseData {
|
|
|
9100
9146
|
updatedAt: Date;
|
|
9101
9147
|
}
|
|
9102
9148
|
|
|
9149
|
+
declare interface PerLicenseCreditGrant {
|
|
9150
|
+
/** credits granted per unit of the license */
|
|
9151
|
+
amount: number;
|
|
9152
|
+
/** the license whose quantity scales the grant */
|
|
9153
|
+
licenseId: string;
|
|
9154
|
+
}
|
|
9155
|
+
|
|
9103
9156
|
export declare const Plan: ({ portal, isLoading, plans, selectedPlan, period, selectPlan, shouldTrial, currency, }: PlanProps) => JSX.Element;
|
|
9104
9157
|
|
|
9105
9158
|
declare type Plan_2 = CompanyPlanDetailResponseData;
|
|
@@ -11659,7 +11712,7 @@ declare interface PublicPlansResponseData {
|
|
|
11659
11712
|
showZeroPriceAsFree: boolean;
|
|
11660
11713
|
}
|
|
11661
11714
|
|
|
11662
|
-
export declare const Quantity: ({ portal, entitlements, updateQuantity, period, currency: selectedCurrency, }: QuantityProps) => JSX.Element;
|
|
11715
|
+
export declare const Quantity: ({ portal, entitlements, updateQuantity, period, selectedPlan, currency: selectedCurrency, }: QuantityProps) => JSX.Element;
|
|
11663
11716
|
|
|
11664
11717
|
declare interface QuantityProps {
|
|
11665
11718
|
portal?: HTMLElement | null;
|
|
@@ -12602,11 +12655,11 @@ declare type TaxIdValues = {
|
|
|
12602
12655
|
value: string;
|
|
12603
12656
|
};
|
|
12604
12657
|
|
|
12605
|
-
declare const Text_2: IStyledComponentBase<"web",
|
|
12658
|
+
declare const Text_2: IStyledComponentBase<"web", Omit<Merged<Omit<DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style"> & {
|
|
12606
12659
|
style?: CSSProperties | CSSPropertiesWithVars | undefined;
|
|
12607
|
-
},
|
|
12660
|
+
}, TextProps>, "tabIndex"> & Partial<Pick<Merged<Omit<DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style"> & {
|
|
12608
12661
|
style?: CSSProperties | CSSPropertiesWithVars | undefined;
|
|
12609
|
-
},
|
|
12662
|
+
}, TextProps>, "tabIndex">>> & string;
|
|
12610
12663
|
export { Text_2 as Text }
|
|
12611
12664
|
|
|
12612
12665
|
export declare const TextElement: ForwardRefExoticComponent<ElementProps & DeepPartial<DesignProps_8> & HTMLAttributes<HTMLDivElement> & {
|
|
@@ -12662,11 +12715,11 @@ export declare interface ThemeSettings {
|
|
|
12662
12715
|
};
|
|
12663
12716
|
}
|
|
12664
12717
|
|
|
12665
|
-
export declare const Toggle: IStyledComponentBase<"web",
|
|
12718
|
+
export declare const Toggle: IStyledComponentBase<"web", Omit<Omit<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "style"> & {
|
|
12666
12719
|
style?: CSSProperties | CSSPropertiesWithVars | undefined;
|
|
12667
|
-
},
|
|
12720
|
+
}, "type"> & Partial<Pick<Omit<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "style"> & {
|
|
12668
12721
|
style?: CSSProperties | CSSPropertiesWithVars | undefined;
|
|
12669
|
-
},
|
|
12722
|
+
}, "type">>> & string;
|
|
12670
12723
|
|
|
12671
12724
|
export declare const Tooltip: ({ children, portal, trigger, content, position, ...rest }: TooltipProps) => JSX.Element;
|
|
12672
12725
|
|
|
@@ -12755,7 +12808,7 @@ style?: CSSProperties | CSSPropertiesWithVars | undefined;
|
|
|
12755
12808
|
as?: WebTarget | undefined;
|
|
12756
12809
|
forwardedAs?: WebTarget | undefined;
|
|
12757
12810
|
}, "style"> & {
|
|
12758
|
-
style?: CSSProperties | CSSPropertiesWithVars | (
|
|
12811
|
+
style?: CSSProperties | CSSPropertiesWithVars | (CSSProperties & {
|
|
12759
12812
|
[key: `--${string}`]: string | number | undefined;
|
|
12760
12813
|
}) | undefined;
|
|
12761
12814
|
}, TransitionBoxProps>> & string;
|
|
@@ -12764,6 +12817,21 @@ declare interface TransitionBoxProps {
|
|
|
12764
12817
|
$isExpanded?: boolean;
|
|
12765
12818
|
}
|
|
12766
12819
|
|
|
12820
|
+
export declare interface TruncatedList<T> {
|
|
12821
|
+
/** The first `limit` items while collapsed, every item while expanded. */
|
|
12822
|
+
items: T[];
|
|
12823
|
+
/** Total number of items before truncation. */
|
|
12824
|
+
total: number;
|
|
12825
|
+
/** How many items the current state hides — always `0` while expanded. */
|
|
12826
|
+
hiddenCount: number;
|
|
12827
|
+
/** Only render an expand affordance when this is `true`. */
|
|
12828
|
+
canExpand: boolean;
|
|
12829
|
+
isExpanded: boolean;
|
|
12830
|
+
toggle: () => void;
|
|
12831
|
+
expand: () => void;
|
|
12832
|
+
collapse: () => void;
|
|
12833
|
+
}
|
|
12834
|
+
|
|
12767
12835
|
export declare interface TypographySettings {
|
|
12768
12836
|
fontFamily: string;
|
|
12769
12837
|
fontSize: number;
|
|
@@ -13129,6 +13197,19 @@ export declare function useTrialEnd(): {
|
|
|
13129
13197
|
units: string | undefined;
|
|
13130
13198
|
};
|
|
13131
13199
|
|
|
13200
|
+
/**
|
|
13201
|
+
* Headless truncation state for long lists.
|
|
13202
|
+
*
|
|
13203
|
+
* Returns a slice rather than rendering anything, so it composes with any
|
|
13204
|
+
* layout — including CSS-table rows, where an extra wrapper element would
|
|
13205
|
+
* break the anonymous table box.
|
|
13206
|
+
*/
|
|
13207
|
+
export declare function useTruncatedList<T>(items: T[], { limit }: UseTruncatedListOptions): TruncatedList<T>;
|
|
13208
|
+
|
|
13209
|
+
export declare interface UseTruncatedListOptions {
|
|
13210
|
+
limit: number;
|
|
13211
|
+
}
|
|
13212
|
+
|
|
13132
13213
|
export declare function useWrapChildren(ref: React.RefObject<HTMLElement[]>): boolean;
|
|
13133
13214
|
|
|
13134
13215
|
export declare const Viewport: ForwardRefExoticComponent<Omit<ViewportProps, "ref"> & RefAttributes<HTMLDivElement | null>>;
|