Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5,576 changes: 3,074 additions & 2,502 deletions packages/ui-extensions/src/surfaces/point-of-sale/components.d.ts

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
/** VERSION: undefined **/
/* eslint-disable import-x/extensions */
/* eslint-disable @typescript-eslint/no-namespace */
/* eslint-disable @typescript-eslint/member-ordering */
/* eslint-disable line-comment-position */
/* eslint-disable @typescript-eslint/unified-signatures */
/* eslint-disable no-var */
/* eslint-disable import-x/namespace */
// eslint-disable-next-line @typescript-eslint/triple-slash-reference, spaced-comment
/// <reference lib="DOM" />
import type {LinkProps,Key, Ref} from './components-shared.d.ts';

export type ComponentChildren = any;
/**
* Used when an element does not have children.
*/
export interface BaseElementProps<TClass = HTMLElement> {
key?: Key;
ref?: Ref<TClass>;
slot?: Lowercase<string>;
}
/**
* Used when an element has children.
*/
export interface BaseElementPropsWithChildren<TClass = HTMLElement> extends BaseElementProps<TClass> {
children?: ComponentChildren;
}
export type IntrinsicElementProps<T> = T & BaseElementPropsWithChildren<T & HTMLElement>;
export type HtmlElementTagNameProps<T> = T & HTMLElement;
export interface CallbackEvent<T extends keyof HTMLElementTagNameMap> {
currentTarget: HTMLElementTagNameMap[T];
bubbles?: boolean;
cancelable?: boolean;
composed?: boolean;
detail?: any;
eventPhase: number;
target: HTMLElementTagNameMap[T] | null;
}

declare const tagName = "s-link";
export interface LinkJSXProps extends Pick<LinkProps, 'id' | 'commandFor' | 'command' | 'accessibilityLabel'> {
/**
* Called when the link is activated.
*/
onClick?: (event: CallbackEvent<typeof tagName>) => void;
/**
* The Link content.
*/
children?: ComponentChildren;
}
declare global {
interface HTMLElementTagNameMap {
[tagName]: HtmlElementTagNameProps<LinkJSXProps>;
}
}
declare module 'preact' {
namespace createElement.JSX {
interface IntrinsicElements {
[tagName]: IntrinsicElementProps<LinkJSXProps>;
}
}
}

export { tagName };
export type { LinkJSXProps };
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/** VERSION: undefined **/
/* eslint-disable import-x/extensions */
/* eslint-disable @typescript-eslint/no-namespace */
/* eslint-disable @typescript-eslint/member-ordering */
/* eslint-disable line-comment-position */
/* eslint-disable @typescript-eslint/unified-signatures */
/* eslint-disable no-var */
/* eslint-disable import-x/namespace */
// eslint-disable-next-line @typescript-eslint/triple-slash-reference, spaced-comment
/// <reference lib="DOM" />
import type {SwitchProps,Key, Ref} from './components-shared.d.ts';

export type ComponentChildren = any;
/**
* Used when an element does not have children.
*/
export interface BaseElementProps<TClass = HTMLElement> {
key?: Key;
ref?: Ref<TClass>;
slot?: Lowercase<string>;
}
/**
* Used when an element has children.
*/
export interface BaseElementPropsWithChildren<TClass = HTMLElement> extends BaseElementProps<TClass> {
children?: ComponentChildren;
}
export type IntrinsicElementProps<T> = T & BaseElementPropsWithChildren<T & HTMLElement>;
export type HtmlElementTagNameProps<T> = T & HTMLElement;
export interface CallbackEvent<T extends keyof HTMLElementTagNameMap> {
currentTarget: HTMLElementTagNameMap[T];
bubbles?: boolean;
cancelable?: boolean;
composed?: boolean;
detail?: any;
eventPhase: number;
target: HTMLElementTagNameMap[T] | null;
}

declare const tagName = "s-switch";
export interface SwitchJSXProps extends Pick<SwitchProps, 'value' | 'defaultChecked' | 'disabled' | 'accessibilityLabel' | 'checked' | 'label' | 'details' | 'error' | 'labelAccessibilityVisibility'> {
onInput?: ((event: CallbackEvent<typeof tagName>) => void) | null;
onChange?: ((event: CallbackEvent<typeof tagName>) => void) | null;
}
declare global {
interface HTMLElementTagNameMap {
[tagName]: HtmlElementTagNameProps<SwitchJSXProps>;
}
}
declare module 'preact' {
namespace createElement.JSX {
interface IntrinsicElements {
[tagName]: IntrinsicElementProps<SwitchJSXProps>;
}
}
}

export { tagName };
export type { SwitchJSXProps };
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/** VERSION: undefined **/
/* eslint-disable import-x/extensions */
/* eslint-disable @typescript-eslint/no-namespace */
/* eslint-disable @typescript-eslint/member-ordering */
/* eslint-disable line-comment-position */
/* eslint-disable @typescript-eslint/unified-signatures */
/* eslint-disable no-var */
/* eslint-disable import-x/namespace */
// eslint-disable-next-line @typescript-eslint/triple-slash-reference, spaced-comment
/// <reference lib="DOM" />
import type {TabProps,StringChildren,Key, Ref} from './components-shared.d.ts';

export type ComponentChildren = any;
/**
* Used when an element does not have children.
*/
export interface BaseElementProps<TClass = HTMLElement> {
key?: Key;
ref?: Ref<TClass>;
slot?: Lowercase<string>;
}
/**
* Used when an element has children.
*/
export interface BaseElementPropsWithChildren<TClass = HTMLElement> extends BaseElementProps<TClass> {
children?: ComponentChildren;
}
export type IntrinsicElementProps<T> = T & BaseElementPropsWithChildren<T & HTMLElement>;
export type HtmlElementTagNameProps<T> = T & HTMLElement;

declare const tagName = "s-tabs";
export interface TabJSXProps extends Pick<TabProps, 'controls' | 'disabled'> {
children?: StringChildren;
}
declare global {
interface HTMLElementTagNameMap {
[tagName]: HtmlElementTagNameProps<TabJSXProps>;
}
}
declare module 'preact' {
namespace createElement.JSX {
interface IntrinsicElements {
[tagName]: IntrinsicElementProps<TabJSXProps>;
}
}
}

export { tagName };
export type { TabJSXProps };
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/** VERSION: undefined **/
/* eslint-disable import-x/extensions */
/* eslint-disable @typescript-eslint/no-namespace */
/* eslint-disable @typescript-eslint/member-ordering */
/* eslint-disable line-comment-position */
/* eslint-disable @typescript-eslint/unified-signatures */
/* eslint-disable no-var */
/* eslint-disable import-x/namespace */
// eslint-disable-next-line @typescript-eslint/triple-slash-reference, spaced-comment
/// <reference lib="DOM" />
import type {TabListProps,Key, Ref} from './components-shared.d.ts';

export type ComponentChildren = any;
/**
* Used when an element does not have children.
*/
export interface BaseElementProps<TClass = HTMLElement> {
key?: Key;
ref?: Ref<TClass>;
slot?: Lowercase<string>;
}
/**
* Used when an element has children.
*/
export interface BaseElementPropsWithChildren<TClass = HTMLElement> extends BaseElementProps<TClass> {
children?: ComponentChildren;
}
export type IntrinsicElementProps<T> = T & BaseElementPropsWithChildren<T & HTMLElement>;
export type HtmlElementTagNameProps<T> = T & HTMLElement;

declare const tagName = "s-tab-list";
export interface TabListJSXProps extends Pick<TabListProps, 'children'> {
children?: ComponentChildren;
}
declare global {
interface HTMLElementTagNameMap {
[tagName]: HtmlElementTagNameProps<TabListJSXProps>;
}
}
declare module 'preact' {
namespace createElement.JSX {
interface IntrinsicElements {
[tagName]: IntrinsicElementProps<TabListJSXProps>;
}
}
}

export { tagName };
export type { TabListJSXProps };
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/** VERSION: undefined **/
/* eslint-disable import-x/extensions */
/* eslint-disable @typescript-eslint/no-namespace */
/* eslint-disable @typescript-eslint/member-ordering */
/* eslint-disable line-comment-position */
/* eslint-disable @typescript-eslint/unified-signatures */
/* eslint-disable no-var */
/* eslint-disable import-x/namespace */
// eslint-disable-next-line @typescript-eslint/triple-slash-reference, spaced-comment
/// <reference lib="DOM" />
import type {TabPanelProps,Key, Ref} from './components-shared.d.ts';

export type ComponentChildren = any;
/**
* Used when an element does not have children.
*/
export interface BaseElementProps<TClass = HTMLElement> {
key?: Key;
ref?: Ref<TClass>;
slot?: Lowercase<string>;
}
/**
* Used when an element has children.
*/
export interface BaseElementPropsWithChildren<TClass = HTMLElement> extends BaseElementProps<TClass> {
children?: ComponentChildren;
}
export type IntrinsicElementProps<T> = T & BaseElementPropsWithChildren<T & HTMLElement>;
export type HtmlElementTagNameProps<T> = T & HTMLElement;

declare const tagName = "s-tab-panel";
export interface TabPanelJSXProps extends Pick<TabPanelProps, 'id'> {
children?: ComponentChildren;
}
declare global {
interface HTMLElementTagNameMap {
[tagName]: HtmlElementTagNameProps<TabPanelJSXProps>;
}
}
declare module 'preact' {
namespace createElement.JSX {
interface IntrinsicElements {
[tagName]: IntrinsicElementProps<TabPanelJSXProps>;
}
}
}

export { tagName };
export type { TabPanelJSXProps };
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/** VERSION: undefined **/
/* eslint-disable import-x/extensions */
/* eslint-disable @typescript-eslint/no-namespace */
/* eslint-disable @typescript-eslint/member-ordering */
/* eslint-disable line-comment-position */
/* eslint-disable @typescript-eslint/unified-signatures */
/* eslint-disable no-var */
/* eslint-disable import-x/namespace */
// eslint-disable-next-line @typescript-eslint/triple-slash-reference, spaced-comment
/// <reference lib="DOM" />
import type {TabsProps,Key, Ref} from './components-shared.d.ts';

export type ComponentChildren = any;
/**
* Used when an element does not have children.
*/
export interface BaseElementProps<TClass = HTMLElement> {
key?: Key;
ref?: Ref<TClass>;
slot?: Lowercase<string>;
}
/**
* Used when an element has children.
*/
export interface BaseElementPropsWithChildren<TClass = HTMLElement> extends BaseElementProps<TClass> {
children?: ComponentChildren;
}
export type IntrinsicElementProps<T> = T & BaseElementPropsWithChildren<T & HTMLElement>;
export type HtmlElementTagNameProps<T> = T & HTMLElement;
export interface CallbackEvent<T extends keyof HTMLElementTagNameMap> {
currentTarget: HTMLElementTagNameMap[T];
bubbles?: boolean;
cancelable?: boolean;
composed?: boolean;
detail?: any;
eventPhase: number;
target: HTMLElementTagNameMap[T] | null;
}

declare const tagName = "s-tab";
export interface TabsJSXProps extends Pick<TabsProps, 'value' | 'defaultValue' | 'disabled'> {
children?: ComponentChildren;
onChange?: ((event: CallbackEvent<typeof tagName>) => void) | null;
}
declare global {
interface HTMLElementTagNameMap {
[tagName]: HtmlElementTagNameProps<TabsJSXProps>;
}
}
declare module 'preact' {
namespace createElement.JSX {
interface IntrinsicElements {
[tagName]: IntrinsicElementProps<TabsJSXProps>;
}
}
}

export { tagName };
export type { TabsJSXProps };
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ export type StandardComponents =
| 'SearchField'
| 'Section'
| 'Stack'
| 'Switch'
| 'Tab'
| 'Tabs'
| 'TabList'
| 'TabPanel'
| 'Text'
| 'TextArea'
| 'TextField'
Expand Down