@fluentui-copilot/react-prompt-starter 0.10.6 → 0.10.8
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.
- package/CHANGELOG.json +81 -1
- package/CHANGELOG.md +27 -2
- package/dist/index.d.ts +58 -3
- package/lib/components/PromptStarter/PromptStarter.js +4 -1
- package/lib/components/PromptStarter/PromptStarter.js.map +1 -1
- package/lib/components/PromptStarter/PromptStarter.types.js +2 -0
- package/lib/components/PromptStarter/PromptStarter.types.js.map +1 -1
- package/lib/components/PromptStarter/renderPromptStarter.js +4 -1
- package/lib/components/PromptStarter/renderPromptStarter.js.map +1 -1
- package/lib/components/PromptStarter/usePromptStarter.js +3 -0
- package/lib/components/PromptStarter/usePromptStarter.js.map +1 -1
- package/lib/components/PromptStarter/usePromptStarterStyles.styles.js +4 -0
- package/lib/components/PromptStarter/usePromptStarterStyles.styles.js.map +1 -1
- package/lib/components/PromptStarter/usePromptStarterStyles.styles.raw.js +4 -1
- package/lib/components/PromptStarter/usePromptStarterStyles.styles.raw.js.map +1 -1
- package/lib/components/PromptStarterV2/PromptStarter/PromptStarter.types.js.map +1 -1
- package/lib/components/PromptStarterV2/PromptStarter/renderPromptStarter.js +1 -0
- package/lib/components/PromptStarterV2/PromptStarter/renderPromptStarter.js.map +1 -1
- package/lib/components/PromptStarterV2/PromptStarter/usePromptStarter.js +8 -1
- package/lib/components/PromptStarterV2/PromptStarter/usePromptStarter.js.map +1 -1
- package/lib/components/PromptStarterV2/PromptStarter/usePromptStarterStyles.styles.js +112 -23
- package/lib/components/PromptStarterV2/PromptStarter/usePromptStarterStyles.styles.js.map +1 -1
- package/lib/components/PromptStarterV2/PromptStarter/usePromptStarterStyles.styles.raw.js +62 -12
- package/lib/components/PromptStarterV2/PromptStarter/usePromptStarterStyles.styles.raw.js.map +1 -1
- package/lib/components/PromptStarterV2/PromptStarterList/PromptStarterList.types.js.map +1 -1
- package/lib/components/PromptStarterV2/PromptStarterList/renderPromptStarterList.js +1 -0
- package/lib/components/PromptStarterV2/PromptStarterList/renderPromptStarterList.js.map +1 -1
- package/lib/components/PromptStarterV2/PromptStarterList/usePromptStarterList.js +33 -10
- package/lib/components/PromptStarterV2/PromptStarterList/usePromptStarterList.js.map +1 -1
- package/lib/components/PromptStarterV2/PromptStarterList/usePromptStarterListStyles.styles.js +30 -4
- package/lib/components/PromptStarterV2/PromptStarterList/usePromptStarterListStyles.styles.js.map +1 -1
- package/lib/components/PromptStarterV2/PromptStarterList/usePromptStarterListStyles.styles.raw.js +16 -4
- package/lib/components/PromptStarterV2/PromptStarterList/usePromptStarterListStyles.styles.raw.js.map +1 -1
- package/lib/contexts/PromptStarterListContext.js.map +1 -1
- package/lib-commonjs/components/PromptStarter/PromptStarter.js.map +1 -1
- package/lib-commonjs/components/PromptStarter/PromptStarter.types.js +2 -0
- package/lib-commonjs/components/PromptStarter/PromptStarter.types.js.map +1 -1
- package/lib-commonjs/components/PromptStarter/renderPromptStarter.js.map +1 -1
- package/lib-commonjs/components/PromptStarter/usePromptStarter.js.map +1 -1
- package/lib-commonjs/components/PromptStarter/usePromptStarterStyles.styles.js.map +1 -1
- package/lib-commonjs/components/PromptStarter/usePromptStarterStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/PromptStarterV2/PromptStarter/PromptStarter.types.js.map +1 -1
- package/lib-commonjs/components/PromptStarterV2/PromptStarter/renderPromptStarter.js +1 -0
- package/lib-commonjs/components/PromptStarterV2/PromptStarter/renderPromptStarter.js.map +1 -1
- package/lib-commonjs/components/PromptStarterV2/PromptStarter/usePromptStarter.js +8 -1
- package/lib-commonjs/components/PromptStarterV2/PromptStarter/usePromptStarter.js.map +1 -1
- package/lib-commonjs/components/PromptStarterV2/PromptStarter/usePromptStarterStyles.styles.js +170 -28
- package/lib-commonjs/components/PromptStarterV2/PromptStarter/usePromptStarterStyles.styles.js.map +1 -1
- package/lib-commonjs/components/PromptStarterV2/PromptStarter/usePromptStarterStyles.styles.raw.js +62 -12
- package/lib-commonjs/components/PromptStarterV2/PromptStarter/usePromptStarterStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/PromptStarterV2/PromptStarterList/PromptStarterList.types.js.map +1 -1
- package/lib-commonjs/components/PromptStarterV2/PromptStarterList/renderPromptStarterList.js +1 -0
- package/lib-commonjs/components/PromptStarterV2/PromptStarterList/renderPromptStarterList.js.map +1 -1
- package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterList.js +33 -10
- package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterList.js.map +1 -1
- package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterListStyles.styles.js +41 -4
- package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterListStyles.styles.js.map +1 -1
- package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterListStyles.styles.raw.js +16 -4
- package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterListStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/contexts/PromptStarterListContext.js.map +1 -1
- package/package.json +12 -12
|
@@ -4,6 +4,7 @@ export const promptStarterClassNames = {
|
|
|
4
4
|
root: 'fai-PromptStarter',
|
|
5
5
|
primaryAction: 'fai-PromptStarter__primaryAction',
|
|
6
6
|
icon: 'fai-PromptStarter__icon',
|
|
7
|
+
category: 'fai-PromptStarter__category',
|
|
7
8
|
prompt: 'fai-PromptStarter__prompt',
|
|
8
9
|
reasonMarker: 'fai-PromptStarter__reasonMarker',
|
|
9
10
|
actions: 'fai-PromptStarter__actions'
|
|
@@ -17,9 +18,10 @@ const useStyles = __styles({
|
|
|
17
18
|
Bw0ie65: 0,
|
|
18
19
|
Br312pm: 0,
|
|
19
20
|
Beweih1: "f1eb8yyf",
|
|
20
|
-
mc9l5x: "f22iagw",
|
|
21
|
-
Beiy3e4: "f1vx9l62",
|
|
22
21
|
qhf8xq: "f10pi13n",
|
|
22
|
+
mc9l5x: "f13qh94s",
|
|
23
|
+
Budl1dq: "fwggfk1",
|
|
24
|
+
v29qe6: "f1wv14k0",
|
|
23
25
|
Beyfa6y: 0,
|
|
24
26
|
Bbmb7ep: 0,
|
|
25
27
|
Btl43ni: 0,
|
|
@@ -31,7 +33,8 @@ const useStyles = __styles({
|
|
|
31
33
|
Bceei9c: "f1k6fduh",
|
|
32
34
|
oeaueh: "f1s6fcnf",
|
|
33
35
|
fsow6f: ["f1o700av", "fes3tcz"],
|
|
34
|
-
|
|
36
|
+
i8kkvl: "f6ave1s",
|
|
37
|
+
Belr9w4: "f1wn3y0l",
|
|
35
38
|
Byoj8tv: 0,
|
|
36
39
|
uwmqm3: 0,
|
|
37
40
|
z189sj: 0,
|
|
@@ -103,21 +106,46 @@ const useStyles = __styles({
|
|
|
103
106
|
icon: {
|
|
104
107
|
mc9l5x: "f22iagw",
|
|
105
108
|
Bt984gj: "f122n59",
|
|
106
|
-
sshi5w: "fntfeoj"
|
|
109
|
+
sshi5w: "fntfeoj",
|
|
110
|
+
nk6f5a: 0,
|
|
111
|
+
Ijaq50: 0,
|
|
112
|
+
h3tjnc: "fm1owph",
|
|
113
|
+
Bw0ie65: 0,
|
|
114
|
+
Br312pm: 0,
|
|
115
|
+
Beweih1: "f12k0sjh"
|
|
116
|
+
},
|
|
117
|
+
category: {
|
|
118
|
+
nk6f5a: 0,
|
|
119
|
+
Ijaq50: 0,
|
|
120
|
+
h3tjnc: "fm1owph",
|
|
121
|
+
Bw0ie65: 0,
|
|
122
|
+
Br312pm: 0,
|
|
123
|
+
Beweih1: "f14q5zaz",
|
|
124
|
+
qb2dma: "f7nlbp4",
|
|
125
|
+
sj55zd: "f19n0e5",
|
|
126
|
+
Bahqtrf: "fk6fouc",
|
|
127
|
+
Be2twd7: "fkhj508",
|
|
128
|
+
Bhrd7zp: "fl43uef",
|
|
129
|
+
Bg96gwp: "f1i3iumi",
|
|
130
|
+
mc9l5x: "f1rvi9lw",
|
|
131
|
+
Fd1uvx: "fpfc2by",
|
|
132
|
+
Bh9c35c: "fvvof4m",
|
|
133
|
+
Bmxbyg5: "f1sil6mw",
|
|
134
|
+
Biipf1f: "f9ijwd5"
|
|
107
135
|
},
|
|
108
136
|
actions: {
|
|
109
|
-
jrapky: 0,
|
|
110
|
-
Frg6f3: 0,
|
|
111
|
-
t21cq0: 0,
|
|
112
|
-
B6of3ja: 0,
|
|
113
|
-
B74szlk: ["foizga4", "f5m8a6r"],
|
|
114
|
-
qhf8xq: "f10pi13n",
|
|
115
137
|
nk6f5a: 0,
|
|
116
138
|
Ijaq50: 0,
|
|
117
139
|
h3tjnc: "f3hl5xl",
|
|
118
140
|
Bw0ie65: 0,
|
|
119
141
|
Br312pm: 0,
|
|
120
142
|
Beweih1: "f14q5zaz",
|
|
143
|
+
qhf8xq: "f10pi13n",
|
|
144
|
+
jrapky: 0,
|
|
145
|
+
Frg6f3: 0,
|
|
146
|
+
t21cq0: 0,
|
|
147
|
+
B6of3ja: 0,
|
|
148
|
+
B74szlk: ["foizga4", "f5m8a6r"],
|
|
121
149
|
abs64n: "f5p0z4x",
|
|
122
150
|
Bn62ygk: 0,
|
|
123
151
|
Cwk7ip: 0,
|
|
@@ -126,7 +154,17 @@ const useStyles = __styles({
|
|
|
126
154
|
Bkqvd7p: 0,
|
|
127
155
|
Bi2q7bf: "f1964ud6"
|
|
128
156
|
},
|
|
157
|
+
actionsWithCategory: {
|
|
158
|
+
De3pzq: "fxugw4r",
|
|
159
|
+
E5pizo: ["f1u7pq1e", "f1pdyzui"]
|
|
160
|
+
},
|
|
129
161
|
prompt: {
|
|
162
|
+
nk6f5a: 0,
|
|
163
|
+
Ijaq50: 0,
|
|
164
|
+
h3tjnc: "f1daok31",
|
|
165
|
+
Bw0ie65: 0,
|
|
166
|
+
Br312pm: 0,
|
|
167
|
+
Beweih1: "f1eb8yyf",
|
|
130
168
|
Bahqtrf: "fk6fouc",
|
|
131
169
|
Be2twd7: "fkhj508",
|
|
132
170
|
Bhrd7zp: "fl43uef",
|
|
@@ -134,22 +172,37 @@ const useStyles = __styles({
|
|
|
134
172
|
mc9l5x: "f1rvi9lw",
|
|
135
173
|
Fd1uvx: "fpfc2by",
|
|
136
174
|
Bh9c35c: "f1lvsx7g",
|
|
137
|
-
Bmxbyg5: "f1sil6mw"
|
|
175
|
+
Bmxbyg5: "f1sil6mw",
|
|
176
|
+
Biipf1f: "f9ijwd5"
|
|
177
|
+
},
|
|
178
|
+
promptNoReasonMarker: {
|
|
179
|
+
Bh9c35c: "f197wrh9"
|
|
138
180
|
},
|
|
139
181
|
reasonMarker: {
|
|
182
|
+
nk6f5a: 0,
|
|
183
|
+
Ijaq50: 0,
|
|
184
|
+
h3tjnc: "f17e42vn",
|
|
185
|
+
Bw0ie65: 0,
|
|
186
|
+
Br312pm: 0,
|
|
187
|
+
Beweih1: "f1eb8yyf",
|
|
140
188
|
Bahqtrf: "fk6fouc",
|
|
141
189
|
Be2twd7: "f13mqy1h",
|
|
142
190
|
Bhrd7zp: "figsok6",
|
|
143
|
-
Bg96gwp: "fcpl73t"
|
|
191
|
+
Bg96gwp: "fcpl73t",
|
|
192
|
+
mc9l5x: "f1rvi9lw",
|
|
193
|
+
Fd1uvx: "fpfc2by",
|
|
194
|
+
Bh9c35c: "fvvof4m",
|
|
195
|
+
Bmxbyg5: "f1sil6mw",
|
|
196
|
+
Biipf1f: "f9ijwd5"
|
|
144
197
|
}
|
|
145
198
|
}, {
|
|
146
199
|
d: [[".fcdwmbt{grid-row:1/3;}", {
|
|
147
200
|
p: -1
|
|
148
201
|
}], [".f1eb8yyf{grid-column:1/3;}", {
|
|
149
202
|
p: -1
|
|
150
|
-
}], ".
|
|
203
|
+
}], ".f10pi13n{position:relative;}", ".f13qh94s{display:grid;}", ".fwggfk1{grid-template-columns:max-content 1fr;}", ".f1wv14k0{grid-auto-rows:max-content 1fr max-content;}", [".f14w4nd{border-radius:28px;}", {
|
|
151
204
|
p: -1
|
|
152
|
-
}], ".fxugw4r{background-color:var(--colorNeutralBackground1);}", ".fkfq4zb{color:var(--colorNeutralForeground2);}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".f1k6fduh{cursor:pointer;}", ".f1s6fcnf{outline-style:none;}", ".f1o700av{text-align:left;}", ".fes3tcz{text-align:right;}", ".
|
|
205
|
+
}], ".fxugw4r{background-color:var(--colorNeutralBackground1);}", ".fkfq4zb{color:var(--colorNeutralForeground2);}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".f1k6fduh{cursor:pointer;}", ".f1s6fcnf{outline-style:none;}", ".f1o700av{text-align:left;}", ".fes3tcz{text-align:right;}", ".f6ave1s{column-gap:var(--spacingHorizontalMNudge);}", ".f1wn3y0l{row-gap:var(--spacingVerticalS);}", [".fq88wcj{padding:var(--spacingVerticalL) var(--spacingHorizontalL);}", {
|
|
153
206
|
p: -1
|
|
154
207
|
}], ".f192inf7{border-top-width:var(--strokeWidthThin);}", ".f5tn483{border-right-width:var(--strokeWidthThin);}", ".f1ojsxk5{border-left-width:var(--strokeWidthThin);}", ".f1vxd6vx{border-bottom-width:var(--strokeWidthThin);}", ".fzkkow9{border-top-style:solid;}", ".fcdblym{border-right-style:solid;}", ".fjik90z{border-left-style:solid;}", ".fg706s2{border-bottom-style:solid;}", ".f68mrw8{border-top-color:var(--colorNeutralStroke2);}", ".f7pw515{border-right-color:var(--colorNeutralStroke2);}", ".fw35ms5{border-left-color:var(--colorNeutralStroke2);}", ".frpde29{border-bottom-color:var(--colorNeutralStroke2);}", ".f8hki3x[data-fui-focus-visible]{border-top-color:transparent;}", ".f1d2448m[data-fui-focus-visible]{border-right-color:transparent;}", ".ffh67wi[data-fui-focus-visible]{border-left-color:transparent;}", ".f1bjia2o[data-fui-focus-visible]{border-bottom-color:transparent;}", ".f15bsgw9[data-fui-focus-visible]::after{content:\"\";}", ".f14e48fq[data-fui-focus-visible]::after{position:absolute;}", ".f18yb2kv[data-fui-focus-visible]::after{pointer-events:none;}", ".fd6o370[data-fui-focus-visible]::after{z-index:1;}", [".ffwy5si[data-fui-focus-visible]::after{border:2px solid var(--colorStrokeFocus2);}", {
|
|
155
208
|
p: -2
|
|
@@ -157,17 +210,33 @@ const useStyles = __styles({
|
|
|
157
210
|
p: -1
|
|
158
211
|
}], ".f57olzd[data-fui-focus-visible]::after{top:calc(2px * -1);}", ".f4stah7[data-fui-focus-visible]::after{right:calc(2px * -1);}", ".fs1por5[data-fui-focus-visible]::after{left:calc(2px * -1);}", ".f480a47[data-fui-focus-visible]::after{bottom:calc(2px * -1);}", ".f1hg901r{box-shadow:var(--shadow16);}", ".f15ncuxf{transform:scale(1.03);}", [".ffrhwuo{transition:transform var(--durationNormal) var(--curveDecelerateMin);}", {
|
|
159
212
|
p: -1
|
|
160
|
-
}], ".f122n59{align-items:center;}", ".fntfeoj{min-height:var(--spacingVerticalXXL);}", [".
|
|
213
|
+
}], ".f22iagw{display:flex;}", ".f122n59{align-items:center;}", ".fntfeoj{min-height:var(--spacingVerticalXXL);}", [".fm1owph{grid-row:1;}", {
|
|
161
214
|
p: -1
|
|
162
|
-
}], [".
|
|
215
|
+
}], [".f12k0sjh{grid-column:1/2;}", {
|
|
216
|
+
p: -1
|
|
217
|
+
}], [".fm1owph{grid-row:1;}", {
|
|
218
|
+
p: -1
|
|
219
|
+
}], [".f14q5zaz{grid-column:2/3;}", {
|
|
163
220
|
p: -1
|
|
164
|
-
}], [".f3hl5xl{grid-row:1/2;}", {
|
|
221
|
+
}], ".f7nlbp4{align-self:center;}", ".f19n0e5{color:var(--colorNeutralForeground1);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".fl43uef{font-weight:var(--fontWeightSemibold);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}", ".f1rvi9lw{display:-webkit-box;}", ".fpfc2by{-webkit-box-orient:vertical;}", ".fvvof4m{-webkit-line-clamp:1;}", ".f1sil6mw{overflow-y:hidden;}", ".f9ijwd5{word-break:break-word;}", [".f3hl5xl{grid-row:1/2;}", {
|
|
165
222
|
p: -1
|
|
166
223
|
}], [".f14q5zaz{grid-column:2/3;}", {
|
|
167
224
|
p: -1
|
|
225
|
+
}], [".foizga4{margin:var(--spacingVerticalL) var(--spacingHorizontalL) var(--spacingVerticalNone) var(--spacingHorizontalNone);}", {
|
|
226
|
+
p: -1
|
|
227
|
+
}], [".f5m8a6r{margin:var(--spacingVerticalL) var(--spacingHorizontalNone) var(--spacingVerticalNone) var(--spacingHorizontalL);}", {
|
|
228
|
+
p: -1
|
|
168
229
|
}], ".f5p0z4x{opacity:1;}", [".f1964ud6{transition:opacity var(--durationFast) var(--curveLinear);}", {
|
|
169
230
|
p: -1
|
|
170
|
-
}], ".
|
|
231
|
+
}], ".f1u7pq1e{box-shadow:-12px 0 12px 0 var(--colorNeutralBackground1);}", ".f1pdyzui{box-shadow:12px 0 12px 0 var(--colorNeutralBackground1);}", [".f1daok31{grid-row:2;}", {
|
|
232
|
+
p: -1
|
|
233
|
+
}], [".f1eb8yyf{grid-column:1/3;}", {
|
|
234
|
+
p: -1
|
|
235
|
+
}], ".f1lvsx7g{-webkit-line-clamp:2;}", ".f197wrh9{-webkit-line-clamp:3;}", [".f17e42vn{grid-row:3;}", {
|
|
236
|
+
p: -1
|
|
237
|
+
}], [".f1eb8yyf{grid-column:1/3;}", {
|
|
238
|
+
p: -1
|
|
239
|
+
}], ".f13mqy1h{font-size:var(--fontSizeBase100);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".fcpl73t{line-height:var(--lineHeightBase100);}"],
|
|
171
240
|
f: [".ftqa4ok:focus{outline-style:none;}"],
|
|
172
241
|
i: [".f2hkw1w:focus-visible{outline-style:none;}"],
|
|
173
242
|
m: [["@media (forced-colors: active){.f1j6vpng[data-fui-focus-visible]::after{border-top-color:Highlight;}}", {
|
|
@@ -180,6 +249,13 @@ const useStyles = __styles({
|
|
|
180
249
|
});
|
|
181
250
|
const useSingleColumnStyles = __styles({
|
|
182
251
|
primaryAction: {
|
|
252
|
+
mc9l5x: "f22iagw",
|
|
253
|
+
Beiy3e4: "f1vx9l62",
|
|
254
|
+
Byoj8tv: 0,
|
|
255
|
+
uwmqm3: 0,
|
|
256
|
+
z189sj: 0,
|
|
257
|
+
z8tnut: 0,
|
|
258
|
+
B0ocmuz: "fcvcxyf",
|
|
183
259
|
Beyfa6y: 0,
|
|
184
260
|
Bbmb7ep: 0,
|
|
185
261
|
Btl43ni: 0,
|
|
@@ -226,20 +302,30 @@ const useSingleColumnStyles = __styles({
|
|
|
226
302
|
Bjwuhne: "f480a47",
|
|
227
303
|
Ghsupd: ["fs1por5", "f4stah7"]
|
|
228
304
|
},
|
|
305
|
+
category: {
|
|
306
|
+
Bahqtrf: "fk6fouc",
|
|
307
|
+
Be2twd7: "fy9rknc",
|
|
308
|
+
Bhrd7zp: "fl43uef",
|
|
309
|
+
Bg96gwp: "fwrc4pm",
|
|
310
|
+
qb2dma: "fio29c6"
|
|
311
|
+
},
|
|
229
312
|
prompt: {
|
|
230
313
|
Bahqtrf: "fk6fouc",
|
|
231
314
|
Be2twd7: "fy9rknc",
|
|
232
315
|
Bhrd7zp: "fl43uef",
|
|
233
|
-
Bg96gwp: "fwrc4pm"
|
|
316
|
+
Bg96gwp: "fwrc4pm",
|
|
317
|
+
Bh9c35c: "f1lvsx7g"
|
|
234
318
|
}
|
|
235
319
|
}, {
|
|
236
|
-
d: [
|
|
320
|
+
d: [".f22iagw{display:flex;}", ".f1vx9l62{flex-direction:column;}", [".fcvcxyf{padding:var(--spacingVerticalM) var(--spacingHorizontalM);}", {
|
|
321
|
+
p: -1
|
|
322
|
+
}], [".f1jxijnj{border-radius:var(--borderRadius2XL);}", {
|
|
237
323
|
p: -1
|
|
238
324
|
}], ".f8hki3x[data-fui-focus-visible]{border-top-color:transparent;}", ".f1d2448m[data-fui-focus-visible]{border-right-color:transparent;}", ".ffh67wi[data-fui-focus-visible]{border-left-color:transparent;}", ".f1bjia2o[data-fui-focus-visible]{border-bottom-color:transparent;}", ".f15bsgw9[data-fui-focus-visible]::after{content:\"\";}", ".f14e48fq[data-fui-focus-visible]::after{position:absolute;}", ".f18yb2kv[data-fui-focus-visible]::after{pointer-events:none;}", ".fd6o370[data-fui-focus-visible]::after{z-index:1;}", [".ffwy5si[data-fui-focus-visible]::after{border:2px solid var(--colorStrokeFocus2);}", {
|
|
239
325
|
p: -2
|
|
240
326
|
}], [".f178id4l[data-fui-focus-visible]::after{border-radius:var(--borderRadius2XL);}", {
|
|
241
327
|
p: -1
|
|
242
|
-
}], ".f57olzd[data-fui-focus-visible]::after{top:calc(2px * -1);}", ".f4stah7[data-fui-focus-visible]::after{right:calc(2px * -1);}", ".fs1por5[data-fui-focus-visible]::after{left:calc(2px * -1);}", ".f480a47[data-fui-focus-visible]::after{bottom:calc(2px * -1);}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".fl43uef{font-weight:var(--fontWeightSemibold);}", ".fwrc4pm{line-height:var(--lineHeightBase200);}"],
|
|
328
|
+
}], ".f57olzd[data-fui-focus-visible]::after{top:calc(2px * -1);}", ".f4stah7[data-fui-focus-visible]::after{right:calc(2px * -1);}", ".fs1por5[data-fui-focus-visible]::after{left:calc(2px * -1);}", ".f480a47[data-fui-focus-visible]::after{bottom:calc(2px * -1);}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".fl43uef{font-weight:var(--fontWeightSemibold);}", ".fwrc4pm{line-height:var(--lineHeightBase200);}", ".fio29c6{align-self:auto;}", ".f1lvsx7g{-webkit-line-clamp:2;}"],
|
|
243
329
|
f: [".ftqa4ok:focus{outline-style:none;}"],
|
|
244
330
|
i: [".f2hkw1w:focus-visible{outline-style:none;}"],
|
|
245
331
|
m: [["@media (forced-colors: active){.f1j6vpng[data-fui-focus-visible]::after{border-top-color:Highlight;}}", {
|
|
@@ -264,12 +350,15 @@ export const usePromptStarterStyles_unstable = state => {
|
|
|
264
350
|
if (state.icon) {
|
|
265
351
|
state.icon.className = mergeClasses(promptStarterClassNames.icon, styles.icon, state.icon.className);
|
|
266
352
|
}
|
|
267
|
-
|
|
353
|
+
if (state.category) {
|
|
354
|
+
state.category.className = mergeClasses(promptStarterClassNames.category, styles.category, isSingleColumn && singleColumnStyles.category, state.category.className);
|
|
355
|
+
}
|
|
356
|
+
state.prompt.className = mergeClasses(promptStarterClassNames.prompt, styles.prompt, !state.reasonMarker && styles.promptNoReasonMarker, isSingleColumn && singleColumnStyles.prompt, state.prompt.className);
|
|
268
357
|
if (state.reasonMarker) {
|
|
269
358
|
state.reasonMarker.className = mergeClasses(promptStarterClassNames.reasonMarker, styles.reasonMarker, state.reasonMarker.className);
|
|
270
359
|
}
|
|
271
360
|
if (state.actions) {
|
|
272
|
-
state.actions.className = mergeClasses(promptStarterClassNames.actions, styles.actions, state.actions.className);
|
|
361
|
+
state.actions.className = mergeClasses(promptStarterClassNames.actions, styles.actions, state.category && styles.actionsWithCategory, state.actions.className);
|
|
273
362
|
}
|
|
274
363
|
return state;
|
|
275
364
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["usePromptStarterStyles.styles.ts"],"sourcesContent":["import {\n makeStyles,\n makeResetStyles,\n mergeClasses,\n shorthands,\n typographyStyles,\n createFocusOutlineStyle,\n} from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\nimport type { PromptStarterSlots, PromptStarterState } from './PromptStarter.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const promptStarterClassNames: SlotClassNames<PromptStarterSlots> = {\n root: 'fai-PromptStarter',\n primaryAction: 'fai-PromptStarter__primaryAction',\n icon: 'fai-PromptStarter__icon',\n prompt: 'fai-PromptStarter__prompt',\n reasonMarker: 'fai-PromptStarter__reasonMarker',\n actions: 'fai-PromptStarter__actions',\n};\n\nconst useRootResetStyles = makeResetStyles({\n display: 'grid',\n gridTemplateColumns: '1fr auto',\n gridTemplateRows: 'max-content auto',\n minWidth: '214px',\n\n // Apply styles to the primary action on hover / active states\n '&:hover': {\n [`& .${promptStarterClassNames.primaryAction}`]: {\n boxShadow: tokens.shadow16,\n transform: 'scale(1.03)',\n transition: `transform ${tokens.durationNormal} ${tokens.curveDecelerateMin}`,\n },\n },\n '&:active': {\n [`& .${promptStarterClassNames.primaryAction}`]: {\n boxShadow: tokens.shadow8,\n transform: 'scale(1.03)',\n transition: `transform ${tokens.durationNormal} ${tokens.curveDecelerateMin}`,\n },\n },\n\n // Hide actions when not focused or hovered\n ':not(:focus-within):not(:hover)': {\n [`& .${promptStarterClassNames.actions}`]: {\n clip: 'rect(0px, 0px, 0px, 0px)',\n height: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: '0px',\n width: '1px',\n position: 'absolute',\n opacity: 0,\n },\n },\n});\n\nconst useStyles = makeStyles({\n primaryAction: {\n gridRow: '1 / 3',\n gridColumn: '1 / 3',\n display: 'flex',\n flexDirection: 'column',\n position: 'relative',\n borderRadius: '28px',\n backgroundColor: tokens.colorNeutralBackground1,\n color: tokens.colorNeutralForeground2,\n fontFamily: tokens.fontFamilyBase,\n cursor: 'pointer',\n outlineStyle: 'none',\n textAlign: 'left',\n rowGap: tokens.spacingHorizontalS,\n padding: `${tokens.spacingVerticalL} ${tokens.spacingHorizontalL}`,\n ...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStroke2),\n ...createFocusOutlineStyle({ style: { outlineRadius: '28px' } }),\n },\n\n primaryActionHovered: {\n boxShadow: tokens.shadow16,\n transform: 'scale(1.03)',\n transition: `transform ${tokens.durationNormal} ${tokens.curveDecelerateMin}`,\n },\n\n icon: {\n display: 'flex',\n alignItems: 'center',\n minHeight: tokens.spacingVerticalXXL,\n },\n actions: {\n margin: `${tokens.spacingVerticalL} ${tokens.spacingHorizontalL}\n ${tokens.spacingVerticalNone} ${tokens.spacingHorizontalNone}`,\n position: 'relative',\n gridRow: '1 / 2',\n gridColumn: '2 / 3',\n\n opacity: 1,\n transition: `opacity ${tokens.durationFast} ${tokens.curveLinear}`,\n },\n prompt: {\n ...typographyStyles.body1Strong,\n\n // Truncate text after two lines.\n display: '-webkit-box',\n '-webkit-box-orient': 'vertical',\n '-webkit-line-clamp': '2',\n overflowY: 'hidden',\n },\n reasonMarker: {\n ...typographyStyles.caption2,\n },\n});\n\nconst useSingleColumnStyles = makeStyles({\n primaryAction: {\n borderRadius: tokens.borderRadius2XL,\n ...createFocusOutlineStyle({ style: { outlineRadius: tokens.borderRadius2XL } }),\n },\n prompt: {\n ...typographyStyles.caption1Strong,\n },\n});\n\nexport const usePromptStarterStyles_unstable = (state: PromptStarterState): PromptStarterState => {\n 'use no memo';\n\n const { isSingleColumn } = state;\n\n const styles = useStyles();\n const rootResetStyles = useRootResetStyles();\n const singleColumnStyles = useSingleColumnStyles();\n state.root.className = mergeClasses(promptStarterClassNames.root, rootResetStyles, state.root.className);\n state.primaryAction.className = mergeClasses(\n promptStarterClassNames.primaryAction,\n styles.primaryAction,\n isSingleColumn && singleColumnStyles.primaryAction,\n state.primaryAction.className,\n );\n if (state.icon) {\n state.icon.className = mergeClasses(promptStarterClassNames.icon, styles.icon, state.icon.className);\n }\n state.prompt.className = mergeClasses(\n promptStarterClassNames.prompt,\n styles.prompt,\n isSingleColumn && singleColumnStyles.prompt,\n state.prompt.className,\n );\n if (state.reasonMarker) {\n state.reasonMarker.className = mergeClasses(\n promptStarterClassNames.reasonMarker,\n styles.reasonMarker,\n state.reasonMarker.className,\n );\n }\n if (state.actions) {\n state.actions.className = mergeClasses(promptStarterClassNames.actions, styles.actions, state.actions.className);\n }\n\n return state;\n};\n"],"names":["makeStyles","makeResetStyles","mergeClasses","shorthands","typographyStyles","createFocusOutlineStyle","tokens","promptStarterClassNames","root","primaryAction","icon","prompt","reasonMarker","actions","useRootResetStyles","display","gridTemplateColumns","gridTemplateRows","minWidth","boxShadow","shadow16","transform","transition","durationNormal","curveDecelerateMin","shadow8","clip","height","margin","overflow","padding","width","position","opacity","useStyles","gridRow","gridColumn","flexDirection","borderRadius","backgroundColor","colorNeutralBackground1","color","colorNeutralForeground2","fontFamily","fontFamilyBase","cursor","outlineStyle","textAlign","rowGap","spacingHorizontalS","spacingVerticalL","spacingHorizontalL","border","strokeWidthThin","colorNeutralStroke2","style","outlineRadius","primaryActionHovered","alignItems","minHeight","spacingVerticalXXL","spacingVerticalNone","spacingHorizontalNone","durationFast","curveLinear","body1Strong","overflowY","caption2","useSingleColumnStyles","borderRadius2XL","caption1Strong","usePromptStarterStyles_unstable","state","isSingleColumn","styles","rootResetStyles","singleColumnStyles","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SACEA,UAAU,EACVC,eAAe,EACfC,YAAY,EACZC,UAAU,EACVC,gBAAgB,EAChBC,uBAAuB,QAClB,6BAA6B;AACpC,SAASC,MAAM,QAAQ,2BAA2B;AAIlD,OAAO,MAAMC,0BAA8D;IACzEC,MAAM;IACNC,eAAe;IACfC,MAAM;IACNC,QAAQ;IACRC,cAAc;IACdC,SAAS;AACX,EAAE;AAEF,MAAMC,qBAAqBb,gBAAgB;IACzCc,SAAS;IACTC,qBAAqB;IACrBC,kBAAkB;IAClBC,UAAU;IAEV,8DAA8D;IAC9D,WAAW;QACT,CAAC,CAAC,GAAG,EAAEX,wBAAwBE,aAAa,CAAC,CAAC,CAAC,EAAE;YAC/CU,WAAWb,OAAOc,QAAQ;YAC1BC,WAAW;YACXC,YAAY,CAAC,UAAU,EAAEhB,OAAOiB,cAAc,CAAC,CAAC,EAAEjB,OAAOkB,kBAAkB,CAAC,CAAC;QAC/E;IACF;IACA,YAAY;QACV,CAAC,CAAC,GAAG,EAAEjB,wBAAwBE,aAAa,CAAC,CAAC,CAAC,EAAE;YAC/CU,WAAWb,OAAOmB,OAAO;YACzBJ,WAAW;YACXC,YAAY,CAAC,UAAU,EAAEhB,OAAOiB,cAAc,CAAC,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8D,kBAAkBG,mBAAmBjE,MAAM,EAC3C6D,MAAM7D,MAAM,CAACkE,SAAS;IAExB,IAAIL,MAAM5D,YAAY,EAAE;QACtB4D,MAAM5D,YAAY,CAACiE,SAAS,GAAG3E,aAC7BK,wBAAwBK,YAAY,EACpC8D,OAAO9D,YAAY,EACnB4D,MAAM5D,YAAY,CAACiE,SAAS;IAEhC;IACA,IAAIL,MAAM3D,OAAO,EAAE;QACjB2D,MAAM3D,OAAO,CAACgE,SAAS,GAAG3E,aAAaK,wBAAwBM,OAAO,EAAE6D,OAAO7D,OAAO,EAAE2D,MAAM3D,OAAO,CAACgE,SAAS;IACjH;IAEA,OAAOL;AACT,EAAE"}
|
|
1
|
+
{"version":3,"sources":["usePromptStarterStyles.styles.ts"],"sourcesContent":["import {\n makeStyles,\n makeResetStyles,\n mergeClasses,\n shorthands,\n typographyStyles,\n createFocusOutlineStyle,\n} from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\nimport type { PromptStarterSlots, PromptStarterState } from './PromptStarter.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const promptStarterClassNames: SlotClassNames<PromptStarterSlots> = {\n root: 'fai-PromptStarter',\n primaryAction: 'fai-PromptStarter__primaryAction',\n icon: 'fai-PromptStarter__icon',\n category: 'fai-PromptStarter__category',\n prompt: 'fai-PromptStarter__prompt',\n reasonMarker: 'fai-PromptStarter__reasonMarker',\n actions: 'fai-PromptStarter__actions',\n};\n\nconst useRootResetStyles = makeResetStyles({\n display: 'grid',\n gridTemplateColumns: '1fr auto',\n gridTemplateRows: 'max-content auto',\n minWidth: '214px',\n\n // Apply styles to the primary action on hover / active states\n '&:hover': {\n [`& .${promptStarterClassNames.primaryAction}`]: {\n boxShadow: tokens.shadow16,\n transform: 'scale(1.03)',\n transition: `transform ${tokens.durationNormal} ${tokens.curveDecelerateMin}`,\n },\n },\n '&:active': {\n [`& .${promptStarterClassNames.primaryAction}`]: {\n boxShadow: tokens.shadow8,\n transform: 'scale(1.03)',\n transition: `transform ${tokens.durationNormal} ${tokens.curveDecelerateMin}`,\n },\n },\n\n // Hide actions when not focused or hovered\n ':not(:focus-within):not(:hover)': {\n [`& .${promptStarterClassNames.actions}`]: {\n clip: 'rect(0px, 0px, 0px, 0px)',\n height: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: '0px',\n width: '1px',\n position: 'absolute',\n opacity: 0,\n },\n },\n});\n\nconst useStyles = makeStyles({\n primaryAction: {\n gridRow: '1 / 3',\n gridColumn: '1 / 3',\n position: 'relative',\n display: 'grid',\n gridTemplateColumns: 'max-content 1fr',\n gridAutoRows: 'max-content 1fr max-content',\n borderRadius: '28px',\n backgroundColor: tokens.colorNeutralBackground1,\n color: tokens.colorNeutralForeground2,\n fontFamily: tokens.fontFamilyBase,\n cursor: 'pointer',\n outlineStyle: 'none',\n textAlign: 'left',\n columnGap: tokens.spacingHorizontalMNudge,\n rowGap: tokens.spacingVerticalS,\n padding: `${tokens.spacingVerticalL} ${tokens.spacingHorizontalL}`,\n ...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStroke2),\n ...createFocusOutlineStyle({ style: { outlineRadius: '28px' } }),\n },\n\n primaryActionHovered: {\n boxShadow: tokens.shadow16,\n transform: 'scale(1.03)',\n transition: `transform ${tokens.durationNormal} ${tokens.curveDecelerateMin}`,\n },\n\n icon: {\n display: 'flex',\n alignItems: 'center',\n minHeight: tokens.spacingVerticalXXL,\n gridRow: 1,\n gridColumn: '1 / 2',\n },\n category: {\n gridRow: 1,\n gridColumn: '2 / 3',\n alignSelf: 'center',\n\n color: tokens.colorNeutralForeground1,\n ...typographyStyles.body1Strong,\n\n // Truncate text after one line.\n display: '-webkit-box',\n '-webkit-box-orient': 'vertical',\n '-webkit-line-clamp': '1',\n overflowY: 'hidden',\n wordBreak: 'break-word',\n },\n actions: {\n gridRow: '1 / 2',\n gridColumn: '2 / 3',\n position: 'relative',\n margin: `${tokens.spacingVerticalL} ${tokens.spacingHorizontalL}\n ${tokens.spacingVerticalNone} ${tokens.spacingHorizontalNone}`,\n opacity: 1,\n transition: `opacity ${tokens.durationFast} ${tokens.curveLinear}`,\n },\n actionsWithCategory: {\n // Add a background and gradient fade to truncate the title if applicable\n backgroundColor: tokens.colorNeutralBackground1,\n\n boxShadow: `-12px 0 12px 0 ${tokens.colorNeutralBackground1}`,\n },\n prompt: {\n gridRow: '2',\n gridColumn: '1 / 3',\n\n ...typographyStyles.body1Strong,\n\n // Truncate text after two lines.\n display: '-webkit-box',\n '-webkit-box-orient': 'vertical',\n '-webkit-line-clamp': '2',\n overflowY: 'hidden',\n wordBreak: 'break-word',\n },\n promptNoReasonMarker: {\n // Truncate text after three lines when no reason marker is present.\n '-webkit-line-clamp': '3',\n },\n reasonMarker: {\n gridRow: '3',\n gridColumn: '1 / 3',\n\n ...typographyStyles.caption2,\n\n // Truncate text after one line.\n display: '-webkit-box',\n '-webkit-box-orient': 'vertical',\n '-webkit-line-clamp': '1',\n overflowY: 'hidden',\n wordBreak: 'break-word',\n },\n});\n\nconst useSingleColumnStyles = makeStyles({\n primaryAction: {\n display: 'flex',\n flexDirection: 'column',\n padding: `${tokens.spacingVerticalM} ${tokens.spacingHorizontalM}`,\n borderRadius: tokens.borderRadius2XL,\n ...createFocusOutlineStyle({ style: { outlineRadius: tokens.borderRadius2XL } }),\n },\n category: {\n ...typographyStyles.caption1Strong,\n alignSelf: 'auto',\n },\n prompt: {\n ...typographyStyles.caption1Strong,\n\n // Always truncate after two lines in single column layout.\n '-webkit-line-clamp': '2',\n },\n});\n\nexport const usePromptStarterStyles_unstable = (state: PromptStarterState): PromptStarterState => {\n 'use no memo';\n\n const { isSingleColumn } = state;\n\n const styles = useStyles();\n const rootResetStyles = useRootResetStyles();\n const singleColumnStyles = useSingleColumnStyles();\n state.root.className = mergeClasses(promptStarterClassNames.root, rootResetStyles, state.root.className);\n state.primaryAction.className = mergeClasses(\n promptStarterClassNames.primaryAction,\n styles.primaryAction,\n isSingleColumn && singleColumnStyles.primaryAction,\n state.primaryAction.className,\n );\n if (state.icon) {\n state.icon.className = mergeClasses(promptStarterClassNames.icon, styles.icon, state.icon.className);\n }\n if (state.category) {\n state.category.className = mergeClasses(\n promptStarterClassNames.category,\n styles.category,\n isSingleColumn && singleColumnStyles.category,\n state.category.className,\n );\n }\n state.prompt.className = mergeClasses(\n promptStarterClassNames.prompt,\n styles.prompt,\n !state.reasonMarker && styles.promptNoReasonMarker,\n isSingleColumn && singleColumnStyles.prompt,\n state.prompt.className,\n );\n if (state.reasonMarker) {\n state.reasonMarker.className = mergeClasses(\n promptStarterClassNames.reasonMarker,\n styles.reasonMarker,\n state.reasonMarker.className,\n );\n }\n if (state.actions) {\n state.actions.className = mergeClasses(\n promptStarterClassNames.actions,\n styles.actions,\n state.category && styles.actionsWithCategory,\n state.actions.className,\n );\n }\n\n return state;\n};\n"],"names":["makeStyles","makeResetStyles","mergeClasses","shorthands","typographyStyles","createFocusOutlineStyle","tokens","promptStarterClassNames","root","primaryAction","icon","category","prompt","reasonMarker","actions","useRootResetStyles","display","gridTemplateColumns","gridTemplateRows","minWidth","boxShadow","shadow16","transform","transition","durationNormal","curveDecelerateMin","shadow8","clip","height","margin","overflow","padding","width","position","opacity","useStyles","gridRow","gridColumn","gridAutoRows","borderRadius","backgroundColor","colorNeutralBackground1","color","colorNeutralForeground2","fontFamily","fontFamilyBase","cursor","outlineStyle","textAlign","columnGap","spacingHorizontalMNudge","rowGap","spacingVerticalS","spacingVerticalL","spacingHorizontalL","border","strokeWidthThin","colorNeutralStroke2","style","outlineRadius","primaryActionHovered","alignItems","minHeight","spacingVerticalXXL","alignSelf","colorNeutralForeground1","body1Strong","overflowY","wordBreak","spacingVerticalNone","spacingHorizontalNone","durationFast","curveLinear","actionsWithCategory","promptNoReasonMarker","caption2","useSingleColumnStyles","flexDirection","spacingVerticalM","spacingHorizontalM","borderRadius2XL","caption1Strong","usePromptStarterStyles_unstable","state","isSingleColumn","styles","rootResetStyles","singleColumnStyles","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AAO,EACdqE,MAAMxE,QAAQ,IAAI0E,OAAOZ,mBAAmB,EAC5CU,MAAMrE,OAAO,CAAC0E,SAAS;IAE3B;IAEA,OAAOL;AACT,EAAE"}
|
|
@@ -4,6 +4,7 @@ export const promptStarterClassNames = {
|
|
|
4
4
|
root: 'fai-PromptStarter',
|
|
5
5
|
primaryAction: 'fai-PromptStarter__primaryAction',
|
|
6
6
|
icon: 'fai-PromptStarter__icon',
|
|
7
|
+
category: 'fai-PromptStarter__category',
|
|
7
8
|
prompt: 'fai-PromptStarter__prompt',
|
|
8
9
|
reasonMarker: 'fai-PromptStarter__reasonMarker',
|
|
9
10
|
actions: 'fai-PromptStarter__actions'
|
|
@@ -46,9 +47,10 @@ const useStyles = makeStyles({
|
|
|
46
47
|
primaryAction: {
|
|
47
48
|
gridRow: '1 / 3',
|
|
48
49
|
gridColumn: '1 / 3',
|
|
49
|
-
display: 'flex',
|
|
50
|
-
flexDirection: 'column',
|
|
51
50
|
position: 'relative',
|
|
51
|
+
display: 'grid',
|
|
52
|
+
gridTemplateColumns: 'max-content 1fr',
|
|
53
|
+
gridAutoRows: 'max-content 1fr max-content',
|
|
52
54
|
borderRadius: '28px',
|
|
53
55
|
backgroundColor: tokens.colorNeutralBackground1,
|
|
54
56
|
color: tokens.colorNeutralForeground2,
|
|
@@ -56,7 +58,8 @@ const useStyles = makeStyles({
|
|
|
56
58
|
cursor: 'pointer',
|
|
57
59
|
outlineStyle: 'none',
|
|
58
60
|
textAlign: 'left',
|
|
59
|
-
|
|
61
|
+
columnGap: tokens.spacingHorizontalMNudge,
|
|
62
|
+
rowGap: tokens.spacingVerticalS,
|
|
60
63
|
padding: `${tokens.spacingVerticalL} ${tokens.spacingHorizontalL}`,
|
|
61
64
|
...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStroke2),
|
|
62
65
|
...createFocusOutlineStyle({
|
|
@@ -73,31 +76,69 @@ const useStyles = makeStyles({
|
|
|
73
76
|
icon: {
|
|
74
77
|
display: 'flex',
|
|
75
78
|
alignItems: 'center',
|
|
76
|
-
minHeight: tokens.spacingVerticalXXL
|
|
79
|
+
minHeight: tokens.spacingVerticalXXL,
|
|
80
|
+
gridRow: 1,
|
|
81
|
+
gridColumn: '1 / 2'
|
|
82
|
+
},
|
|
83
|
+
category: {
|
|
84
|
+
gridRow: 1,
|
|
85
|
+
gridColumn: '2 / 3',
|
|
86
|
+
alignSelf: 'center',
|
|
87
|
+
color: tokens.colorNeutralForeground1,
|
|
88
|
+
...typographyStyles.body1Strong,
|
|
89
|
+
// Truncate text after one line.
|
|
90
|
+
display: '-webkit-box',
|
|
91
|
+
'-webkit-box-orient': 'vertical',
|
|
92
|
+
'-webkit-line-clamp': '1',
|
|
93
|
+
overflowY: 'hidden',
|
|
94
|
+
wordBreak: 'break-word'
|
|
77
95
|
},
|
|
78
96
|
actions: {
|
|
79
|
-
margin: `${tokens.spacingVerticalL} ${tokens.spacingHorizontalL}
|
|
80
|
-
${tokens.spacingVerticalNone} ${tokens.spacingHorizontalNone}`,
|
|
81
|
-
position: 'relative',
|
|
82
97
|
gridRow: '1 / 2',
|
|
83
98
|
gridColumn: '2 / 3',
|
|
99
|
+
position: 'relative',
|
|
100
|
+
margin: `${tokens.spacingVerticalL} ${tokens.spacingHorizontalL}
|
|
101
|
+
${tokens.spacingVerticalNone} ${tokens.spacingHorizontalNone}`,
|
|
84
102
|
opacity: 1,
|
|
85
103
|
transition: `opacity ${tokens.durationFast} ${tokens.curveLinear}`
|
|
86
104
|
},
|
|
105
|
+
actionsWithCategory: {
|
|
106
|
+
// Add a background and gradient fade to truncate the title if applicable
|
|
107
|
+
backgroundColor: tokens.colorNeutralBackground1,
|
|
108
|
+
boxShadow: `-12px 0 12px 0 ${tokens.colorNeutralBackground1}`
|
|
109
|
+
},
|
|
87
110
|
prompt: {
|
|
111
|
+
gridRow: '2',
|
|
112
|
+
gridColumn: '1 / 3',
|
|
88
113
|
...typographyStyles.body1Strong,
|
|
89
114
|
// Truncate text after two lines.
|
|
90
115
|
display: '-webkit-box',
|
|
91
116
|
'-webkit-box-orient': 'vertical',
|
|
92
117
|
'-webkit-line-clamp': '2',
|
|
93
|
-
overflowY: 'hidden'
|
|
118
|
+
overflowY: 'hidden',
|
|
119
|
+
wordBreak: 'break-word'
|
|
120
|
+
},
|
|
121
|
+
promptNoReasonMarker: {
|
|
122
|
+
// Truncate text after three lines when no reason marker is present.
|
|
123
|
+
'-webkit-line-clamp': '3'
|
|
94
124
|
},
|
|
95
125
|
reasonMarker: {
|
|
96
|
-
|
|
126
|
+
gridRow: '3',
|
|
127
|
+
gridColumn: '1 / 3',
|
|
128
|
+
...typographyStyles.caption2,
|
|
129
|
+
// Truncate text after one line.
|
|
130
|
+
display: '-webkit-box',
|
|
131
|
+
'-webkit-box-orient': 'vertical',
|
|
132
|
+
'-webkit-line-clamp': '1',
|
|
133
|
+
overflowY: 'hidden',
|
|
134
|
+
wordBreak: 'break-word'
|
|
97
135
|
}
|
|
98
136
|
});
|
|
99
137
|
const useSingleColumnStyles = makeStyles({
|
|
100
138
|
primaryAction: {
|
|
139
|
+
display: 'flex',
|
|
140
|
+
flexDirection: 'column',
|
|
141
|
+
padding: `${tokens.spacingVerticalM} ${tokens.spacingHorizontalM}`,
|
|
101
142
|
borderRadius: tokens.borderRadius2XL,
|
|
102
143
|
...createFocusOutlineStyle({
|
|
103
144
|
style: {
|
|
@@ -105,8 +146,14 @@ const useSingleColumnStyles = makeStyles({
|
|
|
105
146
|
}
|
|
106
147
|
})
|
|
107
148
|
},
|
|
149
|
+
category: {
|
|
150
|
+
...typographyStyles.caption1Strong,
|
|
151
|
+
alignSelf: 'auto'
|
|
152
|
+
},
|
|
108
153
|
prompt: {
|
|
109
|
-
...typographyStyles.caption1Strong
|
|
154
|
+
...typographyStyles.caption1Strong,
|
|
155
|
+
// Always truncate after two lines in single column layout.
|
|
156
|
+
'-webkit-line-clamp': '2'
|
|
110
157
|
}
|
|
111
158
|
});
|
|
112
159
|
export const usePromptStarterStyles_unstable = (state)=>{
|
|
@@ -120,12 +167,15 @@ export const usePromptStarterStyles_unstable = (state)=>{
|
|
|
120
167
|
if (state.icon) {
|
|
121
168
|
state.icon.className = mergeClasses(promptStarterClassNames.icon, styles.icon, state.icon.className);
|
|
122
169
|
}
|
|
123
|
-
|
|
170
|
+
if (state.category) {
|
|
171
|
+
state.category.className = mergeClasses(promptStarterClassNames.category, styles.category, isSingleColumn && singleColumnStyles.category, state.category.className);
|
|
172
|
+
}
|
|
173
|
+
state.prompt.className = mergeClasses(promptStarterClassNames.prompt, styles.prompt, !state.reasonMarker && styles.promptNoReasonMarker, isSingleColumn && singleColumnStyles.prompt, state.prompt.className);
|
|
124
174
|
if (state.reasonMarker) {
|
|
125
175
|
state.reasonMarker.className = mergeClasses(promptStarterClassNames.reasonMarker, styles.reasonMarker, state.reasonMarker.className);
|
|
126
176
|
}
|
|
127
177
|
if (state.actions) {
|
|
128
|
-
state.actions.className = mergeClasses(promptStarterClassNames.actions, styles.actions, state.actions.className);
|
|
178
|
+
state.actions.className = mergeClasses(promptStarterClassNames.actions, styles.actions, state.category && styles.actionsWithCategory, state.actions.className);
|
|
129
179
|
}
|
|
130
180
|
return state;
|
|
131
181
|
};
|
package/lib/components/PromptStarterV2/PromptStarter/usePromptStarterStyles.styles.raw.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["usePromptStarterStyles.styles.ts"],"sourcesContent":["import {\n makeStyles,\n makeResetStyles,\n mergeClasses,\n shorthands,\n typographyStyles,\n createFocusOutlineStyle,\n} from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\nimport type { PromptStarterSlots, PromptStarterState } from './PromptStarter.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const promptStarterClassNames: SlotClassNames<PromptStarterSlots> = {\n root: 'fai-PromptStarter',\n primaryAction: 'fai-PromptStarter__primaryAction',\n icon: 'fai-PromptStarter__icon',\n prompt: 'fai-PromptStarter__prompt',\n reasonMarker: 'fai-PromptStarter__reasonMarker',\n actions: 'fai-PromptStarter__actions',\n};\n\nconst useRootResetStyles = makeResetStyles({\n display: 'grid',\n gridTemplateColumns: '1fr auto',\n gridTemplateRows: 'max-content auto',\n minWidth: '214px',\n\n // Apply styles to the primary action on hover / active states\n '&:hover': {\n [`& .${promptStarterClassNames.primaryAction}`]: {\n boxShadow: tokens.shadow16,\n transform: 'scale(1.03)',\n transition: `transform ${tokens.durationNormal} ${tokens.curveDecelerateMin}`,\n },\n },\n '&:active': {\n [`& .${promptStarterClassNames.primaryAction}`]: {\n boxShadow: tokens.shadow8,\n transform: 'scale(1.03)',\n transition: `transform ${tokens.durationNormal} ${tokens.curveDecelerateMin}`,\n },\n },\n\n // Hide actions when not focused or hovered\n ':not(:focus-within):not(:hover)': {\n [`& .${promptStarterClassNames.actions}`]: {\n clip: 'rect(0px, 0px, 0px, 0px)',\n height: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: '0px',\n width: '1px',\n position: 'absolute',\n opacity: 0,\n },\n },\n});\n\nconst useStyles = makeStyles({\n primaryAction: {\n gridRow: '1 / 3',\n gridColumn: '1 / 3',\n display: 'flex',\n flexDirection: 'column',\n position: 'relative',\n borderRadius: '28px',\n backgroundColor: tokens.colorNeutralBackground1,\n color: tokens.colorNeutralForeground2,\n fontFamily: tokens.fontFamilyBase,\n cursor: 'pointer',\n outlineStyle: 'none',\n textAlign: 'left',\n rowGap: tokens.spacingHorizontalS,\n padding: `${tokens.spacingVerticalL} ${tokens.spacingHorizontalL}`,\n ...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStroke2),\n ...createFocusOutlineStyle({ style: { outlineRadius: '28px' } }),\n },\n\n primaryActionHovered: {\n boxShadow: tokens.shadow16,\n transform: 'scale(1.03)',\n transition: `transform ${tokens.durationNormal} ${tokens.curveDecelerateMin}`,\n },\n\n icon: {\n display: 'flex',\n alignItems: 'center',\n minHeight: tokens.spacingVerticalXXL,\n },\n actions: {\n margin: `${tokens.spacingVerticalL} ${tokens.spacingHorizontalL}\n ${tokens.spacingVerticalNone} ${tokens.spacingHorizontalNone}`,\n position: 'relative',\n gridRow: '1 / 2',\n gridColumn: '2 / 3',\n\n opacity: 1,\n transition: `opacity ${tokens.durationFast} ${tokens.curveLinear}`,\n },\n prompt: {\n ...typographyStyles.body1Strong,\n\n // Truncate text after two lines.\n display: '-webkit-box',\n '-webkit-box-orient': 'vertical',\n '-webkit-line-clamp': '2',\n overflowY: 'hidden',\n },\n reasonMarker: {\n ...typographyStyles.caption2,\n },\n});\n\nconst useSingleColumnStyles = makeStyles({\n primaryAction: {\n borderRadius: tokens.borderRadius2XL,\n ...createFocusOutlineStyle({ style: { outlineRadius: tokens.borderRadius2XL } }),\n },\n prompt: {\n ...typographyStyles.caption1Strong,\n },\n});\n\nexport const usePromptStarterStyles_unstable = (state: PromptStarterState): PromptStarterState => {\n 'use no memo';\n\n const { isSingleColumn } = state;\n\n const styles = useStyles();\n const rootResetStyles = useRootResetStyles();\n const singleColumnStyles = useSingleColumnStyles();\n state.root.className = mergeClasses(promptStarterClassNames.root, rootResetStyles, state.root.className);\n state.primaryAction.className = mergeClasses(\n promptStarterClassNames.primaryAction,\n styles.primaryAction,\n isSingleColumn && singleColumnStyles.primaryAction,\n state.primaryAction.className,\n );\n if (state.icon) {\n state.icon.className = mergeClasses(promptStarterClassNames.icon, styles.icon, state.icon.className);\n }\n state.prompt.className = mergeClasses(\n promptStarterClassNames.prompt,\n styles.prompt,\n isSingleColumn && singleColumnStyles.prompt,\n state.prompt.className,\n );\n if (state.reasonMarker) {\n state.reasonMarker.className = mergeClasses(\n promptStarterClassNames.reasonMarker,\n styles.reasonMarker,\n state.reasonMarker.className,\n );\n }\n if (state.actions) {\n state.actions.className = mergeClasses(promptStarterClassNames.actions, styles.actions, state.actions.className);\n }\n\n return state;\n};\n"],"names":["makeStyles","makeResetStyles","mergeClasses","shorthands","typographyStyles","createFocusOutlineStyle","tokens","promptStarterClassNames","root","primaryAction","icon","prompt","reasonMarker","actions","useRootResetStyles","display","gridTemplateColumns","gridTemplateRows","minWidth","boxShadow","shadow16","transform","transition","durationNormal","curveDecelerateMin","shadow8","clip","height","margin","overflow","padding","width","position","opacity","useStyles","gridRow","gridColumn","flexDirection","borderRadius","backgroundColor","colorNeutralBackground1","color","colorNeutralForeground2","fontFamily","fontFamilyBase","cursor","outlineStyle","textAlign","rowGap","spacingHorizontalS","spacingVerticalL","spacingHorizontalL","border","strokeWidthThin","colorNeutralStroke2","style","outlineRadius","primaryActionHovered","alignItems","minHeight","spacingVerticalXXL","spacingVerticalNone","spacingHorizontalNone","durationFast","curveLinear","body1Strong","overflowY","caption2","useSingleColumnStyles","borderRadius2XL","caption1Strong","usePromptStarterStyles_unstable","state","isSingleColumn","styles","rootResetStyles","singleColumnStyles","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SACEA,UAAU,EACVC,eAAe,EACfC,YAAY,EACZC,UAAU,EACVC,gBAAgB,EAChBC,uBAAuB,QAClB,6BAA6B;AACpC,SAASC,MAAM,QAAQ,2BAA2B;AAIlD,OAAO,MAAMC,0BAA8D;IACzEC,MAAM;IACNC,eAAe;IACfC,MAAM;IACNC,QAAQ;IACRC,cAAc;IACdC,SAAS;AACX,EAAE;AAEF,MAAMC,qBAAqBb,gBAAgB;IACzCc,SAAS;IACTC,qBAAqB;IACrBC,kBAAkB;IAClBC,UAAU;IAEV,8DAA8D;IAC9D,WAAW;QACT,CAAC,CAAC,GAAG,EAAEX,wBAAwBE,aAAa,CAAC,CAAC,CAAC,EAAE;YAC/CU,WAAWb,OAAOc,QAAQ;YAC1BC,WAAW;YACXC,YAAY,CAAC,UAAU,EAAEhB,OAAOiB,cAAc,CAAC,CAAC,EAAEjB,O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D,MAAM9D,IAAI,CAACmE,SAAS,GAAG3E,aAAaK,wBAAwBG,IAAI,EAAEgE,OAAOhE,IAAI,EAAE8D,MAAM9D,IAAI,CAACmE,SAAS;IACrG;IACAL,MAAM7D,MAAM,CAACkE,SAAS,GAAG3E,aACvBK,wBAAwBI,MAAM,EAC9B+D,OAAO/D,MAAM,EACb8D,kBAAkBG,mBAAmBjE,MAAM,EAC3C6D,MAAM7D,MAAM,CAACkE,SAAS;IAExB,IAAIL,MAAM5D,YAAY,EAAE;QACtB4D,MAAM5D,YAAY,CAACiE,SAAS,GAAG3E,aAC7BK,wBAAwBK,YAAY,EACpC8D,OAAO9D,YAAY,EACnB4D,MAAM5D,YAAY,CAACiE,SAAS;IAEhC;IACA,IAAIL,MAAM3D,OAAO,EAAE;QACjB2D,MAAM3D,OAAO,CAACgE,SAAS,GAAG3E,aAAaK,wBAAwBM,OAAO,EAAE6D,OAAO7D,OAAO,EAAE2D,MAAM3D,OAAO,CAACgE,SAAS;IACjH;IAEA,OAAOL;AACT,EAAE"}
|
|
1
|
+
{"version":3,"sources":["usePromptStarterStyles.styles.ts"],"sourcesContent":["import {\n makeStyles,\n makeResetStyles,\n mergeClasses,\n shorthands,\n typographyStyles,\n createFocusOutlineStyle,\n} from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\nimport type { PromptStarterSlots, PromptStarterState } from './PromptStarter.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const promptStarterClassNames: SlotClassNames<PromptStarterSlots> = {\n root: 'fai-PromptStarter',\n primaryAction: 'fai-PromptStarter__primaryAction',\n icon: 'fai-PromptStarter__icon',\n category: 'fai-PromptStarter__category',\n prompt: 'fai-PromptStarter__prompt',\n reasonMarker: 'fai-PromptStarter__reasonMarker',\n actions: 'fai-PromptStarter__actions',\n};\n\nconst useRootResetStyles = makeResetStyles({\n display: 'grid',\n gridTemplateColumns: '1fr auto',\n gridTemplateRows: 'max-content auto',\n minWidth: '214px',\n\n // Apply styles to the primary action on hover / active states\n '&:hover': {\n [`& .${promptStarterClassNames.primaryAction}`]: {\n boxShadow: tokens.shadow16,\n transform: 'scale(1.03)',\n transition: `transform ${tokens.durationNormal} ${tokens.curveDecelerateMin}`,\n },\n },\n '&:active': {\n [`& .${promptStarterClassNames.primaryAction}`]: {\n boxShadow: tokens.shadow8,\n transform: 'scale(1.03)',\n transition: `transform ${tokens.durationNormal} ${tokens.curveDecelerateMin}`,\n },\n },\n\n // Hide actions when not focused or hovered\n ':not(:focus-within):not(:hover)': {\n [`& .${promptStarterClassNames.actions}`]: {\n clip: 'rect(0px, 0px, 0px, 0px)',\n height: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: '0px',\n width: '1px',\n position: 'absolute',\n opacity: 0,\n },\n },\n});\n\nconst useStyles = makeStyles({\n primaryAction: {\n gridRow: '1 / 3',\n gridColumn: '1 / 3',\n position: 'relative',\n display: 'grid',\n gridTemplateColumns: 'max-content 1fr',\n gridAutoRows: 'max-content 1fr max-content',\n borderRadius: '28px',\n backgroundColor: tokens.colorNeutralBackground1,\n color: tokens.colorNeutralForeground2,\n fontFamily: tokens.fontFamilyBase,\n cursor: 'pointer',\n outlineStyle: 'none',\n textAlign: 'left',\n columnGap: tokens.spacingHorizontalMNudge,\n rowGap: tokens.spacingVerticalS,\n padding: `${tokens.spacingVerticalL} ${tokens.spacingHorizontalL}`,\n ...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStroke2),\n ...createFocusOutlineStyle({ style: { outlineRadius: '28px' } }),\n },\n\n primaryActionHovered: {\n boxShadow: tokens.shadow16,\n transform: 'scale(1.03)',\n transition: `transform ${tokens.durationNormal} ${tokens.curveDecelerateMin}`,\n },\n\n icon: {\n display: 'flex',\n alignItems: 'center',\n minHeight: tokens.spacingVerticalXXL,\n gridRow: 1,\n gridColumn: '1 / 2',\n },\n category: {\n gridRow: 1,\n gridColumn: '2 / 3',\n alignSelf: 'center',\n\n color: tokens.colorNeutralForeground1,\n ...typographyStyles.body1Strong,\n\n // Truncate text after one line.\n display: '-webkit-box',\n '-webkit-box-orient': 'vertical',\n '-webkit-line-clamp': '1',\n overflowY: 'hidden',\n wordBreak: 'break-word',\n },\n actions: {\n gridRow: '1 / 2',\n gridColumn: '2 / 3',\n position: 'relative',\n margin: `${tokens.spacingVerticalL} ${tokens.spacingHorizontalL}\n ${tokens.spacingVerticalNone} ${tokens.spacingHorizontalNone}`,\n opacity: 1,\n transition: `opacity ${tokens.durationFast} ${tokens.curveLinear}`,\n },\n actionsWithCategory: {\n // Add a background and gradient fade to truncate the title if applicable\n backgroundColor: tokens.colorNeutralBackground1,\n\n boxShadow: `-12px 0 12px 0 ${tokens.colorNeutralBackground1}`,\n },\n prompt: {\n gridRow: '2',\n gridColumn: '1 / 3',\n\n ...typographyStyles.body1Strong,\n\n // Truncate text after two lines.\n display: '-webkit-box',\n '-webkit-box-orient': 'vertical',\n '-webkit-line-clamp': '2',\n overflowY: 'hidden',\n wordBreak: 'break-word',\n },\n promptNoReasonMarker: {\n // Truncate text after three lines when no reason marker is present.\n '-webkit-line-clamp': '3',\n },\n reasonMarker: {\n gridRow: '3',\n gridColumn: '1 / 3',\n\n ...typographyStyles.caption2,\n\n // Truncate text after one line.\n display: '-webkit-box',\n '-webkit-box-orient': 'vertical',\n '-webkit-line-clamp': '1',\n overflowY: 'hidden',\n wordBreak: 'break-word',\n },\n});\n\nconst useSingleColumnStyles = makeStyles({\n primaryAction: {\n display: 'flex',\n flexDirection: 'column',\n padding: `${tokens.spacingVerticalM} ${tokens.spacingHorizontalM}`,\n borderRadius: tokens.borderRadius2XL,\n ...createFocusOutlineStyle({ style: { outlineRadius: tokens.borderRadius2XL } }),\n },\n category: {\n ...typographyStyles.caption1Strong,\n alignSelf: 'auto',\n },\n prompt: {\n ...typographyStyles.caption1Strong,\n\n // Always truncate after two lines in single column layout.\n '-webkit-line-clamp': '2',\n },\n});\n\nexport const usePromptStarterStyles_unstable = (state: PromptStarterState): PromptStarterState => {\n 'use no memo';\n\n const { isSingleColumn } = state;\n\n const styles = useStyles();\n const rootResetStyles = useRootResetStyles();\n const singleColumnStyles = useSingleColumnStyles();\n state.root.className = mergeClasses(promptStarterClassNames.root, rootResetStyles, state.root.className);\n state.primaryAction.className = mergeClasses(\n promptStarterClassNames.primaryAction,\n styles.primaryAction,\n isSingleColumn && singleColumnStyles.primaryAction,\n state.primaryAction.className,\n );\n if (state.icon) {\n state.icon.className = mergeClasses(promptStarterClassNames.icon, styles.icon, state.icon.className);\n }\n if (state.category) {\n state.category.className = mergeClasses(\n promptStarterClassNames.category,\n styles.category,\n isSingleColumn && singleColumnStyles.category,\n state.category.className,\n );\n }\n state.prompt.className = mergeClasses(\n promptStarterClassNames.prompt,\n styles.prompt,\n !state.reasonMarker && styles.promptNoReasonMarker,\n isSingleColumn && singleColumnStyles.prompt,\n state.prompt.className,\n );\n if (state.reasonMarker) {\n state.reasonMarker.className = mergeClasses(\n promptStarterClassNames.reasonMarker,\n styles.reasonMarker,\n state.reasonMarker.className,\n );\n }\n if (state.actions) {\n state.actions.className = mergeClasses(\n promptStarterClassNames.actions,\n styles.actions,\n state.category && styles.actionsWithCategory,\n state.actions.className,\n );\n }\n\n return state;\n};\n"],"names":["makeStyles","makeResetStyles","mergeClasses","shorthands","typographyStyles","createFocusOutlineStyle","tokens","promptStarterClassNames","root","primaryAction","icon","category","prompt","reasonMarker","actions","useRootResetStyles","display","gridTemplateColumns","gridTemplateRows","minWidth","boxShadow","shadow16","transform","transition","durationNormal","curveDecelerateMin","shadow8","clip","height","margin","overflow","padding","width","position","opacity","useStyles","gridRow","gridColumn","gridAutoRows","borderRadius","backgroundColor","colorNeutralBackground1","color","colorNeutralForeground2","fontFamily","fontFamilyBase","cursor","outlineStyle","textAlign","columnGap","spacingHorizontalMNudge","rowGap","spacingVerticalS","spacingVerticalL","spacingHorizontalL","border","strokeWidthThin","colorNeutralStroke2","style","outlineRadius","primaryActionHovered","alignItems","minHeight","spacingVerticalXXL","alignSelf","colorNeutralForeground1","body1Strong","overflowY","wordBreak","spacingVerticalNone","spacingHorizontalNone","durationFast","curveLinear","actionsWithCategory","promptNoReasonMarker","caption2","useSingleColumnStyles","flexDirection","spacingVerticalM","spacingHorizontalM","borderRadius2XL","caption1Strong","usePromptStarterStyles_unstable","state","isSingleColumn","styles","rootResetStyles","singleColumnStyles","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SACEA,UAAU,EACVC,eAAe,EACfC,YAAY,EACZC,UAAU,EACVC,gBAAgB,EAChBC,uBAAuB,QAClB,6BAA6B;AACpC,SAASC,MAAM,QAAQ,2BAA2B;AAIlD,OAAO,MAAMC,0BAA8D;IACzEC,MAAM;IACNC,eAAe;IACfC,MAAM;IACNC,UAAU;IACVC,QAAQ;IACRC,cAAc;IACdC,SAAS;AACX,EAAE;AAEF,MAAMC,qBAAqBd,gBAAgB;IACzCe,SAAS;IACTC,qBAAqB;IACrBC,kBAAkB;IAClBC,UAAU;IAEV,8DAA8D;IAC9D,WAAW;QACT,CAAC,CAAC,GAAG,EAAEZ,wBAAwBE,aAAa,CAAC,CAAC,CAAC,EAAE;YAC/CW,WAAWd,OAAOe,QAAQ;YAC1BC,WAAW;YACXC,YAAY,CAAC,UAAU,EAAEjB,OAAOkB,cAAc,CAAC,CAAC,EAAElB,OAAOmB,kBAAkB,CAAC,CAAC;QAC/E;IACF;IACA,YAAY;QACV,CAAC,CAAC,GAAG,EAAElB,wBAAwBE,aAAa,CAAC,CAAC,CAAC,EAAE;YAC/CW,WAAWd,OAAOoB,OAAO;YACzBJ,WAAW;YACXC,YAAY,CAAC,UAAU,EAAEjB,OAAOkB,cAAc,CAAC,C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AAGtF,aAC7BK,wBAAwBM,YAAY,EACpCwE,OAAOxE,YAAY,EACnBsE,MAAMtE,YAAY,CAAC2E,SAAS;IAEhC;IACA,IAAIL,MAAMrE,OAAO,EAAE;QACjBqE,MAAMrE,OAAO,CAAC0E,SAAS,GAAGtF,aACxBK,wBAAwBO,OAAO,EAC/BuE,OAAOvE,OAAO,EACdqE,MAAMxE,QAAQ,IAAI0E,OAAOZ,mBAAmB,EAC5CU,MAAMrE,OAAO,CAAC0E,SAAS;IAE3B;IAEA,OAAOL;AACT,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["PromptStarterList.types.ts"],"sourcesContent":["import type { DesignVersion } from '@fluentui-copilot/react-provider';\nimport type {\n ComponentProps,\n ComponentState,\n Slot,\n Button,\n UseArrowNavigationGroupOptions,\n} from '@fluentui/react-components';\n\nexport type PromptStarterListSlots = {\n root: NonNullable<Slot<'div'>>;\n gridWrapper: NonNullable<Slot<'div'>>;\n expandButton?: Slot<typeof Button>;\n};\n\n/**\n * PromptStarterList Props\n */\nexport type PromptStarterListProps = ComponentProps<Partial<PromptStarterListSlots>, 'gridWrapper'> &\n DesignVersion & {\n /**\n * Text for the expand button when the list is collapsed.\n *\n * default: \"Show more\"\n */\n expandButtonLabel?: string;\n /**\n * Text for the expand button when the list is expanded.\n *\n * default: \"Show less\"\n */\n collapseButtonLabel?: string;\n /**\n * Arrow navigation options. This can be used to customize Tabster's direction,\n * tab behavior, and memoization options.\n *\n * default: { axis: 'horizontal', memorizeCurrent: true }\n */\n arrowNavigationOptions?: UseArrowNavigationGroupOptions;\n };\n\n/**\n * State used in rendering PromptStarterList\n */\nexport type PromptStarterListState = ComponentState<PromptStarterListSlots> &\n Required<Pick<PromptStarterListProps, 'designVersion'>> & {\n numberOfColumns: number;\n isExpanded?: boolean;\n };\n\nexport type PromptStarterListContextValue = Pick<PromptStarterListState, 'numberOfColumns' | 'isExpanded'>;\n"],"names":[],"rangeMappings":"","mappings":"
|
|
1
|
+
{"version":3,"sources":["PromptStarterList.types.ts"],"sourcesContent":["import type { DesignVersion } from '@fluentui-copilot/react-provider';\nimport type {\n ComponentProps,\n ComponentState,\n Slot,\n Button,\n UseArrowNavigationGroupOptions,\n} from '@fluentui/react-components';\n\nexport type PromptStarterListSlots = {\n root: NonNullable<Slot<'div'>>;\n gridWrapper: NonNullable<Slot<'div'>>;\n actions?: Slot<'span'>;\n expandButton?: Slot<typeof Button>;\n};\n\n/**\n * PromptStarterList Props\n */\nexport type PromptStarterListProps = ComponentProps<Partial<PromptStarterListSlots>, 'gridWrapper'> &\n DesignVersion & {\n /**\n * Uncontrolled initial value for the expanded prop.\n *\n * @default false\n */\n defaultExpanded?: boolean;\n\n /**\n * Controls whether the PromptStarterList is expanded.\n */\n isExpanded?: boolean;\n\n /**\n * Callback to execute when the expanded state changes.\n */\n onExpandedChange?: (event: React.MouseEvent<HTMLElement>, data: { isExpanded: boolean }) => void;\n\n /**\n * Text for the expand button when the list is collapsed.\n *\n * default: \"Show more\"\n */\n expandButtonLabel?: string;\n\n /**\n * Text for the expand button when the list is expanded.\n *\n * default: \"Show less\"\n */\n collapseButtonLabel?: string;\n\n /**\n * Arrow navigation options. This can be used to customize Tabster's direction,\n * tab behavior, and memoization options.\n *\n * default: { axis: 'horizontal', memorizeCurrent: true }\n */\n arrowNavigationOptions?: UseArrowNavigationGroupOptions;\n\n /**\n * Whether to animate the entrance of its items when it first mounts.\n *\n * @default true\n */\n animateOnMount?: boolean;\n\n /**\n * The number of rows that are visible in the two and three column layouts.\n * In the one column layout, there will always be three visible PromptStarters.\n *\n * @default 1\n */\n visibleRows?: number;\n };\n\n/**\n * State used in rendering PromptStarterList\n */\nexport type PromptStarterListState = ComponentState<PromptStarterListSlots> &\n Required<Pick<PromptStarterListProps, 'designVersion'>> & {\n numberOfColumns: number;\n isExpanded?: boolean;\n };\n\nexport type PromptStarterListContextValue = Pick<PromptStarterListState, 'numberOfColumns' | 'isExpanded'>;\n"],"names":[],"rangeMappings":"","mappings":"AAqFA,WAA2G"}
|
|
@@ -14,6 +14,7 @@ import { PromptStarterListProvider } from '../../../contexts/PromptStarterListCo
|
|
|
14
14
|
children: state.root.children
|
|
15
15
|
})
|
|
16
16
|
}),
|
|
17
|
+
state.actions && /*#__PURE__*/ _jsx(state.actions, {}),
|
|
17
18
|
state.expandButton && /*#__PURE__*/ _jsx(state.expandButton, {})
|
|
18
19
|
]
|
|
19
20
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["renderPromptStarterList.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots, PresenceGroup } from '@fluentui/react-components';\nimport { PromptStarterListProvider } from '../../../contexts/PromptStarterListContext';\nimport type {\n PromptStarterListState,\n PromptStarterListSlots,\n PromptStarterListContextValue,\n} from './PromptStarterList.types';\n\n/**\n * Render the final JSX of PromptStarterList\n */\nexport const renderPromptStarterList_unstable = (\n state: PromptStarterListState,\n contextValue: PromptStarterListContextValue,\n) => {\n assertSlots<PromptStarterListSlots>(state);\n\n return (\n <PromptStarterListProvider value={contextValue}>\n <state.root>\n <PresenceGroup>\n <state.gridWrapper>{state.root.children}</state.gridWrapper>\n </PresenceGroup>\n {state.expandButton && <state.expandButton />}\n </state.root>\n </PromptStarterListProvider>\n );\n};\n"],"names":["assertSlots","PresenceGroup","PromptStarterListProvider","renderPromptStarterList_unstable","state","contextValue","value","root","gridWrapper","children","expandButton"],"rangeMappings":"
|
|
1
|
+
{"version":3,"sources":["renderPromptStarterList.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots, PresenceGroup } from '@fluentui/react-components';\nimport type { JSXElement } from '@fluentui/react-components';\nimport { PromptStarterListProvider } from '../../../contexts/PromptStarterListContext';\nimport type {\n PromptStarterListState,\n PromptStarterListSlots,\n PromptStarterListContextValue,\n} from './PromptStarterList.types';\n\n/**\n * Render the final JSX of PromptStarterList\n */\nexport const renderPromptStarterList_unstable = (\n state: PromptStarterListState,\n contextValue: PromptStarterListContextValue,\n): JSXElement => {\n assertSlots<PromptStarterListSlots>(state);\n\n return (\n <PromptStarterListProvider value={contextValue}>\n <state.root>\n <PresenceGroup>\n <state.gridWrapper>{state.root.children}</state.gridWrapper>\n </PresenceGroup>\n {state.actions && <state.actions />}\n {state.expandButton && <state.expandButton />}\n </state.root>\n </PromptStarterListProvider>\n );\n};\n"],"names":["assertSlots","PresenceGroup","PromptStarterListProvider","renderPromptStarterList_unstable","state","contextValue","value","root","gridWrapper","children","actions","expandButton"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,EAAEC,aAAa,QAAQ,6BAA6B;AAExE,SAASC,yBAAyB,QAAQ,6CAA6C;AAOvF;;CAEC,GACD,OAAO,MAAMC,mCAAmC,CAC9CC,OACAC;IAEAL,YAAoCI;IAEpC,qBACE,KAACF;QAA0BI,OAAOD;kBAChC,cAAA,MAACD,MAAMG,IAAI;;8BACT,KAACN;8BACC,cAAA,KAACG,MAAMI,WAAW;kCAAEJ,MAAMG,IAAI,CAACE,QAAQ;;;gBAExCL,MAAMM,OAAO,kBAAI,KAACN,MAAMM,OAAO;gBAC/BN,MAAMO,YAAY,kBAAI,KAACP,MAAMO,YAAY;;;;AAIlD,EAAE"}
|