Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@commercetools-uikit/stamp

Package Overview
Dependencies
Maintainers
3
Versions
844
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@commercetools-uikit/stamp - npm Package Compare versions

Comparing version 0.0.0-canary-2020726173227 to 0.0.0-canary-202092715477

14

CHANGELOG.md
# @commercetools-uikit/stamp
## 0.0.0-canary-2020726173227
## 0.0.0-canary-202092715477
### Minor Changes
- [`82d39a7`](https://github.com/commercetools/ui-kit/commit/82d39a7aedcc821caece41efa302ad2a9c37c92f) [#1638](https://github.com/commercetools/ui-kit/pull/1638) Thanks [@islam3zzat](https://github.com/islam3zzat)! - Add a new prop (isCondensed) for the Stamp component to allow for stamps with small paddings
## 10.37.1
### Patch Changes
- [`ecc94d5`](https://github.com/commercetools/ui-kit/commit/ecc94d5fe9dcf30a04c8d3f137ccda9761b7495c) [#1615](https://github.com/commercetools/ui-kit/pull/1615) Thanks [@emmenko](https://github.com/emmenko)! - Fix usage example of `Stamp`
## 10.31.0
### Minor Changes
- [`9280034`](https://github.com/commercetools/ui-kit/commit/928003415b7e2f865b3a423d95644b26cad25387) [#1527](https://github.com/commercetools/ui-kit/pull/1527) Thanks [@adnasa](https://github.com/adnasa)! - add `generate-readme` for stamp, loading-spinner and tag

@@ -8,0 +20,0 @@

15

dist/stamp.cjs.js

@@ -8,3 +8,2 @@ 'use strict';

var designSystem = require('@commercetools-uikit/design-system');
var InsetSquish = require('@commercetools-uikit/spacings-inset-squish');

@@ -14,3 +13,2 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
var InsetSquish__default = /*#__PURE__*/_interopDefaultLegacy(InsetSquish);

@@ -67,2 +65,6 @@ function _defineProperty(obj, key, value) {

var availableTones = ['critical', 'warning', 'positive', 'information', 'primary', 'secondary'];
var getPaddingStyle = function getPaddingStyle(props) {
if (props.isCondensed) return core.css("padding:1px ", designSystem.customProperties.spacingXs, ";");
return core.css("padding:", designSystem.customProperties.spacingXs, " ", designSystem.customProperties.spacingS, ";");
};
var getToneStyles = function getToneStyles(props, theme) {

@@ -106,7 +108,5 @@ var overwrittenVars = _objectSpread2(_objectSpread2({}, designSystem.customProperties), theme);

css: function css(theme) {
return [getStampStyles(props, theme), getToneStyles(props, theme)];
return [getStampStyles(props, theme), getToneStyles(props, theme), getPaddingStyle(props)];
}
}, core.jsx(InsetSquish__default['default'], {
scale: "s"
}, props.children));
}, props.children);
};

@@ -116,8 +116,9 @@ Stamp.displayName = 'Stamp';

tone: PropTypes__default['default'].oneOf(availableTones).isRequired,
isCondensed: PropTypes__default['default'].bool,
children: PropTypes__default['default'].node.isRequired
} : {};
var version = '0.0.0-canary-2020726173227';
var version = '0.0.0-canary-202092715477';
exports.default = Stamp;
exports.version = version;
import PropTypes from 'prop-types';
import { jsx, css } from '@emotion/core';
import { customProperties } from '@commercetools-uikit/design-system';
import InsetSquish from '@commercetools-uikit/spacings-inset-squish';

@@ -56,2 +55,6 @@ function _defineProperty(obj, key, value) {

var availableTones = ['critical', 'warning', 'positive', 'information', 'primary', 'secondary'];
var getPaddingStyle = function getPaddingStyle(props) {
if (props.isCondensed) return css("padding:1px ", customProperties.spacingXs, ";");
return css("padding:", customProperties.spacingXs, " ", customProperties.spacingS, ";");
};
var getToneStyles = function getToneStyles(props, theme) {

@@ -95,7 +98,5 @@ var overwrittenVars = _objectSpread2(_objectSpread2({}, customProperties), theme);

css: function css(theme) {
return [getStampStyles(props, theme), getToneStyles(props, theme)];
return [getStampStyles(props, theme), getToneStyles(props, theme), getPaddingStyle(props)];
}
}, jsx(InsetSquish, {
scale: "s"
}, props.children));
}, props.children);
};

@@ -105,8 +106,9 @@ Stamp.displayName = 'Stamp';

tone: PropTypes.oneOf(availableTones).isRequired,
isCondensed: PropTypes.bool,
children: PropTypes.node.isRequired
} : {};
var version = '0.0.0-canary-2020726173227';
var version = '0.0.0-canary-202092715477';
export default Stamp;
export { version };
{
"name": "@commercetools-uikit/stamp",
"version": "0.0.0-canary-2020726173227",
"version": "0.0.0-canary-202092715477",
"description": "Stamps are visual labels which hold small amounts of information regarding an item. (E.g Indicating if a product is published in a list).",

@@ -22,3 +22,2 @@ "main": "dist/stamp.cjs.js",

"@commercetools-uikit/design-system": "10.18.4",
"@commercetools-uikit/spacings-inset-squish": "10.30.1",
"@emotion/core": "^10.0.34",

@@ -25,0 +24,0 @@ "prop-types": "15.7.2"

@@ -34,7 +34,7 @@ <!-- THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -->

import React from 'react';
import Stamp from '@commercetools-uikit/card';
import Stamp from '@commercetools-uikit/stamp';
import Text from '@commercetools-uikit/text';
const Example = () => (
<Stamp>
<Stamp tone="primary">
<Text.Detail>Hello</Text.Detail>

@@ -49,5 +49,6 @@ </Stamp>

| Props | Type | Required | Default | Description |
| ---------- | ------------------------------------------------------------------------------------------------------------------ | :------: | ------- | ------------------------------- |
| `tone` | `enum`<br>Possible values:<br>`'critical' \| 'warning' \| 'positive' \| 'information' \| 'primary' \| 'secondary'` | ✅ | | Indicates color scheme of stamp |
| `children` | `node` | ✅ | | |
| Props | Type | Required | Default | Description |
| ------------- | ------------------------------------------------------------------------------------------------------------------ | :------: | ------- | ----------------------------------- |
| `tone` | `enum`<br>Possible values:<br>`'critical' \| 'warning' \| 'positive' \| 'information' \| 'primary' \| 'secondary'` | ✅ | | Indicates the color scheme of stamp |
| `isCondensed` | `bool` | | | |
| `children` | `node` | ✅ | | |
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc