mirror of
https://github.com/flarum/core.git
synced 2025-08-07 08:56:38 +02:00
Bundled output for commit fcdc7930b1
Includes transpiled JS/TS, and Typescript declaration files (typings). [skip ci]
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
export default class UploadImageButton extends Button {
|
export default class UploadImageButton extends Button<import("../../common/components/Button").IButtonAttrs> {
|
||||||
|
constructor();
|
||||||
loading: boolean;
|
loading: boolean;
|
||||||
/**
|
/**
|
||||||
* Prompt the user to upload an image.
|
* Prompt the user to upload an image.
|
||||||
|
@@ -1,29 +1,69 @@
|
|||||||
|
import type Mithril from 'mithril';
|
||||||
|
import Component, { ComponentAttrs } from '../Component';
|
||||||
|
export interface IButtonAttrs extends ComponentAttrs {
|
||||||
|
/**
|
||||||
|
* Class(es) of an optional icon to be rendered within the button.
|
||||||
|
*
|
||||||
|
* If provided, the button will gain a `has-icon` class.
|
||||||
|
*/
|
||||||
|
icon?: string;
|
||||||
|
/**
|
||||||
|
* Disables button from user input.
|
||||||
|
*
|
||||||
|
* Default: `false`
|
||||||
|
*/
|
||||||
|
disabled?: boolean;
|
||||||
|
/**
|
||||||
|
* Show a loading spinner within the button.
|
||||||
|
*
|
||||||
|
* If `true`, also disables the button.
|
||||||
|
*
|
||||||
|
* Default: `false`
|
||||||
|
*/
|
||||||
|
loading?: boolean;
|
||||||
|
/**
|
||||||
|
* **DEPRECATED:** Please use the `aria-label` attribute instead. For tooltips, use
|
||||||
|
* the `<Tooltip>` component.
|
||||||
|
*
|
||||||
|
* Accessible text for the button. This should always be present if the button only
|
||||||
|
* contains an icon.
|
||||||
|
*
|
||||||
|
* The textual content of this attribute is passed to the DOM element as `aria-label`.
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
|
*/
|
||||||
|
title?: string | Mithril.ChildArray;
|
||||||
|
/**
|
||||||
|
* Accessible text for the button. This should always be present if the button only
|
||||||
|
* contains an icon.
|
||||||
|
*
|
||||||
|
* The textual content of this attribute is passed to the DOM element as `aria-label`.
|
||||||
|
*/
|
||||||
|
'aria-label'?: string | Mithril.ChildArray;
|
||||||
|
/**
|
||||||
|
* Button type.
|
||||||
|
*
|
||||||
|
* Default: `"button"`
|
||||||
|
*
|
||||||
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-type
|
||||||
|
*/
|
||||||
|
type?: string;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* The `Button` component defines an element which, when clicked, performs an
|
* The `Button` component defines an element which, when clicked, performs an
|
||||||
* action.
|
* action.
|
||||||
*
|
*
|
||||||
* ### Attrs
|
* Other attrs will be assigned as attributes on the `<button>` element.
|
||||||
*
|
|
||||||
* - `icon` The name of the icon class. If specified, the button will be given a
|
|
||||||
* 'has-icon' class name.
|
|
||||||
* - `disabled` Whether or not the button is disabled. If truthy, the button
|
|
||||||
* will be given a 'disabled' class name, and any `onclick` handler will be
|
|
||||||
* removed.
|
|
||||||
* - `loading` Whether or not the button should be in a disabled loading state.
|
|
||||||
*
|
|
||||||
* All other attrs will be assigned as attributes on the button element.
|
|
||||||
*
|
*
|
||||||
* Note that a Button has no default class names. This is because a Button can
|
* Note that a Button has no default class names. This is because a Button can
|
||||||
* be used to represent any generic clickable control, like a menu item.
|
* be used to represent any generic clickable control, like a menu item. Common
|
||||||
|
* styles can be applied by providing `className="Button"` to the Button component.
|
||||||
*/
|
*/
|
||||||
export default class Button extends Component<import("../Component").ComponentAttrs, undefined> {
|
export default class Button<CustomAttrs extends IButtonAttrs = IButtonAttrs> extends Component<CustomAttrs> {
|
||||||
constructor();
|
view(vnode: Mithril.Vnode<IButtonAttrs, never>): JSX.Element;
|
||||||
|
oncreate(vnode: Mithril.VnodeDOM<IButtonAttrs, this>): void;
|
||||||
/**
|
/**
|
||||||
* Get the template for the button's content.
|
* Get the template for the button's content.
|
||||||
*
|
|
||||||
* @return {*}
|
|
||||||
* @protected
|
|
||||||
*/
|
*/
|
||||||
protected getButtonContent(children: any): any;
|
protected getButtonContent(children: Mithril.Children): Mithril.ChildArray;
|
||||||
}
|
}
|
||||||
import Component from "../Component";
|
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
* the `active` prop will automatically be set to true.
|
* the `active` prop will automatically be set to true.
|
||||||
* - `force` Whether the page should be fully rerendered. Defaults to `true`.
|
* - `force` Whether the page should be fully rerendered. Defaults to `true`.
|
||||||
*/
|
*/
|
||||||
export default class LinkButton extends Button {
|
export default class LinkButton extends Button<import("./Button").IButtonAttrs> {
|
||||||
static initAttrs(attrs: any): void;
|
static initAttrs(attrs: any): void;
|
||||||
/**
|
/**
|
||||||
* Determine whether a component with the given attrs is 'active'.
|
* Determine whether a component with the given attrs is 'active'.
|
||||||
@@ -20,5 +20,6 @@ export default class LinkButton extends Button {
|
|||||||
* @return {Boolean}
|
* @return {Boolean}
|
||||||
*/
|
*/
|
||||||
static isActive(attrs: Object): boolean;
|
static isActive(attrs: Object): boolean;
|
||||||
|
constructor();
|
||||||
}
|
}
|
||||||
import Button from "./Button";
|
import Button from "./Button";
|
||||||
|
@@ -1,8 +1,14 @@
|
|||||||
/**
|
/**
|
||||||
* The `TextEditorButton` component displays a button suitable for the text
|
* The `TextEditorButton` component displays a button suitable for the text
|
||||||
* editor toolbar.
|
* editor toolbar.
|
||||||
|
*
|
||||||
|
* Automatically creates tooltips using the Tooltip component and provided text.
|
||||||
|
*
|
||||||
|
* ## Attrs
|
||||||
|
* - `title` - Tooltip for the button
|
||||||
*/
|
*/
|
||||||
export default class TextEditorButton extends Button {
|
export default class TextEditorButton extends Button<import("./Button").IButtonAttrs> {
|
||||||
static initAttrs(attrs: any): void;
|
static initAttrs(attrs: any): void;
|
||||||
|
constructor();
|
||||||
}
|
}
|
||||||
import Button from "./Button";
|
import Button from "./Button";
|
||||||
|
12
framework/core/js/dist-typings/common/helpers/fireDebugWarning.d.ts
vendored
Normal file
12
framework/core/js/dist-typings/common/helpers/fireDebugWarning.d.ts
vendored
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
/**
|
||||||
|
* Calls `console.warn` with the provided arguments, but only if the forum is in debug mode.
|
||||||
|
*
|
||||||
|
* This function is intended to provide warnings to extension developers about issues with
|
||||||
|
* their extensions that may not be easily noticed when testing, such as accessibility
|
||||||
|
* issues.
|
||||||
|
*
|
||||||
|
* These warnings should be hidden on production forums to ensure webmasters are not
|
||||||
|
* inundated with do-gooders telling them they have an issue when it isn't something they
|
||||||
|
* can fix.
|
||||||
|
*/
|
||||||
|
export default function fireDebugWarning(...args: Parameters<typeof console.warn>): void;
|
@@ -2,7 +2,8 @@
|
|||||||
* The `ComposerButton` component displays a button suitable for the composer
|
* The `ComposerButton` component displays a button suitable for the composer
|
||||||
* controls.
|
* controls.
|
||||||
*/
|
*/
|
||||||
export default class ComposerButton extends Button {
|
export default class ComposerButton extends Button<import("../../common/components/Button").IButtonAttrs> {
|
||||||
static initAttrs(attrs: any): void;
|
static initAttrs(attrs: any): void;
|
||||||
|
constructor();
|
||||||
}
|
}
|
||||||
import Button from "../../common/components/Button";
|
import Button from "../../common/components/Button";
|
||||||
|
@@ -6,7 +6,8 @@
|
|||||||
*
|
*
|
||||||
* - `path`
|
* - `path`
|
||||||
*/
|
*/
|
||||||
export default class LogInButton extends Button {
|
export default class LogInButton extends Button<import("../../common/components/Button").IButtonAttrs> {
|
||||||
static initAttrs(attrs: any): void;
|
static initAttrs(attrs: any): void;
|
||||||
|
constructor();
|
||||||
}
|
}
|
||||||
import Button from "../../common/components/Button";
|
import Button from "../../common/components/Button";
|
||||||
|
6
framework/core/js/dist/admin.js
generated
vendored
6
framework/core/js/dist/admin.js
generated
vendored
File diff suppressed because one or more lines are too long
2
framework/core/js/dist/admin.js.map
generated
vendored
2
framework/core/js/dist/admin.js.map
generated
vendored
File diff suppressed because one or more lines are too long
6
framework/core/js/dist/forum.js
generated
vendored
6
framework/core/js/dist/forum.js
generated
vendored
File diff suppressed because one or more lines are too long
2
framework/core/js/dist/forum.js.map
generated
vendored
2
framework/core/js/dist/forum.js.map
generated
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user