@shopify/admin-ui-extensions
Advanced tools
Comparing version 1.0.0-alpha.2 to 1.0.0
@@ -7,12 +7,8 @@ "use strict"; | ||
var button = root.createComponent(_adminUiExtensions.Button, { | ||
title: 'Settings', | ||
kind: 'primary', | ||
appearance: 'critical', | ||
size: 'large', | ||
inlineSize: 'fill', | ||
accessibilityLabel: 'open settings', | ||
disabled: false, | ||
title: 'Press Me', | ||
primary: true, | ||
onPress: function onPress() { | ||
return console.log('Pressed'); | ||
} | ||
}, | ||
disabled: false | ||
}); | ||
@@ -19,0 +15,0 @@ root.appendChild(button); |
@@ -120,2 +120,8 @@ "use strict"; | ||
}); | ||
Object.defineProperty(exports, "Stack", { | ||
enumerable: true, | ||
get: function get() { | ||
return _Stack.Stack; | ||
} | ||
}); | ||
Object.defineProperty(exports, "StackItem", { | ||
@@ -190,2 +196,4 @@ enumerable: true, | ||
var _Stack = require("./Stack"); | ||
var _StackItem = require("./StackItem"); | ||
@@ -192,0 +200,0 @@ |
@@ -6,3 +6,3 @@ "use strict"; | ||
(0, _adminUiExtensions.extend)('Playground', function (root) { | ||
var stack = root.createComponent(_adminUiExtensions.InlineStack); | ||
var stack = root.createComponent(_adminUiExtensions.Stack); | ||
var stackItemFill = root.createComponent(_adminUiExtensions.StackItem, { | ||
@@ -9,0 +9,0 @@ fill: true |
@@ -7,7 +7,6 @@ "use strict"; | ||
var formattedText = root.createComponent(_adminUiExtensions.Text, { | ||
appearance: 'success', | ||
emphasized: true, | ||
id: 'some_id', | ||
size: 'small', | ||
strong: true | ||
style: 'italic', | ||
color: 'success', | ||
alignment: 'center' | ||
}); | ||
@@ -14,0 +13,0 @@ formattedText.appendChild('Formatted text is awesome!'); |
@@ -7,10 +7,6 @@ "use strict"; | ||
const button = root.createComponent(_adminUiExtensions.Button, { | ||
title: 'Settings', | ||
kind: 'primary', | ||
appearance: 'critical', | ||
size: 'large', | ||
inlineSize: 'fill', | ||
accessibilityLabel: 'open settings', | ||
disabled: false, | ||
onPress: () => console.log('Pressed') | ||
title: 'Press Me', | ||
primary: true, | ||
onPress: () => console.log('Pressed'), | ||
disabled: false | ||
}); | ||
@@ -17,0 +13,0 @@ root.appendChild(button); |
@@ -120,2 +120,8 @@ "use strict"; | ||
}); | ||
Object.defineProperty(exports, "Stack", { | ||
enumerable: true, | ||
get: function () { | ||
return _Stack.Stack; | ||
} | ||
}); | ||
Object.defineProperty(exports, "StackItem", { | ||
@@ -190,2 +196,4 @@ enumerable: true, | ||
var _Stack = require("./Stack"); | ||
var _StackItem = require("./StackItem"); | ||
@@ -192,0 +200,0 @@ |
@@ -6,3 +6,3 @@ "use strict"; | ||
(0, _adminUiExtensions.extend)('Playground', root => { | ||
const stack = root.createComponent(_adminUiExtensions.InlineStack); | ||
const stack = root.createComponent(_adminUiExtensions.Stack); | ||
const stackItemFill = root.createComponent(_adminUiExtensions.StackItem, { | ||
@@ -9,0 +9,0 @@ fill: true |
@@ -7,7 +7,6 @@ "use strict"; | ||
const formattedText = root.createComponent(_adminUiExtensions.Text, { | ||
appearance: 'success', | ||
emphasized: true, | ||
id: 'some_id', | ||
size: 'small', | ||
strong: true | ||
style: 'italic', | ||
color: 'success', | ||
alignment: 'center' | ||
}); | ||
@@ -14,0 +13,0 @@ formattedText.appendChild('Formatted text is awesome!'); |
@@ -1,3 +0,3 @@ | ||
import { BlockStack, Heading, InlineStack, Pressable, StackItem, Text, TextBlock } from '../components'; | ||
export declare type BasicComponents = typeof BlockStack | typeof Heading | typeof InlineStack | typeof Pressable | typeof StackItem | typeof Text | typeof TextBlock; | ||
import { InlineStack, Heading, Pressable, Stack, BlockStack, StackItem, Text, TextBlock } from '../components'; | ||
export declare type BasicComponents = typeof InlineStack | typeof Heading | typeof Pressable | typeof Stack | typeof BlockStack | typeof StackItem | typeof Text | typeof TextBlock; | ||
//# sourceMappingURL=Basic.d.ts.map |
@@ -1,2 +0,1 @@ | ||
import type { BaseButtonProps } from '@shopify/ui-extensions'; | ||
import { IconProps } from '../Icon'; | ||
@@ -12,3 +11,13 @@ declare type RequiredTitleOrIcon = { | ||
}; | ||
export declare type ButtonProps = RequiredTitleOrIcon & BaseButtonProps; | ||
export declare type ButtonProps = RequiredTitleOrIcon & { | ||
/** | ||
* Provides extra visual weight and identifies the primary action in a set of buttons. | ||
* @defaultValue `false` | ||
*/ | ||
primary?: boolean; | ||
/** Callback when button is pressed */ | ||
onPress?(): void; | ||
/** Disables the button, preventing interaction. */ | ||
disabled?: boolean; | ||
}; | ||
/** | ||
@@ -15,0 +24,0 @@ * Buttons are used primarily for actions, such as “Add”, “Close”, “Cancel”, or “Save”. |
@@ -39,2 +39,4 @@ export { Badge } from './Badge'; | ||
export type { SpinnerProps } from './Spinner'; | ||
export { Stack } from './Stack'; | ||
export type { StackProps } from './Stack'; | ||
export { StackItem } from './StackItem'; | ||
@@ -41,0 +43,0 @@ export type { StackItemProps } from './StackItem'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Thumbnail = exports.TextField = exports.TextBlock = exports.Text = exports.StackItem = exports.Spinner = exports.Select = exports.ResourceList = exports.ResourceItem = exports.Radio = exports.Pressable = exports.OptionList = exports.Link = exports.Modal = exports.InlineStack = exports.Icon = exports.Heading = exports.Checkbox = exports.CardSection = exports.Card = exports.Button = exports.BlockStack = exports.Banner = exports.Badge = void 0; | ||
exports.Thumbnail = exports.TextField = exports.TextBlock = exports.Text = exports.StackItem = exports.Stack = exports.Spinner = exports.Select = exports.ResourceList = exports.ResourceItem = exports.Radio = exports.Pressable = exports.OptionList = exports.Link = exports.Modal = exports.InlineStack = exports.Icon = exports.Heading = exports.Checkbox = exports.CardSection = exports.Card = exports.Button = exports.BlockStack = exports.Banner = exports.Badge = void 0; | ||
var Badge_1 = require("./Badge"); | ||
@@ -42,2 +42,4 @@ Object.defineProperty(exports, "Badge", { enumerable: true, get: function () { return Badge_1.Badge; } }); | ||
Object.defineProperty(exports, "Spinner", { enumerable: true, get: function () { return Spinner_1.Spinner; } }); | ||
var Stack_1 = require("./Stack"); | ||
Object.defineProperty(exports, "Stack", { enumerable: true, get: function () { return Stack_1.Stack; } }); | ||
var StackItem_1 = require("./StackItem"); | ||
@@ -44,0 +46,0 @@ Object.defineProperty(exports, "StackItem", { enumerable: true, get: function () { return StackItem_1.StackItem; } }); |
@@ -0,11 +1,21 @@ | ||
declare type TextSize = 'small' | 'medium' | 'titleSmall' | 'titleMedium' | 'titleLarge' | 'titleExtraLarge'; | ||
declare type Alignment = 'left' | 'right' | 'center' | 'justify'; | ||
declare type Style = 'normal' | 'italic' | 'monospace' | 'strong'; | ||
declare type Color = 'primary' | 'secondary' | 'warning' | 'error' | 'success'; | ||
export interface TextProps { | ||
appearance?: 'critical' | 'code' | 'subdued' | 'success'; | ||
emphasized?: boolean; | ||
/** | ||
* Unique identifier. Typically used as a target for another component’s controls | ||
* to associate an accessible label with an action. | ||
* @defaultValue 'medium' | ||
*/ | ||
id?: string; | ||
size?: 'extraSmall' | 'small' | 'base' | 'medium' | 'large' | 'extraLarge'; | ||
strong?: boolean; | ||
size?: TextSize; | ||
/** Text style enhances text with additional visual meaning. For example, using subdued text to de-emphasize it from its surrounding text. */ | ||
style?: Style; | ||
/** | ||
* @defaultValue 'primary' | ||
*/ | ||
color?: Color; | ||
/** | ||
* Vertical alignment of the text. | ||
* @defaultValue 'left' | ||
*/ | ||
alignment?: Alignment; | ||
} | ||
@@ -16,2 +26,3 @@ /** | ||
export declare const Text: import("@remote-ui/core").RemoteComponentType<"Text", TextProps, true>; | ||
export {}; | ||
//# sourceMappingURL=Text.d.ts.map |
export { extend } from './api'; | ||
export type { ShopifyApi, ShopifyGlobal } from './api'; | ||
export * from './components'; | ||
export type { BadgeProps, BannerProps, BlockStackProps, ButtonProps, CardProps, CardSectionProps, CheckboxProps, PressableProps, IconProps, InlineStackProps, ModalProps, LinkProps, RadioProps, ResourceItemProps, ResourceListProps, SelectProps, SpinnerProps, StackItemProps, TextProps, TextBlockProps, TextFieldProps, ThumbnailProps, OptionListProps, DestructableAction, DisableableAction, } from './components'; | ||
export type { BadgeProps, BannerProps, BlockStackProps, ButtonProps, CardProps, CardSectionProps, CheckboxProps, PressableProps, IconProps, InlineStackProps, ModalProps, LinkProps, RadioProps, ResourceItemProps, ResourceListProps, SelectProps, SpinnerProps, StackProps, StackItemProps, TextProps, TextBlockProps, TextFieldProps, ThumbnailProps, OptionListProps, DestructableAction, DisableableAction, } from './components'; | ||
export * from './extension-api'; | ||
@@ -6,0 +6,0 @@ export type { LayoutApi, Layout, LocaleApi, ContainerApi, ExtensionContainer, DataApi, ExtensionData, SessionTokenApi, ToastApi, } from './extension-api'; |
{ | ||
"name": "@shopify/admin-ui-extensions", | ||
"version": "1.0.0-alpha.2", | ||
"version": "1.0.0", | ||
"main": "index.js", | ||
@@ -20,3 +20,3 @@ "module": "index.mjs", | ||
"@remote-ui/core": "^2.1.3", | ||
"@shopify/ui-extensions": "^1.0.0-alpha.0" | ||
"@shopify/ui-extensions": "^1.0.0" | ||
}, | ||
@@ -27,3 +27,3 @@ "publishConfig": { | ||
}, | ||
"gitHead": "f48e1eac4422554f5b3acb2cda0e737ad8b46d4b" | ||
"gitHead": "14902f020e8f53a54677ff24149bc83c17dc413b" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
500766
809
5204
1