@fluentui-copilot/react-prompt-starter 0.10.2 → 0.10.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/CHANGELOG.json +16 -1
  2. package/CHANGELOG.md +11 -2
  3. package/lib/PromptStarter.js +0 -1
  4. package/lib/PromptStarterList.js +0 -1
  5. package/lib/PromptStarterV2.js +0 -1
  6. package/lib/components/PromptStarter/PromptStarter.js +5 -6
  7. package/lib/components/PromptStarter/PromptStarter.types.js +1 -2
  8. package/lib/components/PromptStarter/index.js +0 -1
  9. package/lib/components/PromptStarter/renderPromptStarter.js +16 -9
  10. package/lib/components/PromptStarter/usePromptStarter.js +42 -44
  11. package/lib/components/PromptStarter/usePromptStarterStyles.styles.raw.js +94 -0
  12. package/lib/components/PromptStarter/usePromptStarterStyles.styles.raw.js.map +1 -0
  13. package/lib/components/PromptStarterV2/PromptStarter/PromptStarter.js +5 -6
  14. package/lib/components/PromptStarterV2/PromptStarter/PromptStarter.types.js +1 -2
  15. package/lib/components/PromptStarterV2/PromptStarter/index.js +0 -1
  16. package/lib/components/PromptStarterV2/PromptStarter/promptStarterMotion.js +61 -50
  17. package/lib/components/PromptStarterV2/PromptStarter/renderPromptStarter.js +15 -9
  18. package/lib/components/PromptStarterV2/PromptStarter/usePromptStarter.js +49 -51
  19. package/lib/components/PromptStarterV2/PromptStarter/usePromptStarterStyles.styles.raw.js +119 -0
  20. package/lib/components/PromptStarterV2/PromptStarter/usePromptStarterStyles.styles.raw.js.map +1 -0
  21. package/lib/components/PromptStarterV2/PromptStarterList/PromptStarterList.js +5 -6
  22. package/lib/components/PromptStarterV2/PromptStarterList/PromptStarterList.types.js +1 -2
  23. package/lib/components/PromptStarterV2/PromptStarterList/index.js +0 -1
  24. package/lib/components/PromptStarterV2/PromptStarterList/renderPromptStarterList.js +15 -14
  25. package/lib/components/PromptStarterV2/PromptStarterList/usePromptStarterList.js +97 -97
  26. package/lib/components/PromptStarterV2/PromptStarterList/usePromptStarterListContextValues.js +4 -7
  27. package/lib/components/PromptStarterV2/PromptStarterList/usePromptStarterListStyles.styles.raw.js +61 -0
  28. package/lib/components/PromptStarterV2/PromptStarterList/usePromptStarterListStyles.styles.raw.js.map +1 -0
  29. package/lib/contexts/PromptStarterListContext.js +2 -3
  30. package/lib/index.js +0 -1
  31. package/lib-commonjs/PromptStarter.js +0 -1
  32. package/lib-commonjs/PromptStarterList.js +0 -1
  33. package/lib-commonjs/PromptStarterV2.js +0 -1
  34. package/lib-commonjs/components/PromptStarter/PromptStarter.js +1 -1
  35. package/lib-commonjs/components/PromptStarter/PromptStarter.js.map +1 -1
  36. package/lib-commonjs/components/PromptStarter/PromptStarter.types.js +0 -1
  37. package/lib-commonjs/components/PromptStarter/index.js +0 -1
  38. package/lib-commonjs/components/PromptStarter/renderPromptStarter.js +1 -1
  39. package/lib-commonjs/components/PromptStarter/renderPromptStarter.js.map +1 -1
  40. package/lib-commonjs/components/PromptStarter/usePromptStarter.js +1 -1
  41. package/lib-commonjs/components/PromptStarter/usePromptStarter.js.map +1 -1
  42. package/lib-commonjs/components/PromptStarter/usePromptStarterStyles.styles.raw.js +112 -0
  43. package/lib-commonjs/components/PromptStarter/usePromptStarterStyles.styles.raw.js.map +1 -0
  44. package/lib-commonjs/components/PromptStarterV2/PromptStarter/PromptStarter.js +1 -1
  45. package/lib-commonjs/components/PromptStarterV2/PromptStarter/PromptStarter.js.map +1 -1
  46. package/lib-commonjs/components/PromptStarterV2/PromptStarter/PromptStarter.types.js +0 -1
  47. package/lib-commonjs/components/PromptStarterV2/PromptStarter/index.js +0 -1
  48. package/lib-commonjs/components/PromptStarterV2/PromptStarter/promptStarterMotion.js +1 -1
  49. package/lib-commonjs/components/PromptStarterV2/PromptStarter/promptStarterMotion.js.map +1 -1
  50. package/lib-commonjs/components/PromptStarterV2/PromptStarter/renderPromptStarter.js +1 -1
  51. package/lib-commonjs/components/PromptStarterV2/PromptStarter/renderPromptStarter.js.map +1 -1
  52. package/lib-commonjs/components/PromptStarterV2/PromptStarter/usePromptStarter.js +1 -1
  53. package/lib-commonjs/components/PromptStarterV2/PromptStarter/usePromptStarter.js.map +1 -1
  54. package/lib-commonjs/components/PromptStarterV2/PromptStarter/usePromptStarterStyles.styles.raw.js +137 -0
  55. package/lib-commonjs/components/PromptStarterV2/PromptStarter/usePromptStarterStyles.styles.raw.js.map +1 -0
  56. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/PromptStarterList.js +1 -1
  57. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/PromptStarterList.js.map +1 -1
  58. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/PromptStarterList.types.js +0 -1
  59. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/index.js +0 -1
  60. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/renderPromptStarterList.js +1 -1
  61. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/renderPromptStarterList.js.map +1 -1
  62. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterList.js +1 -1
  63. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterList.js.map +1 -1
  64. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterListContextValues.js +1 -1
  65. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterListContextValues.js.map +1 -1
  66. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterListStyles.styles.raw.js +77 -0
  67. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterListStyles.styles.raw.js.map +1 -0
  68. package/lib-commonjs/contexts/PromptStarterListContext.js +1 -1
  69. package/lib-commonjs/contexts/PromptStarterListContext.js.map +1 -1
  70. package/lib-commonjs/index.js +0 -1
  71. package/package.json +3 -3
package/CHANGELOG.json CHANGED
@@ -2,7 +2,22 @@
2
2
  "name": "@fluentui-copilot/react-prompt-starter",
3
3
  "entries": [
4
4
  {
5
- "date": "Tue, 01 Jul 2025 14:43:47 GMT",
5
+ "date": "Thu, 17 Jul 2025 17:47:34 GMT",
6
+ "tag": "@fluentui-copilot/react-prompt-starter_v0.10.3",
7
+ "version": "0.10.3",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "hochelmartin@gmail.com",
12
+ "package": "@fluentui-copilot/react-prompt-starter",
13
+ "commit": "fef5160c07333e8d9996952a305b34e357604919",
14
+ "comment": "feat: enable griffel raw styles"
15
+ }
16
+ ]
17
+ }
18
+ },
19
+ {
20
+ "date": "Tue, 01 Jul 2025 14:45:29 GMT",
6
21
  "tag": "@fluentui-copilot/react-prompt-starter_v0.10.2",
7
22
  "version": "0.10.2",
8
23
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,21 @@
1
1
  # Change Log - @fluentui-copilot/react-prompt-starter
2
2
 
3
- This log was last generated on Tue, 01 Jul 2025 14:43:47 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 17 Jul 2025 17:47:34 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [0.10.3](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-prompt-starter_v0.10.3)
8
+
9
+ Thu, 17 Jul 2025 17:47:34 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-prompt-starter_v0.10.2..@fluentui-copilot/react-prompt-starter_v0.10.3)
11
+
12
+ ### Patches
13
+
14
+ - feat: enable griffel raw styles ([PR #3227](https://github.com/microsoft/fluentai/pull/3227) by hochelmartin@gmail.com)
15
+
7
16
  ## [0.10.2](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-prompt-starter_v0.10.2)
8
17
 
9
- Tue, 01 Jul 2025 14:43:47 GMT
18
+ Tue, 01 Jul 2025 14:45:29 GMT
10
19
  [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-prompt-starter_v0.10.1..@fluentui-copilot/react-prompt-starter_v0.10.2)
11
20
 
12
21
  ### Patches
@@ -1,2 +1 @@
1
1
  export { PromptStarter, promptStarterClassNames, renderPromptStarter_unstable, usePromptStarterStyles_unstable, usePromptStarter_unstable } from './components/PromptStarter/index';
2
- //# sourceMappingURL=PromptStarter.js.map
@@ -1,2 +1 @@
1
1
  export { PromptStarterList, renderPromptStarterList_unstable, usePromptStarterList_unstable, promptStarterListClassNames, usePromptStarterListStyles_unstable } from './components/PromptStarterV2/PromptStarterList/index';
2
- //# sourceMappingURL=PromptStarterList.js.map
@@ -1,2 +1 @@
1
1
  export { PromptStarter, promptStarterClassNames, renderPromptStarter_unstable, usePromptStarterStyles_unstable, usePromptStarter_unstable } from './components/PromptStarterV2/PromptStarter/index';
2
- //# sourceMappingURL=PromptStarterV2.js.map
@@ -3,11 +3,10 @@ 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__*/React.forwardRef((props, ref) => {
7
- const state = usePromptStarter_unstable(props, ref);
8
- usePromptStarterStyles_unstable(state);
9
- useCustomStyleHook('usePromptStarterStyles')(state);
10
- return renderPromptStarter_unstable(state);
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
@@ -1,4 +1,3 @@
1
1
  /**
2
2
  * State used in rendering PromptStarter
3
- */export {};
4
- //# sourceMappingURL=PromptStarter.types.js.map
3
+ */ export { };
@@ -2,4 +2,3 @@ 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,11 +1,18 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
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 = 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
- });
3
+ export const renderPromptStarter_unstable = (state)=>{
4
+ assertSlots(state);
5
+ return /*#__PURE__*/ _jsxs(state.root, {
6
+ children: [
7
+ /*#__PURE__*/ _jsx(state.icon, {}),
8
+ /*#__PURE__*/ _jsxs(state.category, {
9
+ children: [
10
+ state.category.children,
11
+ " ",
12
+ state.badge && /*#__PURE__*/ _jsx(state.badge, {})
13
+ ]
14
+ }),
15
+ state.prompt && /*#__PURE__*/ _jsx(state.prompt, {})
16
+ ]
17
+ });
10
18
  };
11
- //# sourceMappingURL=renderPromptStarter.js.map
@@ -8,48 +8,46 @@ 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
- 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
- };
11
+ */ export const usePromptStarter_unstable = (props, ref)=>{
12
+ const designVersion = useDesignVersion(props.designVersion);
13
+ const idPrefix = useId('prompt-starter');
14
+ return {
15
+ components: {
16
+ root: 'button',
17
+ icon: 'span',
18
+ category: 'span',
19
+ prompt: 'span',
20
+ badge: Badge
21
+ },
22
+ root: slot.always(getIntrinsicElementProps('button', {
23
+ ref,
24
+ 'aria-labelledby': `${idPrefix}-category`,
25
+ 'aria-describedby': `${idPrefix}-prompt`,
26
+ ...props
27
+ }), {
28
+ elementType: 'button'
29
+ }),
30
+ icon: slot.always(props.icon, {
31
+ elementType: 'span'
32
+ }),
33
+ category: slot.always(props.category, {
34
+ defaultProps: {
35
+ id: `${idPrefix}-category`
36
+ },
37
+ elementType: 'span'
38
+ }),
39
+ prompt: slot.optional(props.prompt, {
40
+ defaultProps: {
41
+ id: `${idPrefix}-prompt`
42
+ },
43
+ elementType: 'span'
44
+ }),
45
+ badge: slot.optional(props.badge, {
46
+ defaultProps: {
47
+ appearance: 'tint'
48
+ },
49
+ elementType: Badge
50
+ }),
51
+ designVersion
52
+ };
54
53
  };
55
- //# sourceMappingURL=usePromptStarter.js.map
@@ -0,0 +1,94 @@
1
+ import { makeStyles, makeResetStyles, mergeClasses, shorthands, typographyStyles, createFocusOutlineStyle } from '@fluentui/react-components';
2
+ import { tokens } from '@fluentui-copilot/tokens';
3
+ export const promptStarterClassNames = {
4
+ root: 'fai-PromptStarter',
5
+ category: 'fai-PromptStarter__category',
6
+ icon: 'fai-PromptStarter__icon',
7
+ prompt: 'fai-PromptStarter__prompt',
8
+ badge: 'fai-PromptStarter__badge'
9
+ };
10
+ const useRootResetStyles = makeResetStyles({
11
+ position: 'relative',
12
+ display: 'grid',
13
+ gridTemplateColumns: 'auto 1fr',
14
+ gridTemplateRows: 'auto auto',
15
+ gridTemplateAreas: `
16
+ "icon category"
17
+ ". prompt"
18
+ `,
19
+ backgroundColor: tokens.colorNeutralBackground1,
20
+ color: tokens.colorNeutralForeground1,
21
+ fontFamily: tokens.fontFamilyBase,
22
+ cursor: 'pointer',
23
+ outlineStyle: 'none',
24
+ textAlign: 'left',
25
+ gap: '0px 8px',
26
+ padding: '6px 8px 8px 8px',
27
+ ...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStroke1),
28
+ borderRadius: tokens.borderRadiusMedium,
29
+ '&:hover': {
30
+ backgroundColor: tokens.colorNeutralBackground1Hover,
31
+ ...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStroke1Hover)
32
+ },
33
+ '&:active': {
34
+ backgroundColor: tokens.colorNeutralBackground1Pressed,
35
+ ...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStroke1Pressed)
36
+ },
37
+ ...createFocusOutlineStyle()
38
+ });
39
+ const useStyles = makeStyles({
40
+ disabled: {
41
+ cursor: 'not-allowed',
42
+ backgroundColor: tokens.colorNeutralBackgroundDisabled,
43
+ ...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStrokeDisabled),
44
+ '&:hover': {
45
+ backgroundColor: tokens.colorNeutralBackgroundDisabled,
46
+ ...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStrokeDisabled)
47
+ },
48
+ '&:active': {
49
+ backgroundColor: tokens.colorNeutralBackgroundDisabled,
50
+ ...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStrokeDisabled)
51
+ }
52
+ },
53
+ icon: {
54
+ gridArea: 'icon',
55
+ display: 'flex',
56
+ alignSelf: 'center'
57
+ },
58
+ category: {
59
+ ...typographyStyles.body1Strong,
60
+ gridArea: 'category'
61
+ },
62
+ prompt: {
63
+ ...typographyStyles.body1,
64
+ gridArea: 'prompt'
65
+ },
66
+ disabledText: {
67
+ color: tokens.colorNeutralForegroundDisabled
68
+ },
69
+ disabledBadge: {
70
+ opacity: '40%'
71
+ }
72
+ });
73
+ const useNextStyles = makeStyles({
74
+ root: {
75
+ borderRadius: tokens.borderRadiusXLarge
76
+ }
77
+ });
78
+ export const usePromptStarterStyles_unstable = (state)=>{
79
+ 'use no memo';
80
+ const { designVersion } = state;
81
+ const styles = useStyles();
82
+ const nextStyles = useNextStyles();
83
+ const rootResetStyles = useRootResetStyles();
84
+ state.root.className = mergeClasses(promptStarterClassNames.root, rootResetStyles, designVersion === 'next' && nextStyles.root, state.root.disabled && styles.disabled, state.root.className);
85
+ state.icon.className = mergeClasses(promptStarterClassNames.icon, styles.icon, state.root.disabled && styles.disabledText, state.icon.className);
86
+ state.category.className = mergeClasses(promptStarterClassNames.category, styles.category, state.category.className, state.root.disabled && styles.disabledText);
87
+ if (state.prompt) {
88
+ state.prompt.className = mergeClasses(promptStarterClassNames.prompt, styles.prompt, state.root.disabled && styles.disabledText, state.prompt.className);
89
+ }
90
+ if (state.badge) {
91
+ state.badge.className = mergeClasses(promptStarterClassNames.badge, state.root.disabled && styles.disabledBadge, state.badge.className);
92
+ }
93
+ return state;
94
+ };
@@ -0,0 +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 category: 'fai-PromptStarter__category',\n icon: 'fai-PromptStarter__icon',\n prompt: 'fai-PromptStarter__prompt',\n badge: 'fai-PromptStarter__badge',\n};\n\nconst useRootResetStyles = makeResetStyles({\n position: 'relative',\n display: 'grid',\n gridTemplateColumns: 'auto 1fr',\n gridTemplateRows: 'auto auto',\n gridTemplateAreas: `\n \"icon category\"\n \". prompt\"\n `,\n backgroundColor: tokens.colorNeutralBackground1,\n color: tokens.colorNeutralForeground1,\n fontFamily: tokens.fontFamilyBase,\n cursor: 'pointer',\n outlineStyle: 'none',\n textAlign: 'left',\n gap: '0px 8px',\n padding: '6px 8px 8px 8px',\n ...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStroke1),\n borderRadius: tokens.borderRadiusMedium,\n '&:hover': {\n backgroundColor: tokens.colorNeutralBackground1Hover,\n ...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStroke1Hover),\n },\n '&:active': {\n backgroundColor: tokens.colorNeutralBackground1Pressed,\n ...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStroke1Pressed),\n },\n ...createFocusOutlineStyle(),\n});\n\nconst useStyles = makeStyles({\n disabled: {\n cursor: 'not-allowed',\n backgroundColor: tokens.colorNeutralBackgroundDisabled,\n ...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStrokeDisabled),\n '&:hover': {\n backgroundColor: tokens.colorNeutralBackgroundDisabled,\n ...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStrokeDisabled),\n },\n '&:active': {\n backgroundColor: tokens.colorNeutralBackgroundDisabled,\n ...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStrokeDisabled),\n },\n },\n icon: { gridArea: 'icon', display: 'flex', alignSelf: 'center' },\n\n category: {\n ...typographyStyles.body1Strong,\n gridArea: 'category',\n },\n prompt: { ...typographyStyles.body1, gridArea: 'prompt' },\n disabledText: {\n color: tokens.colorNeutralForegroundDisabled,\n },\n disabledBadge: {\n opacity: '40%',\n },\n});\n\nconst useNextStyles = makeStyles({ root: { borderRadius: tokens.borderRadiusXLarge } });\n\nexport const usePromptStarterStyles_unstable = (state: PromptStarterState): PromptStarterState => {\n 'use no memo';\n\n const { designVersion } = state;\n\n const styles = useStyles();\n const nextStyles = useNextStyles();\n const rootResetStyles = useRootResetStyles();\n state.root.className = mergeClasses(\n promptStarterClassNames.root,\n rootResetStyles,\n designVersion === 'next' && nextStyles.root,\n state.root.disabled && styles.disabled,\n state.root.className,\n );\n state.icon.className = mergeClasses(\n promptStarterClassNames.icon,\n styles.icon,\n state.root.disabled && styles.disabledText,\n state.icon.className,\n );\n state.category.className = mergeClasses(\n promptStarterClassNames.category,\n styles.category,\n state.category.className,\n state.root.disabled && styles.disabledText,\n );\n if (state.prompt) {\n state.prompt.className = mergeClasses(\n promptStarterClassNames.prompt,\n styles.prompt,\n state.root.disabled && styles.disabledText,\n state.prompt.className,\n );\n }\n if (state.badge) {\n state.badge.className = mergeClasses(\n promptStarterClassNames.badge,\n state.root.disabled && styles.disabledBadge,\n state.badge.className,\n );\n }\n\n return state;\n};\n"],"names":["makeStyles","makeResetStyles","mergeClasses","shorthands","typographyStyles","createFocusOutlineStyle","tokens","promptStarterClassNames","root","category","icon","prompt","badge","useRootResetStyles","position","display","gridTemplateColumns","gridTemplateRows","gridTemplateAreas","backgroundColor","colorNeutralBackground1","color","colorNeutralForeground1","fontFamily","fontFamilyBase","cursor","outlineStyle","textAlign","gap","padding","border","strokeWidthThin","colorNeutralStroke1","borderRadius","borderRadiusMedium","colorNeutralBackground1Hover","colorNeutralStroke1Hover","colorNeutralBackground1Pressed","colorNeutralStroke1Pressed","useStyles","disabled","colorNeutralBackgroundDisabled","colorNeutralStrokeDisabled","gridArea","alignSelf","body1Strong","body1","disabledText","colorNeutralForegroundDisabled","disabledBadge","opacity","useNextStyles","borderRadiusXLarge","usePromptStarterStyles_unstable","state","designVersion","styles","nextStyles","rootResetStyles","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"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"}
@@ -3,11 +3,10 @@ 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__*/React.forwardRef((props, ref) => {
7
- const state = usePromptStarter_unstable(props, ref);
8
- usePromptStarterStyles_unstable(state);
9
- useCustomStyleHook('usePromptStarterStyles')(state);
10
- return renderPromptStarter_unstable(state);
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
@@ -1,4 +1,3 @@
1
1
  /**
2
2
  * State used in rendering PromptStarter
3
- */export {};
4
- //# sourceMappingURL=PromptStarter.types.js.map
3
+ */ export { };
@@ -2,4 +2,3 @@ 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,52 +1,63 @@
1
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
- };
2
+ export const PromptStarterMotion = createPresenceComponent(({ index, numberOfColumns })=>{
3
+ const isFirstRow = index < numberOfColumns;
4
+ const delay = isFirstRow ? index * 50 : (index - numberOfColumns) * 50;
5
+ const opacityDuration = 100;
6
+ const opacityOffset = delay / (delay + opacityDuration);
7
+ const opacityEasing = 'linear';
8
+ const scaleDuration = 500;
9
+ const scaleOffset = delay / (delay + scaleDuration);
10
+ const scaleEasing = `cubic-bezier(0.22, 1.59, 0.46, 1)`;
11
+ const opacityExitDuration = 200;
12
+ return {
13
+ enter: [
14
+ {
15
+ keyframes: [
16
+ {
17
+ opacity: 0
18
+ },
19
+ {
20
+ opacity: 0,
21
+ offset: opacityOffset
22
+ },
23
+ {
24
+ opacity: 1
25
+ }
26
+ ],
27
+ easing: opacityEasing,
28
+ duration: opacityDuration + delay
29
+ },
30
+ {
31
+ keyframes: [
32
+ {
33
+ transform: 'scale(0.9)'
34
+ },
35
+ {
36
+ transform: 'scale(0.9)',
37
+ offset: scaleOffset
38
+ },
39
+ {
40
+ transform: 'scale(1)'
41
+ }
42
+ ],
43
+ easing: scaleEasing,
44
+ duration: scaleDuration + delay
45
+ }
46
+ ],
47
+ exit: {
48
+ keyframes: [
49
+ {
50
+ opacity: 1
51
+ },
52
+ {
53
+ opacity: 1
54
+ },
55
+ {
56
+ opacity: 0
57
+ }
58
+ ],
59
+ easing: opacityEasing,
60
+ duration: opacityExitDuration
61
+ }
62
+ };
51
63
  });
52
- //# sourceMappingURL=promptStarterMotion.js.map
@@ -1,11 +1,17 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
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 = 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
- });
3
+ export const renderPromptStarter_unstable = (state)=>{
4
+ assertSlots(state);
5
+ return /*#__PURE__*/ _jsxs(state.root, {
6
+ children: [
7
+ /*#__PURE__*/ _jsxs(state.primaryAction, {
8
+ children: [
9
+ /*#__PURE__*/ _jsx(state.icon, {}),
10
+ /*#__PURE__*/ _jsx(state.prompt, {}),
11
+ state.reasonMarker && /*#__PURE__*/ _jsx(state.reasonMarker, {})
12
+ ]
13
+ }),
14
+ state.actions && /*#__PURE__*/ _jsx(state.actions, {})
15
+ ]
16
+ });
10
17
  };
11
- //# sourceMappingURL=renderPromptStarter.js.map
@@ -8,55 +8,53 @@ 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
- 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;
11
+ */ export const usePromptStarter_unstable = (props, ref)=>{
12
+ const id = useId('prompt-starter');
13
+ const focusAttrs = useFocusableGroup();
14
+ const numberOfColumns = usePromptStarterListContext((ctx)=>ctx.numberOfColumns);
15
+ const state = {
16
+ isSingleColumn: numberOfColumns === 1,
17
+ components: {
18
+ root: 'div',
19
+ primaryAction: 'button',
20
+ icon: 'span',
21
+ prompt: 'span',
22
+ reasonMarker: 'span',
23
+ actions: 'span'
24
+ },
25
+ root: slot.always(getIntrinsicElementProps('div', {
26
+ ref,
27
+ 'aria-labelledby': `${id}-prompt`,
28
+ 'aria-describedby': `${id}-icon, ${id}-reasonMarker`,
29
+ ...focusAttrs,
30
+ ...props
31
+ }), {
32
+ elementType: 'div'
33
+ }),
34
+ primaryAction: slot.always(props.primaryAction, {
35
+ elementType: 'button'
36
+ }),
37
+ icon: slot.always(props.icon, {
38
+ defaultProps: {
39
+ id: `${id}-icon`
40
+ },
41
+ elementType: 'span'
42
+ }),
43
+ prompt: slot.always(props.prompt, {
44
+ defaultProps: {
45
+ id: `${id}-prompt`
46
+ },
47
+ elementType: 'span'
48
+ }),
49
+ reasonMarker: slot.optional(props.reasonMarker, {
50
+ defaultProps: {
51
+ id: `${id}-reasonMarker`
52
+ },
53
+ elementType: 'span'
54
+ }),
55
+ actions: slot.optional(props.actions, {
56
+ elementType: 'span'
57
+ })
58
+ };
59
+ return state;
61
60
  };
62
- //# sourceMappingURL=usePromptStarter.js.map