@brett_lamy/ui 0.0.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.
Files changed (92) hide show
  1. package/README.md +72 -0
  2. package/dist/components/avatar.d.ts +13 -0
  3. package/dist/components/avatar.d.ts.map +1 -0
  4. package/dist/components/avatar.stories.d.ts +9 -0
  5. package/dist/components/avatar.stories.d.ts.map +1 -0
  6. package/dist/components/credenza.d.ts +16 -0
  7. package/dist/components/credenza.d.ts.map +1 -0
  8. package/dist/components/credenza.stories.d.ts +8 -0
  9. package/dist/components/credenza.stories.d.ts.map +1 -0
  10. package/dist/components/edit-bar.d.ts +11 -0
  11. package/dist/components/edit-bar.d.ts.map +1 -0
  12. package/dist/components/edit-bar.stories.d.ts +10 -0
  13. package/dist/components/edit-bar.stories.d.ts.map +1 -0
  14. package/dist/components/haptic-indicator.d.ts +9 -0
  15. package/dist/components/haptic-indicator.d.ts.map +1 -0
  16. package/dist/components/haptic-indicator.stories.d.ts +8 -0
  17. package/dist/components/haptic-indicator.stories.d.ts.map +1 -0
  18. package/dist/components/index-bar.d.ts +24 -0
  19. package/dist/components/index-bar.d.ts.map +1 -0
  20. package/dist/components/index-bar.stories.d.ts +8 -0
  21. package/dist/components/index-bar.stories.d.ts.map +1 -0
  22. package/dist/components/list-row.stories.d.ts +12 -0
  23. package/dist/components/list-row.stories.d.ts.map +1 -0
  24. package/dist/components/list.d.ts +50 -0
  25. package/dist/components/list.d.ts.map +1 -0
  26. package/dist/components/list.stories.d.ts +23 -0
  27. package/dist/components/list.stories.d.ts.map +1 -0
  28. package/dist/components/measure-h.d.ts +7 -0
  29. package/dist/components/measure-h.d.ts.map +1 -0
  30. package/dist/components/navigation-stack.d.ts +52 -0
  31. package/dist/components/navigation-stack.d.ts.map +1 -0
  32. package/dist/components/navigation-stack.stories.d.ts +20 -0
  33. package/dist/components/navigation-stack.stories.d.ts.map +1 -0
  34. package/dist/components/pill-button.d.ts +11 -0
  35. package/dist/components/pill-button.d.ts.map +1 -0
  36. package/dist/components/pill-button.stories.d.ts +9 -0
  37. package/dist/components/pill-button.stories.d.ts.map +1 -0
  38. package/dist/components/qr-svg.d.ts +10 -0
  39. package/dist/components/qr-svg.d.ts.map +1 -0
  40. package/dist/components/qr-svg.stories.d.ts +9 -0
  41. package/dist/components/qr-svg.stories.d.ts.map +1 -0
  42. package/dist/components/search-field.d.ts +11 -0
  43. package/dist/components/search-field.d.ts.map +1 -0
  44. package/dist/components/search-field.stories.d.ts +8 -0
  45. package/dist/components/search-field.stories.d.ts.map +1 -0
  46. package/dist/components/segmented.d.ts +16 -0
  47. package/dist/components/segmented.d.ts.map +1 -0
  48. package/dist/components/segmented.stories.d.ts +8 -0
  49. package/dist/components/segmented.stories.d.ts.map +1 -0
  50. package/dist/components/side-drawer.d.ts +13 -0
  51. package/dist/components/side-drawer.d.ts.map +1 -0
  52. package/dist/components/side-drawer.stories.d.ts +8 -0
  53. package/dist/components/side-drawer.stories.d.ts.map +1 -0
  54. package/dist/components/spinner.d.ts +9 -0
  55. package/dist/components/spinner.d.ts.map +1 -0
  56. package/dist/components/spinner.stories.d.ts +9 -0
  57. package/dist/components/spinner.stories.d.ts.map +1 -0
  58. package/dist/components/split-view.d.ts +14 -0
  59. package/dist/components/split-view.d.ts.map +1 -0
  60. package/dist/components/split-view.stories.d.ts +8 -0
  61. package/dist/components/split-view.stories.d.ts.map +1 -0
  62. package/dist/components/switch.d.ts +11 -0
  63. package/dist/components/switch.d.ts.map +1 -0
  64. package/dist/components/switch.stories.d.ts +9 -0
  65. package/dist/components/switch.stories.d.ts.map +1 -0
  66. package/dist/components/tab-bar.d.ts +16 -0
  67. package/dist/components/tab-bar.d.ts.map +1 -0
  68. package/dist/components/tab-bar.stories.d.ts +8 -0
  69. package/dist/components/tab-bar.stories.d.ts.map +1 -0
  70. package/dist/demos/haptics-playground.d.ts +15 -0
  71. package/dist/demos/haptics-playground.d.ts.map +1 -0
  72. package/dist/demos/haptics-playground.stories.d.ts +8 -0
  73. package/dist/demos/haptics-playground.stories.d.ts.map +1 -0
  74. package/dist/index.css +2 -0
  75. package/dist/index.d.ts +42 -0
  76. package/dist/index.d.ts.map +1 -0
  77. package/dist/index.js +15467 -0
  78. package/dist/lib/haptics.d.ts +27 -0
  79. package/dist/lib/haptics.d.ts.map +1 -0
  80. package/dist/lib/icon.d.ts +20 -0
  81. package/dist/lib/icon.d.ts.map +1 -0
  82. package/dist/lib/icon.stories.d.ts +8 -0
  83. package/dist/lib/icon.stories.d.ts.map +1 -0
  84. package/dist/lib/motion.d.ts +4 -0
  85. package/dist/lib/motion.d.ts.map +1 -0
  86. package/dist/lib/theme.d.ts +21 -0
  87. package/dist/lib/theme.d.ts.map +1 -0
  88. package/dist/lib/utils.d.ts +6 -0
  89. package/dist/lib/utils.d.ts.map +1 -0
  90. package/dist/stories/frame.d.ts +16 -0
  91. package/dist/stories/frame.d.ts.map +1 -0
  92. package/package.json +49 -0
@@ -0,0 +1,27 @@
1
+ export interface HapticEvent {
2
+ kind: 'impact' | 'selection' | 'notification';
3
+ label: string;
4
+ w: number;
5
+ t?: number;
6
+ n?: number;
7
+ }
8
+ export type HapticImpactStyle = 'light' | 'medium' | 'heavy';
9
+ export type HapticNotificationKind = 'success' | 'warning' | 'error';
10
+ export declare const PAT: Record<string, number[]>;
11
+ export declare const Haptics: {
12
+ enabled: boolean;
13
+ _subs: Set<(m: HapticEvent) => void>;
14
+ _sw: HTMLLabelElement | null;
15
+ _booted: boolean;
16
+ engine: string;
17
+ info: Record<string, unknown>;
18
+ boot(): void;
19
+ _mkSw(): HTMLLabelElement;
20
+ _run(p: number[], meta: HapticEvent): void;
21
+ impact(s?: HapticImpactStyle): void;
22
+ _eager: unknown;
23
+ selection(): void;
24
+ notification(k?: HapticNotificationKind): void;
25
+ on(f: (m: HapticEvent) => void): () => void;
26
+ };
27
+ //# sourceMappingURL=haptics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"haptics.d.ts","sourceRoot":"","sources":["../../src/lib/haptics.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,QAAQ,GAAG,WAAW,GAAG,cAAc,CAAC;IAC9C,KAAK,EAAE,MAAM,CAAC;IACd,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAC7D,MAAM,MAAM,sBAAsB,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AAErE,eAAO,MAAM,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAGxC,CAAC;AAEF,eAAO,MAAM,OAAO;;mBAEC,WAAW,KAAK,IAAI;SAC1B,gBAAgB,GAAG,IAAI;;;UAGxB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;aA0B1B,gBAAgB;YAQjB,MAAM,EAAE,QAAQ,WAAW;eAWxB,iBAAiB;YAIZ,OAAO;;qBAEN,sBAAsB;UAIjC,CAAC,CAAC,EAAE,WAAW,KAAK,IAAI;CAC/B,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { CSSProperties } from 'react';
2
+ type IconShape = {
3
+ d?: string;
4
+ c?: number[];
5
+ f?: number;
6
+ bg?: number;
7
+ rx?: number;
8
+ };
9
+ export declare const IC: Record<string, IconShape[]>;
10
+ export type IconName = keyof typeof IC;
11
+ export interface IconProps {
12
+ name: IconName | (string & {});
13
+ size?: number;
14
+ sw?: number;
15
+ className?: string;
16
+ style?: CSSProperties;
17
+ }
18
+ export declare function Icon({ name, size, sw, className, style }: IconProps): import("react/jsx-runtime").JSX.Element;
19
+ export {};
20
+ //# sourceMappingURL=icon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../src/lib/icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAG3C,KAAK,SAAS,GAAG;IAAE,CAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC;IAAC,CAAC,CAAC,EAAE,MAAM,CAAC;IAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IAAC,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAGpF,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,EAAE,CA0B1C,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,EAAE,CAAC;AAEvC,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,QAAQ,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAED,wBAAgB,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,SAAS,2CAWnE"}
@@ -0,0 +1,8 @@
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { Icon } from './icon';
3
+ declare const meta: Meta<typeof Icon>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Icon>;
6
+ export declare const Gallery: Story;
7
+ export declare const Sizes: Story;
8
+ //# sourceMappingURL=icon.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon.stories.d.ts","sourceRoot":"","sources":["../../src/lib/icon.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAM,IAAI,EAAE,MAAM,QAAQ,CAAC;AAGlC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,IAAI,CAI3B,CAAC;AACF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAWrB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAMnB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import * as Motion from 'framer-motion';
2
+ export declare function loadMotion(): void;
3
+ export declare function useMotion(): typeof Motion;
4
+ //# sourceMappingURL=motion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"motion.d.ts","sourceRoot":"","sources":["../../src/lib/motion.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,wBAAgB,UAAU,SAAyD;AAEnF,wBAAgB,SAAS,IAAI,OAAO,MAAM,CAEzC"}
@@ -0,0 +1,21 @@
1
+ import { CSSProperties, ReactNode } from 'react';
2
+ export declare const chromeStore: {
3
+ hidden: boolean;
4
+ subs: Set<(v: boolean) => void>;
5
+ set(v: boolean): void;
6
+ };
7
+ export declare function useChromeHidden(): boolean;
8
+ export declare const TKSafeCtx: import('react').Context<number>;
9
+ export declare const TKStickyCtx: import('react').Context<number>;
10
+ export declare const chromeOffset: (top: number, hidden: boolean) => number;
11
+ export interface TouchKitProviderProps {
12
+ dark?: boolean;
13
+ tint?: string;
14
+ /** Dynamic Island floor. `true` → 59px, a number → that many px. */
15
+ safeTop?: boolean | number;
16
+ children?: ReactNode;
17
+ className?: string;
18
+ style?: CSSProperties;
19
+ }
20
+ export declare function TouchKitProvider({ dark, tint, safeTop, children, className, style }: TouchKitProviderProps): import("react/jsx-runtime").JSX.Element;
21
+ //# sourceMappingURL=theme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/lib/theme.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsC,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAM/F,eAAO,MAAM,WAAW;;kBAEJ,OAAO,KAAK,IAAI;WAC3B,OAAO;CACf,CAAC;AAEF,wBAAgB,eAAe,YAQ9B;AAID,eAAO,MAAM,SAAS,iCAAmB,CAAC;AAK1C,eAAO,MAAM,WAAW,iCAAmB,CAAC;AAC5C,eAAO,MAAM,YAAY,GAAI,KAAK,MAAM,EAAE,QAAQ,OAAO,WAA6C,CAAC;AAiBvG,MAAM,WAAW,qBAAqB;IACpC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oEAAoE;IACpE,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC3B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAED,wBAAgB,gBAAgB,CAAC,EAAE,IAAI,EAAE,IAAgB,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,qBAAqB,2CA0BtH"}
@@ -0,0 +1,6 @@
1
+ import { ClassValue } from 'clsx';
2
+ export declare function cn(...inputs: ClassValue[]): string;
3
+ export declare const FONT = "-apple-system,BlinkMacSystemFont,'SF Pro Text','Segoe UI',Roboto,'Helvetica Neue',sans-serif";
4
+ export declare const EASE = "cubic-bezier(.32,.72,0,1)";
5
+ export declare const BARH = 52;
6
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,MAAM,CAAC;AAG7C,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC;AAED,eAAO,MAAM,IAAI,iGAC+E,CAAC;AACjG,eAAO,MAAM,IAAI,8BAA8B,CAAC;AAChD,eAAO,MAAM,IAAI,KAAK,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { ReactNode } from 'react';
2
+ export declare function Phone({ children, w, h, dark, tint, safeTop }: {
3
+ children?: ReactNode;
4
+ w?: number;
5
+ h?: number;
6
+ dark?: boolean;
7
+ tint?: string;
8
+ safeTop?: boolean | number;
9
+ }): import("react/jsx-runtime").JSX.Element;
10
+ export declare function Pad({ children, w, dark, tint }: {
11
+ children?: ReactNode;
12
+ w?: number;
13
+ dark?: boolean;
14
+ tint?: string;
15
+ }): import("react/jsx-runtime").JSX.Element;
16
+ //# sourceMappingURL=frame.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"frame.d.ts","sourceRoot":"","sources":["../../src/stories/frame.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAYvC,wBAAgB,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAO,EAAE,CAAO,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;IACzE,QAAQ,CAAC,EAAE,SAAS,CAAC;IAAC,CAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;CACzG,2CAMA;AAED,wBAAgB,GAAG,CAAC,EAAE,QAAQ,EAAE,CAAO,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;IAAE,QAAQ,CAAC,EAAE,SAAS,CAAC;IAAC,CAAC,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,2CAQzH"}
package/package.json ADDED
@@ -0,0 +1,49 @@
1
+ {
2
+ "name": "@brett_lamy/ui",
3
+ "version": "0.0.1",
4
+ "type": "module",
5
+ "main": "./dist/index.js",
6
+ "module": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ "./package.json": "./package.json",
10
+ ".": {
11
+ "@org/source": "./src/index.ts",
12
+ "types": "./dist/index.d.ts",
13
+ "import": "./dist/index.js",
14
+ "default": "./dist/index.js"
15
+ },
16
+ "./styles.css": "./dist/index.css"
17
+ },
18
+ "dependencies": {
19
+ "react-aria-components": "^1",
20
+ "framer-motion": "^12 || ^13",
21
+ "clsx": "^2",
22
+ "tailwind-merge": "^3",
23
+ "class-variance-authority": "^0.7"
24
+ },
25
+ "peerDependencies": {
26
+ "react": "^18 || ^19",
27
+ "react-dom": "^18 || ^19"
28
+ },
29
+ "description": "iOS-flavored React core — containers, lists, haptics, tokens (react-aria base, shadcn conventions)",
30
+ "license": "MIT",
31
+ "sideEffects": [
32
+ "*.css"
33
+ ],
34
+ "files": [
35
+ "dist",
36
+ "README.md"
37
+ ],
38
+ "publishConfig": {
39
+ "access": "public"
40
+ },
41
+ "keywords": [
42
+ "react",
43
+ "touchkit",
44
+ "ios",
45
+ "react-aria",
46
+ "shadcn",
47
+ "components"
48
+ ]
49
+ }