geekin-devtoys 0.4.3 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (200) hide show
  1. package/lib/GBranched-DgHZO9BQ.js +1 -0
  2. package/lib/{GBranched-vnLlYOl9.mjs → GBranched-gk9VjilV.mjs} +22 -22
  3. package/lib/GButton/style.css +1 -1
  4. package/lib/{GButton/index.mjs → GButton-DYVUVEmW.mjs} +20 -21
  5. package/lib/GButton-DiVnpCJ_.js +1 -0
  6. package/lib/GCard/style.css +1 -1
  7. package/lib/{GCard/index.mjs → GCard-fy7pLgOm.mjs} +10 -11
  8. package/lib/GCard-mUE6ozOd.js +1 -0
  9. package/lib/{GCount/index.mjs → GCount-B8qGAPPw.mjs} +8 -9
  10. package/lib/GCount-PeMCQxKJ.js +1 -0
  11. package/lib/GDialog-BXKKf7pp.mjs +379 -0
  12. package/lib/GDialog-DYUmUJIs.js +1 -0
  13. package/lib/GDropdown/style.css +1 -1
  14. package/lib/GDropdown-DAV-MJNy.mjs +301 -0
  15. package/lib/GDropdown-XCTNfuvx.js +1 -0
  16. package/lib/{GFuzzyText/index.mjs → GFuzzyText-C8YqMyVc.mjs} +2 -2
  17. package/lib/GFuzzyText-DlvSSgZN.js +1 -0
  18. package/lib/GInput/style.css +1 -1
  19. package/lib/GInput-BQ3kUKBK.js +1 -0
  20. package/lib/{GInput/index.mjs → GInput-Dmr0imGb.mjs} +7 -8
  21. package/lib/GPagination-C3Bv-WAh.mjs +207 -0
  22. package/lib/GPagination-TlNbcdVK.js +1 -0
  23. package/lib/GPicker/style.css +1 -1
  24. package/lib/GPicker-CGIJstWX.js +1 -0
  25. package/lib/{GPicker/index.mjs → GPicker-Dod_ZC1a.mjs} +17 -18
  26. package/lib/GPie3D/style.css +1 -1
  27. package/lib/{GPie3D/index.mjs → GPie3D-f9qP9766.mjs} +29 -29
  28. package/lib/GPie3D-n-Rr8wxJ.js +1 -0
  29. package/lib/GPluginVideo-CCMOsKR1.js +1 -0
  30. package/lib/{GPluginVideo/index.mjs → GPluginVideo-DRoHqxth.mjs} +5 -6
  31. package/lib/GProgress/style.css +1 -1
  32. package/lib/GProgress-BLhyozxX.js +1 -0
  33. package/lib/{GProgress/index.mjs → GProgress-DE4nojJS.mjs} +3 -4
  34. package/lib/GRadio-Cfrcw4ij.js +1 -0
  35. package/lib/{GRadio/index.mjs → GRadio-DJT1sLHB.mjs} +8 -9
  36. package/lib/GRing/style.css +1 -1
  37. package/lib/GRing-C7jmMP3i.js +1 -0
  38. package/lib/{GRing/index.mjs → GRing-wjC39-EB.mjs} +9 -10
  39. package/lib/{GScreen/index.mjs → GScreen-2eUu-UYd.mjs} +17 -18
  40. package/lib/GScreen-XeAOifAH.js +1 -0
  41. package/lib/GScroller/style.css +1 -1
  42. package/lib/{GScroller/index.mjs → GScroller-B3nJgbB6.mjs} +8 -9
  43. package/lib/GScroller-SxgsNnGm.js +1 -0
  44. package/lib/{GSegment/index.mjs → GSegment-BOCz6tKA.mjs} +17 -18
  45. package/lib/GSegment-DBya2zxC.js +1 -0
  46. package/lib/GShinyText-1l_2iEh2.js +1 -0
  47. package/lib/{GShinyText/index.mjs → GShinyText-DlOUA5Ks.mjs} +25 -26
  48. package/lib/{GSlider/index.mjs → GSlider-Cr82jLMa.mjs} +11 -12
  49. package/lib/GSlider-Did6qEGG.js +1 -0
  50. package/lib/GSteps/style.css +1 -1
  51. package/lib/GSteps-CLkuWWKC.js +1 -0
  52. package/lib/{GSteps/index.mjs → GSteps-Dn5IYJpx.mjs} +34 -35
  53. package/lib/GTable/style.css +1 -1
  54. package/lib/GTable-DbKMCmgA.js +1 -0
  55. package/lib/GTable-JWC4MouE.mjs +306 -0
  56. package/lib/GTag/style.css +1 -1
  57. package/lib/{GTag/index.mjs → GTag-BBCyhlbu.mjs} +8 -9
  58. package/lib/GTag-Cz1B_ljk.js +1 -0
  59. package/lib/GToast/style.css +1 -1
  60. package/lib/{GToast/index.mjs → GToast-BRd2P7dm.mjs} +16 -17
  61. package/lib/GToast-Dz_Ukb9h.js +1 -0
  62. package/lib/GTree/style.css +1 -1
  63. package/lib/GTree-6YPV4gsf.js +1 -0
  64. package/lib/{GTree/index.mjs → GTree-BeEm75-u.mjs} +37 -38
  65. package/lib/GVideo/style.css +1 -1
  66. package/lib/{GVideo/index.mjs → GVideo-CNWjIzXx.mjs} +13 -14
  67. package/lib/GVideo-DHoeaGKS.js +2 -0
  68. package/lib/assets/GPagination.css +1 -0
  69. package/lib/components/GBranched/__tests__/index.test.d.ts +1 -0
  70. package/lib/components/GButton/__tests__/index.test.d.ts +1 -0
  71. package/lib/components/GButton/index.d.ts +8 -19
  72. package/lib/components/GButton/types.d.ts +37 -0
  73. package/lib/components/GCard/__tests__/index.test.d.ts +1 -0
  74. package/lib/components/GCard/index.d.ts +2 -18
  75. package/lib/components/GCard/types.d.ts +66 -0
  76. package/lib/components/GCount/__tests__/index.test.d.ts +1 -0
  77. package/lib/components/GCount/index.d.ts +3 -18
  78. package/lib/components/GCount/types.d.ts +38 -0
  79. package/lib/components/GDialog/__tests__/index.test.d.ts +1 -0
  80. package/lib/components/GDropdown/__tests__/index.test.d.ts +1 -0
  81. package/lib/components/GDropdown/__tests__/slots.tmp.test.d.ts +1 -0
  82. package/lib/components/GDropdown/index.d.ts +32 -34
  83. package/lib/components/GDropdown/types.d.ts +116 -0
  84. package/lib/components/GFuzzyText/__tests__/index.test.d.ts +1 -0
  85. package/lib/components/GFuzzyText/index.d.ts +2 -39
  86. package/lib/components/GFuzzyText/types.d.ts +93 -0
  87. package/lib/components/GInput/__tests__/index.test.d.ts +1 -0
  88. package/lib/components/GInput/index.d.ts +3 -23
  89. package/lib/components/GInput/types.d.ts +50 -0
  90. package/lib/components/GPagination/__tests__/index.test.d.ts +1 -0
  91. package/lib/components/GPagination/icons.d.ts +7 -0
  92. package/lib/components/GPagination/index.d.ts +30 -0
  93. package/lib/components/GPagination/types.d.ts +66 -0
  94. package/lib/components/GPicker/__tests__/index.test.d.ts +1 -0
  95. package/lib/components/GPicker/index.d.ts +4 -67
  96. package/lib/components/GPicker/types.d.ts +159 -0
  97. package/lib/components/GPie3D/__tests__/index.test.d.ts +1 -0
  98. package/lib/components/GPie3D/index.d.ts +3 -81
  99. package/lib/components/GPie3D/types.d.ts +106 -0
  100. package/lib/components/GPluginVideo/__tests__/index.test.d.ts +1 -0
  101. package/lib/components/GPluginVideo/index.d.ts +1 -0
  102. package/lib/components/GPluginVideo/types.d.ts +86 -0
  103. package/lib/components/GProgress/__tests__/index.test.d.ts +1 -0
  104. package/lib/components/GProgress/index.d.ts +3 -47
  105. package/lib/components/GProgress/types.d.ts +46 -0
  106. package/lib/components/GRadio/__tests__/index.test.d.ts +1 -0
  107. package/lib/components/GRadio/index.d.ts +6 -6
  108. package/lib/components/GRing/__tests__/index.test.d.ts +1 -0
  109. package/lib/components/GRing/index.d.ts +3 -53
  110. package/lib/components/GRing/types.d.ts +52 -0
  111. package/lib/components/GScreen/__tests__/index.test.d.ts +1 -0
  112. package/lib/components/GScreen/index.d.ts +3 -22
  113. package/lib/components/GScreen/types.d.ts +21 -0
  114. package/lib/components/GScroller/__tests__/index.test.d.ts +1 -0
  115. package/lib/components/GScroller/index.d.ts +3 -22
  116. package/lib/components/GScroller/types.d.ts +73 -0
  117. package/lib/components/GSegment/__tests__/index.test.d.ts +1 -0
  118. package/lib/components/GSegment/index.d.ts +3 -3
  119. package/lib/components/GShinyText/__tests__/index.test.d.ts +1 -0
  120. package/lib/components/GShinyText/index.d.ts +2 -25
  121. package/lib/components/GShinyText/types.d.ts +65 -0
  122. package/lib/components/GSlider/__tests__/index.test.d.ts +1 -0
  123. package/lib/components/GSlider/index.d.ts +2 -2
  124. package/lib/components/GSteps/__tests__/index.test.d.ts +1 -0
  125. package/lib/components/GSteps/index.d.ts +3 -21
  126. package/lib/components/GSteps/types.d.ts +42 -0
  127. package/lib/components/GTable/__tests__/index.test.d.ts +1 -0
  128. package/lib/components/GTable/icons.d.ts +5 -0
  129. package/lib/components/GTable/index.d.ts +23 -91
  130. package/lib/components/GTable/types.d.ts +110 -0
  131. package/lib/components/GTag/__tests__/index.test.d.ts +1 -0
  132. package/lib/components/GTag/index.d.ts +7 -18
  133. package/lib/components/GTag/types.d.ts +34 -0
  134. package/lib/components/GToast/__tests__/index.test.d.ts +1 -0
  135. package/lib/components/GTree/__tests__/index.test.d.ts +1 -0
  136. package/lib/components/GTree/index.d.ts +2 -4
  137. package/lib/components/GVideo/__tests__/index.test.d.ts +1 -0
  138. package/lib/components/GVideo/index.d.ts +1 -0
  139. package/lib/components/GVideo/types.d.ts +38 -0
  140. package/lib/index/index.d.mts +6 -0
  141. package/lib/index/index.js +1 -1
  142. package/lib/index/index.mjs +66 -63
  143. package/lib/index/style.css +15 -15
  144. package/lib/index.d.ts +3 -1
  145. package/package.json +14 -8
  146. package/lib/GBranched/index.js +0 -1
  147. package/lib/GBranched/index.mjs +0 -5
  148. package/lib/GBranched-BtF7heMk.js +0 -1
  149. package/lib/GBranched.d.ts +0 -1
  150. package/lib/GButton/index.js +0 -1
  151. package/lib/GButton.d.ts +0 -1
  152. package/lib/GCard/index.js +0 -1
  153. package/lib/GCard.d.ts +0 -1
  154. package/lib/GCount/index.js +0 -1
  155. package/lib/GCount.d.ts +0 -1
  156. package/lib/GDialog/index.js +0 -1
  157. package/lib/GDialog/index.mjs +0 -458
  158. package/lib/GDialog.d.ts +0 -1
  159. package/lib/GDropdown/index.js +0 -1
  160. package/lib/GDropdown/index.mjs +0 -278
  161. package/lib/GDropdown.d.ts +0 -1
  162. package/lib/GFuzzyText/index.js +0 -1
  163. package/lib/GFuzzyText.d.ts +0 -1
  164. package/lib/GInput/index.js +0 -1
  165. package/lib/GInput.d.ts +0 -1
  166. package/lib/GPicker/index.js +0 -1
  167. package/lib/GPicker.d.ts +0 -1
  168. package/lib/GPie3D/index.js +0 -1
  169. package/lib/GPie3D.d.ts +0 -1
  170. package/lib/GPluginVideo/index.js +0 -1
  171. package/lib/GPluginVideo.d.ts +0 -1
  172. package/lib/GProgress/index.js +0 -1
  173. package/lib/GProgress.d.ts +0 -1
  174. package/lib/GRadio/index.js +0 -1
  175. package/lib/GRadio.d.ts +0 -1
  176. package/lib/GRing/index.js +0 -1
  177. package/lib/GRing.d.ts +0 -1
  178. package/lib/GScreen/index.js +0 -1
  179. package/lib/GScreen.d.ts +0 -1
  180. package/lib/GScroller/index.js +0 -1
  181. package/lib/GScroller.d.ts +0 -1
  182. package/lib/GSegment/index.js +0 -1
  183. package/lib/GSegment.d.ts +0 -1
  184. package/lib/GShinyText/index.js +0 -1
  185. package/lib/GShinyText.d.ts +0 -1
  186. package/lib/GSlider/index.js +0 -1
  187. package/lib/GSlider.d.ts +0 -1
  188. package/lib/GSteps/index.js +0 -1
  189. package/lib/GSteps.d.ts +0 -1
  190. package/lib/GTable/index.js +0 -1
  191. package/lib/GTable/index.mjs +0 -448
  192. package/lib/GTable.d.ts +0 -1
  193. package/lib/GTag/index.js +0 -1
  194. package/lib/GTag.d.ts +0 -1
  195. package/lib/GToast/index.js +0 -1
  196. package/lib/GToast.d.ts +0 -1
  197. package/lib/GTree/index.js +0 -1
  198. package/lib/GTree.d.ts +0 -1
  199. package/lib/GVideo/index.js +0 -2
  200. package/lib/GVideo.d.ts +0 -1
@@ -0,0 +1,379 @@
1
+ import { inject as ce, h as l, defineComponent as X, computed as d, ref as p, watch as F, onUnmounted as ee, createBlock as g, openBlock as n, Teleport as te, createVNode as h, unref as _, normalizeStyle as me, normalizeClass as fe, withCtx as r, createElementVNode as o, toDisplayString as C, useId as Y, onMounted as pe, reactive as ge, Transition as ve, createElementBlock as G, createCommentVNode as b, withModifiers as ye, mergeProps as he, renderSlot as x, Fragment as Z, renderList as ze, createSlots as ke, createTextVNode as I, resolveDynamicComponent as we } from "vue";
2
+ import { motion as be, AnimatePresence as Ce } from "motion-v";
3
+ import { _ as ae } from "./GBranched-gk9VjilV.mjs";
4
+ import { G as E } from "./GButton-DYVUVEmW.mjs";
5
+ const _e = /* @__PURE__ */ Symbol("GDialogManager"), J = {
6
+ small: "380px",
7
+ medium: "480px",
8
+ large: "580px"
9
+ };
10
+ function Me() {
11
+ return ce(_e, null);
12
+ }
13
+ const O = {
14
+ viewBox: "0 0 1024 1024",
15
+ fill: "currentColor",
16
+ xmlns: "http://www.w3.org/2000/svg",
17
+ "aria-hidden": "true",
18
+ // 显式尺寸兜底:脱离 GButton 的 .g-button__icon 使用时(如表格、文案内联)不会塌缩或撑爆
19
+ width: "1em",
20
+ height: "1em"
21
+ }, Te = () => l("svg", O, [
22
+ l("path", {
23
+ d: "M874.666667 512a362.666667 362.666667 0 1 0-362.666667 362.666667V938.666667C276.352 938.666667 85.333333 747.648 85.333333 512S276.352 85.333333 512 85.333333s426.666667 191.018667 426.666667 426.666667-191.018667 426.666667-426.666667 426.666667v-64a362.666667 362.666667 0 0 0 362.666667-362.666667z"
24
+ }),
25
+ l("path", {
26
+ d: "M318.72 318.72a32 32 0 0 1 45.226667 0l341.333333 341.333333a32 32 0 1 1-45.226667 45.226667l-341.333333-341.333333a32 32 0 0 1 0-45.226667z"
27
+ }),
28
+ l("path", {
29
+ d: "M705.28 318.72a32 32 0 0 0-45.226667 0l-341.333333 341.333333a32 32 0 1 0 45.226667 45.226667l341.333333-341.333333a32 32 0 0 0 0-45.226667z"
30
+ })
31
+ ]), Se = () => l("svg", O, [
32
+ l("path", {
33
+ d: "M661.333333 309.333333a266.666667 266.666667 0 1 1 0 533.333334H170.666667a32 32 0 0 1 0-64h490.666666a202.666667 202.666667 0 1 0 0-405.333334H170.666667a32 32 0 0 1 0-64h490.666666z"
34
+ }),
35
+ l("path", {
36
+ d: "M98.133333 348.714667a8.533333 8.533333 0 0 1 0-14.762667l166.4-96.085333a8.533333 8.533333 0 0 1 12.8 7.381333v192.170667a8.533333 8.533333 0 0 1-12.8 7.381333L98.133333 348.714667z"
37
+ })
38
+ ]), De = () => l("svg", O, [
39
+ l("path", {
40
+ d: "M874.666667 512a362.666667 362.666667 0 1 0-362.666667 362.666667V938.666667C276.352 938.666667 85.333333 747.648 85.333333 512S276.352 85.333333 512 85.333333s426.666667 191.018667 426.666667 426.666667-191.018667 426.666667-426.666667 426.666667v-64a362.666667 362.666667 0 0 0 362.666667-362.666667z"
41
+ }),
42
+ l("path", {
43
+ d: "M685.653333 361.386667a32 32 0 1 1 45.226667 45.226666l-249.472 249.514667a40.533333 40.533333 0 0 1-59.434667-2.304l-122.026666-142.336a32 32 0 0 1 48.64-41.642667l105.472 123.050667L685.653333 361.386667z"
44
+ })
45
+ ]), Ae = () => l("svg", O, [
46
+ l("path", {
47
+ d: "M130.133333 746.666667v-469.333334A138.666667 138.666667 0 0 1 268.8 138.666667h362.666667a32 32 0 0 1 0 64H268.8A74.666667 74.666667 0 0 0 194.133333 277.333333v469.333334c0 41.216 33.450667 74.666667 74.666667 74.666666h362.666667a32 32 0 0 1 0 64H268.8a138.666667 138.666667 0 0 1-138.666667-138.666666z"
48
+ }),
49
+ l("path", {
50
+ d: "M635.562667 738.304a32.042667 32.042667 0 0 0 45.312 0l203.605333-203.690667a32 32 0 0 0 0-45.226666l-203.605333-203.690667a32.042667 32.042667 0 0 0-45.312 45.312l149.077333 148.992H477.866667a32 32 0 0 0 0 64h306.773333l-149.077333 148.992a32.042667 32.042667 0 0 0 0 45.312z"
51
+ })
52
+ ]), Ve = {
53
+ class: "g-dialog-pro-minimized-icon__icon",
54
+ "aria-hidden": "true"
55
+ }, Be = { class: "g-dialog-pro-minimized-icon__title" }, Le = /* @__PURE__ */ X({
56
+ name: "GDialogMinimizedIcon",
57
+ __name: "GDialogMinimizedIcon",
58
+ props: {
59
+ title: {},
60
+ position: {},
61
+ attentionTick: { default: 0 }
62
+ },
63
+ emits: ["restore"],
64
+ setup(z, { emit: R }) {
65
+ const i = z, s = R, V = d(() => i.title || "弹窗"), a = d(() => `恢复 ${V.value}`), t = { opacity: 0, scale: 0.8, x: -24, y: 12 }, m = { opacity: 1, scale: 1, x: 0, y: 0 }, k = { opacity: 0, scale: 0.8, x: -24, y: 12 }, M = { duration: 0.28, ease: [0.2, 0.8, 0.2, 1] }, f = { scale: 1.04, y: -2 }, w = { scale: 0.98 }, T = d(() => ({
66
+ position: "fixed",
67
+ right: `${i.position.right}px`,
68
+ bottom: `${i.position.bottom}px`
69
+ })), v = p(!1);
70
+ let S;
71
+ F(() => i.attentionTick, (L, c) => {
72
+ c === void 0 || L === c || (v.value = !1, window.clearTimeout(S), window.requestAnimationFrame(() => {
73
+ v.value = !0, S = window.setTimeout(() => {
74
+ v.value = !1;
75
+ }, 580);
76
+ }));
77
+ }), ee(() => {
78
+ window.clearTimeout(S);
79
+ });
80
+ function B() {
81
+ s("restore");
82
+ }
83
+ return (L, c) => (n(), g(te, { to: "body" }, [
84
+ h(_(be).div, {
85
+ class: fe(["g-dialog-pro-minimized-icon", { "is-attention": v.value }]),
86
+ type: "button",
87
+ style: me(T.value),
88
+ title: a.value,
89
+ "aria-label": a.value,
90
+ initial: t,
91
+ animate: m,
92
+ exit: k,
93
+ transition: M,
94
+ "while-hover": f,
95
+ "while-press": w,
96
+ onClick: B
97
+ }, {
98
+ default: r(() => [
99
+ c[0] || (c[0] = o("span", {
100
+ class: "g-dialog-pro-minimized-icon__glow",
101
+ "aria-hidden": "true"
102
+ }, null, -1)),
103
+ c[1] || (c[1] = o("span", {
104
+ class: "g-dialog-pro-minimized-icon__wave",
105
+ "aria-hidden": "true"
106
+ }, null, -1)),
107
+ o("span", Ve, [
108
+ h(_(Ae))
109
+ ]),
110
+ o("span", Be, C(V.value), 1)
111
+ ]),
112
+ _: 1,
113
+ __: [0, 1]
114
+ }, 8, ["class", "style", "title", "aria-label"])
115
+ ]));
116
+ }
117
+ }), N = /* @__PURE__ */ ae(Le, [["__scopeId", "data-v-e7d8c859"]]), $e = { class: "g-dialog-pro-header" }, Ge = { class: "g-dialog-pro-title" }, Ie = {
118
+ class: "g-dialog-pro-operation-container",
119
+ "aria-label": "弹窗操作"
120
+ }, Ee = ["aria-label", "title"], Oe = { class: "g-dialog-pro-body" }, Re = {
121
+ key: 0,
122
+ class: "g-dialog-pro-footer"
123
+ }, Pe = { class: "g-dialog-pro-actions" }, Q = "关闭", xe = /* @__PURE__ */ X({
124
+ name: "GDialog",
125
+ inheritAttrs: !1,
126
+ __name: "index",
127
+ props: {
128
+ title: { default: "" },
129
+ size: { default: "medium" },
130
+ modelValue: { type: Boolean },
131
+ hideFooter: { type: Boolean, default: !1 },
132
+ actions: {},
133
+ showCancel: { type: Boolean, default: !0 },
134
+ showReset: { type: Boolean, default: !0 },
135
+ showSave: { type: Boolean, default: !0 },
136
+ cancelText: { default: "取消" },
137
+ resetText: { default: "重置" },
138
+ saveText: { default: "保存" },
139
+ saveLoading: { type: Boolean, default: !1 },
140
+ saveDisabled: { type: Boolean, default: !1 },
141
+ beforeClose: {}
142
+ },
143
+ emits: ["cancel", "reset", "save", "minimize", "action", "update:modelValue"],
144
+ setup(z, { emit: R }) {
145
+ const i = z, s = R, V = d(() => i.modelValue), a = Y ? Y() : `g-dialog-pro-${Date.now()}-${Math.random().toString(36).slice(2)}`, t = Me(), m = p(!1), k = p(!0), M = p(0), f = p(!1), w = p(!1), T = p(!1), v = d(() => t ? t.dialogs.get(a)?.isMinimized ?? !1 : m.value), S = d(() => t ? t.dialogs.get(a)?.attentionTick ?? 0 : M.value), B = d(() => t ? !w.value : k.value), L = d(() => t ? t.getPosition(a).value : { right: 20, bottom: 20 });
146
+ pe(() => {
147
+ t?.register({
148
+ id: a,
149
+ title: i.title,
150
+ isMinimized: !1
151
+ }), document.addEventListener("keydown", j);
152
+ }), ee(() => {
153
+ t?.unregister(a), document.removeEventListener("keydown", j);
154
+ }), F(
155
+ () => i.title,
156
+ (e) => {
157
+ if (t) {
158
+ const y = t.dialogs.get(a);
159
+ y && (y.title = e);
160
+ }
161
+ }
162
+ ), F(
163
+ () => i.modelValue,
164
+ (e) => {
165
+ if (e === !1) {
166
+ if (f.value) return;
167
+ t ? (t.restore(a), w.value = !1) : (k.value = !0, m.value = !1);
168
+ }
169
+ e === !0 && (t?.dialogs.get(a)?.isMinimized ? t.remindMinimized(a) : m.value && (M.value += 1));
170
+ }
171
+ );
172
+ const c = d(() => Object.prototype.hasOwnProperty.call(J, i.size) ? J[i.size] : i.size), ie = d(() => A.value ? {} : { width: c.value });
173
+ async function D(e) {
174
+ if (!i.beforeClose) return !0;
175
+ try {
176
+ return await i.beforeClose(e) !== !1;
177
+ } catch {
178
+ return !1;
179
+ }
180
+ }
181
+ async function $() {
182
+ await D("close") && s("update:modelValue", !1);
183
+ }
184
+ function oe() {
185
+ $();
186
+ }
187
+ function j(e) {
188
+ e.key === "Escape" && (!i.modelValue || !B.value || v.value || (e.stopPropagation(), $()));
189
+ }
190
+ async function K() {
191
+ await D("cancel") && s("cancel");
192
+ }
193
+ function W() {
194
+ s("reset");
195
+ }
196
+ async function q() {
197
+ await D("save") && s("save");
198
+ }
199
+ const P = ge({});
200
+ async function le(e) {
201
+ if (await D("action") && (s("action", e.key), !!e.onClick))
202
+ try {
203
+ const y = e.onClick();
204
+ y instanceof Promise && (P[e.key] = !0, await y);
205
+ } finally {
206
+ P[e.key] = !1;
207
+ }
208
+ }
209
+ const A = p(!1), ne = () => {
210
+ A.value = !A.value;
211
+ }, U = d(() => A.value ? "退出全屏" : "全屏"), se = async () => {
212
+ if (!await D("minimize")) return;
213
+ if (t ? t.dialogs.get(a)?.isMinimized ?? !1 : m.value) {
214
+ t ? t.minimize(a) : M.value += 1, s("minimize", { id: a });
215
+ return;
216
+ }
217
+ f.value = !0, t ? t.minimize(a) : m.value = !0, s("update:modelValue", !1), s("minimize", { id: a });
218
+ }, re = () => {
219
+ T.value = !0, f.value = !1, t ? (w.value = !1, t.restore(a)) : (k.value = !0, m.value = !1), s("update:modelValue", !0);
220
+ }, de = () => {
221
+ f.value && (t ? w.value = !0 : k.value = !1, f.value = !1);
222
+ }, ue = () => {
223
+ T.value = !1;
224
+ };
225
+ return (e, y) => (n(), g(te, { to: "body" }, [
226
+ h(ve, {
227
+ name: "g-dialog-pro-fade",
228
+ onAfterEnter: ue,
229
+ onAfterLeave: de
230
+ }, {
231
+ default: r(() => [
232
+ B.value && V.value ? (n(), G("div", {
233
+ key: 0,
234
+ class: "g-dialog-pro-overlay",
235
+ onClick: ye(oe, ["self"])
236
+ }, [
237
+ o("div", he(e.$attrs, {
238
+ class: ["g-dialog-pro", {
239
+ "is-fullscreen": A.value,
240
+ "is-leave-to-minimize": f.value,
241
+ "is-enter-from-minimize": T.value
242
+ }],
243
+ style: ie.value,
244
+ role: "dialog",
245
+ "aria-modal": "true"
246
+ }), [
247
+ o("header", $e, [
248
+ o("p", Ge, C(e.title), 1),
249
+ o("div", Ie, [
250
+ o("button", {
251
+ type: "button",
252
+ class: "g-dialog-pro-control g-dialog-pro-control--minimize",
253
+ "aria-label": "最小化",
254
+ title: "最小化",
255
+ onClick: se
256
+ }),
257
+ o("button", {
258
+ type: "button",
259
+ class: "g-dialog-pro-control g-dialog-pro-control--fullscreen",
260
+ "aria-label": U.value,
261
+ title: U.value,
262
+ onClick: ne
263
+ }, null, 8, Ee),
264
+ o("button", {
265
+ type: "button",
266
+ class: "g-dialog-pro-control g-dialog-pro-control--close",
267
+ "aria-label": Q,
268
+ title: Q,
269
+ onClick: $
270
+ })
271
+ ])
272
+ ]),
273
+ o("div", Oe, [
274
+ x(e.$slots, "default", {}, void 0, !0)
275
+ ]),
276
+ e.hideFooter ? b("", !0) : (n(), G("footer", Re, [
277
+ x(e.$slots, "footer", {
278
+ cancel: K,
279
+ reset: W,
280
+ save: q,
281
+ close: $,
282
+ loading: e.saveLoading
283
+ }, () => [
284
+ o("div", Pe, [
285
+ e.actions && e.actions.length ? (n(!0), G(Z, { key: 0 }, ze(e.actions, (u) => (n(), g(E, {
286
+ key: u.key,
287
+ type: u.type,
288
+ danger: u.danger,
289
+ loading: u.loading || P[u.key],
290
+ disabled: u.disabled,
291
+ size: "small",
292
+ onClick: (He) => le(u)
293
+ }, ke({
294
+ default: r(() => [
295
+ I(" " + C(u.label), 1)
296
+ ]),
297
+ _: 2
298
+ }, [
299
+ u.icon ? {
300
+ name: "icon",
301
+ fn: r(() => [
302
+ (n(), g(we(u.icon)))
303
+ ]),
304
+ key: "0"
305
+ } : void 0
306
+ ]), 1032, ["type", "danger", "loading", "disabled", "onClick"]))), 128)) : (n(), G(Z, { key: 1 }, [
307
+ e.showCancel ? (n(), g(E, {
308
+ key: 0,
309
+ size: "small",
310
+ onClick: K
311
+ }, {
312
+ icon: r(() => [
313
+ h(_(Te))
314
+ ]),
315
+ default: r(() => [
316
+ I(" " + C(e.cancelText), 1)
317
+ ]),
318
+ _: 1
319
+ })) : b("", !0),
320
+ e.showReset ? (n(), g(E, {
321
+ key: 1,
322
+ size: "small",
323
+ onClick: W
324
+ }, {
325
+ icon: r(() => [
326
+ h(_(Se))
327
+ ]),
328
+ default: r(() => [
329
+ I(" " + C(e.resetText), 1)
330
+ ]),
331
+ _: 1
332
+ })) : b("", !0),
333
+ e.showSave ? (n(), g(E, {
334
+ key: 2,
335
+ type: "emphasis",
336
+ loading: e.saveLoading,
337
+ disabled: e.saveDisabled,
338
+ size: "small",
339
+ onClick: q
340
+ }, {
341
+ icon: r(() => [
342
+ h(_(De))
343
+ ]),
344
+ default: r(() => [
345
+ I(" " + C(e.saveText), 1)
346
+ ]),
347
+ _: 1
348
+ }, 8, ["loading", "disabled"])) : b("", !0)
349
+ ], 64)),
350
+ x(e.$slots, "moreOperations", {}, void 0, !0)
351
+ ])
352
+ ], !0)
353
+ ]))
354
+ ], 16)
355
+ ])) : b("", !0)
356
+ ]),
357
+ _: 3
358
+ }),
359
+ h(_(Ce), null, {
360
+ default: r(() => [
361
+ v.value ? (n(), g(N, {
362
+ key: 0,
363
+ title: e.title,
364
+ position: L.value,
365
+ "attention-tick": S.value,
366
+ onRestore: re
367
+ }, null, 8, ["title", "position", "attention-tick"])) : b("", !0)
368
+ ]),
369
+ _: 1
370
+ })
371
+ ]));
372
+ }
373
+ }), H = /* @__PURE__ */ ae(xe, [["__scopeId", "data-v-7b74a42f"]]);
374
+ H.install = (z) => {
375
+ z.component(H.name, H), z.component(N.name, N);
376
+ };
377
+ export {
378
+ H as G
379
+ };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),I=require("motion-v"),$=require("./GBranched-DgHZO9BQ.js"),B=require("./GButton-DiVnpCJ_.js"),U=Symbol("GDialogManager"),A={small:"380px",medium:"480px",large:"580px"};function W(){return e.inject(U,null)}const _={viewBox:"0 0 1024 1024",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em"},Y=()=>e.h("svg",_,[e.h("path",{d:"M874.666667 512a362.666667 362.666667 0 1 0-362.666667 362.666667V938.666667C276.352 938.666667 85.333333 747.648 85.333333 512S276.352 85.333333 512 85.333333s426.666667 191.018667 426.666667 426.666667-191.018667 426.666667-426.666667 426.666667v-64a362.666667 362.666667 0 0 0 362.666667-362.666667z"}),e.h("path",{d:"M318.72 318.72a32 32 0 0 1 45.226667 0l341.333333 341.333333a32 32 0 1 1-45.226667 45.226667l-341.333333-341.333333a32 32 0 0 1 0-45.226667z"}),e.h("path",{d:"M705.28 318.72a32 32 0 0 0-45.226667 0l-341.333333 341.333333a32 32 0 1 0 45.226667 45.226667l341.333333-341.333333a32 32 0 0 0 0-45.226667z"})]),Z=()=>e.h("svg",_,[e.h("path",{d:"M661.333333 309.333333a266.666667 266.666667 0 1 1 0 533.333334H170.666667a32 32 0 0 1 0-64h490.666666a202.666667 202.666667 0 1 0 0-405.333334H170.666667a32 32 0 0 1 0-64h490.666666z"}),e.h("path",{d:"M98.133333 348.714667a8.533333 8.533333 0 0 1 0-14.762667l166.4-96.085333a8.533333 8.533333 0 0 1 12.8 7.381333v192.170667a8.533333 8.533333 0 0 1-12.8 7.381333L98.133333 348.714667z"})]),J=()=>e.h("svg",_,[e.h("path",{d:"M874.666667 512a362.666667 362.666667 0 1 0-362.666667 362.666667V938.666667C276.352 938.666667 85.333333 747.648 85.333333 512S276.352 85.333333 512 85.333333s426.666667 191.018667 426.666667 426.666667-191.018667 426.666667-426.666667 426.666667v-64a362.666667 362.666667 0 0 0 362.666667-362.666667z"}),e.h("path",{d:"M685.653333 361.386667a32 32 0 1 1 45.226667 45.226666l-249.472 249.514667a40.533333 40.533333 0 0 1-59.434667-2.304l-122.026666-142.336a32 32 0 0 1 48.64-41.642667l105.472 123.050667L685.653333 361.386667z"})]),Q=()=>e.h("svg",_,[e.h("path",{d:"M130.133333 746.666667v-469.333334A138.666667 138.666667 0 0 1 268.8 138.666667h362.666667a32 32 0 0 1 0 64H268.8A74.666667 74.666667 0 0 0 194.133333 277.333333v469.333334c0 41.216 33.450667 74.666667 74.666667 74.666666h362.666667a32 32 0 0 1 0 64H268.8a138.666667 138.666667 0 0 1-138.666667-138.666666z"}),e.h("path",{d:"M635.562667 738.304a32.042667 32.042667 0 0 0 45.312 0l203.605333-203.690667a32 32 0 0 0 0-45.226666l-203.605333-203.690667a32.042667 32.042667 0 0 0-45.312 45.312l149.077333 148.992H477.866667a32 32 0 0 0 0 64h306.773333l-149.077333 148.992a32.042667 32.042667 0 0 0 0 45.312z"})]),X={class:"g-dialog-pro-minimized-icon__icon","aria-hidden":"true"},ee={class:"g-dialog-pro-minimized-icon__title"},te=e.defineComponent({name:"GDialogMinimizedIcon",__name:"GDialogMinimizedIcon",props:{title:{},position:{},attentionTick:{default:0}},emits:["restore"],setup(m,{emit:N}){const i=m,n=N,w=e.computed(()=>i.title||"弹窗"),a=e.computed(()=>`恢复 ${w.value}`),o={opacity:0,scale:.8,x:-24,y:12},r={opacity:1,scale:1,x:0,y:0},f={opacity:0,scale:.8,x:-24,y:12},g={duration:.28,ease:[.2,.8,.2,1]},c={scale:1.04,y:-2},p={scale:.98},v=e.computed(()=>({position:"fixed",right:`${i.position.right}px`,bottom:`${i.position.bottom}px`})),d=e.ref(!1);let h;e.watch(()=>i.attentionTick,(z,s)=>{s===void 0||z===s||(d.value=!1,window.clearTimeout(h),window.requestAnimationFrame(()=>{d.value=!0,h=window.setTimeout(()=>{d.value=!1},580)}))}),e.onUnmounted(()=>{window.clearTimeout(h)});function C(){n("restore")}return(z,s)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.unref(I.motion).div,{class:e.normalizeClass(["g-dialog-pro-minimized-icon",{"is-attention":d.value}]),type:"button",style:e.normalizeStyle(v.value),title:a.value,"aria-label":a.value,initial:o,animate:r,exit:f,transition:g,"while-hover":c,"while-press":p,onClick:C},{default:e.withCtx(()=>[s[0]||(s[0]=e.createElementVNode("span",{class:"g-dialog-pro-minimized-icon__glow","aria-hidden":"true"},null,-1)),s[1]||(s[1]=e.createElementVNode("span",{class:"g-dialog-pro-minimized-icon__wave","aria-hidden":"true"},null,-1)),e.createElementVNode("span",X,[e.createVNode(e.unref(Q))]),e.createElementVNode("span",ee,e.toDisplayString(w.value),1)]),_:1,__:[0,1]},8,["class","style","title","aria-label"])]))}}),E=$._export_sfc(te,[["__scopeId","data-v-e7d8c859"]]),oe={class:"g-dialog-pro-header"},ae={class:"g-dialog-pro-title"},ie={class:"g-dialog-pro-operation-container","aria-label":"弹窗操作"},ne=["aria-label","title"],le={class:"g-dialog-pro-body"},se={key:0,class:"g-dialog-pro-footer"},re={class:"g-dialog-pro-actions"},L="关闭",ce=e.defineComponent({name:"GDialog",inheritAttrs:!1,__name:"index",props:{title:{default:""},size:{default:"medium"},modelValue:{type:Boolean},hideFooter:{type:Boolean,default:!1},actions:{},showCancel:{type:Boolean,default:!0},showReset:{type:Boolean,default:!0},showSave:{type:Boolean,default:!0},cancelText:{default:"取消"},resetText:{default:"重置"},saveText:{default:"保存"},saveLoading:{type:Boolean,default:!1},saveDisabled:{type:Boolean,default:!1},beforeClose:{}},emits:["cancel","reset","save","minimize","action","update:modelValue"],setup(m,{emit:N}){const i=m,n=N,w=e.computed(()=>i.modelValue),a=e.useId?e.useId():`g-dialog-pro-${Date.now()}-${Math.random().toString(36).slice(2)}`,o=W(),r=e.ref(!1),f=e.ref(!0),g=e.ref(0),c=e.ref(!1),p=e.ref(!1),v=e.ref(!1),d=e.computed(()=>o?o.dialogs.get(a)?.isMinimized??!1:r.value),h=e.computed(()=>o?o.dialogs.get(a)?.attentionTick??0:g.value),C=e.computed(()=>o?!p.value:f.value),z=e.computed(()=>o?o.getPosition(a).value:{right:20,bottom:20});e.onMounted(()=>{o?.register({id:a,title:i.title,isMinimized:!1}),document.addEventListener("keydown",S)}),e.onUnmounted(()=>{o?.unregister(a),document.removeEventListener("keydown",S)}),e.watch(()=>i.title,t=>{if(o){const u=o.dialogs.get(a);u&&(u.title=t)}}),e.watch(()=>i.modelValue,t=>{if(t===!1){if(c.value)return;o?(o.restore(a),p.value=!1):(f.value=!0,r.value=!1)}t===!0&&(o?.dialogs.get(a)?.isMinimized?o.remindMinimized(a):r.value&&(g.value+=1))});const s=e.computed(()=>Object.prototype.hasOwnProperty.call(A,i.size)?A[i.size]:i.size),O=e.computed(()=>k.value?{}:{width:s.value});async function y(t){if(!i.beforeClose)return!0;try{return await i.beforeClose(t)!==!1}catch{return!1}}async function V(){await y("close")&&n("update:modelValue",!1)}function R(){V()}function S(t){t.key==="Escape"&&(!i.modelValue||!C.value||d.value||(t.stopPropagation(),V()))}async function T(){await y("cancel")&&n("cancel")}function D(){n("reset")}async function x(){await y("save")&&n("save")}const M=e.reactive({});async function P(t){if(await y("action")&&(n("action",t.key),!!t.onClick))try{const u=t.onClick();u instanceof Promise&&(M[t.key]=!0,await u)}finally{M[t.key]=!1}}const k=e.ref(!1),H=()=>{k.value=!k.value},G=e.computed(()=>k.value?"退出全屏":"全屏"),F=async()=>{if(!await y("minimize"))return;if(o?o.dialogs.get(a)?.isMinimized??!1:r.value){o?o.minimize(a):g.value+=1,n("minimize",{id:a});return}c.value=!0,o?o.minimize(a):r.value=!0,n("update:modelValue",!1),n("minimize",{id:a})},q=()=>{v.value=!0,c.value=!1,o?(p.value=!1,o.restore(a)):(f.value=!0,r.value=!1),n("update:modelValue",!0)},j=()=>{c.value&&(o?p.value=!0:f.value=!1,c.value=!1)},K=()=>{v.value=!1};return(t,u)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"g-dialog-pro-fade",onAfterEnter:K,onAfterLeave:j},{default:e.withCtx(()=>[C.value&&w.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"g-dialog-pro-overlay",onClick:e.withModifiers(R,["self"])},[e.createElementVNode("div",e.mergeProps(t.$attrs,{class:["g-dialog-pro",{"is-fullscreen":k.value,"is-leave-to-minimize":c.value,"is-enter-from-minimize":v.value}],style:O.value,role:"dialog","aria-modal":"true"}),[e.createElementVNode("header",oe,[e.createElementVNode("p",ae,e.toDisplayString(t.title),1),e.createElementVNode("div",ie,[e.createElementVNode("button",{type:"button",class:"g-dialog-pro-control g-dialog-pro-control--minimize","aria-label":"最小化",title:"最小化",onClick:F}),e.createElementVNode("button",{type:"button",class:"g-dialog-pro-control g-dialog-pro-control--fullscreen","aria-label":G.value,title:G.value,onClick:H},null,8,ne),e.createElementVNode("button",{type:"button",class:"g-dialog-pro-control g-dialog-pro-control--close","aria-label":L,title:L,onClick:V})])]),e.createElementVNode("div",le,[e.renderSlot(t.$slots,"default",{},void 0,!0)]),t.hideFooter?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("footer",se,[e.renderSlot(t.$slots,"footer",{cancel:T,reset:D,save:x,close:V,loading:t.saveLoading},()=>[e.createElementVNode("div",re,[t.actions&&t.actions.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.actions,l=>(e.openBlock(),e.createBlock(B.GButton,{key:l.key,type:l.type,danger:l.danger,loading:l.loading||M[l.key],disabled:l.disabled,size:"small",onClick:de=>P(l)},e.createSlots({default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(l.label),1)]),_:2},[l.icon?{name:"icon",fn:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.icon)))]),key:"0"}:void 0]),1032,["type","danger","loading","disabled","onClick"]))),128)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.showCancel?(e.openBlock(),e.createBlock(B.GButton,{key:0,size:"small",onClick:T},{icon:e.withCtx(()=>[e.createVNode(e.unref(Y))]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(t.cancelText),1)]),_:1})):e.createCommentVNode("",!0),t.showReset?(e.openBlock(),e.createBlock(B.GButton,{key:1,size:"small",onClick:D},{icon:e.withCtx(()=>[e.createVNode(e.unref(Z))]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(t.resetText),1)]),_:1})):e.createCommentVNode("",!0),t.showSave?(e.openBlock(),e.createBlock(B.GButton,{key:2,type:"emphasis",loading:t.saveLoading,disabled:t.saveDisabled,size:"small",onClick:x},{icon:e.withCtx(()=>[e.createVNode(e.unref(J))]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(t.saveText),1)]),_:1},8,["loading","disabled"])):e.createCommentVNode("",!0)],64)),e.renderSlot(t.$slots,"moreOperations",{},void 0,!0)])],!0)]))],16)])):e.createCommentVNode("",!0)]),_:3}),e.createVNode(e.unref(I.AnimatePresence),null,{default:e.withCtx(()=>[d.value?(e.openBlock(),e.createBlock(E,{key:0,title:t.title,position:z.value,"attention-tick":h.value,onRestore:q},null,8,["title","position","attention-tick"])):e.createCommentVNode("",!0)]),_:1})]))}}),b=$._export_sfc(ce,[["__scopeId","data-v-7b74a42f"]]);b.install=m=>{m.component(b.name,b),m.component(E.name,E)};exports.GDialog=b;
@@ -1 +1 @@
1
- .g-dropdown{position:relative;display:inline-block}.g-dropdown[data-disabled]{opacity:.5}.g-dropdown__trigger{position:relative;display:inline-flex;align-items:center;gap:6px;height:var(--gs-chip);margin:0;padding:0 8px 0 10px;border:0;border-radius:var(--gs-inner-radius);outline:none;background:var(--gs-surface);color:var(--gs-text);font-family:inherit;font-size:var(--gs-font);font-weight:500;line-height:1;cursor:pointer;-webkit-user-select:none;user-select:none;touch-action:manipulation;-webkit-tap-highlight-color:transparent;transition:background-color .1s ease,transform .16s cubic-bezier(.23,1,.32,1)}.g-dropdown__trigger:disabled{cursor:default}.g-dropdown__trigger:not(:disabled):active{transform:scale(.97)}.g-dropdown__trigger[aria-expanded=true]{background:color-mix(in srgb,var(--gs-highlight) 60%,var(--gs-surface))}@media(hover:hover)and (pointer:fine){.g-dropdown__trigger:not(:disabled):hover{background:color-mix(in srgb,var(--gs-highlight) 60%,var(--gs-surface))}}.g-dropdown__label[data-empty]{opacity:.6}.g-dropdown[data-swap] .g-dropdown__label{animation:gs-swap .16s ease}.g-dropdown__arrow{display:inline-flex;color:color-mix(in srgb,var(--gs-text) 55%,transparent);transition:transform .2s cubic-bezier(.23,1,.32,1)}.g-dropdown__trigger[aria-expanded=true] .g-dropdown__arrow{transform:rotate(180deg)}.g-dropdown__menu{position:absolute;z-index:20;top:calc(100% + 6px);left:0;min-width:100%;width:var(--gs-menu-w);padding:4px;border-radius:var(--gs-radius);background:var(--gs-surface);box-shadow:0 4px 16px color-mix(in srgb,#000 22%,transparent);transform:scale(.95);transform-origin:var(--gs-origin);opacity:0;pointer-events:none;transition:opacity var(--gs-pop) cubic-bezier(.23,1,.32,1),transform var(--gs-pop) cubic-bezier(.23,1,.32,1)}.g-dropdown__menu[data-side=top]{top:auto;bottom:calc(100% + 6px)}.g-dropdown__menu[data-align=right]{left:auto;right:0}.g-dropdown__menu[data-state=open]{transform:scale(1);opacity:1;pointer-events:auto}.g-dropdown__menu[data-state=closed]{transition-duration:var(--gs-pop-out);pointer-events:none}.g-dropdown__list{position:relative;display:grid;gap:1px;touch-action:none}.g-dropdown__pill{position:absolute;top:0;right:0;left:0;height:var(--gs-row);border-radius:var(--gs-inner-radius);background:var(--gs-highlight);opacity:0;pointer-events:none;transition:transform var(--gs-glide) cubic-bezier(.23,1,.32,1),opacity .15s ease}.g-dropdown__option{position:relative;z-index:1;display:flex;align-items:center;gap:8px;height:var(--gs-row);padding:0 8px 0 10px;border-radius:var(--gs-inner-radius);color:var(--gs-text);font-size:var(--gs-font);cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;transition:background-color .15s ease}.g-dropdown__option[aria-selected=true]{background:color-mix(in srgb,var(--gs-highlight) 60%,transparent)}.g-dropdown__list[data-live] .g-dropdown__option[aria-selected=true]{background:transparent}.g-dropdown__option-label{flex:1 1 0%;min-width:0;overflow:hidden;font-weight:500;text-overflow:ellipsis;white-space:nowrap}.g-dropdown__option-tag{flex-shrink:0;color:color-mix(in srgb,var(--gs-text) 55%,transparent);font-size:calc(var(--gs-font) - 2px)}.g-dropdown__option-check{display:inline-flex;flex-shrink:0;visibility:hidden;color:var(--gs-accent)}.g-dropdown__option-check[data-on]{visibility:visible}@keyframes gs-swap{0%{opacity:.6;filter:blur(2px)}}@media(prefers-reduced-motion:reduce){.g-dropdown__trigger{transition:background-color .1s ease}.g-dropdown__trigger:not(:disabled):active{transform:none}.g-dropdown[data-swap] .g-dropdown__label{animation:none}.g-dropdown__arrow{transition:none}.g-dropdown__menu{transform:none!important;transition:opacity var(--gs-pop) ease}.g-dropdown__menu[data-state=closed]{transition-duration:var(--gs-pop-out)}.g-dropdown__pill{transition:opacity .15s ease}}
1
+ .g-dropdown{position:relative;display:inline-block}.g-dropdown[data-disabled]{opacity:.5}.g-dropdown__trigger{position:relative;display:inline-flex;align-items:center;gap:6px;height:var(--gs-chip);margin:0;padding:0 8px 0 10px;border:0;border-radius:var(--gs-inner-radius);outline:none;background:var(--gs-surface);color:var(--gs-text);font-family:inherit;font-size:var(--gs-font);font-weight:500;line-height:1;cursor:pointer;-webkit-user-select:none;user-select:none;touch-action:manipulation;-webkit-tap-highlight-color:transparent;transition:background-color .1s ease,transform .16s cubic-bezier(.23,1,.32,1)}.g-dropdown__trigger:disabled{cursor:default}.g-dropdown__trigger:not(:disabled):active{transform:scale(.97)}.g-dropdown__trigger[aria-expanded=true]{background:color-mix(in srgb,var(--gs-highlight) 60%,var(--gs-surface))}@media(hover:hover)and (pointer:fine){.g-dropdown__trigger:not(:disabled):hover{background:color-mix(in srgb,var(--gs-highlight) 60%,var(--gs-surface))}}.g-dropdown__trigger[data-custom]{height:auto;padding:0;gap:0;background:transparent;border-radius:0}.g-dropdown__trigger[data-custom][aria-expanded=true]{background:transparent}@media(hover:hover)and (pointer:fine){.g-dropdown__trigger[data-custom]:not(:disabled):hover{background:transparent}}.g-dropdown__trigger[data-custom]:not(:disabled):active{transform:none}.g-dropdown__label[data-empty]{opacity:.6}.g-dropdown[data-swap] .g-dropdown__label{animation:gs-swap .16s ease}.g-dropdown__arrow{display:inline-flex;color:color-mix(in srgb,var(--gs-text) 55%,transparent);transition:transform .2s cubic-bezier(.23,1,.32,1)}.g-dropdown__trigger[aria-expanded=true] .g-dropdown__arrow{transform:rotate(180deg)}.g-dropdown__menu{position:absolute;z-index:20;top:calc(100% + 6px);left:0;min-width:100%;width:var(--gs-menu-w);padding:4px;border-radius:var(--gs-radius);background:var(--gs-surface);box-shadow:0 4px 16px color-mix(in srgb,#000 22%,transparent);transform:scale(.95);transform-origin:var(--gs-origin);opacity:0;pointer-events:none;transition:opacity var(--gs-pop) cubic-bezier(.23,1,.32,1),transform var(--gs-pop) cubic-bezier(.23,1,.32,1)}.g-dropdown__menu[data-side=top]{top:auto;bottom:calc(100% + 6px)}.g-dropdown__menu[data-align=right]{left:auto;right:0}.g-dropdown__menu[data-state=open]{transform:scale(1);opacity:1;pointer-events:auto}.g-dropdown__menu[data-state=closed]{transition-duration:var(--gs-pop-out);pointer-events:none}.g-dropdown__menu[data-slot]{width:auto;min-width:0}.g-dropdown__menu[data-teleported]{min-width:0;z-index:2000}.g-dropdown__list{position:relative;display:grid;gap:1px;touch-action:none}.g-dropdown__pill{position:absolute;top:0;right:0;left:0;height:var(--gs-row);border-radius:var(--gs-inner-radius);background:var(--gs-highlight);opacity:0;pointer-events:none;transition:transform var(--gs-glide) cubic-bezier(.23,1,.32,1),opacity .15s ease}.g-dropdown__option{position:relative;z-index:1;display:flex;align-items:center;gap:8px;height:var(--gs-row);padding:0 8px 0 10px;border-radius:var(--gs-inner-radius);color:var(--gs-text);font-size:var(--gs-font);cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;transition:background-color .15s ease}.g-dropdown__option[aria-selected=true]{background:color-mix(in srgb,var(--gs-highlight) 60%,transparent)}.g-dropdown__list[data-live] .g-dropdown__option[aria-selected=true]{background:transparent}.g-dropdown__option-label{flex:1 1 0%;min-width:0;overflow:hidden;font-weight:500;text-overflow:ellipsis;white-space:nowrap}.g-dropdown__option-tag{flex-shrink:0;color:color-mix(in srgb,var(--gs-text) 55%,transparent);font-size:calc(var(--gs-font) - 2px)}.g-dropdown__option-check{display:inline-flex;flex-shrink:0;visibility:hidden;color:var(--gs-accent)}.g-dropdown__option-check[data-on]{visibility:visible}@keyframes gs-swap{0%{opacity:.6;filter:blur(2px)}}@media(prefers-reduced-motion:reduce){.g-dropdown__trigger{transition:background-color .1s ease}.g-dropdown__trigger:not(:disabled):active{transform:none}.g-dropdown[data-swap] .g-dropdown__label{animation:none}.g-dropdown__arrow{transition:none}.g-dropdown__menu{transform:none!important;transition:opacity var(--gs-pop) ease}.g-dropdown__menu[data-state=closed]{transition-duration:var(--gs-pop-out)}.g-dropdown__pill{transition:opacity .15s ease}}