@vireo-ai/trellis-ui 0.1.8 → 0.1.10

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 (173) hide show
  1. package/package.json +8 -4
  2. package/packages/client/src/components/app/styles.css +1 -30
  3. package/packages/client/src/components/button/styles.css +1 -122
  4. package/packages/client/src/components/date-picker/styles.css +47 -77
  5. package/packages/client/src/components/field/styles.css +10 -0
  6. package/packages/client/src/components/file-upload/styles.css +0 -28
  7. package/packages/client/src/components/panels/styles.css +43 -0
  8. package/packages/client/src/components/radio/styles.css +26 -21
  9. package/packages/client/src/components/scroll-area/styles.css +0 -4
  10. package/packages/client/src/components/select/styles.css +0 -30
  11. package/packages/client/src/components/sidebar/styles.css +8 -0
  12. package/packages/client/src/components/toast/styles.css +14 -7
  13. package/packages/client/src/styles/components.css +1 -0
  14. package/packages/client/src/styles/generated/theme-fonts.css +5 -0
  15. package/packages/client/src/styles/generated/theme-palette.css +2656 -0
  16. package/packages/client/src/styles/generated/theme-runtime.css +2966 -0
  17. package/packages/client/src/styles/generated-sources.css +1 -1
  18. package/packages/client/src/styles/static.css +1 -0
  19. package/packages/client/src/styles/theme.css +777 -738
  20. package/packages/client/types/cdn.d.ts +1 -4
  21. package/packages/client/types/component-api.d.ts +21 -0
  22. package/packages/client/types/components/accordion/contract.d.ts +3 -2
  23. package/packages/client/types/components/accordion/index.d.ts +28 -42
  24. package/packages/client/types/components/accordion/machine.d.ts +131 -0
  25. package/packages/client/types/components/accordion/runtime-docs.d.ts +2 -0
  26. package/packages/client/types/components/action/contract.d.ts +3 -3
  27. package/packages/client/types/components/app/contract.d.ts +25 -12
  28. package/packages/client/types/components/app/index.d.ts +2 -2
  29. package/packages/client/types/components/badge/contract.d.ts +5 -5
  30. package/packages/client/types/components/box/contract.d.ts +25 -28
  31. package/packages/client/types/components/brand/contract.d.ts +2 -2
  32. package/packages/client/types/components/button/contract.d.ts +5 -5
  33. package/packages/client/types/components/card/contract.d.ts +28 -31
  34. package/packages/client/types/components/checkbox/contract.d.ts +17 -17
  35. package/packages/client/types/components/checkbox/index.d.ts +20 -26
  36. package/packages/client/types/components/checkbox/machine.d.ts +41 -0
  37. package/packages/client/types/components/checkbox/runtime-docs.d.ts +2 -0
  38. package/packages/client/types/components/common.d.ts +53 -235
  39. package/packages/client/types/components/container/contract.d.ts +11 -12
  40. package/packages/client/types/components/date-picker/contract.d.ts +21 -16
  41. package/packages/client/types/components/date-picker/index.d.ts +38 -60
  42. package/packages/client/types/components/date-picker/machine.d.ts +529 -0
  43. package/packages/client/types/components/date-picker/runtime-docs.d.ts +2 -0
  44. package/packages/client/types/components/date-picker/value.d.ts +28 -0
  45. package/packages/client/types/components/dropdown/contract.d.ts +4 -4
  46. package/packages/client/types/components/dropdown/index.d.ts +20 -45
  47. package/packages/client/types/components/dropdown/machine.d.ts +93 -0
  48. package/packages/client/types/components/dropdown/runtime-docs.d.ts +2 -0
  49. package/packages/client/types/components/field/contract.d.ts +10 -6
  50. package/packages/client/types/components/field/index.d.ts +6 -6
  51. package/packages/client/types/components/field/machine.d.ts +13 -0
  52. package/packages/client/types/components/field/runtime-docs.d.ts +2 -0
  53. package/packages/client/types/components/file-upload/contract.d.ts +7 -4
  54. package/packages/client/types/components/file-upload/index.d.ts +34 -31
  55. package/packages/client/types/components/file-upload/machine.d.ts +127 -0
  56. package/packages/client/types/components/file-upload/runtime-docs.d.ts +2 -0
  57. package/packages/client/types/components/flex/contract.d.ts +16 -17
  58. package/packages/client/types/components/frame/contract.d.ts +41 -47
  59. package/packages/client/types/components/frame/index.d.ts +2 -2
  60. package/packages/client/types/components/grid/contract.d.ts +20 -21
  61. package/packages/client/types/components/heading/contract.d.ts +1 -1
  62. package/packages/client/types/components/image/contract.d.ts +3 -3
  63. package/packages/client/types/components/input/contract.d.ts +2 -2
  64. package/packages/client/types/components/input/index.d.ts +15 -12
  65. package/packages/client/types/components/input/machine.d.ts +20 -0
  66. package/packages/client/types/components/layout.d.ts +44 -225
  67. package/packages/client/types/components/menu/contract.d.ts +14 -8
  68. package/packages/client/types/components/modal/contract.d.ts +12 -12
  69. package/packages/client/types/components/modal/index.d.ts +41 -75
  70. package/packages/client/types/components/modal/machine.d.ts +129 -0
  71. package/packages/client/types/components/modal/runtime-docs.d.ts +2 -0
  72. package/packages/client/types/components/overlay/contract.d.ts +3 -3
  73. package/packages/client/types/components/panels/contract.d.ts +39 -0
  74. package/packages/client/types/components/panels/index.d.ts +54 -0
  75. package/packages/client/types/components/panels/machine.d.ts +151 -0
  76. package/packages/client/types/components/panels/runtime-docs.d.ts +2 -0
  77. package/packages/client/types/components/radio/contract.d.ts +11 -11
  78. package/packages/client/types/components/radio/index.d.ts +19 -23
  79. package/packages/client/types/components/radio/machine.d.ts +40 -0
  80. package/packages/client/types/components/radio/runtime-docs.d.ts +2 -0
  81. package/packages/client/types/components/runtime-docs.d.ts +2 -0
  82. package/packages/client/types/components/runtime.d.ts +16 -19
  83. package/packages/client/types/components/scroll-area/contract.d.ts +4 -7
  84. package/packages/client/types/components/scroll-area/index.d.ts +23 -49
  85. package/packages/client/types/components/scroll-area/machine.d.ts +21 -0
  86. package/packages/client/types/components/scroll-area/runtime-docs.d.ts +2 -0
  87. package/packages/client/types/components/section/contract.d.ts +12 -13
  88. package/packages/client/types/components/select/contract.d.ts +19 -15
  89. package/packages/client/types/components/select/index.d.ts +42 -89
  90. package/packages/client/types/components/select/machine.d.ts +476 -0
  91. package/packages/client/types/components/select/runtime-docs.d.ts +2 -0
  92. package/packages/client/types/components/shared/controlled-open.d.ts +11 -0
  93. package/packages/client/types/components/sidebar/contract.d.ts +19 -12
  94. package/packages/client/types/components/sidebar/index.d.ts +51 -88
  95. package/packages/client/types/components/sidebar/machine.d.ts +100 -0
  96. package/packages/client/types/components/sidebar/runtime-docs.d.ts +2 -0
  97. package/packages/client/types/components/slider/contract.d.ts +3 -3
  98. package/packages/client/types/components/slider/index.d.ts +17 -21
  99. package/packages/client/types/components/slider/machine.d.ts +37 -0
  100. package/packages/client/types/components/slider/runtime-docs.d.ts +2 -0
  101. package/packages/client/types/components/stack/contract.d.ts +16 -17
  102. package/packages/client/types/components/surface-manifest.d.ts +9 -0
  103. package/packages/client/types/components/switch/contract.d.ts +11 -11
  104. package/packages/client/types/components/switch/index.d.ts +13 -18
  105. package/packages/client/types/components/switch/machine.d.ts +19 -0
  106. package/packages/client/types/components/switch/runtime-docs.d.ts +2 -0
  107. package/packages/client/types/components/table/contract.d.ts +18 -18
  108. package/packages/client/types/components/tabs/contract.d.ts +10 -5
  109. package/packages/client/types/components/tabs/index.d.ts +33 -51
  110. package/packages/client/types/components/tabs/machine.d.ts +84 -0
  111. package/packages/client/types/components/tabs/runtime-docs.d.ts +2 -0
  112. package/packages/client/types/components/text/contract.d.ts +1 -1
  113. package/packages/client/types/components/textarea/contract.d.ts +2 -2
  114. package/packages/client/types/components/toast/contract.d.ts +5 -4
  115. package/packages/client/types/components/toast/index.d.ts +38 -12
  116. package/packages/client/types/components/toast/machine.d.ts +115 -0
  117. package/packages/client/types/components/toast/runtime-docs.d.ts +2 -0
  118. package/packages/client/types/directives/index.d.ts +3 -1
  119. package/packages/client/types/directives/layout.d.ts +3 -0
  120. package/packages/client/types/directives/request.d.ts +1 -2
  121. package/packages/client/types/directives/transition.d.ts +3 -0
  122. package/packages/client/types/docs/transition-docs.d.ts +30 -0
  123. package/packages/client/types/index.d.ts +8 -40
  124. package/packages/client/types/motion/animate.d.ts +5 -44
  125. package/packages/client/types/motion/controller.d.ts +33 -0
  126. package/packages/client/types/motion/index.d.ts +43 -20
  127. package/packages/client/types/motion/owned.d.ts +5 -0
  128. package/packages/client/types/motion/plan.d.ts +46 -0
  129. package/packages/client/types/motion/recipe.d.ts +56 -0
  130. package/packages/client/types/motion/registry.d.ts +12 -0
  131. package/packages/client/types/motion/resize.d.ts +15 -0
  132. package/packages/client/types/motion/subject.d.ts +10 -0
  133. package/packages/client/types/motion/targets.d.ts +2 -5
  134. package/packages/client/types/motion/view.d.ts +7 -2
  135. package/packages/client/types/runtime/alpine-machine.d.ts +68 -0
  136. package/packages/client/types/runtime/anchored-popover.d.ts +10 -2
  137. package/packages/client/types/runtime/codecs.d.ts +16 -2
  138. package/packages/client/types/runtime/{resizable.d.ts → drag-and-drop/index.d.ts} +4 -2
  139. package/packages/client/types/runtime/engine/request.d.ts +2 -2
  140. package/packages/client/types/runtime/engine/stream.d.ts +11 -5
  141. package/packages/client/types/runtime/focus-scope.d.ts +7 -0
  142. package/packages/client/types/runtime/identity.d.ts +3 -0
  143. package/packages/client/types/runtime/index.d.ts +9 -75
  144. package/packages/client/types/runtime/merge-bindings.d.ts +1 -1
  145. package/packages/client/types/runtime/semantic-observer.d.ts +10 -0
  146. package/packages/client/types/runtime/state-machine/index.d.ts +4 -0
  147. package/packages/client/types/runtime/state-machine/machine.d.ts +83 -0
  148. package/packages/client/types/runtime/state-machine/props-change.d.ts +12 -0
  149. package/packages/client/types/runtime/transition-coordinator.d.ts +52 -0
  150. package/packages/client/types/runtime/ui.d.ts +15 -0
  151. package/packages/client/types/utils/index.d.ts +2 -1
  152. package/packages/client/types/utils/number.d.ts +2 -0
  153. package/packages/client/types/utils/object.d.ts +4 -1
  154. package/packages/server/trellis_ui/static/trellis_ui/assets/css/trellis.css +9097 -2595
  155. package/packages/server/trellis_ui/static/trellis_ui/assets/css/trellis.min.css +1 -1
  156. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/index.js +17313 -13281
  157. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/index.js.map +1 -1
  158. package/packages/server/trellis_ui/static/trellis_ui/assets/js/trellis.js +8 -15
  159. package/packages/server/trellis_ui/static/trellis_ui/assets/js/trellis.min.js +8 -15
  160. package/packages/client/types/bindings/disclosure.d.ts +0 -3
  161. package/packages/client/types/bindings/index.d.ts +0 -7
  162. package/packages/client/types/bindings/motion.d.ts +0 -3
  163. package/packages/client/types/bindings/state.d.ts +0 -3
  164. package/packages/client/types/bindings/types.d.ts +0 -33
  165. package/packages/client/types/components/combobox/contract.d.ts +0 -60
  166. package/packages/client/types/components/combobox/index.d.ts +0 -80
  167. package/packages/client/types/components/textarea/index.d.ts +0 -13
  168. package/packages/client/types/motion/presence.d.ts +0 -34
  169. package/packages/client/types/runtime/class-name.d.ts +0 -9
  170. package/packages/client/types/runtime/create.d.ts +0 -8
  171. package/packages/client/types/runtime/machine.d.ts +0 -55
  172. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/cally-TZl4LpyH.js +0 -1134
  173. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/cally-TZl4LpyH.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { SURFACE_ALPHA_COMPOUNDS, type ComponentRadius, type Elevation, type LayoutSpace, type Surface, type SurfaceTone } from './common';
1
+ import { type ComponentRadius, type ElevationReference, type LayoutSpace, type SurfaceReference } from './common';
2
2
  declare const LAYOUT_AS_VALUES: readonly ["div", "section", "article", "aside", "header", "footer", "main", "nav", "form", "ul", "ol", "li", "span"];
3
3
  declare const LAYOUT_WIDTHS: readonly ["auto", "full", "xs", "sm", "md", "lg", "xl", "prose"];
4
4
  declare const LAYOUT_HEIGHTS: readonly ["auto", "full", "xs", "sm", "md", "lg", "xl"];
@@ -7,28 +7,27 @@ declare const LAYOUT_JUSTIFIES: readonly ["start", "center", "end", "between"];
7
7
  declare const LAYOUT_COLUMNS: readonly ["none", "1", "2", "3", "4", "5", "6"];
8
8
  declare const LAYOUT_ROWS: readonly ["none", "1", "2", "3", "4", "5", "6"];
9
9
  declare const layoutSurfaceSchema: {
10
- padding: import("../runtime/codecs").OneOfCodec<"0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9">;
11
- paddingX: import("../runtime/codecs").OneOfCodec<"0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9">;
12
- paddingY: import("../runtime/codecs").OneOfCodec<"0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9">;
13
- margin: import("../runtime/codecs").OneOfCodec<"0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9">;
14
- marginX: import("../runtime/codecs").OneOfCodec<"0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9">;
15
- marginY: import("../runtime/codecs").OneOfCodec<"0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9">;
16
- surface: import("../runtime/codecs").OneOfCodec<"none" | "subtle" | "accent" | "app" | "chrome" | "panel" | "raised" | "overlay" | "inverse">;
17
- tone: import("../runtime/codecs").OneOfCodec<"solid" | "alpha">;
10
+ padding: import("../runtime/codecs").OneOfCodec<"1" | "0" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "8.5" | "9.5" | "10.5" | "11.5">;
11
+ paddingX: import("../runtime/codecs").OneOfCodec<"1" | "0" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "8.5" | "9.5" | "10.5" | "11.5">;
12
+ paddingY: import("../runtime/codecs").OneOfCodec<"1" | "0" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "8.5" | "9.5" | "10.5" | "11.5">;
13
+ margin: import("../runtime/codecs").OneOfCodec<"1" | "0" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "8.5" | "9.5" | "10.5" | "11.5">;
14
+ marginX: import("../runtime/codecs").OneOfCodec<"1" | "0" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "8.5" | "9.5" | "10.5" | "11.5">;
15
+ marginY: import("../runtime/codecs").OneOfCodec<"1" | "0" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "8.5" | "9.5" | "10.5" | "11.5">;
16
+ surface: import("../runtime/codecs").OneOfCodec<"1" | "0" | "2" | "inherit" | "3" | "4" | "5" | "6" | "7" | "8" | "+1" | "+2" | "+3" | "+4" | "+5" | "+6" | "+7" | "+8">;
18
17
  radius: import("../runtime/codecs").OneOfCodec<"none" | "xs" | "sm" | "md" | "lg" | "full">;
19
- elevation: import("../runtime/codecs").OneOfCodec<"1" | "none" | "2" | "3" | "4" | "5" | "6">;
18
+ elevation: import("../runtime/codecs").OneOfCodec<"1" | "match" | "2" | "none" | "3" | "4" | "5" | "6" | "7" | "8">;
20
19
  width: import("../runtime/codecs").OneOfCodec<"xs" | "sm" | "md" | "lg" | "full" | "auto" | "xl" | "prose">;
21
20
  height: import("../runtime/codecs").OneOfCodec<"xs" | "sm" | "md" | "lg" | "full" | "auto" | "xl">;
22
21
  class: import("../runtime/codecs").StringCodec;
23
22
  };
24
23
  declare const layoutSpacingSchema: {
25
- gap: import("../runtime/codecs").OneOfCodec<"0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9">;
26
- gapX: import("../runtime/codecs").OneOfCodec<"0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9">;
27
- gapY: import("../runtime/codecs").OneOfCodec<"0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9">;
24
+ gap: import("../runtime/codecs").OneOfCodec<"1" | "0" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "8.5" | "9.5" | "10.5" | "11.5">;
25
+ gapX: import("../runtime/codecs").OneOfCodec<"1" | "0" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "8.5" | "9.5" | "10.5" | "11.5">;
26
+ gapY: import("../runtime/codecs").OneOfCodec<"1" | "0" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "8.5" | "9.5" | "10.5" | "11.5">;
28
27
  };
29
28
  declare const layoutAlignmentSchema: {
30
- align: import("../runtime/codecs").OneOfCodec<"end" | "center" | "start" | "stretch" | "baseline">;
31
- justify: import("../runtime/codecs").OneOfCodec<"end" | "center" | "start" | "between">;
29
+ align: import("../runtime/codecs").OneOfCodec<"start" | "center" | "end" | "stretch" | "baseline">;
30
+ justify: import("../runtime/codecs").OneOfCodec<"start" | "center" | "end" | "between">;
32
31
  };
33
32
  declare const layoutSurfaceDetails: {
34
33
  padding: {
@@ -52,9 +51,6 @@ declare const layoutSurfaceDetails: {
52
51
  surface: {
53
52
  description: string;
54
53
  };
55
- tone: {
56
- description: string;
57
- };
58
54
  radius: {
59
55
  description: string;
60
56
  };
@@ -124,12 +120,12 @@ declare const LAYOUT_JUSTIFY_CLASSES: {
124
120
  };
125
121
  declare const LAYOUT_COLUMN_CLASSES: {
126
122
  readonly none: "";
127
- readonly '1': "grid-cols-1";
128
- readonly '2': "grid-cols-1 sm:grid-cols-2";
129
- readonly '3': "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3";
130
- readonly '4': "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4";
131
- readonly '5': "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-5";
132
- readonly '6': "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-6";
123
+ readonly '1': "";
124
+ readonly '2': "";
125
+ readonly '3': "";
126
+ readonly '4': "";
127
+ readonly '5': "";
128
+ readonly '6': "";
133
129
  };
134
130
  declare const LAYOUT_ROW_CLASSES: {
135
131
  readonly none: "";
@@ -141,145 +137,22 @@ declare const LAYOUT_ROW_CLASSES: {
141
137
  readonly '6': "grid-rows-6";
142
138
  };
143
139
  declare const layoutBaseVariants: {
144
- gap: {
145
- readonly '0': "";
146
- readonly '1': "gap-1";
147
- readonly '2': "gap-2";
148
- readonly '3': "gap-3";
149
- readonly '4': "gap-4";
150
- readonly '5': "gap-5";
151
- readonly '6': "gap-6";
152
- readonly '7': "gap-7";
153
- readonly '8': "gap-8";
154
- readonly '9': "gap-9";
155
- };
156
- gapX: {
157
- readonly '0': "";
158
- readonly '1': "gap-x-1";
159
- readonly '2': "gap-x-2";
160
- readonly '3': "gap-x-3";
161
- readonly '4': "gap-x-4";
162
- readonly '5': "gap-x-5";
163
- readonly '6': "gap-x-6";
164
- readonly '7': "gap-x-7";
165
- readonly '8': "gap-x-8";
166
- readonly '9': "gap-x-9";
167
- };
168
- gapY: {
169
- readonly '0': "";
170
- readonly '1': "gap-y-1";
171
- readonly '2': "gap-y-2";
172
- readonly '3': "gap-y-3";
173
- readonly '4': "gap-y-4";
174
- readonly '5': "gap-y-5";
175
- readonly '6': "gap-y-6";
176
- readonly '7': "gap-y-7";
177
- readonly '8': "gap-y-8";
178
- readonly '9': "gap-y-9";
179
- };
180
- padding: {
181
- readonly '0': "";
182
- readonly '1': "p-1";
183
- readonly '2': "p-2";
184
- readonly '3': "p-3";
185
- readonly '4': "p-4";
186
- readonly '5': "p-5";
187
- readonly '6': "p-6";
188
- readonly '7': "p-7";
189
- readonly '8': "p-8";
190
- readonly '9': "p-9";
191
- };
192
- paddingX: {
193
- readonly '0': "";
194
- readonly '1': "px-1";
195
- readonly '2': "px-2";
196
- readonly '3': "px-3";
197
- readonly '4': "px-4";
198
- readonly '5': "px-5";
199
- readonly '6': "px-6";
200
- readonly '7': "px-7";
201
- readonly '8': "px-8";
202
- readonly '9': "px-9";
203
- };
204
- paddingY: {
205
- readonly '0': "";
206
- readonly '1': "py-1";
207
- readonly '2': "py-2";
208
- readonly '3': "py-3";
209
- readonly '4': "py-4";
210
- readonly '5': "py-5";
211
- readonly '6': "py-6";
212
- readonly '7': "py-7";
213
- readonly '8': "py-8";
214
- readonly '9': "py-9";
215
- };
216
- margin: {
217
- readonly '0': "";
218
- readonly '1': "m-1";
219
- readonly '2': "m-2";
220
- readonly '3': "m-3";
221
- readonly '4': "m-4";
222
- readonly '5': "m-5";
223
- readonly '6': "m-6";
224
- readonly '7': "m-7";
225
- readonly '8': "m-8";
226
- readonly '9': "m-9";
227
- };
228
- marginX: {
229
- readonly '0': "";
230
- readonly '1': "mx-1";
231
- readonly '2': "mx-2";
232
- readonly '3': "mx-3";
233
- readonly '4': "mx-4";
234
- readonly '5': "mx-5";
235
- readonly '6': "mx-6";
236
- readonly '7': "mx-7";
237
- readonly '8': "mx-8";
238
- readonly '9': "mx-9";
239
- };
240
- marginY: {
241
- readonly '0': "";
242
- readonly '1': "my-1";
243
- readonly '2': "my-2";
244
- readonly '3': "my-3";
245
- readonly '4': "my-4";
246
- readonly '5': "my-5";
247
- readonly '6': "my-6";
248
- readonly '7': "my-7";
249
- readonly '8': "my-8";
250
- readonly '9': "my-9";
251
- };
252
- surface: {
253
- readonly none: "bg-transparent text-inherit";
254
- readonly app: "bg-app text-foreground";
255
- readonly chrome: "bg-chrome text-foreground";
256
- readonly subtle: "bg-surface-subtle text-foreground";
257
- readonly panel: "bg-surface-panel text-foreground";
258
- readonly raised: "bg-surface-raised text-foreground";
259
- readonly overlay: "bg-surface-overlay text-foreground";
260
- readonly accent: "bg-surface-accent text-surface-accent-fg";
261
- readonly inverse: "bg-surface-inverse text-surface-inverse-fg";
262
- };
263
- tone: {
264
- readonly solid: "";
265
- readonly alpha: "";
266
- };
140
+ gap: Record<"1" | "0" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "8.5" | "9.5" | "10.5" | "11.5", string>;
141
+ gapX: Record<"1" | "0" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "8.5" | "9.5" | "10.5" | "11.5", string>;
142
+ gapY: Record<"1" | "0" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "8.5" | "9.5" | "10.5" | "11.5", string>;
143
+ padding: Record<"1" | "0" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "8.5" | "9.5" | "10.5" | "11.5", string>;
144
+ paddingX: Record<"1" | "0" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "8.5" | "9.5" | "10.5" | "11.5", string>;
145
+ paddingY: Record<"1" | "0" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "8.5" | "9.5" | "10.5" | "11.5", string>;
146
+ margin: Record<"1" | "0" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "8.5" | "9.5" | "10.5" | "11.5", string>;
147
+ marginX: Record<"1" | "0" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "8.5" | "9.5" | "10.5" | "11.5", string>;
148
+ marginY: Record<"1" | "0" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "8.5" | "9.5" | "10.5" | "11.5", string>;
267
149
  radius: {
268
150
  readonly none: "";
269
- readonly xs: "rounded-1";
270
- readonly sm: "rounded-2";
271
- readonly md: "rounded-3";
272
- readonly lg: "rounded-4";
273
- readonly full: "rounded-6";
274
- };
275
- elevation: {
276
- readonly none: "shadow-none";
277
- readonly '1': "shadow-1";
278
- readonly '2': "shadow-2";
279
- readonly '3': "shadow-3";
280
- readonly '4': "shadow-4";
281
- readonly '5': "shadow-5";
282
- readonly '6': "shadow-6";
151
+ readonly xs: "rounded-surface-xs";
152
+ readonly sm: "rounded-surface-sm";
153
+ readonly md: "rounded-surface-md";
154
+ readonly lg: "rounded-surface-lg";
155
+ readonly full: "rounded-full";
283
156
  };
284
157
  width: {
285
158
  readonly auto: "";
@@ -324,78 +197,24 @@ declare const layoutBaseDefaults: {
324
197
  margin: string;
325
198
  marginX: string;
326
199
  marginY: string;
327
- surface: string;
328
- tone: string;
329
200
  radius: string;
330
- elevation: string;
331
201
  width: string;
332
202
  height: string;
333
203
  align: string;
334
204
  justify: string;
335
205
  };
336
206
  declare const layoutTokens: readonly [{
337
- readonly name: "--color-app";
338
- readonly description: "Application background surface.";
339
- }, {
340
- readonly name: "--color-chrome";
341
- readonly description: "Application chrome surface.";
342
- }, {
343
- readonly name: "--color-chrome-alpha";
344
- readonly description: "Translucent application chrome surface.";
345
- }, {
346
- readonly name: "--color-surface-subtle";
347
- readonly description: "Quiet grouping surface.";
348
- }, {
349
- readonly name: "--color-surface-panel";
350
- readonly description: "Contained foreground surface.";
351
- }, {
352
- readonly name: "--color-surface-panel-alpha";
353
- readonly description: "Translucent contained foreground surface.";
354
- }, {
355
- readonly name: "--color-surface-raised";
356
- readonly description: "Inline surface lifted one layer above the current pane.";
357
- }, {
358
- readonly name: "--color-surface-overlay";
359
- readonly description: "Floating overlay surface.";
360
- }, {
361
- readonly name: "--color-surface-overlay-alpha";
362
- readonly description: "Translucent floating overlay surface.";
363
- }, {
364
- readonly name: "--color-foreground";
365
- readonly description: "Default surface foreground.";
366
- }, {
367
- readonly name: "--color-surface-accent";
368
- readonly description: "Accent surface background.";
369
- }, {
370
- readonly name: "--color-surface-accent-fg";
371
- readonly description: "Accent surface foreground.";
372
- }, {
373
- readonly name: "--color-surface-inverse";
374
- readonly description: "Inverse surface background.";
375
- }, {
376
- readonly name: "--color-surface-inverse-fg";
377
- readonly description: "Inverse surface foreground.";
378
- }, {
379
- readonly name: "--shadow-border";
380
- readonly description: "Tokenized edge-ring shadow.";
381
- }, {
382
- readonly name: "--shadow-1";
383
- readonly description: "Elevation step 1, aliased to the adaptive edge ring.";
384
- }, {
385
- readonly name: "--shadow-2";
386
- readonly description: "Elevation step 2.";
387
- }, {
388
- readonly name: "--shadow-3";
389
- readonly description: "Elevation step 3.";
207
+ readonly name: "--ui-surface-color";
208
+ readonly description: "Resolved generated surface background.";
390
209
  }, {
391
- readonly name: "--shadow-4";
392
- readonly description: "Elevation step 4.";
210
+ readonly name: "--ui-surface-ink";
211
+ readonly description: "Primary ink paired with the resolved surface.";
393
212
  }, {
394
- readonly name: "--shadow-5";
395
- readonly description: "Elevation step 5.";
213
+ readonly name: "--ui-surface-ink-muted";
214
+ readonly description: "Muted ink paired with the resolved surface.";
396
215
  }, {
397
- readonly name: "--shadow-6";
398
- readonly description: "Elevation step 6.";
216
+ readonly name: "--ui-active-elevation-shadow-layers";
217
+ readonly description: "Resolved generated elevation composition.";
399
218
  }];
400
219
  type LayoutAs = typeof LAYOUT_AS_VALUES[number];
401
220
  type LayoutWidth = typeof LAYOUT_WIDTHS[number];
@@ -404,5 +223,5 @@ type LayoutAlign = typeof LAYOUT_ALIGNS[number];
404
223
  type LayoutJustify = typeof LAYOUT_JUSTIFIES[number];
405
224
  type LayoutColumns = typeof LAYOUT_COLUMNS[number];
406
225
  type LayoutRows = typeof LAYOUT_ROWS[number];
407
- export { LAYOUT_ALIGNS, LAYOUT_ALIGN_CLASSES, LAYOUT_AS_VALUES, LAYOUT_COLUMN_CLASSES, LAYOUT_COLUMNS, LAYOUT_HEIGHTS, LAYOUT_HEIGHT_CLASSES, LAYOUT_JUSTIFIES, LAYOUT_JUSTIFY_CLASSES, LAYOUT_ROWS, LAYOUT_ROW_CLASSES, LAYOUT_WIDTHS, LAYOUT_WIDTH_CLASSES, layoutAlignmentDetails, layoutAlignmentSchema, layoutBaseDefaults, layoutBaseVariants, layoutSpacingDetails, layoutSpacingSchema, layoutSurfaceDetails, layoutSurfaceSchema, layoutTokens, SURFACE_ALPHA_COMPOUNDS, };
408
- export type { ComponentRadius, Elevation, LayoutAlign, LayoutAs, LayoutColumns, LayoutHeight, LayoutJustify, LayoutRows, LayoutSpace, LayoutWidth, Surface, SurfaceTone, };
226
+ export { LAYOUT_ALIGNS, LAYOUT_ALIGN_CLASSES, LAYOUT_AS_VALUES, LAYOUT_COLUMN_CLASSES, LAYOUT_COLUMNS, LAYOUT_HEIGHTS, LAYOUT_HEIGHT_CLASSES, LAYOUT_JUSTIFIES, LAYOUT_JUSTIFY_CLASSES, LAYOUT_ROWS, LAYOUT_ROW_CLASSES, LAYOUT_WIDTHS, LAYOUT_WIDTH_CLASSES, layoutAlignmentDetails, layoutAlignmentSchema, layoutBaseDefaults, layoutBaseVariants, layoutSpacingDetails, layoutSpacingSchema, layoutSurfaceDetails, layoutSurfaceSchema, layoutTokens, };
227
+ export type { ComponentRadius, ElevationReference as Elevation, LayoutAlign, LayoutAs, LayoutColumns, LayoutHeight, LayoutJustify, LayoutRows, LayoutSpace, LayoutWidth, SurfaceReference as Surface, };
@@ -1,19 +1,23 @@
1
- import { type PropState } from '../../runtime';
2
- import { BUTTON_TYPES, type CommonButtonType, type IconVariant } from '../common';
1
+ import { type SchemaToProps } from '../../runtime';
2
+ import { BUTTON_TYPES, type CommonButtonType, type ElevationReference, type IconVariant, type SurfaceReference } from '../common';
3
3
  declare const MENU_ITEM_VARIANTS: readonly ["default", "subtle", "filled", "ghost"];
4
4
  declare const MENU_ITEM_COLORS: readonly ["neutral", "accent", "success", "warning", "danger"];
5
5
  declare const MENU_ITEM_AS_VALUES: readonly ["button", "a"];
6
6
  declare const MENU_ICON_VARIANTS: readonly ["outline", "solid", "mini", "micro"];
7
+ declare const MENU_SURFACES: readonly ["inherit", "0", "1", "2", "3", "4", "5", "6", "7", "8", "+1", "+2", "+3", "+4", "+5", "+6", "+7", "+8"];
8
+ declare const MENU_ELEVATIONS: readonly ["none", "match", "1", "2", "3", "4", "5", "6", "7", "8"];
7
9
  declare const menuSchema: {
8
10
  keepOpen: import("../../runtime/codecs").BoolCodec;
9
11
  loop: import("../../runtime/codecs").BoolCodec;
12
+ surface: import("../../runtime/codecs").OneOfCodec<"1" | "0" | "2" | "inherit" | "3" | "4" | "5" | "6" | "7" | "8" | "+1" | "+2" | "+3" | "+4" | "+5" | "+6" | "+7" | "+8">;
13
+ elevation: import("../../runtime/codecs").OneOfCodec<"1" | "match" | "2" | "none" | "3" | "4" | "5" | "6" | "7" | "8">;
10
14
  class: import("../../runtime/codecs").StringCodec;
11
15
  };
12
16
  declare const menuItemSchema: {
13
- as: import("../../runtime/codecs").OneOfCodec<"button" | "a">;
17
+ as: import("../../runtime/codecs").OneOfCodec<"a" | "button">;
14
18
  variant: import("../../runtime/codecs").OneOfCodec<"default" | "filled" | "subtle" | "ghost">;
15
19
  color: import("../../runtime/codecs").OneOfCodec<"accent" | "danger" | "neutral" | "success" | "warning">;
16
- type: import("../../runtime/codecs").OneOfCodec<"reset" | "submit" | "button">;
20
+ type: import("../../runtime/codecs").OneOfCodec<"button" | "submit" | "reset">;
17
21
  disabled: import("../../runtime/codecs").BoolCodec;
18
22
  keepOpen: import("../../runtime/codecs").BoolCodec;
19
23
  icon: import("../../runtime/codecs").StringCodec;
@@ -23,12 +27,14 @@ declare const menuItemSchema: {
23
27
  suffix: import("../../runtime/codecs").StringCodec;
24
28
  class: import("../../runtime/codecs").StringCodec;
25
29
  };
26
- type MenuProps = PropState<typeof menuSchema>;
27
- type MenuItemProps = PropState<typeof menuItemSchema>;
30
+ type MenuProps = SchemaToProps<typeof menuSchema>;
31
+ type MenuSurface = SurfaceReference;
32
+ type MenuElevation = ElevationReference;
33
+ type MenuItemProps = SchemaToProps<typeof menuItemSchema>;
28
34
  type MenuItemAs = typeof MENU_ITEM_AS_VALUES[number];
29
35
  type MenuItemType = CommonButtonType;
30
36
  type MenuItemVariant = typeof MENU_ITEM_VARIANTS[number];
31
37
  type MenuItemColor = typeof MENU_ITEM_COLORS[number];
32
38
  type MenuIconVariant = IconVariant;
33
- export { MENU_ICON_VARIANTS, MENU_ITEM_AS_VALUES, MENU_ITEM_COLORS, MENU_ITEM_VARIANTS, BUTTON_TYPES, menuItemSchema, menuSchema, };
34
- export type { MenuIconVariant, MenuItemAs, MenuItemColor, MenuItemProps, MenuItemType, MenuItemVariant, MenuProps };
39
+ export { MENU_ICON_VARIANTS, MENU_ITEM_AS_VALUES, MENU_ITEM_COLORS, MENU_ITEM_VARIANTS, MENU_ELEVATIONS, MENU_SURFACES, BUTTON_TYPES, menuItemSchema, menuSchema, };
40
+ export type { MenuElevation, MenuIconVariant, MenuItemAs, MenuItemColor, MenuItemProps, MenuItemType, MenuItemVariant, MenuProps, MenuSurface, };
@@ -1,25 +1,25 @@
1
- import { type PropState } from '../../runtime';
2
- import { type EdgePosition, type HeadingLevel, type SurfaceTone } from '../common';
1
+ import { type PropState, type SchemaToProps } from '../../runtime';
2
+ import { type EdgePosition, type ElevationReference, type HeadingLevel, type SurfaceReference } from '../common';
3
3
  declare const MODAL_MODES: readonly ["modal", "sheet"];
4
4
  declare const MODAL_SIDES: readonly ["top", "right", "bottom", "left"];
5
5
  declare const MODAL_SIZES: readonly ["sm", "md", "lg", "xl", "full"];
6
- declare const MODAL_SURFACES: readonly ["overlay", "panel", "inverse"];
7
- declare const MODAL_TONES: readonly ["solid", "alpha"];
6
+ declare const MODAL_SURFACES: readonly ["inherit", "0", "1", "2", "3", "4", "5", "6", "7", "8", "+1", "+2", "+3", "+4", "+5", "+6", "+7", "+8"];
7
+ declare const MODAL_ELEVATIONS: readonly ["none", "match", "1", "2", "3", "4", "5", "6", "7", "8"];
8
8
  declare const MODAL_TITLE_AS_VALUES: readonly ["h1", "h2", "h3", "h4", "h5", "h6"];
9
9
  type ModalMode = typeof MODAL_MODES[number];
10
10
  type ModalSide = EdgePosition;
11
11
  type ModalSize = typeof MODAL_SIZES[number];
12
- type ModalSurface = typeof MODAL_SURFACES[number];
13
- type ModalTone = SurfaceTone;
12
+ type ModalSurface = SurfaceReference;
13
+ type ModalElevation = ElevationReference;
14
14
  type ModalTitleAs = HeadingLevel;
15
15
  declare const modalSchema: {
16
16
  name: import("../../runtime/codecs").StringCodec;
17
17
  open: import("../../runtime/codecs").BoolCodec;
18
18
  mode: import("../../runtime/codecs").OneOfCodec<"modal" | "sheet">;
19
- side: import("../../runtime/codecs").OneOfCodec<"bottom" | "left" | "right" | "top">;
19
+ side: import("../../runtime/codecs").OneOfCodec<"top" | "bottom" | "left" | "right">;
20
20
  size: import("../../runtime/codecs").OneOfCodec<"sm" | "md" | "lg" | "full" | "xl">;
21
- surface: import("../../runtime/codecs").OneOfCodec<"panel" | "overlay" | "inverse">;
22
- tone: import("../../runtime/codecs").OneOfCodec<"solid" | "alpha">;
21
+ surface: import("../../runtime/codecs").OneOfCodec<"1" | "0" | "2" | "inherit" | "3" | "4" | "5" | "6" | "7" | "8" | "+1" | "+2" | "+3" | "+4" | "+5" | "+6" | "+7" | "+8">;
22
+ elevation: import("../../runtime/codecs").OneOfCodec<"1" | "match" | "2" | "none" | "3" | "4" | "5" | "6" | "7" | "8">;
23
23
  dismissible: import("../../runtime/codecs").BoolCodec;
24
24
  closable: import("../../runtime/codecs").BoolCodec;
25
25
  disabled: import("../../runtime/codecs").BoolCodec;
@@ -56,7 +56,7 @@ declare const modalCloseSchema: {
56
56
  label: import("../../runtime/codecs").StringCodec;
57
57
  class: import("../../runtime/codecs").StringCodec;
58
58
  };
59
- type ModalProps = PropState<typeof modalSchema>;
59
+ type ModalProps = SchemaToProps<typeof modalSchema>;
60
60
  type ModalTriggerProps = PropState<typeof modalTriggerSchema>;
61
- export { MODAL_SIDES, MODAL_SIZES, MODAL_SURFACES, MODAL_TONES, MODAL_TITLE_AS_VALUES, MODAL_MODES, modalBodySchema, modalCloseSchema, modalDescriptionSchema, modalFooterSchema, modalOutletSchema, modalSchema, modalTitleSchema, modalTriggerSchema, };
62
- export type { ModalSide, ModalProps, ModalSize, ModalSurface, ModalTone, ModalTitleAs, ModalTriggerProps, ModalMode, };
61
+ export { MODAL_SIDES, MODAL_SIZES, MODAL_ELEVATIONS, MODAL_SURFACES, MODAL_TITLE_AS_VALUES, MODAL_MODES, modalBodySchema, modalCloseSchema, modalDescriptionSchema, modalFooterSchema, modalOutletSchema, modalSchema, modalTitleSchema, modalTriggerSchema, };
62
+ export type { ModalSide, ModalProps, ModalSize, ModalSurface, ModalElevation, ModalTitleAs, ModalTriggerProps, ModalMode, };
@@ -1,88 +1,54 @@
1
1
  import type Alpine from 'alpinejs';
2
- import { type BindingObject, type CleanupStack, type Machine, type TrellisAlpineComponent } from '../../runtime';
3
- import type { PresenceLifecycle } from '../../motion';
4
- import { type ModalProps, type ModalTriggerProps } from './contract';
2
+ import { type AlpineMachine, type TrellisAlpineComponent } from '../../runtime';
3
+ import { type BindingObject } from '../../runtime/merge-bindings';
4
+ import { type ModalProps } from './contract';
5
+ import { modalHooks, type ModalContext } from './machine';
5
6
  type CancelReason = 'escape' | 'outside';
6
7
  type ModalCancelDetail = {
7
8
  reason: CancelReason;
8
9
  };
9
- type ModalController = {
10
- readonly name: string;
10
+ /**
11
+ * Public Alpine API for `ui.modal`.
12
+ *
13
+ * @public
14
+ */
15
+ interface UiModalApi {
16
+ /** Whether the modal has completed its opening transition. */
11
17
  readonly isOpen: boolean;
12
- readonly dialogId: string;
13
- openFrom(trigger: HTMLElement): void;
14
- close(event?: Event): void;
15
- syncExternalTrigger(trigger: HTMLElement, disabled: boolean): void;
16
- };
17
- type ModalTriggerController = {
18
- readonly name: string;
19
- readonly target: HTMLElement;
20
- sync(): void;
21
- };
22
- type ModalData = ModalController & {
23
- props: ModalProps;
24
- readonly isOpen: boolean;
25
- machine: Machine<Record<string, never>>;
26
- dialogId: string;
27
- activeTrigger: HTMLElement | null;
28
- cleanup: CleanupStack;
29
- localTriggerCleanup: CleanupStack;
30
- isRegistered: boolean;
31
- didShowModal: boolean;
32
- hasScrollLock: boolean;
33
- modalMotionRun: number;
34
- overlayMotion: PresenceLifecycle | null;
35
- panelMotion: PresenceLifecycle | null;
36
- root: BindingObject;
37
- dialogEl(): HTMLDialogElement;
38
- viewportEl(): HTMLElement;
39
- overlayEl(): HTMLElement;
40
- panelEl(): HTMLElement;
41
- titleEl(): HTMLElement | null;
42
- descriptionEl(): HTMLElement | null;
43
- closeEls(): HTMLElement[];
44
- localTriggerEl(): HTMLElement | null;
45
- triggerTarget(trigger: HTMLElement): HTMLElement;
46
- focusableEls(): HTMLElement[];
47
- firstAutofocusEl(): HTMLElement | null;
48
- mountLocalTrigger(): void;
49
- setupLocalTrigger(trigger: HTMLElement): void;
50
- setupDialog(): void;
51
- setupNamedClose(): void;
52
- register(): void;
53
- unregister(): void;
18
+ /** Whether the modal is opening, open, or closing. */
19
+ readonly isVisible: boolean;
20
+ /** Opens the modal unless it is disabled. */
54
21
  open(event?: Event): void;
55
- openFrom(trigger: HTMLElement): void;
22
+ /** Closes the modal. */
56
23
  close(event?: Event): void;
57
- cancel(reason: CancelReason, event?: Event): void;
58
- applyProps(changedKeys?: string[]): void;
59
- syncExternalTrigger(trigger: HTMLElement, disabled: boolean): void;
60
- syncAll(): void;
61
- syncDialog(): void;
62
- syncLocalTrigger(): void;
63
- syncNamedTriggers(): void;
64
- applyOpenState(): void;
65
- applyClosedState(): void;
66
- finishClosedState(run: number): void;
67
- focusInitial(): void;
68
- restoreFocus(): void;
69
- handleKeydown(event: KeyboardEvent): void;
70
- trapFocus(event: KeyboardEvent): void;
71
- teardownLocalTrigger(): void;
72
- teardown(): void;
73
- };
74
- type ModalTriggerData = ModalTriggerController & {
75
- props: ModalTriggerProps;
76
- target: HTMLElement;
77
- cleanup: CleanupStack;
78
- root: BindingObject;
79
- sync(): void;
80
- modal(): ModalController | null;
24
+ }
25
+ /**
26
+ * Public Alpine API for `ui.modal.trigger`.
27
+ *
28
+ * @public
29
+ */
30
+ interface UiModalTriggerApi {
31
+ /** Opens the named modal unless the trigger or modal is disabled. */
81
32
  open(event?: Event): void;
82
- targetEl(): HTMLElement;
33
+ }
34
+ type ModalData = AlpineMachine<ModalContext, ModalProps, typeof modalHooks> & UiModalApi & {
35
+ readonly name: string;
36
+ readonly dialogId: string;
37
+ readonly root: BindingObject;
38
+ readonly dialog: BindingObject;
39
+ readonly viewport: BindingObject;
40
+ readonly overlay: BindingObject;
41
+ readonly panel: BindingObject;
42
+ init(): void;
43
+ destroy(): void;
44
+ };
45
+ type ModalTriggerData = UiModalTriggerApi & {
46
+ readonly root: BindingObject;
47
+ init(): void;
48
+ destroy(): void;
83
49
  };
84
50
  declare const UiModal: () => TrellisAlpineComponent<ModalData>;
85
51
  declare const UiModalTrigger: () => TrellisAlpineComponent<ModalTriggerData>;
86
52
  declare const registerModal: (AlpineInstance: Alpine.Alpine) => void;
87
- export { registerModal, UiModal, UiModalTrigger, };
88
- export type { ModalCancelDetail, ModalData, ModalTriggerData };
53
+ export { registerModal, UiModal, UiModalTrigger };
54
+ export type { ModalCancelDetail, UiModalApi, UiModalTriggerApi };