@fluentui/react-tag-picker 9.8.8 → 9.9.0

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 (127) hide show
  1. package/CHANGELOG.md +25 -2
  2. package/dist/index.d.ts +73 -7
  3. package/lib/TagPicker.js +1 -1
  4. package/lib/TagPicker.js.map +1 -1
  5. package/lib/TagPickerButton.js +1 -1
  6. package/lib/TagPickerButton.js.map +1 -1
  7. package/lib/TagPickerControl.js +1 -1
  8. package/lib/TagPickerControl.js.map +1 -1
  9. package/lib/TagPickerInput.js +1 -1
  10. package/lib/TagPickerInput.js.map +1 -1
  11. package/lib/components/TagPicker/TagPicker.types.js +4 -1
  12. package/lib/components/TagPicker/TagPicker.types.js.map +1 -1
  13. package/lib/components/TagPicker/index.js +1 -1
  14. package/lib/components/TagPicker/index.js.map +1 -1
  15. package/lib/components/TagPicker/useTagPicker.js +34 -21
  16. package/lib/components/TagPicker/useTagPicker.js.map +1 -1
  17. package/lib/components/TagPickerButton/TagPickerButton.types.js +1 -1
  18. package/lib/components/TagPickerButton/TagPickerButton.types.js.map +1 -1
  19. package/lib/components/TagPickerButton/index.js +1 -1
  20. package/lib/components/TagPickerButton/index.js.map +1 -1
  21. package/lib/components/TagPickerButton/useTagPickerButton.js +22 -12
  22. package/lib/components/TagPickerButton/useTagPickerButton.js.map +1 -1
  23. package/lib/components/TagPickerButton/useTagPickerButtonStyles.styles.js +0 -2
  24. package/lib/components/TagPickerButton/useTagPickerButtonStyles.styles.js.map +1 -1
  25. package/lib/components/TagPickerButton/useTagPickerButtonStyles.styles.raw.js +0 -1
  26. package/lib/components/TagPickerButton/useTagPickerButtonStyles.styles.raw.js.map +1 -1
  27. package/lib/components/TagPickerControl/TagPickerControl.types.js +1 -1
  28. package/lib/components/TagPickerControl/TagPickerControl.types.js.map +1 -1
  29. package/lib/components/TagPickerControl/index.js +1 -1
  30. package/lib/components/TagPickerControl/index.js.map +1 -1
  31. package/lib/components/TagPickerControl/useTagPickerControl.js +22 -11
  32. package/lib/components/TagPickerControl/useTagPickerControl.js.map +1 -1
  33. package/lib/components/TagPickerControl/useTagPickerControlStyles.styles.js +0 -2
  34. package/lib/components/TagPickerControl/useTagPickerControlStyles.styles.js.map +1 -1
  35. package/lib/components/TagPickerControl/useTagPickerControlStyles.styles.raw.js +0 -1
  36. package/lib/components/TagPickerControl/useTagPickerControlStyles.styles.raw.js.map +1 -1
  37. package/lib/components/TagPickerGroup/useTagPickerGroupStyles.styles.js +0 -2
  38. package/lib/components/TagPickerGroup/useTagPickerGroupStyles.styles.js.map +1 -1
  39. package/lib/components/TagPickerGroup/useTagPickerGroupStyles.styles.raw.js +0 -1
  40. package/lib/components/TagPickerGroup/useTagPickerGroupStyles.styles.raw.js.map +1 -1
  41. package/lib/components/TagPickerInput/TagPickerInput.types.js +1 -1
  42. package/lib/components/TagPickerInput/TagPickerInput.types.js.map +1 -1
  43. package/lib/components/TagPickerInput/index.js +1 -1
  44. package/lib/components/TagPickerInput/index.js.map +1 -1
  45. package/lib/components/TagPickerInput/useTagPickerInput.js +43 -23
  46. package/lib/components/TagPickerInput/useTagPickerInput.js.map +1 -1
  47. package/lib/components/TagPickerInput/useTagPickerInputStyles.styles.js +0 -2
  48. package/lib/components/TagPickerInput/useTagPickerInputStyles.styles.js.map +1 -1
  49. package/lib/components/TagPickerInput/useTagPickerInputStyles.styles.raw.js +0 -1
  50. package/lib/components/TagPickerInput/useTagPickerInputStyles.styles.raw.js.map +1 -1
  51. package/lib/components/TagPickerList/useTagPickerListStyles.styles.js +0 -2
  52. package/lib/components/TagPickerList/useTagPickerListStyles.styles.js.map +1 -1
  53. package/lib/components/TagPickerList/useTagPickerListStyles.styles.raw.js +0 -1
  54. package/lib/components/TagPickerList/useTagPickerListStyles.styles.raw.js.map +1 -1
  55. package/lib/components/TagPickerOption/useTagPickerOptionStyles.styles.js +0 -2
  56. package/lib/components/TagPickerOption/useTagPickerOptionStyles.styles.js.map +1 -1
  57. package/lib/components/TagPickerOption/useTagPickerOptionStyles.styles.raw.js +0 -1
  58. package/lib/components/TagPickerOption/useTagPickerOptionStyles.styles.raw.js.map +1 -1
  59. package/lib/components/TagPickerOptionGroup/useTagPickerOptionGroupStyles.styles.js +0 -2
  60. package/lib/components/TagPickerOptionGroup/useTagPickerOptionGroupStyles.styles.js.map +1 -1
  61. package/lib/components/TagPickerOptionGroup/useTagPickerOptionGroupStyles.styles.raw.js +0 -1
  62. package/lib/components/TagPickerOptionGroup/useTagPickerOptionGroupStyles.styles.raw.js.map +1 -1
  63. package/lib/index.js +5 -5
  64. package/lib/index.js.map +1 -1
  65. package/lib-commonjs/TagPicker.js +3 -0
  66. package/lib-commonjs/TagPicker.js.map +1 -1
  67. package/lib-commonjs/TagPickerButton.js +3 -0
  68. package/lib-commonjs/TagPickerButton.js.map +1 -1
  69. package/lib-commonjs/TagPickerControl.js +3 -0
  70. package/lib-commonjs/TagPickerControl.js.map +1 -1
  71. package/lib-commonjs/TagPickerInput.js +3 -0
  72. package/lib-commonjs/TagPickerInput.js.map +1 -1
  73. package/lib-commonjs/components/TagPicker/TagPicker.types.js +4 -1
  74. package/lib-commonjs/components/TagPicker/TagPicker.types.js.map +1 -1
  75. package/lib-commonjs/components/TagPicker/index.js +3 -0
  76. package/lib-commonjs/components/TagPicker/index.js.map +1 -1
  77. package/lib-commonjs/components/TagPicker/useTagPicker.js +36 -18
  78. package/lib-commonjs/components/TagPicker/useTagPicker.js.map +1 -1
  79. package/lib-commonjs/components/TagPickerButton/TagPickerButton.types.js +1 -1
  80. package/lib-commonjs/components/TagPickerButton/TagPickerButton.types.js.map +1 -1
  81. package/lib-commonjs/components/TagPickerButton/index.js +3 -0
  82. package/lib-commonjs/components/TagPickerButton/index.js.map +1 -1
  83. package/lib-commonjs/components/TagPickerButton/useTagPickerButton.js +22 -9
  84. package/lib-commonjs/components/TagPickerButton/useTagPickerButton.js.map +1 -1
  85. package/lib-commonjs/components/TagPickerButton/useTagPickerButtonStyles.styles.js +0 -1
  86. package/lib-commonjs/components/TagPickerButton/useTagPickerButtonStyles.styles.js.map +1 -1
  87. package/lib-commonjs/components/TagPickerButton/useTagPickerButtonStyles.styles.raw.js +0 -1
  88. package/lib-commonjs/components/TagPickerButton/useTagPickerButtonStyles.styles.raw.js.map +1 -1
  89. package/lib-commonjs/components/TagPickerControl/TagPickerControl.types.js +1 -1
  90. package/lib-commonjs/components/TagPickerControl/TagPickerControl.types.js.map +1 -1
  91. package/lib-commonjs/components/TagPickerControl/index.js +3 -0
  92. package/lib-commonjs/components/TagPickerControl/index.js.map +1 -1
  93. package/lib-commonjs/components/TagPickerControl/useTagPickerControl.js +22 -8
  94. package/lib-commonjs/components/TagPickerControl/useTagPickerControl.js.map +1 -1
  95. package/lib-commonjs/components/TagPickerControl/useTagPickerControlStyles.styles.js +0 -1
  96. package/lib-commonjs/components/TagPickerControl/useTagPickerControlStyles.styles.js.map +1 -1
  97. package/lib-commonjs/components/TagPickerControl/useTagPickerControlStyles.styles.raw.js +0 -1
  98. package/lib-commonjs/components/TagPickerControl/useTagPickerControlStyles.styles.raw.js.map +1 -1
  99. package/lib-commonjs/components/TagPickerGroup/useTagPickerGroupStyles.styles.js +0 -1
  100. package/lib-commonjs/components/TagPickerGroup/useTagPickerGroupStyles.styles.js.map +1 -1
  101. package/lib-commonjs/components/TagPickerGroup/useTagPickerGroupStyles.styles.raw.js +0 -1
  102. package/lib-commonjs/components/TagPickerGroup/useTagPickerGroupStyles.styles.raw.js.map +1 -1
  103. package/lib-commonjs/components/TagPickerInput/TagPickerInput.types.js +1 -1
  104. package/lib-commonjs/components/TagPickerInput/TagPickerInput.types.js.map +1 -1
  105. package/lib-commonjs/components/TagPickerInput/index.js +3 -0
  106. package/lib-commonjs/components/TagPickerInput/index.js.map +1 -1
  107. package/lib-commonjs/components/TagPickerInput/useTagPickerInput.js +41 -20
  108. package/lib-commonjs/components/TagPickerInput/useTagPickerInput.js.map +1 -1
  109. package/lib-commonjs/components/TagPickerInput/useTagPickerInputStyles.styles.js +0 -1
  110. package/lib-commonjs/components/TagPickerInput/useTagPickerInputStyles.styles.js.map +1 -1
  111. package/lib-commonjs/components/TagPickerInput/useTagPickerInputStyles.styles.raw.js +0 -1
  112. package/lib-commonjs/components/TagPickerInput/useTagPickerInputStyles.styles.raw.js.map +1 -1
  113. package/lib-commonjs/components/TagPickerList/useTagPickerListStyles.styles.js +0 -1
  114. package/lib-commonjs/components/TagPickerList/useTagPickerListStyles.styles.js.map +1 -1
  115. package/lib-commonjs/components/TagPickerList/useTagPickerListStyles.styles.raw.js +0 -1
  116. package/lib-commonjs/components/TagPickerList/useTagPickerListStyles.styles.raw.js.map +1 -1
  117. package/lib-commonjs/components/TagPickerOption/useTagPickerOptionStyles.styles.js +0 -1
  118. package/lib-commonjs/components/TagPickerOption/useTagPickerOptionStyles.styles.js.map +1 -1
  119. package/lib-commonjs/components/TagPickerOption/useTagPickerOptionStyles.styles.raw.js +0 -1
  120. package/lib-commonjs/components/TagPickerOption/useTagPickerOptionStyles.styles.raw.js.map +1 -1
  121. package/lib-commonjs/components/TagPickerOptionGroup/useTagPickerOptionGroupStyles.styles.js +0 -1
  122. package/lib-commonjs/components/TagPickerOptionGroup/useTagPickerOptionGroupStyles.styles.js.map +1 -1
  123. package/lib-commonjs/components/TagPickerOptionGroup/useTagPickerOptionGroupStyles.styles.raw.js +0 -1
  124. package/lib-commonjs/components/TagPickerOptionGroup/useTagPickerOptionGroupStyles.styles.raw.js.map +1 -1
  125. package/lib-commonjs/index.js +15 -0
  126. package/lib-commonjs/index.js.map +1 -1
  127. package/package.json +11 -11
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TagPickerButton/useTagPickerButtonStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { TagPickerButtonSlots, TagPickerButtonState } from './TagPickerButton.types';\n\nexport const tagPickerButtonClassNames: SlotClassNames<TagPickerButtonSlots> = {\n root: 'fui-TagPickerButton',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n button: {\n alignItems: 'center',\n minHeight: '32px',\n backgroundColor: tokens.colorTransparentBackground,\n border: 'none',\n boxSizing: 'border-box',\n color: tokens.colorNeutralForeground1,\n columnGap: tokens.spacingHorizontalXXS,\n cursor: 'pointer',\n fontFamily: tokens.fontFamilyBase,\n textAlign: 'left',\n flexGrow: 1,\n\n '&:focus': {\n outlineStyle: 'none',\n },\n },\n\n placeholder: {\n color: tokens.colorNeutralForeground4,\n },\n\n // size variants\n medium: {\n ...typographyStyles.caption1,\n padding: `3px ${\n tokens.spacingHorizontalSNudge\n } 3px ${`calc(${tokens.spacingHorizontalSNudge} + ${tokens.spacingHorizontalXXS})`}`,\n },\n large: {\n ...typographyStyles.body1,\n padding: `5px ${\n tokens.spacingHorizontalMNudge\n } 5px ${`calc(${tokens.spacingHorizontalMNudge} + ${tokens.spacingHorizontalXXS})`}`,\n },\n 'extra-large': {\n columnGap: tokens.spacingHorizontalSNudge,\n ...typographyStyles.body2,\n padding: `7px ${\n tokens.spacingHorizontalM\n } 7px ${`calc(${tokens.spacingHorizontalM} + ${tokens.spacingHorizontalSNudge})`}`,\n },\n\n // appearance variants\n outline: {\n backgroundColor: tokens.colorNeutralBackground1,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1}`,\n borderBottomColor: tokens.colorNeutralStrokeAccessible,\n },\n outlineInteractive: {\n '&:hover': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Hover),\n borderBottomColor: tokens.colorNeutralStrokeAccessible,\n },\n\n '&:active': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Pressed),\n borderBottomColor: tokens.colorNeutralStrokeAccessible,\n },\n },\n underline: {\n backgroundColor: tokens.colorTransparentBackground,\n borderBottom: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStrokeAccessible}`,\n borderRadius: '0',\n },\n 'filled-lighter': {\n backgroundColor: tokens.colorNeutralBackground1,\n border: `${tokens.strokeWidthThin} solid transparent`,\n },\n 'filled-darker': {\n backgroundColor: tokens.colorNeutralBackground3,\n border: `${tokens.strokeWidthThin} solid transparent`,\n },\n invalid: {\n ':not(:focus-within),:hover:not(:focus-within)': {\n ...shorthands.borderColor(tokens.colorPaletteRedBorder2),\n },\n },\n invalidUnderline: {\n ':not(:focus-within),:hover:not(:focus-within)': {\n borderBottomColor: tokens.colorPaletteRedBorder2,\n },\n },\n disabled: {\n cursor: 'not-allowed',\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n '@media (forced-colors: active)': {\n ...shorthands.borderColor('GrayText'),\n },\n },\n\n disabledText: {\n color: tokens.colorNeutralForegroundDisabled,\n cursor: 'not-allowed',\n },\n\n hidden: {\n display: 'none',\n },\n visuallyHidden: {\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 },\n});\n\n/**\n * Apply styling to the PickerButton slots based on the state\n */\nexport const useTagPickerButtonStyles_unstable = (state: TagPickerButtonState): TagPickerButtonState => {\n 'use no memo';\n\n const styles = useStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(\n tagPickerButtonClassNames.root,\n styles.button,\n styles[state.size],\n state.hasSelectedOption && styles.visuallyHidden,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","shorthands","tokens","typographyStyles","tagPickerButtonClassNames","root","useStyles","button","alignItems","minHeight","backgroundColor","colorTransparentBackground","border","boxSizing","color","colorNeutralForeground1","columnGap","spacingHorizontalXXS","cursor","fontFamily","fontFamilyBase","textAlign","flexGrow","outlineStyle","placeholder","colorNeutralForeground4","medium","caption1","padding","spacingHorizontalSNudge","large","body1","spacingHorizontalMNudge","body2","spacingHorizontalM","outline","colorNeutralBackground1","strokeWidthThin","colorNeutralStroke1","borderBottomColor","colorNeutralStrokeAccessible","outlineInteractive","borderColor","colorNeutralStroke1Hover","colorNeutralStroke1Pressed","underline","borderBottom","borderRadius","colorNeutralBackground3","invalid","colorPaletteRedBorder2","invalidUnderline","disabled","colorNeutralStrokeDisabled","disabledText","colorNeutralForegroundDisabled","hidden","display","visuallyHidden","clip","height","margin","overflow","width","position","useTagPickerButtonStyles_unstable","state","styles","className","size","hasSelectedOption"],"mappings":"AAAA;AAEA,SAASA,UAAU,EAAEC,YAAY,EAAEC,UAAU,QAAQ,iBAAiB;AACtE,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,wBAAwB;AAIjE,OAAO,MAAMC,4BAAkE;IAC7EC,MAAM;AACR,EAAE;AAEF;;CAEC,GACD,MAAMC,YAAYP,WAAW;IAC3BQ,QAAQ;QACNC,YAAY;QACZC,WAAW;QACXC,iBAAiBR,OAAOS,0BAA0B;QAClDC,QAAQ;QACRC,WAAW;QACXC,OAAOZ,OAAOa,uBAAuB;QACrCC,WAAWd,OAAOe,oBAAoB;QACtCC,QAAQ;QACRC,YAAYjB,OAAOkB,cAAc;QACjCC,WAAW;QACXC,UAAU;QAEV,WAAW;YACTC,cAAc;QAChB;IACF;IAEAC,aAAa;QACXV,OAAOZ,OAAOuB,uBAAuB;IACvC;IAEA,gBAAgB;IAChBC,QAAQ;QACN,GAAGvB,iBAAiBwB,QAAQ;QAC5BC,SAAS,CAAC,IAAI,EACZ1B,OAAO2B,uBAAuB,CAC/B,KAAK,EAAE,CAAC,KAAK,EAAE3B,OAAO2B,uBAAuB,CAAC,GAAG,EAAE3B,OAAOe,oBAAoB,CAAC,CAAC,CAAC,EAAE;IACtF;IACAa,OAAO;QACL,GAAG3B,iBAAiB4B,KAAK;QACzBH,SAAS,CAAC,IAAI,EACZ1B,OAAO8B,uBAAuB,CAC/B,KAAK,EAAE,CAAC,KAAK,EAAE9B,OAAO8B,uBAAuB,CAAC,GAAG,EAAE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AAmBrC,OAAOgD,sBAAsB;QAClD;IACF;IACAE,UAAU;QACRlC,QAAQ;QACRR,iBAAiBR,OAAOS,0BAA0B;QAClD,GAAGV,WAAWyC,WAAW,CAACxC,OAAOmD,0BAA0B,CAAC;QAC5D,kCAAkC;YAChC,GAAGpD,WAAWyC,WAAW,CAAC,WAAW;QACvC;IACF;IAEAY,cAAc;QACZxC,OAAOZ,OAAOqD,8BAA8B;QAC5CrC,QAAQ;IACV;IAEAsC,QAAQ;QACNC,SAAS;IACX;IACAC,gBAAgB;QACdC,MAAM;QACNC,QAAQ;QACRC,QAAQ;QACRC,UAAU;QACVlC,SAAS;QACTmC,OAAO;QACPC,UAAU;IACZ;AACF;AAEA;;CAEC,GACD,OAAO,MAAMC,oCAAoC,CAACC;IAChD;IAEA,MAAMC,SAAS7D;IACf,oDAAoD;IACpD4D,MAAM7D,IAAI,CAAC+D,SAAS,GAAGpE,aACrBI,0BAA0BC,IAAI,EAC9B8D,OAAO5D,MAAM,EACb4D,MAAM,CAACD,MAAMG,IAAI,CAAC,EAClBH,MAAMI,iBAAiB,IAAIH,OAAOT,cAAc,EAChDQ,MAAM7D,IAAI,CAAC+D,SAAS;IAGtB,OAAOF;AACT,EAAE"}
1
+ {"version":3,"sources":["../src/components/TagPickerButton/useTagPickerButtonStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { TagPickerButtonSlots, TagPickerButtonState } from './TagPickerButton.types';\n\nexport const tagPickerButtonClassNames: SlotClassNames<TagPickerButtonSlots> = {\n root: 'fui-TagPickerButton',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n button: {\n alignItems: 'center',\n minHeight: '32px',\n backgroundColor: tokens.colorTransparentBackground,\n border: 'none',\n boxSizing: 'border-box',\n color: tokens.colorNeutralForeground1,\n columnGap: tokens.spacingHorizontalXXS,\n cursor: 'pointer',\n fontFamily: tokens.fontFamilyBase,\n textAlign: 'left',\n flexGrow: 1,\n\n '&:focus': {\n outlineStyle: 'none',\n },\n },\n\n placeholder: {\n color: tokens.colorNeutralForeground4,\n },\n\n // size variants\n medium: {\n ...typographyStyles.caption1,\n padding: `3px ${\n tokens.spacingHorizontalSNudge\n } 3px ${`calc(${tokens.spacingHorizontalSNudge} + ${tokens.spacingHorizontalXXS})`}`,\n },\n large: {\n ...typographyStyles.body1,\n padding: `5px ${\n tokens.spacingHorizontalMNudge\n } 5px ${`calc(${tokens.spacingHorizontalMNudge} + ${tokens.spacingHorizontalXXS})`}`,\n },\n 'extra-large': {\n columnGap: tokens.spacingHorizontalSNudge,\n ...typographyStyles.body2,\n padding: `7px ${\n tokens.spacingHorizontalM\n } 7px ${`calc(${tokens.spacingHorizontalM} + ${tokens.spacingHorizontalSNudge})`}`,\n },\n\n // appearance variants\n outline: {\n backgroundColor: tokens.colorNeutralBackground1,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1}`,\n borderBottomColor: tokens.colorNeutralStrokeAccessible,\n },\n outlineInteractive: {\n '&:hover': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Hover),\n borderBottomColor: tokens.colorNeutralStrokeAccessible,\n },\n\n '&:active': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Pressed),\n borderBottomColor: tokens.colorNeutralStrokeAccessible,\n },\n },\n underline: {\n backgroundColor: tokens.colorTransparentBackground,\n borderBottom: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStrokeAccessible}`,\n borderRadius: '0',\n },\n 'filled-lighter': {\n backgroundColor: tokens.colorNeutralBackground1,\n border: `${tokens.strokeWidthThin} solid transparent`,\n },\n 'filled-darker': {\n backgroundColor: tokens.colorNeutralBackground3,\n border: `${tokens.strokeWidthThin} solid transparent`,\n },\n invalid: {\n ':not(:focus-within),:hover:not(:focus-within)': {\n ...shorthands.borderColor(tokens.colorPaletteRedBorder2),\n },\n },\n invalidUnderline: {\n ':not(:focus-within),:hover:not(:focus-within)': {\n borderBottomColor: tokens.colorPaletteRedBorder2,\n },\n },\n disabled: {\n cursor: 'not-allowed',\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n '@media (forced-colors: active)': {\n ...shorthands.borderColor('GrayText'),\n },\n },\n\n disabledText: {\n color: tokens.colorNeutralForegroundDisabled,\n cursor: 'not-allowed',\n },\n\n hidden: {\n display: 'none',\n },\n visuallyHidden: {\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 },\n});\n\n/**\n * Apply styling to the PickerButton slots based on the state\n */\nexport const useTagPickerButtonStyles_unstable = (state: TagPickerButtonState): TagPickerButtonState => {\n const styles = useStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(\n tagPickerButtonClassNames.root,\n styles.button,\n styles[state.size],\n state.hasSelectedOption && styles.visuallyHidden,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","shorthands","tokens","typographyStyles","tagPickerButtonClassNames","root","useStyles","button","alignItems","minHeight","backgroundColor","colorTransparentBackground","border","boxSizing","color","colorNeutralForeground1","columnGap","spacingHorizontalXXS","cursor","fontFamily","fontFamilyBase","textAlign","flexGrow","outlineStyle","placeholder","colorNeutralForeground4","medium","caption1","padding","spacingHorizontalSNudge","large","body1","spacingHorizontalMNudge","body2","spacingHorizontalM","outline","colorNeutralBackground1","strokeWidthThin","colorNeutralStroke1","borderBottomColor","colorNeutralStrokeAccessible","outlineInteractive","borderColor","colorNeutralStroke1Hover","colorNeutralStroke1Pressed","underline","borderBottom","borderRadius","colorNeutralBackground3","invalid","colorPaletteRedBorder2","invalidUnderline","disabled","colorNeutralStrokeDisabled","disabledText","colorNeutralForegroundDisabled","hidden","display","visuallyHidden","clip","height","margin","overflow","width","position","useTag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;QAC5CrC,QAAQ;IACV;IAEAsC,QAAQ;QACNC,SAAS;IACX;IACAC,gBAAgB;QACdC,MAAM;QACNC,QAAQ;QACRC,QAAQ;QACRC,UAAU;QACVlC,SAAS;QACTmC,OAAO;QACPC,UAAU;IACZ;AACF;AAEA;;CAEC,GACD,OAAO,MAAMC,oCAAoC,CAACC;IAChD,MAAMC,SAAS7D;IACf,oDAAoD;IACpD4D,MAAM7D,IAAI,CAAC+D,SAAS,GAAGpE,aACrBI,0BAA0BC,IAAI,EAC9B8D,OAAO5D,MAAM,EACb4D,MAAM,CAACD,MAAMG,IAAI,CAAC,EAClBH,MAAMI,iBAAiB,IAAIH,OAAOT,cAAc,EAChDQ,MAAM7D,IAAI,CAAC+D,SAAS;IAGtB,OAAOF;AACT,EAAE"}
@@ -1,3 +1,3 @@
1
1
  /**
2
- * State used in rendering PickerControl
2
+ * TagPickerControl Base State - omits design-only state derived from picker context.
3
3
  */ export { };
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TagPickerControl/TagPickerControl.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, ExtractSlotProps, Slot } from '@fluentui/react-utilities';\nimport type { TagPickerContextValue } from '../../contexts/TagPickerContext';\nimport type { ComboboxSlots } from '@fluentui/react-combobox';\nimport type * as React from 'react';\n\nexport type TagPickerControlSlots = {\n root: Slot<ExtractSlotProps<Slot<'div'> & { style?: TagPickerControlCSSProperties }>>;\n /**\n * A secondary action should be a button-like element to be rendered right after\n * the trigger responsible for opening/closing the tag picker popover.\n */\n secondaryAction: Slot<'span'>;\n} & Pick<ComboboxSlots, 'expandIcon'>;\n\nexport type TagPickerControlInternalSlots = {\n aside?: NonNullable<Slot<'span'>>;\n};\n\nexport type TagPickerControlCSSProperties = React.CSSProperties & {\n '--fui-TagPickerControl-aside-width'?: string | number;\n};\n\n/**\n * PickerControl Props\n */\nexport type TagPickerControlProps = ComponentProps<Partial<TagPickerControlSlots>>;\n\n/**\n * State used in rendering PickerControl\n */\nexport type TagPickerControlState = ComponentState<TagPickerControlSlots & TagPickerControlInternalSlots> &\n Pick<TagPickerContextValue, 'size' | 'appearance' | 'disabled'> & {\n invalid: boolean;\n };\n"],"names":[],"mappings":"AA2BA;;CAEC,GACD,WAGI"}
1
+ {"version":3,"sources":["../src/components/TagPickerControl/TagPickerControl.types.ts"],"sourcesContent":["import type {\n ComponentProps,\n ComponentState,\n DistributiveOmit,\n ExtractSlotProps,\n Slot,\n} from '@fluentui/react-utilities';\nimport type { TagPickerContextValue } from '../../contexts/TagPickerContext';\nimport type { ComboboxSlots } from '@fluentui/react-combobox';\nimport type * as React from 'react';\n\nexport type TagPickerControlSlots = {\n root: Slot<ExtractSlotProps<Slot<'div'> & { style?: TagPickerControlCSSProperties }>>;\n /**\n * A secondary action should be a button-like element to be rendered right after\n * the trigger responsible for opening/closing the tag picker popover.\n */\n secondaryAction: Slot<'span'>;\n} & Pick<ComboboxSlots, 'expandIcon'>;\n\nexport type TagPickerControlInternalSlots = {\n aside?: NonNullable<Slot<'span'>>;\n};\n\nexport type TagPickerControlCSSProperties = React.CSSProperties & {\n '--fui-TagPickerControl-aside-width'?: string | number;\n};\n\n/**\n * PickerControl Props\n */\nexport type TagPickerControlProps = ComponentProps<Partial<TagPickerControlSlots>>;\n\n/**\n * State used in rendering PickerControl\n */\nexport type TagPickerControlState = ComponentState<TagPickerControlSlots & TagPickerControlInternalSlots> &\n Pick<TagPickerContextValue, 'size' | 'appearance' | 'disabled'> & {\n invalid: boolean;\n };\n\n/**\n * TagPickerControl Base State - omits design-only state derived from picker context.\n */\nexport type TagPickerControlBaseState = DistributiveOmit<TagPickerControlState, 'size' | 'appearance'>;\n"],"names":[],"mappings":"AAyCA;;CAEC,GACD,WAAuG"}
@@ -1,4 +1,4 @@
1
1
  export { TagPickerControl } from './TagPickerControl';
2
2
  export { renderTagPickerControl_unstable } from './renderTagPickerControl';
3
- export { useTagPickerControl_unstable } from './useTagPickerControl';
3
+ export { useTagPickerControl_unstable, useTagPickerControlBase_unstable } from './useTagPickerControl';
4
4
  export { iconSizes, tagPickerControlAsideWidthToken, tagPickerControlClassNames, useTagPickerControlStyles_unstable } from './useTagPickerControlStyles.styles';
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TagPickerControl/index.ts"],"sourcesContent":["export { TagPickerControl } from './TagPickerControl';\nexport type {\n TagPickerControlCSSProperties,\n TagPickerControlInternalSlots,\n TagPickerControlProps,\n TagPickerControlSlots,\n TagPickerControlState,\n} from './TagPickerControl.types';\nexport { renderTagPickerControl_unstable } from './renderTagPickerControl';\nexport { useTagPickerControl_unstable } from './useTagPickerControl';\nexport {\n iconSizes,\n tagPickerControlAsideWidthToken,\n tagPickerControlClassNames,\n useTagPickerControlStyles_unstable,\n} from './useTagPickerControlStyles.styles';\n"],"names":["TagPickerControl","renderTagPickerControl_unstable","useTagPickerControl_unstable","iconSizes","tagPickerControlAsideWidthToken","tagPickerControlClassNames","useTagPickerControlStyles_unstable"],"mappings":"AAAA,SAASA,gBAAgB,QAAQ,qBAAqB;AAQtD,SAASC,+BAA+B,QAAQ,2BAA2B;AAC3E,SAASC,4BAA4B,QAAQ,wBAAwB;AACrE,SACEC,SAAS,EACTC,+BAA+B,EAC/BC,0BAA0B,EAC1BC,kCAAkC,QAC7B,qCAAqC"}
1
+ {"version":3,"sources":["../src/components/TagPickerControl/index.ts"],"sourcesContent":["export { TagPickerControl } from './TagPickerControl';\nexport type {\n TagPickerControlBaseState,\n TagPickerControlCSSProperties,\n TagPickerControlInternalSlots,\n TagPickerControlProps,\n TagPickerControlSlots,\n TagPickerControlState,\n} from './TagPickerControl.types';\nexport { renderTagPickerControl_unstable } from './renderTagPickerControl';\nexport { useTagPickerControl_unstable, useTagPickerControlBase_unstable } from './useTagPickerControl';\nexport {\n iconSizes,\n tagPickerControlAsideWidthToken,\n tagPickerControlClassNames,\n useTagPickerControlStyles_unstable,\n} from './useTagPickerControlStyles.styles';\n"],"names":["TagPickerControl","renderTagPickerControl_unstable","useTagPickerControl_unstable","useTagPickerControlBase_unstable","iconSizes","tagPickerControlAsideWidthToken","tagPickerControlClassNames","useTagPickerControlStyles_unstable"],"mappings":"AAAA,SAASA,gBAAgB,QAAQ,qBAAqB;AAStD,SAASC,+BAA+B,QAAQ,2BAA2B;AAC3E,SAASC,4BAA4B,EAAEC,gCAAgC,QAAQ,wBAAwB;AACvG,SACEC,SAAS,EACTC,+BAA+B,EAC/BC,0BAA0B,EAC1BC,kCAAkC,QAC7B,qCAAqC"}
@@ -9,14 +9,11 @@ import { tagPickerControlAsideWidthToken } from './useTagPickerControlStyles.sty
9
9
  import { useFieldContext_unstable } from '@fluentui/react-field';
10
10
  import { useExpandLabel } from '../../utils/useExpandLabel';
11
11
  /**
12
- * Create the state required to render PickerControl.
13
- *
14
- * The returned state can be modified with hooks such as usePickerControlStyles_unstable,
15
- * before being passed to renderPickerControl_unstable.
12
+ * Create the base state required to render TagPickerControl, without design-only state.
16
13
  *
17
- * @param props - props from this instance of PickerControl
18
- * @param ref - reference to root HTMLDivElement of PickerControl
19
- */ export const useTagPickerControl_unstable = (props, ref)=>{
14
+ * @param props - props from this instance of TagPickerControl
15
+ * @param ref - reference to root HTMLDivElement of TagPickerControl
16
+ */ export const useTagPickerControlBase_unstable = (props, ref)=>{
20
17
  var _useFieldContext_unstable;
21
18
  const targetRef = useTagPickerContext_unstable((ctx)=>ctx.targetRef);
22
19
  const triggerRef = useTagPickerContext_unstable((ctx)=>ctx.triggerRef);
@@ -25,8 +22,6 @@ import { useExpandLabel } from '../../utils/useExpandLabel';
25
22
  const popoverId = useTagPickerContext_unstable((ctx)=>ctx.popoverId);
26
23
  const setOpen = useTagPickerContext_unstable((ctx)=>ctx.setOpen);
27
24
  const secondaryInnerActionRef = useTagPickerContext_unstable((ctx)=>ctx.secondaryActionRef);
28
- const size = useTagPickerContext_unstable((ctx)=>ctx.size);
29
- const appearance = useTagPickerContext_unstable((ctx)=>ctx.appearance);
30
25
  const disabled = useTagPickerContext_unstable((ctx)=>ctx.disabled);
31
26
  const invalid = ((_useFieldContext_unstable = useFieldContext_unstable()) === null || _useFieldContext_unstable === void 0 ? void 0 : _useFieldContext_unstable.validationState) === 'error';
32
27
  const noPopover = useTagPickerContext_unstable((ctx)=>{
@@ -109,8 +104,6 @@ import { useExpandLabel } from '../../utils/useExpandLabel';
109
104
  aside,
110
105
  expandIcon,
111
106
  secondaryAction,
112
- size,
113
- appearance,
114
107
  disabled,
115
108
  invalid
116
109
  };
@@ -131,3 +124,21 @@ import { useExpandLabel } from '../../utils/useExpandLabel';
131
124
  ]);
132
125
  return state;
133
126
  };
127
+ /**
128
+ * Create the state required to render PickerControl.
129
+ *
130
+ * The returned state can be modified with hooks such as usePickerControlStyles_unstable,
131
+ * before being passed to renderPickerControl_unstable.
132
+ *
133
+ * @param props - props from this instance of PickerControl
134
+ * @param ref - reference to root HTMLDivElement of PickerControl
135
+ */ export const useTagPickerControl_unstable = (props, ref)=>{
136
+ const baseState = useTagPickerControlBase_unstable(props, ref);
137
+ const size = useTagPickerContext_unstable((ctx)=>ctx.size);
138
+ const appearance = useTagPickerContext_unstable((ctx)=>ctx.appearance);
139
+ return {
140
+ ...baseState,
141
+ size,
142
+ appearance
143
+ };
144
+ };
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TagPickerControl/useTagPickerControl.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ExtractSlotProps, Slot } from '@fluentui/react-utilities';\nimport {\n elementContains,\n getIntrinsicElementProps,\n slot,\n useEventCallback,\n useId,\n useMergedRefs,\n} from '@fluentui/react-utilities';\nimport { useFluent_unstable } from '@fluentui/react-shared-contexts';\nimport type { TagPickerControlProps, TagPickerControlState } from './TagPickerControl.types';\nimport { useTagPickerContext_unstable } from '../../contexts/TagPickerContext';\nimport { ChevronDownRegular } from '@fluentui/react-icons';\nimport { useResizeObserverRef } from '../../utils/useResizeObserverRef';\nimport { tagPickerControlAsideWidthToken } from './useTagPickerControlStyles.styles';\nimport { useFieldContext_unstable } from '@fluentui/react-field';\nimport { useExpandLabel } from '../../utils/useExpandLabel';\n\n/**\n * Create the state required to render PickerControl.\n *\n * The returned state can be modified with hooks such as usePickerControlStyles_unstable,\n * before being passed to renderPickerControl_unstable.\n *\n * @param props - props from this instance of PickerControl\n * @param ref - reference to root HTMLDivElement of PickerControl\n */\nexport const useTagPickerControl_unstable = (\n props: TagPickerControlProps,\n ref: React.Ref<HTMLDivElement>,\n): TagPickerControlState => {\n const targetRef = useTagPickerContext_unstable(ctx => ctx.targetRef);\n const triggerRef = useTagPickerContext_unstable(ctx => ctx.triggerRef);\n const tagPickerGroupRef = useTagPickerContext_unstable(ctx => ctx.tagPickerGroupRef);\n const open = useTagPickerContext_unstable(ctx => ctx.open);\n const popoverId = useTagPickerContext_unstable(ctx => ctx.popoverId);\n const setOpen = useTagPickerContext_unstable(ctx => ctx.setOpen);\n const secondaryInnerActionRef = useTagPickerContext_unstable(ctx => ctx.secondaryActionRef);\n const size = useTagPickerContext_unstable(ctx => ctx.size);\n const appearance = useTagPickerContext_unstable(ctx => ctx.appearance);\n const disabled = useTagPickerContext_unstable(ctx => ctx.disabled);\n const invalid = useFieldContext_unstable()?.validationState === 'error';\n const noPopover = useTagPickerContext_unstable(ctx => ctx.noPopover ?? false);\n\n const { targetDocument } = useFluent_unstable();\n const tagPickerId = useId('tagPicker-');\n const rafIdRef = React.useRef<number | null>(null);\n\n const innerRef = React.useRef<HTMLDivElement>(null);\n const expandIconRef = React.useRef<HTMLSpanElement>(null);\n const asideRef = React.useRef<HTMLSpanElement>(null);\n\n const secondaryAction = slot.optional(props.secondaryAction, {\n elementType: 'span',\n });\n const secondaryActionRef = useMergedRefs(secondaryInnerActionRef, secondaryAction?.ref);\n if (secondaryAction) {\n secondaryAction.ref = secondaryActionRef;\n }\n\n const expandIcon = slot.optional(props.expandIcon, {\n renderByDefault: !noPopover,\n defaultProps: {\n 'aria-expanded': open,\n 'aria-disabled': disabled ? 'true' : undefined,\n children: <ChevronDownRegular />,\n role: 'button',\n },\n elementType: 'span',\n });\n\n const expandIconMergeRef = useMergedRefs(expandIcon?.ref, expandIconRef);\n if (expandIcon) {\n expandIcon.ref = expandIconMergeRef;\n }\n\n const observerRef = useResizeObserverRef<HTMLSpanElement>(([entry]) => {\n const targetWindow = targetDocument?.defaultView;\n\n if (targetWindow) {\n rafIdRef.current = targetWindow.requestAnimationFrame(() => {\n innerRef.current?.style.setProperty(tagPickerControlAsideWidthToken, `${entry.contentRect.width}px`);\n });\n }\n });\n const aside = slot.optional<ExtractSlotProps<Slot<'span'>>>(undefined, {\n elementType: 'span',\n renderByDefault: Boolean(secondaryAction || expandIcon),\n defaultProps: {\n ref: observerRef,\n },\n });\n const mergedAsideRefs = useMergedRefs(asideRef, aside?.ref);\n if (aside) {\n aside.ref = mergedAsideRefs;\n }\n\n const handleMouseDown = useEventCallback((event: React.MouseEvent<HTMLDivElement>) => {\n if (event.isDefaultPrevented()) {\n return;\n }\n if (\n elementContains(expandIconRef.current, event.target as Node) ||\n event.target === innerRef.current ||\n event.target === tagPickerGroupRef.current ||\n event.target === asideRef.current\n ) {\n event.preventDefault();\n setOpen(event, !open);\n triggerRef.current?.focus();\n }\n });\n\n const state: TagPickerControlState = {\n components: {\n root: 'div',\n expandIcon: 'span',\n secondaryAction: 'span',\n aside: 'span',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref: useMergedRefs(ref, targetRef, innerRef),\n 'aria-owns': open && !noPopover ? popoverId : undefined,\n ...props,\n onMouseDown: handleMouseDown,\n }),\n { elementType: 'div' },\n ),\n aside,\n expandIcon,\n secondaryAction,\n size,\n appearance,\n disabled,\n invalid,\n };\n\n const expandIconLabelRef = useExpandLabel({ tagPickerId, state: state as Pick<TagPickerControlState, 'expandIcon'> });\n\n const expandIconLabelMergeRef = useMergedRefs(expandIcon?.ref, expandIconLabelRef);\n if (state.expandIcon) {\n state.expandIcon.ref = expandIconLabelMergeRef;\n }\n\n React.useEffect(() => {\n if (rafIdRef.current && targetDocument?.defaultView) {\n targetDocument.defaultView.cancelAnimationFrame(rafIdRef.current);\n }\n }, [targetDocument]);\n\n return state;\n};\n"],"names":["React","elementContains","getIntrinsicElementProps","slot","useEventCallback","useId","useMergedRefs","useFluent_unstable","useTagPickerContext_unstable","ChevronDownRegular","useResizeObserverRef","tagPickerControlAsideWidthToken","useFieldContext_unstable","useExpandLabel","useTagPickerControl_unstable","props","ref","targetRef","ctx","triggerRef","tagPickerGroupRef","open","popoverId","setOpen","secondaryInnerActionRef","secondaryActionRef","size","appearance","disabled","invalid","validationState","noPopover","targetDocument","tagPickerId","rafIdRef","useRef","innerRef","expandIconRef","asideRef","secondaryAction","optional","elementType","expandIcon","renderByDefault","defaultProps","undefined","children","role","expandIconMergeRef","observerRef","entry","targetWindow","defaultView","current","requestAnimationFrame","style","setProperty","contentRect","width","aside","Boolean","mergedAsideRefs","handleMouseDown","event","isDefaultPrevented","target","preventDefault","focus","state","components","root","always","onMouseDown","expandIconLabelRef","expandIconLabelMergeRef","useEffect","cancelAnimationFrame"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAE/B,SACEC,eAAe,EACfC,wBAAwB,EACxBC,IAAI,EACJC,gBAAgB,EAChBC,KAAK,EACLC,aAAa,QACR,4BAA4B;AACnC,SAASC,kBAAkB,QAAQ,kCAAkC;AAErE,SAASC,4BAA4B,QAAQ,kCAAkC;AAC/E,SAASC,kBAAkB,QAAQ,wBAAwB;AAC3D,SAASC,oBAAoB,QAAQ,mCAAmC;AACxE,SAASC,+BAA+B,QAAQ,qCAAqC;AACrF,SAASC,wBAAwB,QAAQ,wBAAwB;AACjE,SAASC,cAAc,QAAQ,6BAA6B;AAE5D;;;;;;;;CAQC,GACD,OAAO,MAAMC,+BAA+B,CAC1CC,OACAC;QAYgBJ;IAVhB,MAAMK,YAAYT,6BAA6BU,CAAAA,MAAOA,IAAID,SAAS;IACnE,MAAME,aAAaX,6BAA6BU,CAAAA,MAAOA,IAAIC,UAAU;IACrE,M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oBgD,KAAK;QAC3B;IACF;IAEA,MAAMC,QAA+B;QACnCC,YAAY;YACVC,MAAM;YACN5B,YAAY;YACZH,iBAAiB;YACjBoB,OAAO;QACT;QACAW,MAAMnE,KAAKoE,MAAM,CACfrE,yBAAyB,OAAO;YAC9Bc,KAAKV,cAAcU,KAAKC,WAAWmB;YACnC,aAAaf,QAAQ,CAACU,YAAYT,YAAYuB;YAC9C,GAAG9B,KAAK;YACRyD,aAAaV;QACf,IACA;YAAErB,aAAa;QAAM;QAEvBkB;QACAjB;QACAH;QACAb;QACAC;QACAC;QACAC;IACF;IAEA,MAAM4C,qBAAqB5D,eAAe;QAAEoB;QAAamC,OAAOA;IAAmD;IAEnH,MAAMM,0BAA0BpE,cAAcoC,uBAAAA,iCAAAA,WAAY1B,GAAG,EAAEyD;IAC/D,IAAIL,MAAM1B,UAAU,EAAE;QACpB0B,MAAM1B,UAAU,CAAC1B,GAAG,GAAG0D;IACzB;IAEA1E,MAAM2E,SAAS,CAAC;QACd,IAAIzC,SAASmB,OAAO,KAAIrB,2BAAAA,qCAAAA,eAAgBoB,WAAW,GAAE;YACnDpB,eAAeoB,WAAW,CAACwB,oBAAoB,CAAC1C,SAASmB,OAAO;QAClE;IACF,GAAG;QAACrB;KAAe;IAEnB,OAAOoC;AACT,EAAE"}
1
+ {"version":3,"sources":["../src/components/TagPickerControl/useTagPickerControl.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ExtractSlotProps, Slot } from '@fluentui/react-utilities';\nimport {\n elementContains,\n getIntrinsicElementProps,\n slot,\n useEventCallback,\n useId,\n useMergedRefs,\n} from '@fluentui/react-utilities';\nimport { useFluent_unstable } from '@fluentui/react-shared-contexts';\nimport type { TagPickerControlBaseState, TagPickerControlProps, TagPickerControlState } from './TagPickerControl.types';\nimport { useTagPickerContext_unstable } from '../../contexts/TagPickerContext';\nimport { ChevronDownRegular } from '@fluentui/react-icons';\nimport { useResizeObserverRef } from '../../utils/useResizeObserverRef';\nimport { tagPickerControlAsideWidthToken } from './useTagPickerControlStyles.styles';\nimport { useFieldContext_unstable } from '@fluentui/react-field';\nimport { useExpandLabel } from '../../utils/useExpandLabel';\n\n/**\n * Create the base state required to render TagPickerControl, without design-only state.\n *\n * @param props - props from this instance of TagPickerControl\n * @param ref - reference to root HTMLDivElement of TagPickerControl\n */\nexport const useTagPickerControlBase_unstable = (\n props: TagPickerControlProps,\n ref: React.Ref<HTMLDivElement>,\n): TagPickerControlBaseState => {\n const targetRef = useTagPickerContext_unstable(ctx => ctx.targetRef);\n const triggerRef = useTagPickerContext_unstable(ctx => ctx.triggerRef);\n const tagPickerGroupRef = useTagPickerContext_unstable(ctx => ctx.tagPickerGroupRef);\n const open = useTagPickerContext_unstable(ctx => ctx.open);\n const popoverId = useTagPickerContext_unstable(ctx => ctx.popoverId);\n const setOpen = useTagPickerContext_unstable(ctx => ctx.setOpen);\n const secondaryInnerActionRef = useTagPickerContext_unstable(ctx => ctx.secondaryActionRef);\n const disabled = useTagPickerContext_unstable(ctx => ctx.disabled);\n const invalid = useFieldContext_unstable()?.validationState === 'error';\n const noPopover = useTagPickerContext_unstable(ctx => ctx.noPopover ?? false);\n\n const { targetDocument } = useFluent_unstable();\n const tagPickerId = useId('tagPicker-');\n const rafIdRef = React.useRef<number | null>(null);\n\n const innerRef = React.useRef<HTMLDivElement>(null);\n const expandIconRef = React.useRef<HTMLSpanElement>(null);\n const asideRef = React.useRef<HTMLSpanElement>(null);\n\n const secondaryAction = slot.optional(props.secondaryAction, {\n elementType: 'span',\n });\n const secondaryActionRef = useMergedRefs(secondaryInnerActionRef, secondaryAction?.ref);\n if (secondaryAction) {\n secondaryAction.ref = secondaryActionRef;\n }\n\n const expandIcon = slot.optional(props.expandIcon, {\n renderByDefault: !noPopover,\n defaultProps: {\n 'aria-expanded': open,\n 'aria-disabled': disabled ? 'true' : undefined,\n children: <ChevronDownRegular />,\n role: 'button',\n },\n elementType: 'span',\n });\n\n const expandIconMergeRef = useMergedRefs(expandIcon?.ref, expandIconRef);\n if (expandIcon) {\n expandIcon.ref = expandIconMergeRef;\n }\n\n const observerRef = useResizeObserverRef<HTMLSpanElement>(([entry]) => {\n const targetWindow = targetDocument?.defaultView;\n\n if (targetWindow) {\n rafIdRef.current = targetWindow.requestAnimationFrame(() => {\n innerRef.current?.style.setProperty(tagPickerControlAsideWidthToken, `${entry.contentRect.width}px`);\n });\n }\n });\n const aside = slot.optional<ExtractSlotProps<Slot<'span'>>>(undefined, {\n elementType: 'span',\n renderByDefault: Boolean(secondaryAction || expandIcon),\n defaultProps: {\n ref: observerRef,\n },\n });\n const mergedAsideRefs = useMergedRefs(asideRef, aside?.ref);\n if (aside) {\n aside.ref = mergedAsideRefs;\n }\n\n const handleMouseDown = useEventCallback((event: React.MouseEvent<HTMLDivElement>) => {\n if (event.isDefaultPrevented()) {\n return;\n }\n if (\n elementContains(expandIconRef.current, event.target as Node) ||\n event.target === innerRef.current ||\n event.target === tagPickerGroupRef.current ||\n event.target === asideRef.current\n ) {\n event.preventDefault();\n setOpen(event, !open);\n triggerRef.current?.focus();\n }\n });\n\n const state: TagPickerControlBaseState = {\n components: {\n root: 'div',\n expandIcon: 'span',\n secondaryAction: 'span',\n aside: 'span',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref: useMergedRefs(ref, targetRef, innerRef),\n 'aria-owns': open && !noPopover ? popoverId : undefined,\n ...props,\n onMouseDown: handleMouseDown,\n }),\n { elementType: 'div' },\n ),\n aside,\n expandIcon,\n secondaryAction,\n disabled,\n invalid,\n };\n\n const expandIconLabelRef = useExpandLabel({\n tagPickerId,\n state: state as Pick<TagPickerControlBaseState, 'expandIcon'>,\n });\n\n const expandIconLabelMergeRef = useMergedRefs(expandIcon?.ref, expandIconLabelRef);\n if (state.expandIcon) {\n state.expandIcon.ref = expandIconLabelMergeRef;\n }\n\n React.useEffect(() => {\n if (rafIdRef.current && targetDocument?.defaultView) {\n targetDocument.defaultView.cancelAnimationFrame(rafIdRef.current);\n }\n }, [targetDocument]);\n\n return state;\n};\n\n/**\n * Create the state required to render PickerControl.\n *\n * The returned state can be modified with hooks such as usePickerControlStyles_unstable,\n * before being passed to renderPickerControl_unstable.\n *\n * @param props - props from this instance of PickerControl\n * @param ref - reference to root HTMLDivElement of PickerControl\n */\nexport const useTagPickerControl_unstable = (\n props: TagPickerControlProps,\n ref: React.Ref<HTMLDivElement>,\n): TagPickerControlState => {\n const baseState = useTagPickerControlBase_unstable(props, ref);\n const size = useTagPickerContext_unstable(ctx => ctx.size);\n const appearance = useTagPickerContext_unstable(ctx => ctx.appearance);\n\n return {\n ...baseState,\n size,\n appearance,\n };\n};\n"],"names":["React","elementContains","getIntrinsicElementProps","slot","useEventCallback","useId","useMergedRefs","useFluent_unstable","useTagPickerContext_unstable","ChevronDownRegular","useResizeObserverRef","tagPickerControlAsideWidthToken","useFieldContext_unstable","useExpandLabel","useTagPickerControlBase_unstable","props","ref","targetRef","ctx","triggerRef","tagPickerGroupRef","open","popoverId","setOpen","secondaryInnerActionRef","secondaryActionRef","disabled","invalid","validationState","noPopover","targetDocument","tagPickerId","rafIdRef","useRef","innerRef","expandIconRef","asideRef","secondaryAction","optional","elementType","expandIcon","renderByDefault","defaultProps","undefined","children","role","expandIconMergeRef","observerRef","entry","targetWindow","defaultView","current","requestAnimationFrame","style","setProperty","contentRect","width","aside","Boolean","mergedAsideRefs","handleMouseDown","event","isDefaultPrevented","target","preventDefault","focus","state","components","root","always","onMouseDown","expandIconLabelRef","expandIconLabelMergeRef","useEffect","cancelAnimationFrame","useTagPickerControl_unstable","baseState","size","appearance"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAE/B,SACEC,eAAe,EACfC,wBAAwB,EACxBC,IAAI,EACJC,gBAAgB,EAChBC,KAAK,EACLC,aAAa,QACR,4BAA4B;AACnC,SAASC,kBAAkB,QAAQ,kCAAkC;AAErE,SAASC,4BAA4B,QAAQ,kCAAkC;AAC/E,SAASC,kBAAkB,QAAQ,wBAAwB;A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ACL,GAAGF,SAAS;QACZC;QACAC;IACF;AACF,EAAE"}
@@ -296,8 +296,6 @@ const useSecondaryActionStyles = /*#__PURE__*/__styles({
296
296
  * Apply styling to the PickerControl slots based on the state
297
297
  */
298
298
  export const useTagPickerControlStyles_unstable = state => {
299
- 'use no memo';
300
-
301
299
  const styles = useStyles();
302
300
  const iconStyles = useIconStyles();
303
301
  const asideStyles = useAsideStyles();
@@ -1 +1 @@
1
- {"version":3,"names":["__styles","mergeClasses","shorthands","tokens","tagPickerControlClassNames","root","expandIcon","secondaryAction","aside","tagPickerControlAsideWidthToken","useStyles","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","z189sj","uwmqm3","Bt984gj","i8kkvl","B7ck84d","mc9l5x","Bf4jedk","qhf8xq","Eh141a","Bbr2w1p","Bduesf4","Bpq79vn","li1rpt","Bsft5z2","E3zdtr","Eqx8gd","By385i5","B1piin3","Dlnsje","d9w3h3","B3778ie","B1q35kw","Bw17bha","Bcgy8vk","Bjuhk93","Gjdm7m","b1kco5","Ba2ppi3","F2fol1","lck23g","wi16st","ywj3b2","umuwi5","Blcqepd","nplu4u","Bioka5o","Bnupc0a","bing71","Bercvud","listbox","E5pizo","Bxyxcbc","listboxCollapsed","medium","sshi5w","large","outline","De3pzq","Bgfg5da","B9xav0g","oivjwe","Bn0qgzm","B4g9neb","zhjwy3","wvpqe5","ibv6hh","u1mtju","h3c5rm","vrafjx","Bekrc4i","i8vvqc","g2u3we","icvyot","B4j52fo","irswps","outlineInteractive","Bgoe8wy","Bwzppfd","oetu4i","gg5e9n","B6oc9vd","ak43y8","wmxk5l","B50zh58","Bvq3b66","Brahy3i","zoxjo1","an54nd","underline","invalid","tvckwq","gk2u95","hhx65j","Bxowmz0","invalidUnderline","disabled","Bceei9c","Bcq6wej","Jcjdmf","sc4o1m","Bosien3","d","p","w","m","h","a","useAsideStyles","Bhzewxz","j35jbq","Bqenvij","iconSizes","small","useIconStyles","icon","sj55zd","Brf1p80","qb2dma","Be2twd7","Bo70h7d","Frg6f3","useSecondaryActionStyles","useTagPickerControlStyles_unstable","state","styles","iconStyles","asideStyles","secondaryActionStyles","className","size","appearance"],"sources":["useTagPickerControlStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nexport const tagPickerControlClassNames = {\n root: 'fui-TagPickerControl',\n expandIcon: 'fui-TagPickerControl__expandIcon',\n secondaryAction: 'fui-TagPickerControl__secondaryAction',\n aside: 'fui-TagPickerControl__aside'\n};\nexport const tagPickerControlAsideWidthToken = '--fui-TagPickerControl-aside-width';\n/**\n * Styles for the root slot\n */ const useStyles = makeStyles({\n root: {\n borderRadius: tokens.borderRadiusMedium,\n paddingRight: `calc(${tokens.spacingHorizontalM} + var(${tagPickerControlAsideWidthToken}, 0px))`,\n paddingLeft: tokens.spacingHorizontalM,\n alignItems: 'center',\n columnGap: tokens.spacingHorizontalXXS,\n boxSizing: 'border-box',\n display: 'flex',\n minWidth: '250px',\n position: 'relative',\n flexWrap: 'wrap',\n // windows high contrast mode focus indicator\n ':focus-within': {\n outlineWidth: '2px',\n outlineStyle: 'solid',\n outlineColor: 'transparent'\n },\n // bottom focus border, shared with Input, Select, and SpinButton\n '::after': {\n boxSizing: 'border-box',\n content: '\"\"',\n position: 'absolute',\n left: '-1px',\n bottom: '-1px',\n right: '-1px',\n height: `max(2px, ${tokens.borderRadiusMedium})`,\n borderBottomLeftRadius: tokens.borderRadiusMedium,\n borderBottomRightRadius: tokens.borderRadiusMedium,\n borderBottom: `${tokens.strokeWidthThick} solid ${tokens.colorCompoundBrandStroke}`,\n clipPath: 'inset(calc(100% - 2px) 0 0 0)',\n transform: 'scaleX(0)',\n transitionProperty: 'transform',\n transitionDuration: tokens.durationUltraFast,\n transitionDelay: tokens.curveAccelerateMid,\n '@media screen and (prefers-reduced-motion: reduce)': {\n transitionDuration: '0.01ms',\n transitionDelay: '0.01ms'\n }\n },\n ':focus-within::after': {\n transform: 'scaleX(1)',\n transitionProperty: 'transform',\n transitionDuration: tokens.durationNormal,\n transitionDelay: tokens.curveDecelerateMid,\n '@media screen and (prefers-reduced-motion: reduce)': {\n transitionDuration: '0.01ms',\n transitionDelay: '0.01ms'\n }\n },\n ':focus-within:active::after': {\n borderBottomColor: tokens.colorCompoundBrandStrokePressed\n }\n },\n listbox: {\n boxShadow: `${tokens.shadow16}`,\n borderRadius: tokens.borderRadiusMedium,\n maxHeight: '80vh',\n boxSizing: 'border-box'\n },\n listboxCollapsed: {\n display: 'none'\n },\n // size variants\n medium: {\n minHeight: '32px'\n },\n large: {\n minHeight: '40px'\n },\n 'extra-large': {\n minHeight: '44px'\n },\n // appearance variants\n outline: {\n backgroundColor: tokens.colorNeutralBackground1,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1}`,\n borderBottomColor: tokens.colorNeutralStrokeAccessible\n },\n outlineInteractive: {\n '&:hover': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Hover),\n borderBottomColor: tokens.colorNeutralStrokeAccessibleHover\n },\n '&:active': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Pressed),\n borderBottomColor: tokens.colorNeutralStrokeAccessiblePressed\n },\n '&:focus-within': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Pressed),\n borderBottomColor: tokens.colorNeutralStrokeAccessiblePressed\n }\n },\n underline: {\n backgroundColor: tokens.colorTransparentBackground,\n borderBottom: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStrokeAccessible}`,\n borderRadius: '0'\n },\n 'filled-lighter': {\n backgroundColor: tokens.colorNeutralBackground1,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke}`\n },\n 'filled-darker': {\n backgroundColor: tokens.colorNeutralBackground3,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke}`\n },\n invalid: {\n ':not(:focus-within),:hover:not(:focus-within)': {\n ...shorthands.borderColor(tokens.colorPaletteRedBorder2)\n }\n },\n invalidUnderline: {\n ':not(:focus-within),:hover:not(:focus-within)': {\n borderBottomColor: tokens.colorPaletteRedBorder2\n }\n },\n disabled: {\n cursor: 'not-allowed',\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n '@media (forced-colors: active)': {\n ...shorthands.borderColor('GrayText')\n }\n }\n});\nconst useAsideStyles = makeStyles({\n root: {\n display: 'flex',\n position: 'absolute',\n top: '0',\n right: tokens.spacingHorizontalM,\n height: '100%',\n cursor: 'text'\n },\n // size variants\n medium: {\n minHeight: '32px'\n },\n large: {\n minHeight: '40px'\n },\n 'extra-large': {\n minHeight: '44px'\n }\n});\nexport const iconSizes = {\n small: '16px',\n medium: '20px',\n large: '24px'\n};\nconst useIconStyles = makeStyles({\n icon: {\n boxSizing: 'border-box',\n color: tokens.colorNeutralStrokeAccessible,\n cursor: 'pointer',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n alignSelf: 'flex-start',\n fontSize: tokens.fontSizeBase500,\n // the SVG must have display: block for accurate positioning\n // otherwise an extra inline space is inserted after the svg element\n '& svg': {\n display: 'block'\n }\n },\n // icon size variants\n medium: {\n fontSize: iconSizes.small,\n marginLeft: tokens.spacingHorizontalXXS,\n minHeight: '32px'\n },\n large: {\n fontSize: iconSizes.medium,\n marginLeft: tokens.spacingHorizontalXXS,\n minHeight: '40px'\n },\n 'extra-large': {\n fontSize: iconSizes.large,\n marginLeft: tokens.spacingHorizontalSNudge,\n minHeight: '44px'\n },\n disabled: {\n color: tokens.colorNeutralForegroundDisabled,\n cursor: 'not-allowed'\n }\n});\nconst useSecondaryActionStyles = makeStyles({\n root: {\n display: 'flex'\n }\n});\n/**\n * Apply styling to the PickerControl slots based on the state\n */ export const useTagPickerControlStyles_unstable = (state)=>{\n 'use no memo';\n const styles = useStyles();\n const iconStyles = useIconStyles();\n const asideStyles = useAsideStyles();\n const secondaryActionStyles = useSecondaryActionStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(tagPickerControlClassNames.root, styles.root, styles[state.size], styles[state.appearance], !state.disabled && state.appearance === 'outline' && styles.outlineInteractive, state.invalid && state.appearance !== 'underline' && styles.invalid, state.invalid && state.appearance === 'underline' && styles.invalidUnderline, state.disabled && styles.disabled, state.root.className);\n if (state.aside) {\n // eslint-disable-next-line react-hooks/immutability\n state.aside.className = mergeClasses(tagPickerControlClassNames.aside, asideStyles.root, asideStyles[state.size], state.aside.className);\n }\n if (state.expandIcon) {\n // eslint-disable-next-line react-hooks/immutability\n state.expandIcon.className = mergeClasses(tagPickerControlClassNames.expandIcon, iconStyles.icon, iconStyles[state.size], state.disabled && iconStyles.disabled, state.expandIcon.className);\n }\n if (state.secondaryAction) {\n // eslint-disable-next-line react-hooks/immutability\n state.secondaryAction.className = mergeClasses(tagPickerControlClassNames.secondaryAction, secondaryActionStyles.root, state.secondaryAction.className);\n }\n return state;\n};\n"],"mappings":"AAAA,YAAY;;AACZ,SAAAA,QAAA,EAAqBC,YAAY,EAAEC,UAAU,QAAQ,gBAAgB;AACrE,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,OAAO,MAAMC,0BAA0B,GAAG;EACtCC,IAAI,EAAE,sBAAsB;EAC5BC,UAAU,EAAE,kCAAkC;EAC9CC,eAAe,EAAE,uCAAuC;EACxDC,KAAK,EAAE;AACX,CAAC;AACD,OAAO,MAAMC,+BAA+B,GAAG,oCAAoC;AACnF;AACA;AACA;AAAI,MAAMC,SAAS,gBAAGV,QAAA;EAAAK,IAAA;IAAAM,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA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 {"version":3,"names":["__styles","mergeClasses","shorthands","tokens","tagPickerControlClassNames","root","expandIcon","secondaryAction","aside","tagPickerControlAsideWidthToken","useStyles","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","z189sj","uwmqm3","Bt984gj","i8kkvl","B7ck84d","mc9l5x","Bf4jedk","qhf8xq","Eh141a","Bbr2w1p","Bduesf4","Bpq79vn","li1rpt","Bsft5z2","E3zdtr","Eqx8gd","By385i5","B1piin3","Dlnsje","d9w3h3","B3778ie","B1q35kw","Bw17bha","Bcgy8vk","Bjuhk93","Gjdm7m","b1kco5","Ba2ppi3","F2fol1","lck23g","wi16st","ywj3b2","umuwi5","Blcqepd","nplu4u","Bioka5o","Bnupc0a","bing71","Bercvud","listbox","E5pizo","Bxyxcbc","listboxCollapsed","medium","sshi5w","large","outline","De3pzq","Bgfg5da","B9xav0g","oivjwe","Bn0qgzm","B4g9neb","zhjwy3","wvpqe5","ibv6hh","u1mtju","h3c5rm","vrafjx","Bekrc4i","i8vvqc","g2u3we","icvyot","B4j52fo","irswps","outlineInteractive","Bgoe8wy","Bwzppfd","oetu4i","gg5e9n","B6oc9vd","ak43y8","wmxk5l","B50zh58","Bvq3b66","Brahy3i","zoxjo1","an54nd","underline","invalid","tvckwq","gk2u95","hhx65j","Bxowmz0","invalidUnderline","disabled","Bceei9c","Bcq6wej","Jcjdmf","sc4o1m","Bosien3","d","p","w","m","h","a","useAsideStyles","Bhzewxz","j35jbq","Bqenvij","iconSizes","small","useIconStyles","icon","sj55zd","Brf1p80","qb2dma","Be2twd7","Bo70h7d","Frg6f3","useSecondaryActionStyles","useTagPickerControlStyles_unstable","state","styles","iconStyles","asideStyles","secondaryActionStyles","className","size","appearance"],"sources":["useTagPickerControlStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nexport const tagPickerControlClassNames = {\n root: 'fui-TagPickerControl',\n expandIcon: 'fui-TagPickerControl__expandIcon',\n secondaryAction: 'fui-TagPickerControl__secondaryAction',\n aside: 'fui-TagPickerControl__aside'\n};\nexport const tagPickerControlAsideWidthToken = '--fui-TagPickerControl-aside-width';\n/**\n * Styles for the root slot\n */ const useStyles = makeStyles({\n root: {\n borderRadius: tokens.borderRadiusMedium,\n paddingRight: `calc(${tokens.spacingHorizontalM} + var(${tagPickerControlAsideWidthToken}, 0px))`,\n paddingLeft: tokens.spacingHorizontalM,\n alignItems: 'center',\n columnGap: tokens.spacingHorizontalXXS,\n boxSizing: 'border-box',\n display: 'flex',\n minWidth: '250px',\n position: 'relative',\n flexWrap: 'wrap',\n // windows high contrast mode focus indicator\n ':focus-within': {\n outlineWidth: '2px',\n outlineStyle: 'solid',\n outlineColor: 'transparent'\n },\n // bottom focus border, shared with Input, Select, and SpinButton\n '::after': {\n boxSizing: 'border-box',\n content: '\"\"',\n position: 'absolute',\n left: '-1px',\n bottom: '-1px',\n right: '-1px',\n height: `max(2px, ${tokens.borderRadiusMedium})`,\n borderBottomLeftRadius: tokens.borderRadiusMedium,\n borderBottomRightRadius: tokens.borderRadiusMedium,\n borderBottom: `${tokens.strokeWidthThick} solid ${tokens.colorCompoundBrandStroke}`,\n clipPath: 'inset(calc(100% - 2px) 0 0 0)',\n transform: 'scaleX(0)',\n transitionProperty: 'transform',\n transitionDuration: tokens.durationUltraFast,\n transitionDelay: tokens.curveAccelerateMid,\n '@media screen and (prefers-reduced-motion: reduce)': {\n transitionDuration: '0.01ms',\n transitionDelay: '0.01ms'\n }\n },\n ':focus-within::after': {\n transform: 'scaleX(1)',\n transitionProperty: 'transform',\n transitionDuration: tokens.durationNormal,\n transitionDelay: tokens.curveDecelerateMid,\n '@media screen and (prefers-reduced-motion: reduce)': {\n transitionDuration: '0.01ms',\n transitionDelay: '0.01ms'\n }\n },\n ':focus-within:active::after': {\n borderBottomColor: tokens.colorCompoundBrandStrokePressed\n }\n },\n listbox: {\n boxShadow: `${tokens.shadow16}`,\n borderRadius: tokens.borderRadiusMedium,\n maxHeight: '80vh',\n boxSizing: 'border-box'\n },\n listboxCollapsed: {\n display: 'none'\n },\n // size variants\n medium: {\n minHeight: '32px'\n },\n large: {\n minHeight: '40px'\n },\n 'extra-large': {\n minHeight: '44px'\n },\n // appearance variants\n outline: {\n backgroundColor: tokens.colorNeutralBackground1,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1}`,\n borderBottomColor: tokens.colorNeutralStrokeAccessible\n },\n outlineInteractive: {\n '&:hover': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Hover),\n borderBottomColor: tokens.colorNeutralStrokeAccessibleHover\n },\n '&:active': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Pressed),\n borderBottomColor: tokens.colorNeutralStrokeAccessiblePressed\n },\n '&:focus-within': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Pressed),\n borderBottomColor: tokens.colorNeutralStrokeAccessiblePressed\n }\n },\n underline: {\n backgroundColor: tokens.colorTransparentBackground,\n borderBottom: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStrokeAccessible}`,\n borderRadius: '0'\n },\n 'filled-lighter': {\n backgroundColor: tokens.colorNeutralBackground1,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke}`\n },\n 'filled-darker': {\n backgroundColor: tokens.colorNeutralBackground3,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke}`\n },\n invalid: {\n ':not(:focus-within),:hover:not(:focus-within)': {\n ...shorthands.borderColor(tokens.colorPaletteRedBorder2)\n }\n },\n invalidUnderline: {\n ':not(:focus-within),:hover:not(:focus-within)': {\n borderBottomColor: tokens.colorPaletteRedBorder2\n }\n },\n disabled: {\n cursor: 'not-allowed',\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n '@media (forced-colors: active)': {\n ...shorthands.borderColor('GrayText')\n }\n }\n});\nconst useAsideStyles = makeStyles({\n root: {\n display: 'flex',\n position: 'absolute',\n top: '0',\n right: tokens.spacingHorizontalM,\n height: '100%',\n cursor: 'text'\n },\n // size variants\n medium: {\n minHeight: '32px'\n },\n large: {\n minHeight: '40px'\n },\n 'extra-large': {\n minHeight: '44px'\n }\n});\nexport const iconSizes = {\n small: '16px',\n medium: '20px',\n large: '24px'\n};\nconst useIconStyles = makeStyles({\n icon: {\n boxSizing: 'border-box',\n color: tokens.colorNeutralStrokeAccessible,\n cursor: 'pointer',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n alignSelf: 'flex-start',\n fontSize: tokens.fontSizeBase500,\n // the SVG must have display: block for accurate positioning\n // otherwise an extra inline space is inserted after the svg element\n '& svg': {\n display: 'block'\n }\n },\n // icon size variants\n medium: {\n fontSize: iconSizes.small,\n marginLeft: tokens.spacingHorizontalXXS,\n minHeight: '32px'\n },\n large: {\n fontSize: iconSizes.medium,\n marginLeft: tokens.spacingHorizontalXXS,\n minHeight: '40px'\n },\n 'extra-large': {\n fontSize: iconSizes.large,\n marginLeft: tokens.spacingHorizontalSNudge,\n minHeight: '44px'\n },\n disabled: {\n color: tokens.colorNeutralForegroundDisabled,\n cursor: 'not-allowed'\n }\n});\nconst useSecondaryActionStyles = makeStyles({\n root: {\n display: 'flex'\n }\n});\n/**\n * Apply styling to the PickerControl slots based on the state\n */ export const useTagPickerControlStyles_unstable = (state)=>{\n const styles = useStyles();\n const iconStyles = useIconStyles();\n const asideStyles = useAsideStyles();\n const secondaryActionStyles = useSecondaryActionStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(tagPickerControlClassNames.root, styles.root, styles[state.size], styles[state.appearance], !state.disabled && state.appearance === 'outline' && styles.outlineInteractive, state.invalid && state.appearance !== 'underline' && styles.invalid, state.invalid && state.appearance === 'underline' && styles.invalidUnderline, state.disabled && styles.disabled, state.root.className);\n if (state.aside) {\n // eslint-disable-next-line react-hooks/immutability\n state.aside.className = mergeClasses(tagPickerControlClassNames.aside, asideStyles.root, asideStyles[state.size], state.aside.className);\n }\n if (state.expandIcon) {\n // eslint-disable-next-line react-hooks/immutability\n state.expandIcon.className = mergeClasses(tagPickerControlClassNames.expandIcon, iconStyles.icon, iconStyles[state.size], state.disabled && iconStyles.disabled, state.expandIcon.className);\n }\n if (state.secondaryAction) {\n // eslint-disable-next-line react-hooks/immutability\n state.secondaryAction.className = mergeClasses(tagPickerControlClassNames.secondaryAction, secondaryActionStyles.root, state.secondaryAction.className);\n }\n return state;\n};\n"],"mappings":"AAAA,YAAY;;AACZ,SAAAA,QAAA,EAAqBC,YAAY,EAAEC,UAAU,QAAQ,gBAAgB;AACrE,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,OAAO,MAAMC,0BAA0B,GAAG;EACtCC,IAAI,EAAE,sBAAsB;EAC5BC,UAAU,EAAE,kCAAkC;EAC9CC,eAAe,EAAE,uCAAuC;EACxDC,KAAK,EAAE;AACX,CAAC;AACD,OAAO,MAAMC,+BAA+B,GAAG,oCAAoC;AACnF;AACA;AACA;AAAI,MAAMC,SAAS,gBAAGV,QAAA;EAAAK,IAAA;IAAAM,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAA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gB,EAAE6B,KAAK,CAAC5B,QAAQ,IAAI6B,MAAM,CAAC7B,QAAQ,EAAE4B,KAAK,CAAC5H,IAAI,CAACiI,SAAS,CAAC;EAC3Z,IAAIL,KAAK,CAACzH,KAAK,EAAE;IACb;IACAyH,KAAK,CAACzH,KAAK,CAAC8H,SAAS,GAAGrI,YAAY,CAACG,0BAA0B,CAACI,KAAK,EAAE4H,WAAW,CAAC/H,IAAI,EAAE+H,WAAW,CAACH,KAAK,CAACM,IAAI,CAAC,EAAEN,KAAK,CAACzH,KAAK,CAAC8H,SAAS,CAAC;EAC5I;EACA,IAAIL,KAAK,CAAC3H,UAAU,EAAE;IAClB;IACA2H,KAAK,CAAC3H,UAAU,CAACgI,SAAS,GAAGrI,YAAY,CAACG,0BAA0B,CAACE,UAAU,EAAE6H,UAAU,CAACX,IAAI,EAAEW,UAAU,CAACF,KAAK,CAACM,IAAI,CAAC,EAAEN,KAAK,CAAC5B,QAAQ,IAAI8B,UAAU,CAAC9B,QAAQ,EAAE4B,KAAK,CAAC3H,UAAU,CAACgI,SAAS,CAAC;EAChM;EACA,IAAIL,KAAK,CAAC1H,eAAe,EAAE;IACvB;IACA0H,KAAK,CAAC1H,eAAe,CAAC+H,SAAS,GAAGrI,YAAY,CAACG,0BAA0B,CAACG,eAAe,EAAE8H,qBAAqB,CAAChI,IAAI,EAAE4H,KAAK,CAAC1H,eAAe,CAAC+H,SAAS,CAAC;EAC3J;EACA,OAAOL,KAAK;AAChB,CAAC","ignoreList":[]}
@@ -205,7 +205,6 @@ const useSecondaryActionStyles = makeStyles({
205
205
  /**
206
206
  * Apply styling to the PickerControl slots based on the state
207
207
  */ export const useTagPickerControlStyles_unstable = (state)=>{
208
- 'use no memo';
209
208
  const styles = useStyles();
210
209
  const iconStyles = useIconStyles();
211
210
  const asideStyles = useAsideStyles();
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TagPickerControl/useTagPickerControlStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { tokens } from '@fluentui/react-theme';\nimport type {\n TagPickerControlInternalSlots,\n TagPickerControlSlots,\n TagPickerControlState,\n} from './TagPickerControl.types';\n\nexport const tagPickerControlClassNames: SlotClassNames<TagPickerControlSlots & TagPickerControlInternalSlots> = {\n root: 'fui-TagPickerControl',\n expandIcon: 'fui-TagPickerControl__expandIcon',\n secondaryAction: 'fui-TagPickerControl__secondaryAction',\n aside: 'fui-TagPickerControl__aside',\n};\n\nexport const tagPickerControlAsideWidthToken = '--fui-TagPickerControl-aside-width' as const;\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n borderRadius: tokens.borderRadiusMedium,\n paddingRight: `calc(${tokens.spacingHorizontalM} + var(${tagPickerControlAsideWidthToken}, 0px))`,\n paddingLeft: tokens.spacingHorizontalM,\n alignItems: 'center',\n columnGap: tokens.spacingHorizontalXXS,\n boxSizing: 'border-box',\n display: 'flex',\n minWidth: '250px',\n position: 'relative',\n flexWrap: 'wrap',\n\n // windows high contrast mode focus indicator\n ':focus-within': {\n outlineWidth: '2px',\n outlineStyle: 'solid',\n outlineColor: 'transparent',\n },\n\n // bottom focus border, shared with Input, Select, and SpinButton\n '::after': {\n boxSizing: 'border-box',\n content: '\"\"',\n position: 'absolute',\n left: '-1px',\n bottom: '-1px',\n right: '-1px',\n height: `max(2px, ${tokens.borderRadiusMedium})`,\n borderBottomLeftRadius: tokens.borderRadiusMedium,\n borderBottomRightRadius: tokens.borderRadiusMedium,\n borderBottom: `${tokens.strokeWidthThick} solid ${tokens.colorCompoundBrandStroke}`,\n clipPath: 'inset(calc(100% - 2px) 0 0 0)',\n transform: 'scaleX(0)',\n transitionProperty: 'transform',\n transitionDuration: tokens.durationUltraFast,\n transitionDelay: tokens.curveAccelerateMid,\n\n '@media screen and (prefers-reduced-motion: reduce)': {\n transitionDuration: '0.01ms',\n transitionDelay: '0.01ms',\n },\n },\n ':focus-within::after': {\n transform: 'scaleX(1)',\n transitionProperty: 'transform',\n transitionDuration: tokens.durationNormal,\n transitionDelay: tokens.curveDecelerateMid,\n\n '@media screen and (prefers-reduced-motion: reduce)': {\n transitionDuration: '0.01ms',\n transitionDelay: '0.01ms',\n },\n },\n ':focus-within:active::after': {\n borderBottomColor: tokens.colorCompoundBrandStrokePressed,\n },\n },\n\n listbox: {\n boxShadow: `${tokens.shadow16}`,\n borderRadius: tokens.borderRadiusMedium,\n maxHeight: '80vh',\n boxSizing: 'border-box',\n },\n\n listboxCollapsed: {\n display: 'none',\n },\n\n // size variants\n medium: {\n minHeight: '32px',\n },\n large: {\n minHeight: '40px',\n },\n 'extra-large': {\n minHeight: '44px',\n },\n\n // appearance variants\n outline: {\n backgroundColor: tokens.colorNeutralBackground1,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1}`,\n borderBottomColor: tokens.colorNeutralStrokeAccessible,\n },\n\n outlineInteractive: {\n '&:hover': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Hover),\n borderBottomColor: tokens.colorNeutralStrokeAccessibleHover,\n },\n\n '&:active': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Pressed),\n borderBottomColor: tokens.colorNeutralStrokeAccessiblePressed,\n },\n\n '&:focus-within': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Pressed),\n borderBottomColor: tokens.colorNeutralStrokeAccessiblePressed,\n },\n },\n underline: {\n backgroundColor: tokens.colorTransparentBackground,\n borderBottom: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStrokeAccessible}`,\n borderRadius: '0',\n },\n 'filled-lighter': {\n backgroundColor: tokens.colorNeutralBackground1,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke}`,\n },\n 'filled-darker': {\n backgroundColor: tokens.colorNeutralBackground3,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke}`,\n },\n invalid: {\n ':not(:focus-within),:hover:not(:focus-within)': {\n ...shorthands.borderColor(tokens.colorPaletteRedBorder2),\n },\n },\n invalidUnderline: {\n ':not(:focus-within),:hover:not(:focus-within)': {\n borderBottomColor: tokens.colorPaletteRedBorder2,\n },\n },\n\n disabled: {\n cursor: 'not-allowed',\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n '@media (forced-colors: active)': {\n ...shorthands.borderColor('GrayText'),\n },\n },\n});\n\nconst useAsideStyles = makeStyles({\n root: {\n display: 'flex',\n position: 'absolute',\n top: '0',\n right: tokens.spacingHorizontalM,\n height: '100%',\n cursor: 'text',\n },\n // size variants\n medium: {\n minHeight: '32px',\n },\n large: {\n minHeight: '40px',\n },\n 'extra-large': {\n minHeight: '44px',\n },\n});\n\nexport const iconSizes = {\n small: '16px',\n medium: '20px',\n large: '24px',\n};\n\nconst useIconStyles = makeStyles({\n icon: {\n boxSizing: 'border-box',\n color: tokens.colorNeutralStrokeAccessible,\n cursor: 'pointer',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n alignSelf: 'flex-start',\n fontSize: tokens.fontSizeBase500,\n // the SVG must have display: block for accurate positioning\n // otherwise an extra inline space is inserted after the svg element\n '& svg': {\n display: 'block',\n },\n },\n // icon size variants\n medium: {\n fontSize: iconSizes.small,\n marginLeft: tokens.spacingHorizontalXXS,\n minHeight: '32px',\n },\n large: {\n fontSize: iconSizes.medium,\n marginLeft: tokens.spacingHorizontalXXS,\n minHeight: '40px',\n },\n 'extra-large': {\n fontSize: iconSizes.large,\n marginLeft: tokens.spacingHorizontalSNudge,\n minHeight: '44px',\n },\n disabled: {\n color: tokens.colorNeutralForegroundDisabled,\n cursor: 'not-allowed',\n },\n});\n\nconst useSecondaryActionStyles = makeStyles({\n root: { display: 'flex' },\n});\n\n/**\n * Apply styling to the PickerControl slots based on the state\n */\nexport const useTagPickerControlStyles_unstable = (state: TagPickerControlState): TagPickerControlState => {\n 'use no memo';\n\n const styles = useStyles();\n const iconStyles = useIconStyles();\n const asideStyles = useAsideStyles();\n const secondaryActionStyles = useSecondaryActionStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(\n tagPickerControlClassNames.root,\n styles.root,\n styles[state.size],\n styles[state.appearance],\n !state.disabled && state.appearance === 'outline' && styles.outlineInteractive,\n state.invalid && state.appearance !== 'underline' && styles.invalid,\n state.invalid && state.appearance === 'underline' && styles.invalidUnderline,\n state.disabled && styles.disabled,\n state.root.className,\n );\n\n if (state.aside) {\n // eslint-disable-next-line react-hooks/immutability\n state.aside.className = mergeClasses(\n tagPickerControlClassNames.aside,\n asideStyles.root,\n asideStyles[state.size],\n state.aside.className,\n );\n }\n\n if (state.expandIcon) {\n // eslint-disable-next-line react-hooks/immutability\n state.expandIcon.className = mergeClasses(\n tagPickerControlClassNames.expandIcon,\n iconStyles.icon,\n iconStyles[state.size],\n state.disabled && iconStyles.disabled,\n state.expandIcon.className,\n );\n }\n\n if (state.secondaryAction) {\n // eslint-disable-next-line react-hooks/immutability\n state.secondaryAction.className = mergeClasses(\n tagPickerControlClassNames.secondaryAction,\n secondaryActionStyles.root,\n state.secondaryAction.className,\n );\n }\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","shorthands","tokens","tagPickerControlClassNames","root","expandIcon","secondaryAction","aside","tagPickerControlAsideWidthToken","useStyles","borderRadius","borderRadiusMedium","paddingRight","spacingHorizontalM","paddingLeft","alignItems","columnGap","spacingHorizontalXXS","boxSizing","display","minWidth","position","flexWrap","outlineWidth","outlineStyle","outlineColor","content","left","bottom","right","height","borderBottomLeftRadius","borderBottomRightRadius","borderBottom","strokeWidthThick","colorCompoundBrandStroke","clipPath","transform","transitionProperty","transitionDuration","durationUltraFast","transitionDelay","curveAccelerateMid","durationNormal","curveDecelerateMid","borderBottomColor","colorCompoundBrandStrokePressed","listbox","boxShadow","shadow16","maxHeight","listboxCollapsed","medium","minHeight","large","outline","backgroundColor","colorNeutralBackground1","border","strokeWidthThin","colorNeutralStroke1","colorNeutralStrokeAccessible","outlineInteractive","borderColor","colorNeutralStroke1Hover","colorNeutralStrokeAccessibleHover","colorNeutralStroke1Pressed","colorNeutralStrokeAccessiblePressed","underline","colorTransparentBackground","colorTransparentStroke","colorNeutralBackground3","invalid","colorPaletteRedBorder2","invalidUnderline","disabled","cursor","colorNeutralStrokeDisabled","useAsideStyles","top","iconSizes","small","useIconStyles","icon","color","justifyContent","alignSelf","fontSize","fontSizeBase500","marginLeft","spacingHorizontalSNudge","colorNeutralForegroundDisabled","useSecondaryActionStyles","useTagPickerControlStyles_unstable","state","styles","iconStyles","asideStyles","secondaryActionStyles","className","size","appearance"],"mappings":"AAAA;AAEA,SAASA,UAAU,EAAEC,YAAY,EAAEC,UAAU,QAAQ,iBAAiB;AAEtE,SAASC,MAAM,QAAQ,wBAAwB;AAO/C,OAAO,MAAMC,6BAAoG;IAC/GC,MAAM;IACNC,YAAY;IACZC,iBAAiB;IACjBC,OAAO;AACT,EAAE;AAEF,OAAO,MAAMC,kCAAkC,qCAA8C;AAE7F;;CAEC,GACD,MAAMC,YAAYV,WAAW;IAC3BK,MAAM;QACJM,cAAcR,OAAOS,kBAAkB;QACvCC,cAAc,CAAC,KAAK,EAAEV,OAAOW,kBAAkB,CAAC,OAAO,EAAEL,gCAAgC,OAAO,CAAC;QACjGM,aAAaZ,OAAOW,kBAAkB;QACtCE,YAAY;QACZC,WAAWd,OAAOe,oBAAoB;QACtCC,WAAW;QACXC,SAAS;QACTC,UAAU;QACVC,UAAU;QACVC,UAAU;QAEV,6CAA6C;QAC7C,iBAAiB;YACfC,cAAc;YACdC,cAAc;YACdC,cAAc;QAChB;QAEA,iEAAiE;QACjE,WAAW;YACTP,WAAW;YACXQ,SAAS;YACTL,UAAU;YACVM,MAAM;YACNC,QAAQ;YACRC,OAAO;YACPC,QAAQ,CAAC,SAAS,EAAE5B,OAAOS,kBAAkB,CAAC,CAAC,CAAC;YAChDoB,wBAAwB7B,OAAOS,kBAAkB;YACjDqB,yBAAyB9B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,MAAMnB,QAAQ,IAAIoB,OAAOpB,QAAQ,EACjCmB,MAAM1F,IAAI,CAAC+F,SAAS;IAGtB,IAAIL,MAAMvF,KAAK,EAAE;QACf,oDAAoD;QACpDuF,MAAMvF,KAAK,CAAC4F,SAAS,GAAGnG,aACtBG,2BAA2BI,KAAK,EAChC0F,YAAY7F,IAAI,EAChB6F,WAAW,CAACH,MAAMM,IAAI,CAAC,EACvBN,MAAMvF,KAAK,CAAC4F,SAAS;IAEzB;IAEA,IAAIL,MAAMzF,UAAU,EAAE;QACpB,oDAAoD;QACpDyF,MAAMzF,UAAU,CAAC8F,SAAS,GAAGnG,aAC3BG,2BAA2BE,UAAU,EACrC2F,WAAWb,IAAI,EACfa,UAAU,CAACF,MAAMM,IAAI,CAAC,EACtBN,MAAMnB,QAAQ,IAAIqB,WAAWrB,QAAQ,EACrCmB,MAAMzF,UAAU,CAAC8F,SAAS;IAE9B;IAEA,IAAIL,MAAMxF,eAAe,EAAE;QACzB,oDAAoD;QACpDwF,MAAMxF,eAAe,CAAC6F,SAAS,GAAGnG,aAChCG,2BAA2BG,eAAe,EAC1C4F,sBAAsB9F,IAAI,EAC1B0F,MAAMxF,eAAe,CAAC6F,SAAS;IAEnC;IAEA,OAAOL;AACT,EAAE"}
1
+ {"version":3,"sources":["../src/components/TagPickerControl/useTagPickerControlStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { tokens } from '@fluentui/react-theme';\nimport type {\n TagPickerControlInternalSlots,\n TagPickerControlSlots,\n TagPickerControlState,\n} from './TagPickerControl.types';\n\nexport const tagPickerControlClassNames: SlotClassNames<TagPickerControlSlots & TagPickerControlInternalSlots> = {\n root: 'fui-TagPickerControl',\n expandIcon: 'fui-TagPickerControl__expandIcon',\n secondaryAction: 'fui-TagPickerControl__secondaryAction',\n aside: 'fui-TagPickerControl__aside',\n};\n\nexport const tagPickerControlAsideWidthToken = '--fui-TagPickerControl-aside-width' as const;\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n borderRadius: tokens.borderRadiusMedium,\n paddingRight: `calc(${tokens.spacingHorizontalM} + var(${tagPickerControlAsideWidthToken}, 0px))`,\n paddingLeft: tokens.spacingHorizontalM,\n alignItems: 'center',\n columnGap: tokens.spacingHorizontalXXS,\n boxSizing: 'border-box',\n display: 'flex',\n minWidth: '250px',\n position: 'relative',\n flexWrap: 'wrap',\n\n // windows high contrast mode focus indicator\n ':focus-within': {\n outlineWidth: '2px',\n outlineStyle: 'solid',\n outlineColor: 'transparent',\n },\n\n // bottom focus border, shared with Input, Select, and SpinButton\n '::after': {\n boxSizing: 'border-box',\n content: '\"\"',\n position: 'absolute',\n left: '-1px',\n bottom: '-1px',\n right: '-1px',\n height: `max(2px, ${tokens.borderRadiusMedium})`,\n borderBottomLeftRadius: tokens.borderRadiusMedium,\n borderBottomRightRadius: tokens.borderRadiusMedium,\n borderBottom: `${tokens.strokeWidthThick} solid ${tokens.colorCompoundBrandStroke}`,\n clipPath: 'inset(calc(100% - 2px) 0 0 0)',\n transform: 'scaleX(0)',\n transitionProperty: 'transform',\n transitionDuration: tokens.durationUltraFast,\n transitionDelay: tokens.curveAccelerateMid,\n\n '@media screen and (prefers-reduced-motion: reduce)': {\n transitionDuration: '0.01ms',\n transitionDelay: '0.01ms',\n },\n },\n ':focus-within::after': {\n transform: 'scaleX(1)',\n transitionProperty: 'transform',\n transitionDuration: tokens.durationNormal,\n transitionDelay: tokens.curveDecelerateMid,\n\n '@media screen and (prefers-reduced-motion: reduce)': {\n transitionDuration: '0.01ms',\n transitionDelay: '0.01ms',\n },\n },\n ':focus-within:active::after': {\n borderBottomColor: tokens.colorCompoundBrandStrokePressed,\n },\n },\n\n listbox: {\n boxShadow: `${tokens.shadow16}`,\n borderRadius: tokens.borderRadiusMedium,\n maxHeight: '80vh',\n boxSizing: 'border-box',\n },\n\n listboxCollapsed: {\n display: 'none',\n },\n\n // size variants\n medium: {\n minHeight: '32px',\n },\n large: {\n minHeight: '40px',\n },\n 'extra-large': {\n minHeight: '44px',\n },\n\n // appearance variants\n outline: {\n backgroundColor: tokens.colorNeutralBackground1,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1}`,\n borderBottomColor: tokens.colorNeutralStrokeAccessible,\n },\n\n outlineInteractive: {\n '&:hover': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Hover),\n borderBottomColor: tokens.colorNeutralStrokeAccessibleHover,\n },\n\n '&:active': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Pressed),\n borderBottomColor: tokens.colorNeutralStrokeAccessiblePressed,\n },\n\n '&:focus-within': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Pressed),\n borderBottomColor: tokens.colorNeutralStrokeAccessiblePressed,\n },\n },\n underline: {\n backgroundColor: tokens.colorTransparentBackground,\n borderBottom: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStrokeAccessible}`,\n borderRadius: '0',\n },\n 'filled-lighter': {\n backgroundColor: tokens.colorNeutralBackground1,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke}`,\n },\n 'filled-darker': {\n backgroundColor: tokens.colorNeutralBackground3,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke}`,\n },\n invalid: {\n ':not(:focus-within),:hover:not(:focus-within)': {\n ...shorthands.borderColor(tokens.colorPaletteRedBorder2),\n },\n },\n invalidUnderline: {\n ':not(:focus-within),:hover:not(:focus-within)': {\n borderBottomColor: tokens.colorPaletteRedBorder2,\n },\n },\n\n disabled: {\n cursor: 'not-allowed',\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n '@media (forced-colors: active)': {\n ...shorthands.borderColor('GrayText'),\n },\n },\n});\n\nconst useAsideStyles = makeStyles({\n root: {\n display: 'flex',\n position: 'absolute',\n top: '0',\n right: tokens.spacingHorizontalM,\n height: '100%',\n cursor: 'text',\n },\n // size variants\n medium: {\n minHeight: '32px',\n },\n large: {\n minHeight: '40px',\n },\n 'extra-large': {\n minHeight: '44px',\n },\n});\n\nexport const iconSizes = {\n small: '16px',\n medium: '20px',\n large: '24px',\n};\n\nconst useIconStyles = makeStyles({\n icon: {\n boxSizing: 'border-box',\n color: tokens.colorNeutralStrokeAccessible,\n cursor: 'pointer',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n alignSelf: 'flex-start',\n fontSize: tokens.fontSizeBase500,\n // the SVG must have display: block for accurate positioning\n // otherwise an extra inline space is inserted after the svg element\n '& svg': {\n display: 'block',\n },\n },\n // icon size variants\n medium: {\n fontSize: iconSizes.small,\n marginLeft: tokens.spacingHorizontalXXS,\n minHeight: '32px',\n },\n large: {\n fontSize: iconSizes.medium,\n marginLeft: tokens.spacingHorizontalXXS,\n minHeight: '40px',\n },\n 'extra-large': {\n fontSize: iconSizes.large,\n marginLeft: tokens.spacingHorizontalSNudge,\n minHeight: '44px',\n },\n disabled: {\n color: tokens.colorNeutralForegroundDisabled,\n cursor: 'not-allowed',\n },\n});\n\nconst useSecondaryActionStyles = makeStyles({\n root: { display: 'flex' },\n});\n\n/**\n * Apply styling to the PickerControl slots based on the state\n */\nexport const useTagPickerControlStyles_unstable = (state: TagPickerControlState): TagPickerControlState => {\n const styles = useStyles();\n const iconStyles = useIconStyles();\n const asideStyles = useAsideStyles();\n const secondaryActionStyles = useSecondaryActionStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(\n tagPickerControlClassNames.root,\n styles.root,\n styles[state.size],\n styles[state.appearance],\n !state.disabled && state.appearance === 'outline' && styles.outlineInteractive,\n state.invalid && state.appearance !== 'underline' && styles.invalid,\n state.invalid && state.appearance === 'underline' && styles.invalidUnderline,\n state.disabled && styles.disabled,\n state.root.className,\n );\n\n if (state.aside) {\n // eslint-disable-next-line react-hooks/immutability\n state.aside.className = mergeClasses(\n tagPickerControlClassNames.aside,\n asideStyles.root,\n asideStyles[state.size],\n state.aside.className,\n );\n }\n\n if (state.expandIcon) {\n // eslint-disable-next-line react-hooks/immutability\n state.expandIcon.className = mergeClasses(\n tagPickerControlClassNames.expandIcon,\n iconStyles.icon,\n iconStyles[state.size],\n state.disabled && iconStyles.disabled,\n state.expandIcon.className,\n );\n }\n\n if (state.secondaryAction) {\n // eslint-disable-next-line react-hooks/immutability\n state.secondaryAction.className = mergeClasses(\n tagPickerControlClassNames.secondaryAction,\n secondaryActionStyles.root,\n state.secondaryAction.className,\n );\n }\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","shorthands","tokens","tagPickerControlClassNames","root","expandIcon","secondaryAction","aside","tagPickerControlAsideWidthToken","useStyles","borderRadius","borderRadiusMedium","paddingRight","spacingHorizontalM","paddingLeft","alignItems","columnGap","spacingHorizontalXXS","boxSizing","display","minWidth","position","flexWrap","outlineWidth","outlineStyle","outlineColor","content","left","bottom","right","height","borderBottomLeftRadius","borderBottomRightRadius","borderBottom","strokeWidthThick","colorCompoundBrandStroke","clipPath","transform","transitionProperty","transitionDuration","durationUltraFast","transitionDelay","curveAccelerateMid","durationNormal","curveDecelerateMid","borderBottomColor","colorCompoundBrandStrokePressed","listbox","boxShadow","shadow16","maxHeight","listboxCollapsed","medium","minHeight","large","outline","backgroundColor","colorNeutralBackground1","border","strokeWidthThin","colorNeutralStroke1","colorNeutralStrokeAccessible","outlineInteractive","borderColor","colorNeutralStroke1Hover","colorNeutralStrokeAccessibleHover","colorNeutralStroke1Pressed","colorNeutralStrokeAccessiblePressed","underline","colorTransparentBackground","colorTransparentStroke","colorNeutralBackground3","invalid","colorPaletteRedBorder2","invalidUnderline","disabled","cursor","colorNeutralStrokeDisabled","useAsideStyles","top","iconSizes","small","useIconStyles","icon","color","justifyContent","alignSelf","fontSize","fontSizeBase500","marginLeft","spacingHorizontalSNudge","colorNeutralForegroundDisabled","useSecondaryActionStyles","useTagPickerControlStyles_unstable","state","styles","iconStyles","asideStyles","secondary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AS,GAAGnG,aAC3BG,2BAA2BE,UAAU,EACrC2F,WAAWb,IAAI,EACfa,UAAU,CAACF,MAAMM,IAAI,CAAC,EACtBN,MAAMnB,QAAQ,IAAIqB,WAAWrB,QAAQ,EACrCmB,MAAMzF,UAAU,CAAC8F,SAAS;IAE9B;IAEA,IAAIL,MAAMxF,eAAe,EAAE;QACzB,oDAAoD;QACpDwF,MAAMxF,eAAe,CAAC6F,SAAS,GAAGnG,aAChCG,2BAA2BG,eAAe,EAC1C4F,sBAAsB9F,IAAI,EAC1B0F,MAAMxF,eAAe,CAAC6F,SAAS;IAEnC;IAEA,OAAOL;AACT,EAAE"}
@@ -65,8 +65,6 @@ const useStyles = /*#__PURE__*/__styles({
65
65
  * Apply styling to the TagPickerGroup slots based on the state
66
66
  */
67
67
  export const useTagPickerGroupStyles_unstable = state => {
68
- 'use no memo';
69
-
70
68
  useTagGroupStyles_unstable(state);
71
69
  const styles = useStyles();
72
70
  // eslint-disable-next-line react-hooks/immutability
@@ -1 +1 @@
1
- {"version":3,"names":["__styles","mergeClasses","useTagGroupStyles_unstable","tokens","tagSizeToTagPickerSize","tagPickerGroupClassNames","root","useStyles","Eh141a","B7ck84d","Bceei9c","medium","Byoj8tv","uwmqm3","z189sj","z8tnut","B0ocmuz","i8kkvl","Belr9w4","rmohyg","large","d","p","useTagPickerGroupStyles_unstable","state","styles","className","size"],"sources":["useTagPickerGroupStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport { useTagGroupStyles_unstable } from '@fluentui/react-tags';\nimport { tokens } from '@fluentui/react-theme';\nimport { tagSizeToTagPickerSize } from '../../utils/tagPicker2Tag';\nexport const tagPickerGroupClassNames = {\n root: 'fui-TagPickerGroup'\n};\n/**\n * Styles for the root slot\n */ const useStyles = makeStyles({\n root: {\n flexWrap: 'wrap',\n boxSizing: 'border-box',\n cursor: 'text'\n },\n // size variants\n medium: {\n padding: `${tokens.spacingVerticalSNudge} 0 ${tokens.spacingVerticalSNudge} 0`,\n gap: tokens.spacingHorizontalXS\n },\n large: {\n padding: `${tokens.spacingVerticalS} 0 ${tokens.spacingVerticalS} 0`,\n gap: tokens.spacingHorizontalSNudge\n },\n 'extra-large': {\n padding: `${tokens.spacingVerticalS} 0 ${tokens.spacingVerticalS} 0`,\n gap: tokens.spacingHorizontalSNudge\n }\n});\n/**\n * Apply styling to the TagPickerGroup slots based on the state\n */ export const useTagPickerGroupStyles_unstable = (state)=>{\n 'use no memo';\n useTagGroupStyles_unstable(state);\n const styles = useStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(tagPickerGroupClassNames.root, styles[tagSizeToTagPickerSize(state.size)], styles.root, state.root.className);\n return state;\n};\n"],"mappings":"AAAA,YAAY;;AACZ,SAAAA,QAAA,EAAqBC,YAAY,QAAQ,gBAAgB;AACzD,SAASC,0BAA0B,QAAQ,sBAAsB;AACjE,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,sBAAsB,QAAQ,2BAA2B;AAClE,OAAO,MAAMC,wBAAwB,GAAG;EACpCC,IAAI,EAAE;AACV,CAAC;AACD;AACA;AACA;AAAI,MAAMC,SAAS,gBAAGP,QAAA;EAAAM,IAAA;IAAAE,MAAA;IAAAC,OAAA;IAAAC,OAAA;EAAA;EAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;EAAAC,KAAA;IAAAR,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;EAAA;IAAAP,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;AAAA;EAAAE,CAAA;IAAAC,CAAA;EAAA;IAAAA,CAAA;EAAA;IAAAA,CAAA;EAAA;IAAAA,CAAA;EAAA;IAAAA,CAAA;EAAA;IAAAA,CAAA;EAAA;AAAA,CAmBrB,CAAC;AACF;AACA;AACA;AAAI,OAAO,MAAMC,gCAAgC,GAAIC,KAAK,IAAG;EACzD,aAAa;;EACbtB,0BAA0B,CAACsB,KAAK,CAAC;EACjC,MAAMC,MAAM,GAAGlB,SAAS,CAAC,CAAC;EAC1B;EACAiB,KAAK,CAAClB,IAAI,CAACoB,SAAS,GAAGzB,YAAY,CAACI,wBAAwB,CAACC,IAAI,EAAEmB,MAAM,CAACrB,sBAAsB,CAACoB,KAAK,CAACG,IAAI,CAAC,CAAC,EAAEF,MAAM,CAACnB,IAAI,EAAEkB,KAAK,CAAClB,IAAI,CAACoB,SAAS,CAAC;EACjJ,OAAOF,KAAK;AAChB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["__styles","mergeClasses","useTagGroupStyles_unstable","tokens","tagSizeToTagPickerSize","tagPickerGroupClassNames","root","useStyles","Eh141a","B7ck84d","Bceei9c","medium","Byoj8tv","uwmqm3","z189sj","z8tnut","B0ocmuz","i8kkvl","Belr9w4","rmohyg","large","d","p","useTagPickerGroupStyles_unstable","state","styles","className","size"],"sources":["useTagPickerGroupStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport { useTagGroupStyles_unstable } from '@fluentui/react-tags';\nimport { tokens } from '@fluentui/react-theme';\nimport { tagSizeToTagPickerSize } from '../../utils/tagPicker2Tag';\nexport const tagPickerGroupClassNames = {\n root: 'fui-TagPickerGroup'\n};\n/**\n * Styles for the root slot\n */ const useStyles = makeStyles({\n root: {\n flexWrap: 'wrap',\n boxSizing: 'border-box',\n cursor: 'text'\n },\n // size variants\n medium: {\n padding: `${tokens.spacingVerticalSNudge} 0 ${tokens.spacingVerticalSNudge} 0`,\n gap: tokens.spacingHorizontalXS\n },\n large: {\n padding: `${tokens.spacingVerticalS} 0 ${tokens.spacingVerticalS} 0`,\n gap: tokens.spacingHorizontalSNudge\n },\n 'extra-large': {\n padding: `${tokens.spacingVerticalS} 0 ${tokens.spacingVerticalS} 0`,\n gap: tokens.spacingHorizontalSNudge\n }\n});\n/**\n * Apply styling to the TagPickerGroup slots based on the state\n */ export const useTagPickerGroupStyles_unstable = (state)=>{\n useTagGroupStyles_unstable(state);\n const styles = useStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(tagPickerGroupClassNames.root, styles[tagSizeToTagPickerSize(state.size)], styles.root, state.root.className);\n return state;\n};\n"],"mappings":"AAAA,YAAY;;AACZ,SAAAA,QAAA,EAAqBC,YAAY,QAAQ,gBAAgB;AACzD,SAASC,0BAA0B,QAAQ,sBAAsB;AACjE,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,sBAAsB,QAAQ,2BAA2B;AAClE,OAAO,MAAMC,wBAAwB,GAAG;EACpCC,IAAI,EAAE;AACV,CAAC;AACD;AACA;AACA;AAAI,MAAMC,SAAS,gBAAGP,QAAA;EAAAM,IAAA;IAAAE,MAAA;IAAAC,OAAA;IAAAC,OAAA;EAAA;EAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;EAAAC,KAAA;IAAAR,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;EAAA;IAAAP,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;AAAA;EAAAE,CAAA;IAAAC,CAAA;EAAA;IAAAA,CAAA;EAAA;IAAAA,CAAA;EAAA;IAAAA,CAAA;EAAA;IAAAA,CAAA;EAAA;IAAAA,CAAA;EAAA;AAAA,CAmBrB,CAAC;AACF;AACA;AACA;AAAI,OAAO,MAAMC,gCAAgC,GAAIC,KAAK,IAAG;EACzDtB,0BAA0B,CAACsB,KAAK,CAAC;EACjC,MAAMC,MAAM,GAAGlB,SAAS,CAAC,CAAC;EAC1B;EACAiB,KAAK,CAAClB,IAAI,CAACoB,SAAS,GAAGzB,YAAY,CAACI,wBAAwB,CAACC,IAAI,EAAEmB,MAAM,CAACrB,sBAAsB,CAACoB,KAAK,CAACG,IAAI,CAAC,CAAC,EAAEF,MAAM,CAACnB,IAAI,EAAEkB,KAAK,CAAClB,IAAI,CAACoB,SAAS,CAAC;EACjJ,OAAOF,KAAK;AAChB,CAAC","ignoreList":[]}
@@ -31,7 +31,6 @@ export const tagPickerGroupClassNames = {
31
31
  /**
32
32
  * Apply styling to the TagPickerGroup slots based on the state
33
33
  */ export const useTagPickerGroupStyles_unstable = (state)=>{
34
- 'use no memo';
35
34
  useTagGroupStyles_unstable(state);
36
35
  const styles = useStyles();
37
36
  // eslint-disable-next-line react-hooks/immutability
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TagPickerGroup/useTagPickerGroupStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { TagPickerGroupSlots, TagPickerGroupState } from './TagPickerGroup.types';\nimport { useTagGroupStyles_unstable } from '@fluentui/react-tags';\nimport { tokens } from '@fluentui/react-theme';\nimport { tagSizeToTagPickerSize } from '../../utils/tagPicker2Tag';\n\nexport const tagPickerGroupClassNames: SlotClassNames<TagPickerGroupSlots> = {\n root: 'fui-TagPickerGroup',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n flexWrap: 'wrap',\n boxSizing: 'border-box',\n cursor: 'text',\n },\n // size variants\n medium: {\n padding: `${tokens.spacingVerticalSNudge} 0 ${tokens.spacingVerticalSNudge} 0`,\n gap: tokens.spacingHorizontalXS,\n },\n large: {\n padding: `${tokens.spacingVerticalS} 0 ${tokens.spacingVerticalS} 0`,\n gap: tokens.spacingHorizontalSNudge,\n },\n 'extra-large': {\n padding: `${tokens.spacingVerticalS} 0 ${tokens.spacingVerticalS} 0`,\n gap: tokens.spacingHorizontalSNudge,\n },\n});\n\n/**\n * Apply styling to the TagPickerGroup slots based on the state\n */\nexport const useTagPickerGroupStyles_unstable = (state: TagPickerGroupState): TagPickerGroupState => {\n 'use no memo';\n\n useTagGroupStyles_unstable(state);\n const styles = useStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(\n tagPickerGroupClassNames.root,\n styles[tagSizeToTagPickerSize(state.size)],\n styles.root,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","useTagGroupStyles_unstable","tokens","tagSizeToTagPickerSize","tagPickerGroupClassNames","root","useStyles","flexWrap","boxSizing","cursor","medium","padding","spacingVerticalSNudge","gap","spacingHorizontalXS","large","spacingVerticalS","spacingHorizontalSNudge","useTagPickerGroupStyles_unstable","state","styles","className","size"],"mappings":"AAAA;AAEA,SAASA,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAG1D,SAASC,0BAA0B,QAAQ,uBAAuB;AAClE,SAASC,MAAM,QAAQ,wBAAwB;AAC/C,SAASC,sBAAsB,QAAQ,4BAA4B;AAEnE,OAAO,MAAMC,2BAAgE;IAC3EC,MAAM;AACR,EAAE;AAEF;;CAEC,GACD,MAAMC,YAAYP,WAAW;IAC3BM,MAAM;QACJE,UAAU;QACVC,WAAW;QACXC,QAAQ;IACV;IACA,gBAAgB;IAChBC,QAAQ;QACNC,SAAS,GAAGT,OAAOU,qBAAqB,CAAC,GAAG,EAAEV,OAAOU,qBAAqB,CAAC,EAAE,CAAC;QAC9EC,KAAKX,OAAOY,mBAAmB;IACjC;IACAC,OAAO;QACLJ,SAAS,GAAGT,OAAOc,gBAAgB,CAAC,GAAG,EAAEd,OAAOc,gBAAgB,CAAC,EAAE,CAAC;QACpEH,KAAKX,OAAOe,uBAAuB;IACrC;IACA,eAAe;QACbN,SAAS,GAAGT,OAAOc,gBAAgB,CAAC,GAAG,EAAEd,OAAOc,gBAAgB,CAAC,EAAE,CAAC;QACpEH,KAAKX,OAAOe,uBAAuB;IACrC;AACF;AAEA;;CAEC,GACD,OAAO,MAAMC,mCAAmC,CAACC;IAC/C;IAEAlB,2BAA2BkB;IAC3B,MAAMC,SAASd;IACf,oDAAoD;IACpDa,MAAMd,IAAI,CAACgB,SAAS,GAAGrB,aACrBI,yBAAyBC,IAAI,EAC7Be,MAAM,CAACjB,uBAAuBgB,MAAMG,IAAI,EAAE,EAC1CF,OAAOf,IAAI,EACXc,MAAMd,IAAI,CAACgB,SAAS;IAGtB,OAAOF;AACT,EAAE"}
1
+ {"version":3,"sources":["../src/components/TagPickerGroup/useTagPickerGroupStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { TagPickerGroupSlots, TagPickerGroupState } from './TagPickerGroup.types';\nimport { useTagGroupStyles_unstable } from '@fluentui/react-tags';\nimport { tokens } from '@fluentui/react-theme';\nimport { tagSizeToTagPickerSize } from '../../utils/tagPicker2Tag';\n\nexport const tagPickerGroupClassNames: SlotClassNames<TagPickerGroupSlots> = {\n root: 'fui-TagPickerGroup',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n flexWrap: 'wrap',\n boxSizing: 'border-box',\n cursor: 'text',\n },\n // size variants\n medium: {\n padding: `${tokens.spacingVerticalSNudge} 0 ${tokens.spacingVerticalSNudge} 0`,\n gap: tokens.spacingHorizontalXS,\n },\n large: {\n padding: `${tokens.spacingVerticalS} 0 ${tokens.spacingVerticalS} 0`,\n gap: tokens.spacingHorizontalSNudge,\n },\n 'extra-large': {\n padding: `${tokens.spacingVerticalS} 0 ${tokens.spacingVerticalS} 0`,\n gap: tokens.spacingHorizontalSNudge,\n },\n});\n\n/**\n * Apply styling to the TagPickerGroup slots based on the state\n */\nexport const useTagPickerGroupStyles_unstable = (state: TagPickerGroupState): TagPickerGroupState => {\n useTagGroupStyles_unstable(state);\n const styles = useStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(\n tagPickerGroupClassNames.root,\n styles[tagSizeToTagPickerSize(state.size)],\n styles.root,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","useTagGroupStyles_unstable","tokens","tagSizeToTagPickerSize","tagPickerGroupClassNames","root","useStyles","flexWrap","boxSizing","cursor","medium","padding","spacingVerticalSNudge","gap","spacingHorizontalXS","large","spacingVerticalS","spacingHorizontalSNudge","useTagPickerGroupStyles_unstable","state","styles","className","size"],"mappings":"AAAA;AAEA,SAASA,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAG1D,SAASC,0BAA0B,QAAQ,uBAAuB;AAClE,SAASC,MAAM,QAAQ,wBAAwB;AAC/C,SAASC,sBAAsB,QAAQ,4BAA4B;AAEnE,OAAO,MAAMC,2BAAgE;IAC3EC,MAAM;AACR,EAAE;AAEF;;CAEC,GACD,MAAMC,YAAYP,WAAW;IAC3BM,MAAM;QACJE,UAAU;QACVC,WAAW;QACXC,QAAQ;IACV;IACA,gBAAgB;IAChBC,QAAQ;QACNC,SAAS,GAAGT,OAAOU,qBAAqB,CAAC,GAAG,EAAEV,OAAOU,qBAAqB,CAAC,EAAE,CAAC;QAC9EC,KAAKX,OAAOY,mBAAmB;IACjC;IACAC,OAAO;QACLJ,SAAS,GAAGT,OAAOc,gBAAgB,CAAC,GAAG,EAAEd,OAAOc,gBAAgB,CAAC,EAAE,CAAC;QACpEH,KAAKX,OAAOe,uBAAuB;IACrC;IACA,eAAe;QACbN,SAAS,GAAGT,OAAOc,gBAAgB,CAAC,GAAG,EAAEd,OAAOc,gBAAgB,CAAC,EAAE,CAAC;QACpEH,KAAKX,OAAOe,uBAAuB;IACrC;AACF;AAEA;;CAEC,GACD,OAAO,MAAMC,mCAAmC,CAACC;IAC/ClB,2BAA2BkB;IAC3B,MAAMC,SAASd;IACf,oDAAoD;IACpDa,MAAMd,IAAI,CAACgB,SAAS,GAAGrB,aACrBI,yBAAyBC,IAAI,EAC7Be,MAAM,CAACjB,uBAAuBgB,MAAMG,IAAI,EAAE,EAC1CF,OAAOf,IAAI,EACXc,MAAMd,IAAI,CAACgB,SAAS;IAGtB,OAAOF;AACT,EAAE"}
@@ -1,3 +1,3 @@
1
1
  /**
2
- * State used in rendering TagPickerInput
2
+ * TagPickerInput Base State - omits design-only state
3
3
  */ export { };
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TagPickerInput/TagPickerInput.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { ComboboxProps } from '@fluentui/react-combobox';\nimport type { TagPickerContextValue } from '../../contexts/TagPickerContext';\n\nexport type TagPickerInputSlots = {\n root: NonNullable<Slot<'input'>>;\n};\n\n/**\n * TagPickerInput Props\n */\nexport type TagPickerInputProps = Omit<\n ComponentProps<Partial<TagPickerInputSlots>>,\n 'children' | 'size' | 'defaultValue'\n> &\n Pick<ComboboxProps, 'clearable' | 'appearance'> & {\n disabled?: boolean;\n value?: string;\n };\n\n/**\n * State used in rendering TagPickerInput\n */\nexport type TagPickerInputState = ComponentState<TagPickerInputSlots> &\n Pick<TagPickerContextValue, 'size' | 'disabled'>;\n"],"names":[],"mappings":"AAoBA;;CAEC,GACD,WACmD"}
1
+ {"version":3,"sources":["../src/components/TagPickerInput/TagPickerInput.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, DistributiveOmit, Slot } from '@fluentui/react-utilities';\nimport type { ComboboxProps } from '@fluentui/react-combobox';\nimport type { TagPickerContextValue } from '../../contexts/TagPickerContext';\n\nexport type TagPickerInputSlots = {\n root: NonNullable<Slot<'input'>>;\n};\n\n/**\n * TagPickerInput Props\n */\nexport type TagPickerInputProps = Omit<\n ComponentProps<Partial<TagPickerInputSlots>>,\n 'children' | 'size' | 'defaultValue'\n> &\n Pick<ComboboxProps, 'clearable' | 'appearance'> & {\n disabled?: boolean;\n value?: string;\n };\n\n/**\n * State used in rendering TagPickerInput\n */\nexport type TagPickerInputState = ComponentState<TagPickerInputSlots> &\n Pick<TagPickerContextValue, 'size' | 'disabled'>;\n\n/**\n * TagPickerInput Base Props - omits design-only props\n */\nexport type TagPickerInputBaseProps = DistributiveOmit<TagPickerInputProps, 'appearance'>;\n\n/**\n * TagPickerInput Base State - omits design-only state\n */\nexport type TagPickerInputBaseState = DistributiveOmit<TagPickerInputState, 'size'>;\n"],"names":[],"mappings":"AA+BA;;CAEC,GACD,WAAoF"}
@@ -1,4 +1,4 @@
1
1
  export { TagPickerInput } from './TagPickerInput';
2
2
  export { renderTagPickerInput_unstable } from './renderTagPickerInput';
3
- export { useTagPickerInput_unstable } from './useTagPickerInput';
3
+ export { useTagPickerInput_unstable, useTagPickerInputBase_unstable } from './useTagPickerInput';
4
4
  export { tagPickerInputClassNames, useTagPickerInputStyles_unstable } from './useTagPickerInputStyles.styles';
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TagPickerInput/index.ts"],"sourcesContent":["export { TagPickerInput } from './TagPickerInput';\nexport type { TagPickerInputProps, TagPickerInputSlots, TagPickerInputState } from './TagPickerInput.types';\nexport { renderTagPickerInput_unstable } from './renderTagPickerInput';\nexport { useTagPickerInput_unstable } from './useTagPickerInput';\nexport { tagPickerInputClassNames, useTagPickerInputStyles_unstable } from './useTagPickerInputStyles.styles';\n"],"names":["TagPickerInput","renderTagPickerInput_unstable","useTagPickerInput_unstable","tagPickerInputClassNames","useTagPickerInputStyles_unstable"],"mappings":"AAAA,SAASA,cAAc,QAAQ,mBAAmB;AAElD,SAASC,6BAA6B,QAAQ,yBAAyB;AACvE,SAASC,0BAA0B,QAAQ,sBAAsB;AACjE,SAASC,wBAAwB,EAAEC,gCAAgC,QAAQ,mCAAmC"}
1
+ {"version":3,"sources":["../src/components/TagPickerInput/index.ts"],"sourcesContent":["export { TagPickerInput } from './TagPickerInput';\nexport type {\n TagPickerInputBaseProps,\n TagPickerInputBaseState,\n TagPickerInputProps,\n TagPickerInputSlots,\n TagPickerInputState,\n} from './TagPickerInput.types';\nexport { renderTagPickerInput_unstable } from './renderTagPickerInput';\nexport { useTagPickerInput_unstable, useTagPickerInputBase_unstable } from './useTagPickerInput';\nexport { tagPickerInputClassNames, useTagPickerInputStyles_unstable } from './useTagPickerInputStyles.styles';\n"],"names":["TagPickerInput","renderTagPickerInput_unstable","useTagPickerInput_unstable","useTagPickerInputBase_unstable","tagPickerInputClassNames","useTagPickerInputStyles_unstable"],"mappings":"AAAA,SAASA,cAAc,QAAQ,mBAAmB;AAQlD,SAASC,6BAA6B,QAAQ,yBAAyB;AACvE,SAASC,0BAA0B,EAAEC,8BAA8B,QAAQ,sBAAsB;AACjG,SAASC,wBAAwB,EAAEC,gCAAgC,QAAQ,mCAAmC"}
@@ -10,23 +10,20 @@ import { useFieldControlProps_unstable } from '@fluentui/react-field';
10
10
  import { tagPickerInputCSSRules } from '../../utils/tokens';
11
11
  import { useFocusFinders } from '@fluentui/react-tabster';
12
12
  /**
13
- * Create the state required to render TagPickerInput.
14
- *
15
- * The returned state can be modified with hooks such as useTagPickerInputStyles_unstable,
16
- * before being passed to renderTagPickerInput_unstable.
13
+ * Create the base state required to render TagPickerInput, without design-only props.
14
+ * The Base hook omits Tabster-driven focus management; consumers can re-add it via the
15
+ * styled wrapper {@link useTagPickerInput_unstable} or by composing their own keydown handler.
17
16
  *
18
- * @param props - props from this instance of TagPickerInput
19
- * @param ref - reference to root HTMLDivElement of TagPickerInput
20
- */ export const useTagPickerInput_unstable = (propsArg, ref)=>{
21
- const props = useFieldControlProps_unstable(propsArg, {
17
+ * @param props - props from this instance of TagPickerInput (without appearance)
18
+ * @param ref - reference to root HTMLInputElement of TagPickerInput
19
+ */ export const useTagPickerInputBase_unstable = (props, ref)=>{
20
+ const fieldProps = useFieldControlProps_unstable(props, {
22
21
  supportsLabelFor: true,
23
22
  supportsRequired: true,
24
23
  supportsSize: true
25
24
  });
26
25
  const { controller: activeDescendantController } = useActiveDescendantContext();
27
- const size = useTagPickerContext_unstable((ctx)=>ctx.size);
28
26
  const contextDisabled = useTagPickerContext_unstable((ctx)=>ctx.disabled);
29
- const tagPickerGroupRef = useTagPickerContext_unstable((ctx)=>ctx.tagPickerGroupRef);
30
27
  const triggerRef = useTagPickerContext_unstable((ctx)=>ctx.triggerRef);
31
28
  const selectedOptions = useTagPickerContext_unstable((ctx)=>ctx.selectedOptions);
32
29
  const setValue = useTagPickerContext_unstable((ctx)=>ctx.setValue);
@@ -59,22 +56,18 @@ import { useFocusFinders } from '@fluentui/react-tabster';
59
56
  }, [
60
57
  triggerRef
61
58
  ]);
62
- const { value = contextValue, disabled = contextDisabled } = props;
63
- const { findLastFocusable } = useFocusFinders();
59
+ const { value = contextValue, disabled = contextDisabled } = fieldProps;
64
60
  const isTypingRef = React.useRef(false);
65
61
  const root = useInputTriggerSlot({
66
62
  type: 'text',
67
63
  value: value !== null && value !== void 0 ? value : '',
68
64
  'aria-controls': open ? popoverId : undefined,
69
65
  disabled,
70
- ...getIntrinsicElementProps('input', props),
66
+ ...getIntrinsicElementProps('input', fieldProps),
71
67
  onKeyDown: useEventCallback((event)=>{
72
- var _props_onKeyDown;
73
- (_props_onKeyDown = props.onKeyDown) === null || _props_onKeyDown === void 0 ? void 0 : _props_onKeyDown.call(props, event);
74
- if ((event.key === ArrowLeft || event.key === Backspace) && event.currentTarget.selectionStart === 0 && event.currentTarget.selectionEnd === 0 && tagPickerGroupRef.current) {
75
- var _findLastFocusable;
76
- (_findLastFocusable = findLastFocusable(tagPickerGroupRef.current)) === null || _findLastFocusable === void 0 ? void 0 : _findLastFocusable.focus();
77
- } else if (event.key === Space) {
68
+ var _fieldProps_onKeyDown;
69
+ (_fieldProps_onKeyDown = fieldProps.onKeyDown) === null || _fieldProps_onKeyDown === void 0 ? void 0 : _fieldProps_onKeyDown.call(fieldProps, event);
70
+ if (event.key === Space) {
78
71
  if (open && !isTypingRef.current) {
79
72
  setOpen(event, false);
80
73
  }
@@ -103,18 +96,45 @@ import { useFocusFinders } from '@fluentui/react-tabster';
103
96
  setOpen,
104
97
  setValue,
105
98
  multiselect: true,
106
- value: props.value
99
+ value: fieldProps.value
107
100
  }
108
101
  });
109
- const state = {
102
+ return {
110
103
  components: {
111
104
  root: 'input'
112
105
  },
113
106
  root,
114
- disabled,
107
+ disabled
108
+ };
109
+ };
110
+ /**
111
+ * Create the state required to render TagPickerInput.
112
+ *
113
+ * The returned state can be modified with hooks such as useTagPickerInputStyles_unstable,
114
+ * before being passed to renderTagPickerInput_unstable.
115
+ *
116
+ * @param props - props from this instance of TagPickerInput
117
+ * @param ref - reference to root HTMLInputElement of TagPickerInput
118
+ */ export const useTagPickerInput_unstable = (props, ref)=>{
119
+ const tagPickerGroupRef = useTagPickerContext_unstable((ctx)=>ctx.tagPickerGroupRef);
120
+ const { findLastFocusable } = useFocusFinders();
121
+ const onKeyDown = useEventCallback((event)=>{
122
+ var _props_onKeyDown;
123
+ (_props_onKeyDown = props.onKeyDown) === null || _props_onKeyDown === void 0 ? void 0 : _props_onKeyDown.call(props, event);
124
+ if ((event.key === ArrowLeft || event.key === Backspace) && event.currentTarget.selectionStart === 0 && event.currentTarget.selectionEnd === 0 && tagPickerGroupRef.current) {
125
+ var _findLastFocusable;
126
+ (_findLastFocusable = findLastFocusable(tagPickerGroupRef.current)) === null || _findLastFocusable === void 0 ? void 0 : _findLastFocusable.focus();
127
+ }
128
+ });
129
+ const baseState = useTagPickerInputBase_unstable({
130
+ ...props,
131
+ onKeyDown
132
+ }, ref);
133
+ const size = useTagPickerContext_unstable((ctx)=>ctx.size);
134
+ return {
135
+ ...baseState,
115
136
  size
116
137
  };
117
- return state;
118
138
  };
119
139
  /**
120
140
  * while typing the user might need a bit more of space to see the text,