@gunkin/uiify 0.0.12-alpha → 0.0.13-alpha

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 (219) hide show
  1. package/dist/components/behavior.css +9 -6
  2. package/dist/components/behavior.css.map +1 -1
  3. package/dist/components/breadcrumb/Breadcrumb.d.ts.map +1 -1
  4. package/dist/components/breadcrumb/Breadcrumb.js +5 -4
  5. package/dist/components/breadcrumb/Breadcrumb.js.map +1 -1
  6. package/dist/components/carousel/CarouselMarkup.d.ts.map +1 -1
  7. package/dist/components/carousel/CarouselMarkup.js +2 -1
  8. package/dist/components/carousel/CarouselMarkup.js.map +1 -1
  9. package/dist/components/carousel/client/CarouselClientView.d.ts.map +1 -1
  10. package/dist/components/carousel/client/CarouselClientView.js +1 -0
  11. package/dist/components/carousel/client/CarouselClientView.js.map +1 -1
  12. package/dist/components/carousel/client/carousel-controller.d.ts.map +1 -1
  13. package/dist/components/carousel/client/carousel-controller.js +25 -4
  14. package/dist/components/carousel/client/carousel-controller.js.map +1 -1
  15. package/dist/components/carousel/client/carousel-observer.d.ts.map +1 -1
  16. package/dist/components/carousel/client/carousel-observer.js +40 -0
  17. package/dist/components/carousel/client/carousel-observer.js.map +1 -1
  18. package/dist/components/carousel/fade/fade-controller.d.ts.map +1 -1
  19. package/dist/components/carousel/fade/fade-controller.js +3 -0
  20. package/dist/components/carousel/fade/fade-controller.js.map +1 -1
  21. package/dist/components/carousel/types.d.ts +2 -0
  22. package/dist/components/carousel/types.d.ts.map +1 -1
  23. package/dist/components/checkbox/Checkbox.d.ts +1 -6
  24. package/dist/components/checkbox/Checkbox.d.ts.map +1 -1
  25. package/dist/components/checkbox/Checkbox.js +2 -52
  26. package/dist/components/checkbox/Checkbox.js.map +1 -1
  27. package/dist/components/drawer/Drawer.d.ts +1 -1
  28. package/dist/components/drawer/Drawer.d.ts.map +1 -1
  29. package/dist/components/drawer/Drawer.js +46 -9
  30. package/dist/components/drawer/Drawer.js.map +1 -1
  31. package/dist/components/drawer/DrawerNative.d.ts +8 -16
  32. package/dist/components/drawer/DrawerNative.d.ts.map +1 -1
  33. package/dist/components/drawer/DrawerNative.js +80 -34
  34. package/dist/components/drawer/DrawerNative.js.map +1 -1
  35. package/dist/components/drawer/drawer-store.d.ts +1 -1
  36. package/dist/components/drawer/drawer-store.d.ts.map +1 -1
  37. package/dist/components/drawer/drawer-store.js +7 -3
  38. package/dist/components/drawer/drawer-store.js.map +1 -1
  39. package/dist/components/drawer/index.d.ts +3 -3
  40. package/dist/components/drawer/index.d.ts.map +1 -1
  41. package/dist/components/drawer/index.js +9 -1
  42. package/dist/components/drawer/index.js.map +1 -1
  43. package/dist/components/drawer/types.d.ts +114 -3
  44. package/dist/components/drawer/types.d.ts.map +1 -1
  45. package/dist/components/dropdown-menu/DropdownMenu.d.ts.map +1 -1
  46. package/dist/components/dropdown-menu/DropdownMenu.js +1 -0
  47. package/dist/components/dropdown-menu/DropdownMenu.js.map +1 -1
  48. package/dist/components/enhance/dialog-dismiss.d.ts +1 -1
  49. package/dist/components/enhance/dialog-dismiss.d.ts.map +1 -1
  50. package/dist/components/enhance/dialog-dismiss.js +19 -10
  51. package/dist/components/enhance/dialog-dismiss.js.map +1 -1
  52. package/dist/components/enhance/internal/box-observer.d.ts +4 -0
  53. package/dist/components/enhance/internal/box-observer.d.ts.map +1 -0
  54. package/dist/components/enhance/internal/box-observer.js +32 -0
  55. package/dist/components/enhance/internal/box-observer.js.map +1 -0
  56. package/dist/components/enhance/sheet-swipe.d.ts.map +1 -1
  57. package/dist/components/enhance/sheet-swipe.js +42 -14
  58. package/dist/components/enhance/sheet-swipe.js.map +1 -1
  59. package/dist/components/enhance/types.d.ts +5 -0
  60. package/dist/components/enhance/types.d.ts.map +1 -0
  61. package/dist/components/field/Field.d.ts.map +1 -1
  62. package/dist/components/field/Field.js +1 -0
  63. package/dist/components/field/Field.js.map +1 -1
  64. package/dist/components/file-upload/FileUpload.d.ts +4 -7
  65. package/dist/components/file-upload/FileUpload.d.ts.map +1 -1
  66. package/dist/components/file-upload/FileUpload.js +28 -122
  67. package/dist/components/file-upload/FileUpload.js.map +1 -1
  68. package/dist/components/file-upload/FileUploadInput.d.ts +7 -0
  69. package/dist/components/file-upload/FileUploadInput.d.ts.map +1 -0
  70. package/dist/components/file-upload/FileUploadInput.js +60 -0
  71. package/dist/components/file-upload/FileUploadInput.js.map +1 -0
  72. package/dist/components/file-upload/FileUploadRoot.d.ts +8 -0
  73. package/dist/components/file-upload/FileUploadRoot.d.ts.map +1 -0
  74. package/dist/components/file-upload/FileUploadRoot.js +70 -0
  75. package/dist/components/file-upload/FileUploadRoot.js.map +1 -0
  76. package/dist/components/file-upload/file-upload-context.d.ts +3 -0
  77. package/dist/components/file-upload/file-upload-context.d.ts.map +1 -0
  78. package/dist/components/file-upload/file-upload-context.js +8 -0
  79. package/dist/components/file-upload/file-upload-context.js.map +1 -0
  80. package/dist/components/file-upload/index.d.ts +1 -1
  81. package/dist/components/file-upload/index.d.ts.map +1 -1
  82. package/dist/components/file-upload/index.js.map +1 -1
  83. package/dist/components/file-upload/types.d.ts +8 -10
  84. package/dist/components/file-upload/types.d.ts.map +1 -1
  85. package/dist/components/form/Form.d.ts.map +1 -1
  86. package/dist/components/form/Form.js +2 -1
  87. package/dist/components/form/Form.js.map +1 -1
  88. package/dist/components/hover-card/HoverCard.js +1 -1
  89. package/dist/components/hover-card/HoverCard.js.map +1 -1
  90. package/dist/components/index.d.ts +0 -1
  91. package/dist/components/index.d.ts.map +1 -1
  92. package/dist/components/index.js +0 -1
  93. package/dist/components/index.js.map +1 -1
  94. package/dist/components/input/Input.d.ts.map +1 -1
  95. package/dist/components/input/Input.js +1 -1
  96. package/dist/components/input/Input.js.map +1 -1
  97. package/dist/components/internal/choice-family/ChoiceGroup.js +1 -1
  98. package/dist/components/internal/choice-family/ChoiceGroup.js.map +1 -1
  99. package/dist/components/internal/choice-family/types.d.ts +3 -3
  100. package/dist/components/internal/choice-family/types.d.ts.map +1 -1
  101. package/dist/components/internal/native-check-control/NativeCheckControl.d.ts +7 -0
  102. package/dist/components/internal/native-check-control/NativeCheckControl.d.ts.map +1 -0
  103. package/dist/components/internal/native-check-control/NativeCheckControl.js +56 -0
  104. package/dist/components/internal/native-check-control/NativeCheckControl.js.map +1 -0
  105. package/dist/components/internal/native-check-control/types.d.ts +13 -0
  106. package/dist/components/internal/native-check-control/types.d.ts.map +1 -0
  107. package/dist/components/internal/native-check-control/types.js +1 -0
  108. package/dist/components/number-field/NumberField.d.ts.map +1 -1
  109. package/dist/components/number-field/NumberField.js +11 -2
  110. package/dist/components/number-field/NumberField.js.map +1 -1
  111. package/dist/components/number-field/format.d.ts +1 -0
  112. package/dist/components/number-field/format.d.ts.map +1 -1
  113. package/dist/components/number-field/format.js +18 -6
  114. package/dist/components/number-field/format.js.map +1 -1
  115. package/dist/components/popup/PopupParts.d.ts.map +1 -1
  116. package/dist/components/popup/PopupParts.js +2 -0
  117. package/dist/components/popup/PopupParts.js.map +1 -1
  118. package/dist/components/select/Select.d.ts.map +1 -1
  119. package/dist/components/select/Select.js +1 -1
  120. package/dist/components/select/Select.js.map +1 -1
  121. package/dist/components/skeleton/Skeleton.d.ts.map +1 -1
  122. package/dist/components/skeleton/Skeleton.js +14 -35
  123. package/dist/components/skeleton/Skeleton.js.map +1 -1
  124. package/dist/components/skeleton/types.d.ts +1 -8
  125. package/dist/components/skeleton/types.d.ts.map +1 -1
  126. package/dist/components/table/Table.d.ts +1 -40
  127. package/dist/components/table/Table.d.ts.map +1 -1
  128. package/dist/components/table/Table.js +9 -259
  129. package/dist/components/table/Table.js.map +1 -1
  130. package/dist/components/table/TableShell.d.ts +5 -1
  131. package/dist/components/table/TableShell.d.ts.map +1 -1
  132. package/dist/components/table/TableShell.js +63 -9
  133. package/dist/components/table/TableShell.js.map +1 -1
  134. package/dist/components/table/client/Table.d.ts +30 -0
  135. package/dist/components/table/client/Table.d.ts.map +1 -0
  136. package/dist/components/table/client/Table.js +135 -0
  137. package/dist/components/table/client/Table.js.map +1 -0
  138. package/dist/components/table/client/TableBody.d.ts +7 -0
  139. package/dist/components/table/client/TableBody.d.ts.map +1 -0
  140. package/dist/components/table/client/TableBody.js +35 -0
  141. package/dist/components/table/client/TableBody.js.map +1 -0
  142. package/dist/components/table/client/TableColumnHeader.d.ts +7 -0
  143. package/dist/components/table/client/TableColumnHeader.d.ts.map +1 -0
  144. package/dist/components/table/client/TableColumnHeader.js +69 -0
  145. package/dist/components/table/client/TableColumnHeader.js.map +1 -0
  146. package/dist/components/table/client/TableExpansion.d.ts +11 -0
  147. package/dist/components/table/client/TableExpansion.d.ts.map +1 -0
  148. package/dist/components/table/client/TableExpansion.js +43 -0
  149. package/dist/components/table/client/TableExpansion.js.map +1 -0
  150. package/dist/components/table/client/TableRow.d.ts +7 -0
  151. package/dist/components/table/client/TableRow.d.ts.map +1 -0
  152. package/dist/components/table/client/TableRow.js +95 -0
  153. package/dist/components/table/client/TableRow.js.map +1 -0
  154. package/dist/components/table/client/TableSelection.d.ts +11 -0
  155. package/dist/components/table/client/TableSelection.d.ts.map +1 -0
  156. package/dist/components/table/client/TableSelection.js +48 -0
  157. package/dist/components/table/client/TableSelection.js.map +1 -0
  158. package/dist/components/table/client/table-context.d.ts +3 -0
  159. package/dist/components/table/client/table-context.d.ts.map +1 -0
  160. package/dist/components/table/client/table-context.js +8 -0
  161. package/dist/components/table/client/table-context.js.map +1 -0
  162. package/dist/components/table/client.d.ts +4 -0
  163. package/dist/components/table/client.d.ts.map +1 -0
  164. package/dist/components/table/client.js +30 -0
  165. package/dist/components/table/client.js.map +1 -0
  166. package/dist/components/table/index.d.ts +2 -2
  167. package/dist/components/table/index.d.ts.map +1 -1
  168. package/dist/components/table/index.js +7 -7
  169. package/dist/components/table/index.js.map +1 -1
  170. package/dist/components/table/types.d.ts +42 -15
  171. package/dist/components/table/types.d.ts.map +1 -1
  172. package/dist/components/textarea/Textarea.d.ts.map +1 -1
  173. package/dist/components/textarea/Textarea.js +1 -1
  174. package/dist/components/textarea/Textarea.js.map +1 -1
  175. package/dist/components/tooltip/Tooltip.js +1 -1
  176. package/dist/components/tooltip/Tooltip.js.map +1 -1
  177. package/dist/components/virtual-scroll/VirtualScroll.d.ts.map +1 -1
  178. package/dist/components/virtual-scroll/VirtualScroll.js +54 -34
  179. package/dist/components/virtual-scroll/VirtualScroll.js.map +1 -1
  180. package/dist/components/virtual-scroll/types.d.ts +2 -2
  181. package/dist/components/virtual-scroll/types.d.ts.map +1 -1
  182. package/dist/components/virtual-scroll/types.js.map +1 -1
  183. package/dist/components/virtual-scroll/virtual-scroll-scroll.d.ts.map +1 -1
  184. package/dist/components/virtual-scroll/virtual-scroll-scroll.js +0 -1
  185. package/dist/components/virtual-scroll/virtual-scroll-scroll.js.map +1 -1
  186. package/dist/core/roving-focus.d.ts +2 -1
  187. package/dist/core/roving-focus.d.ts.map +1 -1
  188. package/dist/core/roving-focus.js.map +1 -1
  189. package/dist/core/use-popover.d.ts.map +1 -1
  190. package/dist/core/use-popover.js +6 -1
  191. package/dist/core/use-popover.js.map +1 -1
  192. package/dist/elements/choice/types.d.ts +1 -1
  193. package/dist/elements/choice/types.d.ts.map +1 -1
  194. package/dist/styles/index.css +1 -1
  195. package/dist/styles/tailwind.css +1 -0
  196. package/dist/styles/tokens.css +1 -1
  197. package/package.json +1 -1
  198. package/dist/components/drawer/client-types.d.ts +0 -99
  199. package/dist/components/drawer/client-types.d.ts.map +0 -1
  200. package/dist/components/drawer/client-types.js +0 -1
  201. package/dist/components/enhance/internal/read-box.d.ts +0 -3
  202. package/dist/components/enhance/internal/read-box.d.ts.map +0 -1
  203. package/dist/components/enhance/internal/read-box.js +0 -7
  204. package/dist/components/enhance/internal/read-box.js.map +0 -1
  205. package/dist/components/stepper/Stepper.d.ts +0 -7
  206. package/dist/components/stepper/Stepper.d.ts.map +0 -1
  207. package/dist/components/stepper/Stepper.js +0 -35
  208. package/dist/components/stepper/Stepper.js.map +0 -1
  209. package/dist/components/stepper/index.d.ts +0 -3
  210. package/dist/components/stepper/index.d.ts.map +0 -1
  211. package/dist/components/stepper/index.js +0 -5
  212. package/dist/components/stepper/index.js.map +0 -1
  213. package/dist/components/stepper/types.d.ts +0 -14
  214. package/dist/components/stepper/types.d.ts.map +0 -1
  215. package/dist/components/stepper.d.ts +0 -1
  216. package/dist/components/stepper.js +0 -1
  217. /package/dist/components/{stepper → enhance}/types.js +0 -0
  218. /package/dist/components/{stepper → enhance}/types.js.map +0 -0
  219. /package/dist/components/{drawer/client-types.js.map → internal/native-check-control/types.js.map} +0 -0
@@ -1,5 +1,48 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { renderNativeInvoker } from "@gunkin/uiify/core/render";
3
+ function DrawerNativeTrigger({ target, ...props }) {
4
+ return renderNativeInvoker(
5
+ "button",
6
+ "data-uiify-drawer",
7
+ "trigger",
8
+ "show-modal",
9
+ target,
10
+ props,
11
+ { button: true }
12
+ );
13
+ }
14
+ function DrawerNativeClose({ target, ...props }) {
15
+ return renderNativeInvoker(
16
+ "button",
17
+ "data-uiify-drawer",
18
+ "close",
19
+ "request-close",
20
+ target,
21
+ props,
22
+ { button: true, variant: "ghost" }
23
+ );
24
+ }
25
+ function DrawerNativeContent({
26
+ size,
27
+ dismiss = "any",
28
+ backdrop,
29
+ side = "bottom",
30
+ ...props
31
+ }) {
32
+ return /* @__PURE__ */ jsx(
33
+ "dialog",
34
+ {
35
+ ...props,
36
+ closedby: dismiss,
37
+ "data-side": side,
38
+ "data-size": size,
39
+ "data-backdrop": backdrop,
40
+ "data-part": "content",
41
+ "data-uiify-drawer": ""
42
+ }
43
+ );
44
+ }
45
+ DrawerNativeContent.displayName = "DrawerNativeContent";
3
46
  function DrawerPanel({
4
47
  id,
5
48
  trigger,
@@ -8,47 +51,47 @@ function DrawerPanel({
8
51
  children,
9
52
  closeLabel = "Close",
10
53
  side = "bottom",
11
- className
54
+ className,
55
+ footer,
56
+ size,
57
+ dismiss,
58
+ backdrop
12
59
  }) {
13
- const titleId = `${id}-title`;
14
- const descriptionId = `${id}-description`;
15
60
  return /* @__PURE__ */ jsxs("div", { "data-part": "root", "data-side": side, "data-uiify-drawer": "", children: [
16
- renderNativeInvoker(
17
- "button",
18
- "data-uiify-drawer",
19
- "trigger",
20
- "show-modal",
21
- id,
22
- {
23
- children: trigger
24
- },
25
- { button: true }
26
- ),
61
+ /* @__PURE__ */ jsx(DrawerNativeTrigger, { target: id, children: trigger }),
27
62
  /* @__PURE__ */ jsxs(
28
- "dialog",
63
+ DrawerNativeContent,
29
64
  {
30
- "aria-describedby": description === void 0 ? void 0 : descriptionId,
31
- "aria-labelledby": titleId,
65
+ "aria-describedby": description === null || description === void 0 ? void 0 : `${id}-description`,
66
+ "aria-labelledby": `${id}-title`,
32
67
  className,
33
- "data-part": "content",
34
- "data-side": side,
35
- "data-uiify-drawer": "",
68
+ side,
36
69
  id,
70
+ ...size ? { size } : {},
71
+ ...dismiss ? { dismiss } : {},
72
+ ...backdrop ? { backdrop } : {},
37
73
  children: [
38
- /* @__PURE__ */ jsx("h2", { id: titleId, children: title }),
39
- description === void 0 ? null : /* @__PURE__ */ jsx("p", { id: descriptionId, children: description }),
40
- children,
41
- renderNativeInvoker(
42
- "button",
43
- "data-uiify-drawer",
44
- "close",
45
- "request-close",
46
- id,
47
- {
48
- children: closeLabel
49
- },
50
- { button: true, variant: "ghost" }
51
- )
74
+ /* @__PURE__ */ jsx("div", { "data-part": "grabber", "data-uiify-drawer": "", "aria-hidden": "true" }),
75
+ /* @__PURE__ */ jsxs("div", { "data-part": "header", "data-uiify-drawer": "", children: [
76
+ /* @__PURE__ */ jsx("h2", { "data-part": "title", id: `${id}-title`, children: title }),
77
+ description === null || description === void 0 ? null : /* @__PURE__ */ jsx("p", { "data-part": "description", id: `${id}-description`, children: description }),
78
+ /* @__PURE__ */ jsx(DrawerNativeClose, { target: id, "aria-label": closeLabel, children: /* @__PURE__ */ jsx(
79
+ "svg",
80
+ {
81
+ "aria-hidden": "true",
82
+ viewBox: "0 0 16 16",
83
+ width: "14",
84
+ height: "14",
85
+ fill: "none",
86
+ stroke: "currentColor",
87
+ strokeWidth: "1.75",
88
+ strokeLinecap: "round",
89
+ children: /* @__PURE__ */ jsx("path", { d: "M3 3l10 10M13 3L3 13" })
90
+ }
91
+ ) })
92
+ ] }),
93
+ children === null || children === void 0 ? null : /* @__PURE__ */ jsx("div", { "data-part": "body", "data-uiify-drawer": "", children }),
94
+ footer === null || footer === void 0 ? null : /* @__PURE__ */ jsx("div", { "data-part": "footer", "data-uiify-drawer": "", children: footer })
52
95
  ]
53
96
  }
54
97
  )
@@ -56,6 +99,9 @@ function DrawerPanel({
56
99
  }
57
100
  DrawerPanel.displayName = "DrawerPanel";
58
101
  export {
102
+ DrawerNativeClose,
103
+ DrawerNativeContent,
104
+ DrawerNativeTrigger,
59
105
  DrawerPanel
60
106
  };
61
107
  //# sourceMappingURL=DrawerNative.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/drawer/DrawerNative.tsx"],"sourcesContent":["import type { ReactElement } from \"react\";\nimport { renderNativeInvoker } from \"@gunkin/uiify/core/render\";\nimport type { DrawerProps } from \"./types.js\";\n\n/**\n * Monolithic native shell: a `command=\"show-modal\"` trigger opens a plain,\n * initially closed `<dialog>`; a `command=\"request-close\"` invoker closes it.\n * Works before hydration, matching Modal and AlertModal's native shell — all\n * three are built on `@gunkin/uiify/elements/dialog`. Always a true modal — controlled\n * or initially open state needs a client adapter, which this Tier 0 shell does\n * not have.\n *\n * `title` is required, so `aria-labelledby={titleId}` always satisfies\n * `Dialog.Content`'s accessible-name requirement here — unlike `ModalContent`/\n * `AlertModalContent`, which are exported as generic parts in their own right\n * and so keep a looser prop type (see ModalParts.tsx), this shell has no\n * public \"DrawerContent\" part to keep loose.\n */\nexport function DrawerPanel({\n id,\n trigger,\n title,\n description,\n children,\n closeLabel = \"Close\",\n side = \"bottom\",\n className,\n}: DrawerProps): ReactElement {\n const titleId = `${id}-title`;\n const descriptionId = `${id}-description`;\n\n return (\n <div data-part=\"root\" data-side={side} data-uiify-drawer=\"\">\n {renderNativeInvoker(\n \"button\",\n \"data-uiify-drawer\",\n \"trigger\",\n \"show-modal\",\n id,\n {\n children: trigger,\n },\n { button: true },\n )}\n <dialog\n aria-describedby={description === undefined ? undefined : descriptionId}\n aria-labelledby={titleId}\n className={className}\n data-part=\"content\"\n data-side={side}\n data-uiify-drawer=\"\"\n id={id}\n >\n <h2 id={titleId}>{title}</h2>\n {description === undefined ? null : <p id={descriptionId}>{description}</p>}\n {children}\n {renderNativeInvoker(\n \"button\",\n \"data-uiify-drawer\",\n \"close\",\n \"request-close\",\n id,\n {\n children: closeLabel,\n },\n { button: true, variant: \"ghost\" },\n )}\n </dialog>\n </div>\n );\n}\nDrawerPanel.displayName = \"DrawerPanel\";\n"],"mappings":"AA4CM,SASE,KATF;AA3CN,SAAS,2BAA2B;AAiB7B,SAAS,YAAY;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,aAAa;AAAA,EACb,OAAO;AAAA,EACP;AACF,GAA8B;AAC5B,QAAM,UAAU,GAAG,EAAE;AACrB,QAAM,gBAAgB,GAAG,EAAE;AAE3B,SACE,qBAAC,SAAI,aAAU,QAAO,aAAW,MAAM,qBAAkB,IACtD;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,QACE,UAAU;AAAA,MACZ;AAAA,MACA,EAAE,QAAQ,KAAK;AAAA,IACjB;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACC,oBAAkB,gBAAgB,SAAY,SAAY;AAAA,QAC1D,mBAAiB;AAAA,QACjB;AAAA,QACA,aAAU;AAAA,QACV,aAAW;AAAA,QACX,qBAAkB;AAAA,QAClB;AAAA,QAEA;AAAA,8BAAC,QAAG,IAAI,SAAU,iBAAM;AAAA,UACvB,gBAAgB,SAAY,OAAO,oBAAC,OAAE,IAAI,eAAgB,uBAAY;AAAA,UACtE;AAAA,UACA;AAAA,YACC;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,cACE,UAAU;AAAA,YACZ;AAAA,YACA,EAAE,QAAQ,MAAM,SAAS,QAAQ;AAAA,UACnC;AAAA;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;AACA,YAAY,cAAc;","names":[]}
1
+ {"version":3,"sources":["../../../src/components/drawer/DrawerNative.tsx"],"sourcesContent":["import type { ReactElement } from \"react\";\nimport { renderNativeInvoker } from \"@gunkin/uiify/core/render\";\nimport type { DrawerProps, DrawerNativeContentProps, DrawerNativeInvokerProps } from \"./types.js\";\n\nexport function DrawerNativeTrigger({ target, ...props }: DrawerNativeInvokerProps): ReactElement {\n return renderNativeInvoker(\n \"button\",\n \"data-uiify-drawer\",\n \"trigger\",\n \"show-modal\",\n target,\n props,\n { button: true },\n );\n}\nexport function DrawerNativeClose({ target, ...props }: DrawerNativeInvokerProps): ReactElement {\n return renderNativeInvoker(\n \"button\",\n \"data-uiify-drawer\",\n \"close\",\n \"request-close\",\n target,\n props,\n { button: true, variant: \"ghost\" },\n );\n}\nexport function DrawerNativeContent({\n size,\n dismiss = \"any\",\n backdrop,\n side = \"bottom\",\n ...props\n}: DrawerNativeContentProps): ReactElement {\n return (\n <dialog\n {...props}\n closedby={dismiss}\n data-side={side}\n data-size={size}\n data-backdrop={backdrop}\n data-part=\"content\"\n data-uiify-drawer=\"\"\n />\n );\n}\nDrawerNativeContent.displayName = \"DrawerNativeContent\";\n\nexport function DrawerPanel({\n id,\n trigger,\n title,\n description,\n children,\n closeLabel = \"Close\",\n side = \"bottom\",\n className,\n footer,\n size,\n dismiss,\n backdrop,\n}: DrawerProps): ReactElement {\n return (\n <div data-part=\"root\" data-side={side} data-uiify-drawer=\"\">\n <DrawerNativeTrigger target={id}>{trigger}</DrawerNativeTrigger>\n <DrawerNativeContent\n aria-describedby={\n description === null || description === undefined ? undefined : `${id}-description`\n }\n aria-labelledby={`${id}-title`}\n className={className}\n side={side}\n id={id}\n {...(size ? { size } : {})}\n {...(dismiss ? { dismiss } : {})}\n {...(backdrop ? { backdrop } : {})}\n >\n <div data-part=\"grabber\" data-uiify-drawer=\"\" aria-hidden=\"true\" />\n <div data-part=\"header\" data-uiify-drawer=\"\">\n <h2 data-part=\"title\" id={`${id}-title`}>\n {title}\n </h2>\n {description === null || description === undefined ? null : (\n <p data-part=\"description\" id={`${id}-description`}>\n {description}\n </p>\n )}\n <DrawerNativeClose target={id} aria-label={closeLabel}>\n <svg\n aria-hidden=\"true\"\n viewBox=\"0 0 16 16\"\n width=\"14\"\n height=\"14\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.75\"\n strokeLinecap=\"round\"\n >\n <path d=\"M3 3l10 10M13 3L3 13\" />\n </svg>\n </DrawerNativeClose>\n </div>\n {children === null || children === undefined ? null : (\n <div data-part=\"body\" data-uiify-drawer=\"\">\n {children}\n </div>\n )}\n {footer === null || footer === undefined ? null : (\n <div data-part=\"footer\" data-uiify-drawer=\"\">\n {footer}\n </div>\n )}\n </DrawerNativeContent>\n </div>\n );\n}\nDrawerPanel.displayName = \"DrawerPanel\";\n"],"mappings":"AAkCI,cA2CI,YA3CJ;AAjCJ,SAAS,2BAA2B;AAG7B,SAAS,oBAAoB,EAAE,QAAQ,GAAG,MAAM,GAA2C;AAChG,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,EAAE,QAAQ,KAAK;AAAA,EACjB;AACF;AACO,SAAS,kBAAkB,EAAE,QAAQ,GAAG,MAAM,GAA2C;AAC9F,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,EAAE,QAAQ,MAAM,SAAS,QAAQ;AAAA,EACnC;AACF;AACO,SAAS,oBAAoB;AAAA,EAClC;AAAA,EACA,UAA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gBACZ,SAAQ;AAAA,gBACR,OAAM;AAAA,gBACN,QAAO;AAAA,gBACP,MAAK;AAAA,gBACL,QAAO;AAAA,gBACP,aAAY;AAAA,gBACZ,eAAc;AAAA,gBAEd,8BAAC,UAAK,GAAE,wBAAuB;AAAA;AAAA,YACjC,GACF;AAAA,aACF;AAAA,UACC,aAAa,QAAQ,aAAa,SAAY,OAC7C,oBAAC,SAAI,aAAU,QAAO,qBAAkB,IACrC,UACH;AAAA,UAED,WAAW,QAAQ,WAAW,SAAY,OACzC,oBAAC,SAAI,aAAU,UAAS,qBAAkB,IACvC,kBACH;AAAA;AAAA;AAAA,IAEJ;AAAA,KACF;AAEJ;AACA,YAAY,cAAc;","names":[]}
@@ -1,3 +1,3 @@
1
- import type { DrawerStoreOptions, DrawerStore } from "./client-types.js";
1
+ import type { DrawerStoreOptions, DrawerStore } from "./types.js";
2
2
  export declare function createDrawerStore(options: DrawerStoreOptions): DrawerStore;
3
3
  //# sourceMappingURL=drawer-store.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"drawer-store.d.ts","sourceRoot":"","sources":["../../../src/components/drawer/drawer-store.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAgCzE,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,kBAAkB,GAAG,WAAW,CA+F1E"}
1
+ {"version":3,"file":"drawer-store.d.ts","sourceRoot":"","sources":["../../../src/components/drawer/drawer-store.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAgClE,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,kBAAkB,GAAG,WAAW,CAmG1E"}
@@ -21,8 +21,7 @@ function snapToNearest(snapPoints, currentSnap, dragOffset, containerSize, dismi
21
21
  function createDrawerStore(options) {
22
22
  const snapPoints = options.snapPoints ?? [];
23
23
  const dismissible = options.dismissible ?? true;
24
- const side = options.side;
25
- const vertical = isVerticalSide(side);
24
+ let side = options.side;
26
25
  let activeSnapPoint = options.activeSnapPoint ?? options.defaultActiveSnapPoint ?? snapPoints[snapPoints.length - 1] ?? 1;
27
26
  let containerSize = 0;
28
27
  let dragOffset = 0;
@@ -67,7 +66,7 @@ function createDrawerStore(options) {
67
66
  const delta = openPx - dragOffset;
68
67
  const closedPx = containerSize;
69
68
  const offset = closedPx - delta;
70
- if (vertical) {
69
+ if (isVerticalSide(side)) {
71
70
  const sign2 = side === "bottom" ? 1 : -1;
72
71
  return `translate${side === "bottom" || side === "top" ? "Y" : "X"}(${sign2 * offset}px)`;
73
72
  }
@@ -82,6 +81,11 @@ function createDrawerStore(options) {
82
81
  dragOffset = Math.max(0, dragStartOffset + signedDelta);
83
82
  emit();
84
83
  },
84
+ setSide(nextSide) {
85
+ if (side === nextSide) return;
86
+ side = nextSide;
87
+ emit();
88
+ },
85
89
  setContainerSize(size) {
86
90
  if (size === containerSize) return;
87
91
  containerSize = size;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/drawer/drawer-store.ts"],"sourcesContent":["import type { DrawerSide } from \"./types.js\";\nimport type { DrawerStoreOptions, DrawerStore } from \"./client-types.js\";\n\nfunction isVerticalSide(side: DrawerSide): boolean {\n return side === \"top\" || side === \"bottom\";\n}\n\nfunction snapToNearest(\n snapPoints: readonly number[],\n currentSnap: number,\n dragOffset: number,\n containerSize: number,\n dismissible: boolean,\n): number | null {\n if (containerSize <= 0) return currentSnap;\n const openSize = currentSnap * containerSize;\n const projected = openSize - dragOffset;\n const ratio = projected / containerSize;\n\n if (dismissible && ratio < 0.25) return null;\n\n let nearest = snapPoints[0] ?? currentSnap;\n let nearestDistance = Math.abs(ratio - nearest);\n for (const point of snapPoints) {\n const distance = Math.abs(ratio - point);\n if (distance < nearestDistance) {\n nearest = point;\n nearestDistance = distance;\n }\n }\n return nearest;\n}\n\nexport function createDrawerStore(options: DrawerStoreOptions): DrawerStore {\n const snapPoints = options.snapPoints ?? [];\n const dismissible = options.dismissible ?? true;\n const side = options.side;\n const vertical = isVerticalSide(side);\n\n let activeSnapPoint =\n options.activeSnapPoint ??\n options.defaultActiveSnapPoint ??\n snapPoints[snapPoints.length - 1] ??\n 1;\n let containerSize = 0;\n let dragOffset = 0;\n let dragging = false;\n let pointerStart = 0;\n let dragStartOffset = 0;\n let onSnapChange = options.onSnapChange;\n let onDismiss = options.onDismiss;\n\n const listeners = new Set<() => void>();\n const emit = () => {\n for (const listener of listeners) listener();\n };\n\n const store: DrawerStore = {\n endDrag() {\n if (!dragging) return;\n dragging = false;\n if (snapPoints.length > 0 && containerSize > 0) {\n const next = snapToNearest(\n snapPoints,\n activeSnapPoint,\n dragOffset,\n containerSize,\n dismissible,\n );\n if (next === null) {\n dragOffset = 0;\n emit();\n onDismiss?.();\n return;\n }\n activeSnapPoint = next;\n onSnapChange?.(next);\n }\n dragOffset = 0;\n emit();\n },\n getActiveSnapPoint: () => activeSnapPoint,\n getDragOffset: () => dragOffset,\n getTransform() {\n if (snapPoints.length === 0) return \"\";\n const openPx = activeSnapPoint * containerSize;\n const delta = openPx - dragOffset;\n const closedPx = containerSize;\n const offset = closedPx - delta;\n if (vertical) {\n const sign = side === \"bottom\" ? 1 : -1;\n return `translate${side === \"bottom\" || side === \"top\" ? \"Y\" : \"X\"}(${sign * offset}px)`;\n }\n const sign = side === \"right\" ? 1 : -1;\n return `translateX(${sign * offset}px)`;\n },\n isDragging: () => dragging,\n moveDrag(clientCoord) {\n if (!dragging) return;\n const delta = clientCoord - pointerStart;\n const signedDelta = side === \"top\" || side === \"left\" ? -delta : delta;\n dragOffset = Math.max(0, dragStartOffset + signedDelta);\n emit();\n },\n setContainerSize(size) {\n if (size === containerSize) return;\n containerSize = size;\n emit();\n },\n startDrag(clientCoord) {\n if (snapPoints.length === 0) return;\n dragging = true;\n pointerStart = clientCoord;\n dragStartOffset = dragOffset;\n emit();\n },\n subscribe(listener) {\n listeners.add(listener);\n return () => listeners.delete(listener);\n },\n syncActiveSnapPoint(snap) {\n if (snap === activeSnapPoint) return;\n activeSnapPoint = snap;\n emit();\n },\n };\n\n return store;\n}\n"],"mappings":"AAGA,SAAS,eAAe,MAA2B;AACjD,SAAO,SAAS,SAAS,SAAS;AACpC;AAEA,SAAS,cACP,YACA,aACA,YACA,eACA,aACe;AACf,MAAI,iBAAiB,EAAG,QAAO;AAC/B,QAAM,WAAW,cAAc;AAC/B,QAAM,YAAY,WAAW;AAC7B,QAAM,QAAQ,YAAY;AAE1B,MAAI,eAAe,QAAQ,KAAM,QAAO;AAExC,MAAI,UAAU,WAAW,CAAC,KAAK;AAC/B,MAAI,kBAAkB,KAAK,IAAI,QAAQ,OAAO;AAC9C,aAAW,SAAS,YAAY;AAC9B,UAAM,WAAW,KAAK,IAAI,QAAQ,KAAK;AACvC,QAAI,WAAW,iBAAiB;AAC9B,gBAAU;AACV,wBAAkB;AAAA,IACpB;AAAA,EACF;AACA,SAAO;AACT;AAEO,SAAS,kBAAkB,SAA0C;AAC1E,QAAM,aAAa,QAAQ,cAAc,CAAC;AAC1C,QAAM,cAAc,QAAQ,eAAe;AAC3C,QAAM,OAAO,QAAQ;AACrB,QAAM,WAAW,eAAe,IAAI;AAEpC,MAAI,kBACF,QAAQ,mBACR,QAAQ,0BACR,WAAW,WAAW,SAAS,CAAC,KAChC;AACF,MAAI,gBAAgB;AACpB,MAAI,aAAa;AACjB,MAAI,WAAW;AACf,MAAI,eAAe;AACnB,MAAI,kBAAkB;AACtB,MAAI,eAAe,QAAQ;AAC3B,MAAI,YAAY,QAAQ;AAExB,QAAM,YAAY,oBAAI,IAAgB;AACtC,QAAM,OAAO,MAAM;AACjB,eAAW,YAAY,UAAW,UAAS;AAAA,EAC7C;AAEA,QAAM,QAAqB;AAAA,IACzB,UAAU;AACR,UAAI,CAAC,SAAU;AACf,iBAAW;AACX,UAAI,WAAW,SAAS,KAAK,gBAAgB,GAAG;AAC9C,cAAM,OAAO;AAAA,UACX;AAAA,UACA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A,EACF;AAEA,SAAO;AACT;","names":["sign"]}
1
+ {"version":3,"sources":["../../../src/components/drawer/drawer-store.ts"],"sourcesContent":["import type { DrawerSide } from \"./types.js\";\nimport type { DrawerStoreOptions, DrawerStore } from \"./types.js\";\n\nfunction isVerticalSide(side: DrawerSide): boolean {\n return side === \"top\" || side === \"bottom\";\n}\n\nfunction snapToNearest(\n snapPoints: readonly number[],\n currentSnap: number,\n dragOffset: number,\n containerSize: number,\n dismissible: boolean,\n): number | null {\n if (containerSize <= 0) return currentSnap;\n const openSize = currentSnap * containerSize;\n const projected = openSize - dragOffset;\n const ratio = projected / containerSize;\n\n if (dismissible && ratio < 0.25) return null;\n\n let nearest = snapPoints[0] ?? currentSnap;\n let nearestDistance = Math.abs(ratio - nearest);\n for (const point of snapPoints) {\n const distance = Math.abs(ratio - point);\n if (distance < nearestDistance) {\n nearest = point;\n nearestDistance = distance;\n }\n }\n return nearest;\n}\n\nexport function createDrawerStore(options: DrawerStoreOptions): DrawerStore {\n const snapPoints = options.snapPoints ?? [];\n const dismissible = options.dismissible ?? true;\n let side = options.side;\n\n let activeSnapPoint =\n options.activeSnapPoint ??\n options.defaultActiveSnapPoint ??\n snapPoints[snapPoints.length - 1] ??\n 1;\n let containerSize = 0;\n let dragOffset = 0;\n let dragging = false;\n let pointerStart = 0;\n let dragStartOffset = 0;\n let onSnapChange = options.onSnapChange;\n let onDismiss = options.onDismiss;\n\n const listeners = new Set<() => void>();\n const emit = () => {\n for (const listener of listeners) listener();\n };\n\n const store: DrawerStore = {\n endDrag() {\n if (!dragging) return;\n dragging = false;\n if (snapPoints.length > 0 && containerSize > 0) {\n const next = snapToNearest(\n snapPoints,\n activeSnapPoint,\n dragOffset,\n containerSize,\n dismissible,\n );\n if (next === null) {\n dragOffset = 0;\n emit();\n onDismiss?.();\n return;\n }\n activeSnapPoint = next;\n onSnapChange?.(next);\n }\n dragOffset = 0;\n emit();\n },\n getActiveSnapPoint: () => activeSnapPoint,\n getDragOffset: () => dragOffset,\n getTransform() {\n if (snapPoints.length === 0) return \"\";\n const openPx = activeSnapPoint * containerSize;\n const delta = openPx - dragOffset;\n const closedPx = containerSize;\n const offset = closedPx - delta;\n if (isVerticalSide(side)) {\n const sign = side === \"bottom\" ? 1 : -1;\n return `translate${side === \"bottom\" || side === \"top\" ? \"Y\" : \"X\"}(${sign * offset}px)`;\n }\n const sign = side === \"right\" ? 1 : -1;\n return `translateX(${sign * offset}px)`;\n },\n isDragging: () => dragging,\n moveDrag(clientCoord) {\n if (!dragging) return;\n const delta = clientCoord - pointerStart;\n const signedDelta = side === \"top\" || side === \"left\" ? -delta : delta;\n dragOffset = Math.max(0, dragStartOffset + signedDelta);\n emit();\n },\n setSide(nextSide) {\n if (side === nextSide) return;\n side = nextSide;\n emit();\n },\n setContainerSize(size) {\n if (size === containerSize) return;\n containerSize = size;\n emit();\n },\n startDrag(clientCoord) {\n if (snapPoints.length === 0) return;\n dragging = true;\n pointerStart = clientCoord;\n dragStartOffset = dragOffset;\n emit();\n },\n subscribe(listener) {\n listeners.add(listener);\n return () => listeners.delete(listener);\n },\n syncActiveSnapPoint(snap) {\n if (snap === activeSnapPoint) return;\n activeSnapPoint = snap;\n emit();\n },\n };\n\n return store;\n}\n"],"mappings":"AAGA,SAAS,eAAe,MAA2B;AACjD,SAAO,SAAS,SAAS,SAAS;AACpC;AAEA,SAAS,cACP,YACA,aACA,YACA,eACA,aACe;AACf,MAAI,iBAAiB,EAAG,QAAO;AAC/B,QAAM,WAAW,cAAc;AAC/B,QAAM,YAAY,WAAW;AAC7B,QAAM,QAAQ,YAAY;AAE1B,MAAI,eAAe,QAAQ,KAAM,QAAO;AAExC,MAAI,UAAU,WAAW,CAAC,KAAK;AAC/B,MAAI,kBAAkB,KAAK,IAAI,QAAQ,OAAO;AAC9C,aAAW,SAAS,YAAY;AAC9B,UAAM,WAAW,KAAK,IAAI,QAAQ,KAAK;AACvC,QAAI,WAAW,iBAAiB;AAC9B,gBAAU;AACV,wBAAkB;AAA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,cAAc,OAAO,MAAM;AAAA,IACpC;AAAA,IACA,YAAY,MAAM;AAAA,IAClB,SAAS,aAAa;AACpB,UAAI,CAAC,SAAU;AACf,YAAM,QAAQ,cAAc;AAC5B,YAAM,cAAc,SAAS,SAAS,SAAS,SAAS,CAAC,QAAQ;AACjE,mBAAa,KAAK,IAAI,GAAG,kBAAkB,WAAW;AACtD,WAAK;AAAA,IACP;AAAA,IACA,QAAQ,UAAU;AAChB,UAAI,SAAS,SAAU;AACvB,aAAO;AACP,WAAK;AAAA,IACP;AAAA,IACA,iBAAiB,MAAM;AACrB,UAAI,SAAS,cAAe;AAC5B,sBAAgB;AAChB,WAAK;AAAA,IACP;AAAA,IACA,UAAU,aAAa;AACrB,UAAI,WAAW,WAAW,EAAG;AAC7B,iBAAW;AACX,qBAAe;AACf,wBAAkB;AAClB,WAAK;AAAA,IACP;AAAA,IACA,UAAU,UAAU;AAClB,gBAAU,IAAI,QAAQ;AACtB,aAAO,MAAM,UAAU,OAAO,QAAQ;AAAA,IACxC;AAAA,IACA,oBAAoB,MAAM;AACxB,UAAI,SAAS,gBAAiB;AAC9B,wBAAkB;AAClB,WAAK;AAAA,IACP;AAAA,EACF;AAEA,SAAO;AACT;","names":["sign"]}
@@ -1,5 +1,5 @@
1
1
  export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerHandle, DrawerRoot, DrawerTitle, DrawerTrigger, } from "./Drawer.js";
2
- export { DrawerPanel } from "./DrawerNative.js";
3
- export type { DrawerCloseOwnProps, DrawerCloseProps, DrawerContentOwnProps, DrawerContentProps, DrawerDescriptionOwnProps, DrawerHandleOwnProps, DrawerRootOwnProps, DrawerRootProps, DrawerTitleOwnProps, DrawerTriggerOwnProps, DrawerTriggerProps, } from "./client-types.js";
4
- export type { DrawerProps, DrawerSide } from "./types.js";
2
+ export { DrawerPanel, DrawerNativeTrigger, DrawerNativeClose, DrawerNativeContent, } from "./DrawerNative.js";
3
+ export type { DrawerCloseOwnProps, DrawerCloseProps, DrawerContentOwnProps, DrawerContentProps, DrawerDescriptionOwnProps, DrawerHandleOwnProps, DrawerRootOwnProps, DrawerRootProps, DrawerTitleOwnProps, DrawerTriggerOwnProps, DrawerTriggerProps, } from "./types.js";
4
+ export type { DrawerProps, DrawerSide, DrawerAppearanceProps, DrawerNativeContentProps, DrawerNativeInvokerProps, } from "./types.js";
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/drawer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,UAAU,EACV,WAAW,EACX,aAAa,GACd,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,YAAY,EACV,mBAAmB,EACnB,gBAAgB,EAChB,qBAAqB,EACrB,kBAAkB,EAClB,yBAAyB,EACzB,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,EACf,mBAAmB,EACnB,qBAAqB,EACrB,kBAAkB,GACnB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/drawer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,UAAU,EACV,WAAW,EACX,aAAa,GACd,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,WAAW,EACX,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EACV,mBAAmB,EACnB,gBAAgB,EAChB,qBAAqB,EACrB,kBAAkB,EAClB,yBAAyB,EACzB,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,EACf,mBAAmB,EACnB,qBAAqB,EACrB,kBAAkB,GACnB,MAAM,YAAY,CAAC;AACpB,YAAY,EACV,WAAW,EACX,UAAU,EACV,qBAAqB,EACrB,wBAAwB,EACxB,wBAAwB,GACzB,MAAM,YAAY,CAAC"}
@@ -8,13 +8,21 @@ import {
8
8
  DrawerTitle,
9
9
  DrawerTrigger
10
10
  } from "./Drawer.js";
11
- import { DrawerPanel } from "./DrawerNative.js";
11
+ import {
12
+ DrawerPanel,
13
+ DrawerNativeTrigger,
14
+ DrawerNativeClose,
15
+ DrawerNativeContent
16
+ } from "./DrawerNative.js";
12
17
  export {
13
18
  Drawer,
14
19
  DrawerClose,
15
20
  DrawerContent,
16
21
  DrawerDescription,
17
22
  DrawerHandle,
23
+ DrawerNativeClose,
24
+ DrawerNativeContent,
25
+ DrawerNativeTrigger,
18
26
  DrawerPanel,
19
27
  DrawerRoot,
20
28
  DrawerTitle,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/drawer/index.ts"],"sourcesContent":["export {\n Drawer,\n DrawerClose,\n DrawerContent,\n DrawerDescription,\n DrawerHandle,\n DrawerRoot,\n DrawerTitle,\n DrawerTrigger,\n} from \"./Drawer.js\";\nexport { DrawerPanel } from \"./DrawerNative.js\";\nexport type {\n DrawerCloseOwnProps,\n DrawerCloseProps,\n DrawerContentOwnProps,\n DrawerContentProps,\n DrawerDescriptionOwnProps,\n DrawerHandleOwnProps,\n DrawerRootOwnProps,\n DrawerRootProps,\n DrawerTitleOwnProps,\n DrawerTriggerOwnProps,\n DrawerTriggerProps,\n} from \"./client-types.js\";\nexport type { DrawerProps, DrawerSide } from \"./types.js\";\n"],"mappings":"AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,mBAAmB;","names":[]}
1
+ {"version":3,"sources":["../../../src/components/drawer/index.ts"],"sourcesContent":["export {\n Drawer,\n DrawerClose,\n DrawerContent,\n DrawerDescription,\n DrawerHandle,\n DrawerRoot,\n DrawerTitle,\n DrawerTrigger,\n} from \"./Drawer.js\";\nexport {\n DrawerPanel,\n DrawerNativeTrigger,\n DrawerNativeClose,\n DrawerNativeContent,\n} from \"./DrawerNative.js\";\nexport type {\n DrawerCloseOwnProps,\n DrawerCloseProps,\n DrawerContentOwnProps,\n DrawerContentProps,\n DrawerDescriptionOwnProps,\n DrawerHandleOwnProps,\n DrawerRootOwnProps,\n DrawerRootProps,\n DrawerTitleOwnProps,\n DrawerTriggerOwnProps,\n DrawerTriggerProps,\n} from \"./types.js\";\nexport type {\n DrawerProps,\n DrawerSide,\n DrawerAppearanceProps,\n DrawerNativeContentProps,\n DrawerNativeInvokerProps,\n} from \"./types.js\";\n"],"mappings":"AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;","names":[]}
@@ -1,13 +1,124 @@
1
- import type { ReactNode } from "react";
1
+ import type { ComponentPropsWithRef, CSSProperties, MouseEvent, PointerEvent, ReactNode, Ref, RefObject } from "react";
2
+ import type { DialogChangeHandler, UseDialogReturn } from "@gunkin/uiify/core/dialog";
2
3
  export type DrawerSide = "top" | "right" | "bottom" | "left";
3
- export interface DrawerProps {
4
+ export interface DrawerAppearanceProps {
5
+ readonly size?: "sm" | "md" | "lg" | "full";
6
+ readonly dismiss?: "any" | "closerequest" | "none";
7
+ readonly backdrop?: "opaque" | "transparent";
8
+ }
9
+ export interface DrawerProps extends DrawerAppearanceProps {
4
10
  readonly id: string;
5
11
  readonly trigger: ReactNode;
6
12
  readonly title: ReactNode;
7
13
  readonly description?: ReactNode;
8
14
  readonly children?: ReactNode;
9
- readonly closeLabel?: ReactNode;
15
+ readonly closeLabel?: string;
16
+ readonly footer?: ReactNode;
17
+ readonly side?: DrawerSide;
18
+ readonly className?: string;
19
+ }
20
+ export interface DrawerNativeContentProps extends Omit<ComponentPropsWithRef<"dialog">, "open" | "popover" | "closedby">, DrawerAppearanceProps {
21
+ readonly id: string;
22
+ readonly side?: DrawerSide;
23
+ }
24
+ export interface DrawerNativeInvokerProps extends Omit<ComponentPropsWithRef<"button">, "command" | "commandFor"> {
25
+ readonly target: string;
26
+ }
27
+ export interface DrawerStoreOptions {
28
+ readonly activeSnapPoint?: number;
29
+ readonly defaultActiveSnapPoint?: number;
30
+ readonly dismissible?: boolean;
31
+ readonly onDismiss?: () => void;
32
+ readonly onSnapChange?: (snap: number) => void;
33
+ readonly side: DrawerSide;
34
+ readonly snapPoints?: readonly number[];
35
+ }
36
+ export interface DrawerStore {
37
+ readonly endDrag: () => void;
38
+ readonly getActiveSnapPoint: () => number;
39
+ readonly getDragOffset: () => number;
40
+ readonly getTransform: () => string;
41
+ readonly isDragging: () => boolean;
42
+ readonly moveDrag: (clientCoord: number) => void;
43
+ readonly setSide: (side: DrawerSide) => void;
44
+ readonly setContainerSize: (size: number) => void;
45
+ readonly startDrag: (clientCoord: number) => void;
46
+ readonly subscribe: (listener: () => void) => () => void;
47
+ readonly syncActiveSnapPoint: (snap: number) => void;
48
+ }
49
+ export interface DrawerContextValue {
50
+ readonly close: (returnValue?: string) => void;
51
+ readonly contentId: string;
52
+ readonly descriptionId: string | undefined;
53
+ readonly dialogProps: UseDialogReturn["dialogProps"];
54
+ readonly dialogRef: UseDialogReturn["dialogRef"];
55
+ readonly dismissible: boolean;
56
+ readonly closeOnOverlayClick: boolean;
57
+ readonly labelId: string | undefined;
58
+ readonly modal: boolean;
59
+ readonly open: boolean;
60
+ readonly openDialog: () => void;
61
+ readonly setDescriptionId: (id: string | undefined) => void;
62
+ readonly setLabelId: (id: string | undefined) => void;
63
+ readonly side: DrawerSide;
64
+ readonly snapEnabled: boolean;
65
+ readonly store: DrawerStore;
66
+ readonly triggerRef: RefObject<HTMLButtonElement | null>;
67
+ }
68
+ export interface DrawerRootOwnProps {
69
+ readonly activeSnapPoint?: number;
70
+ readonly closeOnOverlayClick?: boolean;
71
+ readonly defaultActiveSnapPoint?: number;
72
+ readonly defaultOpen?: boolean;
73
+ readonly dismissible?: boolean;
74
+ readonly modal?: boolean;
75
+ readonly onOpenChange?: DialogChangeHandler;
76
+ readonly onSnapChange?: (snap: number) => void;
77
+ readonly open?: boolean;
10
78
  readonly side?: DrawerSide;
79
+ readonly snapPoints?: readonly number[];
80
+ }
81
+ export interface DrawerRootProps extends DrawerRootOwnProps {
82
+ readonly children?: ReactNode;
83
+ }
84
+ export interface DrawerTriggerOwnProps {
85
+ readonly children?: ReactNode;
86
+ readonly className?: string;
87
+ }
88
+ export interface DrawerTriggerProps extends DrawerTriggerOwnProps, Omit<ComponentPropsWithRef<"button">, "type" | keyof DrawerTriggerOwnProps> {
89
+ readonly onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
90
+ readonly ref?: Ref<HTMLButtonElement>;
91
+ }
92
+ export interface DrawerContentOwnProps extends DrawerAppearanceProps {
93
+ readonly children?: ReactNode;
94
+ readonly className?: string;
95
+ readonly style?: CSSProperties;
96
+ }
97
+ export interface DrawerContentProps extends DrawerContentOwnProps, Omit<ComponentPropsWithRef<"dialog">, "id" | "open" | "closedby" | keyof DrawerContentOwnProps> {
98
+ readonly onCancel?: DrawerContextValue["dialogProps"]["onCancel"];
99
+ readonly onClose?: DrawerContextValue["dialogProps"]["onClose"];
100
+ readonly ref?: Ref<HTMLDialogElement>;
101
+ }
102
+ export interface DrawerTitleOwnProps extends Omit<ComponentPropsWithRef<"h2">, "id"> {
103
+ readonly children?: ReactNode;
104
+ readonly className?: string;
105
+ }
106
+ export interface DrawerDescriptionOwnProps extends Omit<ComponentPropsWithRef<"p">, "id"> {
107
+ readonly children?: ReactNode;
108
+ readonly className?: string;
109
+ }
110
+ export interface DrawerCloseOwnProps {
111
+ readonly children?: ReactNode;
112
+ readonly className?: string;
113
+ }
114
+ export interface DrawerCloseProps extends DrawerCloseOwnProps, Omit<ComponentPropsWithRef<"button">, "type" | keyof DrawerCloseOwnProps> {
115
+ readonly onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
116
+ }
117
+ export interface DrawerHandleOwnProps extends ComponentPropsWithRef<"div"> {
11
118
  readonly className?: string;
119
+ readonly onPointerCancel?: (event: PointerEvent<HTMLDivElement>) => void;
120
+ readonly onPointerDown?: (event: PointerEvent<HTMLDivElement>) => void;
121
+ readonly onPointerMove?: (event: PointerEvent<HTMLDivElement>) => void;
122
+ readonly onPointerUp?: (event: PointerEvent<HTMLDivElement>) => void;
12
123
  }
13
124
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/drawer/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE7D,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAC1B,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,CAAC;IACjC,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,CAAC;IAChC,QAAQ,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC;IAC3B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/drawer/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,aAAa,EACb,UAAU,EACV,YAAY,EACZ,SAAS,EACT,GAAG,EACH,SAAS,EACV,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAA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AE,0BAA0B,CAAC,GAAG,CAAC,GACjC,YAAY,GAAG,IAAI,CAErB;yBAJe,qBAAqB;;;AAerC,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,GAAG,YAAY,GAAG,IAAI,CAsBhF;yBAtBe,eAAe;;;AAuB/B,wBAAgB,sBAAsB,CAAC,GAAG,SAAS,WAAW,GAAG,QAAQ,EACvE,KAAK,EAAE,2BAA2B,CAAC,GAAG,CAAC,GACtC,YAAY,GAAG,IAAI,CA6ErB;yBA/Ee,sBAAsB;;;AAgFtC,wBAAgB,sBAAsB,CAAC,GAAG,SAAS,WAAW,GAAG,KAAK,EACpE,KAAK,EAAE,2BAA2B,CAAC,GAAG,CAAC,GACtC,YAAY,GAAG,IAAI,CA0DrB;yBA5De,sBAAsB;;;AAmFtC,eAAO,MAAM,YAAY;;;;;;;;;SA9OY,GAAG,SAAS,WAAW,cACvD,yBAAyB,CAAC,GAAG,CAAC;;;;SAEE,GAAG,SAAS,WAAW,cACvD,yBAAyB,CAAC,GAAG,CAAC;;;;SAES,GAAG,SAAS,WAAW,cAC9D,gCAAgC,CAAC,GAAG,CAAC;;;;SAEL,GAAG,SAAS,WAAW,cACvD,yBAAyB,CAAC,GAAG,CAAC;;;;;;;;;;;CAwPlC,CAAC"}
@@ -130,6 +130,7 @@ function DropdownMenuTrigger(props) {
130
130
  ...triggerProps,
131
131
  ...anchorProps,
132
132
  ref: mergedRef,
133
+ ...nativeButton ? { "data-uiify-button": "" } : {},
133
134
  "aria-haspopup": "menu",
134
135
  "data-part": "trigger",
135
136
  "data-state": open ? "open" : "closed",