UNPKG

@chakra-ui/react

Version:

Responsive and accessible React UI components built with React and Emotion

59 lines (55 loc) 1.42 kB
"use strict"; "use client"; 'use strict'; var jsxRuntime = require('react/jsx-runtime'); var createSlotRecipeContext = require('../../styled-system/create-slot-recipe-context.cjs'); var icons = require('../icons.cjs'); const { withProvider, withContext, useStyles: useStatStyles, PropsProvider } = createSlotRecipeContext.createSlotRecipeContext({ key: "stat" }); const StatRoot = withProvider( "dl", "root" ); const StatPropsProvider = PropsProvider; const StatLabel = withContext("dt", "label"); const StatValueText = withContext( "dd", "valueText" ); const StatHelpText = withContext( "span", "helpText" ); const StatValueUnit = withContext( "span", "valueUnit" ); const StatUpIndicator = withContext( "span", "indicator", { defaultProps: { "data-type": "up", children: /* @__PURE__ */ jsxRuntime.jsx(icons.ArrowUpIcon, {}) } } ); const StatDownIndicator = withContext("span", "indicator", { defaultProps: { "data-type": "down", children: /* @__PURE__ */ jsxRuntime.jsx(icons.ArrowDownIcon, {}) } }); exports.StatDownIndicator = StatDownIndicator; exports.StatHelpText = StatHelpText; exports.StatLabel = StatLabel; exports.StatPropsProvider = StatPropsProvider; exports.StatRoot = StatRoot; exports.StatUpIndicator = StatUpIndicator; exports.StatValueText = StatValueText; exports.StatValueUnit = StatValueUnit; exports.useStatStyles = useStatStyles;