@fluentui-copilot/react-prompt-starter 0.10.6 → 0.10.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/CHANGELOG.json +81 -1
  2. package/CHANGELOG.md +27 -2
  3. package/dist/index.d.ts +58 -3
  4. package/lib/components/PromptStarter/PromptStarter.js +4 -1
  5. package/lib/components/PromptStarter/PromptStarter.js.map +1 -1
  6. package/lib/components/PromptStarter/PromptStarter.types.js +2 -0
  7. package/lib/components/PromptStarter/PromptStarter.types.js.map +1 -1
  8. package/lib/components/PromptStarter/renderPromptStarter.js +4 -1
  9. package/lib/components/PromptStarter/renderPromptStarter.js.map +1 -1
  10. package/lib/components/PromptStarter/usePromptStarter.js +3 -0
  11. package/lib/components/PromptStarter/usePromptStarter.js.map +1 -1
  12. package/lib/components/PromptStarter/usePromptStarterStyles.styles.js +4 -0
  13. package/lib/components/PromptStarter/usePromptStarterStyles.styles.js.map +1 -1
  14. package/lib/components/PromptStarter/usePromptStarterStyles.styles.raw.js +4 -1
  15. package/lib/components/PromptStarter/usePromptStarterStyles.styles.raw.js.map +1 -1
  16. package/lib/components/PromptStarterV2/PromptStarter/PromptStarter.types.js.map +1 -1
  17. package/lib/components/PromptStarterV2/PromptStarter/renderPromptStarter.js +1 -0
  18. package/lib/components/PromptStarterV2/PromptStarter/renderPromptStarter.js.map +1 -1
  19. package/lib/components/PromptStarterV2/PromptStarter/usePromptStarter.js +8 -1
  20. package/lib/components/PromptStarterV2/PromptStarter/usePromptStarter.js.map +1 -1
  21. package/lib/components/PromptStarterV2/PromptStarter/usePromptStarterStyles.styles.js +112 -23
  22. package/lib/components/PromptStarterV2/PromptStarter/usePromptStarterStyles.styles.js.map +1 -1
  23. package/lib/components/PromptStarterV2/PromptStarter/usePromptStarterStyles.styles.raw.js +62 -12
  24. package/lib/components/PromptStarterV2/PromptStarter/usePromptStarterStyles.styles.raw.js.map +1 -1
  25. package/lib/components/PromptStarterV2/PromptStarterList/PromptStarterList.types.js.map +1 -1
  26. package/lib/components/PromptStarterV2/PromptStarterList/renderPromptStarterList.js +1 -0
  27. package/lib/components/PromptStarterV2/PromptStarterList/renderPromptStarterList.js.map +1 -1
  28. package/lib/components/PromptStarterV2/PromptStarterList/usePromptStarterList.js +33 -10
  29. package/lib/components/PromptStarterV2/PromptStarterList/usePromptStarterList.js.map +1 -1
  30. package/lib/components/PromptStarterV2/PromptStarterList/usePromptStarterListStyles.styles.js +30 -4
  31. package/lib/components/PromptStarterV2/PromptStarterList/usePromptStarterListStyles.styles.js.map +1 -1
  32. package/lib/components/PromptStarterV2/PromptStarterList/usePromptStarterListStyles.styles.raw.js +16 -4
  33. package/lib/components/PromptStarterV2/PromptStarterList/usePromptStarterListStyles.styles.raw.js.map +1 -1
  34. package/lib/contexts/PromptStarterListContext.js.map +1 -1
  35. package/lib-commonjs/components/PromptStarter/PromptStarter.js.map +1 -1
  36. package/lib-commonjs/components/PromptStarter/PromptStarter.types.js +2 -0
  37. package/lib-commonjs/components/PromptStarter/PromptStarter.types.js.map +1 -1
  38. package/lib-commonjs/components/PromptStarter/renderPromptStarter.js.map +1 -1
  39. package/lib-commonjs/components/PromptStarter/usePromptStarter.js.map +1 -1
  40. package/lib-commonjs/components/PromptStarter/usePromptStarterStyles.styles.js.map +1 -1
  41. package/lib-commonjs/components/PromptStarter/usePromptStarterStyles.styles.raw.js.map +1 -1
  42. package/lib-commonjs/components/PromptStarterV2/PromptStarter/PromptStarter.types.js.map +1 -1
  43. package/lib-commonjs/components/PromptStarterV2/PromptStarter/renderPromptStarter.js +1 -0
  44. package/lib-commonjs/components/PromptStarterV2/PromptStarter/renderPromptStarter.js.map +1 -1
  45. package/lib-commonjs/components/PromptStarterV2/PromptStarter/usePromptStarter.js +8 -1
  46. package/lib-commonjs/components/PromptStarterV2/PromptStarter/usePromptStarter.js.map +1 -1
  47. package/lib-commonjs/components/PromptStarterV2/PromptStarter/usePromptStarterStyles.styles.js +170 -28
  48. package/lib-commonjs/components/PromptStarterV2/PromptStarter/usePromptStarterStyles.styles.js.map +1 -1
  49. package/lib-commonjs/components/PromptStarterV2/PromptStarter/usePromptStarterStyles.styles.raw.js +62 -12
  50. package/lib-commonjs/components/PromptStarterV2/PromptStarter/usePromptStarterStyles.styles.raw.js.map +1 -1
  51. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/PromptStarterList.types.js.map +1 -1
  52. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/renderPromptStarterList.js +1 -0
  53. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/renderPromptStarterList.js.map +1 -1
  54. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterList.js +33 -10
  55. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterList.js.map +1 -1
  56. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterListStyles.styles.js +41 -4
  57. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterListStyles.styles.js.map +1 -1
  58. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterListStyles.styles.raw.js +16 -4
  59. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterListStyles.styles.raw.js.map +1 -1
  60. package/lib-commonjs/contexts/PromptStarterListContext.js.map +1 -1
  61. package/package.json +12 -12
@@ -3,6 +3,7 @@ import { getIntrinsicElementProps, slot, Button, useArrowNavigationGroup, mergeC
3
3
  import { useDesignVersion } from '@fluentui-copilot/react-provider';
4
4
  import { ChevronDown12Regular } from '@fluentui/react-icons';
5
5
  import { PromptStarterMotion } from '../PromptStarter/promptStarterMotion';
6
+ import { useControllableState } from '@fluentui/react-utilities';
6
7
  /**
7
8
  * Create the state required to render PromptStarterList.
8
9
  *
@@ -12,15 +13,30 @@ import { PromptStarterMotion } from '../PromptStarter/promptStarterMotion';
12
13
  * @param props - props from this instance of PromptStarterList
13
14
  * @param ref - reference to root HTMLElement of PromptStarterList
14
15
  */ export const usePromptStarterList_unstable = (props, ref)=>{
15
- const { arrowNavigationOptions, expandButtonLabel = 'Show more', collapseButtonLabel = 'Show less' } = props;
16
+ const { arrowNavigationOptions, expandButtonLabel = 'Show more', collapseButtonLabel = 'Show less', onExpandedChange, animateOnMount = true, visibleRows = 1 } = props;
16
17
  const designVersion = useDesignVersion(props.designVersion);
17
18
  var _arrowNavigationOptions_axis, _arrowNavigationOptions_memorizeCurrent;
18
19
  const focusAttrs = useArrowNavigationGroup({
19
20
  ...arrowNavigationOptions,
20
- axis: (_arrowNavigationOptions_axis = arrowNavigationOptions === null || arrowNavigationOptions === void 0 ? void 0 : arrowNavigationOptions.axis) !== null && _arrowNavigationOptions_axis !== void 0 ? _arrowNavigationOptions_axis : 'grid-linear',
21
+ axis: (_arrowNavigationOptions_axis = arrowNavigationOptions === null || arrowNavigationOptions === void 0 ? void 0 : arrowNavigationOptions.axis) !== null && _arrowNavigationOptions_axis !== void 0 ? _arrowNavigationOptions_axis : 'both',
21
22
  memorizeCurrent: (_arrowNavigationOptions_memorizeCurrent = arrowNavigationOptions === null || arrowNavigationOptions === void 0 ? void 0 : arrowNavigationOptions.memorizeCurrent) !== null && _arrowNavigationOptions_memorizeCurrent !== void 0 ? _arrowNavigationOptions_memorizeCurrent : true
22
23
  });
23
- const [isExpanded, setIsExpanded] = React.useState(false);
24
+ const [isExpanded, setIsExpanded] = useControllableState({
25
+ state: props.isExpanded,
26
+ defaultState: props.defaultExpanded,
27
+ initialState: false
28
+ });
29
+ const toggleExpanded = React.useCallback((event)=>{
30
+ setIsExpanded((prevExpanded)=>{
31
+ onExpandedChange === null || onExpandedChange === void 0 ? void 0 : onExpandedChange(event, {
32
+ isExpanded: !prevExpanded
33
+ });
34
+ return !prevExpanded;
35
+ });
36
+ }, [
37
+ setIsExpanded,
38
+ onExpandedChange
39
+ ]);
24
40
  const [numberOfColumns, setNumberOfColumns] = React.useState(3);
25
41
  const gridWrapperRef = React.useRef(null);
26
42
  const { targetDocument } = useFluent();
@@ -42,11 +58,12 @@ import { PromptStarterMotion } from '../PromptStarter/promptStarterMotion';
42
58
  ]);
43
59
  const state = {
44
60
  numberOfColumns: numberOfColumns,
45
- isExpanded,
61
+ isExpanded: isExpanded,
46
62
  designVersion,
47
63
  components: {
48
64
  root: 'div',
49
65
  gridWrapper: 'div',
66
+ actions: 'span',
50
67
  expandButton: Button
51
68
  },
52
69
  root: slot.always(getIntrinsicElementProps('div', {
@@ -62,6 +79,9 @@ import { PromptStarterMotion } from '../PromptStarter/promptStarterMotion';
62
79
  },
63
80
  elementType: 'div'
64
81
  }),
82
+ actions: slot.optional(props.actions, {
83
+ elementType: 'span'
84
+ }),
65
85
  expandButton: slot.optional(props.expandButton, {
66
86
  defaultProps: {
67
87
  appearance: 'subtle',
@@ -89,12 +109,11 @@ import { PromptStarterMotion } from '../PromptStarter/promptStarterMotion';
89
109
  if (!/*#__PURE__*/ React.isValidElement(child) || child.type === React.Fragment) {
90
110
  throw new Error('You should only use PromptStarter components as the children of PromptStarterList.');
91
111
  }
92
- // In the collapsed state, if there is one column, we show three children.
93
- // If there are two or three columns, we show two or three. All children
94
- // are shown in the expanded state.
95
- const visibility = numberOfColumns === 1 && index < 3 || index < numberOfColumns || isExpanded;
112
+ // In the collapsed state, if there is one column, we show three children. If there are two or three columns,
113
+ // we show two or three (or four or six, if there are two visible rows). All children are shown in the isExpanded state.
114
+ const visibility = numberOfColumns === 1 && index < 3 || index < numberOfColumns * visibleRows || isExpanded;
96
115
  return /*#__PURE__*/ React.createElement(PromptStarterMotion, {
97
- appear: true,
116
+ appear: animateOnMount,
98
117
  key: index,
99
118
  index: index,
100
119
  visible: visibility,
@@ -106,8 +125,12 @@ import { PromptStarterMotion } from '../PromptStarter/promptStarterMotion';
106
125
  isExpanded
107
126
  ]);
108
127
  state.root.children = childrenWithMotion;
128
+ const numChildren = childrenArray.length;
129
+ if (numberOfColumns === 1 && numChildren <= 3 || numChildren <= numberOfColumns * visibleRows) {
130
+ state.expandButton = undefined;
131
+ }
109
132
  if (state.expandButton) {
110
- state.expandButton.onClick = mergeCallbacks(state.expandButton.onClick, ()=>setIsExpanded(!isExpanded));
133
+ state.expandButton.onClick = mergeCallbacks(state.expandButton.onClick, toggleExpanded);
111
134
  }
112
135
  return state;
113
136
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["usePromptStarterList.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n getIntrinsicElementProps,\n slot,\n Button,\n useArrowNavigationGroup,\n mergeCallbacks,\n useFluent,\n useMergedRefs,\n} from '@fluentui/react-components';\nimport type { PromptStarterListProps, PromptStarterListState } from './PromptStarterList.types';\nimport { useDesignVersion } from '@fluentui-copilot/react-provider';\nimport { ChevronDown12Regular } from '@fluentui/react-icons';\nimport { PromptStarterMotion } from '../PromptStarter/promptStarterMotion';\n\n/**\n * Create the state required to render PromptStarterList.\n *\n * The returned state can be modified with hooks such as usePromptStarterListStyles_unstable,\n * before being passed to renderPromptStarterList_unstable.\n *\n * @param props - props from this instance of PromptStarterList\n * @param ref - reference to root HTMLElement of PromptStarterList\n */\nexport const usePromptStarterList_unstable = (\n props: PromptStarterListProps,\n ref: React.Ref<HTMLDivElement>,\n): PromptStarterListState => {\n const { arrowNavigationOptions, expandButtonLabel = 'Show more', collapseButtonLabel = 'Show less' } = props;\n const designVersion = useDesignVersion(props.designVersion);\n const focusAttrs = useArrowNavigationGroup({\n ...arrowNavigationOptions,\n axis: arrowNavigationOptions?.axis ?? 'grid-linear',\n memorizeCurrent: arrowNavigationOptions?.memorizeCurrent ?? true,\n });\n\n const [isExpanded, setIsExpanded] = React.useState(false);\n const [numberOfColumns, setNumberOfColumns] = React.useState<number>(3);\n\n const gridWrapperRef = React.useRef<HTMLDivElement>(null);\n const { targetDocument } = useFluent();\n const win = targetDocument?.defaultView;\n\n React.useEffect(() => {\n if (!win || !gridWrapperRef.current) return;\n\n const promptStarterGrid = gridWrapperRef.current;\n\n const updateNumberOfColumns = () => {\n const numColumns = win.getComputedStyle(promptStarterGrid).gridTemplateColumns.split(' ').length;\n setNumberOfColumns(numColumns);\n };\n\n const ro = new win.ResizeObserver(updateNumberOfColumns);\n ro.observe(promptStarterGrid);\n\n return () => {\n ro.unobserve(promptStarterGrid);\n };\n }, [win]);\n\n const state: PromptStarterListState = {\n numberOfColumns: numberOfColumns,\n isExpanded,\n designVersion,\n components: {\n root: 'div',\n gridWrapper: 'div',\n expandButton: Button,\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n ...props,\n }),\n { elementType: 'div' },\n ),\n gridWrapper: slot.always(props.gridWrapper, {\n defaultProps: {\n role: 'list',\n ...focusAttrs,\n },\n elementType: 'div',\n }),\n expandButton: slot.optional(props.expandButton, {\n defaultProps: {\n appearance: 'subtle',\n size: 'small',\n shape: 'rounded',\n icon: <ChevronDown12Regular />,\n iconPosition: 'after',\n 'aria-expanded': isExpanded,\n children: isExpanded ? collapseButtonLabel : expandButtonLabel,\n },\n renderByDefault: true,\n elementType: Button,\n }),\n };\n\n state.gridWrapper.ref = useMergedRefs(gridWrapperRef, state.gridWrapper.ref);\n\n // Get the array of children.\n const childrenArray = React.useMemo<(React.ReactChild | React.ReactFragment | React.ReactPortal)[]>(() => {\n return React.Children.toArray(state.root.children);\n }, [state.root.children]);\n\n // Add motion to the children.\n const childrenWithMotion = React.useMemo(\n () =>\n childrenArray.map((child, index) => {\n // Throw error if the child is not a valid React element or is a Fragment.\n if (!React.isValidElement(child) || child.type === React.Fragment) {\n throw new Error('You should only use PromptStarter components as the children of PromptStarterList.');\n }\n\n // In the collapsed state, if there is one column, we show three children.\n // If there are two or three columns, we show two or three. All children\n // are shown in the expanded state.\n const visibility = (numberOfColumns === 1 && index < 3) || index < numberOfColumns || isExpanded;\n\n return (\n <PromptStarterMotion appear key={index} index={index} visible={visibility} numberOfColumns={numberOfColumns}>\n {child}\n </PromptStarterMotion>\n );\n }),\n [childrenArray, numberOfColumns, isExpanded],\n );\n\n state.root.children = childrenWithMotion;\n\n if (state.expandButton) {\n state.expandButton.onClick = mergeCallbacks(\n state.expandButton.onClick as React.MouseEventHandler<HTMLAnchorElement | HTMLButtonElement>,\n () => setIsExpanded(!isExpanded),\n );\n }\n\n return state;\n};\n"],"names":["React","getIntrinsicElementProps","slot","Button","useArrowNavigationGroup","mergeCallbacks","useFluent","useMergedRefs","useDesignVersion","ChevronDown12Regular","PromptStarterMotion","usePromptStarterList_unstable","props","ref","arrowNavigationOptions","expandButtonLabel","collapseButtonLabel","designVersion","focusAttrs","axis","memorizeCurrent","isExpanded","setIsExpanded","useState","numberOfColumns","setNumberOfColumns","gridWrapperRef","useRef","targetDocument","win","defaultView","useEffect","current","promptStarterGrid","updateNumberOfColumns","numColumns","getComputedStyle","gridTemplateColumns","split","length","ro","ResizeObserver","observe","unobserve","state","components","root","gridWrapper","expandButton","always","elementType","defaultProps","role","optional","appearance","size","shape","icon","iconPosition","children","renderByDefault","childrenArray","useMemo","Children","toArray","childrenWithMotion","map","child","index","isValidElement","type","Fragment","Error","visibility","appear","key","visible","onClick"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SACEC,wBAAwB,EACxBC,IAAI,EACJC,MAAM,EACNC,uBAAuB,EACvBC,cAAc,EACdC,SAAS,EACTC,aAAa,QACR,6BAA6B;AAEpC,SAASC,gBAAgB,QAAQ,mCAAmC;AACpE,SAASC,oBAAoB,QAAQ,wBAAwB;AAC7D,SAASC,mBAAmB,QAAQ,uCAAuC;AAE3E;;;;;;;;CAQC,GACD,OAAO,MAAMC,gCAAgC,CAC3CC,OACAC;IAEA,MAAM,EAAEC,sBAAsB,EAAEC,oBAAoB,WAAW,EAAEC,sBAAsB,WAAW,EAAE,GAAGJ;IACvG,MAAMK,gBAAgBT,iBAAiBI,MAAMK,aAAa;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AAc,CAACD;IAEzB;IAEA,OAAOuB;AACT,EAAE"}
1
+ {"version":3,"sources":["usePromptStarterList.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n getIntrinsicElementProps,\n slot,\n Button,\n useArrowNavigationGroup,\n mergeCallbacks,\n useFluent,\n useMergedRefs,\n} from '@fluentui/react-components';\nimport type { PromptStarterListProps, PromptStarterListState } from './PromptStarterList.types';\nimport { useDesignVersion } from '@fluentui-copilot/react-provider';\nimport { ChevronDown12Regular } from '@fluentui/react-icons';\nimport { PromptStarterMotion } from '../PromptStarter/promptStarterMotion';\nimport { useControllableState } from '@fluentui/react-utilities';\n\n/**\n * Create the state required to render PromptStarterList.\n *\n * The returned state can be modified with hooks such as usePromptStarterListStyles_unstable,\n * before being passed to renderPromptStarterList_unstable.\n *\n * @param props - props from this instance of PromptStarterList\n * @param ref - reference to root HTMLElement of PromptStarterList\n */\nexport const usePromptStarterList_unstable = (\n props: PromptStarterListProps,\n ref: React.Ref<HTMLDivElement>,\n): PromptStarterListState => {\n const {\n arrowNavigationOptions,\n expandButtonLabel = 'Show more',\n collapseButtonLabel = 'Show less',\n onExpandedChange,\n animateOnMount = true,\n visibleRows = 1,\n } = props;\n const designVersion = useDesignVersion(props.designVersion);\n const focusAttrs = useArrowNavigationGroup({\n ...arrowNavigationOptions,\n axis: arrowNavigationOptions?.axis ?? 'both',\n memorizeCurrent: arrowNavigationOptions?.memorizeCurrent ?? true,\n });\n\n const [isExpanded, setIsExpanded] = useControllableState({\n state: props.isExpanded,\n defaultState: props.defaultExpanded,\n initialState: false,\n });\n const toggleExpanded = React.useCallback(\n (event: React.MouseEvent<HTMLElement>) => {\n setIsExpanded(prevExpanded => {\n onExpandedChange?.(event, { isExpanded: !prevExpanded });\n return !prevExpanded;\n });\n },\n [setIsExpanded, onExpandedChange],\n );\n const [numberOfColumns, setNumberOfColumns] = React.useState<number>(3);\n\n const gridWrapperRef = React.useRef<HTMLDivElement>(null);\n const { targetDocument } = useFluent();\n const win = targetDocument?.defaultView;\n\n React.useEffect(() => {\n if (!win || !gridWrapperRef.current) return;\n\n const promptStarterGrid = gridWrapperRef.current;\n\n const updateNumberOfColumns = () => {\n const numColumns = win.getComputedStyle(promptStarterGrid).gridTemplateColumns.split(' ').length;\n setNumberOfColumns(numColumns);\n };\n\n const ro = new win.ResizeObserver(updateNumberOfColumns);\n ro.observe(promptStarterGrid);\n\n return () => {\n ro.unobserve(promptStarterGrid);\n };\n }, [win]);\n\n const state: PromptStarterListState = {\n numberOfColumns: numberOfColumns,\n isExpanded: isExpanded,\n designVersion,\n components: {\n root: 'div',\n gridWrapper: 'div',\n actions: 'span',\n expandButton: Button,\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n ...props,\n }),\n { elementType: 'div' },\n ),\n gridWrapper: slot.always(props.gridWrapper, {\n defaultProps: {\n role: 'list',\n ...focusAttrs,\n },\n elementType: 'div',\n }),\n actions: slot.optional(props.actions, {\n elementType: 'span',\n }),\n expandButton: slot.optional(props.expandButton, {\n defaultProps: {\n appearance: 'subtle',\n size: 'small',\n shape: 'rounded',\n icon: <ChevronDown12Regular />,\n iconPosition: 'after',\n 'aria-expanded': isExpanded,\n children: isExpanded ? collapseButtonLabel : expandButtonLabel,\n },\n renderByDefault: true,\n elementType: Button,\n }),\n };\n\n state.gridWrapper.ref = useMergedRefs(gridWrapperRef, state.gridWrapper.ref);\n\n // Get the array of children.\n const childrenArray = React.useMemo<\n (React.ReactElement<any> | number | string | Iterable<React.ReactNode> | React.ReactPortal)[]\n >(() => {\n return React.Children.toArray(state.root.children);\n }, [state.root.children]);\n\n // Add motion to the children.\n const childrenWithMotion = React.useMemo(\n () =>\n childrenArray.map((child, index) => {\n // Throw error if the child is not a valid React element or is a Fragment.\n if (!React.isValidElement(child) || child.type === React.Fragment) {\n throw new Error('You should only use PromptStarter components as the children of PromptStarterList.');\n }\n\n // In the collapsed state, if there is one column, we show three children. If there are two or three columns,\n // we show two or three (or four or six, if there are two visible rows). All children are shown in the isExpanded state.\n const visibility = (numberOfColumns === 1 && index < 3) || index < numberOfColumns * visibleRows || isExpanded;\n\n return (\n <PromptStarterMotion\n appear={animateOnMount}\n key={index}\n index={index}\n visible={visibility}\n numberOfColumns={numberOfColumns}\n >\n {child}\n </PromptStarterMotion>\n );\n }),\n [childrenArray, numberOfColumns, isExpanded],\n );\n\n state.root.children = childrenWithMotion;\n\n const numChildren = childrenArray.length;\n if ((numberOfColumns === 1 && numChildren <= 3) || numChildren <= numberOfColumns * visibleRows) {\n state.expandButton = undefined;\n }\n\n if (state.expandButton) {\n state.expandButton.onClick = mergeCallbacks(\n state.expandButton.onClick as React.MouseEventHandler<HTMLAnchorElement | HTMLButtonElement>,\n toggleExpanded,\n );\n }\n\n return state;\n};\n"],"names":["React","getIntrinsicElementProps","slot","Button","useArrowNavigationGroup","mergeCallbacks","useFluent","useMergedRefs","useDesignVersion","ChevronDown12Regular","PromptStarterMotion","useControllableState","usePromptStarterList_unstable","props","ref","arrowNavigationOptions","expandButtonLabel","collapseButtonLabel","onExpandedChange","animateOnMount","visibleRows","designVersion","focusAttrs","axis","memorizeCurrent","isExpanded","setIsExpanded","state","defaultState","defaultExpanded","initialState","toggleExpanded","useCallback","event","prevExpanded","numberOfColumns","setNumberOfColumns","useState","gridWrapperRef","useRef","targetDocument","win","defaultView","useEffect","current","promptStarterGrid","updateNumberOfColumns","numColumns","getComputedStyle","gridTemplateColumns","split","length","ro","ResizeObserver","observe","unobserve","components","root","gridWrapper","actions","expandButton","always","elementType","defaultProps","role","optional","appearance","size","shape","icon","iconPosition","children","renderByDefault","childrenArray","useMemo","Children","toArray","childrenWithMotion","map","child","index","isValidElement","type","Fragment","Error","visibility","appear","key","visible","numChildren","undefined","onClick"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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c+B,gBAAgBX,MAAM+B,WAAW,CAAC5C,GAAG;IAE3E,6BAA6B;IAC7B,MAAM2D,gBAAgBzE,MAAM0E,OAAO,CAEjC;QACA,OAAO1E,MAAM2E,QAAQ,CAACC,OAAO,CAACjD,MAAM8B,IAAI,CAACc,QAAQ;IACnD,GAAG;QAAC5C,MAAM8B,IAAI,CAACc,QAAQ;KAAC;IAExB,8BAA8B;IAC9B,MAAMM,qBAAqB7E,MAAM0E,OAAO,CACtC,IACED,cAAcK,GAAG,CAAC,CAACC,OAAOC;YACxB,0EAA0E;YAC1E,IAAI,eAAChF,MAAMiF,cAAc,CAACF,UAAUA,MAAMG,IAAI,KAAKlF,MAAMmF,QAAQ,EAAE;gBACjE,MAAM,IAAIC,MAAM;YAClB;YAEA,6GAA6G;YAC7G,wHAAwH;YACxH,MAAMC,aAAa,AAAClD,oBAAoB,KAAK6C,QAAQ,KAAMA,QAAQ7C,kBAAkBf,eAAeK;YAEpG,qBACE,oBAACf;gBACC4E,QAAQnE;gBACRoE,KAAKP;gBACLA,OAAOA;gBACPQ,SAASH;gBACTlD,iBAAiBA;eAEhB4C;QAGP,IACF;QAACN;QAAetC;QAAiBV;KAAW;IAG9CE,MAAM8B,IAAI,CAACc,QAAQ,GAAGM;IAEtB,MAAMY,cAAchB,cAActB,MAAM;IACxC,IAAI,AAAChB,oBAAoB,KAAKsD,eAAe,KAAMA,eAAetD,kBAAkBf,aAAa;QAC/FO,MAAMiC,YAAY,GAAG8B;IACvB;IAEA,IAAI/D,MAAMiC,YAAY,EAAE;QACtBjC,MAAMiC,YAAY,CAAC+B,OAAO,GAAGtF,eAC3BsB,MAAMiC,YAAY,CAAC+B,OAAO,EAC1B5D;IAEJ;IAEA,OAAOJ;AACT,EAAE"}
@@ -3,14 +3,20 @@ import { tokens } from '@fluentui-copilot/tokens';
3
3
  export const promptStarterListClassNames = {
4
4
  root: 'fai-PromptStarterList',
5
5
  gridWrapper: 'fai-PromptStarterList__gridWrapper',
6
+ actions: 'fai-PromptStarterList__actions',
6
7
  expandButton: 'fai-PromptStarterList__expandButton'
7
8
  };
8
9
  /**
9
10
  * Styles for the root slot
10
11
  */
11
- const useRootClassName = __resetStyles("r1n85ojv", null, [".r1n85ojv{display:flex;flex-direction:column;max-width:772px;gap:var(--spacingHorizontalXL);}"]);
12
+ const useRootClassName = __resetStyles("r1svwxtk", null, [".r1svwxtk{display:grid;grid-template-columns:1fr max-content max-content;grid-template-rows:max-content max-content;grid-template-areas:\"grid grid grid\" \". actions expandButton\";max-width:772px;row-gap:var(--spacingVerticalXL);column-gap:var(--spacingHorizontalSNudge);}"]);
12
13
  const useStyles = __styles({
13
14
  gridWrapper: {
15
+ Bw0ie65: 0,
16
+ Br312pm: 0,
17
+ nk6f5a: 0,
18
+ Ijaq50: 0,
19
+ Bq1tomu: "fl4njfv",
14
20
  mc9l5x: "f13qh94s",
15
21
  i8kkvl: 0,
16
22
  Belr9w4: 0,
@@ -19,8 +25,19 @@ const useStyles = __styles({
19
25
  Budl1dq: "fvo7o13",
20
26
  Bxotwcr: "f1nkeedh"
21
27
  },
28
+ actions: {
29
+ Bw0ie65: 0,
30
+ Br312pm: 0,
31
+ nk6f5a: 0,
32
+ Ijaq50: 0,
33
+ Bq1tomu: "fceb517"
34
+ },
22
35
  expandButton: {
23
- qb2dma: "f1locze1",
36
+ Bw0ie65: 0,
37
+ Br312pm: 0,
38
+ nk6f5a: 0,
39
+ Ijaq50: 0,
40
+ Bq1tomu: "f1najgz0",
24
41
  wrk2wx: "f11k2d1d",
25
42
  dutsh0: "f1iwh30k",
26
43
  B4u5nao: "fn63aq9",
@@ -31,9 +48,15 @@ const useStyles = __styles({
31
48
  Bs9jjb3: ["f5l68jj", "f1i29bk4"]
32
49
  }
33
50
  }, {
34
- d: [".f13qh94s{display:grid;}", [".f1p93rwu{gap:var(--spacingHorizontalL);}", {
51
+ d: [[".fl4njfv{grid-area:grid;}", {
52
+ p: -1
53
+ }], ".f13qh94s{display:grid;}", [".f1p93rwu{gap:var(--spacingHorizontalL);}", {
54
+ p: -1
55
+ }], ".f4wu0r3{grid-auto-columns:max-content;}", ".fvo7o13{grid-template-columns:repeat(auto-fit, minmax(214px, 1fr));}", ".f1nkeedh{grid-auto-flow:unset;}", [".fceb517{grid-area:actions;}", {
35
56
  p: -1
36
- }], ".f4wu0r3{grid-auto-columns:max-content;}", ".fvo7o13{grid-template-columns:repeat(auto-fit, minmax(214px, 1fr));}", ".f1nkeedh{grid-auto-flow:unset;}", ".f1locze1{align-self:end;}", ".f11k2d1d .fui-Button__icon{font-size:12px;}", ".f1iwh30k .fui-Button__icon{height:12px;}", ".fn63aq9 .fui-Button__icon{width:12px;}", ".f5l68jj>.fui-Button__icon{transform:rotate(180deg);}", ".f1i29bk4>.fui-Button__icon{transform:rotate(-180deg);}"],
57
+ }], [".f1najgz0{grid-area:expandButton;}", {
58
+ p: -1
59
+ }], ".f11k2d1d .fui-Button__icon{font-size:12px;}", ".f1iwh30k .fui-Button__icon{height:12px;}", ".fn63aq9 .fui-Button__icon{width:12px;}", ".f5l68jj>.fui-Button__icon{transform:rotate(180deg);}", ".f1i29bk4>.fui-Button__icon{transform:rotate(-180deg);}"],
37
60
  h: [".fm7zj7h:hover .fui-Button__icon{color:var(--colorNeutralForeground2Hover);}", ".fuzcl37:hover:active .fui-Button__icon{color:var(--colorNeutralForeground2Pressed);}"]
38
61
  });
39
62
  /**
@@ -49,6 +72,9 @@ export const usePromptStarterListStyles_unstable = state => {
49
72
  const styles = useStyles();
50
73
  state.root.className = mergeClasses(promptStarterListClassNames.root, rootClassName, state.root.className);
51
74
  state.gridWrapper.className = mergeClasses(promptStarterListClassNames.gridWrapper, styles.gridWrapper, state.gridWrapper.className);
75
+ if (state.actions) {
76
+ state.actions.className = mergeClasses(promptStarterListClassNames.actions, styles.actions, state.actions.className);
77
+ }
52
78
  if (state.expandButton) {
53
79
  state.expandButton.className = mergeClasses(promptStarterListClassNames.expandButton, styles.expandButton, isExpanded && styles.expandButtonExpanded, state.expandButton.className);
54
80
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["usePromptStarterListStyles.styles.ts"],"sourcesContent":["import { buttonClassNames, makeResetStyles, makeStyles, mergeClasses } from '@fluentui/react-components';\nimport type { PromptStarterListSlots, PromptStarterListState } from './PromptStarterList.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\n\nexport const promptStarterListClassNames: SlotClassNames<PromptStarterListSlots> = {\n root: 'fai-PromptStarterList',\n gridWrapper: 'fai-PromptStarterList__gridWrapper',\n expandButton: 'fai-PromptStarterList__expandButton',\n};\n\n/**\n * Styles for the root slot\n */\nconst useRootClassName = makeResetStyles({\n display: 'flex',\n flexDirection: 'column',\n maxWidth: '772px',\n gap: tokens.spacingHorizontalXL,\n});\n\nconst useStyles = makeStyles({\n gridWrapper: {\n display: 'grid',\n gap: tokens.spacingHorizontalL,\n gridAutoColumns: 'max-content',\n\n gridTemplateColumns: `repeat(auto-fit, minmax(214px, 1fr))`,\n gridAutoFlow: 'unset',\n },\n\n expandButton: {\n alignSelf: 'end',\n [`& .${buttonClassNames.icon}`]: {\n fontSize: '12px',\n height: '12px',\n width: '12px',\n },\n ':hover': {\n [`& .${buttonClassNames.icon}`]: {\n color: tokens.colorNeutralForeground2Hover,\n },\n },\n ':hover:active': {\n [`& .${buttonClassNames.icon}`]: {\n color: tokens.colorNeutralForeground2Pressed,\n },\n },\n },\n\n expandButtonExpanded: {\n [`& > .${buttonClassNames.icon}`]: {\n transform: 'rotate(180deg)',\n },\n },\n});\n\n/**\n * Apply styling to the PromptStarterList slots based on the state\n */\nexport const usePromptStarterListStyles_unstable = (state: PromptStarterListState): PromptStarterListState => {\n 'use no memo';\n\n const { isExpanded } = state;\n\n const rootClassName = useRootClassName();\n const styles = useStyles();\n state.root.className = mergeClasses(promptStarterListClassNames.root, rootClassName, state.root.className);\n state.gridWrapper.className = mergeClasses(\n promptStarterListClassNames.gridWrapper,\n styles.gridWrapper,\n state.gridWrapper.className,\n );\n if (state.expandButton) {\n state.expandButton.className = mergeClasses(\n promptStarterListClassNames.expandButton,\n styles.expandButton,\n isExpanded && styles.expandButtonExpanded,\n state.expandButton.className,\n );\n }\n\n return state;\n};\n"],"names":["buttonClassNames","makeResetStyles","makeStyles","mergeClasses","tokens","promptStarterListClassNames","root","gridWrapper","expandButton","useRootClassName","display","flexDirection","maxWidth","gap","spacingHorizontalXL","useStyles","spacingHorizontalL","gridAutoColumns","gridTemplateColumns","gridAutoFlow","alignSelf","icon","fontSize","height","width","color","colorNeutralForeground2Hover","colorNeutralForeground2Pressed","expandButtonExpanded","transform","usePromptStarterListStyles_unstable","state","isExpanded","rootClassName","styles","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,gBAAgB,EAAEC,eAAe,EAAEC,UAAU,EAAEC,YAAY,QAAQ,6BAA6B;AAGzG,SAASC,MAAM,QAAQ,2BAA2B;AAElD,OAAO,MAAMC,8BAAsE;IACjFC,MAAM;IACNC,aAAa;IACbC,cAAc;AAChB,EAAE;AAEF;;CAEC,GACD,MAAMC,mBAAmBR,gBAAgB;IACvCS,SAAS;IACTC,eAAe;IACfC,UAAU;IACVC,KAAKT,OAAOU,mBAAmB;AACjC;AAEA,MAAMC,YAAYb,WAAW;IAC3BK,aAAa;QACXG,SAAS;QACTG,KAAKT,OAAOY,kBAAkB;QAC9BC,iBAAiB;QAEjBC,qBAAqB,CAAC,oCAAoC,CAAC;QAC3DC,cAAc;IAChB;IAEAX,cAAc;QACZY,WAAW;QACX,CAAC,CAAC,GAAG,EAAEpB,iBAAiBqB,IAAI,CAAC,CAAC,CAAC,EAAE;YAC/BC,UAAU;YACVC,QAAQ;YACRC,OAAO;QACT;QACA,UAAU;YACR,CAAC,CAAC,GAAG,EAAExB,iBAAiBqB,IAAI,CAAC,CAAC,CAAC,EAAE;gBAC/BI,OAAOrB,OAAOsB,4BAA4B;YAC5C;QACF;QACA,iBAAiB;YACf,CAAC,CAAC,GAAG,EAAE1B,iBAAiBqB,IAAI,CAAC,CAAC,CAAC,EAAE;gBAC/BI,OAAOrB,OAAOuB,8BAA8B;YAC9C;QACF;IACF;IAEAC,sBAAsB;QACpB,CAAC,CAAC,KAAK,EAAE5B,iBAAiBqB,IAAI,CAAC,CAAC,CAAC,EAAE;YACjCQ,WAAW;QACb;IACF;AACF;AAEA;;CAEC,GACD,OAAO,MAAMC,sCAAsC,CAACC;IAClD;IAEA,MAAM,EAAEC,UAAU,EAAE,GAAGD;IAEvB,MAAME,gBAAgBxB;IACtB,MAAMyB,SAASnB;IACfgB,MAAMzB,IAAI,CAAC6B,SAAS,GAAGhC,aAAaE,4BAA4BC,IAAI,EAAE2B,eAAeF,MAAMzB,IAAI,CAAC6B,SAAS;IACzGJ,MAAMxB,WAAW,CAAC4B,SAAS,GAAGhC,aAC5BE,4BAA4BE,WAAW,EACvC2B,OAAO3B,WAAW,EAClBwB,MAAMxB,WAAW,CAAC4B,SAAS;IAE7B,IAAIJ,MAAMvB,YAAY,EAAE;QACtBuB,MAAMvB,YAAY,CAAC2B,SAAS,GAAGhC,aAC7BE,4BAA4BG,YAAY,EACxC0B,OAAO1B,YAAY,EACnBwB,cAAcE,OAAON,oBAAoB,EACzCG,MAAMvB,YAAY,CAAC2B,SAAS;IAEhC;IAEA,OAAOJ;AACT,EAAE"}
1
+ {"version":3,"sources":["usePromptStarterListStyles.styles.ts"],"sourcesContent":["import { buttonClassNames, makeResetStyles, makeStyles, mergeClasses } from '@fluentui/react-components';\nimport type { PromptStarterListSlots, PromptStarterListState } from './PromptStarterList.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\n\nexport const promptStarterListClassNames: SlotClassNames<PromptStarterListSlots> = {\n root: 'fai-PromptStarterList',\n gridWrapper: 'fai-PromptStarterList__gridWrapper',\n actions: 'fai-PromptStarterList__actions',\n expandButton: 'fai-PromptStarterList__expandButton',\n};\n\n/**\n * Styles for the root slot\n */\nconst useRootClassName = makeResetStyles({\n display: 'grid',\n gridTemplateColumns: '1fr max-content max-content',\n gridTemplateRows: 'max-content max-content',\n gridTemplateAreas: `\"grid grid grid\"\n \". actions expandButton\"`,\n maxWidth: '772px',\n rowGap: tokens.spacingVerticalXL,\n columnGap: tokens.spacingHorizontalSNudge,\n});\n\nconst useStyles = makeStyles({\n gridWrapper: {\n gridArea: 'grid',\n display: 'grid',\n gap: tokens.spacingHorizontalL,\n gridAutoColumns: 'max-content',\n\n gridTemplateColumns: `repeat(auto-fit, minmax(214px, 1fr))`,\n gridAutoFlow: 'unset',\n },\n\n actions: {\n gridArea: 'actions',\n },\n\n expandButton: {\n gridArea: 'expandButton',\n [`& .${buttonClassNames.icon}`]: {\n fontSize: '12px',\n height: '12px',\n width: '12px',\n },\n ':hover': {\n [`& .${buttonClassNames.icon}`]: {\n color: tokens.colorNeutralForeground2Hover,\n },\n },\n ':hover:active': {\n [`& .${buttonClassNames.icon}`]: {\n color: tokens.colorNeutralForeground2Pressed,\n },\n },\n },\n\n expandButtonExpanded: {\n [`& > .${buttonClassNames.icon}`]: {\n transform: 'rotate(180deg)',\n },\n },\n});\n\n/**\n * Apply styling to the PromptStarterList slots based on the state\n */\nexport const usePromptStarterListStyles_unstable = (state: PromptStarterListState): PromptStarterListState => {\n 'use no memo';\n\n const { isExpanded } = state;\n\n const rootClassName = useRootClassName();\n const styles = useStyles();\n state.root.className = mergeClasses(promptStarterListClassNames.root, rootClassName, state.root.className);\n state.gridWrapper.className = mergeClasses(\n promptStarterListClassNames.gridWrapper,\n styles.gridWrapper,\n state.gridWrapper.className,\n );\n if (state.actions) {\n state.actions.className = mergeClasses(\n promptStarterListClassNames.actions,\n styles.actions,\n state.actions.className,\n );\n }\n if (state.expandButton) {\n state.expandButton.className = mergeClasses(\n promptStarterListClassNames.expandButton,\n styles.expandButton,\n isExpanded && styles.expandButtonExpanded,\n state.expandButton.className,\n );\n }\n\n return state;\n};\n"],"names":["buttonClassNames","makeResetStyles","makeStyles","mergeClasses","tokens","promptStarterListClassNames","root","gridWrapper","actions","expandButton","useRootClassName","display","gridTemplateColumns","gridTemplateRows","gridTemplateAreas","maxWidth","rowGap","spacingVerticalXL","columnGap","spacingHorizontalSNudge","useStyles","gridArea","gap","spacingHorizontalL","gridAutoColumns","gridAutoFlow","icon","fontSize","height","width","color","colorNeutralForeground2Hover","colorNeutralForeground2Pressed","expandButtonExpanded","transform","usePromptStarterListStyles_unstable","state","isExpanded","rootClassName","styles","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,gBAAgB,EAAEC,eAAe,EAAEC,UAAU,EAAEC,YAAY,QAAQ,6BAA6B;AAGzG,SAASC,MAAM,QAAQ,2BAA2B;AAElD,OAAO,MAAMC,8BAAsE;IACjFC,MAAM;IACNC,aAAa;IACbC,SAAS;IACTC,cAAc;AAChB,EAAE;AAEF;;CAEC,GACD,MAAMC,mBAAmBT,gBAAgB;IACvCU,SAAS;IACTC,qBAAqB;IACrBC,kBAAkB;IAClBC,mBAAmB,CAAC;8CACwB,CAAC;IAC7CC,UAAU;IACVC,QAAQZ,OAAOa,iBAAiB;IAChCC,WAAWd,OAAOe,uBAAuB;AAC3C;AAEA,MAAMC,YAAYlB,WAAW;IAC3BK,aAAa;QACXc,UAAU;QACVV,SAAS;QACTW,KAAKlB,OAAOmB,kBAAkB;QAC9BC,iBAAiB;QAEjBZ,qBAAqB,CAAC,oCAAoC,CAAC;QAC3Da,cAAc;IAChB;IAEAjB,SAAS;QACPa,UAAU;IACZ;IAEAZ,cAAc;QACZY,UAAU;QACV,CAAC,CAAC,GAAG,EAAErB,iBAAiB0B,IAAI,CAAC,CAAC,CAAC,EAAE;YAC/BC,UAAU;YACVC,QAAQ;YACRC,OAAO;QACT;QACA,UAAU;YACR,CAAC,CAAC,GAAG,EAAE7B,iBAAiB0B,IAAI,CAAC,CAAC,CAAC,EAAE;gBAC/BI,OAAO1B,OAAO2B,4BAA4B;YAC5C;QACF;QACA,iBAAiB;YACf,CAAC,CAAC,GAAG,EAAE/B,iBAAiB0B,IAAI,CAAC,CAAC,CAAC,EAAE;gBAC/BI,OAAO1B,OAAO4B,8BAA8B;YAC9C;QACF;IACF;IAEAC,sBAAsB;QACpB,CAAC,CAAC,KAAK,EAAEjC,iBAAiB0B,IAAI,CAAC,CAAC,CAAC,EAAE;YACjCQ,WAAW;QACb;IACF;AACF;AAEA;;CAEC,GACD,OAAO,MAAMC,sCAAsC,CAACC;IAClD;IAEA,MAAM,EAAEC,UAAU,EAAE,GAAGD;IAEvB,MAAME,gBAAgB5B;IACtB,MAAM6B,SAASnB;IACfgB,MAAM9B,IAAI,CAACkC,SAAS,GAAGrC,aAAaE,4BAA4BC,IAAI,EAAEgC,eAAeF,MAAM9B,IAAI,CAACkC,SAAS;IACzGJ,MAAM7B,WAAW,CAACiC,SAAS,GAAGrC,aAC5BE,4BAA4BE,WAAW,EACvCgC,OAAOhC,WAAW,EAClB6B,MAAM7B,WAAW,CAACiC,SAAS;IAE7B,IAAIJ,MAAM5B,OAAO,EAAE;QACjB4B,MAAM5B,OAAO,CAACgC,SAAS,GAAGrC,aACxBE,4BAA4BG,OAAO,EACnC+B,OAAO/B,OAAO,EACd4B,MAAM5B,OAAO,CAACgC,SAAS;IAE3B;IACA,IAAIJ,MAAM3B,YAAY,EAAE;QACtB2B,MAAM3B,YAAY,CAAC+B,SAAS,GAAGrC,aAC7BE,4BAA4BI,YAAY,EACxC8B,OAAO9B,YAAY,EACnB4B,cAAcE,OAAON,oBAAoB,EACzCG,MAAM3B,YAAY,CAAC+B,SAAS;IAEhC;IAEA,OAAOJ;AACT,EAAE"}
@@ -3,26 +3,35 @@ import { tokens } from '@fluentui-copilot/tokens';
3
3
  export const promptStarterListClassNames = {
4
4
  root: 'fai-PromptStarterList',
5
5
  gridWrapper: 'fai-PromptStarterList__gridWrapper',
6
+ actions: 'fai-PromptStarterList__actions',
6
7
  expandButton: 'fai-PromptStarterList__expandButton'
7
8
  };
8
9
  /**
9
10
  * Styles for the root slot
10
11
  */ const useRootClassName = makeResetStyles({
11
- display: 'flex',
12
- flexDirection: 'column',
12
+ display: 'grid',
13
+ gridTemplateColumns: '1fr max-content max-content',
14
+ gridTemplateRows: 'max-content max-content',
15
+ gridTemplateAreas: `"grid grid grid"
16
+ ". actions expandButton"`,
13
17
  maxWidth: '772px',
14
- gap: tokens.spacingHorizontalXL
18
+ rowGap: tokens.spacingVerticalXL,
19
+ columnGap: tokens.spacingHorizontalSNudge
15
20
  });
16
21
  const useStyles = makeStyles({
17
22
  gridWrapper: {
23
+ gridArea: 'grid',
18
24
  display: 'grid',
19
25
  gap: tokens.spacingHorizontalL,
20
26
  gridAutoColumns: 'max-content',
21
27
  gridTemplateColumns: `repeat(auto-fit, minmax(214px, 1fr))`,
22
28
  gridAutoFlow: 'unset'
23
29
  },
30
+ actions: {
31
+ gridArea: 'actions'
32
+ },
24
33
  expandButton: {
25
- alignSelf: 'end',
34
+ gridArea: 'expandButton',
26
35
  [`& .${buttonClassNames.icon}`]: {
27
36
  fontSize: '12px',
28
37
  height: '12px',
@@ -54,6 +63,9 @@ const useStyles = makeStyles({
54
63
  const styles = useStyles();
55
64
  state.root.className = mergeClasses(promptStarterListClassNames.root, rootClassName, state.root.className);
56
65
  state.gridWrapper.className = mergeClasses(promptStarterListClassNames.gridWrapper, styles.gridWrapper, state.gridWrapper.className);
66
+ if (state.actions) {
67
+ state.actions.className = mergeClasses(promptStarterListClassNames.actions, styles.actions, state.actions.className);
68
+ }
57
69
  if (state.expandButton) {
58
70
  state.expandButton.className = mergeClasses(promptStarterListClassNames.expandButton, styles.expandButton, isExpanded && styles.expandButtonExpanded, state.expandButton.className);
59
71
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["usePromptStarterListStyles.styles.ts"],"sourcesContent":["import { buttonClassNames, makeResetStyles, makeStyles, mergeClasses } from '@fluentui/react-components';\nimport type { PromptStarterListSlots, PromptStarterListState } from './PromptStarterList.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\n\nexport const promptStarterListClassNames: SlotClassNames<PromptStarterListSlots> = {\n root: 'fai-PromptStarterList',\n gridWrapper: 'fai-PromptStarterList__gridWrapper',\n expandButton: 'fai-PromptStarterList__expandButton',\n};\n\n/**\n * Styles for the root slot\n */\nconst useRootClassName = makeResetStyles({\n display: 'flex',\n flexDirection: 'column',\n maxWidth: '772px',\n gap: tokens.spacingHorizontalXL,\n});\n\nconst useStyles = makeStyles({\n gridWrapper: {\n display: 'grid',\n gap: tokens.spacingHorizontalL,\n gridAutoColumns: 'max-content',\n\n gridTemplateColumns: `repeat(auto-fit, minmax(214px, 1fr))`,\n gridAutoFlow: 'unset',\n },\n\n expandButton: {\n alignSelf: 'end',\n [`& .${buttonClassNames.icon}`]: {\n fontSize: '12px',\n height: '12px',\n width: '12px',\n },\n ':hover': {\n [`& .${buttonClassNames.icon}`]: {\n color: tokens.colorNeutralForeground2Hover,\n },\n },\n ':hover:active': {\n [`& .${buttonClassNames.icon}`]: {\n color: tokens.colorNeutralForeground2Pressed,\n },\n },\n },\n\n expandButtonExpanded: {\n [`& > .${buttonClassNames.icon}`]: {\n transform: 'rotate(180deg)',\n },\n },\n});\n\n/**\n * Apply styling to the PromptStarterList slots based on the state\n */\nexport const usePromptStarterListStyles_unstable = (state: PromptStarterListState): PromptStarterListState => {\n 'use no memo';\n\n const { isExpanded } = state;\n\n const rootClassName = useRootClassName();\n const styles = useStyles();\n state.root.className = mergeClasses(promptStarterListClassNames.root, rootClassName, state.root.className);\n state.gridWrapper.className = mergeClasses(\n promptStarterListClassNames.gridWrapper,\n styles.gridWrapper,\n state.gridWrapper.className,\n );\n if (state.expandButton) {\n state.expandButton.className = mergeClasses(\n promptStarterListClassNames.expandButton,\n styles.expandButton,\n isExpanded && styles.expandButtonExpanded,\n state.expandButton.className,\n );\n }\n\n return state;\n};\n"],"names":["buttonClassNames","makeResetStyles","makeStyles","mergeClasses","tokens","promptStarterListClassNames","root","gridWrapper","expandButton","useRootClassName","display","flexDirection","maxWidth","gap","spacingHorizontalXL","useStyles","spacingHorizontalL","gridAutoColumns","gridTemplateColumns","gridAutoFlow","alignSelf","icon","fontSize","height","width","color","colorNeutralForeground2Hover","colorNeutralForeground2Pressed","expandButtonExpanded","transform","usePromptStarterListStyles_unstable","state","isExpanded","rootClassName","styles","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,gBAAgB,EAAEC,eAAe,EAAEC,UAAU,EAAEC,YAAY,QAAQ,6BAA6B;AAGzG,SAASC,MAAM,QAAQ,2BAA2B;AAElD,OAAO,MAAMC,8BAAsE;IACjFC,MAAM;IACNC,aAAa;IACbC,cAAc;AAChB,EAAE;AAEF;;CAEC,GACD,MAAMC,mBAAmBR,gBAAgB;IACvCS,SAAS;IACTC,eAAe;IACfC,UAAU;IACVC,KAAKT,OAAOU,mBAAmB;AACjC;AAEA,MAAMC,YAAYb,WAAW;IAC3BK,aAAa;QACXG,SAAS;QACTG,KAAKT,OAAOY,kBAAkB;QAC9BC,iBAAiB;QAEjBC,qBAAqB,CAAC,oCAAoC,CAAC;QAC3DC,cAAc;IAChB;IAEAX,cAAc;QACZY,WAAW;QACX,CAAC,CAAC,GAAG,EAAEpB,iBAAiBqB,IAAI,CAAC,CAAC,CAAC,EAAE;YAC/BC,UAAU;YACVC,QAAQ;YACRC,OAAO;QACT;QACA,UAAU;YACR,CAAC,CAAC,GAAG,EAAExB,iBAAiBqB,IAAI,CAAC,CAAC,CAAC,EAAE;gBAC/BI,OAAOrB,OAAOsB,4BAA4B;YAC5C;QACF;QACA,iBAAiB;YACf,CAAC,CAAC,GAAG,EAAE1B,iBAAiBqB,IAAI,CAAC,CAAC,CAAC,EAAE;gBAC/BI,OAAOrB,OAAOuB,8BAA8B;YAC9C;QACF;IACF;IAEAC,sBAAsB;QACpB,CAAC,CAAC,KAAK,EAAE5B,iBAAiBqB,IAAI,CAAC,CAAC,CAAC,EAAE;YACjCQ,WAAW;QACb;IACF;AACF;AAEA;;CAEC,GACD,OAAO,MAAMC,sCAAsC,CAACC;IAClD;IAEA,MAAM,EAAEC,UAAU,EAAE,GAAGD;IAEvB,MAAME,gBAAgBxB;IACtB,MAAMyB,SAASnB;IACfgB,MAAMzB,IAAI,CAAC6B,SAAS,GAAGhC,aAAaE,4BAA4BC,IAAI,EAAE2B,eAAeF,MAAMzB,IAAI,CAAC6B,SAAS;IACzGJ,MAAMxB,WAAW,CAAC4B,SAAS,GAAGhC,aAC5BE,4BAA4BE,WAAW,EACvC2B,OAAO3B,WAAW,EAClBwB,MAAMxB,WAAW,CAAC4B,SAAS;IAE7B,IAAIJ,MAAMvB,YAAY,EAAE;QACtBuB,MAAMvB,YAAY,CAAC2B,SAAS,GAAGhC,aAC7BE,4BAA4BG,YAAY,EACxC0B,OAAO1B,YAAY,EACnBwB,cAAcE,OAAON,oBAAoB,EACzCG,MAAMvB,YAAY,CAAC2B,SAAS;IAEhC;IAEA,OAAOJ;AACT,EAAE"}
1
+ {"version":3,"sources":["usePromptStarterListStyles.styles.ts"],"sourcesContent":["import { buttonClassNames, makeResetStyles, makeStyles, mergeClasses } from '@fluentui/react-components';\nimport type { PromptStarterListSlots, PromptStarterListState } from './PromptStarterList.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\n\nexport const promptStarterListClassNames: SlotClassNames<PromptStarterListSlots> = {\n root: 'fai-PromptStarterList',\n gridWrapper: 'fai-PromptStarterList__gridWrapper',\n actions: 'fai-PromptStarterList__actions',\n expandButton: 'fai-PromptStarterList__expandButton',\n};\n\n/**\n * Styles for the root slot\n */\nconst useRootClassName = makeResetStyles({\n display: 'grid',\n gridTemplateColumns: '1fr max-content max-content',\n gridTemplateRows: 'max-content max-content',\n gridTemplateAreas: `\"grid grid grid\"\n \". actions expandButton\"`,\n maxWidth: '772px',\n rowGap: tokens.spacingVerticalXL,\n columnGap: tokens.spacingHorizontalSNudge,\n});\n\nconst useStyles = makeStyles({\n gridWrapper: {\n gridArea: 'grid',\n display: 'grid',\n gap: tokens.spacingHorizontalL,\n gridAutoColumns: 'max-content',\n\n gridTemplateColumns: `repeat(auto-fit, minmax(214px, 1fr))`,\n gridAutoFlow: 'unset',\n },\n\n actions: {\n gridArea: 'actions',\n },\n\n expandButton: {\n gridArea: 'expandButton',\n [`& .${buttonClassNames.icon}`]: {\n fontSize: '12px',\n height: '12px',\n width: '12px',\n },\n ':hover': {\n [`& .${buttonClassNames.icon}`]: {\n color: tokens.colorNeutralForeground2Hover,\n },\n },\n ':hover:active': {\n [`& .${buttonClassNames.icon}`]: {\n color: tokens.colorNeutralForeground2Pressed,\n },\n },\n },\n\n expandButtonExpanded: {\n [`& > .${buttonClassNames.icon}`]: {\n transform: 'rotate(180deg)',\n },\n },\n});\n\n/**\n * Apply styling to the PromptStarterList slots based on the state\n */\nexport const usePromptStarterListStyles_unstable = (state: PromptStarterListState): PromptStarterListState => {\n 'use no memo';\n\n const { isExpanded } = state;\n\n const rootClassName = useRootClassName();\n const styles = useStyles();\n state.root.className = mergeClasses(promptStarterListClassNames.root, rootClassName, state.root.className);\n state.gridWrapper.className = mergeClasses(\n promptStarterListClassNames.gridWrapper,\n styles.gridWrapper,\n state.gridWrapper.className,\n );\n if (state.actions) {\n state.actions.className = mergeClasses(\n promptStarterListClassNames.actions,\n styles.actions,\n state.actions.className,\n );\n }\n if (state.expandButton) {\n state.expandButton.className = mergeClasses(\n promptStarterListClassNames.expandButton,\n styles.expandButton,\n isExpanded && styles.expandButtonExpanded,\n state.expandButton.className,\n );\n }\n\n return state;\n};\n"],"names":["buttonClassNames","makeResetStyles","makeStyles","mergeClasses","tokens","promptStarterListClassNames","root","gridWrapper","actions","expandButton","useRootClassName","display","gridTemplateColumns","gridTemplateRows","gridTemplateAreas","maxWidth","rowGap","spacingVerticalXL","columnGap","spacingHorizontalSNudge","useStyles","gridArea","gap","spacingHorizontalL","gridAutoColumns","gridAutoFlow","icon","fontSize","height","width","color","colorNeutralForeground2Hover","colorNeutralForeground2Pressed","expandButtonExpanded","transform","usePromptStarterListStyles_unstable","state","isExpanded","rootClassName","styles","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,gBAAgB,EAAEC,eAAe,EAAEC,UAAU,EAAEC,YAAY,QAAQ,6BAA6B;AAGzG,SAASC,MAAM,QAAQ,2BAA2B;AAElD,OAAO,MAAMC,8BAAsE;IACjFC,MAAM;IACNC,aAAa;IACbC,SAAS;IACTC,cAAc;AAChB,EAAE;AAEF;;CAEC,GACD,MAAMC,mBAAmBT,gBAAgB;IACvCU,SAAS;IACTC,qBAAqB;IACrBC,kBAAkB;IAClBC,mBAAmB,CAAC;8CACwB,CAAC;IAC7CC,UAAU;IACVC,QAAQZ,OAAOa,iBAAiB;IAChCC,WAAWd,OAAOe,uBAAuB;AAC3C;AAEA,MAAMC,YAAYlB,WAAW;IAC3BK,aAAa;QACXc,UAAU;QACVV,SAAS;QACTW,KAAKlB,OAAOmB,kBAAkB;QAC9BC,iBAAiB;QAEjBZ,qBAAqB,CAAC,oCAAoC,CAAC;QAC3Da,cAAc;IAChB;IAEAjB,SAAS;QACPa,UAAU;IACZ;IAEAZ,cAAc;QACZY,UAAU;QACV,CAAC,CAAC,GAAG,EAAErB,iBAAiB0B,IAAI,CAAC,CAAC,CAAC,EAAE;YAC/BC,UAAU;YACVC,QAAQ;YACRC,OAAO;QACT;QACA,UAAU;YACR,CAAC,CAAC,GAAG,EAAE7B,iBAAiB0B,IAAI,CAAC,CAAC,CAAC,EAAE;gBAC/BI,OAAO1B,OAAO2B,4BAA4B;YAC5C;QACF;QACA,iBAAiB;YACf,CAAC,CAAC,GAAG,EAAE/B,iBAAiB0B,IAAI,CAAC,CAAC,CAAC,EAAE;gBAC/BI,OAAO1B,OAAO4B,8BAA8B;YAC9C;QACF;IACF;IAEAC,sBAAsB;QACpB,CAAC,CAAC,KAAK,EAAEjC,iBAAiB0B,IAAI,CAAC,CAAC,CAAC,EAAE;YACjCQ,WAAW;QACb;IACF;AACF;AAEA;;CAEC,GACD,OAAO,MAAMC,sCAAsC,CAACC;IAClD;IAEA,MAAM,EAAEC,UAAU,EAAE,GAAGD;IAEvB,MAAME,gBAAgB5B;IACtB,MAAM6B,SAASnB;IACfgB,MAAM9B,IAAI,CAACkC,SAAS,GAAGrC,aAAaE,4BAA4BC,IAAI,EAAEgC,eAAeF,MAAM9B,IAAI,CAACkC,SAAS;IACzGJ,MAAM7B,WAAW,CAACiC,SAAS,GAAGrC,aAC5BE,4BAA4BE,WAAW,EACvCgC,OAAOhC,WAAW,EAClB6B,MAAM7B,WAAW,CAACiC,SAAS;IAE7B,IAAIJ,MAAM5B,OAAO,EAAE;QACjB4B,MAAM5B,OAAO,CAACgC,SAAS,GAAGrC,aACxBE,4BAA4BG,OAAO,EACnC+B,OAAO/B,OAAO,EACd4B,MAAM5B,OAAO,CAACgC,SAAS;IAE3B;IACA,IAAIJ,MAAM3B,YAAY,EAAE;QACtB2B,MAAM3B,YAAY,CAAC+B,SAAS,GAAGrC,aAC7BE,4BAA4BI,YAAY,EACxC8B,OAAO9B,YAAY,EACnB4B,cAAcE,OAAON,oBAAoB,EACzCG,MAAM3B,YAAY,CAAC+B,SAAS;IAEhC;IAEA,OAAOJ;AACT,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["PromptStarterListContext.ts"],"sourcesContent":["import { createContext, useContextSelector } from '@fluentui/react-context-selector';\nimport type { ContextSelector } from '@fluentui/react-context-selector';\nimport type { PromptStarterListContextValue } from '../PromptStarterList';\n\nexport const PromptStarterListContext = createContext<PromptStarterListContextValue | undefined>(undefined);\n\nconst promptStarterListContextDefaultValue: PromptStarterListContextValue = {\n numberOfColumns: 3,\n};\n\nexport const usePromptStarterListContext = <T>(selector: ContextSelector<PromptStarterListContextValue, T>) =>\n useContextSelector(PromptStarterListContext, (ctx = promptStarterListContextDefaultValue) => selector(ctx));\nexport const PromptStarterListProvider = PromptStarterListContext.Provider;\n"],"names":["createContext","useContextSelector","PromptStarterListContext","undefined","promptStarterListContextDefaultValue","numberOfColumns","usePromptStarterListContext","selector","ctx","PromptStarterListProvider","Provider"],"rangeMappings":";;;;;;","mappings":"AAAA,SAASA,aAAa,EAAEC,kBAAkB,QAAQ,mCAAmC;AAIrF,OAAO,MAAMC,2BAA2BF,cAAyDG,WAAW;AAE5G,MAAMC,uCAAsE;IAC1EC,iBAAiB;AACnB;AAEA,OAAO,MAAMC,8BAA8B,CAAIC,WAC7CN,mBAAmBC,0BAA0B,CAACM,MAAMJ,oCAAoC,GAAKG,SAASC,MAAM;AAC9G,OAAO,MAAMC,4BAA4BP,yBAAyBQ,QAAQ,CAAC"}
1
+ {"version":3,"sources":["PromptStarterListContext.ts"],"sourcesContent":["import { createContext, useContextSelector } from '@fluentui/react-context-selector';\nimport type { ContextSelector } from '@fluentui/react-context-selector';\nimport type { PromptStarterListContextValue } from '../PromptStarterList';\n\nexport const PromptStarterListContext = createContext<PromptStarterListContextValue | undefined>(undefined);\n\nconst promptStarterListContextDefaultValue: PromptStarterListContextValue = {\n numberOfColumns: 3,\n};\n\nexport const usePromptStarterListContext = <T>(selector: ContextSelector<PromptStarterListContextValue, T>): T =>\n useContextSelector(PromptStarterListContext, (ctx = promptStarterListContextDefaultValue) => selector(ctx));\nexport const PromptStarterListProvider = PromptStarterListContext.Provider;\n"],"names":["createContext","useContextSelector","PromptStarterListContext","undefined","promptStarterListContextDefaultValue","numberOfColumns","usePromptStarterListContext","selector","ctx","PromptStarterListProvider","Provider"],"rangeMappings":";;;;;;","mappings":"AAAA,SAASA,aAAa,EAAEC,kBAAkB,QAAQ,mCAAmC;AAIrF,OAAO,MAAMC,2BAA2BF,cAAyDG,WAAW;AAE5G,MAAMC,uCAAsE;IAC1EC,iBAAiB;AACnB;AAEA,OAAO,MAAMC,8BAA8B,CAAIC,WAC7CN,mBAAmBC,0BAA0B,CAACM,MAAMJ,oCAAoC,GAAKG,SAASC,MAAM;AAC9G,OAAO,MAAMC,4BAA4BP,yBAAyBQ,QAAQ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["PromptStarter.tsx"],"sourcesContent":["import * as React from 'react';\nimport { usePromptStarter_unstable } from './usePromptStarter';\nimport { renderPromptStarter_unstable } from './renderPromptStarter';\nimport { usePromptStarterStyles_unstable } from './usePromptStarterStyles.styles';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\nimport type { PromptStarterProps } from './PromptStarter.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\n\nexport const PromptStarter: ForwardRefComponent<PromptStarterProps> = React.forwardRef((props, ref) => {\n const state = usePromptStarter_unstable(props, ref);\n\n usePromptStarterStyles_unstable(state);\n useCustomStyleHook('usePromptStarterStyles')(state);\n\n return renderPromptStarter_unstable(state);\n});\n\nPromptStarter.displayName = 'PromptStarter';\n"],"names":["PromptStarter","React","forwardRef","props","ref","state","usePromptStarter_unstable","usePromptStarterStyles_unstable","useCustomStyleHook","renderPromptStarter_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAQaA;;;eAAAA;;;;iEARU;kCACmB;qCACG;8CACG;+BACb;AAI5B,MAAMA,gBAAAA,WAAAA,GAAyDC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC7F,MAAMC,QAAQC,IAAAA,2CAAAA,EAA0BH,OAAOC;IAE/CG,IAAAA,6DAAAA,EAAgCF;IAChCG,IAAAA,iCAAAA,EAAmB,0BAA0BH;IAE7C,OAAOI,IAAAA,iDAAAA,EAA6BJ;AACtC;AAEAL,cAAcU,WAAW,GAAG"}
1
+ {"version":3,"sources":["PromptStarter.tsx"],"sourcesContent":["import * as React from 'react';\nimport { usePromptStarter_unstable } from './usePromptStarter';\nimport { renderPromptStarter_unstable } from './renderPromptStarter';\nimport { usePromptStarterStyles_unstable } from './usePromptStarterStyles.styles';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\nimport type { PromptStarterProps } from './PromptStarter.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\n\n/**\n * @deprecated Use PromptStarterV2 instead.\n * Deprecated on 10/21/2025\n */\nexport const PromptStarter: ForwardRefComponent<PromptStarterProps> = React.forwardRef((props, ref) => {\n const state = usePromptStarter_unstable(props, ref);\n\n usePromptStarterStyles_unstable(state);\n useCustomStyleHook('usePromptStarterStyles')(state);\n\n return renderPromptStarter_unstable(state);\n});\n\nPromptStarter.displayName = 'PromptStarter';\n"],"names":["PromptStarter","React","forwardRef","props","ref","state","usePromptStarter_unstable","usePromptStarterStyles_unstable","useCustomStyleHook","renderPromptStarter_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAYaA;;;eAAAA;;;;iEAZU;kCACmB;qCACG;8CACG;+BACb;AAQ5B,MAAMA,gBAAAA,WAAAA,GAAyDC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC7F,MAAMC,QAAQC,IAAAA,2CAAAA,EAA0BH,OAAOC;IAE/CG,IAAAA,6DAAAA,EAAgCF;IAChCG,IAAAA,iCAAAA,EAAmB,0BAA0BH;IAE7C,OAAOI,IAAAA,iDAAAA,EAA6BJ;AACtC;AAEAL,cAAcU,WAAW,GAAG"}
@@ -1,5 +1,7 @@
1
1
  /**
2
2
  * State used in rendering PromptStarter
3
+ * @deprecated Use PromptStarterV2 instead.
4
+ * Deprecated on 10/21/2025
3
5
  */ "use strict";
4
6
  Object.defineProperty(exports, "__esModule", {
5
7
  value: true
@@ -1 +1 @@
1
- {"version":3,"sources":["PromptStarter.types.ts"],"sourcesContent":["import type { DesignVersion } from '@fluentui-copilot/react-provider';\nimport type { ComponentProps, ComponentState, Slot, BadgeProps } from '@fluentui/react-components';\n\nexport type PromptStarterSlots = {\n root: Slot<'button'>;\n icon: NonNullable<Slot<'span'>>;\n category: NonNullable<Slot<'span'>>;\n prompt?: Slot<'span'>;\n badge?: Slot<BadgeProps>;\n};\n\n/**\n * PromptStarter Props\n */\nexport type PromptStarterProps = ComponentProps<PromptStarterSlots> & DesignVersion & {};\n\n/**\n * State used in rendering PromptStarter\n */\nexport type PromptStarterState = ComponentState<PromptStarterSlots> &\n Pick<Required<PromptStarterProps>, 'designVersion'>;\n"],"names":[],"rangeMappings":";;","mappings":"AAgBA;;CAEC"}
1
+ {"version":3,"sources":["PromptStarter.types.ts"],"sourcesContent":["import type { DesignVersion } from '@fluentui-copilot/react-provider';\nimport type { ComponentProps, ComponentState, Slot, BadgeProps } from '@fluentui/react-components';\n\n/**\n * @deprecated Use PromptStarterV2 instead.\n * Deprecated on 10/21/2025\n */\nexport type PromptStarterSlots = {\n root: Slot<'button'>;\n icon: NonNullable<Slot<'span'>>;\n category: NonNullable<Slot<'span'>>;\n prompt?: Slot<'span'>;\n badge?: Slot<BadgeProps>;\n};\n\n/**\n * PromptStarter Props\n * @deprecated Use PromptStarterV2 instead.\n * Deprecated on 10/21/2025\n */\nexport type PromptStarterProps = ComponentProps<PromptStarterSlots> & DesignVersion & {};\n\n/**\n * State used in rendering PromptStarter\n * @deprecated Use PromptStarterV2 instead.\n * Deprecated on 10/21/2025\n */\nexport type PromptStarterState = ComponentState<PromptStarterSlots> &\n Pick<Required<PromptStarterProps>, 'designVersion'>;\n"],"names":[],"rangeMappings":";;;;","mappings":"AAsBA;;;;CAIC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["renderPromptStarter.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport type { PromptStarterState, PromptStarterSlots } from './PromptStarter.types';\n\nexport const renderPromptStarter_unstable = (state: PromptStarterState) => {\n assertSlots<PromptStarterSlots>(state);\n\n return (\n <state.root>\n <state.icon />\n <state.category>\n {state.category.children} {state.badge && <state.badge />}\n </state.category>\n {state.prompt && <state.prompt />}\n </state.root>\n );\n};\n"],"names":["renderPromptStarter_unstable","state","assertSlots","_jsxs","root","_jsx","icon","category","children","badge","prompt"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAMaA;;;eAAAA;;;4BALb;iCAE4B;AAGrB,MAAMA,+BAA+B,CAACC;IAC3CC,IAAAA,4BAAAA,EAAgCD;IAEhC,OAAA,WAAA,GACEE,IAAAA,gBAAA,EAACF,MAAMG,IAAI,EAAA;;0BACTC,IAAAA,eAAA,EAACJ,MAAMK,IAAI,EAAA,CAAA;0BACXH,IAAAA,gBAAA,EAACF,MAAMM,QAAQ,EAAA;;oBACZN,MAAMM,QAAQ,CAACC,QAAQ;oBAAC;oBAAEP,MAAMQ,KAAK,IAAA,WAAA,GAAIJ,IAAAA,eAAA,EAACJ,MAAMQ,KAAK,EAAA,CAAA;;;YAEvDR,MAAMS,MAAM,IAAA,WAAA,GAAIL,IAAAA,eAAA,EAACJ,MAAMS,MAAM,EAAA,CAAA;;;AAGpC"}
1
+ {"version":3,"sources":["renderPromptStarter.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport type { JSXElement } from '@fluentui/react-components';\nimport type { PromptStarterState, PromptStarterSlots } from './PromptStarter.types';\n\n/**\n * @deprecated Use PromptStarterV2 instead.\n * Deprecated on 10/21/2025\n */\nexport const renderPromptStarter_unstable = (state: PromptStarterState): JSXElement => {\n assertSlots<PromptStarterSlots>(state);\n\n return (\n <state.root>\n <state.icon />\n <state.category>\n {state.category.children} {state.badge && <state.badge />}\n </state.category>\n {state.prompt && <state.prompt />}\n </state.root>\n );\n};\n"],"names":["renderPromptStarter_unstable","state","assertSlots","_jsxs","root","_jsx","icon","category","children","badge","prompt"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWaA;;;eAAAA;;;4BAVb;iCAE4B;AAQrB,MAAMA,+BAA+B,CAACC;IAC3CC,IAAAA,4BAAAA,EAAgCD;IAEhC,OAAA,WAAA,GACEE,IAAAA,gBAAA,EAACF,MAAMG,IAAI,EAAA;;0BACTC,IAAAA,eAAA,EAACJ,MAAMK,IAAI,EAAA,CAAA;0BACXH,IAAAA,gBAAA,EAACF,MAAMM,QAAQ,EAAA;;oBACZN,MAAMM,QAAQ,CAACC,QAAQ;oBAAC;oBAAEP,MAAMQ,KAAK,IAAA,WAAA,GAAIJ,IAAAA,eAAA,EAACJ,MAAMQ,KAAK,EAAA,CAAA;;;YAEvDR,MAAMS,MAAM,IAAA,WAAA,GAAIL,IAAAA,eAAA,EAACJ,MAAMS,MAAM,EAAA,CAAA;;;AAGpC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["usePromptStarter.ts"],"sourcesContent":["import { useDesignVersion } from '@fluentui-copilot/react-provider';\nimport { Badge, 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<HTMLButtonElement>,\n): PromptStarterState => {\n const designVersion = useDesignVersion(props.designVersion);\n const idPrefix = useId('prompt-starter');\n\n return {\n components: {\n root: 'button',\n icon: 'span',\n category: 'span',\n prompt: 'span',\n badge: Badge,\n },\n root: slot.always(\n getIntrinsicElementProps('button', {\n ref,\n 'aria-labelledby': `${idPrefix}-category`,\n 'aria-describedby': `${idPrefix}-prompt`,\n ...props,\n }),\n { elementType: 'button' },\n ),\n icon: slot.always(props.icon, { elementType: 'span' }),\n category: slot.always(props.category, { defaultProps: { id: `${idPrefix}-category` }, elementType: 'span' }),\n prompt: slot.optional(props.prompt, { defaultProps: { id: `${idPrefix}-prompt` }, elementType: 'span' }),\n badge: slot.optional(props.badge, { defaultProps: { appearance: 'tint' }, elementType: Badge }),\n designVersion,\n };\n};\n"],"names":["usePromptStarter_unstable","props","ref","designVersion","useDesignVersion","idPrefix","useId","components","root","icon","category","prompt","badge","Badge","slot","always","getIntrinsicElementProps","elementType","defaultProps","id","optional","appearance"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAaaA;;;eAAAA;;;+BAboB;iCAC4B;AAYtD,MAAMA,4BAA4B,CACvCC,OACAC;IAEA,MAAMC,gBAAgBC,IAAAA,+BAAAA,EAAiBH,MAAME,aAAa;IAC1D,MAAME,WAAWC,IAAAA,sBAAAA,EAAM;IAEvB,OAAO;QACLC,YAAY;YACVC,MAAM;YACNC,MAAM;YACNC,UAAU;YACVC,QAAQ;YACRC,OAAOC,sBAAAA;QACT;QACAL,MAAMM,qBAAAA,CAAKC,MAAM,CACfC,IAAAA,yCAAAA,EAAyB,UAAU;YACjCd;YACA,mBAAmB,CAAC,EAAEG,SAAS,SAAS,CAAC;YACzC,oBAAoB,CAAC,EAAEA,SAAS,OAAO,CAAC;YACxC,GAAGJ,KAAK;QACV,IACA;YAAEgB,aAAa;QAAS;QAE1BR,MAAMK,qBAAAA,CAAKC,MAAM,CAACd,MAAMQ,IAAI,EAAE;YAAEQ,aAAa;QAAO;QACpDP,UAAUI,qBAAAA,CAAKC,MAAM,CAACd,MAAMS,QAAQ,EAAE;YAAEQ,cAAc;gBAAEC,IAAI,CAAC,EAAEd,SAAS,SAAS,CAAC;YAAC;YAAGY,aAAa;QAAO;QAC1GN,QAAQG,qBAAAA,CAAKM,QAAQ,CAACnB,MAAMU,MAAM,EAAE;YAAEO,cAAc;gBAAEC,IAAI,CAAC,EAAEd,SAAS,OAAO,CAAC;YAAC;YAAGY,aAAa;QAAO;QACtGL,OAAOE,qBAAAA,CAAKM,QAAQ,CAACnB,MAAMW,KAAK,EAAE;YAAEM,cAAc;gBAAEG,YAAY;YAAO;YAAGJ,aAAaJ,sBAAAA;QAAM;QAC7FV;IACF;AACF"}
1
+ {"version":3,"sources":["usePromptStarter.ts"],"sourcesContent":["import { useDesignVersion } from '@fluentui-copilot/react-provider';\nimport { Badge, 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 * @deprecated Use PromptStarterV2 instead.\n * Deprecated on 10/21/2025\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<HTMLButtonElement>,\n): PromptStarterState => {\n const designVersion = useDesignVersion(props.designVersion);\n const idPrefix = useId('prompt-starter');\n\n return {\n components: {\n root: 'button',\n icon: 'span',\n category: 'span',\n prompt: 'span',\n badge: Badge,\n },\n root: slot.always(\n getIntrinsicElementProps('button', {\n ref,\n 'aria-labelledby': `${idPrefix}-category`,\n 'aria-describedby': `${idPrefix}-prompt`,\n ...props,\n }),\n { elementType: 'button' },\n ),\n icon: slot.always(props.icon, { elementType: 'span' }),\n category: slot.always(props.category, { defaultProps: { id: `${idPrefix}-category` }, elementType: 'span' }),\n prompt: slot.optional(props.prompt, { defaultProps: { id: `${idPrefix}-prompt` }, elementType: 'span' }),\n badge: slot.optional(props.badge, { defaultProps: { appearance: 'tint' }, elementType: Badge }),\n designVersion,\n };\n};\n"],"names":["usePromptStarter_unstable","props","ref","designVersion","useDesignVersion","idPrefix","useId","components","root","icon","category","prompt","badge","Badge","slot","always","getIntrinsicElementProps","elementType","defaultProps","id","optional","appearance"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAgBaA;;;eAAAA;;;+BAhBoB;iCAC4B;AAetD,MAAMA,4BAA4B,CACvCC,OACAC;IAEA,MAAMC,gBAAgBC,IAAAA,+BAAAA,EAAiBH,MAAME,aAAa;IAC1D,MAAME,WAAWC,IAAAA,sBAAAA,EAAM;IAEvB,OAAO;QACLC,YAAY;YACVC,MAAM;YACNC,MAAM;YACNC,UAAU;YACVC,QAAQ;YACRC,OAAOC,sBAAAA;QACT;QACAL,MAAMM,qBAAAA,CAAKC,MAAM,CACfC,IAAAA,yCAAAA,EAAyB,UAAU;YACjCd;YACA,mBAAmB,CAAC,EAAEG,SAAS,SAAS,CAAC;YACzC,oBAAoB,CAAC,EAAEA,SAAS,OAAO,CAAC;YACxC,GAAGJ,KAAK;QACV,IACA;YAAEgB,aAAa;QAAS;QAE1BR,MAAMK,qBAAAA,CAAKC,MAAM,CAACd,MAAMQ,IAAI,EAAE;YAAEQ,aAAa;QAAO;QACpDP,UAAUI,qBAAAA,CAAKC,MAAM,CAACd,MAAMS,QAAQ,EAAE;YAAEQ,cAAc;gBAAEC,IAAI,CAAC,EAAEd,SAAS,SAAS,CAAC;YAAC;YAAGY,aAAa;QAAO;QAC1GN,QAAQG,qBAAAA,CAAKM,QAAQ,CAACnB,MAAMU,MAAM,EAAE;YAAEO,cAAc;gBAAEC,IAAI,CAAC,EAAEd,SAAS,OAAO,CAAC;YAAC;YAAGY,aAAa;QAAO;QACtGL,OAAOE,qBAAAA,CAAKM,QAAQ,CAACnB,MAAMW,KAAK,EAAE;YAAEM,cAAc;gBAAEG,YAAY;YAAO;YAAGJ,aAAaJ,sBAAAA;QAAM;QAC7FV;IACF;AACF"}
@@ -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 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":["promptStarterClassNames","root","category","icon","prompt","badge","useRootResetStyles","makeResetStyles","position","display","gridTemplateRows","gridTemplateAreas","B4j52fo","backgroundColor","tokens","colorNeutralBackground1","color","fontFamily","fontFamilyBase","cursor","outlineStyle","textAlign","gap","padding","h3c5rm","shorthands","strokeWidthThin","borderRadius","zhjwy3","B2zwrfe","xv9156","colorNeutralBackground1Pressed","Bop6t4b","gvrnp0","createFocusOutlineStyle","Beu9t3s","Bgoe8wy","useStyles","disabled","colorNeutralBackgroundDisabled","B6oc9vd","gridArea","typographyStyles","Ijaq50","disabledText","Be2twd7","disabledBadge","opacity","Bw0ie65","Br312pm","nk6f5a","useNextStyles","Bahqtrf","usePromptStarterStyles_unstable","Bhrd7zp","designVersion","Bg96gwp","styles","nextStyles","rootResetStyles","state","sj55zd","abs64n"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAYaA,uBAAAA;eAAAA;;;;;;iCANY;AAMlB,MAAMA,0BAA8D;UACzEC;cACAC;UACAC;YACAC;WACAC;AACF;AAEA,MAAMC,qBAAqBC,IAAAA,8BAAAA,EAAAA,YAAgB,YAAA;OACzCC;QAAAA;QAAU;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA;OACVC;QAAAA;QAAS;KAAA;;MAETC,YAAAA,IAAAA,yBAAkB,EAAA;cAClBC;;;QAGCC,SAAA;QACDC,SAAAA;YAAAA;YAAiBC;SAAOC;QACxBC,SAAOF;QACPG,QAAAA;YAAAA;YAAmBC;SAAAA;QACnBC,QAAQ;QACRC,QAAAA;YAAAA;YAAc;SAAA;QACdC,QAAAA;QACAC,QAAK;YAAA;YAAA;SAAA;QACLC,QAAAA;QACAC,QAAGC;YAAAA;YAAiB;SAAQC;QAC5BC,SAAAA;QACAC,QAAA;YAAA;YAAW;SAAA;gBACTf;gBACGY;QACLI,SAAA;YAAA;YAAA;SAAA;QACAC,QAAA;gBACEjB;YAAAA;YAAiBC;SAAOiB;iBACrBN;QACLO,SAAA;YAAA;YAAA;SAAA;QACAC,QAAGC;QACLC,SAAA;YAAA;YAAA;SAAA;QAEAC,SAAMC;QACJC,SAAAA;YAAU;YAAA;SAAA;gBACRnB;gBACAN;YAAAA;YAAiBC;SAAOyB;gBACrBd;gBACH;iBACEZ;YAAAA;YAAAA;SAAwB0B;iBACxB;gBACF;YAAA;YAAA;SAAA;gBACA;iBACE1B;YAAAA;YAAAA;SAAwB0B;iBACxB;gBACF;YAAA;YAAA;SAAA;QACFC,SAAA;QACArC,QAAM;YAAA;YAAA;SAAA;gBAAEsC;iBAAkBhC;YAAAA;YAAS;SAAA;;UAA4B;QAE/DP,SAAAA;iBACKwC;gBACHD;QACFE,QAAA;QACAvC,SAAQ;gBAAKsC;gBAAwBD;;cACrCG;iBACE5B;QACF6B,SAAA;QACAC,SAAAA;iBACEC;QACFC,SAAA;QACFC,SAAA;QAEAC,QAAMC;QAA6BlD,QAAM;iBAAE0B;;IAA0CvB,QAAA;QAErFgD,SAAaC;QACXR,SAAA;QAEAS,SAAQC;QAERC,SAAMC;QACNT,SAAMU;QACNT,SAAMU;QACNC,QAAM3D;QAON2D,QAAMzD;QAMNyD,SAAM1D;;kBAOEE;QAMRyD,QAAA;;mBAEQxD;QAKRyD,QAAA;;AAGF,GAAE"}
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\n/**\n * @deprecated Use PromptStarterV2 instead.\n * Deprecated on 10/21/2025\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":["promptStarterClassNames","root","category","icon","prompt","badge","useRootResetStyles","makeResetStyles","position","display","gridTemplateRows","gridTemplateAreas","B4j52fo","backgroundColor","tokens","colorNeutralBackground1","color","fontFamily","fontFamilyBase","cursor","outlineStyle","textAlign","gap","padding","h3c5rm","shorthands","strokeWidthThin","borderRadius","zhjwy3","B2zwrfe","xv9156","colorNeutralBackground1Pressed","Bop6t4b","gvrnp0","createFocusOutlineStyle","Beu9t3s","Bgoe8wy","useStyles","disabled","colorNeutralBackgroundDisabled","B6oc9vd","gridArea","typographyStyles","Ijaq50","disabledText","Be2twd7","disabledBadge","opacity","Bw0ie65","Br312pm","nk6f5a","useNextStyles","Bahqtrf","Bg96gwp","designVersion","styles","nextStyles","Bq1tomu","rootResetStyles","className","state","abs64n","p"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,QAAA;QACAvC,SAAQ;gBAAKsC;gBAAwBD;;cACrCG;iBACE5B;QACF6B,SAAA;QACAC,SAAAA;iBACEC;QACFC,SAAA;QACFC,SAAA;QAEAC,QAAMC;QAA6BlD,QAAM;iBAAE0B;;IAA0CvB,QAAA;QAErFgD,SAAA;;;QAIAC,SAAO;QACLL,SAAA;QAEAC,SAAQK;QAERJ,QAAMK;QACNZ,QAAMa;QACNC,SAAMC;;kBAQKC;QAMXC,QAAM1D;;mBAOEE;QAMRyD,QAAA;;;OAOA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;YAAA;YAAA;gBAEAC,GAAA,CAAA;YACA;SAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;YAAA;YAAA"}
@@ -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 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":["promptStarterClassNames","usePromptStarterStyles_unstable","root","category","icon","prompt","badge","useRootResetStyles","makeResetStyles","position","display","gridTemplateColumns","gridTemplateRows","gridTemplateAreas","backgroundColor","tokens","colorNeutralBackground1","color","colorNeutralForeground1","fontFamily","fontFamilyBase","cursor","outlineStyle","textAlign","gap","padding","shorthands","border","strokeWidthThin","colorNeutralStroke1","borderRadius","borderRadiusMedium","colorNeutralBackground1Hover","colorNeutralStroke1Hover","colorNeutralBackground1Pressed","colorNeutralStroke1Pressed","createFocusOutlineStyle","useStyles","makeStyles","disabled","colorNeutralBackgroundDisabled","colorNeutralStrokeDisabled","gridArea","alignSelf","typographyStyles","body1Strong","body1","disabledText","colorNeutralForegroundDisabled","disabledBadge","opacity","useNextStyles","borderRadiusXLarge","state","designVersion","styles","nextStyles","rootResetStyles","className","mergeClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAYaA,uBAAAA;eAAAA;;IAqEAC,+BAAAA;eAAAA;;;iCA1EN;wBACgB;AAIhB,MAAMD,0BAA8D;IACzEE,MAAM;IACNC,UAAU;IACVC,MAAM;IACNC,QAAQ;IACRC,OAAO;AACT;AAEA,MAAMC,qBAAqBC,IAAAA,gCAAAA,EAAgB;IACzCC,UAAU;IACVC,SAAS;IACTC,qBAAqB;IACr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Y;IAE5C,IAAIM,MAAMhD,MAAM,EAAE;QAChBgD,MAAMhD,MAAM,CAACqD,SAAS,GAAGC,IAAAA,6BAAAA,EACvB3D,wBAAwBK,MAAM,EAC9BkD,OAAOlD,MAAM,EACbgD,MAAMnD,IAAI,CAACqC,QAAQ,IAAIgB,OAAOR,YAAY,EAC1CM,MAAMhD,MAAM,CAACqD,SAAS;IAE1B;IACA,IAAIL,MAAM/C,KAAK,EAAE;QACf+C,MAAM/C,KAAK,CAACoD,SAAS,GAAGC,IAAAA,6BAAAA,EACtB3D,wBAAwBM,KAAK,EAC7B+C,MAAMnD,IAAI,CAACqC,QAAQ,IAAIgB,OAAON,aAAa,EAC3CI,MAAM/C,KAAK,CAACoD,SAAS;IAEzB;IAEA,OAAOL;AACT"}
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\n/**\n * @deprecated Use PromptStarterV2 instead.\n * Deprecated on 10/21/2025\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":["promptStarterClassNames","usePromptStarterStyles_unstable","root","category","icon","prompt","badge","useRootResetStyles","makeResetStyles","position","display","gridTemplateColumns","gridTemplateRows","gridTemplateAreas","backgroundColor","tokens","colorNeutralBackground1","color","colorNeutralForeground1","fontFamily","fontFamilyBase","cursor","outlineStyle","textAlign","gap","padding","shorthands","border","strokeWidthThin","colorNeutralStroke1","borderRadius","borderRadiusMedium","colorNeutralBackground1Hover","colorNeutralStroke1Hover","colorNeutralBackground1Pressed","colorNeutralStroke1Pressed","createFocusOutlineStyle","useStyles","makeStyles","disabled","colorNeutralBackgroundDisabled","colorNeutralStrokeDisabled","gridArea","alignSelf","typographyStyles","body1Strong","body1","disabledText","colorNeutralForegroundDisabled","disabledBadge","opacity","useNextStyles","borderRadiusXLarge","state","designVersion","styles","nextStyles","rootResetStyles","className","mergeClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAYaA,uBAAAA;eAAAA;;IAyEAC,+BAAAA;eAAAA;;;iCA9EN;wBACgB;AAIhB,MAAMD,0BAA8D;IACzEE,MAAM;IACNC,UAAU;IACVC,MAAM;IACNC,QAAQ;IACRC,OAAO;AACT;AAEA,MAAMC,qBAAqBC,IAAAA,gCAAAA,EAAgB;IACzCC,UAAU;IACVC,SAAS;IACTC,qBAAqB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,YAAY;IAE5C,IAAIM,MAAMhD,MAAM,EAAE;QAChBgD,MAAMhD,MAAM,CAACqD,SAAS,GAAGC,IAAAA,6BAAAA,EACvB3D,wBAAwBK,MAAM,EAC9BkD,OAAOlD,MAAM,EACbgD,MAAMnD,IAAI,CAACqC,QAAQ,IAAIgB,OAAOR,YAAY,EAC1CM,MAAMhD,MAAM,CAACqD,SAAS;IAE1B;IACA,IAAIL,MAAM/C,KAAK,EAAE;QACf+C,MAAM/C,KAAK,CAACoD,SAAS,GAAGC,IAAAA,6BAAAA,EACtB3D,wBAAwBM,KAAK,EAC7B+C,MAAMnD,IAAI,CAACqC,QAAQ,IAAIgB,OAAON,aAAa,EAC3CI,MAAM/C,KAAK,CAACoD,SAAS;IAEzB;IAEA,OAAOL;AACT"}
@@ -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?: 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"}
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?: Slot<'span'>;\n category?: 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":"AAiBA;;CAEC"}
@@ -17,6 +17,7 @@ const renderPromptStarter_unstable = (state)=>{
17
17
  /*#__PURE__*/ (0, _jsxruntime.jsxs)(state.primaryAction, {
18
18
  children: [
19
19
  state.icon && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.icon, {}),
20
+ state.category && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.category, {}),
20
21
  /*#__PURE__*/ (0, _jsxruntime.jsx)(state.prompt, {}),
21
22
  state.reasonMarker && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.reasonMarker, {})
22
23
  ]
@@ -1 +1 @@
1
- {"version":3,"sources":["renderPromptStarter.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport type { PromptStarterState, PromptStarterSlots } from './PromptStarter.types';\n\nexport const renderPromptStarter_unstable = (state: PromptStarterState) => {\n assertSlots<PromptStarterSlots>(state);\n\n return (\n <state.root>\n <state.primaryAction>\n {state.icon && <state.icon />}\n <state.prompt />\n {state.reasonMarker && <state.reasonMarker />}\n </state.primaryAction>\n {state.actions && <state.actions />}\n </state.root>\n );\n};\n"],"names":["renderPromptStarter_unstable","state","assertSlots","_jsxs","root","primaryAction","icon","_jsx","prompt","reasonMarker","actions"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAMaA;;;eAAAA;;;4BALb;iCAE4B;AAGrB,MAAMA,+BAA+B,CAACC;IAC3CC,IAAAA,4BAAAA,EAAgCD;IAEhC,OAAA,WAAA,GACEE,IAAAA,gBAAA,EAACF,MAAMG,IAAI,EAAA;;0BACTD,IAAAA,gBAAA,EAACF,MAAMI,aAAa,EAAA;;oBACjBJ,MAAMK,IAAI,IAAA,WAAA,GAAIC,IAAAA,eAAA,EAACN,MAAMK,IAAI,EAAA,CAAA;kCAC1BC,IAAAA,eAAA,EAACN,MAAMO,MAAM,EAAA,CAAA;oBACZP,MAAMQ,YAAY,IAAA,WAAA,GAAIF,IAAAA,eAAA,EAACN,MAAMQ,YAAY,EAAA,CAAA;;;YAE3CR,MAAMS,OAAO,IAAA,WAAA,GAAIH,IAAAA,eAAA,EAACN,MAAMS,OAAO,EAAA,CAAA;;;AAGtC"}
1
+ {"version":3,"sources":["renderPromptStarter.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport type { JSXElement } from '@fluentui/react-components';\nimport type { PromptStarterState, PromptStarterSlots } from './PromptStarter.types';\n\nexport const renderPromptStarter_unstable = (state: PromptStarterState): JSXElement => {\n assertSlots<PromptStarterSlots>(state);\n\n return (\n <state.root>\n <state.primaryAction>\n {state.icon && <state.icon />}\n {state.category && <state.category />}\n <state.prompt />\n {state.reasonMarker && <state.reasonMarker />}\n </state.primaryAction>\n {state.actions && <state.actions />}\n </state.root>\n );\n};\n"],"names":["renderPromptStarter_unstable","state","assertSlots","_jsxs","root","primaryAction","icon","_jsx","category","prompt","reasonMarker","actions"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAOaA;;;eAAAA;;;4BANb;iCAE4B;AAIrB,MAAMA,+BAA+B,CAACC;IAC3CC,IAAAA,4BAAAA,EAAgCD;IAEhC,OAAA,WAAA,GACEE,IAAAA,gBAAA,EAACF,MAAMG,IAAI,EAAA;;0BACTD,IAAAA,gBAAA,EAACF,MAAMI,aAAa,EAAA;;oBACjBJ,MAAMK,IAAI,IAAA,WAAA,GAAIC,IAAAA,eAAA,EAACN,MAAMK,IAAI,EAAA,CAAA;oBACzBL,MAAMO,QAAQ,IAAA,WAAA,GAAID,IAAAA,eAAA,EAACN,MAAMO,QAAQ,EAAA,CAAA;kCAClCD,IAAAA,eAAA,EAACN,MAAMQ,MAAM,EAAA,CAAA;oBACZR,MAAMS,YAAY,IAAA,WAAA,GAAIH,IAAAA,eAAA,EAACN,MAAMS,YAAY,EAAA,CAAA;;;YAE3CT,MAAMU,OAAO,IAAA,WAAA,GAAIJ,IAAAA,eAAA,EAACN,MAAMU,OAAO,EAAA,CAAA;;;AAGtC"}
@@ -23,6 +23,7 @@ const usePromptStarter_unstable = (props, ref)=>{
23
23
  root: 'div',
24
24
  primaryAction: 'button',
25
25
  icon: 'span',
26
+ category: 'span',
26
27
  prompt: 'span',
27
28
  reasonMarker: 'span',
28
29
  actions: 'span'
@@ -37,7 +38,7 @@ const usePromptStarter_unstable = (props, ref)=>{
37
38
  }),
38
39
  primaryAction: _reactcomponents.slot.always(props.primaryAction, {
39
40
  defaultProps: {
40
- 'aria-labelledby': `${id}-prompt`,
41
+ 'aria-labelledby': `${id}-category ${id}-prompt`,
41
42
  'aria-describedby': `${id}-icon ${id}-reasonMarker`
42
43
  },
43
44
  elementType: 'button'
@@ -48,6 +49,12 @@ const usePromptStarter_unstable = (props, ref)=>{
48
49
  },
49
50
  elementType: 'span'
50
51
  }) : undefined,
52
+ category: _reactcomponents.slot.optional(props.category, {
53
+ defaultProps: {
54
+ id: `${id}-category`
55
+ },
56
+ elementType: 'span'
57
+ }),
51
58
  prompt: _reactcomponents.slot.always(props.prompt, {
52
59
  defaultProps: {
53
60
  id: `${id}-prompt`
@@ -1 +1 @@
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 // if this is defined, the context exists and the Prompt is within PromptStarterList\n const isWithinList = typeof numberOfColumns === 'number';\n\n const isSingleColumn = numberOfColumns === 1;\n\n const state: PromptStarterState = {\n isSingleColumn,\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 role: isWithinList ? 'listitem' : undefined,\n ...focusAttrs,\n ...props,\n }),\n { elementType: 'div' },\n ),\n primaryAction: slot.always(props.primaryAction, {\n defaultProps: {\n 'aria-labelledby': `${id}-prompt`,\n 'aria-describedby': `${id}-icon ${id}-reasonMarker`,\n },\n elementType: 'button',\n }),\n icon: !isSingleColumn\n ? slot.optional(props.icon, {\n defaultProps: { id: `${id}-icon` },\n elementType: 'span',\n })\n : undefined,\n prompt: slot.always(props.prompt, {\n defaultProps: { id: `${id}-prompt` },\n elementType: 'span',\n }),\n reasonMarker: !isSingleColumn\n ? slot.optional(props.reasonMarker, {\n defaultProps: { id: `${id}-reasonMarker` },\n elementType: 'span',\n })\n : undefined,\n actions: !isSingleColumn ? slot.optional(props.actions, { elementType: 'span' }) : undefined,\n };\n\n return state;\n};\n"],"names":["usePromptStarter_unstable","props","ref","id","useId","focusAttrs","useFocusableGroup","numberOfColumns","usePromptStarterListContext","ctx","isWithinList","isSingleColumn","state","components","root","primaryAction","icon","prompt","reasonMarker","actions","slot","always","getIntrinsicElementProps","role","undefined","elementType","defaultProps","optional"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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B,YAAY,EAAE;YAChCQ,cAAc;gBAAEvB,IAAI,CAAC,EAAEA,GAAG,aAAa,CAAC;YAAC;YACzCsB,aAAa;QACf,KACAD;QACJL,SAAS,CAACR,iBAAiBS,qBAAAA,CAAKO,QAAQ,CAAC1B,MAAMkB,OAAO,EAAE;YAAEM,aAAa;QAAO,KAAKD;IACrF;IAEA,OAAOZ;AACT"}
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 // if this is defined, the context exists and the Prompt is within PromptStarterList\n const isWithinList = typeof numberOfColumns === 'number';\n\n const isSingleColumn = numberOfColumns === 1;\n\n const state: PromptStarterState = {\n isSingleColumn,\n components: {\n root: 'div',\n primaryAction: 'button',\n icon: 'span',\n category: 'span',\n prompt: 'span',\n reasonMarker: 'span',\n actions: 'span',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n role: isWithinList ? 'listitem' : undefined,\n ...focusAttrs,\n ...props,\n }),\n { elementType: 'div' },\n ),\n primaryAction: slot.always(props.primaryAction, {\n defaultProps: {\n 'aria-labelledby': `${id}-category ${id}-prompt`,\n 'aria-describedby': `${id}-icon ${id}-reasonMarker`,\n },\n elementType: 'button',\n }),\n icon: !isSingleColumn\n ? slot.optional(props.icon, {\n defaultProps: { id: `${id}-icon` },\n elementType: 'span',\n })\n : undefined,\n category: slot.optional(props.category, {\n defaultProps: { id: `${id}-category` },\n elementType: 'span',\n }),\n prompt: slot.always(props.prompt, {\n defaultProps: { id: `${id}-prompt` },\n elementType: 'span',\n }),\n reasonMarker: !isSingleColumn\n ? slot.optional(props.reasonMarker, {\n defaultProps: { id: `${id}-reasonMarker` },\n elementType: 'span',\n })\n : undefined,\n actions: !isSingleColumn ? slot.optional(props.actions, { elementType: 'span' }) : undefined,\n };\n\n return state;\n};\n"],"names":["usePromptStarter_unstable","props","ref","id","useId","focusAttrs","useFocusableGroup","numberOfColumns","usePromptStarterListContext","ctx","isWithinList","isSingleColumn","state","components","root","primaryAction","icon","category","prompt","reasonMarker","actions","slot","always","getIntrinsicElementProps","role","undefined","elementType","defaultProps","optional"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAaaA;;;eAAAA;;;iCAb4D;0CAC7B;AAYrC,MAAMA,4BAA4B,CACvCC,OACAC;IAEA,MAAMC,KAAKC,IAAAA,sBAAAA,EAAM;IACjB,MAAMC,aAAaC,IAAAA,kCAAAA;IAEnB,MAAMC,kBAAkBC,IAAAA,qDAAAA,EAA4BC,CAAAA,MAAOA,IAAIF,eAAe;IAC9E,oFAAoF;IACpF,MAAMG,eAAe,OAAOH,oBAAoB;IAEhD,MAAMI,iBAAiBJ,oBAAoB;IAE3C,MAAMK,QAA4B;QAChCD;QACAE,YAAY;YACVC,MAAM;YACNC,eAAe;YACfC,MAAM;YACNC,UAAU;YACVC,QAAQ;YACRC,cAAc;YACdC,SAAS;QACX;QACAN,MAAMO,qBAAAA,CAAKC,MAAM,CACfC,IAAAA,yCAAAA,EAAyB,OAAO;YAC9BrB;YACAsB,MAAMd,eAAe,aAAae;YAClC,GAAGpB,UAAU;YACb,GAAGJ,KAAK;QACV,IACA;YAAEyB,aAAa;QA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