@cgi-learning-hub/ui 0.0.1-dev
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/dist/_virtual/_commonjsHelpers.js +5 -0
- package/dist/_virtual/index.js +3 -0
- package/dist/_virtual/index2.js +3 -0
- package/dist/_virtual/index3.js +3 -0
- package/dist/_virtual/react-is.development.js +3 -0
- package/dist/_virtual/react-is.development2.js +3 -0
- package/dist/_virtual/react-is.production.min.js +3 -0
- package/dist/_virtual/react-is.production.min2.js +3 -0
- package/dist/components/BasicButtons/BasicButtons.d.ts +2 -0
- package/dist/components/BasicButtons/BasicButtons.js +14 -0
- package/dist/components/BasicButtons/BasicButtons.stories.d.ts +5 -0
- package/dist/components/BasicButtons/index.d.ts +2 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/node_modules/.pnpm/@babel_runtime@7.23.9/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +8 -0
- package/dist/node_modules/.pnpm/@babel_runtime@7.23.9/node_modules/@babel/runtime/helpers/esm/extends.js +16 -0
- package/dist/node_modules/.pnpm/@babel_runtime@7.23.9/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js +9 -0
- package/dist/node_modules/.pnpm/@babel_runtime@7.23.9/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +14 -0
- package/dist/node_modules/.pnpm/@babel_runtime@7.23.9/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +9 -0
- package/dist/node_modules/.pnpm/@mui_material@5.15.0_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react-dom@18.2.0_react@18.2.0/node_modules/@mui/material/Button/Button.js +379 -0
- package/dist/node_modules/.pnpm/@mui_material@5.15.0_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react-dom@18.2.0_react@18.2.0/node_modules/@mui/material/Button/buttonClasses.js +10 -0
- package/dist/node_modules/.pnpm/@mui_material@5.15.0_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react-dom@18.2.0_react@18.2.0/node_modules/@mui/material/ButtonBase/ButtonBase.js +477 -0
- package/dist/node_modules/.pnpm/@mui_material@5.15.0_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react-dom@18.2.0_react@18.2.0/node_modules/@mui/material/ButtonBase/Ripple.js +85 -0
- package/dist/node_modules/.pnpm/@mui_material@5.15.0_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react-dom@18.2.0_react@18.2.0/node_modules/@mui/material/ButtonBase/TouchRipple.js +340 -0
- package/dist/node_modules/.pnpm/@mui_material@5.15.0_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react-dom@18.2.0_react@18.2.0/node_modules/@mui/material/ButtonBase/buttonBaseClasses.js +9 -0
- package/dist/node_modules/.pnpm/@mui_material@5.15.0_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react-dom@18.2.0_react@18.2.0/node_modules/@mui/material/ButtonBase/touchRippleClasses.js +5 -0
- package/dist/node_modules/.pnpm/@mui_material@5.15.0_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react-dom@18.2.0_react@18.2.0/node_modules/@mui/material/ButtonGroup/ButtonGroupButtonContext.js +12 -0
- package/dist/node_modules/.pnpm/@mui_material@5.15.0_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react-dom@18.2.0_react@18.2.0/node_modules/@mui/material/ButtonGroup/ButtonGroupContext.js +12 -0
- package/dist/node_modules/.pnpm/@mui_material@5.15.0_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react-dom@18.2.0_react@18.2.0/node_modules/@mui/material/Stack/Stack.js +63 -0
- package/dist/node_modules/.pnpm/@mui_material@5.15.0_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react-dom@18.2.0_react@18.2.0/node_modules/@mui/material/colors/blue.js +19 -0
- package/dist/node_modules/.pnpm/@mui_material@5.15.0_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react-dom@18.2.0_react@18.2.0/node_modules/@mui/material/colors/common.js +7 -0
- package/dist/node_modules/.pnpm/@mui_material@5.15.0_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react-dom@18.2.0_react@18.2.0/node_modules/@mui/material/colors/green.js +19 -0
- package/dist/node_modules/.pnpm/@mui_material@5.15.0_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react-dom@18.2.0_react@18.2.0/node_modules/@mui/material/colors/grey.js +19 -0
- package/dist/node_modules/.pnpm/@mui_material@5.15.0_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react-dom@18.2.0_react@18.2.0/node_modules/@mui/material/colors/lightBlue.js +19 -0
- package/dist/node_modules/.pnpm/@mui_material@5.15.0_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react-dom@18.2.0_react@18.2.0/node_modules/@mui/material/colors/orange.js +19 -0
- package/dist/node_modules/.pnpm/@mui_material@5.15.0_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react-dom@18.2.0_react@18.2.0/node_modules/@mui/material/colors/purple.js +19 -0
- package/dist/node_modules/.pnpm/@mui_material@5.15.0_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react-dom@18.2.0_react@18.2.0/node_modules/@mui/material/colors/red.js +19 -0
- package/dist/node_modules/.pnpm/@mui_material@5.15.0_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react-dom@18.2.0_react@18.2.0/node_modules/@mui/material/styles/createMixins.js +19 -0
- package/dist/node_modules/.pnpm/@mui_material@5.15.0_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react-dom@18.2.0_react@18.2.0/node_modules/@mui/material/styles/createPalette.js +308 -0
- package/dist/node_modules/.pnpm/@mui_material@5.15.0_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react-dom@18.2.0_react@18.2.0/node_modules/@mui/material/styles/createTheme.js +82 -0
- package/dist/node_modules/.pnpm/@mui_material@5.15.0_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react-dom@18.2.0_react@18.2.0/node_modules/@mui/material/styles/createTransitions.js +91 -0
- package/dist/node_modules/.pnpm/@mui_material@5.15.0_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react-dom@18.2.0_react@18.2.0/node_modules/@mui/material/styles/createTypography.js +93 -0
- package/dist/node_modules/.pnpm/@mui_material@5.15.0_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react-dom@18.2.0_react@18.2.0/node_modules/@mui/material/styles/defaultTheme.js +6 -0
- package/dist/node_modules/.pnpm/@mui_material@5.15.0_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react-dom@18.2.0_react@18.2.0/node_modules/@mui/material/styles/identifier.js +3 -0
- package/dist/node_modules/.pnpm/@mui_material@5.15.0_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react-dom@18.2.0_react@18.2.0/node_modules/@mui/material/styles/shadows.js +11 -0
- package/dist/node_modules/.pnpm/@mui_material@5.15.0_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react-dom@18.2.0_react@18.2.0/node_modules/@mui/material/styles/styled.js +12 -0
- package/dist/node_modules/.pnpm/@mui_material@5.15.0_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react-dom@18.2.0_react@18.2.0/node_modules/@mui/material/styles/useThemeProps.js +17 -0
- package/dist/node_modules/.pnpm/@mui_material@5.15.0_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react-dom@18.2.0_react@18.2.0/node_modules/@mui/material/styles/zIndex.js +15 -0
- package/dist/node_modules/.pnpm/@mui_material@5.15.0_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react-dom@18.2.0_react@18.2.0/node_modules/@mui/material/utils/capitalize.js +5 -0
- package/dist/node_modules/.pnpm/@mui_material@5.15.0_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react-dom@18.2.0_react@18.2.0/node_modules/@mui/material/utils/useEventCallback.js +5 -0
- package/dist/node_modules/.pnpm/@mui_material@5.15.0_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react-dom@18.2.0_react@18.2.0/node_modules/@mui/material/utils/useForkRef.js +5 -0
- package/dist/node_modules/.pnpm/@mui_material@5.15.0_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react-dom@18.2.0_react@18.2.0/node_modules/@mui/material/utils/useIsFocusVisible.js +5 -0
- package/dist/node_modules/.pnpm/@mui_styled-engine@5.15.6_@emotion_react@11.11.1_@emotion_styled@11.11.0_react@18.2.0/node_modules/@mui/styled-engine/index.js +36 -0
- package/dist/node_modules/.pnpm/@mui_system@5.15.6_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react@18.2.0/node_modules/@mui/system/esm/Stack/createStack.js +176 -0
- package/dist/node_modules/.pnpm/@mui_system@5.15.6_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react@18.2.0/node_modules/@mui/system/esm/borders.js +51 -0
- package/dist/node_modules/.pnpm/@mui_system@5.15.6_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react@18.2.0/node_modules/@mui/system/esm/breakpoints.js +123 -0
- package/dist/node_modules/.pnpm/@mui_system@5.15.6_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react@18.2.0/node_modules/@mui/system/esm/colorManipulator.js +236 -0
- package/dist/node_modules/.pnpm/@mui_system@5.15.6_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react@18.2.0/node_modules/@mui/system/esm/compose.js +26 -0
- package/dist/node_modules/.pnpm/@mui_system@5.15.6_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react@18.2.0/node_modules/@mui/system/esm/createStyled.js +322 -0
- package/dist/node_modules/.pnpm/@mui_system@5.15.6_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react@18.2.0/node_modules/@mui/system/esm/createTheme/createBreakpoints.js +82 -0
- package/dist/node_modules/.pnpm/@mui_system@5.15.6_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react@18.2.0/node_modules/@mui/system/esm/createTheme/createSpacing.js +34 -0
- package/dist/node_modules/.pnpm/@mui_system@5.15.6_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react@18.2.0/node_modules/@mui/system/esm/createTheme/createTheme.js +43 -0
- package/dist/node_modules/.pnpm/@mui_system@5.15.6_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react@18.2.0/node_modules/@mui/system/esm/createTheme/shape.js +6 -0
- package/dist/node_modules/.pnpm/@mui_system@5.15.6_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react@18.2.0/node_modules/@mui/system/esm/cssGrid.js +86 -0
- package/dist/node_modules/.pnpm/@mui_system@5.15.6_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react@18.2.0/node_modules/@mui/system/esm/memoize.js +11 -0
- package/dist/node_modules/.pnpm/@mui_system@5.15.6_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react@18.2.0/node_modules/@mui/system/esm/merge.js +12 -0
- package/dist/node_modules/.pnpm/@mui_system@5.15.6_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react@18.2.0/node_modules/@mui/system/esm/palette.js +28 -0
- package/dist/node_modules/.pnpm/@mui_system@5.15.6_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react@18.2.0/node_modules/@mui/system/esm/propsToClassKey.js +30 -0
- package/dist/node_modules/.pnpm/@mui_system@5.15.6_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react@18.2.0/node_modules/@mui/system/esm/responsivePropType.js +6 -0
- package/dist/node_modules/.pnpm/@mui_system@5.15.6_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react@18.2.0/node_modules/@mui/system/esm/sizing.js +67 -0
- package/dist/node_modules/.pnpm/@mui_system@5.15.6_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react@18.2.0/node_modules/@mui/system/esm/spacing.js +144 -0
- package/dist/node_modules/.pnpm/@mui_system@5.15.6_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react@18.2.0/node_modules/@mui/system/esm/style.js +77 -0
- package/dist/node_modules/.pnpm/@mui_system@5.15.6_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react@18.2.0/node_modules/@mui/system/esm/styleFunctionSx/defaultSxConfig.js +294 -0
- package/dist/node_modules/.pnpm/@mui_system@5.15.6_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react@18.2.0/node_modules/@mui/system/esm/styleFunctionSx/extendSxProp.js +51 -0
- package/dist/node_modules/.pnpm/@mui_system@5.15.6_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react@18.2.0/node_modules/@mui/system/esm/styleFunctionSx/styleFunctionSx.js +129 -0
- package/dist/node_modules/.pnpm/@mui_system@5.15.6_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react@18.2.0/node_modules/@mui/system/esm/styled.js +5 -0
- package/dist/node_modules/.pnpm/@mui_system@5.15.6_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react@18.2.0/node_modules/@mui/system/esm/useTheme.js +9 -0
- package/dist/node_modules/.pnpm/@mui_system@5.15.6_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react@18.2.0/node_modules/@mui/system/esm/useThemeProps/getThemeProps.js +15 -0
- package/dist/node_modules/.pnpm/@mui_system@5.15.6_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react@18.2.0/node_modules/@mui/system/esm/useThemeProps/useThemeProps.js +22 -0
- package/dist/node_modules/.pnpm/@mui_system@5.15.6_@emotion_react@11.11.1_@emotion_styled@11.11.0_@types_react@18.2.48_react@18.2.0/node_modules/@mui/system/esm/useThemeWithoutDefault.js +12 -0
- package/dist/node_modules/.pnpm/@mui_utils@5.15.6_@types_react@18.2.48_react@18.2.0/node_modules/@mui/utils/esm/ClassNameGenerator/ClassNameGenerator.js +18 -0
- package/dist/node_modules/.pnpm/@mui_utils@5.15.6_@types_react@18.2.48_react@18.2.0/node_modules/@mui/utils/esm/capitalize/capitalize.js +14 -0
- package/dist/node_modules/.pnpm/@mui_utils@5.15.6_@types_react@18.2.48_react@18.2.0/node_modules/@mui/utils/esm/chainPropTypes/chainPropTypes.js +10 -0
- package/dist/node_modules/.pnpm/@mui_utils@5.15.6_@types_react@18.2.48_react@18.2.0/node_modules/@mui/utils/esm/clamp/clamp.js +5 -0
- package/dist/node_modules/.pnpm/@mui_utils@5.15.6_@types_react@18.2.48_react@18.2.0/node_modules/@mui/utils/esm/composeClasses/composeClasses.js +23 -0
- package/dist/node_modules/.pnpm/@mui_utils@5.15.6_@types_react@18.2.48_react@18.2.0/node_modules/@mui/utils/esm/deepmerge.js +44 -0
- package/dist/node_modules/.pnpm/@mui_utils@5.15.6_@types_react@18.2.48_react@18.2.0/node_modules/@mui/utils/esm/elementTypeAcceptingRef.js +43 -0
- package/dist/node_modules/.pnpm/@mui_utils@5.15.6_@types_react@18.2.48_react@18.2.0/node_modules/@mui/utils/esm/formatMuiErrorMessage/formatMuiErrorMessage.js +21 -0
- package/dist/node_modules/.pnpm/@mui_utils@5.15.6_@types_react@18.2.48_react@18.2.0/node_modules/@mui/utils/esm/generateUtilityClass/generateUtilityClass.js +22 -0
- package/dist/node_modules/.pnpm/@mui_utils@5.15.6_@types_react@18.2.48_react@18.2.0/node_modules/@mui/utils/esm/generateUtilityClasses/generateUtilityClasses.js +11 -0
- package/dist/node_modules/.pnpm/@mui_utils@5.15.6_@types_react@18.2.48_react@18.2.0/node_modules/@mui/utils/esm/getDisplayName.js +49 -0
- package/dist/node_modules/.pnpm/@mui_utils@5.15.6_@types_react@18.2.48_react@18.2.0/node_modules/@mui/utils/esm/refType.js +6 -0
- package/dist/node_modules/.pnpm/@mui_utils@5.15.6_@types_react@18.2.48_react@18.2.0/node_modules/@mui/utils/esm/resolveProps.js +37 -0
- package/dist/node_modules/.pnpm/@mui_utils@5.15.6_@types_react@18.2.48_react@18.2.0/node_modules/@mui/utils/esm/setRef.js +22 -0
- package/dist/node_modules/.pnpm/@mui_utils@5.15.6_@types_react@18.2.48_react@18.2.0/node_modules/@mui/utils/esm/useEnhancedEffect/useEnhancedEffect.js +12 -0
- package/dist/node_modules/.pnpm/@mui_utils@5.15.6_@types_react@18.2.48_react@18.2.0/node_modules/@mui/utils/esm/useEventCallback/useEventCallback.js +19 -0
- package/dist/node_modules/.pnpm/@mui_utils@5.15.6_@types_react@18.2.48_react@18.2.0/node_modules/@mui/utils/esm/useForkRef/useForkRef.js +23 -0
- package/dist/node_modules/.pnpm/@mui_utils@5.15.6_@types_react@18.2.48_react@18.2.0/node_modules/@mui/utils/esm/useIsFocusVisible.js +156 -0
- package/dist/node_modules/.pnpm/clsx@2.1.0/node_modules/clsx/dist/clsx.js +3 -0
- package/dist/node_modules/.pnpm/object-assign@4.1.1/node_modules/object-assign/index.js +99 -0
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/checkPropTypes.js +115 -0
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithThrowingShims.js +74 -0
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithTypeCheckers.js +625 -0
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js +30 -0
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/ReactPropTypesSecret.js +21 -0
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/has.js +11 -0
- package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.development.js +190 -0
- package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.production.min.js +26 -0
- package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js +19 -0
- package/dist/node_modules/.pnpm/react-is@18.2.0/node_modules/react-is/cjs/react-is.development.js +230 -0
- package/dist/node_modules/.pnpm/react-is@18.2.0/node_modules/react-is/cjs/react-is.production.min.js +26 -0
- package/dist/node_modules/.pnpm/react-is@18.2.0/node_modules/react-is/index.js +13 -0
- package/dist/node_modules/.pnpm/react-transition-group@4.4.5_react-dom@18.2.0_react@18.2.0/node_modules/react-transition-group/esm/TransitionGroup.js +191 -0
- package/dist/node_modules/.pnpm/react-transition-group@4.4.5_react-dom@18.2.0_react@18.2.0/node_modules/react-transition-group/esm/TransitionGroupContext.js +5 -0
- package/dist/node_modules/.pnpm/react-transition-group@4.4.5_react-dom@18.2.0_react@18.2.0/node_modules/react-transition-group/esm/utils/ChildMapping.js +143 -0
- package/package.json +46 -0
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
import _objectWithoutPropertiesLoose from '../../../../../@babel_runtime@7.23.9/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js';
|
|
2
|
+
import _extends from '../../../../../@babel_runtime@7.23.9/node_modules/@babel/runtime/helpers/esm/extends.js';
|
|
3
|
+
import styled, { internal_processStyles } from '../../../../../@mui_styled-engine@5.15.6_@emotion_react@11.11.1_@emotion_styled@11.11.0_react@18.2.0/node_modules/@mui/styled-engine/index.js';
|
|
4
|
+
import propsToClassKey from './propsToClassKey.js';
|
|
5
|
+
import createTheme from './createTheme/createTheme.js';
|
|
6
|
+
import deepmerge, { isPlainObject } from '../../../../../@mui_utils@5.15.6_@types_react@18.2.48_react@18.2.0/node_modules/@mui/utils/esm/deepmerge.js';
|
|
7
|
+
import capitalize from '../../../../../@mui_utils@5.15.6_@types_react@18.2.48_react@18.2.0/node_modules/@mui/utils/esm/capitalize/capitalize.js';
|
|
8
|
+
import getDisplayName from '../../../../../@mui_utils@5.15.6_@types_react@18.2.48_react@18.2.0/node_modules/@mui/utils/esm/getDisplayName.js';
|
|
9
|
+
import styleFunctionSx from './styleFunctionSx/styleFunctionSx.js';
|
|
10
|
+
|
|
11
|
+
const _excluded = ["name", "slot", "skipVariantsResolver", "skipSx", "overridesResolver"];
|
|
12
|
+
function isEmpty(obj) {
|
|
13
|
+
return Object.keys(obj).length === 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// https://github.com/emotion-js/emotion/blob/26ded6109fcd8ca9875cc2ce4564fee678a3f3c5/packages/styled/src/utils.js#L40
|
|
17
|
+
function isStringTag(tag) {
|
|
18
|
+
return typeof tag === 'string' &&
|
|
19
|
+
// 96 is one less than the char code
|
|
20
|
+
// for "a" so this is checking that
|
|
21
|
+
// it's a lowercase character
|
|
22
|
+
tag.charCodeAt(0) > 96;
|
|
23
|
+
}
|
|
24
|
+
const getStyleOverrides = (name, theme) => {
|
|
25
|
+
if (theme.components && theme.components[name] && theme.components[name].styleOverrides) {
|
|
26
|
+
return theme.components[name].styleOverrides;
|
|
27
|
+
}
|
|
28
|
+
return null;
|
|
29
|
+
};
|
|
30
|
+
const transformVariants = variants => {
|
|
31
|
+
let numOfCallbacks = 0;
|
|
32
|
+
const variantsStyles = {};
|
|
33
|
+
if (variants) {
|
|
34
|
+
variants.forEach(definition => {
|
|
35
|
+
let key = '';
|
|
36
|
+
if (typeof definition.props === 'function') {
|
|
37
|
+
key = `callback${numOfCallbacks}`;
|
|
38
|
+
numOfCallbacks += 1;
|
|
39
|
+
} else {
|
|
40
|
+
key = propsToClassKey(definition.props);
|
|
41
|
+
}
|
|
42
|
+
variantsStyles[key] = definition.style;
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
return variantsStyles;
|
|
46
|
+
};
|
|
47
|
+
const getVariantStyles = (name, theme) => {
|
|
48
|
+
let variants = [];
|
|
49
|
+
if (theme && theme.components && theme.components[name] && theme.components[name].variants) {
|
|
50
|
+
variants = theme.components[name].variants;
|
|
51
|
+
}
|
|
52
|
+
return transformVariants(variants);
|
|
53
|
+
};
|
|
54
|
+
const variantsResolver = (props, styles, variants) => {
|
|
55
|
+
const {
|
|
56
|
+
ownerState = {}
|
|
57
|
+
} = props;
|
|
58
|
+
const variantsStyles = [];
|
|
59
|
+
let numOfCallbacks = 0;
|
|
60
|
+
if (variants) {
|
|
61
|
+
variants.forEach(variant => {
|
|
62
|
+
let isMatch = true;
|
|
63
|
+
if (typeof variant.props === 'function') {
|
|
64
|
+
const propsToCheck = _extends({}, props, ownerState);
|
|
65
|
+
isMatch = variant.props(propsToCheck);
|
|
66
|
+
} else {
|
|
67
|
+
Object.keys(variant.props).forEach(key => {
|
|
68
|
+
if (ownerState[key] !== variant.props[key] && props[key] !== variant.props[key]) {
|
|
69
|
+
isMatch = false;
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
if (isMatch) {
|
|
74
|
+
if (typeof variant.props === 'function') {
|
|
75
|
+
variantsStyles.push(styles[`callback${numOfCallbacks}`]);
|
|
76
|
+
} else {
|
|
77
|
+
variantsStyles.push(styles[propsToClassKey(variant.props)]);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
if (typeof variant.props === 'function') {
|
|
81
|
+
numOfCallbacks += 1;
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
return variantsStyles;
|
|
86
|
+
};
|
|
87
|
+
const themeVariantsResolver = (props, styles, theme, name) => {
|
|
88
|
+
var _theme$components;
|
|
89
|
+
const themeVariants = theme == null || (_theme$components = theme.components) == null || (_theme$components = _theme$components[name]) == null ? void 0 : _theme$components.variants;
|
|
90
|
+
return variantsResolver(props, styles, themeVariants);
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
// Update /system/styled/#api in case if this changes
|
|
94
|
+
function shouldForwardProp(prop) {
|
|
95
|
+
return prop !== 'ownerState' && prop !== 'theme' && prop !== 'sx' && prop !== 'as';
|
|
96
|
+
}
|
|
97
|
+
const systemDefaultTheme = createTheme();
|
|
98
|
+
const lowercaseFirstLetter = string => {
|
|
99
|
+
if (!string) {
|
|
100
|
+
return string;
|
|
101
|
+
}
|
|
102
|
+
return string.charAt(0).toLowerCase() + string.slice(1);
|
|
103
|
+
};
|
|
104
|
+
function resolveTheme({
|
|
105
|
+
defaultTheme,
|
|
106
|
+
theme,
|
|
107
|
+
themeId
|
|
108
|
+
}) {
|
|
109
|
+
return isEmpty(theme) ? defaultTheme : theme[themeId] || theme;
|
|
110
|
+
}
|
|
111
|
+
function defaultOverridesResolver(slot) {
|
|
112
|
+
if (!slot) {
|
|
113
|
+
return null;
|
|
114
|
+
}
|
|
115
|
+
return (props, styles) => styles[slot];
|
|
116
|
+
}
|
|
117
|
+
const muiStyledFunctionResolver = ({
|
|
118
|
+
styledArg,
|
|
119
|
+
props,
|
|
120
|
+
defaultTheme,
|
|
121
|
+
themeId
|
|
122
|
+
}) => {
|
|
123
|
+
const resolvedStyles = styledArg(_extends({}, props, {
|
|
124
|
+
theme: resolveTheme(_extends({}, props, {
|
|
125
|
+
defaultTheme,
|
|
126
|
+
themeId
|
|
127
|
+
}))
|
|
128
|
+
}));
|
|
129
|
+
let optionalVariants;
|
|
130
|
+
if (resolvedStyles && resolvedStyles.variants) {
|
|
131
|
+
optionalVariants = resolvedStyles.variants;
|
|
132
|
+
delete resolvedStyles.variants;
|
|
133
|
+
}
|
|
134
|
+
if (optionalVariants) {
|
|
135
|
+
const variantsStyles = variantsResolver(props, transformVariants(optionalVariants), optionalVariants);
|
|
136
|
+
return [resolvedStyles, ...variantsStyles];
|
|
137
|
+
}
|
|
138
|
+
return resolvedStyles;
|
|
139
|
+
};
|
|
140
|
+
function createStyled(input = {}) {
|
|
141
|
+
const {
|
|
142
|
+
themeId,
|
|
143
|
+
defaultTheme = systemDefaultTheme,
|
|
144
|
+
rootShouldForwardProp = shouldForwardProp,
|
|
145
|
+
slotShouldForwardProp = shouldForwardProp
|
|
146
|
+
} = input;
|
|
147
|
+
const systemSx = props => {
|
|
148
|
+
return styleFunctionSx(_extends({}, props, {
|
|
149
|
+
theme: resolveTheme(_extends({}, props, {
|
|
150
|
+
defaultTheme,
|
|
151
|
+
themeId
|
|
152
|
+
}))
|
|
153
|
+
}));
|
|
154
|
+
};
|
|
155
|
+
systemSx.__mui_systemSx = true;
|
|
156
|
+
return (tag, inputOptions = {}) => {
|
|
157
|
+
// Filter out the `sx` style function from the previous styled component to prevent unnecessary styles generated by the composite components.
|
|
158
|
+
internal_processStyles(tag, styles => styles.filter(style => !(style != null && style.__mui_systemSx)));
|
|
159
|
+
const {
|
|
160
|
+
name: componentName,
|
|
161
|
+
slot: componentSlot,
|
|
162
|
+
skipVariantsResolver: inputSkipVariantsResolver,
|
|
163
|
+
skipSx: inputSkipSx,
|
|
164
|
+
// TODO v6: remove `lowercaseFirstLetter()` in the next major release
|
|
165
|
+
// For more details: https://github.com/mui/material-ui/pull/37908
|
|
166
|
+
overridesResolver = defaultOverridesResolver(lowercaseFirstLetter(componentSlot))
|
|
167
|
+
} = inputOptions,
|
|
168
|
+
options = _objectWithoutPropertiesLoose(inputOptions, _excluded);
|
|
169
|
+
|
|
170
|
+
// if skipVariantsResolver option is defined, take the value, otherwise, true for root and false for other slots.
|
|
171
|
+
const skipVariantsResolver = inputSkipVariantsResolver !== undefined ? inputSkipVariantsResolver :
|
|
172
|
+
// TODO v6: remove `Root` in the next major release
|
|
173
|
+
// For more details: https://github.com/mui/material-ui/pull/37908
|
|
174
|
+
componentSlot && componentSlot !== 'Root' && componentSlot !== 'root' || false;
|
|
175
|
+
const skipSx = inputSkipSx || false;
|
|
176
|
+
let label;
|
|
177
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
178
|
+
if (componentName) {
|
|
179
|
+
// TODO v6: remove `lowercaseFirstLetter()` in the next major release
|
|
180
|
+
// For more details: https://github.com/mui/material-ui/pull/37908
|
|
181
|
+
label = `${componentName}-${lowercaseFirstLetter(componentSlot || 'Root')}`;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
let shouldForwardPropOption = shouldForwardProp;
|
|
185
|
+
|
|
186
|
+
// TODO v6: remove `Root` in the next major release
|
|
187
|
+
// For more details: https://github.com/mui/material-ui/pull/37908
|
|
188
|
+
if (componentSlot === 'Root' || componentSlot === 'root') {
|
|
189
|
+
shouldForwardPropOption = rootShouldForwardProp;
|
|
190
|
+
} else if (componentSlot) {
|
|
191
|
+
// any other slot specified
|
|
192
|
+
shouldForwardPropOption = slotShouldForwardProp;
|
|
193
|
+
} else if (isStringTag(tag)) {
|
|
194
|
+
// for string (html) tag, preserve the behavior in emotion & styled-components.
|
|
195
|
+
shouldForwardPropOption = undefined;
|
|
196
|
+
}
|
|
197
|
+
const defaultStyledResolver = styled(tag, _extends({
|
|
198
|
+
shouldForwardProp: shouldForwardPropOption,
|
|
199
|
+
label
|
|
200
|
+
}, options));
|
|
201
|
+
const muiStyledResolver = (styleArg, ...expressions) => {
|
|
202
|
+
const expressionsWithDefaultTheme = expressions ? expressions.map(stylesArg => {
|
|
203
|
+
// On the server Emotion doesn't use React.forwardRef for creating components, so the created
|
|
204
|
+
// component stays as a function. This condition makes sure that we do not interpolate functions
|
|
205
|
+
// which are basically components used as a selectors.
|
|
206
|
+
if (typeof stylesArg === 'function' && stylesArg.__emotion_real !== stylesArg) {
|
|
207
|
+
return props => muiStyledFunctionResolver({
|
|
208
|
+
styledArg: stylesArg,
|
|
209
|
+
props,
|
|
210
|
+
defaultTheme,
|
|
211
|
+
themeId
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
if (isPlainObject(stylesArg)) {
|
|
215
|
+
let transformedStylesArg = stylesArg;
|
|
216
|
+
let styledArgVariants;
|
|
217
|
+
if (stylesArg && stylesArg.variants) {
|
|
218
|
+
styledArgVariants = stylesArg.variants;
|
|
219
|
+
delete transformedStylesArg.variants;
|
|
220
|
+
transformedStylesArg = props => {
|
|
221
|
+
let result = stylesArg;
|
|
222
|
+
const variantStyles = variantsResolver(props, transformVariants(styledArgVariants), styledArgVariants);
|
|
223
|
+
variantStyles.forEach(variantStyle => {
|
|
224
|
+
result = deepmerge(result, variantStyle);
|
|
225
|
+
});
|
|
226
|
+
return result;
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
return transformedStylesArg;
|
|
230
|
+
}
|
|
231
|
+
return stylesArg;
|
|
232
|
+
}) : [];
|
|
233
|
+
let transformedStyleArg = styleArg;
|
|
234
|
+
if (isPlainObject(styleArg)) {
|
|
235
|
+
let styledArgVariants;
|
|
236
|
+
if (styleArg && styleArg.variants) {
|
|
237
|
+
styledArgVariants = styleArg.variants;
|
|
238
|
+
delete transformedStyleArg.variants;
|
|
239
|
+
transformedStyleArg = props => {
|
|
240
|
+
let result = styleArg;
|
|
241
|
+
const variantStyles = variantsResolver(props, transformVariants(styledArgVariants), styledArgVariants);
|
|
242
|
+
variantStyles.forEach(variantStyle => {
|
|
243
|
+
result = deepmerge(result, variantStyle);
|
|
244
|
+
});
|
|
245
|
+
return result;
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
} else if (typeof styleArg === 'function' &&
|
|
249
|
+
// On the server Emotion doesn't use React.forwardRef for creating components, so the created
|
|
250
|
+
// component stays as a function. This condition makes sure that we do not interpolate functions
|
|
251
|
+
// which are basically components used as a selectors.
|
|
252
|
+
styleArg.__emotion_real !== styleArg) {
|
|
253
|
+
// If the type is function, we need to define the default theme.
|
|
254
|
+
transformedStyleArg = props => muiStyledFunctionResolver({
|
|
255
|
+
styledArg: styleArg,
|
|
256
|
+
props,
|
|
257
|
+
defaultTheme,
|
|
258
|
+
themeId
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
if (componentName && overridesResolver) {
|
|
262
|
+
expressionsWithDefaultTheme.push(props => {
|
|
263
|
+
const theme = resolveTheme(_extends({}, props, {
|
|
264
|
+
defaultTheme,
|
|
265
|
+
themeId
|
|
266
|
+
}));
|
|
267
|
+
const styleOverrides = getStyleOverrides(componentName, theme);
|
|
268
|
+
if (styleOverrides) {
|
|
269
|
+
const resolvedStyleOverrides = {};
|
|
270
|
+
Object.entries(styleOverrides).forEach(([slotKey, slotStyle]) => {
|
|
271
|
+
resolvedStyleOverrides[slotKey] = typeof slotStyle === 'function' ? slotStyle(_extends({}, props, {
|
|
272
|
+
theme
|
|
273
|
+
})) : slotStyle;
|
|
274
|
+
});
|
|
275
|
+
return overridesResolver(props, resolvedStyleOverrides);
|
|
276
|
+
}
|
|
277
|
+
return null;
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
if (componentName && !skipVariantsResolver) {
|
|
281
|
+
expressionsWithDefaultTheme.push(props => {
|
|
282
|
+
const theme = resolveTheme(_extends({}, props, {
|
|
283
|
+
defaultTheme,
|
|
284
|
+
themeId
|
|
285
|
+
}));
|
|
286
|
+
return themeVariantsResolver(props, getVariantStyles(componentName, theme), theme, componentName);
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
if (!skipSx) {
|
|
290
|
+
expressionsWithDefaultTheme.push(systemSx);
|
|
291
|
+
}
|
|
292
|
+
const numOfCustomFnsApplied = expressionsWithDefaultTheme.length - expressions.length;
|
|
293
|
+
if (Array.isArray(styleArg) && numOfCustomFnsApplied > 0) {
|
|
294
|
+
const placeholders = new Array(numOfCustomFnsApplied).fill('');
|
|
295
|
+
// If the type is array, than we need to add placeholders in the template for the overrides, variants and the sx styles.
|
|
296
|
+
transformedStyleArg = [...styleArg, ...placeholders];
|
|
297
|
+
transformedStyleArg.raw = [...styleArg.raw, ...placeholders];
|
|
298
|
+
}
|
|
299
|
+
const Component = defaultStyledResolver(transformedStyleArg, ...expressionsWithDefaultTheme);
|
|
300
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
301
|
+
let displayName;
|
|
302
|
+
if (componentName) {
|
|
303
|
+
displayName = `${componentName}${capitalize(componentSlot || '')}`;
|
|
304
|
+
}
|
|
305
|
+
if (displayName === undefined) {
|
|
306
|
+
displayName = `Styled(${getDisplayName(tag)})`;
|
|
307
|
+
}
|
|
308
|
+
Component.displayName = displayName;
|
|
309
|
+
}
|
|
310
|
+
if (tag.muiName) {
|
|
311
|
+
Component.muiName = tag.muiName;
|
|
312
|
+
}
|
|
313
|
+
return Component;
|
|
314
|
+
};
|
|
315
|
+
if (defaultStyledResolver.withConfig) {
|
|
316
|
+
muiStyledResolver.withConfig = defaultStyledResolver.withConfig;
|
|
317
|
+
}
|
|
318
|
+
return muiStyledResolver;
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
export { createStyled as default, shouldForwardProp, systemDefaultTheme };
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import _objectWithoutPropertiesLoose from '../../../../../../@babel_runtime@7.23.9/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js';
|
|
2
|
+
import _extends from '../../../../../../@babel_runtime@7.23.9/node_modules/@babel/runtime/helpers/esm/extends.js';
|
|
3
|
+
|
|
4
|
+
const _excluded = ["values", "unit", "step"];
|
|
5
|
+
const sortBreakpointsValues = values => {
|
|
6
|
+
const breakpointsAsArray = Object.keys(values).map(key => ({
|
|
7
|
+
key,
|
|
8
|
+
val: values[key]
|
|
9
|
+
})) || [];
|
|
10
|
+
// Sort in ascending order
|
|
11
|
+
breakpointsAsArray.sort((breakpoint1, breakpoint2) => breakpoint1.val - breakpoint2.val);
|
|
12
|
+
return breakpointsAsArray.reduce((acc, obj) => {
|
|
13
|
+
return _extends({}, acc, {
|
|
14
|
+
[obj.key]: obj.val
|
|
15
|
+
});
|
|
16
|
+
}, {});
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
// Keep in mind that @media is inclusive by the CSS specification.
|
|
20
|
+
function createBreakpoints(breakpoints) {
|
|
21
|
+
const {
|
|
22
|
+
// The breakpoint **start** at this value.
|
|
23
|
+
// For instance with the first breakpoint xs: [xs, sm).
|
|
24
|
+
values = {
|
|
25
|
+
xs: 0,
|
|
26
|
+
// phone
|
|
27
|
+
sm: 600,
|
|
28
|
+
// tablet
|
|
29
|
+
md: 900,
|
|
30
|
+
// small laptop
|
|
31
|
+
lg: 1200,
|
|
32
|
+
// desktop
|
|
33
|
+
xl: 1536 // large screen
|
|
34
|
+
},
|
|
35
|
+
unit = 'px',
|
|
36
|
+
step = 5
|
|
37
|
+
} = breakpoints,
|
|
38
|
+
other = _objectWithoutPropertiesLoose(breakpoints, _excluded);
|
|
39
|
+
const sortedValues = sortBreakpointsValues(values);
|
|
40
|
+
const keys = Object.keys(sortedValues);
|
|
41
|
+
function up(key) {
|
|
42
|
+
const value = typeof values[key] === 'number' ? values[key] : key;
|
|
43
|
+
return `@media (min-width:${value}${unit})`;
|
|
44
|
+
}
|
|
45
|
+
function down(key) {
|
|
46
|
+
const value = typeof values[key] === 'number' ? values[key] : key;
|
|
47
|
+
return `@media (max-width:${value - step / 100}${unit})`;
|
|
48
|
+
}
|
|
49
|
+
function between(start, end) {
|
|
50
|
+
const endIndex = keys.indexOf(end);
|
|
51
|
+
return `@media (min-width:${typeof values[start] === 'number' ? values[start] : start}${unit}) and ` + `(max-width:${(endIndex !== -1 && typeof values[keys[endIndex]] === 'number' ? values[keys[endIndex]] : end) - step / 100}${unit})`;
|
|
52
|
+
}
|
|
53
|
+
function only(key) {
|
|
54
|
+
if (keys.indexOf(key) + 1 < keys.length) {
|
|
55
|
+
return between(key, keys[keys.indexOf(key) + 1]);
|
|
56
|
+
}
|
|
57
|
+
return up(key);
|
|
58
|
+
}
|
|
59
|
+
function not(key) {
|
|
60
|
+
// handle first and last key separately, for better readability
|
|
61
|
+
const keyIndex = keys.indexOf(key);
|
|
62
|
+
if (keyIndex === 0) {
|
|
63
|
+
return up(keys[1]);
|
|
64
|
+
}
|
|
65
|
+
if (keyIndex === keys.length - 1) {
|
|
66
|
+
return down(keys[keyIndex]);
|
|
67
|
+
}
|
|
68
|
+
return between(key, keys[keys.indexOf(key) + 1]).replace('@media', '@media not all and');
|
|
69
|
+
}
|
|
70
|
+
return _extends({
|
|
71
|
+
keys,
|
|
72
|
+
values: sortedValues,
|
|
73
|
+
up,
|
|
74
|
+
down,
|
|
75
|
+
between,
|
|
76
|
+
only,
|
|
77
|
+
not,
|
|
78
|
+
unit
|
|
79
|
+
}, other);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export { createBreakpoints as default };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { createUnarySpacing } from '../spacing.js';
|
|
2
|
+
|
|
3
|
+
// The different signatures imply different meaning for their arguments that can't be expressed structurally.
|
|
4
|
+
// We express the difference with variable names.
|
|
5
|
+
|
|
6
|
+
function createSpacing(spacingInput = 8) {
|
|
7
|
+
// Already transformed.
|
|
8
|
+
if (spacingInput.mui) {
|
|
9
|
+
return spacingInput;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// Material Design layouts are visually balanced. Most measurements align to an 8dp grid, which aligns both spacing and the overall layout.
|
|
13
|
+
// Smaller components, such as icons, can align to a 4dp grid.
|
|
14
|
+
// https://m2.material.io/design/layout/understanding-layout.html
|
|
15
|
+
const transform = createUnarySpacing({
|
|
16
|
+
spacing: spacingInput
|
|
17
|
+
});
|
|
18
|
+
const spacing = (...argsInput) => {
|
|
19
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
20
|
+
if (!(argsInput.length <= 4)) {
|
|
21
|
+
console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${argsInput.length}`);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
const args = argsInput.length === 0 ? [1] : argsInput;
|
|
25
|
+
return args.map(argument => {
|
|
26
|
+
const output = transform(argument);
|
|
27
|
+
return typeof output === 'number' ? `${output}px` : output;
|
|
28
|
+
}).join(' ');
|
|
29
|
+
};
|
|
30
|
+
spacing.mui = true;
|
|
31
|
+
return spacing;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export { createSpacing as default };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import _extends from '../../../../../../@babel_runtime@7.23.9/node_modules/@babel/runtime/helpers/esm/extends.js';
|
|
2
|
+
import _objectWithoutPropertiesLoose from '../../../../../../@babel_runtime@7.23.9/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js';
|
|
3
|
+
import createBreakpoints from './createBreakpoints.js';
|
|
4
|
+
import shape from './shape.js';
|
|
5
|
+
import createSpacing from './createSpacing.js';
|
|
6
|
+
import styleFunctionSx from '../styleFunctionSx/styleFunctionSx.js';
|
|
7
|
+
import defaultSxConfig from '../styleFunctionSx/defaultSxConfig.js';
|
|
8
|
+
import deepmerge from '../../../../../../@mui_utils@5.15.6_@types_react@18.2.48_react@18.2.0/node_modules/@mui/utils/esm/deepmerge.js';
|
|
9
|
+
|
|
10
|
+
const _excluded = ["breakpoints", "palette", "spacing", "shape"];
|
|
11
|
+
function createTheme(options = {}, ...args) {
|
|
12
|
+
const {
|
|
13
|
+
breakpoints: breakpointsInput = {},
|
|
14
|
+
palette: paletteInput = {},
|
|
15
|
+
spacing: spacingInput,
|
|
16
|
+
shape: shapeInput = {}
|
|
17
|
+
} = options,
|
|
18
|
+
other = _objectWithoutPropertiesLoose(options, _excluded);
|
|
19
|
+
const breakpoints = createBreakpoints(breakpointsInput);
|
|
20
|
+
const spacing = createSpacing(spacingInput);
|
|
21
|
+
let muiTheme = deepmerge({
|
|
22
|
+
breakpoints,
|
|
23
|
+
direction: 'ltr',
|
|
24
|
+
components: {},
|
|
25
|
+
// Inject component definitions.
|
|
26
|
+
palette: _extends({
|
|
27
|
+
mode: 'light'
|
|
28
|
+
}, paletteInput),
|
|
29
|
+
spacing,
|
|
30
|
+
shape: _extends({}, shape, shapeInput)
|
|
31
|
+
}, other);
|
|
32
|
+
muiTheme = args.reduce((acc, argument) => deepmerge(acc, argument), muiTheme);
|
|
33
|
+
muiTheme.unstable_sxConfig = _extends({}, defaultSxConfig, other == null ? void 0 : other.unstable_sxConfig);
|
|
34
|
+
muiTheme.unstable_sx = function sx(props) {
|
|
35
|
+
return styleFunctionSx({
|
|
36
|
+
sx: props,
|
|
37
|
+
theme: this
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
return muiTheme;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export { createTheme as default };
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import style from './style.js';
|
|
2
|
+
import compose from './compose.js';
|
|
3
|
+
import { createUnaryUnit, getValue } from './spacing.js';
|
|
4
|
+
import { handleBreakpoints } from './breakpoints.js';
|
|
5
|
+
import responsivePropType from './responsivePropType.js';
|
|
6
|
+
|
|
7
|
+
// false positive
|
|
8
|
+
// eslint-disable-next-line react/function-component-definition
|
|
9
|
+
const gap = props => {
|
|
10
|
+
if (props.gap !== undefined && props.gap !== null) {
|
|
11
|
+
const transformer = createUnaryUnit(props.theme, 'spacing', 8, 'gap');
|
|
12
|
+
const styleFromPropValue = propValue => ({
|
|
13
|
+
gap: getValue(transformer, propValue)
|
|
14
|
+
});
|
|
15
|
+
return handleBreakpoints(props, props.gap, styleFromPropValue);
|
|
16
|
+
}
|
|
17
|
+
return null;
|
|
18
|
+
};
|
|
19
|
+
gap.propTypes = process.env.NODE_ENV !== 'production' ? {
|
|
20
|
+
gap: responsivePropType
|
|
21
|
+
} : {};
|
|
22
|
+
gap.filterProps = ['gap'];
|
|
23
|
+
|
|
24
|
+
// false positive
|
|
25
|
+
// eslint-disable-next-line react/function-component-definition
|
|
26
|
+
const columnGap = props => {
|
|
27
|
+
if (props.columnGap !== undefined && props.columnGap !== null) {
|
|
28
|
+
const transformer = createUnaryUnit(props.theme, 'spacing', 8, 'columnGap');
|
|
29
|
+
const styleFromPropValue = propValue => ({
|
|
30
|
+
columnGap: getValue(transformer, propValue)
|
|
31
|
+
});
|
|
32
|
+
return handleBreakpoints(props, props.columnGap, styleFromPropValue);
|
|
33
|
+
}
|
|
34
|
+
return null;
|
|
35
|
+
};
|
|
36
|
+
columnGap.propTypes = process.env.NODE_ENV !== 'production' ? {
|
|
37
|
+
columnGap: responsivePropType
|
|
38
|
+
} : {};
|
|
39
|
+
columnGap.filterProps = ['columnGap'];
|
|
40
|
+
|
|
41
|
+
// false positive
|
|
42
|
+
// eslint-disable-next-line react/function-component-definition
|
|
43
|
+
const rowGap = props => {
|
|
44
|
+
if (props.rowGap !== undefined && props.rowGap !== null) {
|
|
45
|
+
const transformer = createUnaryUnit(props.theme, 'spacing', 8, 'rowGap');
|
|
46
|
+
const styleFromPropValue = propValue => ({
|
|
47
|
+
rowGap: getValue(transformer, propValue)
|
|
48
|
+
});
|
|
49
|
+
return handleBreakpoints(props, props.rowGap, styleFromPropValue);
|
|
50
|
+
}
|
|
51
|
+
return null;
|
|
52
|
+
};
|
|
53
|
+
rowGap.propTypes = process.env.NODE_ENV !== 'production' ? {
|
|
54
|
+
rowGap: responsivePropType
|
|
55
|
+
} : {};
|
|
56
|
+
rowGap.filterProps = ['rowGap'];
|
|
57
|
+
const gridColumn = style({
|
|
58
|
+
prop: 'gridColumn'
|
|
59
|
+
});
|
|
60
|
+
const gridRow = style({
|
|
61
|
+
prop: 'gridRow'
|
|
62
|
+
});
|
|
63
|
+
const gridAutoFlow = style({
|
|
64
|
+
prop: 'gridAutoFlow'
|
|
65
|
+
});
|
|
66
|
+
const gridAutoColumns = style({
|
|
67
|
+
prop: 'gridAutoColumns'
|
|
68
|
+
});
|
|
69
|
+
const gridAutoRows = style({
|
|
70
|
+
prop: 'gridAutoRows'
|
|
71
|
+
});
|
|
72
|
+
const gridTemplateColumns = style({
|
|
73
|
+
prop: 'gridTemplateColumns'
|
|
74
|
+
});
|
|
75
|
+
const gridTemplateRows = style({
|
|
76
|
+
prop: 'gridTemplateRows'
|
|
77
|
+
});
|
|
78
|
+
const gridTemplateAreas = style({
|
|
79
|
+
prop: 'gridTemplateAreas'
|
|
80
|
+
});
|
|
81
|
+
const gridArea = style({
|
|
82
|
+
prop: 'gridArea'
|
|
83
|
+
});
|
|
84
|
+
compose(gap, columnGap, rowGap, gridColumn, gridRow, gridAutoFlow, gridAutoColumns, gridAutoRows, gridTemplateColumns, gridTemplateRows, gridTemplateAreas, gridArea);
|
|
85
|
+
|
|
86
|
+
export { columnGap, gap, gridArea, gridAutoColumns, gridAutoFlow, gridAutoRows, gridColumn, gridRow, gridTemplateAreas, gridTemplateColumns, gridTemplateRows, rowGap };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import deepmerge from '../../../../../@mui_utils@5.15.6_@types_react@18.2.48_react@18.2.0/node_modules/@mui/utils/esm/deepmerge.js';
|
|
2
|
+
|
|
3
|
+
function merge(acc, item) {
|
|
4
|
+
if (!item) {
|
|
5
|
+
return acc;
|
|
6
|
+
}
|
|
7
|
+
return deepmerge(acc, item, {
|
|
8
|
+
clone: false // No need to clone deep, it's way faster.
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { merge as default };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import style from './style.js';
|
|
2
|
+
import compose from './compose.js';
|
|
3
|
+
|
|
4
|
+
function paletteTransform(value, userValue) {
|
|
5
|
+
if (userValue === 'grey') {
|
|
6
|
+
return userValue;
|
|
7
|
+
}
|
|
8
|
+
return value;
|
|
9
|
+
}
|
|
10
|
+
const color = style({
|
|
11
|
+
prop: 'color',
|
|
12
|
+
themeKey: 'palette',
|
|
13
|
+
transform: paletteTransform
|
|
14
|
+
});
|
|
15
|
+
const bgcolor = style({
|
|
16
|
+
prop: 'bgcolor',
|
|
17
|
+
cssProperty: 'backgroundColor',
|
|
18
|
+
themeKey: 'palette',
|
|
19
|
+
transform: paletteTransform
|
|
20
|
+
});
|
|
21
|
+
const backgroundColor = style({
|
|
22
|
+
prop: 'backgroundColor',
|
|
23
|
+
themeKey: 'palette',
|
|
24
|
+
transform: paletteTransform
|
|
25
|
+
});
|
|
26
|
+
compose(color, bgcolor, backgroundColor);
|
|
27
|
+
|
|
28
|
+
export { backgroundColor, bgcolor, color, paletteTransform };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import _objectWithoutPropertiesLoose from '../../../../../@babel_runtime@7.23.9/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js';
|
|
2
|
+
import capitalize from '../../../../../@mui_utils@5.15.6_@types_react@18.2.48_react@18.2.0/node_modules/@mui/utils/esm/capitalize/capitalize.js';
|
|
3
|
+
|
|
4
|
+
const _excluded = ["variant"];
|
|
5
|
+
function isEmpty(string) {
|
|
6
|
+
return string.length === 0;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Generates string classKey based on the properties provided. It starts with the
|
|
11
|
+
* variant if defined, and then it appends all other properties in alphabetical order.
|
|
12
|
+
* @param {object} props - the properties for which the classKey should be created.
|
|
13
|
+
*/
|
|
14
|
+
function propsToClassKey(props) {
|
|
15
|
+
const {
|
|
16
|
+
variant
|
|
17
|
+
} = props,
|
|
18
|
+
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
19
|
+
let classKey = variant || '';
|
|
20
|
+
Object.keys(other).sort().forEach(key => {
|
|
21
|
+
if (key === 'color') {
|
|
22
|
+
classKey += isEmpty(classKey) ? props[key] : capitalize(props[key]);
|
|
23
|
+
} else {
|
|
24
|
+
classKey += `${isEmpty(classKey) ? key : capitalize(key)}${capitalize(props[key].toString())}`;
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
return classKey;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export { propsToClassKey as default };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import PropTypes from '../../../../../prop-types@15.8.1/node_modules/prop-types/index.js';
|
|
2
|
+
|
|
3
|
+
const responsivePropType = process.env.NODE_ENV !== 'production' ? PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.object, PropTypes.array]) : {};
|
|
4
|
+
const responsivePropType$1 = responsivePropType;
|
|
5
|
+
|
|
6
|
+
export { responsivePropType$1 as default };
|