@fluentui-copilot/react-prompt-starter 0.0.0-nightly-20250708-1433-52f2b6b1.1 → 0.0.0-nightly-20250709-0404-150e065c.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.
- package/CHANGELOG.json +3 -3
- package/CHANGELOG.md +4 -4
- package/lib/PromptStarter.js +1 -0
- package/lib/PromptStarterList.js +1 -0
- package/lib/PromptStarterV2.js +1 -0
- package/lib/components/PromptStarter/PromptStarter.js +6 -5
- package/lib/components/PromptStarter/PromptStarter.types.js +2 -1
- package/lib/components/PromptStarter/index.js +1 -0
- package/lib/components/PromptStarter/renderPromptStarter.js +9 -16
- package/lib/components/PromptStarter/usePromptStarter.js +44 -42
- package/lib/components/PromptStarterV2/PromptStarter/PromptStarter.js +6 -5
- package/lib/components/PromptStarterV2/PromptStarter/PromptStarter.types.js +2 -1
- package/lib/components/PromptStarterV2/PromptStarter/index.js +1 -0
- package/lib/components/PromptStarterV2/PromptStarter/promptStarterMotion.js +50 -61
- package/lib/components/PromptStarterV2/PromptStarter/renderPromptStarter.js +9 -15
- package/lib/components/PromptStarterV2/PromptStarter/usePromptStarter.js +51 -49
- package/lib/components/PromptStarterV2/PromptStarterList/PromptStarterList.js +6 -5
- package/lib/components/PromptStarterV2/PromptStarterList/PromptStarterList.types.js +2 -1
- package/lib/components/PromptStarterV2/PromptStarterList/index.js +1 -0
- package/lib/components/PromptStarterV2/PromptStarterList/renderPromptStarterList.js +14 -15
- package/lib/components/PromptStarterV2/PromptStarterList/usePromptStarterList.js +97 -97
- package/lib/components/PromptStarterV2/PromptStarterList/usePromptStarterListContextValues.js +7 -4
- package/lib/contexts/PromptStarterListContext.js +3 -2
- package/lib/index.js +1 -0
- package/lib-commonjs/PromptStarter.js +1 -0
- package/lib-commonjs/PromptStarterList.js +1 -0
- package/lib-commonjs/PromptStarterV2.js +1 -0
- package/lib-commonjs/components/PromptStarter/PromptStarter.js +1 -1
- package/lib-commonjs/components/PromptStarter/PromptStarter.js.map +1 -1
- package/lib-commonjs/components/PromptStarter/PromptStarter.types.js +1 -0
- package/lib-commonjs/components/PromptStarter/index.js +1 -0
- package/lib-commonjs/components/PromptStarter/renderPromptStarter.js +1 -1
- package/lib-commonjs/components/PromptStarter/renderPromptStarter.js.map +1 -1
- package/lib-commonjs/components/PromptStarter/usePromptStarter.js +1 -1
- package/lib-commonjs/components/PromptStarter/usePromptStarter.js.map +1 -1
- package/lib-commonjs/components/PromptStarterV2/PromptStarter/PromptStarter.js +1 -1
- package/lib-commonjs/components/PromptStarterV2/PromptStarter/PromptStarter.js.map +1 -1
- package/lib-commonjs/components/PromptStarterV2/PromptStarter/PromptStarter.types.js +1 -0
- package/lib-commonjs/components/PromptStarterV2/PromptStarter/index.js +1 -0
- package/lib-commonjs/components/PromptStarterV2/PromptStarter/promptStarterMotion.js +1 -1
- package/lib-commonjs/components/PromptStarterV2/PromptStarter/promptStarterMotion.js.map +1 -1
- package/lib-commonjs/components/PromptStarterV2/PromptStarter/renderPromptStarter.js +1 -1
- package/lib-commonjs/components/PromptStarterV2/PromptStarter/renderPromptStarter.js.map +1 -1
- package/lib-commonjs/components/PromptStarterV2/PromptStarter/usePromptStarter.js +1 -1
- package/lib-commonjs/components/PromptStarterV2/PromptStarter/usePromptStarter.js.map +1 -1
- package/lib-commonjs/components/PromptStarterV2/PromptStarterList/PromptStarterList.js +1 -1
- package/lib-commonjs/components/PromptStarterV2/PromptStarterList/PromptStarterList.js.map +1 -1
- package/lib-commonjs/components/PromptStarterV2/PromptStarterList/PromptStarterList.types.js +1 -0
- package/lib-commonjs/components/PromptStarterV2/PromptStarterList/index.js +1 -0
- package/lib-commonjs/components/PromptStarterV2/PromptStarterList/renderPromptStarterList.js +1 -1
- package/lib-commonjs/components/PromptStarterV2/PromptStarterList/renderPromptStarterList.js.map +1 -1
- package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterList.js +1 -1
- package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterList.js.map +1 -1
- package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterListContextValues.js +1 -1
- package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterListContextValues.js.map +1 -1
- package/lib-commonjs/contexts/PromptStarterListContext.js +1 -1
- package/lib-commonjs/contexts/PromptStarterListContext.js.map +1 -1
- package/lib-commonjs/index.js +1 -0
- package/package.json +3 -3
- package/lib/components/PromptStarter/usePromptStarterStyles.styles.raw.js +0 -94
- package/lib/components/PromptStarter/usePromptStarterStyles.styles.raw.js.map +0 -1
- package/lib/components/PromptStarterV2/PromptStarter/usePromptStarterStyles.styles.raw.js +0 -119
- package/lib/components/PromptStarterV2/PromptStarter/usePromptStarterStyles.styles.raw.js.map +0 -1
- package/lib/components/PromptStarterV2/PromptStarterList/usePromptStarterListStyles.styles.raw.js +0 -61
- package/lib/components/PromptStarterV2/PromptStarterList/usePromptStarterListStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/PromptStarter/usePromptStarterStyles.styles.raw.js +0 -112
- package/lib-commonjs/components/PromptStarter/usePromptStarterStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/PromptStarterV2/PromptStarter/usePromptStarterStyles.styles.raw.js +0 -137
- package/lib-commonjs/components/PromptStarterV2/PromptStarter/usePromptStarterStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterListStyles.styles.raw.js +0 -77
- package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterListStyles.styles.raw.js.map +0 -1
package/CHANGELOG.json
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"name": "@fluentui-copilot/react-prompt-starter",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
6
|
-
"tag": "@fluentui-copilot/react-prompt-starter_v0.0.0-nightly-
|
|
7
|
-
"version": "0.0.0-nightly-
|
|
5
|
+
"date": "Wed, 09 Jul 2025 04:12:05 GMT",
|
|
6
|
+
"tag": "@fluentui-copilot/react-prompt-starter_v0.0.0-nightly-20250709-0404-150e065c.1",
|
|
7
|
+
"version": "0.0.0-nightly-20250709-0404-150e065c.1",
|
|
8
8
|
"comments": {
|
|
9
9
|
"prerelease": [
|
|
10
10
|
{
|
package/CHANGELOG.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# Change Log - @fluentui-copilot/react-prompt-starter
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Wed, 09 Jul 2025 04:12:05 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
-
## [0.0.0-nightly-
|
|
7
|
+
## [0.0.0-nightly-20250709-0404-150e065c.1](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-prompt-starter_v0.0.0-nightly-20250709-0404-150e065c.1)
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-prompt-starter_v0.10.2..@fluentui-copilot/react-prompt-starter_v0.0.0-nightly-
|
|
9
|
+
Wed, 09 Jul 2025 04:12:05 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-prompt-starter_v0.10.2..@fluentui-copilot/react-prompt-starter_v0.0.0-nightly-20250709-0404-150e065c.1)
|
|
11
11
|
|
|
12
12
|
### Changes
|
|
13
13
|
|
package/lib/PromptStarter.js
CHANGED
package/lib/PromptStarterList.js
CHANGED
package/lib/PromptStarterV2.js
CHANGED
|
@@ -3,10 +3,11 @@ import { usePromptStarter_unstable } from './usePromptStarter';
|
|
|
3
3
|
import { renderPromptStarter_unstable } from './renderPromptStarter';
|
|
4
4
|
import { usePromptStarterStyles_unstable } from './usePromptStarterStyles.styles';
|
|
5
5
|
import { useCustomStyleHook } from '@fluentui-copilot/react-provider';
|
|
6
|
-
export const PromptStarter = /*#__PURE__*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
export const PromptStarter = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
7
|
+
const state = usePromptStarter_unstable(props, ref);
|
|
8
|
+
usePromptStarterStyles_unstable(state);
|
|
9
|
+
useCustomStyleHook('usePromptStarterStyles')(state);
|
|
10
|
+
return renderPromptStarter_unstable(state);
|
|
11
11
|
});
|
|
12
12
|
PromptStarter.displayName = 'PromptStarter';
|
|
13
|
+
//# sourceMappingURL=PromptStarter.js.map
|
|
@@ -2,3 +2,4 @@ export { PromptStarter } from './PromptStarter';
|
|
|
2
2
|
export { renderPromptStarter_unstable } from './renderPromptStarter';
|
|
3
3
|
export { usePromptStarter_unstable } from './usePromptStarter';
|
|
4
4
|
export { promptStarterClassNames, usePromptStarterStyles_unstable } from './usePromptStarterStyles.styles';
|
|
5
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1,18 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
|
|
2
2
|
import { assertSlots } from '@fluentui/react-components';
|
|
3
|
-
export const renderPromptStarter_unstable =
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
state.category.children,
|
|
11
|
-
" ",
|
|
12
|
-
state.badge && /*#__PURE__*/ _jsx(state.badge, {})
|
|
13
|
-
]
|
|
14
|
-
}),
|
|
15
|
-
state.prompt && /*#__PURE__*/ _jsx(state.prompt, {})
|
|
16
|
-
]
|
|
17
|
-
});
|
|
3
|
+
export const renderPromptStarter_unstable = state => {
|
|
4
|
+
assertSlots(state);
|
|
5
|
+
return /*#__PURE__*/_jsxs(state.root, {
|
|
6
|
+
children: [/*#__PURE__*/_jsx(state.icon, {}), /*#__PURE__*/_jsxs(state.category, {
|
|
7
|
+
children: [state.category.children, " ", state.badge && /*#__PURE__*/_jsx(state.badge, {})]
|
|
8
|
+
}), state.prompt && /*#__PURE__*/_jsx(state.prompt, {})]
|
|
9
|
+
});
|
|
18
10
|
};
|
|
11
|
+
//# sourceMappingURL=renderPromptStarter.js.map
|
|
@@ -8,46 +8,48 @@ import { Badge, getIntrinsicElementProps, slot, useId } from '@fluentui/react-co
|
|
|
8
8
|
*
|
|
9
9
|
* @param props - props from this instance of PromptStarter
|
|
10
10
|
* @param ref - reference to root HTMLElement of PromptStarter
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
11
|
+
*/
|
|
12
|
+
export const usePromptStarter_unstable = (props, ref) => {
|
|
13
|
+
const designVersion = useDesignVersion(props.designVersion);
|
|
14
|
+
const idPrefix = useId('prompt-starter');
|
|
15
|
+
return {
|
|
16
|
+
components: {
|
|
17
|
+
root: 'button',
|
|
18
|
+
icon: 'span',
|
|
19
|
+
category: 'span',
|
|
20
|
+
prompt: 'span',
|
|
21
|
+
badge: Badge
|
|
22
|
+
},
|
|
23
|
+
root: slot.always(getIntrinsicElementProps('button', {
|
|
24
|
+
ref,
|
|
25
|
+
'aria-labelledby': `${idPrefix}-category`,
|
|
26
|
+
'aria-describedby': `${idPrefix}-prompt`,
|
|
27
|
+
...props
|
|
28
|
+
}), {
|
|
29
|
+
elementType: 'button'
|
|
30
|
+
}),
|
|
31
|
+
icon: slot.always(props.icon, {
|
|
32
|
+
elementType: 'span'
|
|
33
|
+
}),
|
|
34
|
+
category: slot.always(props.category, {
|
|
35
|
+
defaultProps: {
|
|
36
|
+
id: `${idPrefix}-category`
|
|
37
|
+
},
|
|
38
|
+
elementType: 'span'
|
|
39
|
+
}),
|
|
40
|
+
prompt: slot.optional(props.prompt, {
|
|
41
|
+
defaultProps: {
|
|
42
|
+
id: `${idPrefix}-prompt`
|
|
43
|
+
},
|
|
44
|
+
elementType: 'span'
|
|
45
|
+
}),
|
|
46
|
+
badge: slot.optional(props.badge, {
|
|
47
|
+
defaultProps: {
|
|
48
|
+
appearance: 'tint'
|
|
49
|
+
},
|
|
50
|
+
elementType: Badge
|
|
51
|
+
}),
|
|
52
|
+
designVersion
|
|
53
|
+
};
|
|
53
54
|
};
|
|
55
|
+
//# sourceMappingURL=usePromptStarter.js.map
|
|
@@ -3,10 +3,11 @@ import { usePromptStarter_unstable } from './usePromptStarter';
|
|
|
3
3
|
import { renderPromptStarter_unstable } from './renderPromptStarter';
|
|
4
4
|
import { usePromptStarterStyles_unstable } from './usePromptStarterStyles.styles';
|
|
5
5
|
import { useCustomStyleHook } from '@fluentui-copilot/react-provider';
|
|
6
|
-
export const PromptStarter = /*#__PURE__*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
export const PromptStarter = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
7
|
+
const state = usePromptStarter_unstable(props, ref);
|
|
8
|
+
usePromptStarterStyles_unstable(state);
|
|
9
|
+
useCustomStyleHook('usePromptStarterStyles')(state);
|
|
10
|
+
return renderPromptStarter_unstable(state);
|
|
11
11
|
});
|
|
12
12
|
PromptStarter.displayName = 'PromptStarter';
|
|
13
|
+
//# sourceMappingURL=PromptStarter.js.map
|
|
@@ -2,3 +2,4 @@ export { PromptStarter } from './PromptStarter';
|
|
|
2
2
|
export { renderPromptStarter_unstable } from './renderPromptStarter';
|
|
3
3
|
export { usePromptStarter_unstable } from './usePromptStarter';
|
|
4
4
|
export { promptStarterClassNames, usePromptStarterStyles_unstable } from './usePromptStarterStyles.styles';
|
|
5
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1,63 +1,52 @@
|
|
|
1
1
|
import { createPresenceComponent } from '@fluentui/react-components';
|
|
2
|
-
export const PromptStarterMotion = createPresenceComponent(({
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
opacity: 1
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
opacity: 0
|
|
57
|
-
}
|
|
58
|
-
],
|
|
59
|
-
easing: opacityEasing,
|
|
60
|
-
duration: opacityExitDuration
|
|
61
|
-
}
|
|
62
|
-
};
|
|
2
|
+
export const PromptStarterMotion = createPresenceComponent(({
|
|
3
|
+
index,
|
|
4
|
+
numberOfColumns
|
|
5
|
+
}) => {
|
|
6
|
+
const isFirstRow = index < numberOfColumns;
|
|
7
|
+
const delay = isFirstRow ? index * 50 : (index - numberOfColumns) * 50;
|
|
8
|
+
const opacityDuration = 100;
|
|
9
|
+
const opacityOffset = delay / (delay + opacityDuration);
|
|
10
|
+
const opacityEasing = 'linear';
|
|
11
|
+
const scaleDuration = 500;
|
|
12
|
+
const scaleOffset = delay / (delay + scaleDuration);
|
|
13
|
+
const scaleEasing = `cubic-bezier(0.22, 1.59, 0.46, 1)`;
|
|
14
|
+
const opacityExitDuration = 200;
|
|
15
|
+
return {
|
|
16
|
+
enter: [{
|
|
17
|
+
keyframes: [{
|
|
18
|
+
opacity: 0
|
|
19
|
+
}, {
|
|
20
|
+
opacity: 0,
|
|
21
|
+
offset: opacityOffset
|
|
22
|
+
}, {
|
|
23
|
+
opacity: 1
|
|
24
|
+
}],
|
|
25
|
+
easing: opacityEasing,
|
|
26
|
+
duration: opacityDuration + delay
|
|
27
|
+
}, {
|
|
28
|
+
keyframes: [{
|
|
29
|
+
transform: 'scale(0.9)'
|
|
30
|
+
}, {
|
|
31
|
+
transform: 'scale(0.9)',
|
|
32
|
+
offset: scaleOffset
|
|
33
|
+
}, {
|
|
34
|
+
transform: 'scale(1)'
|
|
35
|
+
}],
|
|
36
|
+
easing: scaleEasing,
|
|
37
|
+
duration: scaleDuration + delay
|
|
38
|
+
}],
|
|
39
|
+
exit: {
|
|
40
|
+
keyframes: [{
|
|
41
|
+
opacity: 1
|
|
42
|
+
}, {
|
|
43
|
+
opacity: 1
|
|
44
|
+
}, {
|
|
45
|
+
opacity: 0
|
|
46
|
+
}],
|
|
47
|
+
easing: opacityEasing,
|
|
48
|
+
duration: opacityExitDuration
|
|
49
|
+
}
|
|
50
|
+
};
|
|
63
51
|
});
|
|
52
|
+
//# sourceMappingURL=promptStarterMotion.js.map
|
|
@@ -1,17 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
|
|
2
2
|
import { assertSlots } from '@fluentui/react-components';
|
|
3
|
-
export const renderPromptStarter_unstable =
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
/*#__PURE__*/ _jsx(state.prompt, {}),
|
|
11
|
-
state.reasonMarker && /*#__PURE__*/ _jsx(state.reasonMarker, {})
|
|
12
|
-
]
|
|
13
|
-
}),
|
|
14
|
-
state.actions && /*#__PURE__*/ _jsx(state.actions, {})
|
|
15
|
-
]
|
|
16
|
-
});
|
|
3
|
+
export const renderPromptStarter_unstable = state => {
|
|
4
|
+
assertSlots(state);
|
|
5
|
+
return /*#__PURE__*/_jsxs(state.root, {
|
|
6
|
+
children: [/*#__PURE__*/_jsxs(state.primaryAction, {
|
|
7
|
+
children: [/*#__PURE__*/_jsx(state.icon, {}), /*#__PURE__*/_jsx(state.prompt, {}), state.reasonMarker && /*#__PURE__*/_jsx(state.reasonMarker, {})]
|
|
8
|
+
}), state.actions && /*#__PURE__*/_jsx(state.actions, {})]
|
|
9
|
+
});
|
|
17
10
|
};
|
|
11
|
+
//# sourceMappingURL=renderPromptStarter.js.map
|
|
@@ -8,53 +8,55 @@ import { usePromptStarterListContext } from '../../../contexts/PromptStarterList
|
|
|
8
8
|
*
|
|
9
9
|
* @param props - props from this instance of PromptStarter
|
|
10
10
|
* @param ref - reference to root HTMLElement of PromptStarter
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
59
|
-
|
|
11
|
+
*/
|
|
12
|
+
export const usePromptStarter_unstable = (props, ref) => {
|
|
13
|
+
const id = useId('prompt-starter');
|
|
14
|
+
const focusAttrs = useFocusableGroup();
|
|
15
|
+
const numberOfColumns = usePromptStarterListContext(ctx => ctx.numberOfColumns);
|
|
16
|
+
const state = {
|
|
17
|
+
isSingleColumn: numberOfColumns === 1,
|
|
18
|
+
components: {
|
|
19
|
+
root: 'div',
|
|
20
|
+
primaryAction: 'button',
|
|
21
|
+
icon: 'span',
|
|
22
|
+
prompt: 'span',
|
|
23
|
+
reasonMarker: 'span',
|
|
24
|
+
actions: 'span'
|
|
25
|
+
},
|
|
26
|
+
root: slot.always(getIntrinsicElementProps('div', {
|
|
27
|
+
ref,
|
|
28
|
+
'aria-labelledby': `${id}-prompt`,
|
|
29
|
+
'aria-describedby': `${id}-icon, ${id}-reasonMarker`,
|
|
30
|
+
...focusAttrs,
|
|
31
|
+
...props
|
|
32
|
+
}), {
|
|
33
|
+
elementType: 'div'
|
|
34
|
+
}),
|
|
35
|
+
primaryAction: slot.always(props.primaryAction, {
|
|
36
|
+
elementType: 'button'
|
|
37
|
+
}),
|
|
38
|
+
icon: slot.always(props.icon, {
|
|
39
|
+
defaultProps: {
|
|
40
|
+
id: `${id}-icon`
|
|
41
|
+
},
|
|
42
|
+
elementType: 'span'
|
|
43
|
+
}),
|
|
44
|
+
prompt: slot.always(props.prompt, {
|
|
45
|
+
defaultProps: {
|
|
46
|
+
id: `${id}-prompt`
|
|
47
|
+
},
|
|
48
|
+
elementType: 'span'
|
|
49
|
+
}),
|
|
50
|
+
reasonMarker: slot.optional(props.reasonMarker, {
|
|
51
|
+
defaultProps: {
|
|
52
|
+
id: `${id}-reasonMarker`
|
|
53
|
+
},
|
|
54
|
+
elementType: 'span'
|
|
55
|
+
}),
|
|
56
|
+
actions: slot.optional(props.actions, {
|
|
57
|
+
elementType: 'span'
|
|
58
|
+
})
|
|
59
|
+
};
|
|
60
|
+
return state;
|
|
60
61
|
};
|
|
62
|
+
//# sourceMappingURL=usePromptStarter.js.map
|
|
@@ -3,10 +3,11 @@ import { usePromptStarterList_unstable } from './usePromptStarterList';
|
|
|
3
3
|
import { renderPromptStarterList_unstable } from './renderPromptStarterList';
|
|
4
4
|
import { usePromptStarterListStyles_unstable } from './usePromptStarterListStyles.styles';
|
|
5
5
|
import { usePromptStarterListContextValues } from './usePromptStarterListContextValues';
|
|
6
|
-
export const PromptStarterList = /*#__PURE__*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
export const PromptStarterList = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
7
|
+
const state = usePromptStarterList_unstable(props, ref);
|
|
8
|
+
const contextValues = usePromptStarterListContextValues(state);
|
|
9
|
+
usePromptStarterListStyles_unstable(state);
|
|
10
|
+
return renderPromptStarterList_unstable(state, contextValues);
|
|
11
11
|
});
|
|
12
12
|
PromptStarterList.displayName = 'PromptStarterList';
|
|
13
|
+
//# sourceMappingURL=PromptStarterList.js.map
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export {};
|
|
2
|
+
//# sourceMappingURL=PromptStarterList.types.js.map
|
|
@@ -2,3 +2,4 @@ export { PromptStarterList } from './PromptStarterList';
|
|
|
2
2
|
export { renderPromptStarterList_unstable } from './renderPromptStarterList';
|
|
3
3
|
export { usePromptStarterList_unstable } from './usePromptStarterList';
|
|
4
4
|
export { promptStarterListClassNames, usePromptStarterListStyles_unstable } from './usePromptStarterListStyles.styles';
|
|
5
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
|
|
2
2
|
import { assertSlots, PresenceGroup } from '@fluentui/react-components';
|
|
3
3
|
import { PromptStarterListProvider } from '../../../contexts/PromptStarterListContext';
|
|
4
4
|
/**
|
|
5
5
|
* Render the final JSX of PromptStarterList
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
})
|
|
16
|
-
}),
|
|
17
|
-
state.expandButton && /*#__PURE__*/ _jsx(state.expandButton, {})
|
|
18
|
-
]
|
|
6
|
+
*/
|
|
7
|
+
export const renderPromptStarterList_unstable = (state, contextValue) => {
|
|
8
|
+
assertSlots(state);
|
|
9
|
+
return /*#__PURE__*/_jsx(PromptStarterListProvider, {
|
|
10
|
+
value: contextValue,
|
|
11
|
+
children: /*#__PURE__*/_jsxs(state.root, {
|
|
12
|
+
children: [/*#__PURE__*/_jsx(PresenceGroup, {
|
|
13
|
+
children: /*#__PURE__*/_jsx(state.gridWrapper, {
|
|
14
|
+
children: state.root.children
|
|
19
15
|
})
|
|
20
|
-
|
|
16
|
+
}), state.expandButton && /*#__PURE__*/_jsx(state.expandButton, {})]
|
|
17
|
+
})
|
|
18
|
+
});
|
|
21
19
|
};
|
|
20
|
+
//# sourceMappingURL=renderPromptStarterList.js.map
|