@os-design/website
Advanced tools
Comparing version 1.0.198 to 1.0.199
@@ -8,16 +8,16 @@ "use strict"; | ||
exports["default"] = void 0; | ||
var _react = _interopRequireWildcard(require("react")); | ||
var _styles = require("@os-design/styles"); | ||
var _utils = require("@os-design/utils"); | ||
var _react = require("@emotion/react"); | ||
var _styled = _interopRequireDefault(require("@emotion/styled")); | ||
var _theming = require("@os-design/theming"); | ||
var _core = require("@os-design/core"); | ||
var _react2 = require("@emotion/react"); | ||
var _media = require("@os-design/media"); | ||
var _styles = require("@os-design/styles"); | ||
var _theming = require("@os-design/theming"); | ||
var _utils = require("@os-design/utils"); | ||
var _react2 = _interopRequireWildcard(require("react")); | ||
var _excluded = ["bgUrl", "bgProps", "limitedWidth", "centered", "size", "children"], | ||
_excluded2 = ["className"]; | ||
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5; | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
@@ -29,3 +29,3 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } | ||
var hasBgStyles = function hasBgStyles(p) { | ||
return p.hasBg && (0, _react2.css)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n & > *:not(.", ") {\n z-index: 1;\n }\n "])), BG_IMAGE_CLASS_NAME); | ||
return p.hasBg && (0, _react.css)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n & > *:not(.", ") {\n z-index: 1;\n }\n "])), BG_IMAGE_CLASS_NAME); | ||
}; | ||
@@ -47,3 +47,3 @@ var Container = (0, _styled["default"])('section', (0, _utils.omitEmotionProps)('hasBg', 'size'))(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: relative;\n\n display: flex;\n flex-direction: column;\n align-items: center;\n\n padding: ", "em\n ", "em;\n ", " {\n padding: ", "em\n ", "em;\n }\n\n color: ", ";\n\n ", ";\n ", ";\n"])), function (p) { | ||
var centeredStyles = function centeredStyles(p) { | ||
return p.centered && (0, _react2.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n align-items: center;\n text-align: center;\n "]))); | ||
return p.centered && (0, _react.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n align-items: center;\n text-align: center;\n "]))); | ||
}; | ||
@@ -57,3 +57,3 @@ var LimitedWidth = (0, _styled["default"])('div', (0, _utils.omitEmotionProps)('centered'))(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n width: 100%;\n max-width: ", "em;\n ", ";\n"])), function (p) { | ||
*/ | ||
var Section = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) { | ||
var Section = /*#__PURE__*/(0, _react2.forwardRef)(function (_ref, ref) { | ||
var bgUrl = _ref.bgUrl, | ||
@@ -75,3 +75,3 @@ _ref$bgProps = _ref.bgProps, | ||
overrides = _useTheme.overrides; | ||
var section = /*#__PURE__*/_react["default"].createElement(Container, _extends({ | ||
var section = /*#__PURE__*/_react2["default"].createElement(Container, _extends({ | ||
hasBg: !!bgUrl, | ||
@@ -81,5 +81,5 @@ size: size | ||
ref: ref | ||
}), limitedWidth ? /*#__PURE__*/_react["default"].createElement(LimitedWidth, { | ||
}), limitedWidth ? /*#__PURE__*/_react2["default"].createElement(LimitedWidth, { | ||
centered: centered | ||
}, children) : children, bgUrl && /*#__PURE__*/_react["default"].createElement(BackgroundImage, _extends({ | ||
}, children) : children, bgUrl && /*#__PURE__*/_react2["default"].createElement(BackgroundImage, _extends({ | ||
url: bgUrl, | ||
@@ -92,3 +92,3 @@ cover: true, | ||
if (!bgUrl) return section; | ||
return /*#__PURE__*/_react["default"].createElement(_theming.ThemeOverrider, { | ||
return /*#__PURE__*/_react2["default"].createElement(_theming.ThemeOverrider, { | ||
activeTheme: "dark", | ||
@@ -95,0 +95,0 @@ overrides: overrides |
@@ -8,14 +8,14 @@ "use strict"; | ||
exports["default"] = void 0; | ||
var _react = _interopRequireWildcard(require("react")); | ||
var _react = require("@emotion/react"); | ||
var _styled = _interopRequireDefault(require("@emotion/styled")); | ||
var _react2 = require("@emotion/react"); | ||
var _utils = require("@os-design/utils"); | ||
var _media = require("@os-design/media"); | ||
var _theming = require("@os-design/theming"); | ||
var _utils = require("@os-design/utils"); | ||
var _react2 = _interopRequireWildcard(require("react")); | ||
var _Section = _interopRequireDefault(require("../Section")); | ||
var _excluded = ["media", "children"]; | ||
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7; | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
@@ -26,6 +26,6 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } | ||
var containerHasMediaStyles = function containerHasMediaStyles(p) { | ||
return p.hasMedia && (0, _react2.css)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: grid;\n\n grid-template-columns: 1fr;\n grid-template-rows: auto auto;\n grid-template-areas: 'content' 'media';\n grid-row-gap: ", "em;\n\n ", " {\n grid-template-columns:\n minmax(\n ", "%,\n ", "em\n )\n ", "%;\n grid-template-rows: 1fr;\n grid-template-areas: 'content media';\n grid-column-gap: ", "%;\n padding-right: ", "%;\n }\n "])), p.theme.sectionFeatureRowGap, _media.m.min.md, 100 - p.theme.sectionFeatureMediaWidthPercent, p.theme.sectionFeatureContentMaxWidth, p.theme.sectionFeatureMediaWidthPercent, p.theme.sectionFeatureColumnGapPercent, p.theme.sectionFeatureColumnGapPercent * 2); | ||
return p.hasMedia && (0, _react.css)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: grid;\n\n grid-template-columns: 1fr;\n grid-template-rows: auto auto;\n grid-template-areas: 'content' 'media';\n grid-row-gap: ", "em;\n\n ", " {\n grid-template-columns:\n minmax(\n ", "%,\n ", "em\n )\n ", "%;\n grid-template-rows: 1fr;\n grid-template-areas: 'content media';\n grid-column-gap: ", "%;\n padding-right: ", "%;\n }\n "])), p.theme.sectionFeatureRowGap, _media.m.min.md, 100 - p.theme.sectionFeatureMediaWidthPercent, p.theme.sectionFeatureContentMaxWidth, p.theme.sectionFeatureMediaWidthPercent, p.theme.sectionFeatureColumnGapPercent, p.theme.sectionFeatureColumnGapPercent * 2); | ||
}; | ||
var containerNotHasMediaStyles = function containerNotHasMediaStyles(p) { | ||
return !p.hasMedia && (0, _react2.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n max-width: ", "em;\n "])), p.theme.sectionFeatureContentMaxWidth); | ||
return !p.hasMedia && (0, _react.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n max-width: ", "em;\n "])), p.theme.sectionFeatureContentMaxWidth); | ||
}; | ||
@@ -38,3 +38,3 @@ var Container = (0, _styled["default"])('div', (0, _utils.omitEmotionProps)('hasMedia'))(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n color: ", ";\n ", ";\n ", ";\n"])), function (p) { | ||
var sectionHasMediaStyles = function sectionHasMediaStyles(p) { | ||
return p.hasMedia && (0, _react2.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n ", " {\n &:nth-of-type(even) {\n & > div {\n grid-template-areas: 'media content';\n grid-template-columns: ", "% minmax(\n ", "%,\n ", "em\n );\n }\n }\n }\n "])), _media.m.min.md, p.theme.sectionFeatureMediaWidthPercent, 100 - p.theme.sectionFeatureMediaWidthPercent, p.theme.sectionFeatureContentMaxWidth); | ||
return p.hasMedia && (0, _react.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n ", " {\n &:nth-of-type(even) {\n & > div {\n grid-template-areas: 'media content';\n grid-template-columns: ", "% minmax(\n ", "%,\n ", "em\n );\n }\n }\n }\n "])), _media.m.min.md, p.theme.sectionFeatureMediaWidthPercent, 100 - p.theme.sectionFeatureMediaWidthPercent, p.theme.sectionFeatureContentMaxWidth); | ||
}; | ||
@@ -46,13 +46,13 @@ var StyledSection = (0, _styled["default"])(_Section["default"], (0, _utils.omitEmotionProps)('hasMedia'))(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n ", ";\n"])), sectionHasMediaStyles); | ||
*/ | ||
var SectionFeature = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) { | ||
var SectionFeature = /*#__PURE__*/(0, _react2.forwardRef)(function (_ref, ref) { | ||
var media = _ref.media, | ||
children = _ref.children, | ||
rest = _objectWithoutProperties(_ref, _excluded); | ||
return /*#__PURE__*/_react["default"].createElement(StyledSection, _extends({ | ||
return /*#__PURE__*/_react2["default"].createElement(StyledSection, _extends({ | ||
hasMedia: !!media | ||
}, rest, { | ||
ref: ref | ||
}), /*#__PURE__*/_react["default"].createElement(Container, { | ||
}), /*#__PURE__*/_react2["default"].createElement(Container, { | ||
hasMedia: !!media | ||
}, /*#__PURE__*/_react["default"].createElement(Content, null, children), media && /*#__PURE__*/_react["default"].createElement(Media, null, media))); | ||
}, /*#__PURE__*/_react2["default"].createElement(Content, null, children), media && /*#__PURE__*/_react2["default"].createElement(Media, null, media))); | ||
}); | ||
@@ -59,0 +59,0 @@ SectionFeature.displayName = 'SectionFeature'; |
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
import React, { forwardRef } from 'react'; | ||
import { sizeStyles } from '@os-design/styles'; | ||
import { omitEmotionProps } from '@os-design/utils'; | ||
import { css } from '@emotion/react'; | ||
import styled from '@emotion/styled'; | ||
import { clr, ThemeOverrider, useTheme } from '@os-design/theming'; | ||
import { Image } from '@os-design/core'; | ||
import { css } from '@emotion/react'; | ||
import { m } from '@os-design/media'; | ||
import { sizeStyles } from '@os-design/styles'; | ||
import { clr, ThemeOverrider, useTheme } from '@os-design/theming'; | ||
import { omitEmotionProps } from '@os-design/utils'; | ||
import React, { forwardRef } from 'react'; | ||
const BG_IMAGE_CLASS_NAME = 'section-bg-image'; | ||
@@ -11,0 +11,0 @@ const hasBgStyles = p => p.hasBg && css` |
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
import React, { forwardRef } from 'react'; | ||
import { css } from '@emotion/react'; | ||
import styled from '@emotion/styled'; | ||
import { css } from '@emotion/react'; | ||
import { omitEmotionProps } from '@os-design/utils'; | ||
import { m } from '@os-design/media'; | ||
import { clr } from '@os-design/theming'; | ||
import { omitEmotionProps } from '@os-design/utils'; | ||
import React, { forwardRef } from 'react'; | ||
import Section from '../Section'; | ||
@@ -9,0 +9,0 @@ const containerHasMediaStyles = p => p.hasMedia && css` |
@@ -0,4 +1,4 @@ | ||
import { ImageProps } from '@os-design/core'; | ||
import { WithSize } from '@os-design/styles'; | ||
import React from 'react'; | ||
import { WithSize } from '@os-design/styles'; | ||
import { ImageProps } from '@os-design/core'; | ||
type JsxSectionProps = Omit<JSX.IntrinsicElements['section'], 'ref'>; | ||
@@ -5,0 +5,0 @@ export interface SectionProps extends JsxSectionProps, WithSize { |
{ | ||
"name": "@os-design/website", | ||
"version": "1.0.198", | ||
"version": "1.0.199", | ||
"license": "UNLICENSED", | ||
@@ -32,7 +32,7 @@ "repository": "git@gitlab.com:os-team/libs/os-design.git", | ||
"dependencies": { | ||
"@os-design/core": "^1.0.196", | ||
"@os-design/core": "^1.0.197", | ||
"@os-design/media": "^1.0.18", | ||
"@os-design/styles": "^1.0.43", | ||
"@os-design/theming": "^1.0.41", | ||
"@os-design/utils": "^1.0.59" | ||
"@os-design/styles": "^1.0.44", | ||
"@os-design/theming": "^1.0.42", | ||
"@os-design/utils": "^1.0.60" | ||
}, | ||
@@ -42,3 +42,3 @@ "devDependencies": { | ||
"@emotion/styled": ">=11", | ||
"@os-design/icons": "^1.0.46" | ||
"@os-design/icons": "^1.0.47" | ||
}, | ||
@@ -51,3 +51,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "115aadc1b30a6b38ef755488be3ded253d6a3c0b" | ||
"gitHead": "0e88d3afc41e36cee61222a039ef1aa4d08115b5" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
67777
Updated@os-design/core@^1.0.197
Updated@os-design/styles@^1.0.44
Updated@os-design/theming@^1.0.42
Updated@os-design/utils@^1.0.60