mirror of
https://github.com/SteamDeckHomebrew/decky-frontend-lib.git
synced 2026-05-25 04:18:48 +02:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
71a6c79384 | ||
|
|
da4c79b5ae | ||
|
|
7b04bf5827 | ||
|
|
a87e1bb46f | ||
|
|
b6e2e7e4dc | ||
|
|
7d82a82e9c | ||
|
|
0cee60d122 | ||
|
|
7efc0347f7 |
28
CHANGELOG.md
28
CHANGELOG.md
@@ -1,3 +1,31 @@
|
|||||||
|
## [0.12.2](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v0.12.1...v0.12.2) (2022-06-23)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **Field:** title -> label ([da4c79b](https://github.com/SteamDeckHomebrew/decky-frontend-lib/commit/da4c79b5aeb3c589527e17ad29610a8e3f929b79))
|
||||||
|
|
||||||
|
## [0.12.1](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v0.12.0...v0.12.1) (2022-06-23)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **components:** export FIeld ([a87e1bb](https://github.com/SteamDeckHomebrew/decky-frontend-lib/commit/a87e1bb46f749e10ea2b94a011df48f162834c25))
|
||||||
|
|
||||||
|
# [0.12.0](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v0.11.1...v0.12.0) (2022-06-23)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **components:** add Field ([7d82a82](https://github.com/SteamDeckHomebrew/decky-frontend-lib/commit/7d82a82e9c4db59832593cb6f0f78775b252dc69))
|
||||||
|
|
||||||
|
## [0.11.1](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v0.11.0...v0.11.1) (2022-06-23)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **Router:** make specifying quick access tab not required ([7efc034](https://github.com/SteamDeckHomebrew/decky-frontend-lib/commit/7efc0347f7aa22773feccb0763280c4fd1c4a231))
|
||||||
|
|
||||||
# [0.11.0](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v0.10.5...v0.11.0) (2022-06-20)
|
# [0.11.0](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v0.10.5...v0.11.0) (2022-06-20)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "decky-frontend-lib",
|
"name": "decky-frontend-lib",
|
||||||
"version": "0.11.0",
|
"version": "0.12.2",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "decky-frontend-lib",
|
"name": "decky-frontend-lib",
|
||||||
"version": "0.11.0",
|
"version": "0.12.2",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"license": "GPL-2.0-or-later",
|
"license": "GPL-2.0-or-later",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "decky-frontend-lib",
|
"name": "decky-frontend-lib",
|
||||||
"version": "0.11.0",
|
"version": "0.12.2",
|
||||||
"description": "A library for building decky plugins",
|
"description": "A library for building decky plugins",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
|
|||||||
22
src/deck-components/Field.tsx
Normal file
22
src/deck-components/Field.tsx
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
import { FC, HTMLAttributes, ReactNode, RefAttributes } from 'react';
|
||||||
|
import { findModuleChild } from '../webpack';
|
||||||
|
|
||||||
|
export interface FieldProps extends HTMLAttributes<HTMLDivElement> {
|
||||||
|
label?: string;
|
||||||
|
description?: boolean;
|
||||||
|
disabled?: boolean;
|
||||||
|
icon?: ReactNode;
|
||||||
|
childrenLayout?: string;
|
||||||
|
childrenContainerWidth?: string;
|
||||||
|
padding?: string;
|
||||||
|
highlightOnFocus?: boolean;
|
||||||
|
indentLevel?: number;
|
||||||
|
verticalAlignment?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const Field = findModuleChild((m) => {
|
||||||
|
if (typeof m !== "object") return undefined;
|
||||||
|
for (let prop in m) {
|
||||||
|
if (m[prop]?.render?.toString().includes('"shift-children-below"')) return m[prop]
|
||||||
|
}
|
||||||
|
}) as FC<FieldProps & RefAttributes<HTMLDivElement>>;
|
||||||
@@ -19,7 +19,7 @@ export enum QuickAccessTab {
|
|||||||
|
|
||||||
export interface Router {
|
export interface Router {
|
||||||
CloseSideMenus(): void;
|
CloseSideMenus(): void;
|
||||||
OpenQuickAccessMenu(quickAccessTab: QuickAccessTab): void;
|
OpenQuickAccessMenu(quickAccessTab?: QuickAccessTab): void;
|
||||||
GetQuickAccessTab(): QuickAccessTab;
|
GetQuickAccessTab(): QuickAccessTab;
|
||||||
Navigate(path: string): void;
|
Navigate(path: string): void;
|
||||||
NavigateBackOrOpenMenu(): void;
|
NavigateBackOrOpenMenu(): void;
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
export * from './Button';
|
export * from './Button';
|
||||||
export * from './ButtonItem';
|
export * from './ButtonItem';
|
||||||
export * from './Dropdown';
|
export * from './Dropdown';
|
||||||
|
export * from './Field';
|
||||||
export * from './Focusable';
|
export * from './Focusable';
|
||||||
export * from './Menu';
|
export * from './Menu';
|
||||||
export * from './Modal';
|
export * from './Modal';
|
||||||
|
|||||||
Reference in New Issue
Block a user