@fluentui-copilot/react-prompt-starter 0.0.0-nightly-20250610-0405-e23ffd06.1 → 0.0.0-nightly-20250613-0405-485ea952.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 +36 -3
- package/CHANGELOG.md +16 -4
- package/dist/index.d.ts +73 -2
- package/lib/PromptStarterList.js +2 -0
- package/lib/PromptStarterList.js.map +1 -0
- package/lib/components/PromptStarterV2/PromptStarter/PromptStarter.types.js.map +1 -1
- package/lib/components/PromptStarterV2/PromptStarter/promptStarterMotion.js +52 -0
- package/lib/components/PromptStarterV2/PromptStarter/promptStarterMotion.js.map +1 -0
- package/lib/components/PromptStarterV2/PromptStarter/usePromptStarter.js +6 -1
- package/lib/components/PromptStarterV2/PromptStarter/usePromptStarter.js.map +1 -1
- package/lib/components/PromptStarterV2/PromptStarter/usePromptStarterStyles.styles.js +13 -12
- package/lib/components/PromptStarterV2/PromptStarter/usePromptStarterStyles.styles.js.map +1 -1
- package/lib/components/PromptStarterV2/PromptStarterList/PromptStarterList.js +13 -0
- package/lib/components/PromptStarterV2/PromptStarterList/PromptStarterList.js.map +1 -0
- package/lib/components/PromptStarterV2/PromptStarterList/PromptStarterList.types.js +2 -0
- package/lib/components/PromptStarterV2/PromptStarterList/PromptStarterList.types.js.map +1 -0
- package/lib/components/PromptStarterV2/PromptStarterList/index.js +5 -0
- package/lib/components/PromptStarterV2/PromptStarterList/index.js.map +1 -0
- package/lib/components/PromptStarterV2/PromptStarterList/renderPromptStarterList.js +20 -0
- package/lib/components/PromptStarterV2/PromptStarterList/renderPromptStarterList.js.map +1 -0
- package/lib/components/PromptStarterV2/PromptStarterList/usePromptStarterList.js +113 -0
- package/lib/components/PromptStarterV2/PromptStarterList/usePromptStarterList.js.map +1 -0
- package/lib/components/PromptStarterV2/PromptStarterList/usePromptStarterListContextValues.js +9 -0
- package/lib/components/PromptStarterV2/PromptStarterList/usePromptStarterListContextValues.js.map +1 -0
- package/lib/components/PromptStarterV2/PromptStarterList/usePromptStarterListStyles.styles.js +57 -0
- package/lib/components/PromptStarterV2/PromptStarterList/usePromptStarterListStyles.styles.js.map +1 -0
- package/lib/contexts/PromptStarterListContext.js +8 -0
- package/lib/contexts/PromptStarterListContext.js.map +1 -0
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib-commonjs/PromptStarterList.js +29 -0
- package/lib-commonjs/PromptStarterList.js.map +1 -0
- package/lib-commonjs/components/PromptStarterV2/PromptStarter/PromptStarter.types.js.map +1 -1
- package/lib-commonjs/components/PromptStarterV2/PromptStarter/promptStarterMotion.js +73 -0
- package/lib-commonjs/components/PromptStarterV2/PromptStarter/promptStarterMotion.js.map +1 -0
- package/lib-commonjs/components/PromptStarterV2/PromptStarter/usePromptStarter.js +5 -0
- package/lib-commonjs/components/PromptStarterV2/PromptStarter/usePromptStarter.js.map +1 -1
- package/lib-commonjs/components/PromptStarterV2/PromptStarter/usePromptStarterStyles.styles.js +12 -16
- package/lib-commonjs/components/PromptStarterV2/PromptStarter/usePromptStarterStyles.styles.js.map +1 -1
- package/lib-commonjs/components/PromptStarterV2/PromptStarterList/PromptStarterList.js +23 -0
- package/lib-commonjs/components/PromptStarterV2/PromptStarterList/PromptStarterList.js.map +1 -0
- package/lib-commonjs/components/PromptStarterV2/PromptStarterList/PromptStarterList.types.js +5 -0
- package/lib-commonjs/components/PromptStarterV2/PromptStarterList/PromptStarterList.types.js.map +1 -0
- package/lib-commonjs/components/PromptStarterV2/PromptStarterList/index.js +32 -0
- package/lib-commonjs/components/PromptStarterV2/PromptStarterList/index.js.map +1 -0
- package/lib-commonjs/components/PromptStarterV2/PromptStarterList/renderPromptStarterList.js +29 -0
- package/lib-commonjs/components/PromptStarterV2/PromptStarterList/renderPromptStarterList.js.map +1 -0
- package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterList.js +116 -0
- package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterList.js.map +1 -0
- package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterListContextValues.js +16 -0
- package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterListContextValues.js.map +1 -0
- package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterListStyles.styles.js +89 -0
- package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterListStyles.styles.js.map +1 -0
- package/lib-commonjs/contexts/PromptStarterListContext.js +28 -0
- package/lib-commonjs/contexts/PromptStarterListContext.js.map +1 -0
- package/lib-commonjs/index.js +16 -0
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +4 -3
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": "Fri, 13 Jun 2025 04:12:33 GMT",
|
|
6
|
+
"tag": "@fluentui-copilot/react-prompt-starter_v0.0.0-nightly-20250613-0405-485ea952.1",
|
|
7
|
+
"version": "0.0.0-nightly-20250613-0405-485ea952.1",
|
|
8
8
|
"comments": {
|
|
9
9
|
"prerelease": [
|
|
10
10
|
{
|
|
@@ -16,6 +16,39 @@
|
|
|
16
16
|
]
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
|
+
{
|
|
20
|
+
"date": "Thu, 12 Jun 2025 17:50:58 GMT",
|
|
21
|
+
"tag": "@fluentui-copilot/react-prompt-starter_v0.10.0",
|
|
22
|
+
"version": "0.10.0",
|
|
23
|
+
"comments": {
|
|
24
|
+
"patch": [
|
|
25
|
+
{
|
|
26
|
+
"author": "jiangemma@microsoft.com",
|
|
27
|
+
"package": "@fluentui-copilot/react-prompt-starter",
|
|
28
|
+
"commit": "d9945da4ae81c3a928550551238dc5b98d99078d",
|
|
29
|
+
"comment": "feat: Add reflow to PromptStarterV2 single column appearance."
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"author": "jiangemma@microsoft.com",
|
|
33
|
+
"package": "@fluentui-copilot/react-prompt-starter",
|
|
34
|
+
"commit": "3b0d585a760015b5fda7fb09b0fe17d965986c44",
|
|
35
|
+
"comment": "feat: Add motion to PromptStarterV2 within PromptStarterList."
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"author": "jiangemma@microsoft.com",
|
|
39
|
+
"package": "@fluentui-copilot/react-prompt-starter",
|
|
40
|
+
"commit": "f88e520cd18013d1c10bbb826d7f121c39117f1b",
|
|
41
|
+
"comment": "feat: Create `PromptStarterV2` component."
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"author": "jiangemma@microsoft.com",
|
|
45
|
+
"package": "@fluentui-copilot/react-prompt-starter",
|
|
46
|
+
"commit": "1ebd4b30e170c9b6d335bb4f461ac6e99918453f",
|
|
47
|
+
"comment": "feat: Implement PromptStarterList component."
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
},
|
|
19
52
|
{
|
|
20
53
|
"date": "Mon, 19 May 2025 18:04:28 GMT",
|
|
21
54
|
"tag": "@fluentui-copilot/react-prompt-starter_v0.9.4",
|
package/CHANGELOG.md
CHANGED
|
@@ -1,18 +1,30 @@
|
|
|
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 Fri, 13 Jun 2025 04:12:33 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-20250613-0405-485ea952.1](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-prompt-starter_v0.0.0-nightly-20250613-0405-485ea952.1)
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-prompt-starter_v0.
|
|
9
|
+
Fri, 13 Jun 2025 04:12:33 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-prompt-starter_v0.10.0..@fluentui-copilot/react-prompt-starter_v0.0.0-nightly-20250613-0405-485ea952.1)
|
|
11
11
|
|
|
12
12
|
### Changes
|
|
13
13
|
|
|
14
14
|
- Release nightly ([commit](https://github.com/microsoft/fluentai/commit/not available) by fluentui-internal@service.microsoft.com)
|
|
15
15
|
|
|
16
|
+
## [0.10.0](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-prompt-starter_v0.10.0)
|
|
17
|
+
|
|
18
|
+
Thu, 12 Jun 2025 17:50:58 GMT
|
|
19
|
+
[Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-prompt-starter_v0.9.4..@fluentui-copilot/react-prompt-starter_v0.10.0)
|
|
20
|
+
|
|
21
|
+
### Patches
|
|
22
|
+
|
|
23
|
+
- feat: Add reflow to PromptStarterV2 single column appearance. ([PR #3131](https://github.com/microsoft/fluentai/pull/3131) by jiangemma@microsoft.com)
|
|
24
|
+
- feat: Add motion to PromptStarterV2 within PromptStarterList. ([PR #3129](https://github.com/microsoft/fluentai/pull/3129) by jiangemma@microsoft.com)
|
|
25
|
+
- feat: Create `PromptStarterV2` component. ([PR #3103](https://github.com/microsoft/fluentai/pull/3103) by jiangemma@microsoft.com)
|
|
26
|
+
- feat: Implement PromptStarterList component. ([PR #3112](https://github.com/microsoft/fluentai/pull/3112) by jiangemma@microsoft.com)
|
|
27
|
+
|
|
16
28
|
## [0.9.4](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-prompt-starter_v0.9.4)
|
|
17
29
|
|
|
18
30
|
Mon, 19 May 2025 18:04:28 GMT
|
package/dist/index.d.ts
CHANGED
|
@@ -1,15 +1,63 @@
|
|
|
1
1
|
import type { BadgeProps } from '@fluentui/react-components';
|
|
2
|
+
import type { Button } from '@fluentui/react-components';
|
|
2
3
|
import type { ComponentProps } from '@fluentui/react-components';
|
|
3
4
|
import type { ComponentState } from '@fluentui/react-components';
|
|
4
5
|
import type { DesignVersion } from '@fluentui-copilot/react-provider';
|
|
5
6
|
import type { ForwardRefComponent } from '@fluentui/react-components';
|
|
7
|
+
import * as React_2 from 'react';
|
|
6
8
|
import type { Slot } from '@fluentui/react-components';
|
|
7
9
|
import type { SlotClassNames } from '@fluentui/react-components';
|
|
10
|
+
import type { UseArrowNavigationGroupOptions } from '@fluentui/react-components';
|
|
8
11
|
|
|
9
12
|
export declare const PromptStarter: ForwardRefComponent<PromptStarterProps>;
|
|
10
13
|
|
|
11
14
|
export declare const promptStarterClassNames: SlotClassNames<PromptStarterSlots>;
|
|
12
15
|
|
|
16
|
+
export declare const PromptStarterList: ForwardRefComponent<PromptStarterListProps>;
|
|
17
|
+
|
|
18
|
+
export declare const promptStarterListClassNames: SlotClassNames<PromptStarterListSlots>;
|
|
19
|
+
|
|
20
|
+
declare type PromptStarterListContextValue = Pick<PromptStarterListState, 'numberOfColumns' | 'isExpanded'>;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* PromptStarterList Props
|
|
24
|
+
*/
|
|
25
|
+
export declare type PromptStarterListProps = ComponentProps<PromptStarterListSlots> & DesignVersion & {
|
|
26
|
+
/**
|
|
27
|
+
* Text for the expand button when the list is collapsed.
|
|
28
|
+
*
|
|
29
|
+
* default: "Show more"
|
|
30
|
+
*/
|
|
31
|
+
expandButtonLabel?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Text for the expand button when the list is expanded.
|
|
34
|
+
*
|
|
35
|
+
* default: "Show less"
|
|
36
|
+
*/
|
|
37
|
+
collapseButtonLabel?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Arrow navigation options. This can be used to customize Tabster's direction,
|
|
40
|
+
* tab behavior, and memoization options.
|
|
41
|
+
*
|
|
42
|
+
* default: { axis: 'horizontal', memorizeCurrent: true }
|
|
43
|
+
*/
|
|
44
|
+
arrowNavigationOptions?: UseArrowNavigationGroupOptions;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export declare type PromptStarterListSlots = {
|
|
48
|
+
root: NonNullable<Slot<'div'>>;
|
|
49
|
+
gridWrapper: NonNullable<Slot<'div'>>;
|
|
50
|
+
expandButton?: Slot<typeof Button>;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* State used in rendering PromptStarterList
|
|
55
|
+
*/
|
|
56
|
+
export declare type PromptStarterListState = ComponentState<PromptStarterListSlots> & Required<Pick<PromptStarterListProps, 'designVersion'>> & {
|
|
57
|
+
numberOfColumns: number;
|
|
58
|
+
isExpanded?: boolean;
|
|
59
|
+
};
|
|
60
|
+
|
|
13
61
|
/**
|
|
14
62
|
* PromptStarter Props
|
|
15
63
|
*/
|
|
@@ -35,7 +83,7 @@ export declare const promptStarterV2ClassNames: SlotClassNames<PromptStarterV2Sl
|
|
|
35
83
|
/**
|
|
36
84
|
* PromptStarter Props
|
|
37
85
|
*/
|
|
38
|
-
export declare type PromptStarterV2Props = Omit<ComponentProps<PromptStarterV2Slots>, 'disabled'
|
|
86
|
+
export declare type PromptStarterV2Props = Omit<ComponentProps<PromptStarterV2Slots>, 'disabled'>;
|
|
39
87
|
|
|
40
88
|
export declare type PromptStarterV2Slots = {
|
|
41
89
|
root: NonNullable<Slot<'div'>>;
|
|
@@ -49,10 +97,17 @@ export declare type PromptStarterV2Slots = {
|
|
|
49
97
|
/**
|
|
50
98
|
* State used in rendering PromptStarter
|
|
51
99
|
*/
|
|
52
|
-
export declare type PromptStarterV2State = ComponentState<PromptStarterV2Slots
|
|
100
|
+
export declare type PromptStarterV2State = ComponentState<PromptStarterV2Slots> & {
|
|
101
|
+
isSingleColumn?: boolean;
|
|
102
|
+
};
|
|
53
103
|
|
|
54
104
|
export declare const renderPromptStarter_unstable: (state: PromptStarterState) => JSX.Element;
|
|
55
105
|
|
|
106
|
+
/**
|
|
107
|
+
* Render the final JSX of PromptStarterList
|
|
108
|
+
*/
|
|
109
|
+
export declare const renderPromptStarterList_unstable: (state: PromptStarterListState, contextValue: PromptStarterListContextValue) => JSX.Element;
|
|
110
|
+
|
|
56
111
|
export declare const renderPromptStarterV2_unstable: (state: PromptStarterV2State) => JSX.Element;
|
|
57
112
|
|
|
58
113
|
/**
|
|
@@ -66,6 +121,22 @@ export declare const renderPromptStarterV2_unstable: (state: PromptStarterV2Stat
|
|
|
66
121
|
*/
|
|
67
122
|
export declare const usePromptStarter_unstable: (props: PromptStarterProps, ref: React.Ref<HTMLButtonElement>) => PromptStarterState;
|
|
68
123
|
|
|
124
|
+
/**
|
|
125
|
+
* Create the state required to render PromptStarterList.
|
|
126
|
+
*
|
|
127
|
+
* The returned state can be modified with hooks such as usePromptStarterListStyles_unstable,
|
|
128
|
+
* before being passed to renderPromptStarterList_unstable.
|
|
129
|
+
*
|
|
130
|
+
* @param props - props from this instance of PromptStarterList
|
|
131
|
+
* @param ref - reference to root HTMLElement of PromptStarterList
|
|
132
|
+
*/
|
|
133
|
+
export declare const usePromptStarterList_unstable: (props: PromptStarterListProps, ref: React_2.Ref<HTMLDivElement>) => PromptStarterListState;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Apply styling to the PromptStarterList slots based on the state
|
|
137
|
+
*/
|
|
138
|
+
export declare const usePromptStarterListStyles_unstable: (state: PromptStarterListState) => PromptStarterListState;
|
|
139
|
+
|
|
69
140
|
export declare const usePromptStarterStyles_unstable: (state: PromptStarterState) => PromptStarterState;
|
|
70
141
|
|
|
71
142
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["PromptStarterList.ts"],"sourcesContent":["export {\n PromptStarterList,\n renderPromptStarterList_unstable,\n usePromptStarterList_unstable,\n promptStarterListClassNames,\n usePromptStarterListStyles_unstable,\n} from './components/PromptStarterV2/PromptStarterList/index';\nexport type {\n PromptStarterListProps,\n PromptStarterListSlots,\n PromptStarterListState,\n PromptStarterListContextValue,\n} from './components/PromptStarterV2/PromptStarterList/index';\n"],"names":["PromptStarterList","renderPromptStarterList_unstable","usePromptStarterList_unstable","promptStarterListClassNames","usePromptStarterListStyles_unstable"],"rangeMappings":"","mappings":"AAAA,SACEA,iBAAiB,EACjBC,gCAAgC,EAChCC,6BAA6B,EAC7BC,2BAA2B,EAC3BC,mCAAmC,QAC9B,uDAAuD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["PromptStarter.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-components';\n\nexport type PromptStarterSlots = {\n root: NonNullable<Slot<'div'>>;\n primaryAction: NonNullable<Slot<'button'>>;\n icon: NonNullable<Slot<'span'>>;\n prompt: NonNullable<Slot<'span'>>;\n reasonMarker?: Slot<'span'>;\n actions?: Slot<'span'>;\n};\n\n/**\n * PromptStarter Props\n */\nexport type PromptStarterProps = Omit<ComponentProps<PromptStarterSlots>, 'disabled'
|
|
1
|
+
{"version":3,"sources":["PromptStarter.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-components';\n\nexport type PromptStarterSlots = {\n root: NonNullable<Slot<'div'>>;\n primaryAction: NonNullable<Slot<'button'>>;\n icon: NonNullable<Slot<'span'>>;\n prompt: NonNullable<Slot<'span'>>;\n reasonMarker?: Slot<'span'>;\n actions?: Slot<'span'>;\n};\n\n/**\n * PromptStarter Props\n */\nexport type PromptStarterProps = Omit<ComponentProps<PromptStarterSlots>, 'disabled'>;\n\n/**\n * State used in rendering PromptStarter\n */\nexport type PromptStarterState = ComponentState<PromptStarterSlots> & {\n isSingleColumn?: boolean;\n};\n"],"names":[],"rangeMappings":";;","mappings":"AAgBA;;CAEC,GACD,WAEE"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { createPresenceComponent } from '@fluentui/react-components';
|
|
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
|
+
};
|
|
51
|
+
});
|
|
52
|
+
//# sourceMappingURL=promptStarterMotion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["promptStarterMotion.ts"],"sourcesContent":["import { createPresenceComponent } from '@fluentui/react-components';\n\nexport type PromptStarterMotionParams = { index: number; numberOfColumns: number };\n\nexport const PromptStarterMotion = createPresenceComponent<PromptStarterMotionParams>(({ index, numberOfColumns }) => {\n const isFirstRow = index < numberOfColumns;\n const delay = isFirstRow ? index * 50 : (index - numberOfColumns) * 50;\n\n const opacityDuration = 100;\n const opacityOffset = delay / (delay + opacityDuration);\n const opacityEasing = 'linear';\n\n const scaleDuration = 500;\n const scaleOffset = delay / (delay + scaleDuration);\n const scaleEasing = `cubic-bezier(0.22, 1.59, 0.46, 1)`;\n\n const opacityExitDuration = 200;\n\n return {\n enter: [\n {\n keyframes: [{ opacity: 0 }, { opacity: 0, offset: opacityOffset }, { opacity: 1 }],\n easing: opacityEasing,\n duration: opacityDuration + delay,\n },\n {\n keyframes: [\n { transform: 'scale(0.9)' },\n { transform: 'scale(0.9)', offset: scaleOffset },\n { transform: 'scale(1)' },\n ],\n easing: scaleEasing,\n duration: scaleDuration + delay,\n },\n ],\n exit: {\n keyframes: [{ opacity: 1 }, { opacity: 1 }, { opacity: 0 }],\n easing: opacityEasing,\n duration: opacityExitDuration,\n },\n };\n});\n"],"names":["createPresenceComponent","PromptStarterMotion","index","numberOfColumns","isFirstRow","delay","opacityDuration","opacityOffset","opacityEasing","scaleDuration","scaleOffset","scaleEasing","opacityExitDuration","enter","keyframes","opacity","offset","easing","duration","transform","exit"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,uBAAuB,QAAQ,6BAA6B;AAIrE,OAAO,MAAMC,sBAAsBD,wBAAmD,CAAC,EAAEE,KAAK,EAAEC,eAAe,EAAE;IAC/G,MAAMC,aAAaF,QAAQC;IAC3B,MAAME,QAAQD,aAAaF,QAAQ,KAAK,AAACA,CAAAA,QAAQC,eAAc,IAAK;IAEpE,MAAMG,kBAAkB;IACxB,MAAMC,gBAAgBF,QAASA,CAAAA,QAAQC,eAAc;IACrD,MAAME,gBAAgB;IAEtB,MAAMC,gBAAgB;IACtB,MAAMC,cAAcL,QAASA,CAAAA,QAAQI,aAAY;IACjD,MAAME,cAAc,CAAC,iCAAiC,CAAC;IAEvD,MAAMC,sBAAsB;IAE5B,OAAO;QACLC,OAAO;YACL;gBACEC,WAAW;oBAAC;wBAAEC,SAAS;oBAAE;oBAAG;wBAAEA,SAAS;wBAAGC,QAAQT;oBAAc;oBAAG;wBAAEQ,SAAS;oBAAE;iBAAE;gBAClFE,QAAQT;gBACRU,UAAUZ,kBAAkBD;YAC9B;YACA;gBACES,WAAW;oBACT;wBAAEK,WAAW;oBAAa;oBAC1B;wBAAEA,WAAW;wBAAcH,QAAQN;oBAAY;oBAC/C;wBAAES,WAAW;oBAAW;iBACzB;gBACDF,QAAQN;gBACRO,UAAUT,gBAAgBJ;YAC5B;SACD;QACDe,MAAM;YACJN,WAAW;gBAAC;oBAAEC,SAAS;gBAAE;gBAAG;oBAAEA,SAAS;gBAAE;gBAAG;oBAAEA,SAAS;gBAAE;aAAE;YAC3DE,QAAQT;YACRU,UAAUN;QACZ;IACF;AACF,GAAG"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { getIntrinsicElementProps, slot, useId } from '@fluentui/react-components';
|
|
1
|
+
import { getIntrinsicElementProps, slot, useFocusableGroup, useId } from '@fluentui/react-components';
|
|
2
|
+
import { usePromptStarterListContext } from '../../../contexts/PromptStarterListContext';
|
|
2
3
|
/**
|
|
3
4
|
* Create the state required to render PromptStarter.
|
|
4
5
|
*
|
|
@@ -10,7 +11,10 @@ import { getIntrinsicElementProps, slot, useId } from '@fluentui/react-component
|
|
|
10
11
|
*/
|
|
11
12
|
export const usePromptStarter_unstable = (props, ref) => {
|
|
12
13
|
const id = useId('prompt-starter');
|
|
14
|
+
const focusAttrs = useFocusableGroup();
|
|
15
|
+
const numberOfColumns = usePromptStarterListContext(ctx => ctx.numberOfColumns);
|
|
13
16
|
const state = {
|
|
17
|
+
isSingleColumn: numberOfColumns === 1,
|
|
14
18
|
components: {
|
|
15
19
|
root: 'div',
|
|
16
20
|
primaryAction: 'button',
|
|
@@ -23,6 +27,7 @@ export const usePromptStarter_unstable = (props, ref) => {
|
|
|
23
27
|
ref,
|
|
24
28
|
'aria-labelledby': `${id}-prompt`,
|
|
25
29
|
'aria-describedby': `${id}-icon, ${id}-reasonMarker`,
|
|
30
|
+
...focusAttrs,
|
|
26
31
|
...props
|
|
27
32
|
}), {
|
|
28
33
|
elementType: 'div'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["usePromptStarter.ts"],"sourcesContent":["import { getIntrinsicElementProps, slot, useId } from '@fluentui/react-components';\nimport type { PromptStarterProps, PromptStarterState } from './PromptStarter.types';\n\n/**\n * Create the state required to render PromptStarter.\n *\n * The returned state can be modified with hooks such as usePromptStarterStyles_unstable,\n * before being passed to renderPromptStarter_unstable.\n *\n * @param props - props from this instance of PromptStarter\n * @param ref - reference to root HTMLElement of PromptStarter\n */\nexport const usePromptStarter_unstable = (\n props: PromptStarterProps,\n ref: React.Ref<HTMLDivElement>,\n): PromptStarterState => {\n const id = useId('prompt-starter');\n\n const state: PromptStarterState = {\n components: {\n root: 'div',\n primaryAction: 'button',\n icon: 'span',\n prompt: 'span',\n reasonMarker: 'span',\n actions: 'span',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n 'aria-labelledby': `${id}-prompt`,\n 'aria-describedby': `${id}-icon, ${id}-reasonMarker`,\n ...props,\n }),\n { elementType: 'div' },\n ),\n primaryAction: slot.always(props.primaryAction, {\n elementType: 'button',\n }),\n icon: slot.always(props.icon, {\n defaultProps: { id: `${id}-icon` },\n elementType: 'span',\n }),\n prompt: slot.always(props.prompt, {\n defaultProps: { id: `${id}-prompt` },\n elementType: 'span',\n }),\n reasonMarker: slot.optional(props.reasonMarker, {\n defaultProps: { id: `${id}-reasonMarker` },\n elementType: 'span',\n }),\n actions: slot.optional(props.actions, { elementType: 'span' }),\n };\n\n return state;\n};\n"],"names":["getIntrinsicElementProps","slot","useId","usePromptStarter_unstable","props","ref","id","state","components","root","primaryAction","icon","prompt","reasonMarker","actions","always","elementType","defaultProps","optional"],"rangeMappings":"
|
|
1
|
+
{"version":3,"sources":["usePromptStarter.ts"],"sourcesContent":["import { getIntrinsicElementProps, slot, useFocusableGroup, useId } from '@fluentui/react-components';\nimport { usePromptStarterListContext } from '../../../contexts/PromptStarterListContext';\nimport type { PromptStarterProps, PromptStarterState } from './PromptStarter.types';\n\n/**\n * Create the state required to render PromptStarter.\n *\n * The returned state can be modified with hooks such as usePromptStarterStyles_unstable,\n * before being passed to renderPromptStarter_unstable.\n *\n * @param props - props from this instance of PromptStarter\n * @param ref - reference to root HTMLElement of PromptStarter\n */\nexport const usePromptStarter_unstable = (\n props: PromptStarterProps,\n ref: React.Ref<HTMLDivElement>,\n): PromptStarterState => {\n const id = useId('prompt-starter');\n const focusAttrs = useFocusableGroup();\n\n const numberOfColumns = usePromptStarterListContext(ctx => ctx.numberOfColumns);\n\n const state: PromptStarterState = {\n isSingleColumn: numberOfColumns === 1,\n components: {\n root: 'div',\n primaryAction: 'button',\n icon: 'span',\n prompt: 'span',\n reasonMarker: 'span',\n actions: 'span',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n 'aria-labelledby': `${id}-prompt`,\n 'aria-describedby': `${id}-icon, ${id}-reasonMarker`,\n ...focusAttrs,\n ...props,\n }),\n { elementType: 'div' },\n ),\n primaryAction: slot.always(props.primaryAction, {\n elementType: 'button',\n }),\n icon: slot.always(props.icon, {\n defaultProps: { id: `${id}-icon` },\n elementType: 'span',\n }),\n prompt: slot.always(props.prompt, {\n defaultProps: { id: `${id}-prompt` },\n elementType: 'span',\n }),\n reasonMarker: slot.optional(props.reasonMarker, {\n defaultProps: { id: `${id}-reasonMarker` },\n elementType: 'span',\n }),\n actions: slot.optional(props.actions, { elementType: 'span' }),\n };\n\n return state;\n};\n"],"names":["getIntrinsicElementProps","slot","useFocusableGroup","useId","usePromptStarterListContext","usePromptStarter_unstable","props","ref","id","focusAttrs","numberOfColumns","ctx","state","isSingleColumn","components","root","primaryAction","icon","prompt","reasonMarker","actions","always","elementType","defaultProps","optional"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,wBAAwB,EAAEC,IAAI,EAAEC,iBAAiB,EAAEC,KAAK,QAAQ,6BAA6B;AACtG,SAASC,2BAA2B,QAAQ,6CAA6C;AAGzF;;;;;;;;CAQC,GACD,OAAO,MAAMC,4BAA4B,CACvCC,OACAC;IAEA,MAAMC,KAAKL,MAAM;IACjB,MAAMM,aAAaP;IAEnB,MAAMQ,kBAAkBN,4BAA4BO,CAAAA,MAAOA,IAAID,eAAe;IAE9E,MAAME,QAA4B;QAChCC,gBAAgBH,oBAAoB;QACpCI,YAAY;YACVC,MAAM;YACNC,eAAe;YACfC,MAAM;YACNC,QAAQ;YACRC,cAAc;YACdC,SAAS;QACX;QACAL,MAAMd,KAAKoB,MAAM,CACfrB,yBAAyB,OAAO;YAC9BO;YACA,mBAAmB,CAAC,EAAEC,GAAG,OAAO,CAAC;YACjC,oBAAoB,CAAC,EAAEA,GAAG,OAAO,EAAEA,GAAG,aAAa,CAAC;YACpD,GAAGC,UAAU;YACb,GAAGH,KAAK;QACV,IACA;YAAEgB,aAAa;QAAM;QAEvBN,eAAef,KAAKoB,MAAM,CAACf,MAAMU,aAAa,EAAE;YAC9CM,aAAa;QACf;QACAL,MAAMhB,KAAKoB,MAAM,CAACf,MAAMW,IAAI,EAAE;YAC5BM,cAAc;gBAAEf,IAAI,CAAC,EAAEA,GAAG,KAAK,CAAC;YAAC;YACjCc,aAAa;QACf;QACAJ,QAAQjB,KAAKoB,MAAM,CAACf,MAAMY,MAAM,EAAE;YAChCK,cAAc;gBAAEf,IAAI,CAAC,EAAEA,GAAG,OAAO,CAAC;YAAC;YACnCc,aAAa;QACf;QACAH,cAAclB,KAAKuB,QAAQ,CAAClB,MAAMa,YAAY,EAAE;YAC9CI,cAAc;gBAAEf,IAAI,CAAC,EAAEA,GAAG,aAAa,CAAC;YAAC;YACzCc,aAAa;QACf;QACAF,SAASnB,KAAKuB,QAAQ,CAAClB,MAAMc,OAAO,EAAE;YAAEE,aAAa;QAAO;IAC9D;IAEA,OAAOV;AACT,EAAE"}
|
|
@@ -103,8 +103,7 @@ const useStyles = __styles({
|
|
|
103
103
|
icon: {
|
|
104
104
|
mc9l5x: "f22iagw",
|
|
105
105
|
Bt984gj: "f122n59",
|
|
106
|
-
sshi5w: "fntfeoj"
|
|
107
|
-
B3oa8pd: "fyhwzhv"
|
|
106
|
+
sshi5w: "fntfeoj"
|
|
108
107
|
},
|
|
109
108
|
actions: {
|
|
110
109
|
jrapky: 0,
|
|
@@ -125,8 +124,7 @@ const useStyles = __styles({
|
|
|
125
124
|
B3o57yi: 0,
|
|
126
125
|
Bmy1vo4: 0,
|
|
127
126
|
Bkqvd7p: 0,
|
|
128
|
-
Bi2q7bf: "f1964ud6"
|
|
129
|
-
B3oa8pd: "fyhwzhv"
|
|
127
|
+
Bi2q7bf: "f1964ud6"
|
|
130
128
|
},
|
|
131
129
|
prompt: {
|
|
132
130
|
Bahqtrf: "fk6fouc",
|
|
@@ -142,8 +140,10 @@ const useStyles = __styles({
|
|
|
142
140
|
Bahqtrf: "fk6fouc",
|
|
143
141
|
Be2twd7: "f13mqy1h",
|
|
144
142
|
Bhrd7zp: "figsok6",
|
|
145
|
-
Bg96gwp: "fcpl73t"
|
|
146
|
-
|
|
143
|
+
Bg96gwp: "fcpl73t"
|
|
144
|
+
},
|
|
145
|
+
singleColumnStyles: {
|
|
146
|
+
mc9l5x: "fjseox"
|
|
147
147
|
}
|
|
148
148
|
}, {
|
|
149
149
|
d: [[".fcdwmbt{grid-row:1/3;}", {
|
|
@@ -170,7 +170,7 @@ const useStyles = __styles({
|
|
|
170
170
|
p: -1
|
|
171
171
|
}], ".f5p0z4x{opacity:1;}", [".f1964ud6{transition:opacity var(--durationFast) var(--curveLinear);}", {
|
|
172
172
|
p: -1
|
|
173
|
-
}], ".fkhj508{font-size:var(--fontSizeBase300);}", ".fl43uef{font-weight:var(--fontWeightSemibold);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}", ".f1rvi9lw{display:-webkit-box;}", ".fpfc2by{-webkit-box-orient:vertical;}", ".f1lvsx7g{-webkit-line-clamp:2;}", ".f1sil6mw{overflow-y:hidden;}", ".f13mqy1h{font-size:var(--fontSizeBase100);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".fcpl73t{line-height:var(--lineHeightBase100);}"],
|
|
173
|
+
}], ".fkhj508{font-size:var(--fontSizeBase300);}", ".fl43uef{font-weight:var(--fontWeightSemibold);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}", ".f1rvi9lw{display:-webkit-box;}", ".fpfc2by{-webkit-box-orient:vertical;}", ".f1lvsx7g{-webkit-line-clamp:2;}", ".f1sil6mw{overflow-y:hidden;}", ".f13mqy1h{font-size:var(--fontSizeBase100);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".fcpl73t{line-height:var(--lineHeightBase100);}", ".fjseox{display:none;}"],
|
|
174
174
|
f: [".ftqa4ok:focus{outline-style:none;}"],
|
|
175
175
|
i: [".f2hkw1w:focus-visible{outline-style:none;}"],
|
|
176
176
|
m: [["@media (forced-colors: active){.f1j6vpng[data-fui-focus-visible]::after{border-top-color:Highlight;}}", {
|
|
@@ -179,24 +179,25 @@ const useStyles = __styles({
|
|
|
179
179
|
m: "(forced-colors: active)"
|
|
180
180
|
}], ["@media (forced-colors: active){.f987i1v[data-fui-focus-visible]::after{border-bottom-color:Highlight;}}", {
|
|
181
181
|
m: "(forced-colors: active)"
|
|
182
|
-
}], ["@media (max-width: 450px){.fyhwzhv{display:none;}}", {
|
|
183
|
-
m: "(max-width: 450px)"
|
|
184
182
|
}]]
|
|
185
183
|
});
|
|
186
184
|
export const usePromptStarterStyles_unstable = state => {
|
|
187
185
|
'use no memo';
|
|
188
186
|
|
|
187
|
+
const {
|
|
188
|
+
isSingleColumn
|
|
189
|
+
} = state;
|
|
189
190
|
const styles = useStyles();
|
|
190
191
|
const rootResetStyles = useRootResetStyles();
|
|
191
192
|
state.root.className = mergeClasses(promptStarterClassNames.root, rootResetStyles, state.root.className);
|
|
192
193
|
state.primaryAction.className = mergeClasses(promptStarterClassNames.primaryAction, styles.primaryAction, state.primaryAction.className);
|
|
193
|
-
state.icon.className = mergeClasses(promptStarterClassNames.icon, styles.icon, state.icon.className);
|
|
194
|
+
state.icon.className = mergeClasses(promptStarterClassNames.icon, styles.icon, isSingleColumn && styles.singleColumnStyles, state.icon.className);
|
|
194
195
|
state.prompt.className = mergeClasses(promptStarterClassNames.prompt, styles.prompt, state.prompt.className);
|
|
195
196
|
if (state.reasonMarker) {
|
|
196
|
-
state.reasonMarker.className = mergeClasses(promptStarterClassNames.reasonMarker, styles.reasonMarker, state.reasonMarker.className);
|
|
197
|
+
state.reasonMarker.className = mergeClasses(promptStarterClassNames.reasonMarker, styles.reasonMarker, isSingleColumn && styles.singleColumnStyles, state.reasonMarker.className);
|
|
197
198
|
}
|
|
198
199
|
if (state.actions) {
|
|
199
|
-
state.actions.className = mergeClasses(promptStarterClassNames.actions, styles.actions, state.actions.className);
|
|
200
|
+
state.actions.className = mergeClasses(promptStarterClassNames.actions, styles.actions, isSingleColumn && styles.singleColumnStyles, state.actions.className);
|
|
200
201
|
}
|
|
201
202
|
return state;
|
|
202
203
|
};
|
|
@@ -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
|
|
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 // Hide icon, actions, and reason marker in single column appearance\n singleColumnStyles: {\n display: 'none',\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 state.root.className = mergeClasses(promptStarterClassNames.root, rootResetStyles, state.root.className);\n state.primaryAction.className = mergeClasses(\n promptStarterClassNames.primaryAction,\n styles.primaryAction,\n state.primaryAction.className,\n );\n state.icon.className = mergeClasses(\n promptStarterClassNames.icon,\n styles.icon,\n isSingleColumn && styles.singleColumnStyles,\n state.icon.className,\n );\n state.prompt.className = mergeClasses(promptStarterClassNames.prompt, styles.prompt, state.prompt.className);\n if (state.reasonMarker) {\n state.reasonMarker.className = mergeClasses(\n promptStarterClassNames.reasonMarker,\n styles.reasonMarker,\n isSingleColumn && styles.singleColumnStyles,\n state.reasonMarker.className,\n );\n }\n if (state.actions) {\n state.actions.className = mergeClasses(\n promptStarterClassNames.actions,\n styles.actions,\n isSingleColumn && styles.singleColumnStyles,\n state.actions.className,\n );\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","singleColumnStyles","usePromptStarterStyles_unstable","state","isSingleColumn","styles","rootResetStyles","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"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"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { usePromptStarterList_unstable } from './usePromptStarterList';
|
|
3
|
+
import { renderPromptStarterList_unstable } from './renderPromptStarterList';
|
|
4
|
+
import { usePromptStarterListStyles_unstable } from './usePromptStarterListStyles.styles';
|
|
5
|
+
import { usePromptStarterListContextValues } from './usePromptStarterListContextValues';
|
|
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
|
+
});
|
|
12
|
+
PromptStarterList.displayName = 'PromptStarterList';
|
|
13
|
+
//# sourceMappingURL=PromptStarterList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["PromptStarterList.tsx"],"sourcesContent":["import * as React from 'react';\nimport { usePromptStarterList_unstable } from './usePromptStarterList';\nimport { renderPromptStarterList_unstable } from './renderPromptStarterList';\nimport { usePromptStarterListStyles_unstable } from './usePromptStarterListStyles.styles';\nimport type { PromptStarterListProps } from './PromptStarterList.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { usePromptStarterListContextValues } from './usePromptStarterListContextValues';\n\nexport const PromptStarterList: ForwardRefComponent<PromptStarterListProps> = React.forwardRef((props, ref) => {\n const state = usePromptStarterList_unstable(props, ref);\n const contextValues = usePromptStarterListContextValues(state);\n\n usePromptStarterListStyles_unstable(state);\n return renderPromptStarterList_unstable(state, contextValues);\n});\n\nPromptStarterList.displayName = 'PromptStarterList';\n"],"names":["React","usePromptStarterList_unstable","renderPromptStarterList_unstable","usePromptStarterListStyles_unstable","usePromptStarterListContextValues","PromptStarterList","forwardRef","props","ref","state","contextValues","displayName"],"rangeMappings":";;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,6BAA6B,QAAQ,yBAAyB;AACvE,SAASC,gCAAgC,QAAQ,4BAA4B;AAC7E,SAASC,mCAAmC,QAAQ,sCAAsC;AAG1F,SAASC,iCAAiC,QAAQ,sCAAsC;AAExF,OAAO,MAAMC,kCAAiEL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACrG,MAAMC,QAAQR,8BAA8BM,OAAOC;IACnD,MAAME,gBAAgBN,kCAAkCK;IAExDN,oCAAoCM;IACpC,OAAOP,iCAAiCO,OAAOC;AACjD,GAAG;AAEHL,kBAAkBM,WAAW,GAAG"}
|
|
@@ -0,0 +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<PromptStarterListSlots> &\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":"AAkDA,WAA2G"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { PromptStarterList } from './PromptStarterList';
|
|
2
|
+
export { renderPromptStarterList_unstable } from './renderPromptStarterList';
|
|
3
|
+
export { usePromptStarterList_unstable } from './usePromptStarterList';
|
|
4
|
+
export { promptStarterListClassNames, usePromptStarterListStyles_unstable } from './usePromptStarterListStyles.styles';
|
|
5
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export { PromptStarterList } from './PromptStarterList';\nexport type {\n PromptStarterListProps,\n PromptStarterListSlots,\n PromptStarterListState,\n PromptStarterListContextValue,\n} from './PromptStarterList.types';\nexport { renderPromptStarterList_unstable } from './renderPromptStarterList';\nexport { usePromptStarterList_unstable } from './usePromptStarterList';\nexport { promptStarterListClassNames, usePromptStarterListStyles_unstable } from './usePromptStarterListStyles.styles';\n"],"names":["PromptStarterList","renderPromptStarterList_unstable","usePromptStarterList_unstable","promptStarterListClassNames","usePromptStarterListStyles_unstable"],"rangeMappings":";;;","mappings":"AAAA,SAASA,iBAAiB,QAAQ,sBAAsB;AAOxD,SAASC,gCAAgC,QAAQ,4BAA4B;AAC7E,SAASC,6BAA6B,QAAQ,yBAAyB;AACvE,SAASC,2BAA2B,EAAEC,mCAAmC,QAAQ,sCAAsC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
|
|
2
|
+
import { assertSlots, PresenceGroup } from '@fluentui/react-components';
|
|
3
|
+
import { PromptStarterListProvider } from '../../../contexts/PromptStarterListContext';
|
|
4
|
+
/**
|
|
5
|
+
* Render the final JSX of PromptStarterList
|
|
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
|
|
15
|
+
})
|
|
16
|
+
}), state.expandButton && /*#__PURE__*/_jsx(state.expandButton, {})]
|
|
17
|
+
})
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=renderPromptStarterList.js.map
|
|
@@ -0,0 +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":";;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,EAAEC,aAAa,QAAQ,6BAA6B;AACxE,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,YAAY,kBAAI,KAACN,MAAMM,YAAY;;;;AAIlD,EAAE"}
|