@fluentui-copilot/react-response-count 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +16 -1
- package/CHANGELOG.md +11 -2
- package/lib/ResponseCount.js.map +1 -1
- package/lib/components/ResponseCount/ResponseCount.js.map +1 -1
- package/lib/components/ResponseCount/ResponseCount.types.js +3 -1
- package/lib/components/ResponseCount/ResponseCount.types.js.map +1 -1
- package/lib/components/ResponseCount/index.js.map +1 -1
- package/lib/components/ResponseCount/renderResponseCount.js.map +1 -1
- package/lib/components/ResponseCount/useResponseCount.js.map +1 -1
- package/lib/components/ResponseCount/useResponseCountStyles.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib-commonjs/ResponseCount.js.map +1 -1
- package/lib-commonjs/components/ResponseCount/ResponseCount.js.map +1 -1
- package/lib-commonjs/components/ResponseCount/ResponseCount.types.js +3 -1
- package/lib-commonjs/components/ResponseCount/ResponseCount.types.js.map +1 -1
- package/lib-commonjs/components/ResponseCount/index.js.map +1 -1
- package/lib-commonjs/components/ResponseCount/renderResponseCount.js.map +1 -1
- package/lib-commonjs/components/ResponseCount/useResponseCount.js.map +1 -1
- package/lib-commonjs/components/ResponseCount/useResponseCountStyles.js.map +1 -1
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,22 @@
|
|
|
2
2
|
"name": "@fluentui-copilot/react-response-count",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Tue, 30 Apr 2024 20:54:47 GMT",
|
|
6
|
+
"tag": "@fluentui-copilot/react-response-count_v0.2.1",
|
|
7
|
+
"version": "0.2.1",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "sarah.higley@microsoft.com",
|
|
12
|
+
"package": "@fluentui-copilot/react-response-count",
|
|
13
|
+
"commit": "66eba4eb0956384ecc14b2a40c5fa722680f79d8",
|
|
14
|
+
"comment": "chore: bump @fluentui/react-components to latest, 9.49.0 "
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"date": "Wed, 13 Mar 2024 18:01:51 GMT",
|
|
6
21
|
"tag": "@fluentui-copilot/react-response-count_v0.2.0",
|
|
7
22
|
"version": "0.2.0",
|
|
8
23
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
# Change Log - @fluentui-copilot/react-response-count
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Tue, 30 Apr 2024 20:54:47 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [0.2.1](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-response-count_v0.2.1)
|
|
8
|
+
|
|
9
|
+
Tue, 30 Apr 2024 20:54:47 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-response-count_v0.2.0..@fluentui-copilot/react-response-count_v0.2.1)
|
|
11
|
+
|
|
12
|
+
### Patches
|
|
13
|
+
|
|
14
|
+
- chore: bump @fluentui/react-components to latest, 9.49.0 ([PR #1580](https://github.com/microsoft/fluentai/pull/1580) by sarah.higley@microsoft.com)
|
|
15
|
+
|
|
7
16
|
## [0.2.0](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-response-count_v0.2.0)
|
|
8
17
|
|
|
9
|
-
Wed, 13 Mar 2024 18:
|
|
18
|
+
Wed, 13 Mar 2024 18:01:51 GMT
|
|
10
19
|
[Compare changes](https://github.com/microsoft/fluentai/compare/@fluentai/react-response-count_v0.1.0..@fluentui-copilot/react-response-count_v0.2.0)
|
|
11
20
|
|
|
12
21
|
### Minor changes
|
package/lib/ResponseCount.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ResponseCount.ts"],"sourcesContent":["export * from './components/ResponseCount/index';\n"],"names":[],"mappings":"AAAA,cAAc,mCAAmC"}
|
|
1
|
+
{"version":3,"sources":["ResponseCount.ts"],"sourcesContent":["export * from './components/ResponseCount/index';\n"],"names":[],"rangeMappings":"","mappings":"AAAA,cAAc,mCAAmC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ResponseCount.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useResponseCount_unstable } from './useResponseCount';\nimport { renderResponseCount_unstable } from './renderResponseCount';\nimport { useResponseCountStyles_unstable } from './useResponseCountStyles';\nimport type { ResponseCountProps } from './ResponseCount.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\n\n// ResponseCount component - TODO: add more docs\nexport const ResponseCount: ForwardRefComponent<ResponseCountProps> = React.forwardRef((props, ref) => {\n const state = useResponseCount_unstable(props, ref);\n\n useResponseCountStyles_unstable(state);\n return renderResponseCount_unstable(state);\n});\n\nResponseCount.displayName = 'ResponseCount';\n"],"names":["React","useResponseCount_unstable","renderResponseCount_unstable","useResponseCountStyles_unstable","ResponseCount","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,yBAAyB,QAAQ,qBAAqB;AAC/D,SAASC,4BAA4B,QAAQ,wBAAwB;AACrE,SAASC,+BAA+B,QAAQ,2BAA2B;AAI3E,gDAAgD;AAChD,OAAO,MAAMC,8BAAyDJ,MAAMK,UAAU,CAAC,CAACC,OAAOC;IAC7F,MAAMC,QAAQP,0BAA0BK,OAAOC;IAE/CJ,gCAAgCK;IAChC,OAAON,6BAA6BM;AACtC,GAAG;AAEHJ,cAAcK,WAAW,GAAG"}
|
|
1
|
+
{"version":3,"sources":["ResponseCount.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useResponseCount_unstable } from './useResponseCount';\nimport { renderResponseCount_unstable } from './renderResponseCount';\nimport { useResponseCountStyles_unstable } from './useResponseCountStyles';\nimport type { ResponseCountProps } from './ResponseCount.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\n\n// ResponseCount component - TODO: add more docs\nexport const ResponseCount: ForwardRefComponent<ResponseCountProps> = React.forwardRef((props, ref) => {\n const state = useResponseCount_unstable(props, ref);\n\n useResponseCountStyles_unstable(state);\n return renderResponseCount_unstable(state);\n});\n\nResponseCount.displayName = 'ResponseCount';\n"],"names":["React","useResponseCount_unstable","renderResponseCount_unstable","useResponseCountStyles_unstable","ResponseCount","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,yBAAyB,QAAQ,qBAAqB;AAC/D,SAASC,4BAA4B,QAAQ,wBAAwB;AACrE,SAASC,+BAA+B,QAAQ,2BAA2B;AAI3E,gDAAgD;AAChD,OAAO,MAAMC,8BAAyDJ,MAAMK,UAAU,CAAC,CAACC,OAAOC;IAC7F,MAAMC,QAAQP,0BAA0BK,OAAOC;IAE/CJ,gCAAgCK;IAChC,OAAON,6BAA6BM;AACtC,GAAG;AAEHJ,cAAcK,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ResponseCount.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-components';\n\nexport type ResponseCountSlots = {\n root: Slot<'span'>;\n indicator?: Slot<'span'>;\n};\n\n/**\n * ResponseCount Props\n */\nexport type ResponseCountProps = ComponentProps<ResponseCountSlots> & { status: 'success' | 'warning' | 'danger' };\n\n/**\n * State used in rendering ResponseCount\n */\nexport type ResponseCountState = ComponentState<ResponseCountSlots> & Required<Pick<ResponseCountProps, 'status'>> & {};\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["ResponseCount.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-components';\n\nexport type ResponseCountSlots = {\n root: Slot<'span'>;\n indicator?: Slot<'span'>;\n};\n\n/**\n * ResponseCount Props\n */\nexport type ResponseCountProps = ComponentProps<ResponseCountSlots> & { status: 'success' | 'warning' | 'danger' };\n\n/**\n * State used in rendering ResponseCount\n */\nexport type ResponseCountState = ComponentState<ResponseCountSlots> & Required<Pick<ResponseCountProps, 'status'>> & {};\n"],"names":[],"rangeMappings":";;","mappings":"AAYA;;CAEC,GACD,WAAwH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './ResponseCount';\nexport * from './ResponseCount.types';\nexport * from './renderResponseCount';\nexport * from './useResponseCount';\nexport * from './useResponseCountStyles';\n"],"names":[],"mappings":"AAAA,cAAc,kBAAkB;AAChC,cAAc,wBAAwB;AACtC,cAAc,wBAAwB;AACtC,cAAc,qBAAqB;AACnC,cAAc,2BAA2B"}
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './ResponseCount';\nexport * from './ResponseCount.types';\nexport * from './renderResponseCount';\nexport * from './useResponseCount';\nexport * from './useResponseCountStyles';\n"],"names":[],"rangeMappings":";;;;","mappings":"AAAA,cAAc,kBAAkB;AAChC,cAAc,wBAAwB;AACtC,cAAc,wBAAwB;AACtC,cAAc,qBAAqB;AACnC,cAAc,2BAA2B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["renderResponseCount.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport type { ResponseCountState, ResponseCountSlots } from './ResponseCount.types';\n\n/**\n * Render the final JSX of ResponseCount\n */\nexport const renderResponseCount_unstable = (state: ResponseCountState) => {\n assertSlots<ResponseCountSlots>(state);\n\n return (\n <state.root>\n {state.indicator && <state.indicator />}\n {state.root.children}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderResponseCount_unstable","state","root","indicator","children"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,6BAA6B;AAGzD;;CAEC,GACD,OAAO,MAAMC,+BAA+B,CAACC;IAC3CF,YAAgCE;IAEhC,qBACE,MAACA,MAAMC,IAAI;;YACRD,MAAME,SAAS,kBAAI,KAACF,MAAME,SAAS;YACnCF,MAAMC,IAAI,CAACE,QAAQ;;;AAG1B,EAAE"}
|
|
1
|
+
{"version":3,"sources":["renderResponseCount.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport type { ResponseCountState, ResponseCountSlots } from './ResponseCount.types';\n\n/**\n * Render the final JSX of ResponseCount\n */\nexport const renderResponseCount_unstable = (state: ResponseCountState) => {\n assertSlots<ResponseCountSlots>(state);\n\n return (\n <state.root>\n {state.indicator && <state.indicator />}\n {state.root.children}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderResponseCount_unstable","state","root","indicator","children"],"rangeMappings":";;;;;;;;;;;;","mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,6BAA6B;AAGzD;;CAEC,GACD,OAAO,MAAMC,+BAA+B,CAACC;IAC3CF,YAAgCE;IAEhC,qBACE,MAACA,MAAMC,IAAI;;YACRD,MAAME,SAAS,kBAAI,KAACF,MAAME,SAAS;YACnCF,MAAMC,IAAI,CAACE,QAAQ;;;AAG1B,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useResponseCount.ts"],"sourcesContent":["import type * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-components';\nimport type { ResponseCountProps, ResponseCountState } from './ResponseCount.types';\n\n// If you add JSX to this file, be sure to change the file type to .tsx\n\n/**\n * Create the state required to render ResponseCount.\n *\n * The returned state can be modified with hooks such as useResponseCountStyles_unstable,\n * before being passed to renderResponseCount_unstable.\n *\n * @param props - props from this instance of ResponseCount\n * @param ref - reference to root HTMLElement of ResponseCount\n */\nexport const useResponseCount_unstable = (\n props: ResponseCountProps,\n ref: React.Ref<HTMLElement>,\n): ResponseCountState => {\n const { status } = props;\n return {\n status,\n\n components: {\n root: 'span',\n indicator: 'span',\n },\n\n root: slot.always(\n getIntrinsicElementProps('span', {\n ref,\n ...props,\n }),\n { elementType: 'span' },\n ),\n indicator: slot.optional(props.indicator, { elementType: 'span', renderByDefault: true }),\n };\n};\n"],"names":["getIntrinsicElementProps","slot","useResponseCount_unstable","props","ref","status","components","root","indicator","always","elementType","optional","renderByDefault"],"mappings":"AACA,SAASA,wBAAwB,EAAEC,IAAI,QAAQ,6BAA6B;AAG5E,uEAAuE;AAEvE;;;;;;;;CAQC,GACD,OAAO,MAAMC,4BAA4B,CACvCC,OACAC;IAEA,MAAM,EAAEC,MAAM,EAAE,GAAGF;IACnB,OAAO;QACLE;QAEAC,YAAY;YACVC,MAAM;YACNC,WAAW;QACb;QAEAD,MAAMN,KAAKQ,MAAM,CACfT,yBAAyB,QAAQ;YAC/BI;YACA,GAAGD,KAAK;QACV,IACA;YAAEO,aAAa;QAAO;QAExBF,WAAWP,KAAKU,QAAQ,CAACR,MAAMK,SAAS,EAAE;YAAEE,aAAa;YAAQE,iBAAiB;QAAK;IACzF;AACF,EAAE"}
|
|
1
|
+
{"version":3,"sources":["useResponseCount.ts"],"sourcesContent":["import type * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-components';\nimport type { ResponseCountProps, ResponseCountState } from './ResponseCount.types';\n\n// If you add JSX to this file, be sure to change the file type to .tsx\n\n/**\n * Create the state required to render ResponseCount.\n *\n * The returned state can be modified with hooks such as useResponseCountStyles_unstable,\n * before being passed to renderResponseCount_unstable.\n *\n * @param props - props from this instance of ResponseCount\n * @param ref - reference to root HTMLElement of ResponseCount\n */\nexport const useResponseCount_unstable = (\n props: ResponseCountProps,\n ref: React.Ref<HTMLElement>,\n): ResponseCountState => {\n const { status } = props;\n return {\n status,\n\n components: {\n root: 'span',\n indicator: 'span',\n },\n\n root: slot.always(\n getIntrinsicElementProps('span', {\n ref,\n ...props,\n }),\n { elementType: 'span' },\n ),\n indicator: slot.optional(props.indicator, { elementType: 'span', renderByDefault: true }),\n };\n};\n"],"names":["getIntrinsicElementProps","slot","useResponseCount_unstable","props","ref","status","components","root","indicator","always","elementType","optional","renderByDefault"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AACA,SAASA,wBAAwB,EAAEC,IAAI,QAAQ,6BAA6B;AAG5E,uEAAuE;AAEvE;;;;;;;;CAQC,GACD,OAAO,MAAMC,4BAA4B,CACvCC,OACAC;IAEA,MAAM,EAAEC,MAAM,EAAE,GAAGF;IACnB,OAAO;QACLE;QAEAC,YAAY;YACVC,MAAM;YACNC,WAAW;QACb;QAEAD,MAAMN,KAAKQ,MAAM,CACfT,yBAAyB,QAAQ;YAC/BI;YACA,GAAGD,KAAK;QACV,IACA;YAAEO,aAAa;QAAO;QAExBF,WAAWP,KAAKU,QAAQ,CAACR,MAAMK,SAAS,EAAE;YAAEE,aAAa;YAAQE,iBAAiB;QAAK;IACzF;AACF,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useResponseCountStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands, tokens, typographyStyles } from '@fluentui/react-components';\nimport type { ResponseCountSlots, ResponseCountState } from './ResponseCount.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const responseCountClassNames: SlotClassNames<ResponseCountSlots> = {\n root: 'fai-ResponseCount',\n indicator: 'fai-ResponseCount__indicator',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n display: 'inline-flex',\n flexDirection: 'row',\n alignItems: 'center',\n ...shorthands.gap(tokens.spacingHorizontalXS),\n ...typographyStyles.caption2,\n color: tokens.colorNeutralForeground4,\n },\n indicator: {\n display: 'inline-block',\n width: '8px',\n height: '8px',\n ...shorthands.borderRadius('50%'),\n },\n success: {\n backgroundColor: tokens.colorStatusSuccessForeground3,\n },\n warning: {\n backgroundColor: tokens.colorStatusWarningForeground2,\n },\n danger: {\n backgroundColor: tokens.colorStatusDangerForeground3,\n },\n});\n\n/**\n * Apply styling to the ResponseCount slots based on the state\n */\nexport const useResponseCountStyles_unstable = (state: ResponseCountState): ResponseCountState => {\n const styles = useStyles();\n state.root.className = mergeClasses(responseCountClassNames.root, styles.root, state.root.className);\n\n if (state.indicator) {\n state.indicator.className = mergeClasses(\n responseCountClassNames.indicator,\n styles.indicator,\n styles[state.status],\n state.indicator.className,\n );\n }\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","shorthands","tokens","typographyStyles","responseCountClassNames","root","indicator","useStyles","display","flexDirection","alignItems","gap","spacingHorizontalXS","caption2","color","colorNeutralForeground4","width","height","borderRadius","success","backgroundColor","colorStatusSuccessForeground3","warning","colorStatusWarningForeground2","danger","colorStatusDangerForeground3","useResponseCountStyles_unstable","state","styles","className","status"],"mappings":"AAAA,SAASA,UAAU,EAAEC,YAAY,EAAEC,UAAU,EAAEC,MAAM,EAAEC,gBAAgB,QAAQ,6BAA6B;AAI5G,OAAO,MAAMC,0BAA8D;IACzEC,MAAM;IACNC,WAAW;AACb,EAAE;AAEF;;CAEC,GACD,MAAMC,YAAYR,WAAW;IAC3BM,MAAM;QACJG,SAAS;QACTC,eAAe;QACfC,YAAY;QACZ,GAAGT,WAAWU,GAAG,CAACT,OAAOU,mBAAmB,CAAC;QAC7C,GAAGT,iBAAiBU,QAAQ;QAC5BC,OAAOZ,OAAOa,uBAAuB;IACvC;IACAT,WAAW;QACTE,SAAS;QACTQ,OAAO;QACPC,QAAQ;QACR,GAAGhB,WAAWiB,YAAY,CAAC,MAAM;IACnC;IACAC,SAAS;QACPC,iBAAiBlB,OAAOmB,6BAA6B;IACvD;IACAC,SAAS;QACPF,iBAAiBlB,OAAOqB,6BAA6B;IACvD;IACAC,QAAQ;QACNJ,iBAAiBlB,OAAOuB,4BAA4B;IACtD;AACF;AAEA;;CAEC,GACD,OAAO,MAAMC,kCAAkC,CAACC;IAC9C,MAAMC,SAASrB;IACfoB,MAAMtB,IAAI,CAACwB,SAAS,GAAG7B,aAAaI,wBAAwBC,IAAI,EAAEuB,OAAOvB,IAAI,EAAEsB,MAAMtB,IAAI,CAACwB,SAAS;IAEnG,IAAIF,MAAMrB,SAAS,EAAE;QACnBqB,MAAMrB,SAAS,CAACuB,SAAS,GAAG7B,aAC1BI,wBAAwBE,SAAS,EACjCsB,OAAOtB,SAAS,EAChBsB,MAAM,CAACD,MAAMG,MAAM,CAAC,EACpBH,MAAMrB,SAAS,CAACuB,SAAS;IAE7B;IAEA,OAAOF;AACT,EAAE"}
|
|
1
|
+
{"version":3,"sources":["useResponseCountStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands, tokens, typographyStyles } from '@fluentui/react-components';\nimport type { ResponseCountSlots, ResponseCountState } from './ResponseCount.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const responseCountClassNames: SlotClassNames<ResponseCountSlots> = {\n root: 'fai-ResponseCount',\n indicator: 'fai-ResponseCount__indicator',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n display: 'inline-flex',\n flexDirection: 'row',\n alignItems: 'center',\n ...shorthands.gap(tokens.spacingHorizontalXS),\n ...typographyStyles.caption2,\n color: tokens.colorNeutralForeground4,\n },\n indicator: {\n display: 'inline-block',\n width: '8px',\n height: '8px',\n ...shorthands.borderRadius('50%'),\n },\n success: {\n backgroundColor: tokens.colorStatusSuccessForeground3,\n },\n warning: {\n backgroundColor: tokens.colorStatusWarningForeground2,\n },\n danger: {\n backgroundColor: tokens.colorStatusDangerForeground3,\n },\n});\n\n/**\n * Apply styling to the ResponseCount slots based on the state\n */\nexport const useResponseCountStyles_unstable = (state: ResponseCountState): ResponseCountState => {\n const styles = useStyles();\n state.root.className = mergeClasses(responseCountClassNames.root, styles.root, state.root.className);\n\n if (state.indicator) {\n state.indicator.className = mergeClasses(\n responseCountClassNames.indicator,\n styles.indicator,\n styles[state.status],\n state.indicator.className,\n );\n }\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","shorthands","tokens","typographyStyles","responseCountClassNames","root","indicator","useStyles","display","flexDirection","alignItems","gap","spacingHorizontalXS","caption2","color","colorNeutralForeground4","width","height","borderRadius","success","backgroundColor","colorStatusSuccessForeground3","warning","colorStatusWarningForeground2","danger","colorStatusDangerForeground3","useResponseCountStyles_unstable","state","styles","className","status"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,UAAU,EAAEC,YAAY,EAAEC,UAAU,EAAEC,MAAM,EAAEC,gBAAgB,QAAQ,6BAA6B;AAI5G,OAAO,MAAMC,0BAA8D;IACzEC,MAAM;IACNC,WAAW;AACb,EAAE;AAEF;;CAEC,GACD,MAAMC,YAAYR,WAAW;IAC3BM,MAAM;QACJG,SAAS;QACTC,eAAe;QACfC,YAAY;QACZ,GAAGT,WAAWU,GAAG,CAACT,OAAOU,mBAAmB,CAAC;QAC7C,GAAGT,iBAAiBU,QAAQ;QAC5BC,OAAOZ,OAAOa,uBAAuB;IACvC;IACAT,WAAW;QACTE,SAAS;QACTQ,OAAO;QACPC,QAAQ;QACR,GAAGhB,WAAWiB,YAAY,CAAC,MAAM;IACnC;IACAC,SAAS;QACPC,iBAAiBlB,OAAOmB,6BAA6B;IACvD;IACAC,SAAS;QACPF,iBAAiBlB,OAAOqB,6BAA6B;IACvD;IACAC,QAAQ;QACNJ,iBAAiBlB,OAAOuB,4BAA4B;IACtD;AACF;AAEA;;CAEC,GACD,OAAO,MAAMC,kCAAkC,CAACC;IAC9C,MAAMC,SAASrB;IACfoB,MAAMtB,IAAI,CAACwB,SAAS,GAAG7B,aAAaI,wBAAwBC,IAAI,EAAEuB,OAAOvB,IAAI,EAAEsB,MAAMtB,IAAI,CAACwB,SAAS;IAEnG,IAAIF,MAAMrB,SAAS,EAAE;QACnBqB,MAAMrB,SAAS,CAACuB,SAAS,GAAG7B,aAC1BI,wBAAwBE,SAAS,EACjCsB,OAAOtB,SAAS,EAChBsB,MAAM,CAACD,MAAMG,MAAM,CAAC,EACpBH,MAAMrB,SAAS,CAACuB,SAAS;IAE7B;IAEA,OAAOF;AACT,EAAE"}
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"sourcesContent":["export type { ResponseCountProps, ResponseCountSlots, ResponseCountState } from './ResponseCount';\nexport { ResponseCount, renderResponseCount_unstable, responseCountClassNames, useResponseCountStyles_unstable, useResponseCount_unstable } from './ResponseCount';\n"],"names":["ResponseCount","renderResponseCount_unstable","responseCountClassNames","useResponseCountStyles_unstable","useResponseCount_unstable"],"mappings":"AACA,SAASA,aAAa,EAAEC,4BAA4B,EAAEC,uBAAuB,EAAEC,+BAA+B,EAAEC,yBAAyB,QAAQ,kBAAkB"}
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export type { ResponseCountProps, ResponseCountSlots, ResponseCountState } from './ResponseCount';\nexport { ResponseCount, renderResponseCount_unstable, responseCountClassNames, useResponseCountStyles_unstable, useResponseCount_unstable } from './ResponseCount';\n"],"names":["ResponseCount","renderResponseCount_unstable","responseCountClassNames","useResponseCountStyles_unstable","useResponseCount_unstable"],"rangeMappings":"","mappings":"AACA,SAASA,aAAa,EAAEC,4BAA4B,EAAEC,uBAAuB,EAAEC,+BAA+B,EAAEC,yBAAyB,QAAQ,kBAAkB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ResponseCount.
|
|
1
|
+
{"version":3,"sources":["ResponseCount.ts"],"sourcesContent":["export * from './components/ResponseCount/index';\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;uBAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ResponseCount.
|
|
1
|
+
{"version":3,"sources":["ResponseCount.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useResponseCount_unstable } from './useResponseCount';\nimport { renderResponseCount_unstable } from './renderResponseCount';\nimport { useResponseCountStyles_unstable } from './useResponseCountStyles';\nimport type { ResponseCountProps } from './ResponseCount.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\n\n// ResponseCount component - TODO: add more docs\nexport const ResponseCount: ForwardRefComponent<ResponseCountProps> = React.forwardRef((props, ref) => {\n const state = useResponseCount_unstable(props, ref);\n\n useResponseCountStyles_unstable(state);\n return renderResponseCount_unstable(state);\n});\n\nResponseCount.displayName = 'ResponseCount';\n"],"names":["ResponseCount","React","forwardRef","props","state","useResponseCount_unstable","useResponseCountStyles_unstable","renderResponseCount_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAQaA;;;eAAAA;;;;iEARU;kCACmB;qCACG;wCACG;AAKzC,MAAMA,gBAAAA,WAAAA,GAAAA,OAAyDC,UAAMC,CAAU,CAACC,OAACA;UACtFC,QAAMA,IAAAA,2CAAQC,EAAAA,OAA0BF;+DAExCG,EAAAA;WACAC,IAAAA,iDAAOA,EAAAA;AACT;AAEAP,cAAcQ,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ResponseCount.types.
|
|
1
|
+
{"version":3,"sources":["ResponseCount.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-components';\n\nexport type ResponseCountSlots = {\n root: Slot<'span'>;\n indicator?: Slot<'span'>;\n};\n\n/**\n * ResponseCount Props\n */\nexport type ResponseCountProps = ComponentProps<ResponseCountSlots> & { status: 'success' | 'warning' | 'danger' };\n\n/**\n * State used in rendering ResponseCount\n */\nexport type ResponseCountState = ComponentState<ResponseCountSlots> & Required<Pick<ResponseCountProps, 'status'>> & {};\n"],"names":[],"rangeMappings":";;","mappings":"AAYA;;CAEC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './ResponseCount';\nexport * from './ResponseCount.types';\nexport * from './renderResponseCount';\nexport * from './useResponseCount';\nexport * from './useResponseCountStyles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["renderResponseCount.
|
|
1
|
+
{"version":3,"sources":["renderResponseCount.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport type { ResponseCountState, ResponseCountSlots } from './ResponseCount.types';\n\n/**\n * Render the final JSX of ResponseCount\n */\nexport const renderResponseCount_unstable = (state: ResponseCountState) => {\n assertSlots<ResponseCountSlots>(state);\n\n return (\n <state.root>\n {state.indicator && <state.indicator />}\n {state.root.children}\n </state.root>\n );\n};\n"],"names":["assertSlots","state","indicator","_jsx","root","children"],"rangeMappings":";;;;;;;;;;;;;;;;;;","mappings":";;;;+BAUEA;;;eAAAA;;;4BATF;iCAE4B;AAO1BA,MAAAA,+BAAgCC,CAAAA;oCAEhC,EAAAA;;kBAEKA;YAAAA,MAAMC,SAAS,IAAA,WAAI,GAAAC,IAAAA,eAACF,EAAAA,MAAMC,SAAS,EAAA,CAAA;YAAAD,MAAAG,IAAA,CAAAC,QAAA;SAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useResponseCount.
|
|
1
|
+
{"version":3,"sources":["useResponseCount.ts"],"sourcesContent":["import type * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-components';\nimport type { ResponseCountProps, ResponseCountState } from './ResponseCount.types';\n\n// If you add JSX to this file, be sure to change the file type to .tsx\n\n/**\n * Create the state required to render ResponseCount.\n *\n * The returned state can be modified with hooks such as useResponseCountStyles_unstable,\n * before being passed to renderResponseCount_unstable.\n *\n * @param props - props from this instance of ResponseCount\n * @param ref - reference to root HTMLElement of ResponseCount\n */\nexport const useResponseCount_unstable = (\n props: ResponseCountProps,\n ref: React.Ref<HTMLElement>,\n): ResponseCountState => {\n const { status } = props;\n return {\n status,\n\n components: {\n root: 'span',\n indicator: 'span',\n },\n\n root: slot.always(\n getIntrinsicElementProps('span', {\n ref,\n ...props,\n }),\n { elementType: 'span' },\n ),\n indicator: slot.optional(props.indicator, { elementType: 'span', renderByDefault: true }),\n };\n};\n"],"names":["status","props","root","ref","slot","always","getIntrinsicElementProps","indicator","elementType","optional","renderByDefault"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAmBUA;;;eAAAA;;;iCAlBqC;AAkB7C,MAAQA,4BAAWC,CAAAA,OAAAA;UACnB,QACED;;;oBAKA;kBAEAE;uBAEIC;;cAEFC,qBACA,CAAAC,MAAA,CAAAC,IAAAA,yCAAA,EAAA,QAAA;;eAAsBL,KAAA;YAExBM;yBAA4CC;;mBAA2CJ,qBAAA,CAAAK,QAAA,CAAAR,MAAAM,SAAA,EAAA;YACzFC,aAAA;YACAE,iBAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useResponseCountStyles.
|
|
1
|
+
{"version":3,"sources":["useResponseCountStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands, tokens, typographyStyles } from '@fluentui/react-components';\nimport type { ResponseCountSlots, ResponseCountState } from './ResponseCount.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const responseCountClassNames: SlotClassNames<ResponseCountSlots> = {\n root: 'fai-ResponseCount',\n indicator: 'fai-ResponseCount__indicator',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n display: 'inline-flex',\n flexDirection: 'row',\n alignItems: 'center',\n ...shorthands.gap(tokens.spacingHorizontalXS),\n ...typographyStyles.caption2,\n color: tokens.colorNeutralForeground4,\n },\n indicator: {\n display: 'inline-block',\n width: '8px',\n height: '8px',\n ...shorthands.borderRadius('50%'),\n },\n success: {\n backgroundColor: tokens.colorStatusSuccessForeground3,\n },\n warning: {\n backgroundColor: tokens.colorStatusWarningForeground2,\n },\n danger: {\n backgroundColor: tokens.colorStatusDangerForeground3,\n },\n});\n\n/**\n * Apply styling to the ResponseCount slots based on the state\n */\nexport const useResponseCountStyles_unstable = (state: ResponseCountState): ResponseCountState => {\n const styles = useStyles();\n state.root.className = mergeClasses(responseCountClassNames.root, styles.root, state.root.className);\n\n if (state.indicator) {\n state.indicator.className = mergeClasses(\n responseCountClassNames.indicator,\n styles.indicator,\n styles[state.status],\n state.indicator.className,\n );\n }\n\n return state;\n};\n"],"names":["responseCountClassNames","root","indicator","__styles","display","flexDirection","alignItems","shorthands","typographyStyles","color","Bahqtrf","width","height","success","backgroundColor","Bqenvij","warning","tokens","colorStatusWarningForeground2","B7oj6ja","danger","De3pzq","state"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAIaA,uBAAAA;eAAAA;;;;;;iCAJ0D;AAIhE,MAAMA,0BAA8D;UACzEC;eACAC;AACF;AAEA;;CAEC,SAECD,YAAME,IAAAA,yBAAA,EAAA;UACJC;gBACAC;iBACAC;iBACGC;gBACAC;iBACHC;QACFC,SAAA;QACAR,SAAAA;iBACEE;iBACAO;gBACAC;;eAEF;QACAC,QAAAA;gBACEC;QACFC,SAAA;QACAC,SAAS;YAAA;YAAA;SAAA;iBACPF;YAAAA;YAAiBG;SAAOC;QAC1BC,SAAA;YAAA;YAAA;SAAA;QACAC,SAAQ;YAAA;YAAA;SAAA;;aAER;QACFC,QAAA;IAEA;;QAGAA,QAAO;;YAECpB;QAENoB,QAAIC;;;OASJ;QAAA;QAAOA;QAAAA;QAAAA;QAAAA;QAAAA;QAAAA;QAAAA;QAAAA;QAAAA;QAAAA;QAAAA;QAAAA;QAAAA;QAAAA;QAAAA;QAAAA;QAAAA;QAAAA;QAAAA;KAAAA;AACT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export type { ResponseCountProps, ResponseCountSlots, ResponseCountState } from './ResponseCount';\nexport { ResponseCount, renderResponseCount_unstable, responseCountClassNames, useResponseCountStyles_unstable, useResponseCount_unstable } from './ResponseCount';\n"],"names":["ResponseCount","renderResponseCount_unstable","responseCountClassNames","useResponseCountStyles_unstable","useResponseCount_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IACSA,aAAa;eAAbA,4BAAa;;IAAEC,4BAA4B;eAA5BA,2CAA4B;;IAAEC,uBAAuB;eAAvBA,sCAAuB;;IAAEC,+BAA+B;eAA/BA,8CAA+B;;IAAEC,yBAAyB;eAAzBA,wCAAyB;;;+BAAQ"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui-copilot/react-response-count",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Fluent AI control for displaying the number of responses and the remaining response count",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"@swc/helpers": "^0.5.1"
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|
|
18
|
-
"@fluentui/react-components": ">=9.
|
|
19
|
-
"@fluentui/react-jsx-runtime": ">=9.0.
|
|
18
|
+
"@fluentui/react-components": ">=9.49.0 <10.0.0",
|
|
19
|
+
"@fluentui/react-jsx-runtime": ">=9.0.36 <10.0.0",
|
|
20
20
|
"@types/react": ">=16.14.0 <19.0.0",
|
|
21
21
|
"@types/react-dom": ">=16.9.8 <19.0.0",
|
|
22
22
|
"react": ">=16.14.0 <19.0.0",
|