mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-17 02:17:03 -04:00
Merge remote-tracking branch 'upstream/dev' into dev
This commit is contained in:
commit
ae1d98c8cf
6 changed files with 132 additions and 11 deletions
|
@ -38,6 +38,7 @@ export const Forms = {
|
|||
export const Card = waitForComponent<t.Card>("Card", filters.componentByCode(".editable),", ".outline:"));
|
||||
export const Button = waitForComponent<t.Button>("Button", filters.componentByCode("#{intl::A11Y_LOADING_STARTED}))),!1"));
|
||||
export const Switch = waitForComponent<t.Switch>("Switch", filters.componentByCode(".labelRow,ref:", ".disabledText"));
|
||||
export const Checkbox = waitForComponent<t.Checkbox>("Checkbox", filters.componentByCode(".checkboxWrapperDisabled:"));
|
||||
|
||||
const Tooltips = mapMangledModuleLazy(".tooltipTop,bottom:", {
|
||||
Tooltip: filters.componentByCode("this.renderTooltip()]"),
|
||||
|
|
32
src/webpack/common/types/components.d.ts
vendored
32
src/webpack/common/types/components.d.ts
vendored
|
@ -16,7 +16,7 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import type { ComponentPropsWithRef, ComponentType, CSSProperties, FunctionComponent, HtmlHTMLAttributes, HTMLProps, JSX, KeyboardEvent, MouseEvent, PropsWithChildren, PropsWithRef, ReactNode, Ref } from "react";
|
||||
import type { ComponentPropsWithRef, ComponentType, CSSProperties, FunctionComponent, HtmlHTMLAttributes, HTMLProps, JSX, KeyboardEvent, MouseEvent, PointerEvent, PropsWithChildren, PropsWithRef, ReactNode, Ref } from "react";
|
||||
|
||||
|
||||
export type TextVariant = "heading-sm/normal" | "heading-sm/medium" | "heading-sm/semibold" | "heading-sm/bold" | "heading-md/normal" | "heading-md/medium" | "heading-md/semibold" | "heading-md/bold" | "heading-lg/normal" | "heading-lg/medium" | "heading-lg/semibold" | "heading-lg/bold" | "heading-xl/normal" | "heading-xl/medium" | "heading-xl/bold" | "heading-xxl/normal" | "heading-xxl/medium" | "heading-xxl/bold" | "eyebrow" | "heading-deprecated-14/normal" | "heading-deprecated-14/medium" | "heading-deprecated-14/bold" | "text-xxs/normal" | "text-xxs/medium" | "text-xxs/semibold" | "text-xxs/bold" | "text-xs/normal" | "text-xs/medium" | "text-xs/semibold" | "text-xs/bold" | "text-sm/normal" | "text-sm/medium" | "text-sm/semibold" | "text-sm/bold" | "text-md/normal" | "text-md/medium" | "text-md/semibold" | "text-md/bold" | "text-lg/normal" | "text-lg/medium" | "text-lg/semibold" | "text-lg/bold" | "display-sm" | "display-md" | "display-lg" | "code";
|
||||
|
@ -197,6 +197,36 @@ export type Switch = ComponentType<PropsWithChildren<{
|
|||
tooltipNote?: ReactNode;
|
||||
}>>;
|
||||
|
||||
export type CheckboxAligns = {
|
||||
CENTER: "center";
|
||||
TOP: "top";
|
||||
};
|
||||
|
||||
export type CheckboxTypes = {
|
||||
DEFAULT: "default";
|
||||
INVERTED: "inverted";
|
||||
GHOST: "ghost";
|
||||
ROW: "row";
|
||||
};
|
||||
|
||||
export type Checkbox = ComponentType<PropsWithChildren<{
|
||||
value: boolean;
|
||||
onChange(event: PointerEvent, value: boolean): void;
|
||||
|
||||
align?: "center" | "top";
|
||||
disabled?: boolean;
|
||||
displayOnly?: boolean;
|
||||
readOnly?: boolean;
|
||||
reverse?: boolean;
|
||||
shape?: string;
|
||||
size?: number;
|
||||
type?: "default" | "inverted" | "ghost" | "row";
|
||||
}>> & {
|
||||
Shapes: Record<"BOX" | "ROUND" | "SMALL_BOX", string>;
|
||||
Aligns: CheckboxAligns;
|
||||
Types: CheckboxTypes;
|
||||
};
|
||||
|
||||
export type Timestamp = ComponentType<PropsWithChildren<{
|
||||
timestamp: Date | Moment;
|
||||
isEdited?: boolean;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue