@rmwc/floating-label
Advanced tools
Comparing version 5.7.0 to 6.0.0-alpha.1
@@ -1,4 +0,3 @@ | ||
/// <reference types="react" /> | ||
import { MDCFloatingLabelFoundation } from '@material/floating-label'; | ||
import { FoundationComponent } from '@rmwc/base'; | ||
import * as RMWC from '@rmwc/types'; | ||
import React from 'react'; | ||
export interface FloatingLabelProps { | ||
@@ -8,9 +7,7 @@ shake?: boolean; | ||
} | ||
export declare class FloatingLabel extends FoundationComponent<MDCFloatingLabelFoundation, FloatingLabelProps> { | ||
static displayName: string; | ||
private root; | ||
getDefaultFoundation(): MDCFloatingLabelFoundation; | ||
sync(props: FloatingLabelProps, prevProps: FloatingLabelProps): void; | ||
getWidth(): number; | ||
render(): JSX.Element; | ||
export interface FloatingLabelApi { | ||
getWidth: () => number; | ||
} | ||
export declare const FloatingLabel: React.ForwardRefExoticComponent<Pick<FloatingLabelProps & RMWC.ComponentProps & { | ||
apiRef?: ((api: FloatingLabelApi) => void) | undefined; | ||
}, "onError" | "className" | "prefix" | "size" | "children" | "value" | "cite" | "data" | "form" | "label" | "span" | "style" | "summary" | "title" | "pattern" | "theme" | "onBlur" | "onClick" | "onContextMenu" | "onCopy" | "onCut" | "onAuxClick" | "onDoubleClick" | "onDragEnd" | "onDragStart" | "onDrop" | "onFocus" | "onInput" | "onInvalid" | "onKeyDown" | "onKeyPress" | "onKeyUp" | "onMouseDown" | "onMouseUp" | "onPaste" | "onPause" | "onPlay" | "onPointerCancel" | "onPointerDown" | "onPointerUp" | "onRateChange" | "onReset" | "onSeeked" | "onSubmit" | "onTouchCancel" | "onTouchEnd" | "onTouchStart" | "onVolumeChange" | "onAbort" | "onAnimationEnd" | "onAnimationIteration" | "onAnimationStart" | "onCanPlay" | "onCanPlayThrough" | "onDrag" | "onDragEnter" | "onDragExit" | "onDragLeave" | "onDragOver" | "onDurationChange" | "onEmptied" | "onEncrypted" | "onEnded" | "onGotPointerCapture" | "onLoad" | "onLoadedData" | "onLoadedMetadata" | "onLoadStart" | "onLostPointerCapture" | "onMouseMove" | "onMouseOut" | "onMouseOver" | "onPlaying" | "onPointerMove" | "onPointerOut" | "onPointerOver" | "onProgress" | "onScroll" | "onSeeking" | "onStalled" | "onSuspend" | "onTimeUpdate" | "onTouchMove" | "onTransitionEnd" | "onWaiting" | "onWheel" | "onMouseEnter" | "onMouseLeave" | "onPointerEnter" | "onPointerLeave" | "onChange" | "onSelect" | "onBeforeInput" | "onCompositionEnd" | "onCompositionStart" | "onCompositionUpdate" | "id" | "dir" | "slot" | "key" | "target" | "tag" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "content" | "controls" | "coords" | "crossOrigin" | "dateTime" | "default" | "defer" | "disabled" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "nonce" | "noValidate" | "open" | "optimum" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "type" | "useMap" | "width" | "wmode" | "wrap" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "hidden" | "lang" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopyCapture" | "onCutCapture" | "onPasteCapture" | "onCompositionEndCapture" | "onCompositionStartCapture" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInputCapture" | "onInputCapture" | "onResetCapture" | "onSubmitCapture" | "onInvalidCapture" | "onLoadCapture" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPressCapture" | "onKeyUpCapture" | "onAbortCapture" | "onCanPlayCapture" | "onCanPlayThroughCapture" | "onDurationChangeCapture" | "onEmptiedCapture" | "onEncryptedCapture" | "onEndedCapture" | "onLoadedDataCapture" | "onLoadedMetadataCapture" | "onLoadStartCapture" | "onPauseCapture" | "onPlayCapture" | "onPlayingCapture" | "onProgressCapture" | "onRateChangeCapture" | "onSeekedCapture" | "onSeekingCapture" | "onStalledCapture" | "onSuspendCapture" | "onTimeUpdateCapture" | "onVolumeChangeCapture" | "onWaitingCapture" | "onAuxClickCapture" | "onClickCapture" | "onContextMenuCapture" | "onDoubleClickCapture" | "onDragCapture" | "onDragEndCapture" | "onDragEnterCapture" | "onDragExitCapture" | "onDragLeaveCapture" | "onDragOverCapture" | "onDragStartCapture" | "onDropCapture" | "onMouseDownCapture" | "onMouseMoveCapture" | "onMouseOutCapture" | "onMouseOverCapture" | "onMouseUpCapture" | "onSelectCapture" | "onTouchCancelCapture" | "onTouchEndCapture" | "onTouchMoveCapture" | "onTouchStartCapture" | "onPointerDownCapture" | "onPointerMoveCapture" | "onPointerUpCapture" | "onPointerCancelCapture" | "onPointerEnterCapture" | "onPointerLeaveCapture" | "onPointerOverCapture" | "onPointerOutCapture" | "onGotPointerCaptureCapture" | "onLostPointerCaptureCapture" | "onScrollCapture" | "onWheelCapture" | "onAnimationStartCapture" | "onAnimationEndCapture" | "onAnimationIterationCapture" | "onTransitionEndCapture" | "shake" | "float" | "apiRef"> & React.RefAttributes<any>>; |
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
var __assign = (this && this.__assign) || function () { | ||
@@ -37,51 +24,13 @@ __assign = Object.assign || function(t) { | ||
}; | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||
result["default"] = mod; | ||
return result; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var React = __importStar(require("react")); | ||
var floating_label_1 = require("@material/floating-label"); | ||
var base_1 = require("@rmwc/base"); | ||
var FloatingLabel = /** @class */ (function (_super) { | ||
__extends(FloatingLabel, _super); | ||
function FloatingLabel() { | ||
var _this = _super !== null && _super.apply(this, arguments) || this; | ||
_this.root = _this.createElement('root'); | ||
return _this; | ||
} | ||
FloatingLabel.prototype.getDefaultFoundation = function () { | ||
var _this = this; | ||
return new floating_label_1.MDCFloatingLabelFoundation({ | ||
addClass: function (className) { return _this.root.addClass(className); }, | ||
removeClass: function (className) { return _this.root.removeClass(className); }, | ||
getWidth: function () { return (_this.root.ref ? _this.root.ref.scrollWidth : 0); }, | ||
registerInteractionHandler: function (evtType, handler) { return _this.root.addEventListener(evtType, handler); }, | ||
deregisterInteractionHandler: function (evtType, handler) { return _this.root.removeEventListener(evtType, handler); } | ||
}); | ||
}; | ||
FloatingLabel.prototype.sync = function (props, prevProps) { | ||
var _this = this; | ||
// shake | ||
this.syncProp(props.shake, prevProps.shake, function () { | ||
_this.foundation.shake(!!props.shake); | ||
}); | ||
// float | ||
this.syncProp(props.float, prevProps.float, function () { | ||
_this.foundation.float(!!props.float); | ||
}); | ||
}; | ||
FloatingLabel.prototype.getWidth = function () { | ||
return this.foundation.getWidth(); | ||
}; | ||
FloatingLabel.prototype.render = function () { | ||
var _a = this.props, shake = _a.shake, float = _a.float, rest = __rest(_a, ["shake", "float"]); | ||
return (React.createElement("label", __assign({}, this.root.props(__assign({}, rest, { className: 'mdc-floating-label' })), { ref: this.root.setRef }))); | ||
}; | ||
FloatingLabel.displayName = 'FloatingLabel'; | ||
return FloatingLabel; | ||
}(base_1.FoundationComponent)); | ||
exports.FloatingLabel = FloatingLabel; | ||
var react_1 = __importDefault(require("react")); | ||
var foundation_1 = require("./foundation"); | ||
exports.FloatingLabel = react_1.default.forwardRef(function FloatingLabel(props, ref) { | ||
var rootEl = foundation_1.useFloatingLabelFoundation(props).rootEl; | ||
var shake = props.shake, float = props.float, apiRef = props.apiRef, rest = __rest(props, ["shake", "float", "apiRef"]); | ||
return (react_1.default.createElement("label", __assign({}, rootEl.props(__assign(__assign({}, rest), { className: 'mdc-floating-label' })), { ref: rootEl.setRef }))); | ||
}); | ||
exports.FloatingLabel.displayName = 'FloatingLabel'; |
{ | ||
"npm": {}, | ||
"typescript": { | ||
"FloatingLabel": { | ||
"FloatingLabelProps": { | ||
"fileName": "src/floating-label/index.tsx", | ||
@@ -16,690 +16,8 @@ "flags": { | ||
}, | ||
"kind": "class", | ||
"name": "FloatingLabel", | ||
"sourceUrl": "https://github.com/jamesmfriedman/rmwc/blob/master/src/floating-label/index.tsx#L12", | ||
"extends": [ | ||
"FoundationComponent<MDCFloatingLabelFoundation, FloatingLabelProps>" | ||
], | ||
"methods": [ | ||
"kind": "interface", | ||
"name": "FloatingLabelProps", | ||
"sourceUrl": "https://github.com/jamesmfriedman/rmwc/blob/master/src/floating-label/index.tsx#L5", | ||
"methods": [], | ||
"properties": [ | ||
{ | ||
"fileName": "node_modules/@types/react/index.d.ts", | ||
"flags": { | ||
"isExported": true, | ||
"isExternal": false, | ||
"isOptional": true, | ||
"isPrivate": false, | ||
"isProtected": false, | ||
"isPublic": false, | ||
"isRest": false, | ||
"isStatic": false | ||
}, | ||
"kind": "method", | ||
"name": "UNSAFE_componentWillMount", | ||
"inheritedFrom": "DeprecatedLifecycle.UNSAFE_componentWillMount", | ||
"signatures": [ | ||
{ | ||
"documentation": { | ||
"contents": [ | ||
"<p>Called immediately before mounting occurs, and before <code>Component#render</code>.\nAvoid introducing any side-effects or subscriptions in this method.</p>\n<p>This method will not stop working in React 17.</p>\n<p>Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps\nprevents this from being invoked.</p>\n", | ||
{ | ||
"tag": "see", | ||
"value": "https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#initializing-state" | ||
}, | ||
{ | ||
"tag": "see", | ||
"value": "https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path" | ||
} | ||
], | ||
"contentsRaw": "Called immediately before mounting occurs, and before `Component#render`.\nAvoid introducing any side-effects or subscriptions in this method.\n\nThis method will not stop working in React 17.\n\nNote: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps\nprevents this from being invoked.\n\n\n@see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#initializing-state\n@see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path", | ||
"metadata": {} | ||
}, | ||
"fileName": "node_modules/@types/react/index.d.ts", | ||
"kind": "signature", | ||
"name": "UNSAFE_componentWillMount", | ||
"parameters": [], | ||
"returnType": "void", | ||
"type": "() => void" | ||
} | ||
] | ||
}, | ||
{ | ||
"fileName": "node_modules/@types/react/index.d.ts", | ||
"flags": { | ||
"isExported": true, | ||
"isExternal": false, | ||
"isOptional": true, | ||
"isPrivate": false, | ||
"isProtected": false, | ||
"isPublic": false, | ||
"isRest": false, | ||
"isStatic": false | ||
}, | ||
"kind": "method", | ||
"name": "UNSAFE_componentWillReceiveProps", | ||
"inheritedFrom": "DeprecatedLifecycle.UNSAFE_componentWillReceiveProps", | ||
"signatures": [ | ||
{ | ||
"documentation": { | ||
"contents": [ | ||
"<p>Called when the component may be receiving new props.\nReact may call this even if props have not changed, so be sure to compare new and existing\nprops if you only want to handle changes.</p>\n<p>Calling <code>Component#setState</code> generally does not trigger this method.</p>\n<p>This method will not stop working in React 17.</p>\n<p>Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps\nprevents this from being invoked.</p>\n", | ||
{ | ||
"tag": "see", | ||
"value": "https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#updating-state-based-on-props" | ||
}, | ||
{ | ||
"tag": "see", | ||
"value": "https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path" | ||
} | ||
], | ||
"contentsRaw": "Called when the component may be receiving new props.\nReact may call this even if props have not changed, so be sure to compare new and existing\nprops if you only want to handle changes.\n\nCalling `Component#setState` generally does not trigger this method.\n\nThis method will not stop working in React 17.\n\nNote: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps\nprevents this from being invoked.\n\n\n@see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#updating-state-based-on-props\n@see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path", | ||
"metadata": {} | ||
}, | ||
"fileName": "node_modules/@types/react/index.d.ts", | ||
"kind": "signature", | ||
"name": "UNSAFE_componentWillReceiveProps", | ||
"parameters": [ | ||
{ | ||
"flags": { | ||
"isExported": false, | ||
"isExternal": false, | ||
"isOptional": false, | ||
"isPrivate": false, | ||
"isProtected": false, | ||
"isPublic": false, | ||
"isRest": false, | ||
"isStatic": false | ||
}, | ||
"kind": "parameter", | ||
"name": "nextProps", | ||
"type": "Readonly<FoundationPropsT<FloatingLabelProps>>" | ||
}, | ||
{ | ||
"flags": { | ||
"isExported": false, | ||
"isExternal": false, | ||
"isOptional": false, | ||
"isPrivate": false, | ||
"isProtected": false, | ||
"isPublic": false, | ||
"isRest": false, | ||
"isStatic": false | ||
}, | ||
"kind": "parameter", | ||
"name": "nextContext", | ||
"type": "any" | ||
} | ||
], | ||
"returnType": "void", | ||
"type": "(nextProps: Readonly<FoundationPropsT<FloatingLabelProps>>, nextContext: any) => void" | ||
} | ||
] | ||
}, | ||
{ | ||
"fileName": "node_modules/@types/react/index.d.ts", | ||
"flags": { | ||
"isExported": true, | ||
"isExternal": false, | ||
"isOptional": true, | ||
"isPrivate": false, | ||
"isProtected": false, | ||
"isPublic": false, | ||
"isRest": false, | ||
"isStatic": false | ||
}, | ||
"kind": "method", | ||
"name": "UNSAFE_componentWillUpdate", | ||
"inheritedFrom": "DeprecatedLifecycle.UNSAFE_componentWillUpdate", | ||
"signatures": [ | ||
{ | ||
"documentation": { | ||
"contents": [ | ||
"<p>Called immediately before rendering when new props or state is received. Not called for the initial render.</p>\n<p>Note: You cannot call <code>Component#setState</code> here.</p>\n<p>This method will not stop working in React 17.</p>\n<p>Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps\nprevents this from being invoked.</p>\n", | ||
{ | ||
"tag": "see", | ||
"value": "https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#reading-dom-properties-before-an-update" | ||
}, | ||
{ | ||
"tag": "see", | ||
"value": "https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path" | ||
} | ||
], | ||
"contentsRaw": "Called immediately before rendering when new props or state is received. Not called for the initial render.\n\nNote: You cannot call `Component#setState` here.\n\nThis method will not stop working in React 17.\n\nNote: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps\nprevents this from being invoked.\n\n\n@see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#reading-dom-properties-before-an-update\n@see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path", | ||
"metadata": {} | ||
}, | ||
"fileName": "node_modules/@types/react/index.d.ts", | ||
"kind": "signature", | ||
"name": "UNSAFE_componentWillUpdate", | ||
"parameters": [ | ||
{ | ||
"flags": { | ||
"isExported": false, | ||
"isExternal": false, | ||
"isOptional": false, | ||
"isPrivate": false, | ||
"isProtected": false, | ||
"isPublic": false, | ||
"isRest": false, | ||
"isStatic": false | ||
}, | ||
"kind": "parameter", | ||
"name": "nextProps", | ||
"type": "Readonly<FoundationPropsT<FloatingLabelProps>>" | ||
}, | ||
{ | ||
"flags": { | ||
"isExported": false, | ||
"isExternal": false, | ||
"isOptional": false, | ||
"isPrivate": false, | ||
"isProtected": false, | ||
"isPublic": false, | ||
"isRest": false, | ||
"isStatic": false | ||
}, | ||
"kind": "parameter", | ||
"name": "nextState", | ||
"type": "Readonly<FoundationStateT<S>>" | ||
}, | ||
{ | ||
"flags": { | ||
"isExported": false, | ||
"isExternal": false, | ||
"isOptional": false, | ||
"isPrivate": false, | ||
"isProtected": false, | ||
"isPublic": false, | ||
"isRest": false, | ||
"isStatic": false | ||
}, | ||
"kind": "parameter", | ||
"name": "nextContext", | ||
"type": "any" | ||
} | ||
], | ||
"returnType": "void", | ||
"type": "(nextProps: Readonly<FoundationPropsT<FloatingLabelProps>>, nextState: Readonly<FoundationStateT<S>>, nextContext: any) => void" | ||
} | ||
] | ||
}, | ||
{ | ||
"fileName": "node_modules/@types/react/index.d.ts", | ||
"flags": { | ||
"isExported": true, | ||
"isExternal": false, | ||
"isOptional": true, | ||
"isPrivate": false, | ||
"isProtected": false, | ||
"isPublic": false, | ||
"isRest": false, | ||
"isStatic": false | ||
}, | ||
"kind": "method", | ||
"name": "componentDidCatch", | ||
"inheritedFrom": "ComponentLifecycle.componentDidCatch", | ||
"signatures": [ | ||
{ | ||
"documentation": { | ||
"contents": [ | ||
"<p>Catches exceptions generated in descendant components. Unhandled exceptions will cause\nthe entire component tree to unmount.</p>\n" | ||
], | ||
"contentsRaw": "Catches exceptions generated in descendant components. Unhandled exceptions will cause\nthe entire component tree to unmount.", | ||
"metadata": {} | ||
}, | ||
"fileName": "node_modules/@types/react/index.d.ts", | ||
"kind": "signature", | ||
"name": "componentDidCatch", | ||
"parameters": [ | ||
{ | ||
"flags": { | ||
"isExported": false, | ||
"isExternal": false, | ||
"isOptional": false, | ||
"isPrivate": false, | ||
"isProtected": false, | ||
"isPublic": false, | ||
"isRest": false, | ||
"isStatic": false | ||
}, | ||
"kind": "parameter", | ||
"name": "error", | ||
"type": "Error" | ||
}, | ||
{ | ||
"flags": { | ||
"isExported": false, | ||
"isExternal": false, | ||
"isOptional": false, | ||
"isPrivate": false, | ||
"isProtected": false, | ||
"isPublic": false, | ||
"isRest": false, | ||
"isStatic": false | ||
}, | ||
"kind": "parameter", | ||
"name": "errorInfo", | ||
"type": "ErrorInfo" | ||
} | ||
], | ||
"returnType": "void", | ||
"type": "(error: Error, errorInfo: ErrorInfo) => void" | ||
} | ||
] | ||
}, | ||
{ | ||
"fileName": "src/floating-label/node_modules/@rmwc/base/foundation-component.tsx", | ||
"flags": { | ||
"isExported": true, | ||
"isExternal": false, | ||
"isOptional": false, | ||
"isPrivate": false, | ||
"isProtected": false, | ||
"isPublic": false, | ||
"isRest": false, | ||
"isStatic": false | ||
}, | ||
"kind": "method", | ||
"name": "componentDidMount", | ||
"inheritedFrom": "FoundationComponent.componentDidMount", | ||
"signatures": [ | ||
{ | ||
"fileName": "src/floating-label/node_modules/@rmwc/base/foundation-component.tsx", | ||
"kind": "signature", | ||
"name": "componentDidMount", | ||
"parameters": [], | ||
"returnType": "void", | ||
"type": "() => void" | ||
} | ||
] | ||
}, | ||
{ | ||
"fileName": "src/floating-label/node_modules/@rmwc/base/foundation-component.tsx", | ||
"flags": { | ||
"isExported": true, | ||
"isExternal": false, | ||
"isOptional": false, | ||
"isPrivate": false, | ||
"isProtected": false, | ||
"isPublic": false, | ||
"isRest": false, | ||
"isStatic": false | ||
}, | ||
"kind": "method", | ||
"name": "componentDidUpdate", | ||
"inheritedFrom": "FoundationComponent.componentDidUpdate", | ||
"signatures": [ | ||
{ | ||
"fileName": "src/floating-label/node_modules/@rmwc/base/foundation-component.tsx", | ||
"kind": "signature", | ||
"name": "componentDidUpdate", | ||
"parameters": [ | ||
{ | ||
"flags": { | ||
"isExported": false, | ||
"isExternal": false, | ||
"isOptional": false, | ||
"isPrivate": false, | ||
"isProtected": false, | ||
"isPublic": false, | ||
"isRest": false, | ||
"isStatic": false | ||
}, | ||
"kind": "parameter", | ||
"name": "prevProps", | ||
"type": "FoundationPropsT<FloatingLabelProps>" | ||
} | ||
], | ||
"returnType": "void", | ||
"type": "(prevProps: FoundationPropsT<FloatingLabelProps>) => void" | ||
} | ||
] | ||
}, | ||
{ | ||
"fileName": "node_modules/@types/react/index.d.ts", | ||
"flags": { | ||
"isExported": true, | ||
"isExternal": false, | ||
"isOptional": true, | ||
"isPrivate": false, | ||
"isProtected": false, | ||
"isPublic": false, | ||
"isRest": false, | ||
"isStatic": false | ||
}, | ||
"kind": "method", | ||
"name": "componentWillMount", | ||
"inheritedFrom": "DeprecatedLifecycle.componentWillMount", | ||
"signatures": [ | ||
{ | ||
"documentation": { | ||
"contents": [ | ||
"<p>Called immediately before mounting occurs, and before <code>Component#render</code>.\nAvoid introducing any side-effects or subscriptions in this method.</p>\n<p>Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps\nprevents this from being invoked.</p>\n", | ||
{ | ||
"tag": "see", | ||
"value": "https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#initializing-state" | ||
}, | ||
{ | ||
"tag": "see", | ||
"value": "https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path" | ||
} | ||
], | ||
"contentsRaw": "Called immediately before mounting occurs, and before `Component#render`.\nAvoid introducing any side-effects or subscriptions in this method.\n\nNote: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps\nprevents this from being invoked.\n\n\n@see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#initializing-state\n@see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path", | ||
"metadata": {} | ||
}, | ||
"fileName": "node_modules/@types/react/index.d.ts", | ||
"kind": "signature", | ||
"name": "componentWillMount", | ||
"parameters": [], | ||
"returnType": "void", | ||
"type": "() => void" | ||
} | ||
] | ||
}, | ||
{ | ||
"fileName": "node_modules/@types/react/index.d.ts", | ||
"flags": { | ||
"isExported": true, | ||
"isExternal": false, | ||
"isOptional": true, | ||
"isPrivate": false, | ||
"isProtected": false, | ||
"isPublic": false, | ||
"isRest": false, | ||
"isStatic": false | ||
}, | ||
"kind": "method", | ||
"name": "componentWillReceiveProps", | ||
"inheritedFrom": "DeprecatedLifecycle.componentWillReceiveProps", | ||
"signatures": [ | ||
{ | ||
"documentation": { | ||
"contents": [ | ||
"<p>Called when the component may be receiving new props.\nReact may call this even if props have not changed, so be sure to compare new and existing\nprops if you only want to handle changes.</p>\n<p>Calling <code>Component#setState</code> generally does not trigger this method.</p>\n<p>Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps\nprevents this from being invoked.</p>\n", | ||
{ | ||
"tag": "see", | ||
"value": "https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#updating-state-based-on-props" | ||
}, | ||
{ | ||
"tag": "see", | ||
"value": "https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path" | ||
} | ||
], | ||
"contentsRaw": "Called when the component may be receiving new props.\nReact may call this even if props have not changed, so be sure to compare new and existing\nprops if you only want to handle changes.\n\nCalling `Component#setState` generally does not trigger this method.\n\nNote: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps\nprevents this from being invoked.\n\n\n@see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#updating-state-based-on-props\n@see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path", | ||
"metadata": {} | ||
}, | ||
"fileName": "node_modules/@types/react/index.d.ts", | ||
"kind": "signature", | ||
"name": "componentWillReceiveProps", | ||
"parameters": [ | ||
{ | ||
"flags": { | ||
"isExported": false, | ||
"isExternal": false, | ||
"isOptional": false, | ||
"isPrivate": false, | ||
"isProtected": false, | ||
"isPublic": false, | ||
"isRest": false, | ||
"isStatic": false | ||
}, | ||
"kind": "parameter", | ||
"name": "nextProps", | ||
"type": "Readonly<FoundationPropsT<FloatingLabelProps>>" | ||
}, | ||
{ | ||
"flags": { | ||
"isExported": false, | ||
"isExternal": false, | ||
"isOptional": false, | ||
"isPrivate": false, | ||
"isProtected": false, | ||
"isPublic": false, | ||
"isRest": false, | ||
"isStatic": false | ||
}, | ||
"kind": "parameter", | ||
"name": "nextContext", | ||
"type": "any" | ||
} | ||
], | ||
"returnType": "void", | ||
"type": "(nextProps: Readonly<FoundationPropsT<FloatingLabelProps>>, nextContext: any) => void" | ||
} | ||
] | ||
}, | ||
{ | ||
"fileName": "src/floating-label/node_modules/@rmwc/base/foundation-component.tsx", | ||
"flags": { | ||
"isExported": true, | ||
"isExternal": false, | ||
"isOptional": false, | ||
"isPrivate": false, | ||
"isProtected": false, | ||
"isPublic": false, | ||
"isRest": false, | ||
"isStatic": false | ||
}, | ||
"kind": "method", | ||
"name": "componentWillUnmount", | ||
"inheritedFrom": "FoundationComponent.componentWillUnmount", | ||
"signatures": [ | ||
{ | ||
"fileName": "src/floating-label/node_modules/@rmwc/base/foundation-component.tsx", | ||
"kind": "signature", | ||
"name": "componentWillUnmount", | ||
"parameters": [], | ||
"returnType": "void", | ||
"type": "() => void" | ||
} | ||
] | ||
}, | ||
{ | ||
"fileName": "node_modules/@types/react/index.d.ts", | ||
"flags": { | ||
"isExported": true, | ||
"isExternal": false, | ||
"isOptional": true, | ||
"isPrivate": false, | ||
"isProtected": false, | ||
"isPublic": false, | ||
"isRest": false, | ||
"isStatic": false | ||
}, | ||
"kind": "method", | ||
"name": "componentWillUpdate", | ||
"inheritedFrom": "DeprecatedLifecycle.componentWillUpdate", | ||
"signatures": [ | ||
{ | ||
"documentation": { | ||
"contents": [ | ||
"<p>Called immediately before rendering when new props or state is received. Not called for the initial render.</p>\n<p>Note: You cannot call <code>Component#setState</code> here.</p>\n<p>Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps\nprevents this from being invoked.</p>\n", | ||
{ | ||
"tag": "see", | ||
"value": "https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#reading-dom-properties-before-an-update" | ||
}, | ||
{ | ||
"tag": "see", | ||
"value": "https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path" | ||
} | ||
], | ||
"contentsRaw": "Called immediately before rendering when new props or state is received. Not called for the initial render.\n\nNote: You cannot call `Component#setState` here.\n\nNote: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps\nprevents this from being invoked.\n\n\n@see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#reading-dom-properties-before-an-update\n@see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path", | ||
"metadata": {} | ||
}, | ||
"fileName": "node_modules/@types/react/index.d.ts", | ||
"kind": "signature", | ||
"name": "componentWillUpdate", | ||
"parameters": [ | ||
{ | ||
"flags": { | ||
"isExported": false, | ||
"isExternal": false, | ||
"isOptional": false, | ||
"isPrivate": false, | ||
"isProtected": false, | ||
"isPublic": false, | ||
"isRest": false, | ||
"isStatic": false | ||
}, | ||
"kind": "parameter", | ||
"name": "nextProps", | ||
"type": "Readonly<FoundationPropsT<FloatingLabelProps>>" | ||
}, | ||
{ | ||
"flags": { | ||
"isExported": false, | ||
"isExternal": false, | ||
"isOptional": false, | ||
"isPrivate": false, | ||
"isProtected": false, | ||
"isPublic": false, | ||
"isRest": false, | ||
"isStatic": false | ||
}, | ||
"kind": "parameter", | ||
"name": "nextState", | ||
"type": "Readonly<FoundationStateT<S>>" | ||
}, | ||
{ | ||
"flags": { | ||
"isExported": false, | ||
"isExternal": false, | ||
"isOptional": false, | ||
"isPrivate": false, | ||
"isProtected": false, | ||
"isPublic": false, | ||
"isRest": false, | ||
"isStatic": false | ||
}, | ||
"kind": "parameter", | ||
"name": "nextContext", | ||
"type": "any" | ||
} | ||
], | ||
"returnType": "void", | ||
"type": "(nextProps: Readonly<FoundationPropsT<FloatingLabelProps>>, nextState: Readonly<FoundationStateT<S>>, nextContext: any) => void" | ||
} | ||
] | ||
}, | ||
{ | ||
"fileName": "src/floating-label/node_modules/@rmwc/base/foundation-component.tsx", | ||
"flags": { | ||
"isExported": true, | ||
"isExternal": false, | ||
"isOptional": false, | ||
"isPrivate": false, | ||
"isProtected": false, | ||
"isPublic": false, | ||
"isRest": false, | ||
"isStatic": false | ||
}, | ||
"kind": "method", | ||
"name": "createElement", | ||
"inheritedFrom": "FoundationComponent.createElement", | ||
"signatures": [ | ||
{ | ||
"fileName": "src/floating-label/node_modules/@rmwc/base/foundation-component.tsx", | ||
"kind": "signature", | ||
"name": "createElement", | ||
"parameters": [ | ||
{ | ||
"flags": { | ||
"isExported": false, | ||
"isExternal": false, | ||
"isOptional": false, | ||
"isPrivate": false, | ||
"isProtected": false, | ||
"isPublic": false, | ||
"isRest": false, | ||
"isStatic": false | ||
}, | ||
"kind": "parameter", | ||
"name": "elementName", | ||
"type": "string" | ||
} | ||
], | ||
"returnType": "FoundationElement<ExtractProps<ElementType>, ElementType>", | ||
"type": "(elementName: string) => FoundationElement<ExtractProps<ElementType>, ElementType>" | ||
} | ||
] | ||
}, | ||
{ | ||
"fileName": "src/floating-label/node_modules/@rmwc/base/foundation-component.tsx", | ||
"flags": { | ||
"isExported": true, | ||
"isExternal": false, | ||
"isOptional": false, | ||
"isPrivate": false, | ||
"isProtected": false, | ||
"isPublic": false, | ||
"isRest": false, | ||
"isStatic": false | ||
}, | ||
"kind": "method", | ||
"name": "emit", | ||
"inheritedFrom": "FoundationComponent.emit", | ||
"signatures": [ | ||
{ | ||
"documentation": { | ||
"contents": [ | ||
"<p>Fires a cross-browser-compatible custom event from the component root of the given type,</p>\n" | ||
], | ||
"contentsRaw": "Fires a cross-browser-compatible custom event from the component root of the given type,", | ||
"metadata": {} | ||
}, | ||
"fileName": "src/floating-label/node_modules/@rmwc/base/foundation-component.tsx", | ||
"kind": "signature", | ||
"name": "emit", | ||
"parameters": [ | ||
{ | ||
"flags": { | ||
"isExported": false, | ||
"isExternal": false, | ||
"isOptional": false, | ||
"isPrivate": false, | ||
"isProtected": false, | ||
"isPublic": false, | ||
"isRest": false, | ||
"isStatic": false | ||
}, | ||
"kind": "parameter", | ||
"name": "evtType", | ||
"type": "string" | ||
}, | ||
{ | ||
"flags": { | ||
"isExported": false, | ||
"isExternal": false, | ||
"isOptional": false, | ||
"isPrivate": false, | ||
"isProtected": false, | ||
"isPublic": false, | ||
"isRest": false, | ||
"isStatic": false | ||
}, | ||
"kind": "parameter", | ||
"name": "evtData", | ||
"type": "any" | ||
}, | ||
{ | ||
"flags": { | ||
"isExported": false, | ||
"isExternal": false, | ||
"isOptional": false, | ||
"isPrivate": false, | ||
"isProtected": false, | ||
"isPublic": false, | ||
"isRest": false, | ||
"isStatic": false | ||
}, | ||
"kind": "parameter", | ||
"name": "shouldBubble", | ||
"defaultValue": "false", | ||
"type": "boolean" | ||
} | ||
], | ||
"returnType": "CustomEvent<any>", | ||
"type": "(evtType: string, evtData: any, shouldBubble?: boolean) => CustomEvent<any>" | ||
} | ||
] | ||
}, | ||
{ | ||
"fileName": "src/floating-label/index.tsx", | ||
@@ -709,29 +27,2 @@ "flags": { | ||
"isExternal": false, | ||
"isOptional": false, | ||
"isPrivate": false, | ||
"isProtected": false, | ||
"isPublic": false, | ||
"isRest": false, | ||
"isStatic": false | ||
}, | ||
"kind": "method", | ||
"name": "getDefaultFoundation", | ||
"sourceUrl": "https://github.com/jamesmfriedman/rmwc/blob/master/src/floating-label/index.tsx#L20", | ||
"signatures": [ | ||
{ | ||
"fileName": "src/floating-label/index.tsx", | ||
"kind": "signature", | ||
"name": "getDefaultFoundation", | ||
"sourceUrl": "https://github.com/jamesmfriedman/rmwc/blob/master/src/floating-label/index.tsx#L20", | ||
"parameters": [], | ||
"returnType": "MDCFloatingLabelFoundation", | ||
"type": "() => MDCFloatingLabelFoundation" | ||
} | ||
] | ||
}, | ||
{ | ||
"fileName": "node_modules/@types/react/index.d.ts", | ||
"flags": { | ||
"isExported": true, | ||
"isExternal": false, | ||
"isOptional": true, | ||
@@ -744,53 +35,6 @@ "isPrivate": false, | ||
}, | ||
"kind": "method", | ||
"name": "getSnapshotBeforeUpdate", | ||
"inheritedFrom": "NewLifecycle.getSnapshotBeforeUpdate", | ||
"signatures": [ | ||
{ | ||
"documentation": { | ||
"contents": [ | ||
"<p>Runs before React applies the result of <code>render</code> to the document, and\nreturns an object to be given to componentDidUpdate. Useful for saving\nthings such as scroll position before <code>render</code> causes changes to it.</p>\n<p>Note: the presence of getSnapshotBeforeUpdate prevents any of the deprecated\nlifecycle events from running.</p>\n" | ||
], | ||
"contentsRaw": "Runs before React applies the result of `render` to the document, and\nreturns an object to be given to componentDidUpdate. Useful for saving\nthings such as scroll position before `render` causes changes to it.\n\nNote: the presence of getSnapshotBeforeUpdate prevents any of the deprecated\nlifecycle events from running.", | ||
"metadata": {} | ||
}, | ||
"fileName": "node_modules/@types/react/index.d.ts", | ||
"kind": "signature", | ||
"name": "getSnapshotBeforeUpdate", | ||
"parameters": [ | ||
{ | ||
"flags": { | ||
"isExported": false, | ||
"isExternal": false, | ||
"isOptional": false, | ||
"isPrivate": false, | ||
"isProtected": false, | ||
"isPublic": false, | ||
"isRest": false, | ||
"isStatic": false | ||
}, | ||
"kind": "parameter", | ||
"name": "prevProps", | ||
"type": "Readonly<FoundationPropsT<FloatingLabelProps>>" | ||
}, | ||
{ | ||
"flags": { | ||
"isExported": false, | ||
"isExternal": false, | ||
"isOptional": false, | ||
"isPrivate": false, | ||
"isProtected": false, | ||
"isPublic": false, | ||
"isRest": false, | ||
"isStatic": false | ||
}, | ||
"kind": "parameter", | ||
"name": "prevState", | ||
"type": "Readonly<FoundationStateT<S>>" | ||
} | ||
], | ||
"returnType": "SS | null", | ||
"type": "(prevProps: Readonly<FoundationPropsT<FloatingLabelProps>>, prevState: Readonly<FoundationStateT<S>>) => SS | null" | ||
} | ||
] | ||
"kind": "property", | ||
"name": "float", | ||
"sourceUrl": "https://github.com/jamesmfriedman/rmwc/blob/master/src/floating-label/index.tsx#L7", | ||
"type": "undefined | false | true" | ||
}, | ||
@@ -802,56 +46,2 @@ { | ||
"isExternal": false, | ||
"isOptional": false, | ||
"isPrivate": false, | ||
"isProtected": false, | ||
"isPublic": false, | ||
"isRest": false, | ||
"isStatic": false | ||
}, | ||
"kind": "method", | ||
"name": "getWidth", | ||
"sourceUrl": "https://github.com/jamesmfriedman/rmwc/blob/master/src/floating-label/index.tsx#L48", | ||
"signatures": [ | ||
{ | ||
"fileName": "src/floating-label/index.tsx", | ||
"kind": "signature", | ||
"name": "getWidth", | ||
"sourceUrl": "https://github.com/jamesmfriedman/rmwc/blob/master/src/floating-label/index.tsx#L48", | ||
"parameters": [], | ||
"returnType": "number", | ||
"type": "() => number" | ||
} | ||
] | ||
}, | ||
{ | ||
"fileName": "src/floating-label/index.tsx", | ||
"flags": { | ||
"isExported": true, | ||
"isExternal": false, | ||
"isOptional": false, | ||
"isPrivate": false, | ||
"isProtected": false, | ||
"isPublic": false, | ||
"isRest": false, | ||
"isStatic": false | ||
}, | ||
"kind": "method", | ||
"name": "render", | ||
"sourceUrl": "https://github.com/jamesmfriedman/rmwc/blob/master/src/floating-label/index.tsx#L52", | ||
"signatures": [ | ||
{ | ||
"fileName": "src/floating-label/index.tsx", | ||
"kind": "signature", | ||
"name": "render", | ||
"sourceUrl": "https://github.com/jamesmfriedman/rmwc/blob/master/src/floating-label/index.tsx#L52", | ||
"parameters": [], | ||
"returnType": "Element", | ||
"type": "() => Element" | ||
} | ||
] | ||
}, | ||
{ | ||
"fileName": "node_modules/@types/react/index.d.ts", | ||
"flags": { | ||
"isExported": true, | ||
"isExternal": false, | ||
"isOptional": true, | ||
@@ -864,342 +54,10 @@ "isPrivate": false, | ||
}, | ||
"kind": "method", | ||
"name": "shouldComponentUpdate", | ||
"inheritedFrom": "ComponentLifecycle.shouldComponentUpdate", | ||
"signatures": [ | ||
{ | ||
"documentation": { | ||
"contents": [ | ||
"<p>Called to determine whether the change in props and state should trigger a re-render.</p>\n<p><code>Component</code> always returns true.\n<code>PureComponent</code> implements a shallow comparison on props and state and returns true if any\nprops or states have changed.</p>\n<p>If false is returned, <code>Component#render</code>, <code>componentWillUpdate</code>\nand <code>componentDidUpdate</code> will not be called.</p>\n" | ||
], | ||
"contentsRaw": "Called to determine whether the change in props and state should trigger a re-render.\n\n`Component` always returns true.\n`PureComponent` implements a shallow comparison on props and state and returns true if any\nprops or states have changed.\n\nIf false is returned, `Component#render`, `componentWillUpdate`\nand `componentDidUpdate` will not be called.", | ||
"metadata": {} | ||
}, | ||
"fileName": "node_modules/@types/react/index.d.ts", | ||
"kind": "signature", | ||
"name": "shouldComponentUpdate", | ||
"parameters": [ | ||
{ | ||
"flags": { | ||
"isExported": false, | ||
"isExternal": false, | ||
"isOptional": false, | ||
"isPrivate": false, | ||
"isProtected": false, | ||
"isPublic": false, | ||
"isRest": false, | ||
"isStatic": false | ||
}, | ||
"kind": "parameter", | ||
"name": "nextProps", | ||
"type": "Readonly<FoundationPropsT<FloatingLabelProps>>" | ||
}, | ||
{ | ||
"flags": { | ||
"isExported": false, | ||
"isExternal": false, | ||
"isOptional": false, | ||
"isPrivate": false, | ||
"isProtected": false, | ||
"isPublic": false, | ||
"isRest": false, | ||
"isStatic": false | ||
}, | ||
"kind": "parameter", | ||
"name": "nextState", | ||
"type": "Readonly<FoundationStateT<S>>" | ||
}, | ||
{ | ||
"flags": { | ||
"isExported": false, | ||
"isExternal": false, | ||
"isOptional": false, | ||
"isPrivate": false, | ||
"isProtected": false, | ||
"isPublic": false, | ||
"isRest": false, | ||
"isStatic": false | ||
}, | ||
"kind": "parameter", | ||
"name": "nextContext", | ||
"type": "any" | ||
} | ||
], | ||
"returnType": "boolean", | ||
"type": "(nextProps: Readonly<FoundationPropsT<FloatingLabelProps>>, nextState: Readonly<FoundationStateT<S>>, nextContext: any) => boolean" | ||
} | ||
] | ||
}, | ||
{ | ||
"fileName": "src/floating-label/index.tsx", | ||
"flags": { | ||
"isExported": true, | ||
"isExternal": false, | ||
"isOptional": false, | ||
"isPrivate": false, | ||
"isProtected": false, | ||
"isPublic": false, | ||
"isRest": false, | ||
"isStatic": false | ||
}, | ||
"kind": "method", | ||
"name": "sync", | ||
"sourceUrl": "https://github.com/jamesmfriedman/rmwc/blob/master/src/floating-label/index.tsx#L36", | ||
"signatures": [ | ||
{ | ||
"fileName": "src/floating-label/index.tsx", | ||
"kind": "signature", | ||
"name": "sync", | ||
"sourceUrl": "https://github.com/jamesmfriedman/rmwc/blob/master/src/floating-label/index.tsx#L36", | ||
"parameters": [ | ||
{ | ||
"flags": { | ||
"isExported": false, | ||
"isExternal": false, | ||
"isOptional": false, | ||
"isPrivate": false, | ||
"isProtected": false, | ||
"isPublic": false, | ||
"isRest": false, | ||
"isStatic": false | ||
}, | ||
"kind": "parameter", | ||
"name": "props", | ||
"type": "FloatingLabelProps" | ||
}, | ||
{ | ||
"flags": { | ||
"isExported": false, | ||
"isExternal": false, | ||
"isOptional": false, | ||
"isPrivate": false, | ||
"isProtected": false, | ||
"isPublic": false, | ||
"isRest": false, | ||
"isStatic": false | ||
}, | ||
"kind": "parameter", | ||
"name": "prevProps", | ||
"type": "FloatingLabelProps" | ||
} | ||
], | ||
"returnType": "void", | ||
"type": "(props: FloatingLabelProps, prevProps: FloatingLabelProps) => void" | ||
} | ||
] | ||
}, | ||
{ | ||
"fileName": "src/floating-label/node_modules/@rmwc/base/foundation-component.tsx", | ||
"flags": { | ||
"isExported": true, | ||
"isExternal": false, | ||
"isOptional": false, | ||
"isPrivate": false, | ||
"isProtected": false, | ||
"isPublic": false, | ||
"isRest": false, | ||
"isStatic": false | ||
}, | ||
"kind": "method", | ||
"name": "syncProp", | ||
"inheritedFrom": "FoundationComponent.syncProp", | ||
"signatures": [ | ||
{ | ||
"fileName": "src/floating-label/node_modules/@rmwc/base/foundation-component.tsx", | ||
"kind": "signature", | ||
"name": "syncProp", | ||
"parameters": [ | ||
{ | ||
"flags": { | ||
"isExported": false, | ||
"isExternal": false, | ||
"isOptional": false, | ||
"isPrivate": false, | ||
"isProtected": false, | ||
"isPublic": false, | ||
"isRest": false, | ||
"isStatic": false | ||
}, | ||
"kind": "parameter", | ||
"name": "prop", | ||
"type": "any" | ||
}, | ||
{ | ||
"flags": { | ||
"isExported": false, | ||
"isExternal": false, | ||
"isOptional": false, | ||
"isPrivate": false, | ||
"isProtected": false, | ||
"isPublic": false, | ||
"isRest": false, | ||
"isStatic": false | ||
}, | ||
"kind": "parameter", | ||
"name": "prevProp", | ||
"type": "any" | ||
}, | ||
{ | ||
"flags": { | ||
"isExported": false, | ||
"isExternal": false, | ||
"isOptional": false, | ||
"isPrivate": false, | ||
"isProtected": false, | ||
"isPublic": false, | ||
"isRest": false, | ||
"isStatic": false | ||
}, | ||
"kind": "parameter", | ||
"name": "callback", | ||
"type": "() => void" | ||
} | ||
], | ||
"returnType": "void", | ||
"type": "(prop: any, prevProp: any, callback: () => void) => void" | ||
} | ||
] | ||
}, | ||
{ | ||
"fileName": "src/floating-label/node_modules/@rmwc/base/foundation-component.tsx", | ||
"flags": { | ||
"isExported": true, | ||
"isExternal": false, | ||
"isOptional": false, | ||
"isPrivate": false, | ||
"isProtected": false, | ||
"isPublic": false, | ||
"isRest": false, | ||
"isStatic": false | ||
}, | ||
"kind": "method", | ||
"name": "update", | ||
"inheritedFrom": "FoundationComponent.update", | ||
"signatures": [ | ||
{ | ||
"fileName": "src/floating-label/node_modules/@rmwc/base/foundation-component.tsx", | ||
"kind": "signature", | ||
"name": "update", | ||
"parameters": [], | ||
"returnType": "void", | ||
"type": "() => void" | ||
} | ||
] | ||
} | ||
], | ||
"properties": [ | ||
{ | ||
"fileName": "src/floating-label/index.tsx", | ||
"flags": { | ||
"isExported": true, | ||
"isExternal": false, | ||
"isOptional": false, | ||
"isPrivate": false, | ||
"isProtected": false, | ||
"isPublic": false, | ||
"isRest": false, | ||
"isStatic": true | ||
}, | ||
"kind": "property", | ||
"name": "displayName", | ||
"sourceUrl": "https://github.com/jamesmfriedman/rmwc/blob/master/src/floating-label/index.tsx#L16", | ||
"defaultValue": "\"FloatingLabel\"", | ||
"type": "string" | ||
}, | ||
{ | ||
"fileName": "src/floating-label/node_modules/@rmwc/base/foundation-component.tsx", | ||
"flags": { | ||
"isExported": true, | ||
"isExternal": false, | ||
"isOptional": false, | ||
"isPrivate": false, | ||
"isProtected": false, | ||
"isPublic": false, | ||
"isRest": false, | ||
"isStatic": true | ||
}, | ||
"kind": "property", | ||
"name": "shouldDebounce", | ||
"defaultValue": "false", | ||
"inheritedFrom": "FoundationComponent.shouldDebounce", | ||
"type": "boolean" | ||
}, | ||
{ | ||
"fileName": "src/floating-label/node_modules/@rmwc/base/foundation-component.tsx", | ||
"flags": { | ||
"isExported": true, | ||
"isExternal": false, | ||
"isOptional": false, | ||
"isPrivate": false, | ||
"isProtected": false, | ||
"isPublic": false, | ||
"isRest": false, | ||
"isStatic": false | ||
}, | ||
"kind": "property", | ||
"name": "elements", | ||
"inheritedFrom": "FoundationComponent.elements", | ||
"type": "{ [key: string]: FoundationElement<any, any> }" | ||
}, | ||
{ | ||
"fileName": "src/floating-label/node_modules/@rmwc/base/foundation-component.tsx", | ||
"flags": { | ||
"isExported": true, | ||
"isExternal": false, | ||
"isOptional": false, | ||
"isPrivate": false, | ||
"isProtected": false, | ||
"isPublic": false, | ||
"isRest": false, | ||
"isStatic": false | ||
}, | ||
"kind": "property", | ||
"name": "foundation", | ||
"inheritedFrom": "FoundationComponent.foundation", | ||
"type": "MDCFloatingLabelFoundation" | ||
"name": "shake", | ||
"sourceUrl": "https://github.com/jamesmfriedman/rmwc/blob/master/src/floating-label/index.tsx#L6", | ||
"type": "undefined | false | true" | ||
} | ||
], | ||
"constructorType": { | ||
"fileName": "src/floating-label/node_modules/@rmwc/base/foundation-component.tsx", | ||
"flags": { | ||
"isExported": true, | ||
"isExternal": false, | ||
"isOptional": false, | ||
"isPrivate": false, | ||
"isProtected": false, | ||
"isPublic": false, | ||
"isRest": false, | ||
"isStatic": false | ||
}, | ||
"kind": "constructor", | ||
"name": "constructor", | ||
"inheritedFrom": "FoundationComponent.__constructor", | ||
"signatures": [ | ||
{ | ||
"fileName": "src/floating-label/node_modules/@rmwc/base/foundation-component.tsx", | ||
"kind": "signature", | ||
"name": "new FloatingLabel", | ||
"parameters": [ | ||
{ | ||
"flags": { | ||
"isExported": false, | ||
"isExternal": false, | ||
"isOptional": false, | ||
"isPrivate": false, | ||
"isProtected": false, | ||
"isPublic": false, | ||
"isRest": false, | ||
"isStatic": false | ||
}, | ||
"kind": "parameter", | ||
"name": "props", | ||
"type": "any" | ||
} | ||
], | ||
"returnType": "FloatingLabel", | ||
"type": "(props: any) => FloatingLabel" | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
"FloatingLabelProps": { | ||
"FloatingLabelApi": { | ||
"fileName": "src/floating-label/index.tsx", | ||
@@ -1217,4 +75,4 @@ "flags": { | ||
"kind": "interface", | ||
"name": "FloatingLabelProps", | ||
"sourceUrl": "https://github.com/jamesmfriedman/rmwc/blob/master/src/floating-label/index.tsx#L7", | ||
"name": "FloatingLabelApi", | ||
"sourceUrl": "https://github.com/jamesmfriedman/rmwc/blob/master/src/floating-label/index.tsx#L10", | ||
"methods": [], | ||
@@ -1227,3 +85,3 @@ "properties": [ | ||
"isExternal": false, | ||
"isOptional": true, | ||
"isOptional": false, | ||
"isPrivate": false, | ||
@@ -1236,22 +94,5 @@ "isProtected": false, | ||
"kind": "property", | ||
"name": "float", | ||
"sourceUrl": "https://github.com/jamesmfriedman/rmwc/blob/master/src/floating-label/index.tsx#L9", | ||
"type": "undefined | false | true" | ||
}, | ||
{ | ||
"fileName": "src/floating-label/index.tsx", | ||
"flags": { | ||
"isExported": true, | ||
"isExternal": false, | ||
"isOptional": true, | ||
"isPrivate": false, | ||
"isProtected": false, | ||
"isPublic": false, | ||
"isRest": false, | ||
"isStatic": false | ||
}, | ||
"kind": "property", | ||
"name": "shake", | ||
"sourceUrl": "https://github.com/jamesmfriedman/rmwc/blob/master/src/floating-label/index.tsx#L8", | ||
"type": "undefined | false | true" | ||
"name": "getWidth", | ||
"sourceUrl": "https://github.com/jamesmfriedman/rmwc/blob/master/src/floating-label/index.tsx#L11", | ||
"type": "() => number" | ||
} | ||
@@ -1258,0 +99,0 @@ ] |
@@ -1,4 +0,3 @@ | ||
/// <reference types="react" /> | ||
import { MDCFloatingLabelFoundation } from '@material/floating-label'; | ||
import { FoundationComponent } from '@rmwc/base'; | ||
import * as RMWC from '@rmwc/types'; | ||
import React from 'react'; | ||
export interface FloatingLabelProps { | ||
@@ -8,9 +7,7 @@ shake?: boolean; | ||
} | ||
export declare class FloatingLabel extends FoundationComponent<MDCFloatingLabelFoundation, FloatingLabelProps> { | ||
static displayName: string; | ||
private root; | ||
getDefaultFoundation(): MDCFloatingLabelFoundation; | ||
sync(props: FloatingLabelProps, prevProps: FloatingLabelProps): void; | ||
getWidth(): number; | ||
render(): JSX.Element; | ||
export interface FloatingLabelApi { | ||
getWidth: () => number; | ||
} | ||
export declare const FloatingLabel: React.ForwardRefExoticComponent<Pick<FloatingLabelProps & RMWC.ComponentProps & { | ||
apiRef?: ((api: FloatingLabelApi) => void) | undefined; | ||
}, "onError" | "className" | "prefix" | "size" | "children" | "value" | "cite" | "data" | "form" | "label" | "span" | "style" | "summary" | "title" | "pattern" | "theme" | "onBlur" | "onClick" | "onContextMenu" | "onCopy" | "onCut" | "onAuxClick" | "onDoubleClick" | "onDragEnd" | "onDragStart" | "onDrop" | "onFocus" | "onInput" | "onInvalid" | "onKeyDown" | "onKeyPress" | "onKeyUp" | "onMouseDown" | "onMouseUp" | "onPaste" | "onPause" | "onPlay" | "onPointerCancel" | "onPointerDown" | "onPointerUp" | "onRateChange" | "onReset" | "onSeeked" | "onSubmit" | "onTouchCancel" | "onTouchEnd" | "onTouchStart" | "onVolumeChange" | "onAbort" | "onAnimationEnd" | "onAnimationIteration" | "onAnimationStart" | "onCanPlay" | "onCanPlayThrough" | "onDrag" | "onDragEnter" | "onDragExit" | "onDragLeave" | "onDragOver" | "onDurationChange" | "onEmptied" | "onEncrypted" | "onEnded" | "onGotPointerCapture" | "onLoad" | "onLoadedData" | "onLoadedMetadata" | "onLoadStart" | "onLostPointerCapture" | "onMouseMove" | "onMouseOut" | "onMouseOver" | "onPlaying" | "onPointerMove" | "onPointerOut" | "onPointerOver" | "onProgress" | "onScroll" | "onSeeking" | "onStalled" | "onSuspend" | "onTimeUpdate" | "onTouchMove" | "onTransitionEnd" | "onWaiting" | "onWheel" | "onMouseEnter" | "onMouseLeave" | "onPointerEnter" | "onPointerLeave" | "onChange" | "onSelect" | "onBeforeInput" | "onCompositionEnd" | "onCompositionStart" | "onCompositionUpdate" | "id" | "dir" | "slot" | "key" | "target" | "tag" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "content" | "controls" | "coords" | "crossOrigin" | "dateTime" | "default" | "defer" | "disabled" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "nonce" | "noValidate" | "open" | "optimum" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "type" | "useMap" | "width" | "wmode" | "wrap" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "hidden" | "lang" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopyCapture" | "onCutCapture" | "onPasteCapture" | "onCompositionEndCapture" | "onCompositionStartCapture" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInputCapture" | "onInputCapture" | "onResetCapture" | "onSubmitCapture" | "onInvalidCapture" | "onLoadCapture" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPressCapture" | "onKeyUpCapture" | "onAbortCapture" | "onCanPlayCapture" | "onCanPlayThroughCapture" | "onDurationChangeCapture" | "onEmptiedCapture" | "onEncryptedCapture" | "onEndedCapture" | "onLoadedDataCapture" | "onLoadedMetadataCapture" | "onLoadStartCapture" | "onPauseCapture" | "onPlayCapture" | "onPlayingCapture" | "onProgressCapture" | "onRateChangeCapture" | "onSeekedCapture" | "onSeekingCapture" | "onStalledCapture" | "onSuspendCapture" | "onTimeUpdateCapture" | "onVolumeChangeCapture" | "onWaitingCapture" | "onAuxClickCapture" | "onClickCapture" | "onContextMenuCapture" | "onDoubleClickCapture" | "onDragCapture" | "onDragEndCapture" | "onDragEnterCapture" | "onDragExitCapture" | "onDragLeaveCapture" | "onDragOverCapture" | "onDragStartCapture" | "onDropCapture" | "onMouseDownCapture" | "onMouseMoveCapture" | "onMouseOutCapture" | "onMouseOverCapture" | "onMouseUpCapture" | "onSelectCapture" | "onTouchCancelCapture" | "onTouchEndCapture" | "onTouchMoveCapture" | "onTouchStartCapture" | "onPointerDownCapture" | "onPointerMoveCapture" | "onPointerUpCapture" | "onPointerCancelCapture" | "onPointerEnterCapture" | "onPointerLeaveCapture" | "onPointerOverCapture" | "onPointerOutCapture" | "onGotPointerCaptureCapture" | "onLostPointerCaptureCapture" | "onScrollCapture" | "onWheelCapture" | "onAnimationStartCapture" | "onAnimationEndCapture" | "onAnimationIterationCapture" | "onTransitionEndCapture" | "shake" | "float" | "apiRef"> & React.RefAttributes<any>>; |
@@ -1,14 +0,1 @@ | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
var __assign = (this && this.__assign) || function () { | ||
@@ -36,43 +23,9 @@ __assign = Object.assign || function(t) { | ||
}; | ||
import * as React from 'react'; | ||
import { MDCFloatingLabelFoundation } from '@material/floating-label'; | ||
import { FoundationComponent } from '@rmwc/base'; | ||
var FloatingLabel = /** @class */ (function (_super) { | ||
__extends(FloatingLabel, _super); | ||
function FloatingLabel() { | ||
var _this = _super !== null && _super.apply(this, arguments) || this; | ||
_this.root = _this.createElement('root'); | ||
return _this; | ||
} | ||
FloatingLabel.prototype.getDefaultFoundation = function () { | ||
var _this = this; | ||
return new MDCFloatingLabelFoundation({ | ||
addClass: function (className) { return _this.root.addClass(className); }, | ||
removeClass: function (className) { return _this.root.removeClass(className); }, | ||
getWidth: function () { return (_this.root.ref ? _this.root.ref.scrollWidth : 0); }, | ||
registerInteractionHandler: function (evtType, handler) { return _this.root.addEventListener(evtType, handler); }, | ||
deregisterInteractionHandler: function (evtType, handler) { return _this.root.removeEventListener(evtType, handler); } | ||
}); | ||
}; | ||
FloatingLabel.prototype.sync = function (props, prevProps) { | ||
var _this = this; | ||
// shake | ||
this.syncProp(props.shake, prevProps.shake, function () { | ||
_this.foundation.shake(!!props.shake); | ||
}); | ||
// float | ||
this.syncProp(props.float, prevProps.float, function () { | ||
_this.foundation.float(!!props.float); | ||
}); | ||
}; | ||
FloatingLabel.prototype.getWidth = function () { | ||
return this.foundation.getWidth(); | ||
}; | ||
FloatingLabel.prototype.render = function () { | ||
var _a = this.props, shake = _a.shake, float = _a.float, rest = __rest(_a, ["shake", "float"]); | ||
return (React.createElement("label", __assign({}, this.root.props(__assign({}, rest, { className: 'mdc-floating-label' })), { ref: this.root.setRef }))); | ||
}; | ||
FloatingLabel.displayName = 'FloatingLabel'; | ||
return FloatingLabel; | ||
}(FoundationComponent)); | ||
export { FloatingLabel }; | ||
import React from 'react'; | ||
import { useFloatingLabelFoundation } from './foundation'; | ||
export var FloatingLabel = React.forwardRef(function FloatingLabel(props, ref) { | ||
var rootEl = useFloatingLabelFoundation(props).rootEl; | ||
var shake = props.shake, float = props.float, apiRef = props.apiRef, rest = __rest(props, ["shake", "float", "apiRef"]); | ||
return (React.createElement("label", __assign({}, rootEl.props(__assign(__assign({}, rest), { className: 'mdc-floating-label' })), { ref: rootEl.setRef }))); | ||
}); | ||
FloatingLabel.displayName = 'FloatingLabel'; |
{ | ||
"name": "@rmwc/floating-label", | ||
"version": "5.7.0", | ||
"version": "6.0.0-alpha.1", | ||
"description": "RMWC FloatingLabel component", | ||
@@ -36,6 +36,6 @@ "main": "dist/index.js", | ||
"@material/floating-label": "^3.1.0", | ||
"@rmwc/base": "^5.7.0", | ||
"@rmwc/types": "^5.6.0" | ||
"@rmwc/base": "^6.0.0-alpha.1", | ||
"@rmwc/types": "^6.0.0-alpha.0" | ||
}, | ||
"gitHead": "cac77905430cfdcd487effe81a9b1d505a2525ef" | ||
"gitHead": "ec5048e83770d083a1212c2778a59026bb377d58" | ||
} |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
14
29052
434
2
1
+ Added@material/dom@5.1.0(transitive)
+ Added@rmwc/base@6.1.4(transitive)
+ Added@rmwc/types@6.0.5(transitive)
+ Added@types/classnames@2.3.4(transitive)
+ Addedhyperform@0.11.0(transitive)
- Removed@rmwc/base@5.7.2(transitive)
- Removed@rmwc/types@5.6.0(transitive)
- Removedfocus-trap@5.1.0(transitive)
- Removedhyperform@0.9.23(transitive)
- Removedtabbable@4.0.0(transitive)
- Removedxtend@4.0.2(transitive)
Updated@rmwc/base@^6.0.0-alpha.1
Updated@rmwc/types@^6.0.0-alpha.0