@fluentui/react-skeleton 9.74.9-experimental.menu-disable-autofocus.20261008-e9914a95c6.0 → 9.75.0-experimental.css-modules.20261031-810ab07afb.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.
- package/CHANGELOG.md +19 -9
- package/README.md +6 -0
- package/lib/components/Skeleton/Skeleton.js.map +1 -1
- package/lib/components/Skeleton/Skeleton.module.css +5 -0
- package/lib/components/Skeleton/Skeleton.types.js.map +1 -1
- package/lib/components/Skeleton/index.js.map +1 -1
- package/lib/components/Skeleton/renderSkeleton.js +2 -2
- package/lib/components/Skeleton/renderSkeleton.js.map +1 -1
- package/lib/components/Skeleton/useSkeleton.js.map +1 -1
- package/lib/components/Skeleton/useSkeletonContextValues.js.map +1 -1
- package/lib/components/Skeleton/useSkeletonStyles.styles.css.js +9 -0
- package/lib/components/Skeleton/useSkeletonStyles.styles.css.js.map +1 -0
- package/lib/components/Skeleton/useSkeletonStyles.styles.raw.css.js +9 -0
- package/lib/components/Skeleton/useSkeletonStyles.styles.raw.css.js.map +1 -0
- package/lib/components/Skeleton/useSkeletonStyles.styles.raw.js.map +1 -1
- package/lib/components/SkeletonItem/SkeletonItem.js.map +1 -1
- package/lib/components/SkeletonItem/SkeletonItem.module.css +224 -0
- package/lib/components/SkeletonItem/SkeletonItem.types.js.map +1 -1
- package/lib/components/SkeletonItem/index.js.map +1 -1
- package/lib/components/SkeletonItem/renderSkeletonItem.js +2 -2
- package/lib/components/SkeletonItem/renderSkeletonItem.js.map +1 -1
- package/lib/components/SkeletonItem/useSkeletonItem.js.map +1 -1
- package/lib/components/SkeletonItem/useSkeletonItemStyles.styles.css.js +9 -0
- package/lib/components/SkeletonItem/useSkeletonItemStyles.styles.css.js.map +1 -0
- package/lib/components/SkeletonItem/useSkeletonItemStyles.styles.raw.css.js +9 -0
- package/lib/components/SkeletonItem/useSkeletonItemStyles.styles.raw.css.js.map +1 -0
- package/lib/components/SkeletonItem/useSkeletonItemStyles.styles.raw.js.map +1 -1
- package/lib/contexts/SkeletonContext.js.map +1 -1
- package/lib/contexts/index.js.map +1 -1
- package/lib-commonjs/Skeleton.cjs +8 -8
- package/lib-commonjs/SkeletonItem.cjs +7 -7
- package/lib-commonjs/components/Skeleton/Skeleton.cjs.map +1 -1
- package/lib-commonjs/components/Skeleton/Skeleton.module.css +5 -0
- package/lib-commonjs/components/Skeleton/Skeleton.types.cjs.map +1 -1
- package/lib-commonjs/components/Skeleton/index.cjs +8 -8
- package/lib-commonjs/components/Skeleton/index.cjs.map +1 -1
- package/lib-commonjs/components/Skeleton/renderSkeleton.cjs.map +1 -1
- package/lib-commonjs/components/Skeleton/useSkeleton.cjs +3 -3
- package/lib-commonjs/components/Skeleton/useSkeleton.cjs.map +1 -1
- package/lib-commonjs/components/Skeleton/useSkeletonContextValues.cjs.map +1 -1
- package/lib-commonjs/components/Skeleton/useSkeletonStyles.styles.cjs +3 -3
- package/lib-commonjs/components/Skeleton/useSkeletonStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/Skeleton/useSkeletonStyles.styles.css.cjs +28 -0
- package/lib-commonjs/components/Skeleton/useSkeletonStyles.styles.css.cjs.map +1 -0
- package/lib-commonjs/components/Skeleton/useSkeletonStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/Skeleton/useSkeletonStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/Skeleton/useSkeletonStyles.styles.raw.css.cjs +28 -0
- package/lib-commonjs/components/Skeleton/useSkeletonStyles.styles.raw.css.cjs.map +1 -0
- package/lib-commonjs/components/SkeletonItem/SkeletonItem.cjs.map +1 -1
- package/lib-commonjs/components/SkeletonItem/SkeletonItem.module.css +224 -0
- package/lib-commonjs/components/SkeletonItem/SkeletonItem.types.cjs.map +1 -1
- package/lib-commonjs/components/SkeletonItem/index.cjs +7 -7
- package/lib-commonjs/components/SkeletonItem/index.cjs.map +1 -1
- package/lib-commonjs/components/SkeletonItem/renderSkeletonItem.cjs.map +1 -1
- package/lib-commonjs/components/SkeletonItem/useSkeletonItem.cjs +3 -3
- package/lib-commonjs/components/SkeletonItem/useSkeletonItem.cjs.map +1 -1
- package/lib-commonjs/components/SkeletonItem/useSkeletonItemStyles.styles.cjs +3 -3
- package/lib-commonjs/components/SkeletonItem/useSkeletonItemStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/SkeletonItem/useSkeletonItemStyles.styles.css.cjs +28 -0
- package/lib-commonjs/components/SkeletonItem/useSkeletonItemStyles.styles.css.cjs.map +1 -0
- package/lib-commonjs/components/SkeletonItem/useSkeletonItemStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/SkeletonItem/useSkeletonItemStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/SkeletonItem/useSkeletonItemStyles.styles.raw.css.cjs +28 -0
- package/lib-commonjs/components/SkeletonItem/useSkeletonItemStyles.styles.raw.css.cjs.map +1 -0
- package/lib-commonjs/contexts/SkeletonContext.cjs +3 -3
- package/lib-commonjs/contexts/SkeletonContext.cjs.map +1 -1
- package/lib-commonjs/contexts/index.cjs +3 -3
- package/lib-commonjs/contexts/index.cjs.map +1 -1
- package/lib-commonjs/index.cjs +16 -16
- package/lib-commonjs/index.cjs.map +1 -1
- package/package.json +11 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,21 +1,31 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-skeleton
|
|
2
2
|
|
|
3
|
-
<!-- This log was last generated on
|
|
3
|
+
<!-- This log was last generated on Sat, 31 Oct 2026 11:08:55 GMT and should not be manually modified. -->
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
-
## [9.
|
|
7
|
+
## [9.75.0-experimental.css-modules.20261031-810ab07afb.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-skeleton_v9.75.0-experimental.css-modules.20261031-810ab07afb.0)
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Sat, 31 Oct 2026 11:08:55 GMT
|
|
10
10
|
|
|
11
11
|
### Changes
|
|
12
12
|
|
|
13
|
-
- Release 9.
|
|
14
|
-
- Bump @fluentui/react-field to v9.
|
|
15
|
-
- Bump @fluentui/react-jsx-runtime to v9.
|
|
16
|
-
- Bump @fluentui/react-shared-contexts to v9.
|
|
17
|
-
- Bump @fluentui/react-theme to v9.
|
|
18
|
-
- Bump @fluentui/react-utilities to v9.
|
|
13
|
+
- Release 9.75.0-experimental.css-modules.20261031-810ab07afb ([commit](https://github.com/microsoft/fluentui/commit/undefined) by 257645319+office-ogx-auth-helper[bot]@users.noreply.github.com)
|
|
14
|
+
- Bump @fluentui/react-field to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
15
|
+
- Bump @fluentui/react-jsx-runtime to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
16
|
+
- Bump @fluentui/react-shared-contexts to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
17
|
+
- Bump @fluentui/react-theme to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
18
|
+
- Bump @fluentui/react-utilities to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
19
|
+
|
|
20
|
+
## [9.7.7](https://github.com/microsoft/fluentui/tree/@fluentui/react-skeleton_v9.7.7)
|
|
21
|
+
|
|
22
|
+
Mon, 19 Oct 2026 16:49:01 GMT
|
|
23
|
+
|
|
24
|
+
### Patches
|
|
25
|
+
|
|
26
|
+
- Bump @fluentui/react-field to v9.5.6 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
27
|
+
- Bump @fluentui/react-jsx-runtime to v9.4.7 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
28
|
+
- Bump @fluentui/react-utilities to v9.27.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
19
29
|
|
|
20
30
|
## [9.7.6](https://github.com/microsoft/fluentui/tree/@fluentui/react-skeleton_v9.7.6)
|
|
21
31
|
|
package/README.md
CHANGED
|
@@ -9,3 +9,9 @@ To import `Skeleton`:
|
|
|
9
9
|
```js
|
|
10
10
|
import { Skeleton, SkeletonItem } from '@fluentui/react-components';
|
|
11
11
|
```
|
|
12
|
+
|
|
13
|
+
## Opt-in CSS Modules styles
|
|
14
|
+
|
|
15
|
+
CSS Modules alternatives are available for `Skeleton`, `SkeletonItem`. The default exports and component imports continue to use Griffel.
|
|
16
|
+
|
|
17
|
+
To opt in, configure your bundler to replace each `use<Component>Styles.styles.js` module with its adjacent `use<Component>Styles.styles.css.js` alternative (or `.styles.ts` with `.styles.css.ts` for source builds). Apply the replacement consistently to client and server bundles. The CSS loader must provide a default class-name map and retain the adjacent `.module.css` asset, including CSS from dependencies. All component rules are in `@layer fluentui` and use the theme custom properties supplied by `FluentProvider`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Skeleton/Skeleton.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useSkeleton_unstable } from './useSkeleton';\nimport { renderSkeleton_unstable } from './renderSkeleton';\nimport { useSkeletonStyles_unstable } from './useSkeletonStyles.styles';\nimport { useSkeletonContextValues } from './useSkeletonContextValues';\nimport type { SkeletonProps } from './Skeleton.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * Skeleton component - TODO: add more docs\n */\nexport const Skeleton: ForwardRefComponent<SkeletonProps> = React.forwardRef((props, ref) => {\n const state = useSkeleton_unstable(props, ref);\n const contextValues = useSkeletonContextValues(state);\n\n useSkeletonStyles_unstable(state);\n useCustomStyleHook_unstable('useSkeletonStyles_unstable')(state);\n\n return renderSkeleton_unstable(state, contextValues);\n});\n\nSkeleton.displayName = 'Skeleton';\n"],"names":["React","useSkeleton_unstable","renderSkeleton_unstable","useSkeletonStyles_unstable","useSkeletonContextValues","useCustomStyleHook_unstable","Skeleton","forwardRef","props","ref","state","contextValues","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,oBAAoB,QAAQ,mBAAgB;AACrD,SAASC,uBAAuB,QAAQ,sBAAmB;AAC3D,SAASC,0BAA0B,QAAQ,gCAA6B;AACxE,SAASC,wBAAwB,QAAQ,gCAA6B;AAGtE,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,yBAA+CN,MAAMO,UAAU,CAAC,CAACC,OAAOC;IACnF,MAAMC,QAAQT,qBAAqBO,OAAOC;IAC1C,MAAME,gBAAgBP,yBAAyBM;IAE/CP,2BAA2BO;IAC3BL,4BAA4B,8BAA8BK;IAE1D,OAAOR,wBAAwBQ,OAAOC;AACxC,GAAG;AAEHL,SAASM,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Skeleton/Skeleton.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { SkeletonContextValue } from '../../contexts/index';\n\nexport type SkeletonSlots = {\n /**\n * The root slot of the `Skeleton` is the container that will contain the slots that make up a `Skeleton`\n * and any data that the `Skeleton` will load. The default html element is a `div`.\n */\n root: NonNullable<Slot<'div', 'span'>>;\n};\n\n/**\n * Sizes for the SkeletonItem\n */\nexport type SkeletonItemSize =\n | 8\n | 12\n | 14\n | 16\n | 20\n | 22\n | 24\n | 28\n | 32\n | 36\n | 40\n | 48\n | 52\n | 56\n | 64\n | 72\n | 92\n | 96\n | 120\n | 128;\n\n/**\n * Skeleton Props\n */\nexport type SkeletonProps = Omit<ComponentProps<Partial<SkeletonSlots>>, 'width'> & {\n /**\n * The animation type for the Skeleton\n * @defaultValue wave\n */\n animation?: 'wave' | 'pulse';\n\n /**\n * Sets the appearance of the Skeleton.\n * @defaultValue opaque\n */\n appearance?: 'opaque' | 'translucent';\n\n /**\n * Sets the width value of the skeleton wrapper.\n * @defaultValue 100%\n * @deprecated Use `className` prop to set width\n */\n width?: number | string;\n\n /**\n * Sets the size of the SkeletonItems inside the Skeleton in pixels.\n * Size is restricted to a limited set of values recommended for most uses (see SkeletonItemSize).\n * This value can be overridden by the individual SkeletonItem's `size` prop.\n */\n size?: SkeletonItemSize;\n\n /**\n * Sets the shape of the SkeletonItems inside the Skeleton.\n * This value can be overridden by the individual SkeletonItem's `shape` prop.\n */\n shape?: 'circle' | 'square' | 'rectangle';\n};\n\n/**\n * Skeleton base props, excluding design-related props like animation and appearance.\n */\nexport type SkeletonBaseProps = Omit<SkeletonProps, 'animation' | 'appearance'>;\n\nexport type SkeletonContextValues = {\n skeletonGroup: SkeletonContextValue;\n};\n\n/**\n * State used in rendering Skeleton\n */\nexport type SkeletonState = ComponentState<SkeletonSlots> &\n Required<Pick<SkeletonProps, 'animation' | 'appearance'>> &\n Pick<SkeletonProps, 'size' | 'shape'>;\n\n/**\n * Skeleton base state, excluding design-related state like animation and appearance.\n */\nexport type SkeletonBaseState = Omit<SkeletonState, 'animation' | 'appearance' | 'size' | 'shape'>;\n"],"names":[],"mappings":"AAyFA;;CAEC,GACD,WAAmG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Skeleton/index.ts"],"sourcesContent":["export { Skeleton } from './Skeleton';\nexport type {\n SkeletonBaseProps,\n SkeletonBaseState,\n SkeletonContextValues,\n SkeletonItemSize,\n SkeletonProps,\n SkeletonSlots,\n SkeletonState,\n} from './Skeleton.types';\nexport { renderSkeleton_unstable } from './renderSkeleton';\nexport { useSkeleton_unstable, useSkeletonBase_unstable } from './useSkeleton';\nexport { useSkeletonContextValues } from './useSkeletonContextValues';\nexport { skeletonClassNames, useSkeletonStyles_unstable } from './useSkeletonStyles.styles';\n"],"names":["Skeleton","renderSkeleton_unstable","useSkeleton_unstable","useSkeletonBase_unstable","useSkeletonContextValues","skeletonClassNames","useSkeletonStyles_unstable"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,gBAAa;AAUtC,SAASC,uBAAuB,QAAQ,sBAAmB;AAC3D,SAASC,oBAAoB,EAAEC,wBAAwB,QAAQ,mBAAgB;AAC/E,SAASC,wBAAwB,QAAQ,gCAA6B;AACtE,SAASC,kBAAkB,EAAEC,0BAA0B,QAAQ,gCAA6B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import { assertSlots } from "@fluentui/react-utilities";
|
|
1
|
+
import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
|
|
2
|
+
import { assertSlots } from "@fluentui/react-utilities";
|
|
3
3
|
import { SkeletonContextProvider } from "../../contexts/SkeletonContext.js";
|
|
4
4
|
/**
|
|
5
5
|
* Render the final JSX of Skeleton
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Skeleton/renderSkeleton.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport { SkeletonContextProvider } from '../../contexts/SkeletonContext';\nimport type { SkeletonContextValues, SkeletonSlots, SkeletonBaseState } from './Skeleton.types';\n\n/**\n * Render the final JSX of Skeleton\n */\nexport const renderSkeleton_unstable = (state: SkeletonBaseState, contextValues: SkeletonContextValues): JSXElement => {\n assertSlots<SkeletonSlots>(state);\n\n return (\n <SkeletonContextProvider value={contextValues.skeletonGroup}>\n <state.root />\n </SkeletonContextProvider>\n );\n};\n"],"names":["assertSlots","SkeletonContextProvider","renderSkeleton_unstable","state","contextValues","value","skeletonGroup","root"],"mappings":";AAAA,0BAA0B,GAC1B,iDAAiD,GAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAExD,SAASC,uBAAuB,QAAQ,oCAAiC;AAGzE;;CAEC,GACD,OAAO,MAAMC,0BAA0B,CAACC,OAA0BC;IAChEJ,YAA2BG;IAE3B,qBACE,KAACF;QAAwBI,OAAOD,cAAcE,aAAa;kBACzD,cAAA,KAACH,MAAMI,IAAI;;AAGjB,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Skeleton/useSkeleton.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport type { SkeletonBaseProps, SkeletonBaseState, SkeletonProps, SkeletonState } from './Skeleton.types';\nimport { useSkeletonContext } from '../../contexts/SkeletonContext';\n\n/**\n * Create the state required to render Skeleton.\n *\n * The returned state can be modified with hooks such as useSkeletonStyles_unstable,\n * before being passed to renderSkeleton_unstable.\n *\n * @param props - props from this instance of Skeleton\n * @param ref - reference to root HTMLElement of Skeleton\n */\nexport const useSkeleton_unstable = (props: SkeletonProps, ref: React.Ref<HTMLElement>): SkeletonState => {\n const { animation: contextAnimation, appearance: contextAppearance } = useSkeletonContext();\n const {\n animation = contextAnimation ?? 'wave',\n appearance = contextAppearance ?? 'opaque',\n size,\n shape,\n ...baseProps\n } = props;\n\n const baseState = useSkeletonBase_unstable(baseProps, ref as React.Ref<HTMLDivElement>);\n\n return {\n ...baseState,\n animation,\n appearance,\n size,\n shape,\n };\n};\n\n/**\n * Base hook for Skeleton component, which manages state related to slots structure and ARIA attributes.\n *\n * @param props - User provided props to the Skeleton component.\n * @param ref - User provided ref to be passed to the Skeleton component.\n */\nexport const useSkeletonBase_unstable = (\n props: SkeletonBaseProps,\n ref: React.Ref<HTMLDivElement>,\n): SkeletonBaseState => {\n const root = slot.always(\n getIntrinsicElementProps('div', {\n ref,\n role: 'progressbar',\n 'aria-busy': true,\n ...props,\n }),\n { elementType: 'div' },\n );\n return { components: { root: 'div' }, root };\n};\n"],"names":["getIntrinsicElementProps","slot","useSkeletonContext","useSkeleton_unstable","props","ref","animation","contextAnimation","appearance","contextAppearance","size","shape","baseProps","baseState","useSkeletonBase_unstable","root","always","role","elementType","components"],"mappings":"AAAA;AAGA,SAASA,wBAAwB,EAAEC,IAAI,QAAQ,4BAA4B;AAE3E,SAASC,kBAAkB,QAAQ,oCAAiC;AAEpE;;;;;;;;CAQC,GACD,OAAO,MAAMC,uBAAuB,CAACC,OAAsBC;IACzD,MAAM,EAAEC,WAAWC,gBAAgB,EAAEC,YAAYC,iBAAiB,EAAE,GAAGP;IACvE,MAAM,EACJI,YAAYC,6BAAAA,8BAAAA,mBAAoB,MAAM,EACtCC,aAAaC,8BAAAA,+BAAAA,oBAAqB,QAAQ,EAC1CC,IAAI,EACJC,KAAK,EACL,GAAGC,WACJ,GAAGR;IAEJ,MAAMS,YAAYC,yBAAyBF,WAAWP;IAEtD,OAAO;QACL,GAAGQ,SAAS;QACZP;QACAE;QACAE;QACAC;IACF;AACF,EAAE;AAEF;;;;;CAKC,GACD,OAAO,MAAMG,2BAA2B,CACtCV,OACAC;IAEA,MAAMU,OAAOd,KAAKe,MAAM,CACtBhB,yBAAyB,OAAO;QAC9BK;QACAY,MAAM;QACN,aAAa;QACb,GAAGb,KAAK;IACV,IACA;QAAEc,aAAa;IAAM;IAEvB,OAAO;QAAEC,YAAY;YAAEJ,MAAM;QAAM;QAAGA;IAAK;AAC7C,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Skeleton/useSkeletonContextValues.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { SkeletonContextValues, SkeletonState } from '../Skeleton';\n\nexport const useSkeletonContextValues = (state: SkeletonState): SkeletonContextValues => {\n const { animation, appearance, size, shape } = state;\n\n const skeletonGroup = React.useMemo(\n () => ({\n animation,\n appearance,\n size,\n shape,\n }),\n [animation, appearance, size, shape],\n );\n\n return { skeletonGroup };\n};\n"],"names":["React","useSkeletonContextValues","state","animation","appearance","size","shape","skeletonGroup","useMemo"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAG/B,OAAO,MAAMC,2BAA2B,CAACC;IACvC,MAAM,EAAEC,SAAS,EAAEC,UAAU,EAAEC,IAAI,EAAEC,KAAK,EAAE,GAAGJ;IAE/C,MAAMK,gBAAgBP,MAAMQ,OAAO,CACjC,IAAO,CAAA;YACLL;YACAC;YACAC;YACAC;QACF,CAAA,GACA;QAACH;QAAWC;QAAYC;QAAMC;KAAM;IAGtC,OAAO;QAAEC;IAAc;AACzB,EAAE"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { clsx } from "clsx";
|
|
2
|
+
import styles from "./Skeleton.module.css";
|
|
3
|
+
export const skeletonClassNames = {
|
|
4
|
+
root: 'fui-Skeleton'
|
|
5
|
+
};
|
|
6
|
+
export const useSkeletonStyles_unstable = (state)=>{
|
|
7
|
+
state.root.className = clsx(skeletonClassNames.root, state.root.as === 'span' && styles.block, state.root.className);
|
|
8
|
+
return state;
|
|
9
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Skeleton/useSkeletonStyles.styles.css.ts"],"sourcesContent":["import { clsx } from 'clsx';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { SkeletonState, SkeletonSlots } from './Skeleton.types';\nimport styles from './Skeleton.module.css';\n\nexport const skeletonClassNames: SlotClassNames<SkeletonSlots> = {\n root: 'fui-Skeleton',\n};\n\nexport const useSkeletonStyles_unstable = (state: SkeletonState): SkeletonState => {\n state.root.className = clsx(skeletonClassNames.root, state.root.as === 'span' && styles.block, state.root.className);\n return state;\n};\n"],"names":["clsx","styles","skeletonClassNames","root","useSkeletonStyles_unstable","state","className","as","block"],"mappings":"AAAA,SAASA,IAAI,QAAQ,OAAO;AAG5B,OAAOC,YAAY,wBAAwB;AAE3C,OAAO,MAAMC,qBAAoD;IAC/DC,MAAM;AACR,EAAE;AAEF,OAAO,MAAMC,6BAA6B,CAACC;IACzCA,MAAMF,IAAI,CAACG,SAAS,GAAGN,KAAKE,mBAAmBC,IAAI,EAAEE,MAAMF,IAAI,CAACI,EAAE,KAAK,UAAUN,OAAOO,KAAK,EAAEH,MAAMF,IAAI,CAACG,SAAS;IACnH,OAAOD;AACT,EAAE"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { clsx } from "clsx";
|
|
2
|
+
import styles from "./Skeleton.module.css";
|
|
3
|
+
export const skeletonClassNames = {
|
|
4
|
+
root: 'fui-Skeleton'
|
|
5
|
+
};
|
|
6
|
+
export const useSkeletonStyles_unstable = (state)=>{
|
|
7
|
+
state.root.className = clsx(skeletonClassNames.root, state.root.as === 'span' && styles.block, state.root.className);
|
|
8
|
+
return state;
|
|
9
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Skeleton/useSkeletonStyles.styles.css.ts"],"sourcesContent":["import { clsx } from 'clsx';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { SkeletonState, SkeletonSlots } from './Skeleton.types';\nimport styles from './Skeleton.module.css';\n\nexport const skeletonClassNames: SlotClassNames<SkeletonSlots> = {\n root: 'fui-Skeleton',\n};\n\nexport const useSkeletonStyles_unstable = (state: SkeletonState): SkeletonState => {\n state.root.className = clsx(skeletonClassNames.root, state.root.as === 'span' && styles.block, state.root.className);\n return state;\n};\n"],"names":["clsx","styles","skeletonClassNames","root","useSkeletonStyles_unstable","state","className","as","block"],"mappings":"AAAA,SAASA,IAAI,QAAQ,OAAO;AAG5B,OAAOC,YAAY,wBAAwB;AAE3C,OAAO,MAAMC,qBAAoD;IAC/DC,MAAM;AACR,EAAE;AAEF,OAAO,MAAMC,6BAA6B,CAACC;IACzCA,MAAMF,IAAI,CAACG,SAAS,GAAGN,KAAKE,mBAAmBC,IAAI,EAAEE,MAAMF,IAAI,CAACI,EAAE,KAAK,UAAUN,OAAOO,KAAK,EAAEH,MAAMF,IAAI,CAACG,SAAS;IACnH,OAAOD;AACT,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Skeleton/useSkeletonStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport type { SkeletonSlots, SkeletonState } from './Skeleton.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nexport const skeletonClassNames: SlotClassNames<SkeletonSlots> = {\n root: 'fui-Skeleton',\n};\n\nconst useStyles = makeStyles({\n blockStyling: {\n display: 'block',\n },\n});\n\n/**\n * Apply styling to the Skeleton slots based on the state\n */\nexport const useSkeletonStyles_unstable = (state: SkeletonState): SkeletonState => {\n const styles = useStyles();\n\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(\n skeletonClassNames.root,\n state.root.as === 'span' && styles.blockStyling,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","skeletonClassNames","root","useStyles","blockStyling","display","useSkeletonStyles_unstable","state","styles","className","as"],"mappings":"AAAA;AAEA,SAASA,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAG1D,OAAO,MAAMC,qBAAoD;IAC/DC,MAAM;AACR,EAAE;AAEF,MAAMC,YAAYJ,WAAW;IAC3BK,cAAc;QACZC,SAAS;IACX;AACF;AAEA;;CAEC,GACD,OAAO,MAAMC,6BAA6B,CAACC;IACzC,MAAMC,SAASL;IAEf,oDAAoD;IACpDI,MAAML,IAAI,CAACO,SAAS,GAAGT,aACrBC,mBAAmBC,IAAI,EACvBK,MAAML,IAAI,CAACQ,EAAE,KAAK,UAAUF,OAAOJ,YAAY,EAC/CG,MAAML,IAAI,CAACO,SAAS;IAGtB,OAAOF;AACT,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/SkeletonItem/SkeletonItem.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useSkeletonItem_unstable } from './useSkeletonItem';\nimport { renderSkeletonItem_unstable } from './renderSkeletonItem';\nimport { useSkeletonItemStyles_unstable } from './useSkeletonItemStyles.styles';\nimport type { SkeletonItemProps } from './SkeletonItem.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\nexport const SkeletonItem: ForwardRefComponent<SkeletonItemProps> = React.forwardRef((props, ref) => {\n const state = useSkeletonItem_unstable(props, ref);\n\n useSkeletonItemStyles_unstable(state);\n useCustomStyleHook_unstable('useSkeletonItemStyles_unstable')(state);\n\n return renderSkeletonItem_unstable(state);\n});\n\nSkeletonItem.displayName = 'SkeletonItem';\n"],"names":["React","useSkeletonItem_unstable","renderSkeletonItem_unstable","useSkeletonItemStyles_unstable","useCustomStyleHook_unstable","SkeletonItem","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,QAAQ,uBAAoB;AAC7D,SAASC,2BAA2B,QAAQ,0BAAuB;AACnE,SAASC,8BAA8B,QAAQ,oCAAiC;AAGhF,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E,OAAO,MAAMC,6BAAuDL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IAC3F,MAAMC,QAAQR,yBAAyBM,OAAOC;IAE9CL,+BAA+BM;IAC/BL,4BAA4B,kCAAkCK;IAE9D,OAAOP,4BAA4BO;AACrC,GAAG;AAEHJ,aAAaK,WAAW,GAAG"}
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
@layer fluentui {
|
|
2
|
+
.root::after {
|
|
3
|
+
content: '';
|
|
4
|
+
display: block;
|
|
5
|
+
position: absolute;
|
|
6
|
+
inset: 0;
|
|
7
|
+
animation-iteration-count: infinite;
|
|
8
|
+
animation-duration: 3s;
|
|
9
|
+
animation-timing-function: ease-in-out;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.root {
|
|
13
|
+
position: relative;
|
|
14
|
+
overflow: hidden;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.block {
|
|
18
|
+
display: block;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.wave::after {
|
|
22
|
+
animation-name: animation1;
|
|
23
|
+
background-image: linear-gradient(
|
|
24
|
+
to right,
|
|
25
|
+
var(--colorNeutralStencil1) 0%,
|
|
26
|
+
var(--colorNeutralStencil2) 50%,
|
|
27
|
+
var(--colorNeutralStencil1) 100%
|
|
28
|
+
);
|
|
29
|
+
transform: translate(-100%);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.wave:where(:dir(rtl))::after {
|
|
33
|
+
animation-name: animation1RTL;
|
|
34
|
+
background-image: linear-gradient(
|
|
35
|
+
to left,
|
|
36
|
+
var(--colorNeutralStencil1) 0%,
|
|
37
|
+
var(--colorNeutralStencil2) 50%,
|
|
38
|
+
var(--colorNeutralStencil1) 100%
|
|
39
|
+
);
|
|
40
|
+
transform: translate(100%);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.wave {
|
|
44
|
+
background-color: var(--colorNeutralStencil1);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.pulse::after {
|
|
48
|
+
animation-name: animation2;
|
|
49
|
+
animation-duration: 1s;
|
|
50
|
+
background-color: var(--colorNeutralStencil1);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.translucent::after {
|
|
54
|
+
background-image: linear-gradient(to right, transparent 0%, var(--colorNeutralStencil1Alpha) 50%, transparent 100%);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.translucent:where(:dir(rtl))::after {
|
|
58
|
+
background-image: linear-gradient(to left, transparent 0%, var(--colorNeutralStencil1Alpha) 50%, transparent 100%);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.translucent {
|
|
62
|
+
background-color: var(--colorNeutralStencil1Alpha);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.pulse:where(.translucent)::after {
|
|
66
|
+
background-color: var(--colorNeutralStencil1Alpha);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.pulse:where(.translucent) {
|
|
70
|
+
/* Griffel drops the translucent root color for this combination. */
|
|
71
|
+
background-color: transparent;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.rectangle {
|
|
75
|
+
width: 100%;
|
|
76
|
+
border-radius: var(--borderRadiusMedium);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.size8 {
|
|
80
|
+
--fui-SkeletonItem--size: var(--spacingHorizontalS);
|
|
81
|
+
height: var(--spacingHorizontalS);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.size12 {
|
|
85
|
+
--fui-SkeletonItem--size: var(--spacingHorizontalM);
|
|
86
|
+
height: var(--spacingHorizontalM);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.size14 {
|
|
90
|
+
--fui-SkeletonItem--size: calc(var(--spacingHorizontalXS) * 3.5);
|
|
91
|
+
height: calc(var(--spacingHorizontalXS) * 3.5);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.size16 {
|
|
95
|
+
--fui-SkeletonItem--size: var(--spacingHorizontalL);
|
|
96
|
+
height: var(--spacingHorizontalL);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.size20 {
|
|
100
|
+
--fui-SkeletonItem--size: var(--spacingHorizontalXL);
|
|
101
|
+
height: var(--spacingHorizontalXL);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.size22 {
|
|
105
|
+
--fui-SkeletonItem--size: calc(var(--spacingHorizontalXS) * 5.5);
|
|
106
|
+
height: calc(var(--spacingHorizontalXS) * 5.5);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.size24 {
|
|
110
|
+
--fui-SkeletonItem--size: var(--spacingHorizontalXXL);
|
|
111
|
+
height: var(--spacingHorizontalXXL);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.size28 {
|
|
115
|
+
--fui-SkeletonItem--size: calc(var(--spacingHorizontalXS) * 7);
|
|
116
|
+
height: calc(var(--spacingHorizontalXS) * 7);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.size32 {
|
|
120
|
+
--fui-SkeletonItem--size: var(--spacingHorizontalXXXL);
|
|
121
|
+
height: var(--spacingHorizontalXXXL);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.size36 {
|
|
125
|
+
--fui-SkeletonItem--size: calc(var(--spacingHorizontalXS) * 9);
|
|
126
|
+
height: calc(var(--spacingHorizontalXS) * 9);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.size40 {
|
|
130
|
+
--fui-SkeletonItem--size: calc(var(--spacingHorizontalXS) * 10);
|
|
131
|
+
height: calc(var(--spacingHorizontalXS) * 10);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.size48 {
|
|
135
|
+
--fui-SkeletonItem--size: calc(var(--spacingHorizontalXS) * 12);
|
|
136
|
+
height: calc(var(--spacingHorizontalXS) * 12);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.size52 {
|
|
140
|
+
--fui-SkeletonItem--size: calc(var(--spacingHorizontalXS) * 13);
|
|
141
|
+
height: calc(var(--spacingHorizontalXS) * 13);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.size56 {
|
|
145
|
+
--fui-SkeletonItem--size: calc(var(--spacingHorizontalXS) * 14);
|
|
146
|
+
height: calc(var(--spacingHorizontalXS) * 14);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.size64 {
|
|
150
|
+
--fui-SkeletonItem--size: calc(var(--spacingHorizontalXS) * 16);
|
|
151
|
+
height: calc(var(--spacingHorizontalXS) * 16);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.size72 {
|
|
155
|
+
--fui-SkeletonItem--size: calc(var(--spacingHorizontalXS) * 18);
|
|
156
|
+
height: calc(var(--spacingHorizontalXS) * 18);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.size92 {
|
|
160
|
+
--fui-SkeletonItem--size: calc(var(--spacingHorizontalXS) * 23);
|
|
161
|
+
height: calc(var(--spacingHorizontalXS) * 23);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.size96 {
|
|
165
|
+
--fui-SkeletonItem--size: calc(var(--spacingHorizontalXS) * 24);
|
|
166
|
+
height: calc(var(--spacingHorizontalXS) * 24);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.size120 {
|
|
170
|
+
--fui-SkeletonItem--size: calc(var(--spacingHorizontalXS) * 30);
|
|
171
|
+
height: calc(var(--spacingHorizontalXS) * 30);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.size128 {
|
|
175
|
+
--fui-SkeletonItem--size: calc(var(--spacingHorizontalXS) * 32);
|
|
176
|
+
height: calc(var(--spacingHorizontalXS) * 32);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.square,
|
|
180
|
+
.circle {
|
|
181
|
+
width: var(--fui-SkeletonItem--size);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.circle {
|
|
185
|
+
border-radius: 50%;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
@media screen and (prefers-reduced-motion: reduce) {
|
|
189
|
+
.root::after {
|
|
190
|
+
animation-duration: 0.01ms;
|
|
191
|
+
animation-iteration-count: 1;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
@media screen and (forced-colors: active) {
|
|
196
|
+
.wave::after {
|
|
197
|
+
background-color: WindowText;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
@keyframes animation1 {
|
|
202
|
+
to {
|
|
203
|
+
transform: translate(100%);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
@keyframes animation1RTL {
|
|
208
|
+
to {
|
|
209
|
+
transform: translate(-100%);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
@keyframes animation2 {
|
|
214
|
+
0% {
|
|
215
|
+
opacity: 1;
|
|
216
|
+
}
|
|
217
|
+
50% {
|
|
218
|
+
opacity: 0.4;
|
|
219
|
+
}
|
|
220
|
+
100% {
|
|
221
|
+
opacity: 1;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/SkeletonItem/SkeletonItem.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { SkeletonProps } from '../Skeleton/Skeleton.types';\n\nexport type SkeletonItemSlots = {\n root: Slot<'div', 'span'>;\n};\n\n/**\n * SkeletonItem Props\n */\nexport type SkeletonItemProps = ComponentProps<SkeletonItemSlots> &\n Pick<SkeletonProps, 'size' | 'shape'> & {\n /**\n * Sets the animation of the SkeletonItem\n * @default wave\n */\n animation?: 'wave' | 'pulse';\n\n /**\n * Sets the appearance of the SkeletonItem\n * @default opaque\n */\n appearance?: 'opaque' | 'translucent';\n };\n\n/**\n * SkeletonItem base props, excluding design-related props like animation, appearance, size, and shape.\n */\nexport type SkeletonItemBaseProps = Omit<SkeletonItemProps, 'animation' | 'appearance' | 'size' | 'shape'>;\n\n/**\n * State used in rendering SkeletonItem\n */\nexport type SkeletonItemState = ComponentState<SkeletonItemSlots> &\n Required<Pick<SkeletonItemProps, 'animation' | 'appearance' | 'size' | 'shape'>>;\n\n/**\n * SkeletonItem base state, excluding design-related state like animation, appearance, size, and shape.\n */\nexport type SkeletonItemBaseState = Omit<SkeletonItemState, 'animation' | 'appearance' | 'size' | 'shape'>;\n"],"names":[],"mappings":"AAoCA;;CAEC,GACD,WAA2G"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/SkeletonItem/index.ts"],"sourcesContent":["export { SkeletonItem } from './SkeletonItem';\nexport type {\n SkeletonItemBaseProps,\n SkeletonItemBaseState,\n SkeletonItemProps,\n SkeletonItemSlots,\n SkeletonItemState,\n} from './SkeletonItem.types';\nexport { renderSkeletonItem_unstable } from './renderSkeletonItem';\nexport { useSkeletonItem_unstable, useSkeletonItemBase_unstable } from './useSkeletonItem';\nexport { skeletonItemClassNames, useSkeletonItemStyles_unstable } from './useSkeletonItemStyles.styles';\n"],"names":["SkeletonItem","renderSkeletonItem_unstable","useSkeletonItem_unstable","useSkeletonItemBase_unstable","skeletonItemClassNames","useSkeletonItemStyles_unstable"],"mappings":"AAAA,SAASA,YAAY,QAAQ,oBAAiB;AAQ9C,SAASC,2BAA2B,QAAQ,0BAAuB;AACnE,SAASC,wBAAwB,EAAEC,4BAA4B,QAAQ,uBAAoB;AAC3F,SAASC,sBAAsB,EAAEC,8BAA8B,QAAQ,oCAAiC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import { assertSlots } from "@fluentui/react-utilities";
|
|
1
|
+
import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
|
|
2
|
+
import { assertSlots } from "@fluentui/react-utilities";
|
|
3
3
|
/**
|
|
4
4
|
* Render the final JSX of SkeletonItem
|
|
5
5
|
*/ export const renderSkeletonItem_unstable = (state)=>{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/SkeletonItem/renderSkeletonItem.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { SkeletonItemBaseState, SkeletonItemSlots } from './SkeletonItem.types';\n\n/**\n * Render the final JSX of SkeletonItem\n */\nexport const renderSkeletonItem_unstable = (state: SkeletonItemBaseState): JSXElement => {\n assertSlots<SkeletonItemSlots>(state);\n\n return <state.root />;\n};\n"],"names":["assertSlots","renderSkeletonItem_unstable","state","root"],"mappings":";AAAA,0BAA0B,GAC1B,iDAAiD,GAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAIxD;;CAEC,GACD,OAAO,MAAMC,8BAA8B,CAACC;IAC1CF,YAA+BE;IAE/B,qBAAO,KAACA,MAAMC,IAAI;AACpB,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/SkeletonItem/useSkeletonItem.tsx"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport { useSkeletonContext } from '../../contexts/SkeletonContext';\nimport type {\n SkeletonItemBaseProps,\n SkeletonItemBaseState,\n SkeletonItemProps,\n SkeletonItemState,\n} from './SkeletonItem.types';\n\n/**\n * Create the state required to render SkeletonItem.\n *\n * The returned state can be modified with hooks such as useSkeletonItemStyles_unstable,\n * before being passed to renderSkeletonItem_unstable.\n *\n * @param props - props from this instance of SkeletonItem\n * @param ref - reference to root HTMLElement of SkeletonItem\n */\nexport const useSkeletonItem_unstable = (props: SkeletonItemProps, ref: React.Ref<HTMLElement>): SkeletonItemState => {\n const {\n animation: contextAnimation,\n appearance: contextAppearance,\n size: contextSize,\n shape: contextShape,\n } = useSkeletonContext();\n const {\n animation = contextAnimation ?? 'wave',\n appearance = contextAppearance ?? 'opaque',\n size = contextSize ?? 16,\n shape = contextShape ?? 'rectangle',\n ...baseProps\n } = props;\n\n const baseState = useSkeletonItemBase_unstable(baseProps, ref as React.Ref<HTMLDivElement>);\n\n return {\n ...baseState,\n animation,\n appearance,\n size,\n shape,\n };\n};\n\n/**\n * Base hook for SkeletonItem component, which manages state related to slots structure.\n *\n * @param props - User provided props to the SkeletonItem component.\n * @param ref - User provided ref to be passed to the SkeletonItem component.\n */\nexport const useSkeletonItemBase_unstable = (\n props: SkeletonItemBaseProps,\n ref: React.Ref<HTMLDivElement>,\n): SkeletonItemBaseState => {\n const root = slot.always(\n getIntrinsicElementProps('div', {\n ref,\n ...props,\n }),\n { elementType: 'div' },\n );\n return { components: { root: 'div' }, root };\n};\n"],"names":["getIntrinsicElementProps","slot","useSkeletonContext","useSkeletonItem_unstable","props","ref","animation","contextAnimation","appearance","contextAppearance","size","contextSize","shape","contextShape","baseProps","baseState","useSkeletonItemBase_unstable","root","always","elementType","components"],"mappings":"AAAA;AAGA,SAASA,wBAAwB,EAAEC,IAAI,QAAQ,4BAA4B;AAC3E,SAASC,kBAAkB,QAAQ,oCAAiC;AAQpE;;;;;;;;CAQC,GACD,OAAO,MAAMC,2BAA2B,CAACC,OAA0BC;IACjE,MAAM,EACJC,WAAWC,gBAAgB,EAC3BC,YAAYC,iBAAiB,EAC7BC,MAAMC,WAAW,EACjBC,OAAOC,YAAY,EACpB,GAAGX;IACJ,MAAM,EACJI,YAAYC,6BAAAA,8BAAAA,mBAAoB,MAAM,EACtCC,aAAaC,8BAAAA,+BAAAA,oBAAqB,QAAQ,EAC1CC,OAAOC,wBAAAA,yBAAAA,cAAe,EAAE,EACxBC,QAAQC,yBAAAA,0BAAAA,eAAgB,WAAW,EACnC,GAAGC,WACJ,GAAGV;IAEJ,MAAMW,YAAYC,6BAA6BF,WAAWT;IAE1D,OAAO;QACL,GAAGU,SAAS;QACZT;QACAE;QACAE;QACAE;IACF;AACF,EAAE;AAEF;;;;;CAKC,GACD,OAAO,MAAMI,+BAA+B,CAC1CZ,OACAC;IAEA,MAAMY,OAAOhB,KAAKiB,MAAM,CACtBlB,yBAAyB,OAAO;QAC9BK;QACA,GAAGD,KAAK;IACV,IACA;QAAEe,aAAa;IAAM;IAEvB,OAAO;QAAEC,YAAY;YAAEH,MAAM;QAAM;QAAGA;IAAK;AAC7C,EAAE"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { clsx } from "clsx";
|
|
2
|
+
import styles from "./SkeletonItem.module.css";
|
|
3
|
+
export const skeletonItemClassNames = {
|
|
4
|
+
root: 'fui-SkeletonItem'
|
|
5
|
+
};
|
|
6
|
+
export const useSkeletonItemStyles_unstable = (state)=>{
|
|
7
|
+
state.root.className = clsx(skeletonItemClassNames.root, styles.root, state.root.as === 'span' && styles.block, styles[state.animation], styles[state.appearance], styles[state.shape], styles[`size${state.size}`], state.root.className);
|
|
8
|
+
return state;
|
|
9
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/SkeletonItem/useSkeletonItemStyles.styles.css.ts"],"sourcesContent":["import { clsx } from 'clsx';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { SkeletonItemState, SkeletonItemSlots } from './SkeletonItem.types';\nimport styles from './SkeletonItem.module.css';\n\nexport const skeletonItemClassNames: SlotClassNames<SkeletonItemSlots> = {\n root: 'fui-SkeletonItem',\n};\n\nexport const useSkeletonItemStyles_unstable = (state: SkeletonItemState): SkeletonItemState => {\n state.root.className = clsx(\n skeletonItemClassNames.root,\n styles.root,\n state.root.as === 'span' && styles.block,\n styles[state.animation],\n styles[state.appearance],\n styles[state.shape],\n styles[`size${state.size}`],\n state.root.className,\n );\n return state;\n};\n"],"names":["clsx","styles","skeletonItemClassNames","root","useSkeletonItemStyles_unstable","state","className","as","block","animation","appearance","shape","size"],"mappings":"AAAA,SAASA,IAAI,QAAQ,OAAO;AAG5B,OAAOC,YAAY,4BAA4B;AAE/C,OAAO,MAAMC,yBAA4D;IACvEC,MAAM;AACR,EAAE;AAEF,OAAO,MAAMC,iCAAiC,CAACC;IAC7CA,MAAMF,IAAI,CAACG,SAAS,GAAGN,KACrBE,uBAAuBC,IAAI,EAC3BF,OAAOE,IAAI,EACXE,MAAMF,IAAI,CAACI,EAAE,KAAK,UAAUN,OAAOO,KAAK,EACxCP,MAAM,CAACI,MAAMI,SAAS,CAAC,EACvBR,MAAM,CAACI,MAAMK,UAAU,CAAC,EACxBT,MAAM,CAACI,MAAMM,KAAK,CAAC,EACnBV,MAAM,CAAC,CAAC,IAAI,EAAEI,MAAMO,IAAI,EAAE,CAAC,EAC3BP,MAAMF,IAAI,CAACG,SAAS;IAEtB,OAAOD;AACT,EAAE"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { clsx } from "clsx";
|
|
2
|
+
import styles from "./SkeletonItem.module.css";
|
|
3
|
+
export const skeletonItemClassNames = {
|
|
4
|
+
root: 'fui-SkeletonItem'
|
|
5
|
+
};
|
|
6
|
+
export const useSkeletonItemStyles_unstable = (state)=>{
|
|
7
|
+
state.root.className = clsx(skeletonItemClassNames.root, styles.root, state.root.as === 'span' && styles.block, styles[state.animation], styles[state.appearance], styles[state.shape], styles[`size${state.size}`], state.root.className);
|
|
8
|
+
return state;
|
|
9
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/SkeletonItem/useSkeletonItemStyles.styles.css.ts"],"sourcesContent":["import { clsx } from 'clsx';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { SkeletonItemState, SkeletonItemSlots } from './SkeletonItem.types';\nimport styles from './SkeletonItem.module.css';\n\nexport const skeletonItemClassNames: SlotClassNames<SkeletonItemSlots> = {\n root: 'fui-SkeletonItem',\n};\n\nexport const useSkeletonItemStyles_unstable = (state: SkeletonItemState): SkeletonItemState => {\n state.root.className = clsx(\n skeletonItemClassNames.root,\n styles.root,\n state.root.as === 'span' && styles.block,\n styles[state.animation],\n styles[state.appearance],\n styles[state.shape],\n styles[`size${state.size}`],\n state.root.className,\n );\n return state;\n};\n"],"names":["clsx","styles","skeletonItemClassNames","root","useSkeletonItemStyles_unstable","state","className","as","block","animation","appearance","shape","size"],"mappings":"AAAA,SAASA,IAAI,QAAQ,OAAO;AAG5B,OAAOC,YAAY,4BAA4B;AAE/C,OAAO,MAAMC,yBAA4D;IACvEC,MAAM;AACR,EAAE;AAEF,OAAO,MAAMC,iCAAiC,CAACC;IAC7CA,MAAMF,IAAI,CAACG,SAAS,GAAGN,KACrBE,uBAAuBC,IAAI,EAC3BF,OAAOE,IAAI,EACXE,MAAMF,IAAI,CAACI,EAAE,KAAK,UAAUN,OAAOO,KAAK,EACxCP,MAAM,CAACI,MAAMI,SAAS,CAAC,EACvBR,MAAM,CAACI,MAAMK,UAAU,CAAC,EACxBT,MAAM,CAACI,MAAMM,KAAK,CAAC,EACnBV,MAAM,CAAC,CAAC,IAAI,EAAEI,MAAMO,IAAI,EAAE,CAAC,EAC3BP,MAAMF,IAAI,CAACG,SAAS;IAEtB,OAAOD;AACT,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/SkeletonItem/useSkeletonItemStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport type { SkeletonItemSlots, SkeletonItemState } from './SkeletonItem.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { tokens } from '@fluentui/react-theme';\n\nexport const skeletonItemClassNames: SlotClassNames<SkeletonItemSlots> = {\n root: 'fui-SkeletonItem',\n};\n\nconst skeletonWaveAnimation = {\n to: {\n transform: 'translate(100%)',\n },\n};\n\nconst skeletonPulseAnimation = {\n '0%': {\n opacity: '1',\n },\n '50%': {\n opacity: '0.4',\n },\n '100%': {\n opacity: '1',\n },\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n position: 'relative',\n overflow: 'hidden',\n\n '::after': {\n content: '\"\"',\n display: 'block',\n position: 'absolute',\n inset: '0',\n animationIterationCount: 'infinite',\n animationDuration: '3s',\n animationTimingFunction: 'ease-in-out',\n '@media screen and (prefers-reduced-motion: reduce)': {\n animationDuration: '0.01ms',\n animationIterationCount: '1',\n },\n },\n },\n wave: {\n backgroundColor: tokens.colorNeutralStencil1,\n\n '::after': {\n animationName: skeletonWaveAnimation,\n backgroundImage: `linear-gradient(\n to right,\n ${tokens.colorNeutralStencil1} 0%,\n ${tokens.colorNeutralStencil2} 50%,\n ${tokens.colorNeutralStencil1} 100%)`,\n transform: 'translate(-100%)',\n\n '@media screen and (forced-colors: active)': {\n backgroundColor: 'WindowText',\n },\n },\n },\n pulse: {\n '::after': {\n animationName: skeletonPulseAnimation,\n animationDuration: '1s',\n backgroundColor: tokens.colorNeutralStencil1,\n },\n },\n translucent: {\n backgroundColor: tokens.colorNeutralStencil1Alpha,\n\n '::after': {\n backgroundImage: `linear-gradient(\n to right,\n transparent 0%,\n ${tokens.colorNeutralStencil1Alpha} 50%,\n transparent 100%)`,\n },\n },\n translucentPulse: {\n backgroundColor: 'none',\n\n '::after': {\n backgroundColor: tokens.colorNeutralStencil1Alpha,\n },\n },\n blockStyling: {\n display: 'block',\n },\n});\n\nconst useRectangleStyles = makeStyles({\n root: {\n width: '100%',\n borderRadius: '4px',\n },\n 8: { height: '8px' },\n 12: { height: '12px' },\n 14: { height: '14px' },\n 16: { height: '16px' },\n 20: { height: '20px' },\n 22: { height: '22px' },\n 24: { height: '24px' },\n 28: { height: '28px' },\n 32: { height: '32px' },\n 36: { height: '36px' },\n 40: { height: '40px' },\n 48: { height: '48px' },\n 52: { height: '52px' },\n 56: { height: '56px' },\n 64: { height: '64px' },\n 72: { height: '72px' },\n 92: { height: '92px' },\n 96: { height: '96px' },\n 120: { height: '120px' },\n 128: { height: '128px' },\n});\n\nconst useSizeStyles = makeStyles({\n 8: { width: '8px', height: '8px' },\n 12: { width: '12px', height: '12px' },\n 14: { width: '14px', height: '14px' },\n 16: { width: '16px', height: '16px' },\n 20: { width: '20px', height: '20px' },\n 22: { width: '22px', height: '22px' },\n 24: { width: '24px', height: '24px' },\n 28: { width: '28px', height: '28px' },\n 32: { width: '32px', height: '32px' },\n 36: { width: '36px', height: '36px' },\n 40: { width: '40px', height: '40px' },\n 48: { width: '48px', height: '48px' },\n 52: { width: '52px', height: '52px' },\n 56: { width: '56px', height: '56px' },\n 64: { width: '64px', height: '64px' },\n 72: { width: '72px', height: '72px' },\n 92: { width: '92px', height: '92px' },\n 96: { width: '96px', height: '96px' },\n 120: { width: '120px', height: '120px' },\n 128: { width: '128px', height: '128px' },\n});\n\nconst useCircleSizeStyles = makeStyles({\n root: {\n borderRadius: '50%',\n },\n});\n\n/**\n * Apply styling to the SkeletonItem slots based on the state\n */\nexport const useSkeletonItemStyles_unstable = (state: SkeletonItemState): SkeletonItemState => {\n const { animation, appearance, size, shape } = state;\n\n const rootStyles = useStyles();\n const rectStyles = useRectangleStyles();\n const sizeStyles = useSizeStyles();\n const circleStyles = useCircleSizeStyles();\n\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(\n skeletonItemClassNames.root,\n rootStyles.root,\n state.root.as === 'span' && rootStyles.blockStyling,\n animation === 'wave' && rootStyles.wave,\n animation === 'pulse' && rootStyles.pulse,\n appearance === 'translucent' && rootStyles.translucent,\n animation === 'pulse' && appearance === 'translucent' && rootStyles.translucentPulse,\n shape === 'rectangle' && rectStyles.root,\n shape === 'rectangle' && rectStyles[size],\n shape === 'square' && sizeStyles[size],\n shape === 'circle' && circleStyles.root,\n shape === 'circle' && sizeStyles[size],\n state.root.className,\n );\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","tokens","skeletonItemClassNames","root","skeletonWaveAnimation","to","transform","skeletonPulseAnimation","opacity","useStyles","position","overflow","content","display","inset","animationIterationCount","animationDuration","animationTimingFunction","wave","backgroundColor","colorNeutralStencil1","animationName","backgroundImage","colorNeutralStencil2","pulse","translucent","colorNeutralStencil1Alpha","translucentPulse","blockStyling","useRectangleStyles","width","borderRadius","height","useSizeStyles","useCircleSizeStyles","useSkeletonItemStyles_unstable","state","animation","appearance","size","shape","rootStyles","rectStyles","sizeStyles","circleStyles","className","as"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../src/contexts/SkeletonContext.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { SkeletonItemSize } from '../components/Skeleton/Skeleton.types';\n\nconst SkeletonContext = React.createContext<SkeletonContextValue | undefined>(undefined);\n\nexport interface SkeletonContextValue {\n animation?: 'wave' | 'pulse';\n appearance?: 'opaque' | 'translucent';\n size?: SkeletonItemSize;\n shape?: 'circle' | 'square' | 'rectangle';\n}\n\nconst skeletonContextDefaultValue: SkeletonContextValue = {};\n\nexport const SkeletonContextProvider = SkeletonContext.Provider;\n\nexport const useSkeletonContext = (): SkeletonContextValue =>\n React.useContext(SkeletonContext) ?? skeletonContextDefaultValue;\n"],"names":["React","SkeletonContext","createContext","undefined","skeletonContextDefaultValue","SkeletonContextProvider","Provider","useSkeletonContext","useContext"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAG/B,MAAMC,kBAAkBD,MAAME,aAAa,CAAmCC;AAS9E,MAAMC,8BAAoD,CAAC;AAE3D,OAAO,MAAMC,0BAA0BJ,gBAAgBK,QAAQ,CAAC;AAEhE,OAAO,MAAMC,qBAAqB;QAChCP;YAAAA,oBAAAA,MAAMQ,UAAU,CAACP,8BAAjBD,+BAAAA,oBAAqCI;EAA4B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../src/contexts/index.ts"],"sourcesContent":["export type { SkeletonContextValue } from './SkeletonContext';\nexport { SkeletonContextProvider, useSkeletonContext } from './SkeletonContext';\n"],"names":["SkeletonContextProvider","useSkeletonContext"],"mappings":"AACA,SAASA,uBAAuB,EAAEC,kBAAkB,QAAQ,uBAAoB"}
|