@ptbdynamic/plinth 0.0.0-stage → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +258 -2
- package/package.json +99 -4
- package/packages/css/dist/avatar.css +122 -0
- package/packages/css/dist/badge.css +76 -0
- package/packages/css/dist/button.css +273 -0
- package/packages/css/dist/callout.css +143 -0
- package/packages/css/dist/code-block.css +283 -0
- package/packages/css/dist/confirm-dialog.css +183 -0
- package/packages/css/dist/data-table.css +470 -0
- package/packages/css/dist/dialog.css +113 -0
- package/packages/css/dist/drawer.css +156 -0
- package/packages/css/dist/fonts/geist/LICENSE +93 -0
- package/packages/css/dist/fonts/geist/geist-cyrillic-ext-wght-normal.woff2 +0 -0
- package/packages/css/dist/fonts/geist/geist-cyrillic-wght-normal.woff2 +0 -0
- package/packages/css/dist/fonts/geist/geist-latin-ext-wght-normal.woff2 +0 -0
- package/packages/css/dist/fonts/geist/geist-latin-wght-normal.woff2 +0 -0
- package/packages/css/dist/fonts/geist/geist-vietnamese-wght-normal.woff2 +0 -0
- package/packages/css/dist/fonts/geist-mono/LICENSE +93 -0
- package/packages/css/dist/fonts/geist-mono/geist-mono-cyrillic-ext-wght-normal.woff2 +0 -0
- package/packages/css/dist/fonts/geist-mono/geist-mono-cyrillic-wght-normal.woff2 +0 -0
- package/packages/css/dist/fonts/geist-mono/geist-mono-latin-ext-wght-normal.woff2 +0 -0
- package/packages/css/dist/fonts/geist-mono/geist-mono-latin-wght-normal.woff2 +0 -0
- package/packages/css/dist/fonts/geist-mono/geist-mono-symbols2-wght-normal.woff2 +0 -0
- package/packages/css/dist/fonts/geist-mono/geist-mono-vietnamese-wght-normal.woff2 +0 -0
- package/packages/css/dist/fonts/index.css +109 -0
- package/packages/css/dist/header.css +110 -0
- package/packages/css/dist/icon.css +51 -0
- package/packages/css/dist/list-card.css +76 -0
- package/packages/css/dist/list-row.css +164 -0
- package/packages/css/dist/menu-sheet.css +84 -0
- package/packages/css/dist/modal.css +367 -0
- package/packages/css/dist/pill-row.css +197 -0
- package/packages/css/dist/plinth.css +3773 -0
- package/packages/css/dist/section-menu.css +225 -0
- package/packages/css/dist/sheet.css +239 -0
- package/packages/css/dist/tokens.css +405 -0
- package/packages/react/dist/PlinthAvatar.d.ts +17 -0
- package/packages/react/dist/PlinthBadge.d.ts +7 -0
- package/packages/react/dist/PlinthButton.d.ts +29 -0
- package/packages/react/dist/PlinthCallout.d.ts +16 -0
- package/packages/react/dist/PlinthCodeBlock.d.ts +24 -0
- package/packages/react/dist/PlinthConfirmDialog.d.ts +38 -0
- package/packages/react/dist/PlinthDataTable.d.ts +11 -0
- package/packages/react/dist/PlinthDataTableCell.d.ts +15 -0
- package/packages/react/dist/PlinthDataTableColumn.d.ts +13 -0
- package/packages/react/dist/PlinthDataTableEmpty.d.ts +9 -0
- package/packages/react/dist/PlinthDataTableRow.d.ts +9 -0
- package/packages/react/dist/PlinthDataTableSort.d.ts +4 -0
- package/packages/react/dist/PlinthDialog.d.ts +26 -0
- package/packages/react/dist/PlinthDrawer.d.ts +29 -0
- package/packages/react/dist/PlinthHeader.d.ts +12 -0
- package/packages/react/dist/PlinthIcon.d.ts +10 -0
- package/packages/react/dist/PlinthIconButton.d.ts +26 -0
- package/packages/react/dist/PlinthListCard.d.ts +14 -0
- package/packages/react/dist/PlinthListRow.d.ts +29 -0
- package/packages/react/dist/PlinthMenuSheet.d.ts +24 -0
- package/packages/react/dist/PlinthPill.d.ts +17 -0
- package/packages/react/dist/PlinthPillRow.d.ts +13 -0
- package/packages/react/dist/PlinthSectionMenu.d.ts +11 -0
- package/packages/react/dist/PlinthSectionMenuItem.d.ts +20 -0
- package/packages/react/dist/PlinthSheet.d.ts +26 -0
- package/packages/react/dist/avatar.d.ts +12 -0
- package/packages/react/dist/button.d.ts +21 -0
- package/packages/react/dist/callout.d.ts +19 -0
- package/packages/react/dist/code-block.d.ts +16 -0
- package/packages/react/dist/confirm-dialog.d.ts +23 -0
- package/packages/react/dist/data-table.d.ts +15 -0
- package/packages/react/dist/dialog.d.ts +10 -0
- package/packages/react/dist/drawer.d.ts +20 -0
- package/packages/react/dist/heading.d.ts +5 -0
- package/packages/react/dist/icon.d.ts +5 -0
- package/packages/react/dist/index.d.ts +40 -0
- package/packages/react/dist/index.js +1127 -0
- package/packages/react/dist/list-row.d.ts +5 -0
- package/packages/react/dist/markup.d.ts +9 -0
- package/packages/react/dist/sheet.d.ts +12 -0
- package/packages/react/dist/size.d.ts +13 -0
- package/packages/react/dist/swipe.d.ts +15 -0
- package/packages/react/dist/tones.d.ts +5 -0
- package/packages/tokens/dist/index.d.ts +218 -0
- package/packages/tokens/dist/index.js +3966 -0
- package/packages/tokens/dist/tailwind-theme.css +80 -0
- package/packages/tokens/dist/tokens.css +405 -0
- package/packages/tokens/dist/tokens.json +3762 -0
- package/packages/vue/dist/PlinthAvatar.vue.d.ts +24 -0
- package/packages/vue/dist/PlinthBadge.vue.d.ts +21 -0
- package/packages/vue/dist/PlinthButton.vue.d.ts +42 -0
- package/packages/vue/dist/PlinthCallout.vue.d.ts +31 -0
- package/packages/vue/dist/PlinthCodeBlock.vue.d.ts +49 -0
- package/packages/vue/dist/PlinthConfirmDialog.vue.d.ts +51 -0
- package/packages/vue/dist/PlinthDataTable.vue.d.ts +21 -0
- package/packages/vue/dist/PlinthDataTableCell.vue.d.ts +29 -0
- package/packages/vue/dist/PlinthDataTableColumn.vue.d.ts +26 -0
- package/packages/vue/dist/PlinthDataTableEmpty.vue.d.ts +19 -0
- package/packages/vue/dist/PlinthDataTableRow.vue.d.ts +19 -0
- package/packages/vue/dist/PlinthDataTableSort.vue.d.ts +13 -0
- package/packages/vue/dist/PlinthDialog.vue.d.ts +45 -0
- package/packages/vue/dist/PlinthDrawer.vue.d.ts +48 -0
- package/packages/vue/dist/PlinthHeader.vue.d.ts +19 -0
- package/packages/vue/dist/PlinthIcon.vue.d.ts +23 -0
- package/packages/vue/dist/PlinthIconButton.vue.d.ts +37 -0
- package/packages/vue/dist/PlinthListCard.vue.d.ts +26 -0
- package/packages/vue/dist/PlinthListRow.vue.d.ts +38 -0
- package/packages/vue/dist/PlinthMenuSheet.vue.d.ts +48 -0
- package/packages/vue/dist/PlinthPill.vue.d.ts +28 -0
- package/packages/vue/dist/PlinthPillRow.vue.d.ts +22 -0
- package/packages/vue/dist/PlinthSectionMenu.vue.d.ts +22 -0
- package/packages/vue/dist/PlinthSectionMenuItem.vue.d.ts +28 -0
- package/packages/vue/dist/PlinthSheet.vue.d.ts +45 -0
- package/packages/vue/dist/avatar.d.ts +12 -0
- package/packages/vue/dist/button.d.ts +5 -0
- package/packages/vue/dist/callout.d.ts +19 -0
- package/packages/vue/dist/code-block.d.ts +16 -0
- package/packages/vue/dist/confirm-dialog.d.ts +23 -0
- package/packages/vue/dist/data-table.d.ts +15 -0
- package/packages/vue/dist/dialog.d.ts +10 -0
- package/packages/vue/dist/drawer.d.ts +20 -0
- package/packages/vue/dist/heading.d.ts +5 -0
- package/packages/vue/dist/icon.d.ts +5 -0
- package/packages/vue/dist/index.d.ts +44 -0
- package/packages/vue/dist/index.js +1439 -0
- package/packages/vue/dist/list-row.d.ts +5 -0
- package/packages/vue/dist/sheet.d.ts +12 -0
- package/packages/vue/dist/size.d.ts +13 -0
- package/packages/vue/dist/slots.d.ts +3 -0
- package/packages/vue/dist/swipe.d.ts +12 -0
- package/packages/vue/dist/tones.d.ts +5 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The list row's chevron, for a row that opens something. It points the other way in
|
|
3
|
+
* right-to-left text (data-mirror). Blade's list row prints the same markup.
|
|
4
|
+
*/
|
|
5
|
+
export declare const listRowChevron = "<span class=\"plinth-icon plinth-list-row-chevron\" data-size=\"sm\" data-mirror aria-hidden=\"true\"><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M9 6l6 6-6 6\"></path></svg></span>";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The edge a sheet comes from. `end` is the default; `start` and `end` are logical, so they swap
|
|
3
|
+
* in right-to-left text. The same list is the side on a phone (`sidePhone`), which has no default.
|
|
4
|
+
*/
|
|
5
|
+
export declare const sheetSides: readonly ["start", "end", "top", "bottom"];
|
|
6
|
+
export type SheetSide = (typeof sheetSides)[number];
|
|
7
|
+
/** A side from the list, or `end` when it is not one of them. */
|
|
8
|
+
export declare function sheetSide(value: string | undefined): SheetSide;
|
|
9
|
+
/** A side from the list, or nothing (no `data-side-phone`) when it is not one of them. */
|
|
10
|
+
export declare function sheetSidePhone(value: string | undefined): SheetSide | undefined;
|
|
11
|
+
/** The close button's icon, a cross. Blade's sheet prints the same markup. */
|
|
12
|
+
export declare const sheetCloseIcon = "<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M6 6l12 12M18 6L6 18\"></path></svg>";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One size scale for every component, as Filament has (and as Blade's Size enum). Each component
|
|
3
|
+
* supports the sizes that make sense for it and falls back to its default for the rest.
|
|
4
|
+
*/
|
|
5
|
+
export declare const sizes: readonly ["xs", "sm", "md", "lg", "xl"];
|
|
6
|
+
export type Size = (typeof sizes)[number];
|
|
7
|
+
/** The control sizes (28, 32 and 40 px): buttons, icon buttons, inputs. */
|
|
8
|
+
export declare const controlSizes: readonly ["sm", "md", "lg"];
|
|
9
|
+
export type ControlSize = (typeof controlSizes)[number];
|
|
10
|
+
/** A size from `supported`, or `fallback` when it isn't one of them. */
|
|
11
|
+
export declare function resolveSize<T extends Size>(value: string | undefined, supported: readonly T[], fallback: T): T;
|
|
12
|
+
/** The size of the icons inside a control of this size. */
|
|
13
|
+
export declare function iconSizeFor(size: Size): 'sm' | 'md';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type Ref } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* What a bottom panel on a phone needs beyond the platform (modal.css, docs/adr/0005): the
|
|
4
|
+
* dialog, sheet and drawer are dragged by native scrolling, and this closes the dialog (with
|
|
5
|
+
* `requestClose()`, so `cancel` can keep it open) when the scrolling settles with the panel off the bottom edge, closes it on a tap above the panel when
|
|
6
|
+
* it has `closedby="any"`, and opens a drawer at its `data-snap` point. It does nothing while the
|
|
7
|
+
* root isn't a scroll-snap container (from 768px up, or a panel with no handle). Returns what
|
|
8
|
+
* removes the listeners.
|
|
9
|
+
*/
|
|
10
|
+
export declare function swipeToClose(dialog: HTMLDialogElement): () => void;
|
|
11
|
+
/** `swipeToClose()` on a component's dialog, from mounting to unmounting. */
|
|
12
|
+
export declare function useSwipeToClose(dialog: Ref<HTMLDialogElement | undefined>): void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** The tones a component such as the badge accepts. The first one is the default. */
|
|
2
|
+
export declare const tones: readonly ["neutral", "success", "warning", "danger"];
|
|
3
|
+
export type Tone = (typeof tones)[number];
|
|
4
|
+
/** A tone from the list, or the default when it is not one of them. */
|
|
5
|
+
export declare function tone(value: string | undefined): Tone;
|