@ptbdynamic/plinth 0.1.1 → 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.
Files changed (39) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/packages/css/dist/menu.css +245 -0
  4. package/packages/css/dist/page-header.css +124 -0
  5. package/packages/css/dist/plinth.css +833 -160
  6. package/packages/css/dist/section-menu.css +6 -5
  7. package/packages/css/dist/text-field.css +230 -0
  8. package/packages/css/dist/textarea.css +169 -0
  9. package/packages/css/dist/tokens.css +9 -1
  10. package/packages/react/dist/PlinthMenu.d.ts +12 -0
  11. package/packages/react/dist/PlinthMenuGroup.d.ts +9 -0
  12. package/packages/react/dist/PlinthMenuItem.d.ts +26 -0
  13. package/packages/react/dist/PlinthMenuSeparator.d.ts +4 -0
  14. package/packages/react/dist/PlinthPageHeader.d.ts +17 -0
  15. package/packages/react/dist/PlinthTextField.d.ts +24 -0
  16. package/packages/react/dist/PlinthTextarea.d.ts +24 -0
  17. package/packages/react/dist/index.d.ts +10 -1
  18. package/packages/react/dist/index.js +565 -366
  19. package/packages/react/dist/menu.d.ts +7 -0
  20. package/packages/react/dist/page-header.d.ts +5 -0
  21. package/packages/react/dist/text-field.d.ts +10 -0
  22. package/packages/tokens/dist/index.d.ts +13 -1
  23. package/packages/tokens/dist/index.js +131 -6
  24. package/packages/tokens/dist/tailwind-theme.css +2 -2
  25. package/packages/tokens/dist/tokens.css +9 -1
  26. package/packages/tokens/dist/tokens.json +116 -3
  27. package/packages/vue/dist/PlinthMenu.vue.d.ts +24 -0
  28. package/packages/vue/dist/{PlinthHeader.vue.d.ts → PlinthMenuGroup.vue.d.ts} +5 -7
  29. package/packages/vue/dist/PlinthMenuItem.vue.d.ts +34 -0
  30. package/packages/vue/dist/PlinthMenuSeparator.vue.d.ts +3 -0
  31. package/packages/vue/dist/PlinthPageHeader.vue.d.ts +27 -0
  32. package/packages/vue/dist/PlinthTextField.vue.d.ts +51 -0
  33. package/packages/vue/dist/PlinthTextarea.vue.d.ts +42 -0
  34. package/packages/vue/dist/index.d.ts +11 -2
  35. package/packages/vue/dist/index.js +661 -368
  36. package/packages/vue/dist/menu.d.ts +8 -0
  37. package/packages/vue/dist/page-header.d.ts +5 -0
  38. package/packages/vue/dist/text-field.d.ts +10 -0
  39. package/packages/react/dist/PlinthHeader.d.ts +0 -12
@@ -0,0 +1,8 @@
1
+ import type { InjectionKey, Ref } from 'vue';
2
+ /** A menu item's tone: `neutral` (the default) or `danger`, for an item that destroys or removes. */
3
+ export declare const menuItemTones: readonly ["neutral", "danger"];
4
+ export type MenuItemTone = (typeof menuItemTones)[number];
5
+ /** A tone from the list, or `neutral` when it is not one of them. */
6
+ export declare function menuItemTone(value: string | undefined): MenuItemTone;
7
+ /** The id of the menu around an item, which a button item closes when it is pressed. */
8
+ export declare const menuIdKey: InjectionKey<Ref<string>>;
@@ -0,0 +1,5 @@
1
+ /** The levels the page header's heading can take. `h1` is the default. */
2
+ export declare const pageHeaderLevels: readonly ["h1", "h2", "h3", "h4", "h5", "h6"];
3
+ export type PageHeaderLevel = (typeof pageHeaderLevels)[number];
4
+ /** A level from the list, or `h1` when it is not one of them. */
5
+ export declare function pageHeaderLevel(value: string | undefined): PageHeaderLevel;
@@ -0,0 +1,10 @@
1
+ /** The text field sizes (28 and 32 px), from the shared size scale. `md` is the default. */
2
+ export declare const textFieldSizes: readonly ["sm", "md"];
3
+ export type TextFieldSize = (typeof textFieldSizes)[number];
4
+ /** A size from the list, or `md` when it is not one of them. */
5
+ export declare function textFieldSize(value: string | undefined): TextFieldSize;
6
+ /**
7
+ * What a field's aria-describedby lists: its description's id, then its error's, or nothing when
8
+ * it has neither (text-field.css, textarea.css).
9
+ */
10
+ export declare function fieldDescribedBy(id: string, description: string | undefined, error: string | undefined): string | undefined;
@@ -1,12 +0,0 @@
1
- import type { ComponentProps, ReactNode } from 'react';
2
- interface HeaderOptions {
3
- /** The page's title, an <h1>. */
4
- title: string;
5
- /** The leading action, usually a back link or a menu button (Vue's `leading` slot). */
6
- leading?: ReactNode;
7
- /** The trailing actions, usually icon buttons (Vue's `actions` slot). */
8
- actions?: ReactNode;
9
- }
10
- export type PlinthHeaderProps = HeaderOptions & Omit<ComponentProps<'header'>, keyof HeaderOptions | 'children'>;
11
- export declare function PlinthHeader({ title, leading, actions, className, ...rest }: PlinthHeaderProps): import("react").JSX.Element;
12
- export {};