@postnord/web-components
Version:
PostNord Web Components
58 lines (57 loc) • 2.02 kB
TypeScript
import { SE, DK, FI, NO, sv, en, da, fi, no } from './helpers';
import * as colors from 'pn-design-assets/pn-assets/colors.js';
export interface PnUploadFileItem {
uuid: string;
filename: string;
filesize: number;
progress: number;
status: 'queue' | 'start' | 'completed' | 'error';
base64: string;
contentType: string;
error: any;
errorMessage: string;
file: File;
xhr: XMLHttpRequest;
xhrPromise?: () => Promise<any>;
}
export type PnMarkets = '' | typeof SE | typeof DK | typeof FI | typeof NO;
export type PnLanguages = '' | typeof sv | typeof en | typeof da | typeof fi | typeof no;
export type PnButtonAppearance = '' | 'light' | 'warning';
export type PnButtonVariant = '' | 'outlined' | 'borderless';
export type PnColors = keyof typeof colors;
export type PnSteps = 1 | 2 | 3 | 4 | 5 | 6 | 7;
export type PnStepProps = 'totalSteps' | 'currentStep';
export interface PnTopbar {
hasLoaded: boolean;
market: PnMarkets;
language: PnLanguages;
}
export interface PnMultiselectSubOption {
/** Set the label for the option, **required**. */
label: string;
/** Set the value for the option, **required**. */
value: string;
/** Set the status of the option, **required**. */
checked: boolean;
/** Display a helpertext for the option, optional. */
helpertext?: string;
/** Display an icon for the option. optional. */
icon?: string;
/** Use a custom HTML id, optional. */
id?: string;
/** Invalid */
invalid?: boolean;
/** Set the option as disabled, optional. */
disabled?: boolean;
/** Internal use for the search feature. Do not use manually. */
hide?: boolean;
}
export interface PnMultiselectOption extends PnMultiselectSubOption {
/** The list of items that will be nested under this option. */
group?: PnMultiselectSubOption[];
}
export interface PnPaginationItem {
page: number;
index: number;
}
export type PnZipCodeSearchLanguages = '' | typeof sv | typeof en;