@krizaka/ui 3.76.1 → 3.77.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 (46) hide show
  1. package/dist/blocks.css +14 -0
  2. package/dist/chunk-NM2DEHFZ.js +25 -0
  3. package/dist/chunk-NM2DEHFZ.js.map +1 -0
  4. package/dist/document-viewer.d.ts +23 -6
  5. package/dist/document-viewer.js +21 -5
  6. package/dist/document-viewer.js.map +1 -1
  7. package/dist/filter-bar.d.ts +3 -3
  8. package/dist/map/cards.d.ts +145 -0
  9. package/dist/map/cards.js +74 -0
  10. package/dist/map/cards.js.map +1 -0
  11. package/dist/map/pin.d.ts +57 -0
  12. package/dist/map/pin.js +53 -0
  13. package/dist/map/pin.js.map +1 -0
  14. package/dist/map/sheet.d.ts +80 -0
  15. package/dist/map/sheet.js +61 -0
  16. package/dist/map/sheet.js.map +1 -0
  17. package/dist/map.d.ts +41 -14
  18. package/dist/map.js +85 -112
  19. package/dist/map.js.map +1 -1
  20. package/dist/native/map.d.ts +29 -10
  21. package/dist/native/map.js +81 -107
  22. package/dist/native/map.js.map +1 -1
  23. package/dist/wall.d.ts +10 -5
  24. package/dist/wall.js +10 -4
  25. package/dist/wall.js.map +1 -1
  26. package/package.json +51 -6
  27. package/registry/app-frame.json +1 -1
  28. package/registry/document-viewer.json +9 -8
  29. package/registry/examples/document-viewer/highlights.js +2 -1
  30. package/registry/examples/document-viewer/highlights.tsx +3 -0
  31. package/registry/examples/map/pins.d.ts +4 -0
  32. package/registry/examples/map/pins.js +20 -0
  33. package/registry/examples/map/pins.tsx +27 -0
  34. package/registry/examples/map/place-sheet.d.ts +4 -0
  35. package/registry/examples/map/place-sheet.js +34 -0
  36. package/registry/examples/map/place-sheet.tsx +35 -0
  37. package/registry/examples/wall/tidy.d.ts +4 -0
  38. package/registry/examples/wall/tidy.js +27 -0
  39. package/registry/examples/wall/tidy.tsx +19 -0
  40. package/registry/index.json +9 -9
  41. package/registry/map.json +81 -13
  42. package/registry/nav-bar.json +1 -1
  43. package/registry/rail-nav.json +1 -1
  44. package/registry/shop.json +1 -1
  45. package/registry/site-footer.json +1 -1
  46. package/registry/wall.json +24 -2
@@ -0,0 +1,35 @@
1
+ "use client";
2
+
3
+ import { Button } from "@krizaka/ui/button";
4
+ import { StaticMap } from "@krizaka/ui/map";
5
+ import { MapInfoCard, RouteCard } from "@krizaka/ui/map/cards";
6
+ import { MapSheet, type MapSheetSnap } from "@krizaka/ui/map/sheet";
7
+ import * as React from "react";
8
+
9
+ const SHOP = [-73.5673, 45.5017] as const;
10
+ const ME = [-73.58, 45.51] as const;
11
+
12
+ // A place on the map: the sheet rises over it WITHOUT blocking it (no scrim, no trap) — three snap points on a phone, a
13
+ // card at the side from md. The info card says what the place is (one action); the route card opens the person's own
14
+ // navigation app. The times are given by the host from a real source — here, demo values.
15
+ export default function MapPlaceSheet() {
16
+ const [snap, setSnap] = React.useState<MapSheetSnap>("half");
17
+ return (
18
+ <div className="relative h-[34rem] w-full max-w-3xl overflow-hidden rounded-xl border border-border-subtle">
19
+ <StaticMap label="Atelier Rose, Montréal" center={[-73.575, 45.505]} zoom={13} places={[{ position: SHOP, label: "Atelier Rose" }]} />
20
+ <MapSheet label="Atelier Rose" handleLabel="Resize the panel" snap={snap} onSnapChange={setSnap}>
21
+ <div className="flex flex-col gap-5">
22
+ <MapInfoCard title="Atelier Rose" meta="Hair salon · 1.4 km" status="Open until 18:00" action={<Button size="sm">See the shop</Button>} />
23
+ <RouteCard
24
+ destination="Directions to Atelier Rose"
25
+ position={SHOP}
26
+ origin={ME}
27
+ directionsLabel="Open in"
28
+ appLabels={{ apple: "Apple Maps", google: "Google Maps", osm: "OpenStreetMap", waze: "Waze", transit: "Transit" }}
29
+ times={[{ label: "On foot", value: "18 min" }, { label: "By bike", value: "7 min" }]}
30
+ />
31
+ </div>
32
+ </MapSheet>
33
+ </div>
34
+ );
35
+ }
@@ -0,0 +1,4 @@
1
+ import type { ComponentType } from "react";
2
+ /** A named example of the @krizaka/ui registry; `defaultOpen` opens what it opens (a dialog, a menu, toasts) at load. */
3
+ declare const Example: ComponentType<{ defaultOpen?: boolean }>;
4
+ export default Example;
@@ -0,0 +1,27 @@
1
+ "use client";
2
+
3
+ // registry/examples/wall/tidy.tsx
4
+ import { Wall } from "@krizaka/ui/wall";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ var m = {
7
+ wallLabel: "From the shop",
8
+ photo: (alt, hue) => /* @__PURE__ */ jsxs("svg", { role: "img", "aria-label": alt, viewBox: "0 0 240 240", children: [
9
+ /* @__PURE__ */ jsx("rect", { width: "240", height: "240", fill: hue }),
10
+ /* @__PURE__ */ jsx("path", { d: "m0 240 100-190 55 110 35-45 50 125Z", fill: "var(--kz-accent)", opacity: ".8" })
11
+ ] })
12
+ };
13
+ var items = [
14
+ { id: "front", kind: "polaroid", z: 1, img: m.photo("The shop front", "var(--kz-accent-soft)"), caption: "Rue Saint-Denis, since 2019" },
15
+ { id: "note", kind: "note", z: 2, text: "Open late on Fridays. Walk-ins welcome.", signature: "Rose", attachment: "pin" },
16
+ { id: "chair", kind: "polaroid", z: 3, img: m.photo("The first chair", "var(--kz-surface-3)"), caption: "The first chair", attachment: "pin" },
17
+ { id: "window", kind: "polaroid", z: 4, img: m.photo("The window", "var(--kz-surface-2)"), caption: "The window in May" },
18
+ { id: "sign", kind: "sign", z: 5, logo: "Atelier Rose", variant: "enamel" },
19
+ { id: "wash", kind: "polaroid", z: 6, img: m.photo("The wash basin", "var(--kz-accent-soft)"), caption: "The wash basin" },
20
+ { id: "note2", kind: "note", z: 7, text: "Bring a photo of the cut you like.", signature: "Rose" }
21
+ ];
22
+ function WallTidy() {
23
+ return /* @__PURE__ */ jsx(Wall, { "aria-label": m.wallLabel, layout: "tidy", texture: "plaster", items });
24
+ }
25
+ export {
26
+ WallTidy as default
27
+ };
@@ -0,0 +1,19 @@
1
+ import { Wall, type WallItem } from "@krizaka/ui/wall";
2
+
3
+ const m = {
4
+ wallLabel: "From the shop",
5
+ photo: (alt: string, hue: string) => <svg role="img" aria-label={alt} viewBox="0 0 240 240"><rect width="240" height="240" fill={hue} /><path d="m0 240 100-190 55 110 35-45 50 125Z" fill="var(--kz-accent)" opacity=".8" /></svg>,
6
+ };
7
+ const items: WallItem[] = [
8
+ { id: "front", kind: "polaroid", z: 1, img: m.photo("The shop front", "var(--kz-accent-soft)"), caption: "Rue Saint-Denis, since 2019" },
9
+ { id: "note", kind: "note", z: 2, text: "Open late on Fridays. Walk-ins welcome.", signature: "Rose", attachment: "pin" },
10
+ { id: "chair", kind: "polaroid", z: 3, img: m.photo("The first chair", "var(--kz-surface-3)"), caption: "The first chair", attachment: "pin" },
11
+ { id: "window", kind: "polaroid", z: 4, img: m.photo("The window", "var(--kz-surface-2)"), caption: "The window in May" },
12
+ { id: "sign", kind: "sign", z: 5, logo: "Atelier Rose", variant: "enamel" },
13
+ { id: "wash", kind: "polaroid", z: 6, img: m.photo("The wash basin", "var(--kz-accent-soft)"), caption: "The wash basin" },
14
+ { id: "note2", kind: "note", z: 7, text: "Bring a photo of the cut you like.", signature: "Rose" },
15
+ ];
16
+
17
+ export default function WallTidy() {
18
+ return <Wall aria-label={m.wallLabel} layout="tidy" texture="plaster" items={items} />;
19
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@krizaka/ui",
3
- "version": "3.76.1",
3
+ "version": "3.77.0",
4
4
  "templatePurposes": {
5
5
  "convince": {
6
6
  "title": "Convince",
@@ -1004,7 +1004,7 @@
1004
1004
  "native": 0
1005
1005
  },
1006
1006
  "dependencies": [
1007
- "@krizaka/tokens@^3.76.1"
1007
+ "@krizaka/tokens@^3.77.0"
1008
1008
  ],
1009
1009
  "registryDependencies": [
1010
1010
  "account-menu",
@@ -3973,11 +3973,11 @@
3973
3973
  }
3974
3974
  },
3975
3975
  "examples": {
3976
- "web": 5,
3976
+ "web": 7,
3977
3977
  "native": 2
3978
3978
  },
3979
3979
  "dependencies": [
3980
- "@krizaka/tokens@^3.76.1",
3980
+ "@krizaka/tokens@^3.77.0",
3981
3981
  "@protomaps/basemaps@5.7.2",
3982
3982
  "tailwind-variants@^3.3.1"
3983
3983
  ],
@@ -4385,7 +4385,7 @@
4385
4385
  "native": 0
4386
4386
  },
4387
4387
  "dependencies": [
4388
- "@krizaka/tokens@^3.76.1",
4388
+ "@krizaka/tokens@^3.77.0",
4389
4389
  "radix-ui@^1.8.1",
4390
4390
  "tailwind-variants@^3.3.1"
4391
4391
  ],
@@ -5253,7 +5253,7 @@
5253
5253
  "native": 0
5254
5254
  },
5255
5255
  "dependencies": [
5256
- "@krizaka/tokens@^3.76.1",
5256
+ "@krizaka/tokens@^3.77.0",
5257
5257
  "radix-ui@^1.8.1",
5258
5258
  "tailwind-variants@^3.3.1"
5259
5259
  ],
@@ -5700,7 +5700,7 @@
5700
5700
  "native": 0
5701
5701
  },
5702
5702
  "dependencies": [
5703
- "@krizaka/tokens@^3.76.1",
5703
+ "@krizaka/tokens@^3.77.0",
5704
5704
  "zod@^4.6.7"
5705
5705
  ],
5706
5706
  "registryDependencies": [
@@ -5920,7 +5920,7 @@
5920
5920
  "native": 0
5921
5921
  },
5922
5922
  "dependencies": [
5923
- "@krizaka/tokens@^3.76.1",
5923
+ "@krizaka/tokens@^3.77.0",
5924
5924
  "radix-ui@^1.8.1",
5925
5925
  "tailwind-variants@^3.3.1"
5926
5926
  ],
@@ -7374,7 +7374,7 @@
7374
7374
  }
7375
7375
  },
7376
7376
  "examples": {
7377
- "web": 9,
7377
+ "web": 10,
7378
7378
  "native": 0
7379
7379
  },
7380
7380
  "dependencies": [],