Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@stoplight/mosaic

Package Overview
Dependencies
Maintainers
22
Versions
193
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stoplight/mosaic - npm Package Compare versions

Comparing version 1.0.0-beta.33 to 1.0.0-beta.34

components/Button/FieldButton.d.ts

13

components/Button/Button.d.ts
import './style.css';
import { PressEvent } from '@react-types/shared';
import React from 'react';
import { FocusableProps, PressEvents } from '@react-types/shared';
import React, { RefObject } from 'react';
import { IntentVals } from '../../enhancers';

@@ -8,3 +8,4 @@ import { PolymorphicComponentProps } from '../Box/types';

import { AppearanceVals } from './variants';
export declare type ButtonOwnProps = {
export declare type ButtonOwnProps = PressEvents & FocusableProps & {
children?: React.ReactNode;
appearance?: AppearanceVals;

@@ -19,4 +20,2 @@ intent?: IntentVals;

autoFocus?: boolean;
/** Handler that is called when the press is released over the target. */
onPress?: (e: PressEvent) => void;
label?: string;

@@ -26,3 +25,5 @@ };

declare const defaultElement = "button";
export declare const Button: <E extends React.ElementType = typeof defaultElement>(props: ButtonProps<E>) => JSX.Element;
export declare const Button: <E extends React.ElementType = typeof defaultElement>(props: ButtonProps<E> & {
ref?: RefObject<HTMLElement>;
}) => JSX.Element;
export {};
export * from './Button';
export * from './CopyButton';
export * from './FieldButton';
import { FontSizeVals, HeightVals, IntentVals, NegativeSpaceVals, RoundedVals, SpaceVals } from '../../enhancers';
import { BoxOwnProps } from '../Box/types';
export declare type AppearanceVals = 'default' | 'primary' | 'minimal';
export declare type AppearanceVals = 'default' | 'primary' | 'minimal' | 'select';
export declare const sizes: Partial<Record<HeightVals, {

@@ -5,0 +5,0 @@ px: SpaceVals;

import React from 'react';
import { IMarginProps, IPaddingProps } from '../../enhancers';
import { IMarginProps, IPaddingProps, SpaceVals } from '../../enhancers';
import { IBoxHTMLAttributes } from '../Box/types';
export declare type ContainerSizeVals = 'full' | 'xl' | 'lg' | 'md' | 'sm';
export declare type ContainerSizeVals = 'full' | 'xl' | 'lg' | 'md' | 'sm' | 'xs';
export interface IContainerProps extends IMarginProps, IPaddingProps, IBoxHTMLAttributes {

@@ -9,2 +9,6 @@ as?: React.ElementType;

}
export declare const containerSizes: Record<ContainerSizeVals, {
maxWidth?: number;
p: SpaceVals;
}>;
export declare const Container: React.MemoExoticComponent<React.ForwardRefExoticComponent<IContainerProps & React.RefAttributes<HTMLDivElement>>>;

@@ -1,2 +0,2 @@

import React from 'react';
import React, { ReactNode } from 'react';
export declare const MENU_ITEM_IDENT_WIDTH = "20px";

@@ -7,4 +7,8 @@ export declare type MenuItemProps = {

*/
text: string;
text: ReactNode;
/**
* Optional element to render on the right side of the menu item. Use this to display keyboard shortcut, badge counts, etc.
*/
meta?: ReactNode;
/**
* Render menu item with extra space on the left side. Useful to align menus when some items are checkbox items.

@@ -28,3 +32,3 @@ */

*/
onClick?: () => void;
onClick?: (event: React.MouseEvent<HTMLElement, MouseEvent>) => void;
/**

@@ -31,0 +35,0 @@ * For use when nesting menus, if you want the submenu to have a particular label. Gets forwarded through to the `Menu.label` prop.

@@ -29,19 +29,7 @@ import React from 'react';

};
declare type UseModalProps = {
/**
* Called when the Modal opens.
*/
onOpen?: () => void;
/**
* Called when the Modal closes.
*/
onClose?: () => void;
};
export declare const useModalState: ({ onOpen, onClose }?: UseModalProps) => {
export declare const useModalState: () => {
isOpen: boolean;
open: () => void;
close: () => void;
toggle: () => void;
};
export declare const Modal: (props: ModalProps) => JSX.Element;
export {};

@@ -1,5 +0,7 @@

import React from 'react';
import React, { CSSProperties } from 'react';
export declare type ProviderProps = {
children: React.ReactNode;
className?: string;
style?: CSSProperties;
};
export declare const Provider: ({ children }: ProviderProps) => JSX.Element;
export declare const Provider: ({ children, className, style }: ProviderProps) => JSX.Element;
export * from './Select';
export * from './types';

@@ -1,14 +0,3 @@

import React from 'react';
import { IMarginProps, IntentVals } from '../../enhancers';
import { BoxOwnProps, IBoxHTMLAttributes } from '../Box';
export interface ISelectProps extends IMarginProps, IBoxHTMLAttributes<HTMLSelectElement>, BoxOwnProps {
value?: string | number;
options?: ReadonlyArray<string | number | {
value: string | number;
label?: string;
}>;
intent?: IntentVals;
size?: 'sm' | 'md' | 'lg';
disabled?: boolean;
}
export declare const Select: React.MemoExoticComponent<React.ForwardRefExoticComponent<ISelectProps & React.RefAttributes<HTMLSelectElement>>>;
/// <reference types="react" />
import { SelectProps } from './types';
export declare function Select({ flexGrow, w, size, renderTrigger, triggerTextPrefix, options, value, defaultValue, onChange, isClearable, placeholder, onOpen, onClose, isDisabled, ...props }: SelectProps): JSX.Element;

@@ -21,3 +21,3 @@ import { SemanticColorVals } from './color';

export declare const borderProps: EnhancerFn<IBorderProps>;
export declare type RingWidthVals = true;
export declare type RingWidthVals = true | false;
export declare type RingColorVals = 'primary' | 'success' | 'warning' | 'danger';

@@ -24,0 +24,0 @@ export declare type RingOpacityVals = OpacityVals;

export * from './use-clipboard';
export * from './use-collection-key-accumulator';
export * from './use-controllable-state';

@@ -3,0 +4,0 @@ export * from './use-is-ssr';

@@ -25,2 +25,3 @@ export * from './enhancers';

export * from './components/NoSsr';
export * from './components/Overlay';
export * from './components/Panel';

@@ -27,0 +28,0 @@ export * from './components/Paragraph';

{
"name": "@stoplight/mosaic",
"version": "1.0.0-beta.33",
"version": "1.0.0-beta.34",
"sideEffects": false,

@@ -13,6 +13,6 @@ "peerDependencies": {

"clsx": "^1.1.1",
"@react-aria/button": "^3.3.0",
"@react-aria/button": "^3.3.1",
"@react-aria/focus": "^3.2.3",
"@react-aria/interactions": "^3.3.2",
"@react-spectrum/utils": "^3.5.0",
"@react-aria/interactions": "^3.3.3",
"@react-aria/utils": "^3.6.0",
"@fortawesome/fontawesome-svg-core": "^1.2.34",

@@ -23,3 +23,3 @@ "@fortawesome/free-solid-svg-icons": "^5.15.2",

"reakit": "npm:@stoplight/reakit@~1.3.5",
"@react-aria/overlays": "^3.6.0",
"@react-aria/overlays": "^3.6.1",
"@react-aria/dialog": "^3.1.2",

@@ -29,5 +29,10 @@ "@react-hook/size": "^2.1.1",

"ts-keycode-enum": "^1.0.6",
"@react-spectrum/utils": "^3.5.1",
"@react-aria/ssr": "^3.0.1",
"@react-aria/tooltip": "^3.1.0",
"@react-stately/tooltip": "^3.0.1",
"@react-aria/listbox": "^3.2.4",
"@react-aria/select": "^3.3.0",
"@react-aria/separator": "^3.1.1",
"@react-stately/select": "^3.1.1",
"@react-aria/tooltip": "^3.1.1",
"@react-stately/tooltip": "^3.0.2",
"copy-to-clipboard": "^3.3.1",

@@ -34,0 +39,0 @@ "polished": "^4.0.5",

export * from './assertion';
export * from './collection-key-accumulator';
export * from './color-manipulation';

@@ -3,0 +4,0 @@ export * from './css';

@@ -0,3 +1,21 @@

import { ItemRenderer } from '@react-types/shared';
import React from 'react';
export declare type MaybeRenderProp<P, R = React.ReactNode> = R | ((props: P) => R);
export declare type MaybeRenderPropWithState<P, S, R = React.ReactNode> = R | ((props: P, state: S) => R);
export declare type Placement = 'bottom' | 'bottom left' | 'bottom right' | 'top' | 'top left' | 'top right' | 'left' | 'left top' | 'left bottom' | 'right' | 'right top' | 'right bottom';
export interface PartialSpectrumCollectionNode<T> {
type?: 'item' | 'section' | string;
key?: React.Key;
value?: T;
element?: React.ReactElement;
wrapper?: (element: React.ReactElement) => React.ReactElement;
rendered?: React.ReactNode;
textValue?: string;
'aria-label'?: string;
index?: number;
renderer?: ItemRenderer<T>;
hasChildNodes?: boolean;
childNodes?: () => IterableIterator<PartialSpectrumCollectionNode<T>>;
props?: any;
shouldInvalidate?: (context: unknown) => boolean;
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc