UNPKG

@nextcloud/vue

Version:
226 lines (225 loc) 7.15 kB
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{ /** * disabled state of the action button */ disabled: { type: BooleanConstructor; default: boolean; }; /** * If this is a menu, a chevron icon will * be added at the end of the line */ isMenu: { type: BooleanConstructor; default: boolean; }; /** * The button's behavior, by default the button acts like a normal button with optional toggle button behavior if `modelValue` is `true` or `false`. * But you can also set to checkbox button behavior with tri-state or radio button like behavior. * This extends the native HTML button type attribute. */ type: { type: StringConstructor; default: string; validator: (behavior: unknown) => boolean; }; /** * The buttons state if `type` is 'checkbox' or 'radio' (meaning if it is pressed / selected). * For checkbox and toggle button behavior - boolean value. * For radio button behavior - could be a boolean checked or a string with the value of the button. * Note: Unlike native radio buttons, NcActionButton are not grouped by name, so you need to connect them by bind correct modelValue. * * **This is not availabe for `type='submit'` or `type='reset'`** * * If using `type='checkbox'` a `model-value` of `true` means checked, `false` means unchecked and `null` means indeterminate (tri-state) * For `type='radio'` `null` is equal to `false` */ modelValue: { type: (BooleanConstructor | StringConstructor)[]; default: null; }; /** * The value used for the `modelValue` when this component is used with radio behavior * Similar to the `value` attribute of `<input type="radio">` */ value: { type: StringConstructor; default: null; }; /** * Small underlying text content of the entry */ description: { type: StringConstructor; default: string; }; }>, { mdiCheck: string; mdiChevronRight: string; }, {}, { /** * determines if the action is focusable * * @return {boolean} is the action focusable ? */ isFocusable(): boolean; /** * The current "checked" or "pressed" state for the model behavior */ isChecked(): string | boolean; /** * The native HTML type to set on the button */ nativeType(): "submit" | "reset" | "button"; /** * HTML attributes to bind to the <button> */ buttonAttributes(): { role: string; 'aria-checked': string; 'aria-pressed': string; }; }, { /** * Forward click event, let mixin handle the close-after-click and emit new modelValue if needed * * @param {MouseEvent} event - The click event */ handleClick(event: MouseEvent): void; }, { mixins: { beforeUpdate(): void; data(): { text: any; }; computed: { isLongText(): any; }; methods: { getText(): any; }; }[]; props: { icon: { type: StringConstructor; default: string; }; name: { type: StringConstructor; default: string; }; title: { type: StringConstructor; default: string; }; closeAfterClick: { type: BooleanConstructor; default: boolean; }; ariaLabel: { type: StringConstructor; default: null; }; }; inject: { closeMenu: { from: import('vue').InjectionKey<(returnFocus: boolean) => void>; }; }; emits: string[]; created(): void; computed: { isIconUrl(): boolean; }; methods: { onClick(event: any): void; }; }, import('vue').ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{ /** * disabled state of the action button */ disabled: { type: BooleanConstructor; default: boolean; }; /** * If this is a menu, a chevron icon will * be added at the end of the line */ isMenu: { type: BooleanConstructor; default: boolean; }; /** * The button's behavior, by default the button acts like a normal button with optional toggle button behavior if `modelValue` is `true` or `false`. * But you can also set to checkbox button behavior with tri-state or radio button like behavior. * This extends the native HTML button type attribute. */ type: { type: StringConstructor; default: string; validator: (behavior: unknown) => boolean; }; /** * The buttons state if `type` is 'checkbox' or 'radio' (meaning if it is pressed / selected). * For checkbox and toggle button behavior - boolean value. * For radio button behavior - could be a boolean checked or a string with the value of the button. * Note: Unlike native radio buttons, NcActionButton are not grouped by name, so you need to connect them by bind correct modelValue. * * **This is not availabe for `type='submit'` or `type='reset'`** * * If using `type='checkbox'` a `model-value` of `true` means checked, `false` means unchecked and `null` means indeterminate (tri-state) * For `type='radio'` `null` is equal to `false` */ modelValue: { type: (BooleanConstructor | StringConstructor)[]; default: null; }; /** * The value used for the `modelValue` when this component is used with radio behavior * Similar to the `value` attribute of `<input type="radio">` */ value: { type: StringConstructor; default: null; }; /** * Small underlying text content of the entry */ description: { type: StringConstructor; default: string; }; }>> & Readonly<{ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined; }>, { type: string; value: string; description: string; disabled: boolean; modelValue: string | boolean; isMenu: boolean; }, {}, { NcIconSvgWrapper: import('vue').DefineComponent<{ directional?: boolean; inline?: boolean; svg?: string; name?: string; path?: string; size?: number | "auto"; }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{ directional?: boolean; inline?: boolean; svg?: string; name?: string; path?: string; size?: number | "auto"; }> & Readonly<{}>, { size: number | "auto"; name: string; svg: string; path: string; }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLSpanElement>; }, {}, string, import('vue').ComponentProvideOptions, true, {}, any>; export default _default;