anvilui 0.0.0-stage → 0.1.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 (58) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +61 -2
  3. package/dist/colors/colors.d.ts +16 -0
  4. package/dist/components/AnvilRoot/AnvilContext.d.ts +14 -0
  5. package/dist/components/AnvilRoot/AnvilRoot.d.ts +18 -0
  6. package/dist/components/AppBar/AppBar.d.ts +34 -0
  7. package/dist/components/Avatar/Avatar.d.ts +23 -0
  8. package/dist/components/Badge/Badge.d.ts +19 -0
  9. package/dist/components/BottomSheet/BottomSheet.d.ts +19 -0
  10. package/dist/components/Button/Button.d.ts +18 -0
  11. package/dist/components/Card/Card.d.ts +21 -0
  12. package/dist/components/Checkbox/Checkbox.d.ts +4 -0
  13. package/dist/components/Chip/Chip.d.ts +23 -0
  14. package/dist/components/Dialog/Dialog.d.ts +24 -0
  15. package/dist/components/Divider/Divider.d.ts +16 -0
  16. package/dist/components/FAB/FAB.d.ts +24 -0
  17. package/dist/components/Field/Field.d.ts +16 -0
  18. package/dist/components/FloatingToolbar/FloatingToolbar.d.ts +22 -0
  19. package/dist/components/HoldButton/HoldButton.d.ts +15 -0
  20. package/dist/components/Icon/Icon.d.ts +7 -0
  21. package/dist/components/IconButton/IconButton.d.ts +11 -0
  22. package/dist/components/Input/Input.d.ts +15 -0
  23. package/dist/components/List/List.d.ts +26 -0
  24. package/dist/components/Menu/Menu.d.ts +22 -0
  25. package/dist/components/NavigationBar/NavigationBar.d.ts +20 -0
  26. package/dist/components/NavigationDrawer/NavigationDrawer.d.ts +30 -0
  27. package/dist/components/NavigationRail/NavigationRail.d.ts +32 -0
  28. package/dist/components/Popover/Popover.d.ts +21 -0
  29. package/dist/components/Progress/Progress.d.ts +22 -0
  30. package/dist/components/RadioGroup/RadioGroup.d.ts +7 -0
  31. package/dist/components/Select/Select.d.ts +25 -0
  32. package/dist/components/Slider/Slider.d.ts +26 -0
  33. package/dist/components/Snackbar/Snackbar.d.ts +30 -0
  34. package/dist/components/SplitButton/SplitButton.d.ts +3 -0
  35. package/dist/components/SquigglyWave/SquigglyWave.d.ts +36 -0
  36. package/dist/components/Switch/Switch.d.ts +4 -0
  37. package/dist/components/Tabs/Tabs.d.ts +15 -0
  38. package/dist/components/Textarea/Textarea.d.ts +16 -0
  39. package/dist/components/ToggleGroup/ToggleGroup.d.ts +38 -0
  40. package/dist/components/Tooltip/Tooltip.d.ts +14 -0
  41. package/dist/components/Typography/Typography.d.ts +10 -0
  42. package/dist/index.cjs +2948 -0
  43. package/dist/index.cjs.map +1 -0
  44. package/dist/index.css +2671 -0
  45. package/dist/index.css.map +1 -0
  46. package/dist/index.d.ts +83 -0
  47. package/dist/index.js +2852 -0
  48. package/dist/index.js.map +1 -0
  49. package/dist/morph.d.ts +64 -0
  50. package/dist/themes/baseTheme.d.ts +3 -0
  51. package/dist/themes/monochromeTheme.d.ts +3 -0
  52. package/dist/themes/toCssVariables.d.ts +2 -0
  53. package/dist/themes/types.d.ts +51 -0
  54. package/dist/tokens/baseTokens.d.ts +2 -0
  55. package/dist/tokens/toCssVariables.d.ts +2 -0
  56. package/dist/tokens/types.d.ts +46 -0
  57. package/dist/utils.d.ts +4 -0
  58. package/package.json +45 -5
@@ -0,0 +1,51 @@
1
+ export type ThemeMode = 'light' | 'dark';
2
+ export type Theme = {
3
+ background: string;
4
+ onBackground: string;
5
+ container: string;
6
+ onContainer: string;
7
+ /**
8
+ * One step from the background toward `container`: navigation, menus,
9
+ * dialogs and sheets. Material 3's "surface container low".
10
+ */
11
+ containerLow: string;
12
+ /** Text and icons on `containerLow`. */
13
+ onContainerLow: string;
14
+ /** @deprecated Renamed to `containerLow`. Still read if that's missing. */
15
+ surfaceVariant?: string;
16
+ /** @deprecated Renamed to `onContainerLow`. Still read if that's missing. */
17
+ onSurfaceVariant?: string;
18
+ outline: string;
19
+ primary: string;
20
+ onPrimary: string;
21
+ primaryContainer: string;
22
+ onPrimaryContainer: string;
23
+ tonal: string;
24
+ onTonal: string;
25
+ tonalContainer: string;
26
+ onTonalContainer: string;
27
+ error: string;
28
+ onError: string;
29
+ errorContainer: string;
30
+ onErrorContainer: string;
31
+ warning: string;
32
+ onWarning: string;
33
+ warningContainer: string;
34
+ onWarningContainer: string;
35
+ success: string;
36
+ onSuccess: string;
37
+ successContainer: string;
38
+ onSuccessContainer: string;
39
+ /**
40
+ * Surfaces that stand out by inverting the page's colors: tooltips,
41
+ * snackbars, the slider's value bubble. Defaults to `onBackground`.
42
+ */
43
+ inverseSurface?: string;
44
+ /** Text on `inverseSurface`. Defaults to `background`. */
45
+ inverseOnSurface?: string;
46
+ /**
47
+ * Accents on `inverseSurface`, like a snackbar's action. Defaults to
48
+ * `primary` mixed toward `background`, which is readable but approximate.
49
+ */
50
+ inversePrimary?: string;
51
+ };
@@ -0,0 +1,2 @@
1
+ import { DesignTokens } from './types';
2
+ export declare const baseDesignTokens: DesignTokens;
@@ -0,0 +1,2 @@
1
+ import { DesignTokens } from './types';
2
+ export declare function tokensToCssVariables(tokens: DesignTokens): Record<string, string>;
@@ -0,0 +1,46 @@
1
+ export type DesignTokens = {
2
+ spacing: number;
3
+ font: Font;
4
+ fontSize: FontSize;
5
+ radius: BorderRadius;
6
+ outlineSize: string;
7
+ ease: Ease;
8
+ easeLength: EaseLength;
9
+ };
10
+ export type Ease = {
11
+ /** Springy, with a slight overshoot: buttons, popups, small things. */
12
+ out: string;
13
+ in: string;
14
+ /** No overshoot: things that slide across or in from the screen edge. */
15
+ smooth: string;
16
+ };
17
+ export type EaseLength = {
18
+ short: string;
19
+ normal: string;
20
+ slow: string;
21
+ };
22
+ export type Font = {
23
+ main: string;
24
+ title: string;
25
+ mono: string;
26
+ };
27
+ export type FontSize = {
28
+ body: string;
29
+ caption: string;
30
+ labelSmall: string;
31
+ label: string;
32
+ labelLarge: string;
33
+ h1: string;
34
+ h2: string;
35
+ h3: string;
36
+ h4: string;
37
+ h5: string;
38
+ h6: string;
39
+ };
40
+ export type BorderRadius = {
41
+ small: string;
42
+ medium: string;
43
+ large: string;
44
+ button: string;
45
+ full: string;
46
+ };
@@ -0,0 +1,4 @@
1
+ import type { Ref, RefCallback } from 'react';
2
+ export declare function cx(...parts: (string | false | null | undefined)[]): string;
3
+ export declare function withClass<State>(base: string, className: string | ((state: State) => string | undefined) | undefined): (state: State) => string;
4
+ export declare function mergeRefs<T>(...refs: (Ref<T> | undefined)[]): RefCallback<T>;
package/package.json CHANGED
@@ -1,6 +1,46 @@
1
1
  {
2
- "name": "anvilui",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
2
+ "name": "anvilui",
3
+ "version": "0.1.0",
4
+ "description": "Anvil UI",
5
+ "author": "itayvak",
6
+ "license": "MIT",
7
+ "type": "module",
8
+ "main": "./dist/index.cjs",
9
+ "module": "./dist/index.js",
10
+ "types": "./dist/index.d.ts",
11
+ "exports": {
12
+ ".": {
13
+ "types": "./dist/index.d.ts",
14
+ "import": "./dist/index.js",
15
+ "require": "./dist/index.cjs"
16
+ },
17
+ "./styles.css": "./dist/index.css"
18
+ },
19
+ "sideEffects": [
20
+ "*.css"
21
+ ],
22
+ "files": [
23
+ "dist"
24
+ ],
25
+ "scripts": {
26
+ "build": "tsup && tsc -p tsconfig.build.json",
27
+ "dev": "tsup --watch",
28
+ "prepublishOnly": "npm run build"
29
+ },
30
+ "dependencies": {
31
+ "@base-ui/react": "^1.8.0",
32
+ "material-symbols": "^0.47.4"
33
+ },
34
+ "peerDependencies": {
35
+ "react": ">=18",
36
+ "react-dom": ">=18"
37
+ },
38
+ "devDependencies": {
39
+ "@types/react": "^19.3.0",
40
+ "@types/react-dom": "^19.3.0",
41
+ "react": "^19.3.0",
42
+ "react-dom": "^19.3.0",
43
+ "tsup": "^8.5.1",
44
+ "typescript": "^7.0.2"
45
+ }
46
+ }