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
5 changes: 5 additions & 0 deletions .changeset/add-box-private-positioning-types.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@shopify/ui-extensions': patch
---

Add private positioning types (`position`, `insetBlock`, `insetInline`, `transform`) to the `s-box` checkout component.
57 changes: 56 additions & 1 deletion packages/ui-extensions/src/surfaces/checkout/components/Box.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/* eslint-disable import-x/namespace */
// eslint-disable-next-line @typescript-eslint/triple-slash-reference, spaced-comment
/// <reference lib="DOM" />
import type {BoxProps$1,MaybeAllValuesShorthandProperty,BorderSizeKeyword, BorderStyleKeyword,ColorKeyword} from './components-shared.d.ts';
import type {BoxProps$1,MaybeAllValuesShorthandProperty,BorderSizeKeyword, BorderStyleKeyword, SizeUnits,ColorKeyword} from './components-shared.d.ts';

/**
* The subset of border size values available for this component.
Expand Down Expand Up @@ -84,6 +84,61 @@ export interface BoxElementProps extends Pick<BoxProps$1, 'accessibilityLabel' |
* @default 'none'
*/
borderRadius?: MaybeAllValuesShorthandProperty<Extract<BoxProps$1['borderRadius'], 'none' | 'small-100' | 'small' | 'base' | 'large' | 'large-100' | 'max'>>;
/**
* Sets the box's block position by specifying offsets from the box's
* default position, following the CSS `inset-block` shorthand:
* a block-start offset followed by a block-end offset, where only one
* of the two can be a size so each axis is only offset once.
*
* When `position` is set to `absolute`, offsets are insets from the
* nearest positioned ancestor. A percentage value refers to the block
* size of that ancestor.
*
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/inset-block
*
* @default 'auto'
* @private
*/
insetBlock?: `auto ${SizeUnits}` | `${SizeUnits} auto` | 'auto';
/**
* Sets the box's inline position by specifying offsets from the box's
* default position, following the CSS `inset-inline` shorthand:
* an inline-start offset followed by an inline-end offset, where only
* one of the two can be a size so each axis is only offset once.
*
* When `position` is set to `absolute`, offsets are insets from the
* nearest positioned ancestor. A percentage value refers to the inline
* size of that ancestor.
*
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/inset-inline
*
* @default 'auto'
* @private
*/
insetInline?: `auto ${SizeUnits}` | `${SizeUnits} auto` | 'auto';
/**
* Changes how the box is positioned.
*
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/position
*
* @default 'relative'
* @private
*/
position?: 'absolute' | 'relative';
/**
* Specifies a transformation of the box.
*
* Only two-dimensional translations are supported. The first value
* translates along the inline axis and the second along the block axis;
* inline translations are flipped in right-to-left writing modes.
* A percentage value refers to the corresponding size of the box itself.
*
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/transform
*
* @default 'none'
* @private
*/
transform?: `translate(${SizeUnits})` | `translate(${SizeUnits}, ${SizeUnits})` | `translate(${SizeUnits},${SizeUnits})` | 'none';
}
export interface BoxElement extends BoxElementProps, Omit<HTMLElement, 'id'> {
}
Expand Down
Loading