Skip to content
Merged
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
1,684 changes: 1,010 additions & 674 deletions packages/ui-extensions/src/surfaces/admin/components.d.ts

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
/** VERSION: 0.47.2 **/
/** VERSION: 0.49.0 **/
/* eslint-disable import/extensions */

/* eslint-disable @typescript-eslint/no-namespace */

// eslint-disable-next-line @typescript-eslint/triple-slash-reference, spaced-comment
/// <reference lib="DOM" />
// eslint-disable-next-line @typescript-eslint/triple-slash-reference, spaced-comment
/// <reference lib="WebWorker" />
import type {ComponentChild, AdminActionProps$1} from './shared.d.ts';

export interface AdminActionProps
Expand Down Expand Up @@ -94,8 +92,11 @@ declare global {
declare module 'preact' {
namespace createElement.JSX {
interface IntrinsicElements {
[tagName]: HTMLAttributes<HTMLElement> &
Omit<ReactProps, 'primaryAction' | 'secondaryActions'>;
[tagName]: Omit<
HTMLAttributes<HTMLElement>,
Extract<keyof HTMLAttributes<HTMLElement>, `on${Capitalize<string>}`>
> &
ReactProps;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
/** VERSION: 0.47.2 **/
/** VERSION: 0.49.0 **/
/* eslint-disable import/extensions */

/* eslint-disable @typescript-eslint/no-namespace */

// eslint-disable-next-line @typescript-eslint/triple-slash-reference, spaced-comment
/// <reference lib="DOM" />
// eslint-disable-next-line @typescript-eslint/triple-slash-reference, spaced-comment
/// <reference lib="WebWorker" />
import type {AdminBlockProps$1, ComponentChild} from './shared.d.ts';

export interface AdminBlockProps
Expand Down Expand Up @@ -91,7 +89,11 @@ declare global {
declare module 'preact' {
namespace createElement.JSX {
interface IntrinsicElements {
[tagName]: HTMLAttributes<HTMLElement> & ReactProps;
[tagName]: Omit<
HTMLAttributes<HTMLElement>,
Extract<keyof HTMLAttributes<HTMLElement>, `on${Capitalize<string>}`>
> &
ReactProps;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
/** VERSION: 0.47.2 **/
/** VERSION: 0.49.0 **/
/* eslint-disable import/extensions */

/* eslint-disable @typescript-eslint/no-namespace */

// eslint-disable-next-line @typescript-eslint/triple-slash-reference, spaced-comment
/// <reference lib="DOM" />
// eslint-disable-next-line @typescript-eslint/triple-slash-reference, spaced-comment
/// <reference lib="WebWorker" />
import type {AdminPrintActionProps$1, ComponentChild} from './shared.d.ts';

export interface AdminPrintActionProps
Expand Down Expand Up @@ -90,7 +88,11 @@ declare global {
declare module 'preact' {
namespace createElement.JSX {
interface IntrinsicElements {
[tagName]: HTMLAttributes<HTMLElement> & ReactProps;
[tagName]: Omit<
HTMLAttributes<HTMLElement>,
Extract<keyof HTMLAttributes<HTMLElement>, `on${Capitalize<string>}`>
> &
ReactProps;
}
}
}
Expand Down
20 changes: 15 additions & 5 deletions packages/ui-extensions/src/surfaces/admin/components/Badge.d.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
/** VERSION: 0.47.2 **/
/** VERSION: 0.49.0 **/
/* eslint-disable import/extensions */

/* eslint-disable @typescript-eslint/no-namespace */
/* eslint-disable @typescript-eslint/member-ordering */

// eslint-disable-next-line @typescript-eslint/triple-slash-reference, spaced-comment
/// <reference lib="DOM" />
// eslint-disable-next-line @typescript-eslint/triple-slash-reference, spaced-comment
/// <reference lib="WebWorker" />
import type {BadgeProps$1, IconType, ComponentChild} from './shared.d.ts';
import type {
IconProps$1,
BadgeProps$1,
IconType,
ComponentChild,
} from './shared.d.ts';

export interface IconProps
extends Pick<IconProps$1, 'type' | 'tone' | 'color' | 'size'> {
/**
* Specifies the type of icon that will be displayed.
*/
type: '' | IconType | 'empty';
tone: Extract<
IconProps$1['tone'],
Expand Down Expand Up @@ -110,7 +116,11 @@ declare global {
declare module 'preact' {
namespace createElement.JSX {
interface IntrinsicElements {
[tagName]: HTMLAttributes<HTMLElement> & ReactProps;
[tagName]: Omit<
HTMLAttributes<HTMLElement>,
Extract<keyof HTMLAttributes<HTMLElement>, `on${Capitalize<string>}`>
> &
ReactProps;
}
}
}
Expand Down
18 changes: 11 additions & 7 deletions packages/ui-extensions/src/surfaces/admin/components/Banner.d.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
/** VERSION: 0.47.2 **/
/** VERSION: 0.49.0 **/
/* eslint-disable import/extensions */

/* eslint-disable @typescript-eslint/no-namespace */
/* eslint-disable @typescript-eslint/member-ordering */

// eslint-disable-next-line @typescript-eslint/triple-slash-reference, spaced-comment
/// <reference lib="DOM" />
// eslint-disable-next-line @typescript-eslint/triple-slash-reference, spaced-comment
/// <reference lib="WebWorker" />
import type {ComponentChild, BannerProps$1} from './shared.d.ts';

export type RequiredBannerProps = Required<BannerProps$1>;
export interface BannerProps
extends Pick<RequiredBannerProps, 'heading' | 'dismissible' | 'hidden'> {
extends Pick<
RequiredBannerProps,
'heading' | 'dismissible' | 'hidden' | 'tone'
> {
tone: Extract<
RequiredBannerProps['tone'],
'auto' | 'critical' | 'warning' | 'success' | 'info'
>;
}

export type CallbackEvent<T extends keyof HTMLElementTagNameMap> = Event & {
target: HTMLElementTagNameMap[T];
currentTarget: HTMLElementTagNameMap[T];
};
export type CallbackEventListener<T extends keyof HTMLElementTagNameMap> =
| (EventListener & {
Expand Down Expand Up @@ -112,8 +113,11 @@ declare global {
declare module 'preact' {
namespace createElement.JSX {
interface IntrinsicElements {
[tagName]: HTMLAttributes<HTMLElement> &
Omit<ReactProps, 'secondaryActions'>;
[tagName]: Omit<
HTMLAttributes<HTMLElement>,
Extract<keyof HTMLAttributes<HTMLElement>, `on${Capitalize<string>}`>
> &
ReactProps;
}
}
}
Expand Down
99 changes: 46 additions & 53 deletions packages/ui-extensions/src/surfaces/admin/components/Box.d.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
/** VERSION: 0.47.2 **/
/** VERSION: 0.49.0 **/
/* eslint-disable import/extensions */

/* eslint-disable @typescript-eslint/no-namespace */

// eslint-disable-next-line @typescript-eslint/triple-slash-reference, spaced-comment
/// <reference lib="DOM" />
// eslint-disable-next-line @typescript-eslint/triple-slash-reference, spaced-comment
/// <reference lib="WebWorker" />
import type {
BoxProps$1,
MaybeAllValuesShorthandProperty,
Expand All @@ -15,79 +13,70 @@ import type {

export type MakeResponsive<T> = T | `@container${string}`;

export type AlignedBox = Required<BoxProps$1>;
export type RequiredBoxProps = Required<BoxProps$1>;
export type BoxBorderRadii = Extract<
RequiredBoxProps['borderRadius'],
| 'none'
| 'small-200'
| 'small-100'
| 'small'
| 'base'
| 'large'
| 'large-100'
| 'large-200'
>;
export type BoxBorderStyles = Extract<
RequiredBoxProps['borderStyle'],
'none' | 'solid' | 'dashed' | 'auto'
>;
export interface BoxProps
extends Pick<
AlignedBox,
RequiredBoxProps,
| 'accessibilityLabel'
| 'accessibilityRole'
| 'accessibilityVisibility'
| 'background'
| 'blockSize'
| 'minBlockSize'
| 'maxBlockSize'
| 'inlineSize'
| 'minInlineSize'
| 'maxInlineSize'
| 'border'
| 'borderWidth'
| 'borderRadius'
| 'borderColor'
| 'borderRadius'
| 'borderStyle'
| 'borderWidth'
| 'display'
| 'inlineSize'
| 'maxBlockSize'
| 'maxInlineSize'
| 'minBlockSize'
| 'minInlineSize'
| 'overflow'
> {
accessibilityRole: AlignedBox['accessibilityRole'];
background: Extract<
AlignedBox['background'],
RequiredBoxProps['background'],
'transparent' | 'base' | 'subdued' | 'strong'
>;
blockSize: AlignedBox['blockSize'];
minBlockSize: AlignedBox['minBlockSize'];
maxBlockSize: AlignedBox['maxBlockSize'];
inlineSize: AlignedBox['inlineSize'];
minInlineSize: AlignedBox['minInlineSize'];
maxInlineSize: AlignedBox['maxInlineSize'];
padding: MakeResponsive<AlignedBox['padding']>;
paddingBlock: MakeResponsive<AlignedBox['paddingBlock']>;
paddingBlockStart: MakeResponsive<AlignedBox['paddingBlockStart']>;
paddingBlockEnd: MakeResponsive<AlignedBox['paddingBlockEnd']>;
paddingInline: MakeResponsive<AlignedBox['paddingInline']>;
paddingInlineStart: MakeResponsive<AlignedBox['paddingInlineStart']>;
paddingInlineEnd: MakeResponsive<AlignedBox['paddingInlineEnd']>;
border: AlignedBox['border'] | 'none';
padding: MakeResponsive<RequiredBoxProps['padding']>;
paddingBlock: MakeResponsive<RequiredBoxProps['paddingBlock']>;
paddingBlockStart: MakeResponsive<RequiredBoxProps['paddingBlockStart']>;
paddingBlockEnd: MakeResponsive<RequiredBoxProps['paddingBlockEnd']>;
paddingInline: MakeResponsive<RequiredBoxProps['paddingInline']>;
paddingInlineStart: MakeResponsive<RequiredBoxProps['paddingInlineStart']>;
paddingInlineEnd: MakeResponsive<RequiredBoxProps['paddingInlineEnd']>;
borderWidth:
| MaybeAllValuesShorthandProperty<
Extract<
AlignedBox['borderWidth'],
RequiredBoxProps['borderWidth'],
'small-100' | 'small' | 'base' | 'large' | 'large-100' | 'none'
>
>
| Extract<AlignedBox['borderWidth'], ''>;
| Extract<RequiredBoxProps['borderWidth'], ''>;
borderStyle:
| MaybeAllValuesShorthandProperty<
Extract<AlignedBox['borderStyle'], 'none' | 'solid' | 'dashed'>
>
| Extract<AlignedBox['borderStyle'], ''>;
| MaybeAllValuesShorthandProperty<BoxBorderStyles>
| Extract<RequiredBoxProps['borderStyle'], ''>;
borderColor: Extract<
AlignedBox['borderColor'],
RequiredBoxProps['borderColor'],
'subdued' | 'base' | 'strong' | ''
>;
borderRadius: MaybeAllValuesShorthandProperty<
Extract<
AlignedBox['borderRadius'],
| 'none'
| 'small-200'
| 'small-100'
| 'small'
| 'base'
| 'large'
| 'large-100'
| 'large-200'
>
>;
accessibilityLabel: AlignedBox['accessibilityLabel'];
accessibilityVisibility: AlignedBox['accessibilityVisibility'];
display: AlignedBox['display'];
overflow: AlignedBox['overflow'];
borderRadius: MaybeAllValuesShorthandProperty<BoxBorderRadii>;
}

declare const tagName = 's-box';
Expand Down Expand Up @@ -190,7 +179,11 @@ declare global {
declare module 'preact' {
namespace createElement.JSX {
interface IntrinsicElements {
[tagName]: HTMLAttributes<HTMLElement> & ReactProps;
[tagName]: Omit<
HTMLAttributes<HTMLElement>,
Extract<keyof HTMLAttributes<HTMLElement>, `on${Capitalize<string>}`>
> &
ReactProps;
}
}
}
Expand Down
16 changes: 11 additions & 5 deletions packages/ui-extensions/src/surfaces/admin/components/Button.d.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
/** VERSION: 0.47.2 **/
/** VERSION: 0.49.0 **/
/* eslint-disable import/extensions */

/* eslint-disable @typescript-eslint/no-namespace */
/* eslint-disable @typescript-eslint/member-ordering */

// eslint-disable-next-line @typescript-eslint/triple-slash-reference, spaced-comment
/// <reference lib="DOM" />
// eslint-disable-next-line @typescript-eslint/triple-slash-reference, spaced-comment
/// <reference lib="WebWorker" />
import type {
IconProps$1,
ButtonProps$1,
IconType,
InteractionProps,
Expand All @@ -17,6 +16,9 @@ import type {

export interface IconProps
extends Pick<IconProps$1, 'type' | 'tone' | 'color' | 'size'> {
/**
* Specifies the type of icon that will be displayed.
*/
type: '' | IconType | 'empty';
tone: Extract<
IconProps$1['tone'],
Expand Down Expand Up @@ -55,7 +57,7 @@ export interface ButtonProps extends ButtonBaseProps {
}

export type CallbackEvent<T extends keyof HTMLElementTagNameMap> = Event & {
target: HTMLElementTagNameMap[T];
currentTarget: HTMLElementTagNameMap[T];
};
export type CallbackEventListener<T extends keyof HTMLElementTagNameMap> =
| (EventListener & {
Expand Down Expand Up @@ -166,7 +168,11 @@ declare global {
declare module 'preact' {
namespace createElement.JSX {
interface IntrinsicElements {
[tagName]: HTMLAttributes<HTMLElement> & ReactProps;
[tagName]: Omit<
HTMLAttributes<HTMLElement>,
Extract<keyof HTMLAttributes<HTMLElement>, `on${Capitalize<string>}`>
> &
ReactProps;
}
}
}
Expand Down
Loading