Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
@astro-my/design-systems-demo-v1
Advanced tools
✨ Component library based on our design system 🛠
$ yarn add @astro-my/design-system
# or
$ npm install --save @astro-my/design-system
This component library comes with some peer dependencies which are required to be available in any project consuming it. These include but may not be limited to: moment
, moment-timezone
, react
, react-dom
, react-intl
,@material-ui/core
,@material-ui/icons
and react-router-dom
. An up-to-date list with their respective version ranges can be found in the package.json. Please make sure all packages are installed within your application for the component library to be able to work as expected.
The package's main export contains all UI components.
import {
Header,
Article,
Grid,
Footer,
// etc.
} from '@astro-my/design-system';
When you are developing your application using UI Kit components, chances you want to use the same design tokens as our design system. We provide them through both CSS variables and JavaScript variables.
We expose the CSS variables from the @astro-my/design-system/materials/custom-properties.css
file.
Importing css variables in css files
You will need a postcss-import plugin, and a postcss variable plugin: either postcss-custom-properties or postcss-css-variables would work.
@import '@astro-my/design-system/materials/custom-properties.css';
.container {
padding: var(--spacing-l);
}
// wherever you process your CSS
postcss([postcssImportPlugin(), postcssCustomProperties()]);
Using postcss-custom-properties and importFrom
The ui-kit css variables can also be injected using postcss-custom-properties, removing the need to import them directly inside your css files.
/* no import required! */
.container {
padding: var(--spacing-l);
}
// wherever you process your CSS
postcss([
postcssCustomProperties({
preserve: false,
importFrom: require.resolve(
'@astro-my/design-system/materials/custom-properties.css'
),
}),
]);
Accessing JavaScript variables and design tokens
You can also access the JavaScript variables like this
import { customProperties } from '@astro-my/design-system';
const primary = customProperties.colorPrimary;
Please look at the file itself to inspect which variables are available (documentation will be provided in the future).
Available at http://designsystem.eco.astro.com.my.
FAQs
UI component library based on our Design System
We found that @astro-my/design-systems-demo-v1 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.