@ptbdynamic/plinth 0.0.0-stage → 0.2.0
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/menu.css +245 -0
- package/packages/css/dist/modal.css +367 -0
- package/packages/css/dist/page-header.css +124 -0
- package/packages/css/dist/pill-row.css +197 -0
- package/packages/css/dist/plinth.css +4446 -0
- package/packages/css/dist/section-menu.css +226 -0
- package/packages/css/dist/sheet.css +239 -0
- package/packages/css/dist/text-field.css +230 -0
- package/packages/css/dist/textarea.css +169 -0
- package/packages/css/dist/tokens.css +413 -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/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/PlinthMenu.d.ts +12 -0
- package/packages/react/dist/PlinthMenuGroup.d.ts +9 -0
- package/packages/react/dist/PlinthMenuItem.d.ts +26 -0
- package/packages/react/dist/PlinthMenuSeparator.d.ts +4 -0
- package/packages/react/dist/PlinthMenuSheet.d.ts +24 -0
- package/packages/react/dist/PlinthPageHeader.d.ts +17 -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/PlinthTextField.d.ts +24 -0
- package/packages/react/dist/PlinthTextarea.d.ts +24 -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 +49 -0
- package/packages/react/dist/index.js +1326 -0
- package/packages/react/dist/list-row.d.ts +5 -0
- package/packages/react/dist/markup.d.ts +9 -0
- package/packages/react/dist/menu.d.ts +7 -0
- package/packages/react/dist/page-header.d.ts +5 -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/text-field.d.ts +10 -0
- package/packages/react/dist/tones.d.ts +5 -0
- package/packages/tokens/dist/index.d.ts +230 -0
- package/packages/tokens/dist/index.js +4091 -0
- package/packages/tokens/dist/tailwind-theme.css +80 -0
- package/packages/tokens/dist/tokens.css +413 -0
- package/packages/tokens/dist/tokens.json +3875 -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/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/PlinthMenu.vue.d.ts +24 -0
- package/packages/vue/dist/PlinthMenuGroup.vue.d.ts +17 -0
- package/packages/vue/dist/PlinthMenuItem.vue.d.ts +34 -0
- package/packages/vue/dist/PlinthMenuSeparator.vue.d.ts +3 -0
- package/packages/vue/dist/PlinthMenuSheet.vue.d.ts +48 -0
- package/packages/vue/dist/PlinthPageHeader.vue.d.ts +27 -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/PlinthTextField.vue.d.ts +51 -0
- package/packages/vue/dist/PlinthTextarea.vue.d.ts +42 -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 +53 -0
- package/packages/vue/dist/index.js +1732 -0
- package/packages/vue/dist/list-row.d.ts +5 -0
- package/packages/vue/dist/menu.d.ts +8 -0
- package/packages/vue/dist/page-header.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/text-field.d.ts +10 -0
- package/packages/vue/dist/tones.d.ts +5 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** The sort states of a sortable column, as aria-sort takes them. `none` is the default. */
|
|
2
|
+
export declare const dataTableSorts: readonly ["none", "ascending", "descending"];
|
|
3
|
+
export type DataTableSort = (typeof dataTableSorts)[number];
|
|
4
|
+
/** A sort from the list, or `none` when it is not one of them. */
|
|
5
|
+
export declare function dataTableSort(value: string | undefined): DataTableSort;
|
|
6
|
+
/** What a cell is on a phone's card: a labelled field (the default), its title, or its actions. */
|
|
7
|
+
export declare const dataTableCellKinds: readonly ["field", "title", "actions"];
|
|
8
|
+
export type DataTableCellKind = (typeof dataTableCellKinds)[number];
|
|
9
|
+
/** A kind from the list, or `field` when it is not one of them. */
|
|
10
|
+
export declare function dataTableCellKind(value: string | undefined): DataTableCellKind;
|
|
11
|
+
/**
|
|
12
|
+
* The sort button's icon: an arrow up and an arrow down; the column's aria-sort decides which
|
|
13
|
+
* of them show. Blade's sort button prints the same markup.
|
|
14
|
+
*/
|
|
15
|
+
export declare const dataTableSortIcon = "<span class=\"plinth-icon plinth-data-table-sort-icon\" data-size=\"sm\" aria-hidden=\"true\"><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path class=\"plinth-data-table-sort-up\" d=\"M8 9l4-4 4 4\"></path><path class=\"plinth-data-table-sort-down\" d=\"M8 15l4 4 4-4\"></path></svg></span>";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How the dialog shows below 768px: `center` (the default, printed as no attribute) or `bottom`,
|
|
3
|
+
* a bottom sheet. From 768px up every dialog is centred.
|
|
4
|
+
*/
|
|
5
|
+
export declare const dialogSidePhones: readonly ["center", "bottom"];
|
|
6
|
+
export type DialogSidePhone = (typeof dialogSidePhones)[number];
|
|
7
|
+
/** A side from the list, or `center` when it is not one of them. */
|
|
8
|
+
export declare function dialogSidePhone(value: string | undefined): DialogSidePhone;
|
|
9
|
+
/** The close button's icon, the same cross as the sheet's. Blade's dialog prints the same markup. */
|
|
10
|
+
export declare const dialogCloseIcon = "<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,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The drawer's presentation from 768px up: `dialog` (the default), centred like the dialog, or
|
|
3
|
+
* `sheet`, a panel on the inline-end edge like the sheet.
|
|
4
|
+
*/
|
|
5
|
+
export declare const drawerDesktops: readonly ["dialog", "sheet"];
|
|
6
|
+
export type DrawerDesktop = (typeof drawerDesktops)[number];
|
|
7
|
+
/** A presentation from the list, or `dialog` when it is not one of them. */
|
|
8
|
+
export declare function drawerDesktop(value: string | undefined): DrawerDesktop;
|
|
9
|
+
/** Where a drawer can rest on a phone, smallest first: a peek, half the screen, or all of it. */
|
|
10
|
+
export declare const drawerSnaps: readonly ["peek", "half", "full"];
|
|
11
|
+
export type DrawerSnap = (typeof drawerSnaps)[number];
|
|
12
|
+
/**
|
|
13
|
+
* The snap points from a list or a string of them separated by spaces: the known ones, each once,
|
|
14
|
+
* smallest first. Empty when there are none (a drawer as tall as its content).
|
|
15
|
+
*/
|
|
16
|
+
export declare function drawerSnapPoints(value: readonly string[] | string | undefined): DrawerSnap[];
|
|
17
|
+
/** The snap point it opens at: `snap` when it is one of `points`, else the largest of them. */
|
|
18
|
+
export declare function drawerSnap(snap: string | undefined, points: DrawerSnap[]): DrawerSnap | undefined;
|
|
19
|
+
/** The close button's icon, the same cross as the sheet's. Blade's drawer prints the same markup. */
|
|
20
|
+
export declare const drawerCloseIcon = "<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,5 @@
|
|
|
1
|
+
/** The heading levels a component's heading can take. `h2` is the default. */
|
|
2
|
+
export declare const headingLevels: readonly ["h2", "h3", "h4", "h5", "h6"];
|
|
3
|
+
export type HeadingLevel = (typeof headingLevels)[number];
|
|
4
|
+
/** A level from the list, or `h2` when it is not one of them. */
|
|
5
|
+
export declare function headingLevel(value: string | undefined): HeadingLevel;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** The icon sizes (16, 20 and 24 px), from the shared size scale. `md` is the default. */
|
|
2
|
+
export declare const iconSizes: readonly ["sm", "md", "lg"];
|
|
3
|
+
export type IconSize = (typeof iconSizes)[number];
|
|
4
|
+
/** A size from the list, or `md` when it is not one of them. */
|
|
5
|
+
export declare function iconSize(value: string | undefined): IconSize;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export { PlinthAvatar, type PlinthAvatarProps } from './PlinthAvatar';
|
|
2
|
+
export { PlinthBadge, type PlinthBadgeProps } from './PlinthBadge';
|
|
3
|
+
export { PlinthButton, type PlinthButtonProps } from './PlinthButton';
|
|
4
|
+
export { PlinthCallout, type PlinthCalloutProps } from './PlinthCallout';
|
|
5
|
+
export { PlinthCodeBlock, type PlinthCodeBlockProps } from './PlinthCodeBlock';
|
|
6
|
+
export { PlinthConfirmDialog, type PlinthConfirmDialogProps } from './PlinthConfirmDialog';
|
|
7
|
+
export { PlinthDataTable, type PlinthDataTableProps } from './PlinthDataTable';
|
|
8
|
+
export { PlinthDataTableCell, type PlinthDataTableCellProps } from './PlinthDataTableCell';
|
|
9
|
+
export { PlinthDataTableColumn, type PlinthDataTableColumnProps } from './PlinthDataTableColumn';
|
|
10
|
+
export { PlinthDataTableEmpty, type PlinthDataTableEmptyProps } from './PlinthDataTableEmpty';
|
|
11
|
+
export { PlinthDataTableRow, type PlinthDataTableRowProps } from './PlinthDataTableRow';
|
|
12
|
+
export { PlinthDataTableSort, type PlinthDataTableSortProps } from './PlinthDataTableSort';
|
|
13
|
+
export { PlinthDialog, type PlinthDialogProps } from './PlinthDialog';
|
|
14
|
+
export { PlinthDrawer, type PlinthDrawerProps } from './PlinthDrawer';
|
|
15
|
+
export { PlinthIcon, type PlinthIconProps } from './PlinthIcon';
|
|
16
|
+
export { PlinthIconButton, type PlinthIconButtonProps } from './PlinthIconButton';
|
|
17
|
+
export { PlinthListCard, type PlinthListCardProps } from './PlinthListCard';
|
|
18
|
+
export { PlinthListRow, type PlinthListRowProps } from './PlinthListRow';
|
|
19
|
+
export { PlinthMenu, type PlinthMenuProps } from './PlinthMenu';
|
|
20
|
+
export { PlinthMenuGroup, type PlinthMenuGroupProps } from './PlinthMenuGroup';
|
|
21
|
+
export { PlinthMenuItem, type PlinthMenuItemProps } from './PlinthMenuItem';
|
|
22
|
+
export { PlinthMenuSeparator, type PlinthMenuSeparatorProps } from './PlinthMenuSeparator';
|
|
23
|
+
export { PlinthMenuSheet, type PlinthMenuSheetProps } from './PlinthMenuSheet';
|
|
24
|
+
export { PlinthPageHeader, type PlinthPageHeaderProps } from './PlinthPageHeader';
|
|
25
|
+
export { PlinthPill, type PlinthPillProps } from './PlinthPill';
|
|
26
|
+
export { PlinthPillRow, type PlinthPillRowProps } from './PlinthPillRow';
|
|
27
|
+
export { PlinthSectionMenu, type PlinthSectionMenuProps } from './PlinthSectionMenu';
|
|
28
|
+
export { PlinthSectionMenuItem, type PlinthSectionMenuItemProps } from './PlinthSectionMenuItem';
|
|
29
|
+
export { PlinthSheet, type PlinthSheetProps } from './PlinthSheet';
|
|
30
|
+
export { PlinthTextarea, type PlinthTextareaProps } from './PlinthTextarea';
|
|
31
|
+
export { PlinthTextField, type PlinthTextFieldProps } from './PlinthTextField';
|
|
32
|
+
export { avatarGlyph, avatarSizes, initialsFrom, type AvatarSize } from './avatar';
|
|
33
|
+
export { buttonVariants, type ButtonVariant, type InvokerCommand, type InvokerCommandProps, } from './button';
|
|
34
|
+
export { calloutIcons, calloutRole, calloutRoles, calloutTone, calloutTones, type CalloutRole, type CalloutTone, } from './callout';
|
|
35
|
+
export { type CodeBlockTab } from './code-block';
|
|
36
|
+
export { confirmDialogFieldLabels, confirmDialogKind, confirmDialogKinds, confirmDialogPattern, confirmDialogTone, confirmDialogTones, type ConfirmDialogKind, type ConfirmDialogTone, } from './confirm-dialog';
|
|
37
|
+
export { dataTableCellKind, dataTableCellKinds, dataTableSort, dataTableSortIcon, dataTableSorts, type DataTableCellKind, type DataTableSort, } from './data-table';
|
|
38
|
+
export { dialogCloseIcon, dialogSidePhone, dialogSidePhones, type DialogSidePhone } from './dialog';
|
|
39
|
+
export { headingLevel, headingLevels, type HeadingLevel } from './heading';
|
|
40
|
+
export { controlSizes, iconSizeFor, resolveSize, sizes, type ControlSize, type Size } from './size';
|
|
41
|
+
export { iconSizes, type IconSize } from './icon';
|
|
42
|
+
export { listRowChevron } from './list-row';
|
|
43
|
+
export { MenuIdContext, menuItemTone, menuItemTones, type MenuItemTone } from './menu';
|
|
44
|
+
export { pageHeaderLevel, pageHeaderLevels, type PageHeaderLevel } from './page-header';
|
|
45
|
+
export { drawerCloseIcon, drawerDesktop, drawerDesktops, drawerSnap, drawerSnapPoints, drawerSnaps, type DrawerDesktop, type DrawerSnap, } from './drawer';
|
|
46
|
+
export { swipeToClose, useSwipeToClose } from './swipe';
|
|
47
|
+
export { fieldDescribedBy, textFieldSize, textFieldSizes, type TextFieldSize } from './text-field';
|
|
48
|
+
export { sheetCloseIcon, sheetSide, sheetSidePhone, sheetSides, type SheetSide } from './sheet';
|
|
49
|
+
export { tones, type Tone } from './tones';
|