@flipdish/ui-library 0.40.0 → 0.41.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 (42) hide show
  1. package/dist/components/atoms/FlipdishLogo/FlipdishLogo.styles.cjs +44 -0
  2. package/dist/components/atoms/FlipdishLogo/FlipdishLogo.styles.cjs.map +1 -0
  3. package/dist/components/atoms/FlipdishLogo/FlipdishLogo.styles.d.ts +71 -0
  4. package/dist/components/atoms/FlipdishLogo/FlipdishLogo.styles.d.ts.map +1 -0
  5. package/dist/components/atoms/FlipdishLogo/FlipdishLogo.styles.js +42 -0
  6. package/dist/components/atoms/FlipdishLogo/FlipdishLogo.styles.js.map +1 -0
  7. package/dist/components/atoms/FlipdishLogo/index.cjs +3 -24
  8. package/dist/components/atoms/FlipdishLogo/index.cjs.map +1 -1
  9. package/dist/components/atoms/FlipdishLogo/index.d.ts +5 -37
  10. package/dist/components/atoms/FlipdishLogo/index.d.ts.map +1 -1
  11. package/dist/components/atoms/FlipdishLogo/index.js +3 -24
  12. package/dist/components/atoms/FlipdishLogo/index.js.map +1 -1
  13. package/dist/components/organisms/CommandMenu/commandMenu.utils.cjs +54 -0
  14. package/dist/components/organisms/CommandMenu/commandMenu.utils.cjs.map +1 -1
  15. package/dist/components/organisms/CommandMenu/commandMenu.utils.d.ts +62 -0
  16. package/dist/components/organisms/CommandMenu/commandMenu.utils.d.ts.map +1 -1
  17. package/dist/components/organisms/CommandMenu/commandMenu.utils.js +53 -1
  18. package/dist/components/organisms/CommandMenu/commandMenu.utils.js.map +1 -1
  19. package/dist/components/organisms/CommandMenu/hooks/useCommandItemHotkeys.cjs +43 -0
  20. package/dist/components/organisms/CommandMenu/hooks/useCommandItemHotkeys.cjs.map +1 -0
  21. package/dist/components/organisms/CommandMenu/hooks/useCommandItemHotkeys.d.ts +19 -0
  22. package/dist/components/organisms/CommandMenu/hooks/useCommandItemHotkeys.d.ts.map +1 -0
  23. package/dist/components/organisms/CommandMenu/hooks/useCommandItemHotkeys.js +41 -0
  24. package/dist/components/organisms/CommandMenu/hooks/useCommandItemHotkeys.js.map +1 -0
  25. package/dist/components/organisms/CommandMenu/index.cjs +2 -47
  26. package/dist/components/organisms/CommandMenu/index.cjs.map +1 -1
  27. package/dist/components/organisms/CommandMenu/index.d.ts.map +1 -1
  28. package/dist/components/organisms/CommandMenu/index.js +4 -49
  29. package/dist/components/organisms/CommandMenu/index.js.map +1 -1
  30. package/dist/native/components/atoms/FlipdishLogo/FlipdishLogo.styles.d.ts +71 -0
  31. package/dist/native/components/atoms/FlipdishLogo/FlipdishLogo.styles.d.ts.map +1 -0
  32. package/dist/native/components/atoms/FlipdishLogo/FlipdishLogo.styles.js +42 -0
  33. package/dist/native/components/atoms/FlipdishLogo/FlipdishLogo.styles.js.map +1 -0
  34. package/dist/native/components/atoms/FlipdishLogo/flipdish-logo.paths.d.ts +7 -0
  35. package/dist/native/components/atoms/FlipdishLogo/flipdish-logo.paths.d.ts.map +1 -0
  36. package/dist/native/components/atoms/FlipdishLogo/flipdish-logo.paths.js +49 -0
  37. package/dist/native/components/atoms/FlipdishLogo/flipdish-logo.paths.js.map +1 -0
  38. package/dist/native/components/atoms/FlipdishLogo/index.d.ts +49 -9
  39. package/dist/native/components/atoms/FlipdishLogo/index.d.ts.map +1 -0
  40. package/dist/native/components/atoms/FlipdishLogo/index.js +25 -0
  41. package/dist/native/components/atoms/FlipdishLogo/index.js.map +1 -0
  42. package/package.json +6 -1
@@ -1,12 +1,52 @@
1
+ import { type FlipdishLogoSize, type FlipdishLogoTone, type FlipdishLogoVariant } from './FlipdishLogo.styles';
2
+ export type { FlipdishLogoSize, FlipdishLogoTone, FlipdishLogoVariant } from './FlipdishLogo.styles';
1
3
  /**
2
- * `FlipdishLogo` has no React Native implementation.
3
- *
4
- * This is a generated types-only stub (scripts/emit-native-stubs.mjs). It exists so
5
- * that importing `@flipdish/ui-library/components/atoms/FlipdishLogo` from React Native fails at
6
- * compile time rather than resolving to the web build's types. There is no
7
- * matching `index.js`, so Metro cannot bundle this module either.
4
+ * Declared standalone rather than extending `SvgProps`. `react-docgen` follows an
5
+ * `extends` clause into `react-native` / `react-native-svg`, which ship untranspiled
6
+ * source that Babel fails to parse — breaking `storybook dev` for the whole package.
7
+ */
8
+ export interface FlipdishLogoProps {
9
+ /**
10
+ * Which lockup to render.
11
+ * - `full` — the swift icon mark + `flipdish` wordmark (default).
12
+ * - `poweredBy` — the "powered by Flipdish" attribution lockup.
13
+ * - `icon` — the icon mark (swift) only, for tight or square surfaces.
14
+ * @default 'full'
15
+ */
16
+ variant?: FlipdishLogoVariant;
17
+ /**
18
+ * Preset height: `sm` 24px, `md` 32px, `lg` 48px. Width is derived from the lockup's
19
+ * viewBox aspect ratio — there is no `className` height override on native.
20
+ * @default 'md'
21
+ */
22
+ size?: FlipdishLogoSize;
23
+ /**
24
+ * Logo colour. Mapped to a light-mode hex fill (`FlipdishLogo.styles.ts`) because
25
+ * `react-native-svg` has no `currentColor` cascade. `default` is a static approximation
26
+ * of `fg-primary` and does not flip in dark mode — use `white` or `black` when the
27
+ * surface needs a fixed colour.
28
+ * @default 'default'
29
+ */
30
+ tone?: FlipdishLogoTone;
31
+ /**
32
+ * When `false`, the logo is decorative (parent supplies the accessible name), matching
33
+ * web call sites that pass `aria-hidden`. Defaults to `true` with `accessibilityLabel`
34
+ * set from the lockup.
35
+ * @default true
36
+ */
37
+ accessible?: boolean;
38
+ /** Overrides the lockup's default accessibility label when `accessible` is true. */
39
+ accessibilityLabel?: string;
40
+ /** Overrides the generated `testID` (defaults to `fd-flipdish-logo`). */
41
+ 'data-testid'?: string;
42
+ }
43
+ /**
44
+ * React Native `FlipdishLogo` — same path data and lockups as web, drawn with
45
+ * `react-native-svg`. Colour goes through `tone` (hex fills); size through `size`
46
+ * (pixel height), while there is no `className`: recolour and one-off heights that web does
47
+ * via `text-*` / `h-*` utilities are unsupported here.
8
48
  *
9
- * To make `FlipdishLogo` available on React Native, add an `index.native.tsx` beside
10
- * its `index.tsx` — the build picks it up automatically and this stub disappears.
49
+ * @summary official Flipdish icon mark and wordmark (React Native)
11
50
  */
12
- export declare const __NO_REACT_NATIVE_IMPLEMENTATION__: never;
51
+ export declare const FlipdishLogo: ({ variant, size, tone, accessible, accessibilityLabel, "data-testid": dataTestId, }: FlipdishLogoProps) => import("react").JSX.Element;
52
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/atoms/FlipdishLogo/index.native.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,gBAAgB,EAAE,KAAK,mBAAmB,EAAU,MAAM,uBAAuB,CAAC;AAEvH,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAErG;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAC9B;;;;OAIG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,oFAAoF;IACpF,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,yEAAyE;IACzE,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,GAAI,qFAO1B,iBAAiB,gCAyBnB,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { useResolvedTestId } from '../../../utilities/testIdUtils/index.js';
3
+ import Svg, { Path } from 'react-native-svg';
4
+ import { styles } from './FlipdishLogo.styles.js';
5
+
6
+ /**
7
+ * React Native `FlipdishLogo` — same path data and lockups as web, drawn with
8
+ * `react-native-svg`. Colour goes through `tone` (hex fills); size through `size`
9
+ * (pixel height), while there is no `className`: recolour and one-off heights that web does
10
+ * via `text-*` / `h-*` utilities are unsupported here.
11
+ *
12
+ * @summary official Flipdish icon mark and wordmark (React Native)
13
+ */
14
+ const FlipdishLogo = ({ variant = 'full', size = 'md', tone = 'default', accessible = true, accessibilityLabel, 'data-testid': dataTestId, }) => {
15
+ const { paths, viewBox, label } = styles.lockups[variant];
16
+ const flipdishLogoTestId = useResolvedTestId({ testId: dataTestId, segment: 'flipdish-logo', rootName: 'flipdish-logo' });
17
+ const height = styles.sizes[size].height;
18
+ const [, , vbW, vbH] = viewBox.split(' ').map(Number);
19
+ const width = (height * vbW) / vbH;
20
+ const fill = styles.tones[tone].native;
21
+ return (jsx(Svg, { width: width, height: height, viewBox: viewBox, fill: "none", pointerEvents: "none", accessible: accessible, accessibilityRole: accessible ? 'image' : undefined, accessibilityLabel: accessible ? (accessibilityLabel ?? label) : undefined, testID: flipdishLogoTestId, children: paths.map((d) => (jsx(Path, { d: d, fill: fill }, d))) }));
22
+ };
23
+
24
+ export { FlipdishLogo };
25
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../../../src/components/atoms/FlipdishLogo/index.native.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;;;AA+CA;;;;;;;AAOG;AACI,MAAM,YAAY,GAAG,CAAC,EAC3B,OAAO,GAAG,MAAM,EAChB,IAAI,GAAG,IAAI,EACX,IAAI,GAAG,SAAS,EAChB,UAAU,GAAG,IAAI,EACjB,kBAAkB,EAClB,aAAa,EAAE,UAAU,GACP,KAAI;AACtB,IAAA,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC;AACzD,IAAA,MAAM,kBAAkB,GAAG,iBAAiB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,eAAe,EAAE,CAAC;IACzH,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM;IACxC,MAAM,KAAK,GAAG,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC;IACrD,MAAM,KAAK,GAAG,CAAC,MAAM,GAAG,GAAG,IAAI,GAAG;IAClC,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM;AAEtC,IAAA,QACEA,GAAA,CAAC,GAAG,IACF,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,EAChB,IAAI,EAAC,MAAM,EACX,aAAa,EAAC,MAAM,EACpB,UAAU,EAAE,UAAU,EACtB,iBAAiB,EAAE,UAAU,GAAG,OAAO,GAAG,SAAS,EACnD,kBAAkB,EAAE,UAAU,IAAI,kBAAkB,IAAI,KAAK,IAAI,SAAS,EAC1E,MAAM,EAAE,kBAAkB,EAAA,QAAA,EAEzB,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,MACXA,GAAA,CAAC,IAAI,EAAA,EAAS,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,IAAnB,CAAC,CAAsB,CACnC,CAAC,EAAA,CACE;AAEV;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flipdish/ui-library",
3
- "version": "0.40.0",
3
+ "version": "0.41.0",
4
4
  "description": "Flipdish Design System — atomic-design component library (Tailwind v4 + UntitledUI + React Aria).",
5
5
  "type": "module",
6
6
  "imports": {
@@ -130,6 +130,7 @@
130
130
  "react-hotkeys-hook": "^5.3.2",
131
131
  "react-native": ">=0.81.0",
132
132
  "react-native-css": "^3.1.0-rc.0",
133
+ "react-native-svg": ">=15.0.0",
133
134
  "react-router": "^7.0.0",
134
135
  "recharts": "^3.8.1",
135
136
  "shiki": "^4.2.0",
@@ -211,6 +212,9 @@
211
212
  "react-native-css": {
212
213
  "optional": true
213
214
  },
215
+ "react-native-svg": {
216
+ "optional": true
217
+ },
214
218
  "react-router": {
215
219
  "optional": true
216
220
  },
@@ -261,6 +265,7 @@
261
265
  "react-dom": "^19.0.0",
262
266
  "react-hotkeys-hook": "^5.3.2",
263
267
  "react-native-css": "^3.1.0-rc.0",
268
+ "react-native-svg": "^15.0.0",
264
269
  "react-router": "^7.17.0",
265
270
  "recharts": "^3.8.1",
266
271
  "remark-gfm": "^4.0.1",