@fluentui-copilot/react-prompt-starter 0.0.0-nightly-20250610-0405-e23ffd06.1 → 0.0.0-nightly-20250611-0405-d9945da4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/CHANGELOG.json +3 -3
  2. package/CHANGELOG.md +4 -4
  3. package/dist/index.d.ts +73 -2
  4. package/lib/PromptStarterList.js +2 -0
  5. package/lib/PromptStarterList.js.map +1 -0
  6. package/lib/components/PromptStarterV2/PromptStarter/PromptStarter.types.js.map +1 -1
  7. package/lib/components/PromptStarterV2/PromptStarter/promptStarterMotion.js +43 -0
  8. package/lib/components/PromptStarterV2/PromptStarter/promptStarterMotion.js.map +1 -0
  9. package/lib/components/PromptStarterV2/PromptStarter/usePromptStarter.js +6 -1
  10. package/lib/components/PromptStarterV2/PromptStarter/usePromptStarter.js.map +1 -1
  11. package/lib/components/PromptStarterV2/PromptStarter/usePromptStarterStyles.styles.js +13 -12
  12. package/lib/components/PromptStarterV2/PromptStarter/usePromptStarterStyles.styles.js.map +1 -1
  13. package/lib/components/PromptStarterV2/PromptStarterList/PromptStarterList.js +13 -0
  14. package/lib/components/PromptStarterV2/PromptStarterList/PromptStarterList.js.map +1 -0
  15. package/lib/components/PromptStarterV2/PromptStarterList/PromptStarterList.types.js +2 -0
  16. package/lib/components/PromptStarterV2/PromptStarterList/PromptStarterList.types.js.map +1 -0
  17. package/lib/components/PromptStarterV2/PromptStarterList/index.js +5 -0
  18. package/lib/components/PromptStarterV2/PromptStarterList/index.js.map +1 -0
  19. package/lib/components/PromptStarterV2/PromptStarterList/renderPromptStarterList.js +20 -0
  20. package/lib/components/PromptStarterV2/PromptStarterList/renderPromptStarterList.js.map +1 -0
  21. package/lib/components/PromptStarterV2/PromptStarterList/usePromptStarterList.js +114 -0
  22. package/lib/components/PromptStarterV2/PromptStarterList/usePromptStarterList.js.map +1 -0
  23. package/lib/components/PromptStarterV2/PromptStarterList/usePromptStarterListContextValues.js +9 -0
  24. package/lib/components/PromptStarterV2/PromptStarterList/usePromptStarterListContextValues.js.map +1 -0
  25. package/lib/components/PromptStarterV2/PromptStarterList/usePromptStarterListStyles.styles.js +57 -0
  26. package/lib/components/PromptStarterV2/PromptStarterList/usePromptStarterListStyles.styles.js.map +1 -0
  27. package/lib/contexts/PromptStarterListContext.js +8 -0
  28. package/lib/contexts/PromptStarterListContext.js.map +1 -0
  29. package/lib/index.js +1 -0
  30. package/lib/index.js.map +1 -1
  31. package/lib-commonjs/PromptStarterList.js +29 -0
  32. package/lib-commonjs/PromptStarterList.js.map +1 -0
  33. package/lib-commonjs/components/PromptStarterV2/PromptStarter/PromptStarter.types.js.map +1 -1
  34. package/lib-commonjs/components/PromptStarterV2/PromptStarter/promptStarterMotion.js +60 -0
  35. package/lib-commonjs/components/PromptStarterV2/PromptStarter/promptStarterMotion.js.map +1 -0
  36. package/lib-commonjs/components/PromptStarterV2/PromptStarter/usePromptStarter.js +5 -0
  37. package/lib-commonjs/components/PromptStarterV2/PromptStarter/usePromptStarter.js.map +1 -1
  38. package/lib-commonjs/components/PromptStarterV2/PromptStarter/usePromptStarterStyles.styles.js +12 -16
  39. package/lib-commonjs/components/PromptStarterV2/PromptStarter/usePromptStarterStyles.styles.js.map +1 -1
  40. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/PromptStarterList.js +23 -0
  41. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/PromptStarterList.js.map +1 -0
  42. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/PromptStarterList.types.js +5 -0
  43. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/PromptStarterList.types.js.map +1 -0
  44. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/index.js +32 -0
  45. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/index.js.map +1 -0
  46. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/renderPromptStarterList.js +29 -0
  47. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/renderPromptStarterList.js.map +1 -0
  48. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterList.js +116 -0
  49. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterList.js.map +1 -0
  50. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterListContextValues.js +16 -0
  51. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterListContextValues.js.map +1 -0
  52. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterListStyles.styles.js +89 -0
  53. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterListStyles.styles.js.map +1 -0
  54. package/lib-commonjs/contexts/PromptStarterListContext.js +28 -0
  55. package/lib-commonjs/contexts/PromptStarterListContext.js.map +1 -0
  56. package/lib-commonjs/index.js +16 -0
  57. package/lib-commonjs/index.js.map +1 -1
  58. package/package.json +4 -3
@@ -0,0 +1,57 @@
1
+ import { buttonClassNames, __resetStyles, __styles, mergeClasses } from '@fluentui/react-components';
2
+ import { tokens } from '@fluentui-copilot/tokens';
3
+ export const promptStarterListClassNames = {
4
+ root: 'fai-PromptStarterList',
5
+ gridWrapper: 'fai-PromptStarterList__gridWrapper',
6
+ expandButton: 'fai-PromptStarterList__expandButton'
7
+ };
8
+ /**
9
+ * Styles for the root slot
10
+ */
11
+ const useRootClassName = __resetStyles("r1n85ojv", null, [".r1n85ojv{display:flex;flex-direction:column;max-width:772px;gap:var(--spacingHorizontalXL);}"]);
12
+ const useStyles = __styles({
13
+ gridWrapper: {
14
+ mc9l5x: "f13qh94s",
15
+ i8kkvl: 0,
16
+ Belr9w4: 0,
17
+ rmohyg: "f1p93rwu",
18
+ t4k1zu: "f4wu0r3",
19
+ Budl1dq: "fvo7o13",
20
+ Bxotwcr: "f1nkeedh"
21
+ },
22
+ expandButton: {
23
+ qb2dma: "f1locze1",
24
+ wrk2wx: "f11k2d1d",
25
+ dutsh0: "f1iwh30k",
26
+ B4u5nao: "fn63aq9",
27
+ Bbdnnc7: "fm7zj7h",
28
+ x3br3k: "fuzcl37"
29
+ },
30
+ expandButtonExpanded: {
31
+ Bs9jjb3: ["f5l68jj", "f1i29bk4"]
32
+ }
33
+ }, {
34
+ d: [".f13qh94s{display:grid;}", [".f1p93rwu{gap:var(--spacingHorizontalL);}", {
35
+ 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);}"],
37
+ h: [".fm7zj7h:hover .fui-Button__icon{color:var(--colorNeutralForeground2Hover);}", ".fuzcl37:hover:active .fui-Button__icon{color:var(--colorNeutralForeground2Pressed);}"]
38
+ });
39
+ /**
40
+ * Apply styling to the PromptStarterList slots based on the state
41
+ */
42
+ export const usePromptStarterListStyles_unstable = state => {
43
+ 'use no memo';
44
+
45
+ const {
46
+ isExpanded
47
+ } = state;
48
+ const rootClassName = useRootClassName();
49
+ const styles = useStyles();
50
+ state.root.className = mergeClasses(promptStarterListClassNames.root, rootClassName, state.root.className);
51
+ state.gridWrapper.className = mergeClasses(promptStarterListClassNames.gridWrapper, styles.gridWrapper, state.gridWrapper.className);
52
+ if (state.expandButton) {
53
+ state.expandButton.className = mergeClasses(promptStarterListClassNames.expandButton, styles.expandButton, isExpanded && styles.expandButtonExpanded, state.expandButton.className);
54
+ }
55
+ return state;
56
+ };
57
+ //# sourceMappingURL=usePromptStarterListStyles.styles.js.map
@@ -0,0 +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"}
@@ -0,0 +1,8 @@
1
+ import { createContext, useContextSelector } from '@fluentui/react-context-selector';
2
+ export const PromptStarterListContext = createContext(undefined);
3
+ const promptStarterListContextDefaultValue = {
4
+ numberOfColumns: 3
5
+ };
6
+ export const usePromptStarterListContext = selector => useContextSelector(PromptStarterListContext, (ctx = promptStarterListContextDefaultValue) => selector(ctx));
7
+ export const PromptStarterListProvider = PromptStarterListContext.Provider;
8
+ //# sourceMappingURL=PromptStarterListContext.js.map
@@ -0,0 +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"}
package/lib/index.js CHANGED
@@ -1,3 +1,4 @@
1
1
  export { PromptStarter, promptStarterClassNames, renderPromptStarter_unstable, usePromptStarterStyles_unstable, usePromptStarter_unstable } from './PromptStarter';
2
2
  export { PromptStarter as PromptStarterV2, promptStarterClassNames as promptStarterV2ClassNames, renderPromptStarter_unstable as renderPromptStarterV2_unstable, usePromptStarterStyles_unstable as usePromptStarterV2Styles_unstable, usePromptStarter_unstable as usePromptStarterV2_unstable } from './PromptStarterV2';
3
+ export { PromptStarterList, renderPromptStarterList_unstable, usePromptStarterList_unstable, promptStarterListClassNames, usePromptStarterListStyles_unstable } from './PromptStarterList';
3
4
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"sourcesContent":["export type { PromptStarterProps, PromptStarterSlots, PromptStarterState } from './PromptStarter';\nexport {\n PromptStarter,\n promptStarterClassNames,\n renderPromptStarter_unstable,\n usePromptStarterStyles_unstable,\n usePromptStarter_unstable,\n} from './PromptStarter';\n\nexport type {\n PromptStarterProps as PromptStarterV2Props,\n PromptStarterSlots as PromptStarterV2Slots,\n PromptStarterState as PromptStarterV2State,\n} from './PromptStarterV2';\nexport {\n PromptStarter as PromptStarterV2,\n promptStarterClassNames as promptStarterV2ClassNames,\n renderPromptStarter_unstable as renderPromptStarterV2_unstable,\n usePromptStarterStyles_unstable as usePromptStarterV2Styles_unstable,\n usePromptStarter_unstable as usePromptStarterV2_unstable,\n} from './PromptStarterV2';\n"],"names":["PromptStarter","promptStarterClassNames","renderPromptStarter_unstable","usePromptStarterStyles_unstable","usePromptStarter_unstable","PromptStarterV2","promptStarterV2ClassNames","renderPromptStarterV2_unstable","usePromptStarterV2Styles_unstable","usePromptStarterV2_unstable"],"rangeMappings":";","mappings":"AACA,SACEA,aAAa,EACbC,uBAAuB,EACvBC,4BAA4B,EAC5BC,+BAA+B,EAC/BC,yBAAyB,QACpB,kBAAkB;AAOzB,SACEJ,iBAAiBK,eAAe,EAChCJ,2BAA2BK,yBAAyB,EACpDJ,gCAAgCK,8BAA8B,EAC9DJ,mCAAmCK,iCAAiC,EACpEJ,6BAA6BK,2BAA2B,QACnD,oBAAoB"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export type { PromptStarterProps, PromptStarterSlots, PromptStarterState } from './PromptStarter';\nexport {\n PromptStarter,\n promptStarterClassNames,\n renderPromptStarter_unstable,\n usePromptStarterStyles_unstable,\n usePromptStarter_unstable,\n} from './PromptStarter';\n\nexport type {\n PromptStarterProps as PromptStarterV2Props,\n PromptStarterSlots as PromptStarterV2Slots,\n PromptStarterState as PromptStarterV2State,\n} from './PromptStarterV2';\nexport {\n PromptStarter as PromptStarterV2,\n promptStarterClassNames as promptStarterV2ClassNames,\n renderPromptStarter_unstable as renderPromptStarterV2_unstable,\n usePromptStarterStyles_unstable as usePromptStarterV2Styles_unstable,\n usePromptStarter_unstable as usePromptStarterV2_unstable,\n} from './PromptStarterV2';\n\nexport {\n PromptStarterList,\n renderPromptStarterList_unstable,\n usePromptStarterList_unstable,\n promptStarterListClassNames,\n usePromptStarterListStyles_unstable,\n} from './PromptStarterList';\nexport type { PromptStarterListProps, PromptStarterListSlots, PromptStarterListState } from './PromptStarterList';"],"names":["PromptStarter","promptStarterClassNames","renderPromptStarter_unstable","usePromptStarterStyles_unstable","usePromptStarter_unstable","PromptStarterV2","promptStarterV2ClassNames","renderPromptStarterV2_unstable","usePromptStarterV2Styles_unstable","usePromptStarterV2_unstable","PromptStarterList","renderPromptStarterList_unstable","usePromptStarterList_unstable","promptStarterListClassNames","usePromptStarterListStyles_unstable"],"rangeMappings":";;","mappings":"AACA,SACEA,aAAa,EACbC,uBAAuB,EACvBC,4BAA4B,EAC5BC,+BAA+B,EAC/BC,yBAAyB,QACpB,kBAAkB;AAOzB,SACEJ,iBAAiBK,eAAe,EAChCJ,2BAA2BK,yBAAyB,EACpDJ,gCAAgCK,8BAA8B,EAC9DJ,mCAAmCK,iCAAiC,EACpEJ,6BAA6BK,2BAA2B,QACnD,oBAAoB;AAE3B,SACEC,iBAAiB,EACjBC,gCAAgC,EAChCC,6BAA6B,EAC7BC,2BAA2B,EAC3BC,mCAAmC,QAC9B,sBAAsB"}
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ PromptStarterList: function() {
13
+ return _index.PromptStarterList;
14
+ },
15
+ promptStarterListClassNames: function() {
16
+ return _index.promptStarterListClassNames;
17
+ },
18
+ renderPromptStarterList_unstable: function() {
19
+ return _index.renderPromptStarterList_unstable;
20
+ },
21
+ usePromptStarterListStyles_unstable: function() {
22
+ return _index.usePromptStarterListStyles_unstable;
23
+ },
24
+ usePromptStarterList_unstable: function() {
25
+ return _index.usePromptStarterList_unstable;
26
+ }
27
+ });
28
+ const _index = require("./components/PromptStarterV2/PromptStarterList/index");
29
+ //# sourceMappingURL=PromptStarterList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["PromptStarterList.ts"],"sourcesContent":["export {\n PromptStarterList,\n renderPromptStarterList_unstable,\n usePromptStarterList_unstable,\n promptStarterListClassNames,\n usePromptStarterListStyles_unstable,\n} from './components/PromptStarterV2/PromptStarterList/index';\nexport type {\n PromptStarterListProps,\n PromptStarterListSlots,\n PromptStarterListState,\n PromptStarterListContextValue,\n} from './components/PromptStarterV2/PromptStarterList/index';\n"],"names":["PromptStarterList","promptStarterListClassNames","renderPromptStarterList_unstable","usePromptStarterListStyles_unstable","usePromptStarterList_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IACEA,iBAAiB;eAAjBA,wBAAiB;;IAGjBC,2BAA2B;eAA3BA,kCAA2B;;IAF3BC,gCAAgC;eAAhCA,uCAAgC;;IAGhCC,mCAAmC;eAAnCA,0CAAmC;;IAFnCC,6BAA6B;eAA7BA,oCAA6B;;;uBAGxB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["PromptStarter.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-components';\n\nexport type PromptStarterSlots = {\n root: NonNullable<Slot<'div'>>;\n primaryAction: NonNullable<Slot<'button'>>;\n icon: NonNullable<Slot<'span'>>;\n prompt: NonNullable<Slot<'span'>>;\n reasonMarker?: Slot<'span'>;\n actions?: Slot<'span'>;\n};\n\n/**\n * PromptStarter Props\n */\nexport type PromptStarterProps = Omit<ComponentProps<PromptStarterSlots>, 'disabled'> & {};\n\n/**\n * State used in rendering PromptStarter\n */\nexport type PromptStarterState = ComponentState<PromptStarterSlots>;\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: NonNullable<Slot<'span'>>;\n prompt: NonNullable<Slot<'span'>>;\n reasonMarker?: Slot<'span'>;\n actions?: Slot<'span'>;\n};\n\n/**\n * PromptStarter Props\n */\nexport type PromptStarterProps = Omit<ComponentProps<PromptStarterSlots>, 'disabled'>;\n\n/**\n * State used in rendering PromptStarter\n */\nexport type PromptStarterState = ComponentState<PromptStarterSlots> & {\n isSingleColumn?: boolean;\n};\n"],"names":[],"rangeMappings":";;","mappings":"AAgBA;;CAEC"}
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "PromptStarterMotion", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return PromptStarterMotion;
9
+ }
10
+ });
11
+ const _reactcomponents = require("@fluentui/react-components");
12
+ const PromptStarterMotion = (0, _reactcomponents.createPresenceComponent)(({ index, numberOfColumns })=>{
13
+ const isFirstRow = index < numberOfColumns;
14
+ const delay = isFirstRow ? index * 50 : (index - numberOfColumns) * 50;
15
+ const opacityDuration = 100;
16
+ const opacityOffset = delay / (delay + 100);
17
+ const opacityEasing = 'linear';
18
+ const scaleDuration = 500;
19
+ const scaleOffset = delay / (delay + scaleDuration);
20
+ const scaleEasing = `cubic-bezier(0.22, 1.59, 0.46, 1)`;
21
+ return {
22
+ enter: [
23
+ {
24
+ keyframes: [
25
+ {
26
+ opacity: 0
27
+ },
28
+ {
29
+ opacity: 0,
30
+ offset: opacityOffset
31
+ },
32
+ {
33
+ opacity: 1
34
+ }
35
+ ],
36
+ easing: opacityEasing,
37
+ duration: opacityDuration + delay
38
+ },
39
+ {
40
+ keyframes: [
41
+ {
42
+ transform: 'scale(0.9)'
43
+ },
44
+ {
45
+ transform: 'scale(0.9)',
46
+ offset: scaleOffset
47
+ },
48
+ {
49
+ transform: 'scale(1)'
50
+ }
51
+ ],
52
+ easing: scaleEasing,
53
+ duration: scaleDuration + delay
54
+ }
55
+ ],
56
+ exit: {
57
+ keyframes: []
58
+ }
59
+ };
60
+ }); //# sourceMappingURL=promptStarterMotion.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["promptStarterMotion.ts"],"sourcesContent":["import { createPresenceComponent } from '@fluentui/react-components';\n\nexport type PromptStarterMotionParams = { index: number; numberOfColumns: number };\n\nexport const PromptStarterMotion = createPresenceComponent<PromptStarterMotionParams>(({ index, numberOfColumns }) => {\n const isFirstRow = index < numberOfColumns;\n const delay = isFirstRow ? index * 50 : (index - numberOfColumns) * 50;\n\n const opacityDuration = 100;\n const opacityOffset = delay / (delay + 100);\n const opacityEasing = 'linear';\n\n const scaleDuration = 500;\n const scaleOffset = delay / (delay + scaleDuration);\n const scaleEasing = `cubic-bezier(0.22, 1.59, 0.46, 1)`;\n\n return {\n enter: [\n {\n keyframes: [{ opacity: 0 }, { opacity: 0, offset: opacityOffset }, { opacity: 1 }],\n easing: opacityEasing,\n duration: opacityDuration + delay,\n },\n {\n keyframes: [\n { transform: 'scale(0.9)' },\n { transform: 'scale(0.9)', offset: scaleOffset },\n { transform: 'scale(1)' },\n ],\n easing: scaleEasing,\n duration: scaleDuration + delay,\n },\n ],\n exit: {\n keyframes: [],\n },\n };\n});\n"],"names":["PromptStarterMotion","createPresenceComponent","delay","isFirstRow","opacityOffset","opacityEasing","index","numberOfColumns","opacityDuration","scaleDuration","enter","duration","keyframes","scaleOffset"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAIaA;;;eAAAA;;;iCAJ2B;AAIjC,MAAMA,sBAAsBC,IAAAA,wCAAAA,EAAmD,CAAC,OACrF,iBACMC;UAGNC,aAAMC,QAAgBF;UACtBA,QAAMG,aAAgBC,QAAA,KAAA,AAAAA,CAAAA,QAAAC,eAAA,IAAA;UAEtBC,kBAAsB;UACtBJ,gBAAoBF,QAASA,CAAAA,QAAQO,GAAAA;UACrCJ,gBAAoB;UAEpBI,gBAAO;UACLC,cAAOR,QAAAA,CAAAA,QAAAO,aAAA;wBACL,CAAA,iCAAA,CAAA;;;;;;;;;;;;;;;;;4CACoFP;;;2BAElFS;oBAAAA;mCACF;;;mCAEEC;;;;;;;;0CAEqCC;;;;;;;mDAIXX"}
@@ -9,9 +9,13 @@ Object.defineProperty(exports, "usePromptStarter_unstable", {
9
9
  }
10
10
  });
11
11
  const _reactcomponents = require("@fluentui/react-components");
12
+ const _PromptStarterListContext = require("../../../contexts/PromptStarterListContext");
12
13
  const usePromptStarter_unstable = (props, ref)=>{
13
14
  const id = (0, _reactcomponents.useId)('prompt-starter');
15
+ const focusAttrs = (0, _reactcomponents.useFocusableGroup)();
16
+ const numberOfColumns = (0, _PromptStarterListContext.usePromptStarterListContext)((ctx)=>ctx.numberOfColumns);
14
17
  const state = {
18
+ isSingleColumn: numberOfColumns === 1,
15
19
  components: {
16
20
  root: 'div',
17
21
  primaryAction: 'button',
@@ -24,6 +28,7 @@ const usePromptStarter_unstable = (props, ref)=>{
24
28
  ref,
25
29
  'aria-labelledby': `${id}-prompt`,
26
30
  'aria-describedby': `${id}-icon, ${id}-reasonMarker`,
31
+ ...focusAttrs,
27
32
  ...props
28
33
  }), {
29
34
  elementType: 'div'
@@ -1 +1 @@
1
- {"version":3,"sources":["usePromptStarter.ts"],"sourcesContent":["import { getIntrinsicElementProps, slot, useId } from '@fluentui/react-components';\nimport type { PromptStarterProps, PromptStarterState } from './PromptStarter.types';\n\n/**\n * Create the state required to render PromptStarter.\n *\n * The returned state can be modified with hooks such as usePromptStarterStyles_unstable,\n * before being passed to renderPromptStarter_unstable.\n *\n * @param props - props from this instance of PromptStarter\n * @param ref - reference to root HTMLElement of PromptStarter\n */\nexport const usePromptStarter_unstable = (\n props: PromptStarterProps,\n ref: React.Ref<HTMLDivElement>,\n): PromptStarterState => {\n const id = useId('prompt-starter');\n\n const state: PromptStarterState = {\n components: {\n root: 'div',\n primaryAction: 'button',\n icon: 'span',\n prompt: 'span',\n reasonMarker: 'span',\n actions: 'span',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n 'aria-labelledby': `${id}-prompt`,\n 'aria-describedby': `${id}-icon, ${id}-reasonMarker`,\n ...props,\n }),\n { elementType: 'div' },\n ),\n primaryAction: slot.always(props.primaryAction, {\n elementType: 'button',\n }),\n icon: slot.always(props.icon, {\n defaultProps: { id: `${id}-icon` },\n elementType: 'span',\n }),\n prompt: slot.always(props.prompt, {\n defaultProps: { id: `${id}-prompt` },\n elementType: 'span',\n }),\n reasonMarker: slot.optional(props.reasonMarker, {\n defaultProps: { id: `${id}-reasonMarker` },\n elementType: 'span',\n }),\n actions: slot.optional(props.actions, { elementType: 'span' }),\n };\n\n return state;\n};\n"],"names":["id","props","ref","state","components","root","primaryAction","prompt","reasonMarker","actions","elementType","defaultProps","icon"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAgBQA;;;eAAAA;;;iCAhB8C;AAgBpD,MAAMA,4BAAW,CAAAC,OAAAC;UAEjBF,KAAMG,IAAAA,sBAA4B,EAAA;UAChCC,QAAAA;oBACEC;kBACAC;2BACM;kBACNC;oBACAC;0BACAC;qBACF;;mCAGIP,CAAAA,MAAAA,CAAAA,IAAAA,yCAAAA,EAAAA,OAAAA;;+BAEA,CAAA,EAAAF,GAAA,OAA0B,CAAA;gCAClB,CAAA,EAAAA,GAAA,OAAA,EAAAA,GAAA,aAAA,CAAA;eACVC,KACA;;yBAAqB;;uBAGrBS,qBAAAA,CAAAA,MAAa,CAAAT,MAAAK,aAAA,EAAA;yBACf;;mCAEEK,CAAAA,MAAAA,CAAAA,MAAcC,IAAA,EAAA;0BAAM;oBAAa,CAAA,EAAAZ,GAAA,KAAA,CAAA;;yBAEnC;;gBAEEW,qBAAAA,CAAAA,MAAAA,CAAAA,MAAcJ,MAAA,EAAA;0BAAM;oBAAe,CAAA,EAAAP,GAAA,OAAA,CAAA;;yBAErC;;sBAEEW,qBAAAA,CAAAA,QAAc,CAAAV,MAAAO,YAAA,EAAA;0BAAM;oBAAqB,CAAA,EAAAR,GAAA,aAAA,CAAA;;yBAE3C;;iBACwCU,qBAAAA,CAAAA,QAAa,CAAAT,MAAAQ,OAAA,EAAA;yBAAO;QAC9D;;IAGA,OAAAN"}
1
+ {"version":3,"sources":["usePromptStarter.ts"],"sourcesContent":["import { getIntrinsicElementProps, slot, useFocusableGroup, useId } from '@fluentui/react-components';\nimport { usePromptStarterListContext } from '../../../contexts/PromptStarterListContext';\nimport type { PromptStarterProps, PromptStarterState } from './PromptStarter.types';\n\n/**\n * Create the state required to render PromptStarter.\n *\n * The returned state can be modified with hooks such as usePromptStarterStyles_unstable,\n * before being passed to renderPromptStarter_unstable.\n *\n * @param props - props from this instance of PromptStarter\n * @param ref - reference to root HTMLElement of PromptStarter\n */\nexport const usePromptStarter_unstable = (\n props: PromptStarterProps,\n ref: React.Ref<HTMLDivElement>,\n): PromptStarterState => {\n const id = useId('prompt-starter');\n const focusAttrs = useFocusableGroup();\n\n const numberOfColumns = usePromptStarterListContext(ctx => ctx.numberOfColumns);\n\n const state: PromptStarterState = {\n isSingleColumn: numberOfColumns === 1,\n components: {\n root: 'div',\n primaryAction: 'button',\n icon: 'span',\n prompt: 'span',\n reasonMarker: 'span',\n actions: 'span',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n 'aria-labelledby': `${id}-prompt`,\n 'aria-describedby': `${id}-icon, ${id}-reasonMarker`,\n ...focusAttrs,\n ...props,\n }),\n { elementType: 'div' },\n ),\n primaryAction: slot.always(props.primaryAction, {\n elementType: 'button',\n }),\n icon: slot.always(props.icon, {\n defaultProps: { id: `${id}-icon` },\n elementType: 'span',\n }),\n prompt: slot.always(props.prompt, {\n defaultProps: { id: `${id}-prompt` },\n elementType: 'span',\n }),\n reasonMarker: slot.optional(props.reasonMarker, {\n defaultProps: { id: `${id}-reasonMarker` },\n elementType: 'span',\n }),\n actions: slot.optional(props.actions, { elementType: 'span' }),\n };\n\n return state;\n};\n"],"names":["id","props","ref","focusAttrs","numberOfColumns","usePromptStarterListContext","ctx","isSingleColumn","root","primaryAction","prompt","reasonMarker","actions","elementType","defaultProps","icon","state"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAiBQA;;;eAAAA;;;iCAjBiE;0CAC7B;AAgB1C,MAAMA,4BAAW,CAAAC,OAAAC;UACjBF,KAAMG,IAAAA,sBAAAA,EAAAA;UAENA,aAAMC,IAAAA,kCAAkBC;UAExBD,kBAAkCC,IAAAA,qDAAA,EAAAC,CAAAA,MAAAA,IAAAF,eAAA;UAChCG,QAAAA;wBACYH,oBAAA;oBACVI;kBACAC;2BACM;kBACNC;oBACAC;0BACAC;qBACF;;mCAGIV,CAAAA,MAAAA,CAAAA,IAAAA,yCAAAA,EAAAA,OAAAA;;+BAEA,CAAA,EAAAF,GAAA,OAA0B,CAAA;gCACb,CAAA,EAAAA,GAAA,OAAA,EAAAA,GAAA,aAAA,CAAA;yBACVC;eACLA,KACA;;yBAAqB;;uBAGrBY,qBAAAA,CAAAA,MAAa,CAAAZ,MAAAQ,aAAA,EAAA;yBACf;;mCAEEK,CAAAA,MAAAA,CAAAA,MAAcC,IAAA,EAAA;0BAAM;oBAAa,CAAA,EAAAf,GAAA,KAAA,CAAA;;yBAEnC;;gBAEEc,qBAAAA,CAAAA,MAAAA,CAAAA,MAAcJ,MAAA,EAAA;0BAAM;oBAAe,CAAA,EAAAV,GAAA,OAAA,CAAA;;yBAErC;;sBAEEc,qBAAAA,CAAAA,QAAc,CAAAb,MAAAU,YAAA,EAAA;0BAAM;oBAAqB,CAAA,EAAAX,GAAA,aAAA,CAAA;;yBAE3C;;iBACwCa,qBAAAA,CAAAA,QAAa,CAAAZ,MAAAW,OAAA,EAAA;yBAAO;QAC9D;;IAGA,OAAAI"}
@@ -164,8 +164,7 @@ const useStyles = (0, _reactcomponents.__styles)({
164
164
  icon: {
165
165
  mc9l5x: "f22iagw",
166
166
  Bt984gj: "f122n59",
167
- sshi5w: "fntfeoj",
168
- B3oa8pd: "fyhwzhv"
167
+ sshi5w: "fntfeoj"
169
168
  },
170
169
  actions: {
171
170
  jrapky: 0,
@@ -189,8 +188,7 @@ const useStyles = (0, _reactcomponents.__styles)({
189
188
  B3o57yi: 0,
190
189
  Bmy1vo4: 0,
191
190
  Bkqvd7p: 0,
192
- Bi2q7bf: "f1964ud6",
193
- B3oa8pd: "fyhwzhv"
191
+ Bi2q7bf: "f1964ud6"
194
192
  },
195
193
  prompt: {
196
194
  Bahqtrf: "fk6fouc",
@@ -206,8 +204,10 @@ const useStyles = (0, _reactcomponents.__styles)({
206
204
  Bahqtrf: "fk6fouc",
207
205
  Be2twd7: "f13mqy1h",
208
206
  Bhrd7zp: "figsok6",
209
- Bg96gwp: "fcpl73t",
210
- B3oa8pd: "fyhwzhv"
207
+ Bg96gwp: "fcpl73t"
208
+ },
209
+ singleColumnStyles: {
210
+ mc9l5x: "fjseox"
211
211
  }
212
212
  }, {
213
213
  d: [
@@ -332,7 +332,8 @@ const useStyles = (0, _reactcomponents.__styles)({
332
332
  ".f1sil6mw{overflow-y:hidden;}",
333
333
  ".f13mqy1h{font-size:var(--fontSizeBase100);}",
334
334
  ".figsok6{font-weight:var(--fontWeightRegular);}",
335
- ".fcpl73t{line-height:var(--lineHeightBase100);}"
335
+ ".fcpl73t{line-height:var(--lineHeightBase100);}",
336
+ ".fjseox{display:none;}"
336
337
  ],
337
338
  f: [
338
339
  ".ftqa4ok:focus{outline-style:none;}"
@@ -358,28 +359,23 @@ const useStyles = (0, _reactcomponents.__styles)({
358
359
  {
359
360
  m: "(forced-colors: active)"
360
361
  }
361
- ],
362
- [
363
- "@media (max-width: 450px){.fyhwzhv{display:none;}}",
364
- {
365
- m: "(max-width: 450px)"
366
- }
367
362
  ]
368
363
  ]
369
364
  });
370
365
  const usePromptStarterStyles_unstable = (state)=>{
371
366
  'use no memo';
367
+ const { isSingleColumn } = state;
372
368
  const styles = useStyles();
373
369
  const rootResetStyles = useRootResetStyles();
374
370
  state.root.className = (0, _reactcomponents.mergeClasses)(promptStarterClassNames.root, rootResetStyles, state.root.className);
375
371
  state.primaryAction.className = (0, _reactcomponents.mergeClasses)(promptStarterClassNames.primaryAction, styles.primaryAction, state.primaryAction.className);
376
- state.icon.className = (0, _reactcomponents.mergeClasses)(promptStarterClassNames.icon, styles.icon, state.icon.className);
372
+ state.icon.className = (0, _reactcomponents.mergeClasses)(promptStarterClassNames.icon, styles.icon, isSingleColumn && styles.singleColumnStyles, state.icon.className);
377
373
  state.prompt.className = (0, _reactcomponents.mergeClasses)(promptStarterClassNames.prompt, styles.prompt, state.prompt.className);
378
374
  if (state.reasonMarker) {
379
- state.reasonMarker.className = (0, _reactcomponents.mergeClasses)(promptStarterClassNames.reasonMarker, styles.reasonMarker, state.reasonMarker.className);
375
+ state.reasonMarker.className = (0, _reactcomponents.mergeClasses)(promptStarterClassNames.reasonMarker, styles.reasonMarker, isSingleColumn && styles.singleColumnStyles, state.reasonMarker.className);
380
376
  }
381
377
  if (state.actions) {
382
- state.actions.className = (0, _reactcomponents.mergeClasses)(promptStarterClassNames.actions, styles.actions, state.actions.className);
378
+ state.actions.className = (0, _reactcomponents.mergeClasses)(promptStarterClassNames.actions, styles.actions, isSingleColumn && styles.singleColumnStyles, state.actions.className);
383
379
  }
384
380
  return state;
385
381
  }; //# sourceMappingURL=usePromptStarterStyles.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["usePromptStarterStyles.styles.ts"],"sourcesContent":["import {\n makeStyles,\n makeResetStyles,\n mergeClasses,\n shorthands,\n typographyStyles,\n createFocusOutlineStyle,\n} from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\nimport type { PromptStarterSlots, PromptStarterState } from './PromptStarter.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const promptStarterClassNames: SlotClassNames<PromptStarterSlots> = {\n root: 'fai-PromptStarter',\n primaryAction: 'fai-PromptStarter__primaryAction',\n icon: 'fai-PromptStarter__icon',\n prompt: 'fai-PromptStarter__prompt',\n reasonMarker: 'fai-PromptStarter__reasonMarker',\n actions: 'fai-PromptStarter__actions',\n};\n\nconst useRootResetStyles = makeResetStyles({\n display: 'grid',\n gridTemplateColumns: '1fr auto',\n gridTemplateRows: 'max-content auto',\n minWidth: '214px',\n\n // Apply styles to the primary action on hover / active states\n '&:hover': {\n [`& .${promptStarterClassNames.primaryAction}`]: {\n boxShadow: tokens.shadow16,\n transform: 'scale(1.03)',\n transition: `transform ${tokens.durationNormal} ${tokens.curveDecelerateMin}`,\n },\n },\n '&:active': {\n [`& .${promptStarterClassNames.primaryAction}`]: {\n boxShadow: tokens.shadow8,\n transform: 'scale(1.03)',\n transition: `transform ${tokens.durationNormal} ${tokens.curveDecelerateMin}`,\n },\n },\n\n // Hide actions when not focused or hovered\n ':not(:focus-within):not(:hover)': {\n [`& .${promptStarterClassNames.actions}`]: {\n clip: 'rect(0px, 0px, 0px, 0px)',\n height: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: '0px',\n width: '1px',\n position: 'absolute',\n opacity: 0,\n },\n },\n});\n\nconst useStyles = makeStyles({\n primaryAction: {\n gridRow: '1 / 3',\n gridColumn: '1 / 3',\n display: 'flex',\n flexDirection: 'column',\n position: 'relative',\n borderRadius: '28px',\n backgroundColor: tokens.colorNeutralBackground1,\n color: tokens.colorNeutralForeground2,\n fontFamily: tokens.fontFamilyBase,\n cursor: 'pointer',\n outlineStyle: 'none',\n textAlign: 'left',\n rowGap: tokens.spacingHorizontalS,\n padding: `${tokens.spacingVerticalL} ${tokens.spacingHorizontalL}`,\n ...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStroke2),\n ...createFocusOutlineStyle({ style: { outlineRadius: '28px' } }),\n },\n\n primaryActionHovered: {\n boxShadow: tokens.shadow16,\n transform: 'scale(1.03)',\n transition: `transform ${tokens.durationNormal} ${tokens.curveDecelerateMin}`,\n },\n\n icon: {\n display: 'flex',\n alignItems: 'center',\n minHeight: tokens.spacingVerticalXXL,\n\n // Reflow: hide icon when under 450px\n '@media (max-width: 450px)': {\n display: 'none',\n },\n },\n actions: {\n margin: `${tokens.spacingVerticalL} ${tokens.spacingHorizontalL}\n ${tokens.spacingVerticalNone} ${tokens.spacingHorizontalNone}`,\n position: 'relative',\n gridRow: '1 / 2',\n gridColumn: '2 / 3',\n\n opacity: 1,\n transition: `opacity ${tokens.durationFast} ${tokens.curveLinear}`,\n\n // Reflow: hide actions when under 450px\n '@media (max-width: 450px)': {\n display: 'none',\n },\n },\n prompt: {\n ...typographyStyles.body1Strong,\n\n // Truncate text after two lines.\n display: '-webkit-box',\n '-webkit-box-orient': 'vertical',\n '-webkit-line-clamp': '2',\n overflowY: 'hidden',\n },\n reasonMarker: {\n ...typographyStyles.caption2,\n\n // Reflow: hide reason marker when under 450px\n '@media (max-width: 450px)': {\n display: 'none',\n },\n },\n});\n\nexport const usePromptStarterStyles_unstable = (state: PromptStarterState): PromptStarterState => {\n 'use no memo';\n\n const styles = useStyles();\n const rootResetStyles = useRootResetStyles();\n state.root.className = mergeClasses(promptStarterClassNames.root, rootResetStyles, state.root.className);\n state.primaryAction.className = mergeClasses(\n promptStarterClassNames.primaryAction,\n styles.primaryAction,\n state.primaryAction.className,\n );\n state.icon.className = mergeClasses(promptStarterClassNames.icon, styles.icon, state.icon.className);\n state.prompt.className = mergeClasses(promptStarterClassNames.prompt, styles.prompt, state.prompt.className);\n if (state.reasonMarker) {\n state.reasonMarker.className = mergeClasses(\n promptStarterClassNames.reasonMarker,\n styles.reasonMarker,\n state.reasonMarker.className,\n );\n }\n if (state.actions) {\n state.actions.className = mergeClasses(promptStarterClassNames.actions, styles.actions, state.actions.className);\n }\n\n return state;\n};\n"],"names":["promptStarterClassNames","root","primaryAction","icon","prompt","reasonMarker","actions","useRootResetStyles","makeResetStyles","display","__styles","gridTemplateColumns","gridTemplateRows","minWidth","h3tjnc","Bw0ie65","boxShadow","transform","transition","Beyfa6y","Bbmb7ep","Bahqtrf","Bceei9c","oeaueh","clip","height","margin","overflow","padding","width","position","opacity","ibv6hh","icvyot","vrafjx","useStyles","makeStyles","gridRow","gridColumn","flexDirection","borderRadius","backgroundColor","color","fontFamily","tokens","fontFamilyBase","cursor","outlineStyle","textAlign","rowGap","spacingHorizontalS","shorthands","border","strokeWidthThin","createFocusOutlineStyle","style","Boxcth7","primaryActionHovered","Blkhhs4","alignItems","minHeight","Bqtpl0w","E5pizo","typographyStyles","overflowY","jrapky","Frg6f3","t21cq0","B6of3ja","styles","B74szlk","rootResetStyles","state","Beweih1","abs64n","Cwk7ip","B3o57yi","Bmy1vo4"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAYaA,uBAAAA;eAAAA;;;;;;iCANY;AAMlB,MAAMA,0BAA8D;UACzEC;mBACAC;UACAC;YACAC;kBACAC;aACAC;AACF;AAEA,MAAMC,qBAAqBC,IAAAA,8BAAAA,EAAAA,YAAgB,MAAA;IAAA;IAAA;IAAA;IAAA;CAAA;MACzCC,YAASC,IAAAA,yBAAA,EAAA;mBACTC;QACAC,QAAAA;QACAC,QAAAA;QAEAC,QAAA;QACAC,SAAA;iBACO;iBACHC;gBACAC;iBACAC;gBACF;QACFC,SAAA;QACAC,SAAA;iBACO;iBACHJ;gBACAC;gBACAC;gBACF;QACFG,SAAA;QAEAC,SAAA;QACAC,QAAA;gBACI;YAAG;YAAEvB;SAAAA;iBACLwB;iBACAC;gBACAC;gBACAC;gBACAC;iBACAC;iBACAC;iBACAC;YAAAA;YAAS;SAAA;iBACX;QACFC,QAAA;YAAA;YAAA;SAAA;QACFC,QAAA;QAEAC,QAAMC;YAAAA;YAAYC;SAAW;QAC3BlC,QAAAA;gBACEmC;YAAAA;YAAS;SAAA;gBACTC;gBACA7B;YAAAA;YAAS;SAAA;iBACT8B;gBACAT;YAAAA;YAAU;SAAA;iBACVU;iBACAC;iBACAC;iBACAC;YAAAA;YAAYC;SAAOC;gBACnBC;iBACAC;YAAAA;YAAc;SAAA;iBACdC;iBACAC;YAAAA;YAAeC;SAAAA;iBACftB;iBACGuB;YAAAA;YAAWC;SAAcC;iBACzBC;iBAA0BC;;iBAA+B;gBAAI;QAClEC,SAAA;QAEAC,SAAAA;gBACEzC;iBACAC;iBACAC;QACFwC,SAAA;QAEAvD,SAAM;gBACJM;gBACAkD;gBACAC;gBAEA;iBACA;iBACEnD;iBACF;QACFoD,SAAA;QACAvD,QAAAA;gBACEoB;iBACS;gBACTI;iBACAO;gBACAC;gBAEAP;iBACAb;YAAAA;YAAa;SAAU0B;iBAEvB;gBACA;YAAA;YAAA;SAAA;;0BAEA;QACFkB,QAAA;QACA1D,SAAQ;iBACH2D;gBAEH;iBACAtD;iBACA;iBACA;iBACAuD;;UAEF3D;gBACK0D;iBAEH;gBACA;iBACEtD;;aAEJ;QACFwD,QAAA;QAEAC,QAAO;QACLC,QAAA;QAEAC,SAAMC;QACNC,SAAMC;YAAAA;YAAAA;SAAkBhE;QACxBiE,QAAMvE;QACNuE,QAAMtE;QAKNsE,QAAMrE;QACNqE,QAAMpE;QACNW,SAAIyD;iBACFA;QAKFC,SAAA;QACAC,QAAIF;iBACFA;QACFG,QAAA;QAEAC,SAAOJ;QACPK,SAAA"}
1
+ {"version":3,"sources":["usePromptStarterStyles.styles.ts"],"sourcesContent":["import {\n makeStyles,\n makeResetStyles,\n mergeClasses,\n shorthands,\n typographyStyles,\n createFocusOutlineStyle,\n} from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\nimport type { PromptStarterSlots, PromptStarterState } from './PromptStarter.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const promptStarterClassNames: SlotClassNames<PromptStarterSlots> = {\n root: 'fai-PromptStarter',\n primaryAction: 'fai-PromptStarter__primaryAction',\n icon: 'fai-PromptStarter__icon',\n prompt: 'fai-PromptStarter__prompt',\n reasonMarker: 'fai-PromptStarter__reasonMarker',\n actions: 'fai-PromptStarter__actions',\n};\n\nconst useRootResetStyles = makeResetStyles({\n display: 'grid',\n gridTemplateColumns: '1fr auto',\n gridTemplateRows: 'max-content auto',\n minWidth: '214px',\n\n // Apply styles to the primary action on hover / active states\n '&:hover': {\n [`& .${promptStarterClassNames.primaryAction}`]: {\n boxShadow: tokens.shadow16,\n transform: 'scale(1.03)',\n transition: `transform ${tokens.durationNormal} ${tokens.curveDecelerateMin}`,\n },\n },\n '&:active': {\n [`& .${promptStarterClassNames.primaryAction}`]: {\n boxShadow: tokens.shadow8,\n transform: 'scale(1.03)',\n transition: `transform ${tokens.durationNormal} ${tokens.curveDecelerateMin}`,\n },\n },\n\n // Hide actions when not focused or hovered\n ':not(:focus-within):not(:hover)': {\n [`& .${promptStarterClassNames.actions}`]: {\n clip: 'rect(0px, 0px, 0px, 0px)',\n height: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: '0px',\n width: '1px',\n position: 'absolute',\n opacity: 0,\n },\n },\n});\n\nconst useStyles = makeStyles({\n primaryAction: {\n gridRow: '1 / 3',\n gridColumn: '1 / 3',\n display: 'flex',\n flexDirection: 'column',\n position: 'relative',\n borderRadius: '28px',\n backgroundColor: tokens.colorNeutralBackground1,\n color: tokens.colorNeutralForeground2,\n fontFamily: tokens.fontFamilyBase,\n cursor: 'pointer',\n outlineStyle: 'none',\n textAlign: 'left',\n rowGap: tokens.spacingHorizontalS,\n padding: `${tokens.spacingVerticalL} ${tokens.spacingHorizontalL}`,\n ...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStroke2),\n ...createFocusOutlineStyle({ style: { outlineRadius: '28px' } }),\n },\n\n primaryActionHovered: {\n boxShadow: tokens.shadow16,\n transform: 'scale(1.03)',\n transition: `transform ${tokens.durationNormal} ${tokens.curveDecelerateMin}`,\n },\n\n icon: {\n display: 'flex',\n alignItems: 'center',\n minHeight: tokens.spacingVerticalXXL,\n },\n actions: {\n margin: `${tokens.spacingVerticalL} ${tokens.spacingHorizontalL}\n ${tokens.spacingVerticalNone} ${tokens.spacingHorizontalNone}`,\n position: 'relative',\n gridRow: '1 / 2',\n gridColumn: '2 / 3',\n\n opacity: 1,\n transition: `opacity ${tokens.durationFast} ${tokens.curveLinear}`,\n },\n prompt: {\n ...typographyStyles.body1Strong,\n\n // Truncate text after two lines.\n display: '-webkit-box',\n '-webkit-box-orient': 'vertical',\n '-webkit-line-clamp': '2',\n overflowY: 'hidden',\n },\n reasonMarker: {\n ...typographyStyles.caption2,\n },\n\n // Hide icon, actions, and reason marker in single column appearance\n singleColumnStyles: {\n display: 'none',\n },\n});\n\nexport const usePromptStarterStyles_unstable = (state: PromptStarterState): PromptStarterState => {\n 'use no memo';\n\n const { isSingleColumn } = state;\n\n const styles = useStyles();\n const rootResetStyles = useRootResetStyles();\n state.root.className = mergeClasses(promptStarterClassNames.root, rootResetStyles, state.root.className);\n state.primaryAction.className = mergeClasses(\n promptStarterClassNames.primaryAction,\n styles.primaryAction,\n state.primaryAction.className,\n );\n state.icon.className = mergeClasses(\n promptStarterClassNames.icon,\n styles.icon,\n isSingleColumn && styles.singleColumnStyles,\n state.icon.className,\n );\n state.prompt.className = mergeClasses(promptStarterClassNames.prompt, styles.prompt, state.prompt.className);\n if (state.reasonMarker) {\n state.reasonMarker.className = mergeClasses(\n promptStarterClassNames.reasonMarker,\n styles.reasonMarker,\n isSingleColumn && styles.singleColumnStyles,\n state.reasonMarker.className,\n );\n }\n if (state.actions) {\n state.actions.className = mergeClasses(\n promptStarterClassNames.actions,\n styles.actions,\n isSingleColumn && styles.singleColumnStyles,\n state.actions.className,\n );\n }\n\n return state;\n};\n"],"names":["promptStarterClassNames","root","primaryAction","icon","prompt","reasonMarker","actions","useRootResetStyles","makeResetStyles","display","__styles","gridTemplateColumns","gridTemplateRows","minWidth","h3tjnc","Bw0ie65","boxShadow","transform","transition","Beyfa6y","Bbmb7ep","Bahqtrf","Bceei9c","oeaueh","clip","height","margin","overflow","padding","width","position","opacity","ibv6hh","icvyot","vrafjx","useStyles","makeStyles","gridRow","gridColumn","flexDirection","borderRadius","backgroundColor","color","fontFamily","tokens","fontFamilyBase","cursor","outlineStyle","textAlign","rowGap","spacingHorizontalS","shorthands","border","strokeWidthThin","createFocusOutlineStyle","style","Boxcth7","primaryActionHovered","Blkhhs4","alignItems","minHeight","clg4pj","Bkh64rk","typographyStyles","E5pizo","Cwk7ip","B3o57yi","singleColumnStyles","Bi2q7bf","mc9l5x","Bt984gj","isSingleColumn","sshi5w","styles","state","B6of3ja","className","qhf8xq","nk6f5a","Br312pm"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAYaA,uBAAAA;eAAAA;;;;;;iCANY;AAMlB,MAAMA,0BAA8D;UACzEC;mBACAC;UACAC;YACAC;kBACAC;aACAC;AACF;AAEA,MAAMC,qBAAqBC,IAAAA,8BAAAA,EAAAA,YAAgB,MAAA;IAAA;IAAA;IAAA;IAAA;CAAA;MACzCC,YAASC,IAAAA,yBAAA,EAAA;mBACTC;QACAC,QAAAA;QACAC,QAAAA;QAEAC,QAAA;QACAC,SAAA;iBACO;iBACHC;gBACAC;iBACAC;gBACF;QACFC,SAAA;QACAC,SAAA;iBACO;iBACHJ;gBACAC;gBACAC;gBACF;QACFG,SAAA;QAEAC,SAAA;QACAC,QAAA;gBACI;YAAG;YAAEvB;SAAAA;iBACLwB;iBACAC;gBACAC;gBACAC;gBACAC;iBACAC;iBACAC;iBACAC;YAAAA;YAAS;SAAA;iBACX;QACFC,QAAA;YAAA;YAAA;SAAA;QACFC,QAAA;QAEAC,QAAMC;YAAAA;YAAYC;SAAW;QAC3BlC,QAAAA;gBACEmC;YAAAA;YAAS;SAAA;gBACTC;gBACA7B;YAAAA;YAAS;SAAA;iBACT8B;gBACAT;YAAAA;YAAU;SAAA;iBACVU;iBACAC;iBACAC;iBACAC;YAAAA;YAAYC;SAAOC;gBACnBC;iBACAC;YAAAA;YAAc;SAAA;iBACdC;iBACAC;YAAAA;YAAeC;SAAAA;iBACftB;iBACGuB;YAAAA;YAAWC;SAAcC;iBACzBC;iBAA0BC;;iBAA+B;gBAAI;QAClEC,SAAA;QAEAC,SAAAA;gBACEzC;iBACAC;iBACAC;QACFwC,SAAA;QAEAvD,SAAM;gBACJM;gBACAkD;gBACAC;QACFC,QAAA;QACAvD,SAAS;iBACPoB;iBACS;iBACTI;gBACAO;gBACAC;iBAEAP;gBACAb;QACF4C,SAAA;QACA1D,QAAQ;gBACH2D;iBAEH;YAAA;YAAA;SAAA;iBACAtD;gBACA;YAAA;YAAA;SAAsB;;0BAEX;QACbuD,QAAA;QACA3D,SAAAA;iBACK0D;QACLE,QAAA;QAEAC,SAAA;QACAC,SAAAA;iBACE1D;QACF2D,SAAA;IACF;IAEAjE,MAAO;QACLkE,QAAA;QAEAC,SAAQC;QAERC,QAAMC;;aAEAxE;QACNyE,QAAMxE;QAKNwE,QAAMvE;QAMNuE,QAAMtE;QACNuE,SAAID;iBACFA;YAAMrE;YAAAA;SAAauE;QAMrBC,QAAA;QACAC,QAAIJ;gBACFA;QAMF5D,QAAA;QAEAC,SAAO2D;QACPK,SAAA"}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "PromptStarterList", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return PromptStarterList;
9
+ }
10
+ });
11
+ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
+ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
13
+ const _usePromptStarterList = require("./usePromptStarterList");
14
+ const _renderPromptStarterList = require("./renderPromptStarterList");
15
+ const _usePromptStarterListStylesstyles = require("./usePromptStarterListStyles.styles");
16
+ const _usePromptStarterListContextValues = require("./usePromptStarterListContextValues");
17
+ const PromptStarterList = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
18
+ const state = (0, _usePromptStarterList.usePromptStarterList_unstable)(props, ref);
19
+ const contextValues = (0, _usePromptStarterListContextValues.usePromptStarterListContextValues)(state);
20
+ (0, _usePromptStarterListStylesstyles.usePromptStarterListStyles_unstable)(state);
21
+ return (0, _renderPromptStarterList.renderPromptStarterList_unstable)(state, contextValues);
22
+ });
23
+ PromptStarterList.displayName = 'PromptStarterList'; //# sourceMappingURL=PromptStarterList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["PromptStarterList.tsx"],"sourcesContent":["import * as React from 'react';\nimport { usePromptStarterList_unstable } from './usePromptStarterList';\nimport { renderPromptStarterList_unstable } from './renderPromptStarterList';\nimport { usePromptStarterListStyles_unstable } from './usePromptStarterListStyles.styles';\nimport type { PromptStarterListProps } from './PromptStarterList.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { usePromptStarterListContextValues } from './usePromptStarterListContextValues';\n\nexport const PromptStarterList: ForwardRefComponent<PromptStarterListProps> = React.forwardRef((props, ref) => {\n const state = usePromptStarterList_unstable(props, ref);\n const contextValues = usePromptStarterListContextValues(state);\n\n usePromptStarterListStyles_unstable(state);\n return renderPromptStarterList_unstable(state, contextValues);\n});\n\nPromptStarterList.displayName = 'PromptStarterList';\n"],"names":["PromptStarterList","React","forwardRef","props","state","usePromptStarterList_unstable","contextValues","usePromptStarterListContextValues","usePromptStarterListStyles_unstable","renderPromptStarterList_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAQaA;;;eAAAA;;;;iEARU;sCACuB;yCACG;kDACG;mDAGF;AAE3C,MAAMA,oBAAAA,WAAAA,GAAAA,OAAiEC,UAAMC,CAAU,CAACC,OAACA;UAC9FC,QAAMA,IAAAA,mDAAQC,EAAAA,OAA8BF;UAC5CG,gBAAMA,IAAAA,oEAAgBC,EAAAA;6EAEtBC,EAAAA;WACAC,IAAAA,yDAAOA,EAAAA,OAAiCL;AAC1C;AAEAJ,kBAAkBU,WAAW,GAAG"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ //# sourceMappingURL=PromptStarterList.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["PromptStarterList.types.ts"],"sourcesContent":["import type { DesignVersion } from '@fluentui-copilot/react-provider';\nimport type {\n ComponentProps,\n ComponentState,\n Slot,\n Button,\n UseArrowNavigationGroupOptions,\n} from '@fluentui/react-components';\n\nexport type PromptStarterListSlots = {\n root: NonNullable<Slot<'div'>>;\n gridWrapper: NonNullable<Slot<'div'>>;\n expandButton?: Slot<typeof Button>;\n};\n\n/**\n * PromptStarterList Props\n */\nexport type PromptStarterListProps = ComponentProps<PromptStarterListSlots> &\n DesignVersion & {\n /**\n * Text for the expand button when the list is collapsed.\n *\n * default: \"Show more\"\n */\n expandButtonLabel?: string;\n /**\n * Text for the expand button when the list is expanded.\n *\n * default: \"Show less\"\n */\n collapseButtonLabel?: string;\n /**\n * Arrow navigation options. This can be used to customize Tabster's direction,\n * tab behavior, and memoization options.\n *\n * default: { axis: 'horizontal', memorizeCurrent: true }\n */\n arrowNavigationOptions?: UseArrowNavigationGroupOptions;\n };\n\n/**\n * State used in rendering PromptStarterList\n */\nexport type PromptStarterListState = ComponentState<PromptStarterListSlots> &\n Required<Pick<PromptStarterListProps, 'designVersion'>> & {\n numberOfColumns: number;\n isExpanded?: boolean;\n };\n\nexport type PromptStarterListContextValue = Pick<PromptStarterListState, 'numberOfColumns' | 'isExpanded'>;\n"],"names":[],"rangeMappings":"","mappings":""}
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ PromptStarterList: function() {
13
+ return _PromptStarterList.PromptStarterList;
14
+ },
15
+ promptStarterListClassNames: function() {
16
+ return _usePromptStarterListStylesstyles.promptStarterListClassNames;
17
+ },
18
+ renderPromptStarterList_unstable: function() {
19
+ return _renderPromptStarterList.renderPromptStarterList_unstable;
20
+ },
21
+ usePromptStarterListStyles_unstable: function() {
22
+ return _usePromptStarterListStylesstyles.usePromptStarterListStyles_unstable;
23
+ },
24
+ usePromptStarterList_unstable: function() {
25
+ return _usePromptStarterList.usePromptStarterList_unstable;
26
+ }
27
+ });
28
+ const _PromptStarterList = require("./PromptStarterList");
29
+ const _renderPromptStarterList = require("./renderPromptStarterList");
30
+ const _usePromptStarterList = require("./usePromptStarterList");
31
+ const _usePromptStarterListStylesstyles = require("./usePromptStarterListStyles.styles");
32
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export { PromptStarterList } from './PromptStarterList';\nexport type {\n PromptStarterListProps,\n PromptStarterListSlots,\n PromptStarterListState,\n PromptStarterListContextValue,\n} from './PromptStarterList.types';\nexport { renderPromptStarterList_unstable } from './renderPromptStarterList';\nexport { usePromptStarterList_unstable } from './usePromptStarterList';\nexport { promptStarterListClassNames, usePromptStarterListStyles_unstable } from './usePromptStarterListStyles.styles';\n"],"names":["PromptStarterList","promptStarterListClassNames","renderPromptStarterList_unstable","usePromptStarterListStyles_unstable","usePromptStarterList_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,iBAAiB;eAAjBA,oCAAiB;;IASjBC,2BAA2B;eAA3BA,6DAA2B;;IAF3BC,gCAAgC;eAAhCA,yDAAgC;;IAEHC,mCAAmC;eAAnCA,qEAAmC;;IADhEC,6BAA6B;eAA7BA,mDAA6B;;;mCARJ;yCAOe;sCACH;kDACmC"}
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "renderPromptStarterList_unstable", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return renderPromptStarterList_unstable;
9
+ }
10
+ });
11
+ const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
12
+ const _reactcomponents = require("@fluentui/react-components");
13
+ const _PromptStarterListContext = require("../../../contexts/PromptStarterListContext");
14
+ const renderPromptStarterList_unstable = (state, contextValue)=>{
15
+ (0, _reactcomponents.assertSlots)(state);
16
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_PromptStarterListContext.PromptStarterListProvider, {
17
+ value: contextValue,
18
+ children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(state.root, {
19
+ children: [
20
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_reactcomponents.PresenceGroup, {
21
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(state.gridWrapper, {
22
+ children: state.root.children
23
+ })
24
+ }),
25
+ state.expandButton && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.expandButton, {})
26
+ ]
27
+ })
28
+ });
29
+ }; //# sourceMappingURL=renderPromptStarterList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["renderPromptStarterList.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots, PresenceGroup } from '@fluentui/react-components';\nimport { PromptStarterListProvider } from '../../../contexts/PromptStarterListContext';\nimport type {\n PromptStarterListState,\n PromptStarterListSlots,\n PromptStarterListContextValue,\n} from './PromptStarterList.types';\n\n/**\n * Render the final JSX of PromptStarterList\n */\nexport const renderPromptStarterList_unstable = (\n state: PromptStarterListState,\n contextValue: PromptStarterListContextValue,\n) => {\n assertSlots<PromptStarterListSlots>(state);\n\n return (\n <PromptStarterListProvider value={contextValue}>\n <state.root>\n <PresenceGroup>\n <state.gridWrapper>{state.root.children}</state.gridWrapper>\n </PresenceGroup>\n {state.expandButton && <state.expandButton />}\n </state.root>\n </PromptStarterListProvider>\n );\n};\n"],"names":["assertSlots","state","value","contextValue","_jsx","PresenceGroup","gridWrapper"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAkBEA;;;eAAAA;;;4BAjBF;iCAE2C;0CACD;AAcxCA,MAAAA,mCAAoCC,CAAAA,OAAAA;oCAEpC,EAAAA;WAC6BC,WAAOC,GAAAA,IAAAA,eAAAA,EAAAA,mDAAAA,EAAAA;;;;8BAE9BC,IAAAA,eAAA,EAACC,8BAAAA,EAAAA;4CACCD,IAAAA,eAAA,EAAAH,MAAAK,WAACL,EAAMK;qDAAaL"}
@@ -0,0 +1,116 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "usePromptStarterList_unstable", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return usePromptStarterList_unstable;
9
+ }
10
+ });
11
+ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
+ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
13
+ const _reactcomponents = require("@fluentui/react-components");
14
+ const _reactprovider = require("@fluentui-copilot/react-provider");
15
+ const _reacticons = require("@fluentui/react-icons");
16
+ const _promptStarterMotion = require("../PromptStarter/promptStarterMotion");
17
+ const usePromptStarterList_unstable = (props, ref)=>{
18
+ const { arrowNavigationOptions, expandButtonLabel = 'Show more', collapseButtonLabel = 'Show less' } = props;
19
+ const designVersion = (0, _reactprovider.useDesignVersion)(props.designVersion);
20
+ var _arrowNavigationOptions_axis, _arrowNavigationOptions_memorizeCurrent;
21
+ const focusAttrs = (0, _reactcomponents.useArrowNavigationGroup)({
22
+ ...arrowNavigationOptions,
23
+ axis: (_arrowNavigationOptions_axis = arrowNavigationOptions === null || arrowNavigationOptions === void 0 ? void 0 : arrowNavigationOptions.axis) !== null && _arrowNavigationOptions_axis !== void 0 ? _arrowNavigationOptions_axis : 'grid-linear',
24
+ memorizeCurrent: (_arrowNavigationOptions_memorizeCurrent = arrowNavigationOptions === null || arrowNavigationOptions === void 0 ? void 0 : arrowNavigationOptions.memorizeCurrent) !== null && _arrowNavigationOptions_memorizeCurrent !== void 0 ? _arrowNavigationOptions_memorizeCurrent : true
25
+ });
26
+ const [isExpanded, setIsExpanded] = _react.useState(false);
27
+ const [numberOfColumns, setNumberOfColumns] = _react.useState(3);
28
+ const gridWrapperRef = _react.useRef(null);
29
+ const { targetDocument } = (0, _reactcomponents.useFluent)();
30
+ const win = targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.defaultView;
31
+ _react.useEffect(()=>{
32
+ if (!win || !gridWrapperRef.current) return;
33
+ const promptStarterGrid = gridWrapperRef.current;
34
+ const updateNumberOfColumns = ()=>{
35
+ const numColumns = win.getComputedStyle(promptStarterGrid).gridTemplateColumns.split(' ').length;
36
+ setNumberOfColumns(numColumns);
37
+ };
38
+ const ro = new win.ResizeObserver(updateNumberOfColumns);
39
+ ro.observe(promptStarterGrid);
40
+ return ()=>{
41
+ ro.unobserve(promptStarterGrid);
42
+ };
43
+ }, [
44
+ win
45
+ ]);
46
+ const state = {
47
+ numberOfColumns: numberOfColumns,
48
+ isExpanded,
49
+ designVersion,
50
+ components: {
51
+ root: 'div',
52
+ gridWrapper: 'div',
53
+ expandButton: _reactcomponents.Button
54
+ },
55
+ root: _reactcomponents.slot.always((0, _reactcomponents.getIntrinsicElementProps)('div', {
56
+ ref,
57
+ ...props
58
+ }), {
59
+ elementType: 'div'
60
+ }),
61
+ gridWrapper: _reactcomponents.slot.always(props.gridWrapper, {
62
+ defaultProps: {
63
+ role: 'group',
64
+ ...focusAttrs
65
+ },
66
+ elementType: 'div'
67
+ }),
68
+ expandButton: _reactcomponents.slot.optional(props.expandButton, {
69
+ defaultProps: {
70
+ appearance: 'subtle',
71
+ size: 'small',
72
+ shape: 'rounded',
73
+ icon: /*#__PURE__*/ _react.createElement(_reacticons.ChevronDown12Regular, null),
74
+ iconPosition: 'after',
75
+ 'aria-expanded': isExpanded,
76
+ children: isExpanded ? collapseButtonLabel : expandButtonLabel
77
+ },
78
+ renderByDefault: true,
79
+ elementType: _reactcomponents.Button
80
+ })
81
+ };
82
+ state.gridWrapper.ref = (0, _reactcomponents.useMergedRefs)(gridWrapperRef, state.gridWrapper.ref);
83
+ // Get the array of children.
84
+ const childrenArray = _react.useMemo(()=>{
85
+ return _react.Children.toArray(state.root.children);
86
+ }, [
87
+ state.root.children
88
+ ]);
89
+ // Add motion to the children.
90
+ const childrenWithMotion = _react.useMemo(()=>childrenArray.map((child, index)=>{
91
+ // Throw error if the child is not a valid React element or is a Fragment.
92
+ if (!/*#__PURE__*/ _react.isValidElement(child) || child.type === _react.Fragment) {
93
+ throw new Error('You should only use PromptStarter components as the children of PromptStarterList.');
94
+ }
95
+ return /*#__PURE__*/ _react.createElement(_promptStarterMotion.PromptStarterMotion, {
96
+ appear: true,
97
+ key: index,
98
+ index: index,
99
+ numberOfColumns: numberOfColumns
100
+ }, child);
101
+ }), [
102
+ childrenArray,
103
+ numberOfColumns
104
+ ]);
105
+ // In the collapsed state, we only show 2-3 children depending on the number of numberOfColumns.
106
+ if (!isExpanded) {
107
+ const collapsedVisibleItems = numberOfColumns === 2 ? 2 : 3;
108
+ state.root.children = childrenWithMotion.slice(0, collapsedVisibleItems);
109
+ } else {
110
+ state.root.children = childrenWithMotion;
111
+ }
112
+ if (state.expandButton) {
113
+ state.expandButton.onClick = (0, _reactcomponents.mergeCallbacks)(state.expandButton.onClick, ()=>setIsExpanded(!isExpanded));
114
+ }
115
+ return state;
116
+ }; //# sourceMappingURL=usePromptStarterList.js.map