@epam/ai-dial-prompts 1.3.6 → 1.4.0-dev.101

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.
@@ -1 +1 @@
1
- {"version":3,"file":"PromptParametersPopup.d.ts","sourceRoot":"","sources":["../../../src/components/PromptParametersPopup/PromptParametersPopup.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAmB,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AAG7F;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,EAAE,CAAC,0BAA0B,CAkJhE,CAAC"}
1
+ {"version":3,"file":"PromptParametersPopup.d.ts","sourceRoot":"","sources":["../../../src/components/PromptParametersPopup/PromptParametersPopup.tsx"],"names":[],"mappings":"AAkBA,OAAO,EAAmB,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AAO7F;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,EAAE,CAAC,0BAA0B,CA+MhE,CAAC"}
package/index.css CHANGED
@@ -1,3 +1,3 @@
1
1
  ._header_1pyx6_3{color:var(--fp-header-text,var(--text-tertiary,#848e9c))}._emptyHint_1pyx6_7{color:var(--fp-empty-hint-text,var(--text-icon-tertiary,#848e9c))}._star_1pyx6_11{color:var(--fp-star-color,var(--text-warning-icon,#eec840))}._footer_1pyx6_15{border-top-color:var(--fp-footer-border,var(--stroke-tertiary,#e0e6f0))}._rowEnter_1pyx6_23{animation:.2s ease-out _rowFadeIn_1pyx6_1}._rowLeaving_1pyx6_27{pointer-events:none;animation:.18s ease-out forwards _rowFadeOut_1pyx6_1}@keyframes _rowFadeIn_1pyx6_1{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}@keyframes _rowFadeOut_1pyx6_1{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.96)}}._listContent_1pyx6_55{transition:max-height .2s}@media (prefers-reduced-motion:reduce){._rowEnter_1pyx6_23,._rowLeaving_1pyx6_27{animation:none}._listContent_1pyx6_55{transition:none}}._card_p8vwa_1{background:var(--pp-card-bg,var(--bg-layer-sunken,#eef1f7));border-color:var(--pp-card-border,var(--stroke-tertiary,#e0e6f0))}
2
2
  /*$vite$:1*//*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
3
- @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}.m-0{margin:0}.flex{display:flex}.grid{display:grid}.list-item{display:list-item}.h-\[72px\]{height:72px}.h-auto{height:auto}.min-h-0{min-height:0}.w-full{width:100%}.max-w-\[550px\]{max-width:550px}.min-w-\[240px\]{min-width:240px}.flex-1{flex:1}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.overflow-y-auto{overflow-y:auto}.rounded-lg{border-radius:.5rem}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.px-1{padding-inline:.25rem}.px-2{padding-inline:.5rem}.px-3{padding-inline:.75rem}.px-4{padding-inline:1rem}.px-6{padding-inline:1.5rem}.py-1\.5{padding-block:.375rem}.py-3{padding-block:.75rem}.py-4{padding-block:1rem}.pt-2{padding-top:.5rem}.pb-0\.5{padding-bottom:.125rem}.pb-1{padding-bottom:.25rem}.pb-4{padding-bottom:1rem}.text-start{text-align:start}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,cubic-bezier(.4, 0, .2, 1));transition-duration:var(--tw-duration,.15s)}.rtl\:scale-x-\[-1\]:where(:dir(rtl),[dir=rtl],[dir=rtl] *){--tw-scale-x:-1;scale:var(--tw-scale-x) var(--tw-scale-y)}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}
3
+ @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}.m-0{margin:0}.mx-6{margin-inline:1.5rem}.flex{display:flex}.grid{display:grid}.list-item{display:list-item}.h-\[72px\]{height:72px}.h-\[calc\(100dvh-4rem\)\]\!{height:calc(100dvh - 4rem)!important}.h-auto{height:auto}.max-h-\[calc\(100dvh-4rem\)\]\!{max-height:calc(100dvh - 4rem)!important}.min-h-0{min-height:0}.w-full{width:100%}.max-w-\[550px\]{max-width:550px}.min-w-\[240px\]{min-width:240px}.flex-1{flex:1}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.overflow-y-auto{overflow-y:auto}.rounded-lg{border-radius:.5rem}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.px-1{padding-inline:.25rem}.px-2{padding-inline:.5rem}.px-3{padding-inline:.75rem}.px-4{padding-inline:1rem}.px-6{padding-inline:1.5rem}.py-1\.5{padding-block:.375rem}.py-3{padding-block:.75rem}.py-4{padding-block:1rem}.pt-2{padding-top:.5rem}.pb-0\.5{padding-bottom:.125rem}.pb-1{padding-bottom:.25rem}.pb-4{padding-bottom:1rem}.text-start{text-align:start}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,cubic-bezier(.4, 0, .2, 1));transition-duration:var(--tw-duration,.15s)}.rtl\:scale-x-\[-1\]:where(:dir(rtl),[dir=rtl],[dir=rtl] *){--tw-scale-x:-1;scale:var(--tw-scale-x) var(--tw-scale-y)}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}
@@ -7,10 +7,12 @@ export interface PromptParametersPopupLabels {
7
7
  closeLabel?: string;
8
8
  /** Accessible label for the back chevron, shown only when `onBack` is provided. Defaults to `'Back'`. */
9
9
  backLabel?: string;
10
- /** Heading for the parameters column. Defaults to `'Parameters'`. */
10
+ /** Heading for the parameters column (tab label on mobile). Defaults to `'Parameters'`. */
11
11
  parametersLabel?: string;
12
- /** Heading for the details column. Defaults to `'Details'`. */
12
+ /** Heading for the details column (tab label on mobile). Defaults to `'Details'`. */
13
13
  detailsLabel?: string;
14
+ /** Accessible name of the Parameters/Details tab list shown on mobile. Defaults to `'Prompt parameters sections'`. */
15
+ tabsAriaLabel?: string;
14
16
  /** Placeholder shown in each empty parameter field. Defaults to `'Enter value'`. */
15
17
  enterValuePlaceholder?: string;
16
18
  /** Label for the footer Cancel button. Defaults to `'Cancel'`. */
@@ -1 +1 @@
1
- {"version":3,"file":"prompt-parameters-popup-props.d.ts","sourceRoot":"","sources":["../../src/models/prompt-parameters-popup-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAEjE,2EAA2E;AAC3E,MAAM,WAAW,2BAA2B;IAC1C,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oEAAoE;IACpE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yGAAyG;IACzG,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qEAAqE;IACrE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,+DAA+D;IAC/D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oFAAoF;IACpF,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,kEAAkE;IAClE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mEAAmE;IACnE,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,+EAA+E;AAC/E,MAAM,WAAW,2BAA2B;IAC1C,oFAAoF;IACpF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gFAAgF;IAChF,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,uDAAuD;AACvD,MAAM,WAAW,0BAA0B;IACzC,iCAAiC;IACjC,IAAI,EAAE,OAAO,CAAC;IACd,qEAAqE;IACrE,UAAU,EAAE,MAAM,CAAC;IACnB,mHAAmH;IACnH,OAAO,EAAE,MAAM,CAAC;IAChB,uFAAuF;IACvF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;OAKG;IACH,UAAU,EAAE,eAAe,EAAE,CAAC;IAC9B;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,+DAA+D;IAC/D,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,uFAAuF;IACvF,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,IAAI,CAAC;IACnD,gDAAgD;IAChD,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,oCAAoC;IACpC,MAAM,CAAC,EAAE,2BAA2B,CAAC;IACrC,wDAAwD;IACxD,MAAM,CAAC,EAAE,2BAA2B,CAAC;IACrC,0EAA0E;IAC1E,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,0FAA0F;IAC1F,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,uFAAuF;IACvF,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC"}
1
+ {"version":3,"file":"prompt-parameters-popup-props.d.ts","sourceRoot":"","sources":["../../src/models/prompt-parameters-popup-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAEjE,2EAA2E;AAC3E,MAAM,WAAW,2BAA2B;IAC1C,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oEAAoE;IACpE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yGAAyG;IACzG,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2FAA2F;IAC3F,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,qFAAqF;IACrF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,sHAAsH;IACtH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,oFAAoF;IACpF,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,kEAAkE;IAClE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mEAAmE;IACnE,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,+EAA+E;AAC/E,MAAM,WAAW,2BAA2B;IAC1C,oFAAoF;IACpF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gFAAgF;IAChF,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,uDAAuD;AACvD,MAAM,WAAW,0BAA0B;IACzC,iCAAiC;IACjC,IAAI,EAAE,OAAO,CAAC;IACd,qEAAqE;IACrE,UAAU,EAAE,MAAM,CAAC;IACnB,mHAAmH;IACnH,OAAO,EAAE,MAAM,CAAC;IAChB,uFAAuF;IACvF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;OAKG;IACH,UAAU,EAAE,eAAe,EAAE,CAAC;IAC9B;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,+DAA+D;IAC/D,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,uFAAuF;IACvF,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,IAAI,CAAC;IACnD,gDAAgD;IAChD,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,oCAAoC;IACpC,MAAM,CAAC,EAAE,2BAA2B,CAAC;IACrC,wDAAwD;IACxD,MAAM,CAAC,EAAE,2BAA2B,CAAC;IACrC,0EAA0E;IAC1E,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,0FAA0F;IAC1F,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,uFAAuF;IACvF,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-prompts",
3
3
  "description": "Host-agnostic UI for picking a favorite prompt and resolving its {{parameter}} placeholders before it is inserted into a chat message",
4
- "version": "1.3.6",
4
+ "version": "1.4.0-dev.101",
5
5
  "license": "Apache-2.0",
6
6
  "sideEffects": [
7
7
  "**/*.css",
@@ -27,10 +27,10 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@tabler/icons-react": "^3.50.0",
30
- "@epam/ai-dial-catalog": "1.3.6"
30
+ "@epam/ai-dial-catalog": "1.4.0-dev.101"
31
31
  },
32
32
  "peerDependencies": {
33
- "@epam/ai-dial-chat-shared": "1.3.6",
33
+ "@epam/ai-dial-chat-shared": "1.4.0-dev.101",
34
34
  "@epam/ai-dial-ui-kit": "^0.16.0",
35
35
  "react": "^19.2.8"
36
36
  },
@@ -1,97 +1,124 @@
1
1
  import { useId as e, useState as t } from "react";
2
2
  import { jsx as n, jsxs as r } from "react/jsx-runtime";
3
- import { CatalogEntityType as i, buildCssVars as a, buildPromptParamDefaults as o, mergeClasses as s } from "@epam/ai-dial-chat-shared";
4
- import { ButtonVariant as c, DIAL_KIT_ICON_STROKE as l, GhostIconButton as u, Popup as d, PopupSize as f, Textarea as p } from "@epam/ai-dial-ui-kit";
5
- import { IconChevronLeft as m } from "@tabler/icons-react";
6
- import { AppIdentity as h, ContentTab as g, DeploymentSize as _ } from "@epam/ai-dial-catalog";
7
- var v = { card: "_card_p8vwa_1" }, y = ({ open: y, promptName: b, content: x, description: S, parameters: C, onBack: w, onClose: T, onSubmit: E, onCancel: D, labels: O = {}, colors: k, titleClassName: A = "dial-h2-text", parametersLabelClassName: j = "dial-h2-text", detailsLabelClassName: M = "dial-h2-text" }) => {
8
- let { title: N = "Prompt parameters", closeLabel: P = "Close", backLabel: F = "Back", parametersLabel: I = "Parameters", detailsLabel: L = "Details", enterValuePlaceholder: R = "Enter value", cancelLabel: z = "Cancel", submitLabel: B = "Confirm" } = O, V = C.map(({ name: e, defaultValue: t }) => `${e}\u0000${t ?? ""}`).join(""), [H, U] = t(() => o(C)), [W, G] = t(V);
9
- W !== V && (G(V), U(o(C)));
10
- let K = e(), q = a({
11
- "--pp-card-bg": k?.cardBackground,
12
- "--pp-card-border": k?.cardBorder
13
- }), J = C.some(({ name: e }) => !H[e]?.trim());
14
- return /* @__PURE__ */ n(d, {
15
- open: y,
3
+ import { CatalogEntityType as i, buildCssVars as a, buildPromptParamDefaults as o, mergeClasses as s, useIsMobile as c } from "@epam/ai-dial-chat-shared";
4
+ import { ButtonVariant as l, DIAL_KIT_ICON_STROKE as u, GhostIconButton as d, Popup as f, PopupSize as p, Tabs as m, Textarea as h } from "@epam/ai-dial-ui-kit";
5
+ import { IconChevronLeft as g } from "@tabler/icons-react";
6
+ import { AppIdentity as _, ContentTab as v, DeploymentSize as y } from "@epam/ai-dial-catalog";
7
+ //#region src/types/prompt-parameters-popup.ts
8
+ var b = /* @__PURE__ */ function(e) {
9
+ return e.Parameters = "parameters", e.Details = "details", e;
10
+ }({}), x = (e) => Object.values(b).includes(e), ee = { card: "_card_p8vwa_1" }, S = ({ open: S, promptName: C, content: w, description: T, parameters: E, onBack: D, onClose: O, onSubmit: k, onCancel: A, labels: j = {}, colors: M, titleClassName: N = "dial-h2-text", parametersLabelClassName: P = "dial-h2-text", detailsLabelClassName: F = "dial-h2-text" }) => {
11
+ let { title: I = "Prompt parameters", closeLabel: te = "Close", backLabel: L = "Back", parametersLabel: R = "Parameters", detailsLabel: z = "Details", tabsAriaLabel: B = "Prompt parameters sections", enterValuePlaceholder: V = "Enter value", cancelLabel: H = "Cancel", submitLabel: U = "Confirm" } = j, W = E.map(({ name: e, defaultValue: t }) => `${e}\u0000${t ?? ""}`).join(""), [G, K] = t(() => o(E)), [q, J] = t(W), [Y, X] = t(b.Parameters);
12
+ q !== W && (J(W), K(o(E)), X(b.Parameters));
13
+ let Z = e(), Q = c(), ne = !Q || Y === b.Parameters, re = !Q || Y === b.Details, ie = a({
14
+ "--pp-card-bg": M?.cardBackground,
15
+ "--pp-card-border": M?.cardBorder
16
+ }), $ = E.some(({ name: e }) => !G[e]?.trim());
17
+ return /* @__PURE__ */ n(f, {
18
+ open: S,
16
19
  header: /* @__PURE__ */ r("div", {
17
20
  className: "flex items-center gap-2",
18
- children: [w != null && /* @__PURE__ */ n(u, {
19
- icon: /* @__PURE__ */ n(m, {
21
+ children: [D != null && /* @__PURE__ */ n(d, {
22
+ icon: /* @__PURE__ */ n(g, {
20
23
  className: "rtl:scale-x-[-1]",
21
24
  "aria-hidden": !0,
22
- stroke: l
25
+ stroke: u
23
26
  }),
24
- "aria-label": F,
25
- onClick: w
27
+ "aria-label": L,
28
+ onClick: D
26
29
  }), /* @__PURE__ */ n("span", {
27
- className: A,
28
- children: N
30
+ className: N,
31
+ children: I
29
32
  })]
30
33
  }),
31
- ariaLabel: N,
32
- size: f.Lg,
33
- closeAriaLabel: P,
34
- onClose: T,
34
+ ariaLabel: I,
35
+ size: p.Lg,
36
+ className: Q ? "h-[calc(100dvh-4rem)]! max-h-[calc(100dvh-4rem)]!" : void 0,
37
+ closeAriaLabel: te,
38
+ onClose: O,
35
39
  mainButtons: [{
36
- label: z,
37
- onClick: D
40
+ label: H,
41
+ onClick: A
38
42
  }, {
39
- label: B,
40
- variant: c.Primary,
41
- disabled: J,
43
+ label: U,
44
+ variant: l.Primary,
45
+ disabled: $,
42
46
  onClick: () => {
43
- J || E(H);
47
+ $ || k(G);
44
48
  }
45
49
  }],
46
50
  children: /* @__PURE__ */ r("div", {
47
- className: "flex flex-col gap-4 px-6 pt-2 pb-4",
48
- children: [/* @__PURE__ */ n("div", {
49
- className: s("flex h-[72px] w-full items-center rounded-lg border px-3", v.card),
50
- style: q,
51
- children: /* @__PURE__ */ n(h, {
52
- type: i.Prompt,
53
- name: b,
54
- size: _.LG,
55
- className: "w-full"
56
- })
57
- }), /* @__PURE__ */ r("div", {
58
- className: "grid grid-cols-2 gap-4",
59
- children: [/* @__PURE__ */ r("div", {
60
- className: "flex flex-col gap-3",
61
- children: [/* @__PURE__ */ n("h2", {
62
- className: s(j, "m-0"),
63
- children: I
64
- }), C.map(({ name: e }) => {
65
- let t = `${K}-${e}`;
66
- return /* @__PURE__ */ n(p, {
67
- id: t,
68
- "aria-label": e,
69
- value: H[e] ?? "",
70
- labelProps: {
71
- htmlFor: t,
72
- label: e,
73
- required: !0
74
- },
75
- placeholder: R,
76
- onChange: (t) => U((n) => ({
77
- ...n,
78
- [e]: t
79
- }))
80
- }, e);
81
- })]
82
- }), /* @__PURE__ */ r("div", {
83
- className: "flex min-h-0 flex-col gap-3",
84
- children: [/* @__PURE__ */ n("h2", {
85
- className: s(M, "m-0"),
86
- children: L
87
- }), /* @__PURE__ */ n(g, {
88
- content: x,
89
- description: S
51
+ className: "flex flex-col gap-4 pt-2 pb-4",
52
+ children: [
53
+ /* @__PURE__ */ n("div", {
54
+ className: s("mx-6 flex h-[72px] items-center rounded-lg border px-3", ee.card),
55
+ style: ie,
56
+ children: /* @__PURE__ */ n(_, {
57
+ type: i.Prompt,
58
+ name: C,
59
+ size: y.LG,
60
+ className: "w-full"
61
+ })
62
+ }),
63
+ Q && /* @__PURE__ */ n(m, {
64
+ ariaLabel: B,
65
+ className: "px-6",
66
+ tabs: [{
67
+ id: b.Parameters,
68
+ label: R
69
+ }, {
70
+ id: b.Details,
71
+ label: z
72
+ }],
73
+ activeTabId: Y,
74
+ onTabChange: (e) => {
75
+ x(e) && X(e);
76
+ }
77
+ }),
78
+ /* @__PURE__ */ r("div", {
79
+ className: s("gap-4 px-6", Q ? "flex flex-col" : "grid grid-cols-2"),
80
+ children: [ne && /* @__PURE__ */ r("div", {
81
+ role: Q ? "tabpanel" : void 0,
82
+ "aria-label": Q ? R : void 0,
83
+ className: "flex flex-col gap-3",
84
+ children: [!Q && /* @__PURE__ */ n("h2", {
85
+ className: s(P, "m-0"),
86
+ children: R
87
+ }), E.map(({ name: e }) => {
88
+ let t = `${Z}-${e}`;
89
+ return /* @__PURE__ */ n(h, {
90
+ id: t,
91
+ "aria-label": e,
92
+ value: G[e] ?? "",
93
+ labelProps: {
94
+ htmlFor: t,
95
+ label: e,
96
+ required: !0
97
+ },
98
+ placeholder: V,
99
+ onChange: (t) => K((n) => ({
100
+ ...n,
101
+ [e]: t
102
+ }))
103
+ }, e);
104
+ })]
105
+ }), re && /* @__PURE__ */ r("div", {
106
+ role: Q ? "tabpanel" : void 0,
107
+ "aria-label": Q ? z : void 0,
108
+ tabIndex: Q ? 0 : void 0,
109
+ className: "flex min-h-0 flex-col gap-3",
110
+ children: [!Q && /* @__PURE__ */ n("h2", {
111
+ className: s(F, "m-0"),
112
+ children: z
113
+ }), /* @__PURE__ */ n(v, {
114
+ content: w,
115
+ description: T
116
+ })]
90
117
  })]
91
- })]
92
- })]
118
+ })
119
+ ]
93
120
  })
94
121
  });
95
122
  };
96
123
  //#endregion
97
- export { y as PromptParametersPopup };
124
+ export { S as PromptParametersPopup };
@@ -0,0 +1,8 @@
1
+ /** Tabs of the prompt-parameters popup shown on mobile viewports. */
2
+ export declare enum PromptParametersPopupTab {
3
+ Parameters = "parameters",
4
+ Details = "details"
5
+ }
6
+ /** Returns `true` when `value` is the id of a `PromptParametersPopupTab` member. */
7
+ export declare const isPromptParametersPopupTab: (value: string) => value is PromptParametersPopupTab;
8
+ //# sourceMappingURL=prompt-parameters-popup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompt-parameters-popup.d.ts","sourceRoot":"","sources":["../../src/types/prompt-parameters-popup.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,oBAAY,wBAAwB;IAClC,UAAU,eAAe;IACzB,OAAO,YAAY;CACpB;AAED,oFAAoF;AACpF,eAAO,MAAM,0BAA0B,GACrC,OAAO,MAAM,KACZ,KAAK,IAAI,wBACqD,CAAC"}