@fluentui-copilot/react-response-count 0.0.0-nightly-20251010-0406-7df7c6d1.1 → 0.0.0-nightly-20251013-0406-7c7739c8.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 +3 -3
- package/CHANGELOG.md +4 -4
- package/dist/index.d.ts +51 -0
- package/lib/ResponseCount.js +1 -0
- package/lib/ResponseCount.js.map +1 -0
- package/lib/components/ResponseCount/ResponseCount.js +11 -0
- package/lib/components/ResponseCount/ResponseCount.js.map +1 -0
- package/lib/components/ResponseCount/ResponseCount.types.js +3 -0
- package/lib/components/ResponseCount/ResponseCount.types.js.map +1 -0
- package/lib/components/ResponseCount/index.js +4 -0
- package/lib/components/ResponseCount/index.js.map +1 -0
- package/lib/components/ResponseCount/renderResponseCount.js +13 -0
- package/lib/components/ResponseCount/renderResponseCount.js.map +1 -0
- package/lib/components/ResponseCount/useResponseCount.js +30 -0
- package/lib/components/ResponseCount/useResponseCount.js.map +1 -0
- package/lib/components/ResponseCount/useResponseCountStyles.styles.js +63 -0
- package/lib/components/ResponseCount/useResponseCountStyles.styles.js.map +1 -0
- package/lib/components/ResponseCount/useResponseCountStyles.styles.raw.js +44 -0
- package/lib/components/ResponseCount/useResponseCountStyles.styles.raw.js.map +1 -0
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -0
- package/lib-commonjs/ResponseCount.js +28 -0
- package/lib-commonjs/ResponseCount.js.map +1 -0
- package/lib-commonjs/components/ResponseCount/ResponseCount.js +21 -0
- package/lib-commonjs/components/ResponseCount/ResponseCount.js.map +1 -0
- package/lib-commonjs/components/ResponseCount/ResponseCount.types.js +6 -0
- package/lib-commonjs/components/ResponseCount/ResponseCount.types.js.map +1 -0
- package/lib-commonjs/components/ResponseCount/index.js +31 -0
- package/lib-commonjs/components/ResponseCount/index.js.map +1 -0
- package/lib-commonjs/components/ResponseCount/renderResponseCount.js +21 -0
- package/lib-commonjs/components/ResponseCount/renderResponseCount.js.map +1 -0
- package/lib-commonjs/components/ResponseCount/useResponseCount.js +31 -0
- package/lib-commonjs/components/ResponseCount/useResponseCount.js.map +1 -0
- package/lib-commonjs/components/ResponseCount/useResponseCountStyles.styles.js +97 -0
- package/lib-commonjs/components/ResponseCount/useResponseCountStyles.styles.js.map +1 -0
- package/lib-commonjs/components/ResponseCount/useResponseCountStyles.styles.raw.js +60 -0
- package/lib-commonjs/components/ResponseCount/useResponseCountStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/index.js +28 -0
- package/lib-commonjs/index.js.map +1 -0
- package/package.json +2 -2
package/CHANGELOG.json
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"name": "@fluentui-copilot/react-response-count",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
6
|
-
"tag": "@fluentui-copilot/react-response-count_v0.0.0-nightly-
|
|
7
|
-
"version": "0.0.0-nightly-
|
|
5
|
+
"date": "Mon, 13 Oct 2025 04:14:18 GMT",
|
|
6
|
+
"tag": "@fluentui-copilot/react-response-count_v0.0.0-nightly-20251013-0406-7c7739c8.1",
|
|
7
|
+
"version": "0.0.0-nightly-20251013-0406-7c7739c8.1",
|
|
8
8
|
"comments": {
|
|
9
9
|
"prerelease": [
|
|
10
10
|
{
|
package/CHANGELOG.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
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 Mon, 13 Oct 2025 04:14:18 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
-
## [0.0.0-nightly-
|
|
7
|
+
## [0.0.0-nightly-20251013-0406-7c7739c8.1](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-response-count_v0.0.0-nightly-20251013-0406-7c7739c8.1)
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-response-count_v0.2.19..@fluentui-copilot/react-response-count_v0.0.0-nightly-
|
|
9
|
+
Mon, 13 Oct 2025 04:14:18 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-response-count_v0.2.19..@fluentui-copilot/react-response-count_v0.0.0-nightly-20251013-0406-7c7739c8.1)
|
|
11
11
|
|
|
12
12
|
### Changes
|
|
13
13
|
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { ComponentProps } from '@fluentui/react-components';
|
|
2
|
+
import type { ComponentState } from '@fluentui/react-components';
|
|
3
|
+
import type { ForwardRefComponent } from '@fluentui/react-components';
|
|
4
|
+
import type { JSXElement } from '@fluentui/react-components';
|
|
5
|
+
import type * as React_2 from 'react';
|
|
6
|
+
import type { Slot } from '@fluentui/react-components';
|
|
7
|
+
import type { SlotClassNames } from '@fluentui/react-components';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Render the final JSX of ResponseCount
|
|
11
|
+
*/
|
|
12
|
+
export declare const renderResponseCount_unstable: (state: ResponseCountState) => JSXElement;
|
|
13
|
+
|
|
14
|
+
export declare const ResponseCount: ForwardRefComponent<ResponseCountProps>;
|
|
15
|
+
|
|
16
|
+
export declare const responseCountClassNames: SlotClassNames<ResponseCountSlots>;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* ResponseCount Props
|
|
20
|
+
*/
|
|
21
|
+
export declare type ResponseCountProps = ComponentProps<ResponseCountSlots> & {
|
|
22
|
+
status: 'success' | 'warning' | 'danger';
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export declare type ResponseCountSlots = {
|
|
26
|
+
root: Slot<'span'>;
|
|
27
|
+
indicator?: Slot<'span'>;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* State used in rendering ResponseCount
|
|
32
|
+
*/
|
|
33
|
+
export declare type ResponseCountState = ComponentState<ResponseCountSlots> & Required<Pick<ResponseCountProps, 'status'>> & {};
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Create the state required to render ResponseCount.
|
|
37
|
+
*
|
|
38
|
+
* The returned state can be modified with hooks such as useResponseCountStyles_unstable,
|
|
39
|
+
* before being passed to renderResponseCount_unstable.
|
|
40
|
+
*
|
|
41
|
+
* @param props - props from this instance of ResponseCount
|
|
42
|
+
* @param ref - reference to root HTMLElement of ResponseCount
|
|
43
|
+
*/
|
|
44
|
+
export declare const useResponseCount_unstable: (props: ResponseCountProps, ref: React_2.Ref<HTMLElement>) => ResponseCountState;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Apply styling to the ResponseCount slots based on the state
|
|
48
|
+
*/
|
|
49
|
+
export declare const useResponseCountStyles_unstable: (state: ResponseCountState) => ResponseCountState;
|
|
50
|
+
|
|
51
|
+
export { }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ResponseCount, renderResponseCount_unstable, responseCountClassNames, useResponseCountStyles_unstable, useResponseCount_unstable } from './components/ResponseCount/index';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["ResponseCount.ts"],"sourcesContent":["export type { ResponseCountProps, ResponseCountSlots, ResponseCountState } from './components/ResponseCount/index';\nexport { ResponseCount, renderResponseCount_unstable, responseCountClassNames, useResponseCountStyles_unstable, useResponseCount_unstable } from './components/ResponseCount/index';\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,mCAAmC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { useResponseCount_unstable } from './useResponseCount';
|
|
3
|
+
import { renderResponseCount_unstable } from './renderResponseCount';
|
|
4
|
+
import { useResponseCountStyles_unstable } from './useResponseCountStyles.styles';
|
|
5
|
+
// ResponseCount component - TODO: add more docs
|
|
6
|
+
export const ResponseCount = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
7
|
+
const state = useResponseCount_unstable(props, ref);
|
|
8
|
+
useResponseCountStyles_unstable(state);
|
|
9
|
+
return renderResponseCount_unstable(state);
|
|
10
|
+
});
|
|
11
|
+
ResponseCount.displayName = 'ResponseCount';
|
|
@@ -0,0 +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.styles';\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,kCAAkC;AAIlF,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"}
|
|
@@ -0,0 +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":[],"rangeMappings":";;","mappings":"AAYA;;CAEC,GACD,WAAwH"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { ResponseCount } from './ResponseCount';
|
|
2
|
+
export { renderResponseCount_unstable } from './renderResponseCount';
|
|
3
|
+
export { useResponseCount_unstable } from './useResponseCount';
|
|
4
|
+
export { responseCountClassNames, useResponseCountStyles_unstable } from './useResponseCountStyles.styles';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export { ResponseCount } from './ResponseCount';\nexport type { ResponseCountProps, ResponseCountSlots, ResponseCountState } from './ResponseCount.types';\nexport { renderResponseCount_unstable } from './renderResponseCount';\nexport { useResponseCount_unstable } from './useResponseCount';\nexport { responseCountClassNames, useResponseCountStyles_unstable } from './useResponseCountStyles.styles';\n"],"names":["ResponseCount","renderResponseCount_unstable","useResponseCount_unstable","responseCountClassNames","useResponseCountStyles_unstable"],"rangeMappings":";;;","mappings":"AAAA,SAASA,aAAa,QAAQ,kBAAkB;AAEhD,SAASC,4BAA4B,QAAQ,wBAAwB;AACrE,SAASC,yBAAyB,QAAQ,qBAAqB;AAC/D,SAASC,uBAAuB,EAAEC,+BAA+B,QAAQ,kCAAkC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
|
|
2
|
+
import { assertSlots } from '@fluentui/react-components';
|
|
3
|
+
/**
|
|
4
|
+
* Render the final JSX of ResponseCount
|
|
5
|
+
*/ export const renderResponseCount_unstable = (state)=>{
|
|
6
|
+
assertSlots(state);
|
|
7
|
+
return /*#__PURE__*/ _jsxs(state.root, {
|
|
8
|
+
children: [
|
|
9
|
+
state.indicator && /*#__PURE__*/ _jsx(state.indicator, {}),
|
|
10
|
+
state.root.children
|
|
11
|
+
]
|
|
12
|
+
});
|
|
13
|
+
};
|
|
@@ -0,0 +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 { JSXElement } 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): JSXElement => {\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;AAIzD;;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"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { getIntrinsicElementProps, slot } from '@fluentui/react-components';
|
|
2
|
+
// If you add JSX to this file, be sure to change the file type to .tsx
|
|
3
|
+
/**
|
|
4
|
+
* Create the state required to render ResponseCount.
|
|
5
|
+
*
|
|
6
|
+
* The returned state can be modified with hooks such as useResponseCountStyles_unstable,
|
|
7
|
+
* before being passed to renderResponseCount_unstable.
|
|
8
|
+
*
|
|
9
|
+
* @param props - props from this instance of ResponseCount
|
|
10
|
+
* @param ref - reference to root HTMLElement of ResponseCount
|
|
11
|
+
*/ export const useResponseCount_unstable = (props, ref)=>{
|
|
12
|
+
const { status } = props;
|
|
13
|
+
return {
|
|
14
|
+
status,
|
|
15
|
+
components: {
|
|
16
|
+
root: 'span',
|
|
17
|
+
indicator: 'span'
|
|
18
|
+
},
|
|
19
|
+
root: slot.always(getIntrinsicElementProps('span', {
|
|
20
|
+
ref,
|
|
21
|
+
...props
|
|
22
|
+
}), {
|
|
23
|
+
elementType: 'span'
|
|
24
|
+
}),
|
|
25
|
+
indicator: slot.optional(props.indicator, {
|
|
26
|
+
elementType: 'span',
|
|
27
|
+
renderByDefault: true
|
|
28
|
+
})
|
|
29
|
+
};
|
|
30
|
+
};
|
|
@@ -0,0 +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"],"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"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { __styles, mergeClasses } from '@fluentui/react-components';
|
|
2
|
+
import { tokens, typographyStyles } from '@fluentui-copilot/tokens';
|
|
3
|
+
export const responseCountClassNames = {
|
|
4
|
+
root: 'fai-ResponseCount',
|
|
5
|
+
indicator: 'fai-ResponseCount__indicator'
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Styles for the root slot
|
|
9
|
+
*/
|
|
10
|
+
const useStyles = __styles({
|
|
11
|
+
root: {
|
|
12
|
+
mc9l5x: "ftuwxu6",
|
|
13
|
+
Beiy3e4: "f1063pyq",
|
|
14
|
+
Bt984gj: "f122n59",
|
|
15
|
+
i8kkvl: 0,
|
|
16
|
+
Belr9w4: 0,
|
|
17
|
+
rmohyg: "fkln5zr",
|
|
18
|
+
Bahqtrf: "fk6fouc",
|
|
19
|
+
Be2twd7: "f13mqy1h",
|
|
20
|
+
Bhrd7zp: "figsok6",
|
|
21
|
+
Bg96gwp: "fwrc4pm",
|
|
22
|
+
sj55zd: "fxc4j92"
|
|
23
|
+
},
|
|
24
|
+
indicator: {
|
|
25
|
+
mc9l5x: "f14t3ns0",
|
|
26
|
+
a9b677: "f1o3cbw4",
|
|
27
|
+
Bqenvij: "f1x82gua",
|
|
28
|
+
Beyfa6y: 0,
|
|
29
|
+
Bbmb7ep: 0,
|
|
30
|
+
Btl43ni: 0,
|
|
31
|
+
B7oj6ja: 0,
|
|
32
|
+
Dimara: "f5q2cvs"
|
|
33
|
+
},
|
|
34
|
+
success: {
|
|
35
|
+
De3pzq: "f1l9zcvb"
|
|
36
|
+
},
|
|
37
|
+
warning: {
|
|
38
|
+
De3pzq: "f1w7p0oj"
|
|
39
|
+
},
|
|
40
|
+
danger: {
|
|
41
|
+
De3pzq: "fms76vi"
|
|
42
|
+
}
|
|
43
|
+
}, {
|
|
44
|
+
d: [".ftuwxu6{display:inline-flex;}", ".f1063pyq{flex-direction:row;}", ".f122n59{align-items:center;}", [".fkln5zr{gap:var(--spacingHorizontalXS);}", {
|
|
45
|
+
p: -1
|
|
46
|
+
}], ".fk6fouc{font-family:var(--fontFamilyBase);}", ".f13mqy1h{font-size:var(--fontSizeBase100);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".fwrc4pm{line-height:var(--lineHeightBase200);}", ".fxc4j92{color:var(--colorNeutralForeground4);}", ".f14t3ns0{display:inline-block;}", ".f1o3cbw4{width:8px;}", ".f1x82gua{height:8px;}", [".f5q2cvs{border-radius:50%;}", {
|
|
47
|
+
p: -1
|
|
48
|
+
}], ".f1l9zcvb{background-color:var(--colorStatusSuccessForeground3);}", ".f1w7p0oj{background-color:var(--colorStatusWarningForeground2);}", ".fms76vi{background-color:var(--colorStatusDangerForeground3);}"]
|
|
49
|
+
});
|
|
50
|
+
/**
|
|
51
|
+
* Apply styling to the ResponseCount slots based on the state
|
|
52
|
+
*/
|
|
53
|
+
export const useResponseCountStyles_unstable = state => {
|
|
54
|
+
'use no memo';
|
|
55
|
+
|
|
56
|
+
const styles = useStyles();
|
|
57
|
+
state.root.className = mergeClasses(responseCountClassNames.root, styles.root, state.root.className);
|
|
58
|
+
if (state.indicator) {
|
|
59
|
+
state.indicator.className = mergeClasses(responseCountClassNames.indicator, styles.indicator, styles[state.status], state.indicator.className);
|
|
60
|
+
}
|
|
61
|
+
return state;
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=useResponseCountStyles.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useResponseCountStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses } from '@fluentui/react-components';\nimport { tokens, typographyStyles } from '@fluentui-copilot/tokens';\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 gap: tokens.spacingHorizontalXS,\n ...typographyStyles.caption2,\n color: tokens.colorNeutralForeground4,\n },\n indicator: {\n display: 'inline-block',\n width: '8px',\n height: '8px',\n 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 'use no memo';\n\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","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,QAAQ,6BAA6B;AACtE,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,2BAA2B;AAIpE,OAAO,MAAMC,0BAA8D;IACzEC,MAAM;IACNC,WAAW;AACb,EAAE;AAEF;;CAEC,GACD,MAAMC,YAAYP,WAAW;IAC3BK,MAAM;QACJG,SAAS;QACTC,eAAe;QACfC,YAAY;QACZC,KAAKT,OAAOU,mBAAmB;QAC/B,GAAGT,iBAAiBU,QAAQ;QAC5BC,OAAOZ,OAAOa,uBAAuB;IACvC;IACAT,WAAW;QACTE,SAAS;QACTQ,OAAO;QACPC,QAAQ;QACRC,cAAc;IAChB;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;IAEA,MAAMC,SAASrB;IACfoB,MAAMtB,IAAI,CAACwB,SAAS,GAAG5B,aAAaG,wBAAwBC,IAAI,EAAEuB,OAAOvB,IAAI,EAAEsB,MAAMtB,IAAI,CAACwB,SAAS;IAEnG,IAAIF,MAAMrB,SAAS,EAAE;QACnBqB,MAAMrB,SAAS,CAACuB,SAAS,GAAG5B,aAC1BG,wBAAwBE,SAAS,EACjCsB,OAAOtB,SAAS,EAChBsB,MAAM,CAACD,MAAMG,MAAM,CAAC,EACpBH,MAAMrB,SAAS,CAACuB,SAAS;IAE7B;IAEA,OAAOF;AACT,EAAE"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { makeStyles, mergeClasses } from '@fluentui/react-components';
|
|
2
|
+
import { tokens, typographyStyles } from '@fluentui-copilot/tokens';
|
|
3
|
+
export const responseCountClassNames = {
|
|
4
|
+
root: 'fai-ResponseCount',
|
|
5
|
+
indicator: 'fai-ResponseCount__indicator'
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Styles for the root slot
|
|
9
|
+
*/ const useStyles = makeStyles({
|
|
10
|
+
root: {
|
|
11
|
+
display: 'inline-flex',
|
|
12
|
+
flexDirection: 'row',
|
|
13
|
+
alignItems: 'center',
|
|
14
|
+
gap: tokens.spacingHorizontalXS,
|
|
15
|
+
...typographyStyles.caption2,
|
|
16
|
+
color: tokens.colorNeutralForeground4
|
|
17
|
+
},
|
|
18
|
+
indicator: {
|
|
19
|
+
display: 'inline-block',
|
|
20
|
+
width: '8px',
|
|
21
|
+
height: '8px',
|
|
22
|
+
borderRadius: '50%'
|
|
23
|
+
},
|
|
24
|
+
success: {
|
|
25
|
+
backgroundColor: tokens.colorStatusSuccessForeground3
|
|
26
|
+
},
|
|
27
|
+
warning: {
|
|
28
|
+
backgroundColor: tokens.colorStatusWarningForeground2
|
|
29
|
+
},
|
|
30
|
+
danger: {
|
|
31
|
+
backgroundColor: tokens.colorStatusDangerForeground3
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
/**
|
|
35
|
+
* Apply styling to the ResponseCount slots based on the state
|
|
36
|
+
*/ export const useResponseCountStyles_unstable = (state)=>{
|
|
37
|
+
'use no memo';
|
|
38
|
+
const styles = useStyles();
|
|
39
|
+
state.root.className = mergeClasses(responseCountClassNames.root, styles.root, state.root.className);
|
|
40
|
+
if (state.indicator) {
|
|
41
|
+
state.indicator.className = mergeClasses(responseCountClassNames.indicator, styles.indicator, styles[state.status], state.indicator.className);
|
|
42
|
+
}
|
|
43
|
+
return state;
|
|
44
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useResponseCountStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses } from '@fluentui/react-components';\nimport { tokens, typographyStyles } from '@fluentui-copilot/tokens';\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 gap: tokens.spacingHorizontalXS,\n ...typographyStyles.caption2,\n color: tokens.colorNeutralForeground4,\n },\n indicator: {\n display: 'inline-block',\n width: '8px',\n height: '8px',\n 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 'use no memo';\n\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","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,QAAQ,6BAA6B;AACtE,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,2BAA2B;AAIpE,OAAO,MAAMC,0BAA8D;IACzEC,MAAM;IACNC,WAAW;AACb,EAAE;AAEF;;CAEC,GACD,MAAMC,YAAYP,WAAW;IAC3BK,MAAM;QACJG,SAAS;QACTC,eAAe;QACfC,YAAY;QACZC,KAAKT,OAAOU,mBAAmB;QAC/B,GAAGT,iBAAiBU,QAAQ;QAC5BC,OAAOZ,OAAOa,uBAAuB;IACvC;IACAT,WAAW;QACTE,SAAS;QACTQ,OAAO;QACPC,QAAQ;QACRC,cAAc;IAChB;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;IAEA,MAAMC,SAASrB;IACfoB,MAAMtB,IAAI,CAACwB,SAAS,GAAG5B,aAAaG,wBAAwBC,IAAI,EAAEuB,OAAOvB,IAAI,EAAEsB,MAAMtB,IAAI,CAACwB,SAAS;IAEnG,IAAIF,MAAMrB,SAAS,EAAE;QACnBqB,MAAMrB,SAAS,CAACuB,SAAS,GAAG5B,aAC1BG,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
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ResponseCount, renderResponseCount_unstable, responseCountClassNames, useResponseCountStyles_unstable, useResponseCount_unstable } from './ResponseCount';
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +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"],"rangeMappings":"","mappings":"AACA,SAASA,aAAa,EAAEC,4BAA4B,EAAEC,uBAAuB,EAAEC,+BAA+B,EAAEC,yBAAyB,QAAQ,kBAAkB"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
ResponseCount: function() {
|
|
13
|
+
return _index.ResponseCount;
|
|
14
|
+
},
|
|
15
|
+
renderResponseCount_unstable: function() {
|
|
16
|
+
return _index.renderResponseCount_unstable;
|
|
17
|
+
},
|
|
18
|
+
responseCountClassNames: function() {
|
|
19
|
+
return _index.responseCountClassNames;
|
|
20
|
+
},
|
|
21
|
+
useResponseCountStyles_unstable: function() {
|
|
22
|
+
return _index.useResponseCountStyles_unstable;
|
|
23
|
+
},
|
|
24
|
+
useResponseCount_unstable: function() {
|
|
25
|
+
return _index.useResponseCount_unstable;
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
const _index = require("./components/ResponseCount/index");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["ResponseCount.ts"],"sourcesContent":["export type { ResponseCountProps, ResponseCountSlots, ResponseCountState } from './components/ResponseCount/index';\nexport { ResponseCount, renderResponseCount_unstable, responseCountClassNames, useResponseCountStyles_unstable, useResponseCount_unstable } from './components/ResponseCount/index';\n"],"names":["ResponseCount","renderResponseCount_unstable","responseCountClassNames","useResponseCountStyles_unstable","useResponseCount_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IACSA,aAAa;eAAbA,oBAAa;;IAAEC,4BAA4B;eAA5BA,mCAA4B;;IAAEC,uBAAuB;eAAvBA,8BAAuB;;IAAEC,+BAA+B;eAA/BA,sCAA+B;;IAAEC,yBAAyB;eAAzBA,gCAAyB;;;uBAAQ"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "ResponseCount", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return ResponseCount;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
12
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
13
|
+
const _useResponseCount = require("./useResponseCount");
|
|
14
|
+
const _renderResponseCount = require("./renderResponseCount");
|
|
15
|
+
const _useResponseCountStylesstyles = require("./useResponseCountStyles.styles");
|
|
16
|
+
const ResponseCount = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
|
17
|
+
const state = (0, _useResponseCount.useResponseCount_unstable)(props, ref);
|
|
18
|
+
(0, _useResponseCountStylesstyles.useResponseCountStyles_unstable)(state);
|
|
19
|
+
return (0, _renderResponseCount.renderResponseCount_unstable)(state);
|
|
20
|
+
});
|
|
21
|
+
ResponseCount.displayName = 'ResponseCount';
|
|
@@ -0,0 +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.styles';\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","ref","state","useResponseCount_unstable","useResponseCountStyles_unstable","renderResponseCount_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAQaA;;;eAAAA;;;;iEARU;kCACmB;qCACG;8CACG;AAKzC,MAAMA,gBAAAA,WAAAA,GAAyDC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC7F,MAAMC,QAAQC,IAAAA,2CAAAA,EAA0BH,OAAOC;IAE/CG,IAAAA,6DAAAA,EAAgCF;IAChC,OAAOG,IAAAA,iDAAAA,EAA6BH;AACtC;AAEAL,cAAcS,WAAW,GAAG"}
|
|
@@ -0,0 +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":[],"rangeMappings":";;","mappings":"AAYA;;CAEC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
ResponseCount: function() {
|
|
13
|
+
return _ResponseCount.ResponseCount;
|
|
14
|
+
},
|
|
15
|
+
renderResponseCount_unstable: function() {
|
|
16
|
+
return _renderResponseCount.renderResponseCount_unstable;
|
|
17
|
+
},
|
|
18
|
+
responseCountClassNames: function() {
|
|
19
|
+
return _useResponseCountStylesstyles.responseCountClassNames;
|
|
20
|
+
},
|
|
21
|
+
useResponseCountStyles_unstable: function() {
|
|
22
|
+
return _useResponseCountStylesstyles.useResponseCountStyles_unstable;
|
|
23
|
+
},
|
|
24
|
+
useResponseCount_unstable: function() {
|
|
25
|
+
return _useResponseCount.useResponseCount_unstable;
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
const _ResponseCount = require("./ResponseCount");
|
|
29
|
+
const _renderResponseCount = require("./renderResponseCount");
|
|
30
|
+
const _useResponseCount = require("./useResponseCount");
|
|
31
|
+
const _useResponseCountStylesstyles = require("./useResponseCountStyles.styles");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export { ResponseCount } from './ResponseCount';\nexport type { ResponseCountProps, ResponseCountSlots, ResponseCountState } from './ResponseCount.types';\nexport { renderResponseCount_unstable } from './renderResponseCount';\nexport { useResponseCount_unstable } from './useResponseCount';\nexport { responseCountClassNames, useResponseCountStyles_unstable } from './useResponseCountStyles.styles';\n"],"names":["ResponseCount","renderResponseCount_unstable","responseCountClassNames","useResponseCountStyles_unstable","useResponseCount_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,aAAa;eAAbA,4BAAa;;IAEbC,4BAA4B;eAA5BA,iDAA4B;;IAE5BC,uBAAuB;eAAvBA,qDAAuB;;IAAEC,+BAA+B;eAA/BA,6DAA+B;;IADxDC,yBAAyB;eAAzBA,2CAAyB;;;+BAHJ;qCAEe;kCACH;8CAC+B"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "renderResponseCount_unstable", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return renderResponseCount_unstable;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
|
|
12
|
+
const _reactcomponents = require("@fluentui/react-components");
|
|
13
|
+
const renderResponseCount_unstable = (state)=>{
|
|
14
|
+
(0, _reactcomponents.assertSlots)(state);
|
|
15
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(state.root, {
|
|
16
|
+
children: [
|
|
17
|
+
state.indicator && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.indicator, {}),
|
|
18
|
+
state.root.children
|
|
19
|
+
]
|
|
20
|
+
});
|
|
21
|
+
};
|
|
@@ -0,0 +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 { JSXElement } 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): JSXElement => {\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":["renderResponseCount_unstable","state","assertSlots","_jsxs","root","indicator","_jsx","children"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAUaA;;;eAAAA;;;4BATb;iCAE4B;AAOrB,MAAMA,+BAA+B,CAACC;IAC3CC,IAAAA,4BAAAA,EAAgCD;IAEhC,OAAA,WAAA,GACEE,IAAAA,gBAAA,EAACF,MAAMG,IAAI,EAAA;;YACRH,MAAMI,SAAS,IAAA,WAAA,GAAIC,IAAAA,eAAA,EAACL,MAAMI,SAAS,EAAA,CAAA;YACnCJ,MAAMG,IAAI,CAACG,QAAQ;;;AAG1B"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "useResponseCount_unstable", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return useResponseCount_unstable;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _reactcomponents = require("@fluentui/react-components");
|
|
12
|
+
const useResponseCount_unstable = (props, ref)=>{
|
|
13
|
+
const { status } = props;
|
|
14
|
+
return {
|
|
15
|
+
status,
|
|
16
|
+
components: {
|
|
17
|
+
root: 'span',
|
|
18
|
+
indicator: 'span'
|
|
19
|
+
},
|
|
20
|
+
root: _reactcomponents.slot.always((0, _reactcomponents.getIntrinsicElementProps)('span', {
|
|
21
|
+
ref,
|
|
22
|
+
...props
|
|
23
|
+
}), {
|
|
24
|
+
elementType: 'span'
|
|
25
|
+
}),
|
|
26
|
+
indicator: _reactcomponents.slot.optional(props.indicator, {
|
|
27
|
+
elementType: 'span',
|
|
28
|
+
renderByDefault: true
|
|
29
|
+
})
|
|
30
|
+
};
|
|
31
|
+
};
|
|
@@ -0,0 +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":["useResponseCount_unstable","props","ref","status","components","root","indicator","slot","always","getIntrinsicElementProps","elementType","optional","renderByDefault"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAeaA;;;eAAAA;;;iCAdkC;AAcxC,MAAMA,4BAA4B,CACvCC,OACAC;IAEA,MAAM,EAAEC,MAAM,EAAE,GAAGF;IACnB,OAAO;QACLE;QAEAC,YAAY;YACVC,MAAM;YACNC,WAAW;QACb;QAEAD,MAAME,qBAAAA,CAAKC,MAAM,CACfC,IAAAA,yCAAAA,EAAyB,QAAQ;YAC/BP;YACA,GAAGD,KAAK;QACV,IACA;YAAES,aAAa;QAAO;QAExBJ,WAAWC,qBAAAA,CAAKI,QAAQ,CAACV,MAAMK,SAAS,EAAE;YAAEI,aAAa;YAAQE,iBAAiB;QAAK;IACzF;AACF"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
responseCountClassNames: function() {
|
|
13
|
+
return responseCountClassNames;
|
|
14
|
+
},
|
|
15
|
+
useResponseCountStyles_unstable: function() {
|
|
16
|
+
return useResponseCountStyles_unstable;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _reactcomponents = require("@fluentui/react-components");
|
|
20
|
+
const responseCountClassNames = {
|
|
21
|
+
root: 'fai-ResponseCount',
|
|
22
|
+
indicator: 'fai-ResponseCount__indicator'
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Styles for the root slot
|
|
26
|
+
*/ const useStyles = (0, _reactcomponents.__styles)({
|
|
27
|
+
root: {
|
|
28
|
+
mc9l5x: "ftuwxu6",
|
|
29
|
+
Beiy3e4: "f1063pyq",
|
|
30
|
+
Bt984gj: "f122n59",
|
|
31
|
+
i8kkvl: 0,
|
|
32
|
+
Belr9w4: 0,
|
|
33
|
+
rmohyg: "fkln5zr",
|
|
34
|
+
Bahqtrf: "fk6fouc",
|
|
35
|
+
Be2twd7: "f13mqy1h",
|
|
36
|
+
Bhrd7zp: "figsok6",
|
|
37
|
+
Bg96gwp: "fwrc4pm",
|
|
38
|
+
sj55zd: "fxc4j92"
|
|
39
|
+
},
|
|
40
|
+
indicator: {
|
|
41
|
+
mc9l5x: "f14t3ns0",
|
|
42
|
+
a9b677: "f1o3cbw4",
|
|
43
|
+
Bqenvij: "f1x82gua",
|
|
44
|
+
Beyfa6y: 0,
|
|
45
|
+
Bbmb7ep: 0,
|
|
46
|
+
Btl43ni: 0,
|
|
47
|
+
B7oj6ja: 0,
|
|
48
|
+
Dimara: "f5q2cvs"
|
|
49
|
+
},
|
|
50
|
+
success: {
|
|
51
|
+
De3pzq: "f1l9zcvb"
|
|
52
|
+
},
|
|
53
|
+
warning: {
|
|
54
|
+
De3pzq: "f1w7p0oj"
|
|
55
|
+
},
|
|
56
|
+
danger: {
|
|
57
|
+
De3pzq: "fms76vi"
|
|
58
|
+
}
|
|
59
|
+
}, {
|
|
60
|
+
d: [
|
|
61
|
+
".ftuwxu6{display:inline-flex;}",
|
|
62
|
+
".f1063pyq{flex-direction:row;}",
|
|
63
|
+
".f122n59{align-items:center;}",
|
|
64
|
+
[
|
|
65
|
+
".fkln5zr{gap:var(--spacingHorizontalXS);}",
|
|
66
|
+
{
|
|
67
|
+
p: -1
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
".fk6fouc{font-family:var(--fontFamilyBase);}",
|
|
71
|
+
".f13mqy1h{font-size:var(--fontSizeBase100);}",
|
|
72
|
+
".figsok6{font-weight:var(--fontWeightRegular);}",
|
|
73
|
+
".fwrc4pm{line-height:var(--lineHeightBase200);}",
|
|
74
|
+
".fxc4j92{color:var(--colorNeutralForeground4);}",
|
|
75
|
+
".f14t3ns0{display:inline-block;}",
|
|
76
|
+
".f1o3cbw4{width:8px;}",
|
|
77
|
+
".f1x82gua{height:8px;}",
|
|
78
|
+
[
|
|
79
|
+
".f5q2cvs{border-radius:50%;}",
|
|
80
|
+
{
|
|
81
|
+
p: -1
|
|
82
|
+
}
|
|
83
|
+
],
|
|
84
|
+
".f1l9zcvb{background-color:var(--colorStatusSuccessForeground3);}",
|
|
85
|
+
".f1w7p0oj{background-color:var(--colorStatusWarningForeground2);}",
|
|
86
|
+
".fms76vi{background-color:var(--colorStatusDangerForeground3);}"
|
|
87
|
+
]
|
|
88
|
+
});
|
|
89
|
+
const useResponseCountStyles_unstable = (state)=>{
|
|
90
|
+
'use no memo';
|
|
91
|
+
const styles = useStyles();
|
|
92
|
+
state.root.className = (0, _reactcomponents.mergeClasses)(responseCountClassNames.root, styles.root, state.root.className);
|
|
93
|
+
if (state.indicator) {
|
|
94
|
+
state.indicator.className = (0, _reactcomponents.mergeClasses)(responseCountClassNames.indicator, styles.indicator, styles[state.status], state.indicator.className);
|
|
95
|
+
}
|
|
96
|
+
return state;
|
|
97
|
+
}; //# sourceMappingURL=useResponseCountStyles.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useResponseCountStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses } from '@fluentui/react-components';\nimport { tokens, typographyStyles } from '@fluentui-copilot/tokens';\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 gap: tokens.spacingHorizontalXS,\n ...typographyStyles.caption2,\n color: tokens.colorNeutralForeground4,\n },\n indicator: {\n display: 'inline-block',\n width: '8px',\n height: '8px',\n 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 'use no memo';\n\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","tokens","typographyStyles","color","rmohyg","width","height","borderRadius","backgroundColor","a9b677","warning","Bbmb7ep","danger","Dimara","success","De3pzq","styles","state","d"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAKaA,uBAAAA;eAAAA;;;;;;iCALoB;AAK1B,MAAMA,0BAA8D;UACzEC;eACAC;AACF;AAEA;;CAEC,SAECD,YAAME,IAAAA,yBAAA,EAAA;UACJC;gBACAC;iBACAC;iBACKC;gBACFC;iBACHC;QACFC,QAAA;QACAR,SAAAA;iBACEE;iBACAO;iBACAC;gBACAC;;eAEO;gBACPC;QACFC,QAAA;QACAC,SAAS;iBACPF;QACFG,SAAA;QACAC,SAAQ;iBACNJ;QACFK,QAAA;IACF;IAEAC,SAAA;;IAEC;aAEC;QAEAC,QAAMC;;YAGFC;gBACFA;;;IASFC,GAAA;QAAA;QAAA;QAAA;QAAA;YAAA;YAAA"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
responseCountClassNames: function() {
|
|
13
|
+
return responseCountClassNames;
|
|
14
|
+
},
|
|
15
|
+
useResponseCountStyles_unstable: function() {
|
|
16
|
+
return useResponseCountStyles_unstable;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _reactcomponents = require("@fluentui/react-components");
|
|
20
|
+
const _tokens = require("@fluentui-copilot/tokens");
|
|
21
|
+
const responseCountClassNames = {
|
|
22
|
+
root: 'fai-ResponseCount',
|
|
23
|
+
indicator: 'fai-ResponseCount__indicator'
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Styles for the root slot
|
|
27
|
+
*/ const useStyles = (0, _reactcomponents.makeStyles)({
|
|
28
|
+
root: {
|
|
29
|
+
display: 'inline-flex',
|
|
30
|
+
flexDirection: 'row',
|
|
31
|
+
alignItems: 'center',
|
|
32
|
+
gap: _tokens.tokens.spacingHorizontalXS,
|
|
33
|
+
..._tokens.typographyStyles.caption2,
|
|
34
|
+
color: _tokens.tokens.colorNeutralForeground4
|
|
35
|
+
},
|
|
36
|
+
indicator: {
|
|
37
|
+
display: 'inline-block',
|
|
38
|
+
width: '8px',
|
|
39
|
+
height: '8px',
|
|
40
|
+
borderRadius: '50%'
|
|
41
|
+
},
|
|
42
|
+
success: {
|
|
43
|
+
backgroundColor: _tokens.tokens.colorStatusSuccessForeground3
|
|
44
|
+
},
|
|
45
|
+
warning: {
|
|
46
|
+
backgroundColor: _tokens.tokens.colorStatusWarningForeground2
|
|
47
|
+
},
|
|
48
|
+
danger: {
|
|
49
|
+
backgroundColor: _tokens.tokens.colorStatusDangerForeground3
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
const useResponseCountStyles_unstable = (state)=>{
|
|
53
|
+
'use no memo';
|
|
54
|
+
const styles = useStyles();
|
|
55
|
+
state.root.className = (0, _reactcomponents.mergeClasses)(responseCountClassNames.root, styles.root, state.root.className);
|
|
56
|
+
if (state.indicator) {
|
|
57
|
+
state.indicator.className = (0, _reactcomponents.mergeClasses)(responseCountClassNames.indicator, styles.indicator, styles[state.status], state.indicator.className);
|
|
58
|
+
}
|
|
59
|
+
return state;
|
|
60
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useResponseCountStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses } from '@fluentui/react-components';\nimport { tokens, typographyStyles } from '@fluentui-copilot/tokens';\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 gap: tokens.spacingHorizontalXS,\n ...typographyStyles.caption2,\n color: tokens.colorNeutralForeground4,\n },\n indicator: {\n display: 'inline-block',\n width: '8px',\n height: '8px',\n 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 'use no memo';\n\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","useResponseCountStyles_unstable","root","indicator","useStyles","makeStyles","display","flexDirection","alignItems","gap","tokens","spacingHorizontalXS","typographyStyles","caption2","color","colorNeutralForeground4","width","height","borderRadius","success","backgroundColor","colorStatusSuccessForeground3","warning","colorStatusWarningForeground2","danger","colorStatusDangerForeground3","state","styles","className","mergeClasses","status"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAKaA,uBAAAA;eAAAA;;IAqCAC,+BAAAA;eAAAA;;;iCA1C4B;wBACA;AAIlC,MAAMD,0BAA8D;IACzEE,MAAM;IACNC,WAAW;AACb;AAEA;;CAEC,GACD,MAAMC,YAAYC,IAAAA,2BAAAA,EAAW;IAC3BH,MAAM;QACJI,SAAS;QACTC,eAAe;QACfC,YAAY;QACZC,KAAKC,cAAAA,CAAOC,mBAAmB;QAC/B,GAAGC,wBAAAA,CAAiBC,QAAQ;QAC5BC,OAAOJ,cAAAA,CAAOK,uBAAuB;IACvC;IACAZ,WAAW;QACTG,SAAS;QACTU,OAAO;QACPC,QAAQ;QACRC,cAAc;IAChB;IACAC,SAAS;QACPC,iBAAiBV,cAAAA,CAAOW,6BAA6B;IACvD;IACAC,SAAS;QACPF,iBAAiBV,cAAAA,CAAOa,6BAA6B;IACvD;IACAC,QAAQ;QACNJ,iBAAiBV,cAAAA,CAAOe,4BAA4B;IACtD;AACF;AAKO,MAAMxB,kCAAkC,CAACyB;IAC9C;IAEA,MAAMC,SAASvB;IACfsB,MAAMxB,IAAI,CAAC0B,SAAS,GAAGC,IAAAA,6BAAAA,EAAa7B,wBAAwBE,IAAI,EAAEyB,OAAOzB,IAAI,EAAEwB,MAAMxB,IAAI,CAAC0B,SAAS;IAEnG,IAAIF,MAAMvB,SAAS,EAAE;QACnBuB,MAAMvB,SAAS,CAACyB,SAAS,GAAGC,IAAAA,6BAAAA,EAC1B7B,wBAAwBG,SAAS,EACjCwB,OAAOxB,SAAS,EAChBwB,MAAM,CAACD,MAAMI,MAAM,CAAC,EACpBJ,MAAMvB,SAAS,CAACyB,SAAS;IAE7B;IAEA,OAAOF;AACT"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
ResponseCount: function() {
|
|
13
|
+
return _ResponseCount.ResponseCount;
|
|
14
|
+
},
|
|
15
|
+
renderResponseCount_unstable: function() {
|
|
16
|
+
return _ResponseCount.renderResponseCount_unstable;
|
|
17
|
+
},
|
|
18
|
+
responseCountClassNames: function() {
|
|
19
|
+
return _ResponseCount.responseCountClassNames;
|
|
20
|
+
},
|
|
21
|
+
useResponseCountStyles_unstable: function() {
|
|
22
|
+
return _ResponseCount.useResponseCountStyles_unstable;
|
|
23
|
+
},
|
|
24
|
+
useResponseCount_unstable: function() {
|
|
25
|
+
return _ResponseCount.useResponseCount_unstable;
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
const _ResponseCount = require("./ResponseCount");
|
|
@@ -0,0 +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"],"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.0.0-nightly-
|
|
3
|
+
"version": "0.0.0-nightly-20251013-0406-7c7739c8.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",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
},
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@fluentui-copilot/tokens": "0.0.0-nightly-
|
|
15
|
+
"@fluentui-copilot/tokens": "0.0.0-nightly-20251013-0406-7c7739c8.1",
|
|
16
16
|
"@swc/helpers": "^0.5.1"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|