Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/host-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"build": "storybook build"
},
"dependencies": {
"@esnet/esnet-tokens": "workspace:*",
"@esnet/pkts-tokens": "workspace:*",
"@rive-app/react-canvas-lite": "^4.20.1",
"doc-ui": "workspace:*",
"lucide-react": "^0.525.0",
Expand Down
4 changes: 2 additions & 2 deletions apps/host-docs/src/breakpoints-tokens.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Meta, ColorPalette, ColorItem } from "@storybook/blocks";
import * as tokens from "@esnet/esnet-tokens/tokens.json";
import * as tokens from "@esnet/pkts-tokens/tokens.json";
import { SpacingDocBlock, Datum, DatumList } from "doc-ui";

<Meta title="Design Tokens/Breakpoints" />
Expand All @@ -17,7 +17,7 @@ return (
<>

<Datum
name={`--esnet-size-breakpoints-width-${widthBreakpointKey}`}
name={`--pkts-size-breakpoints-width-${widthBreakpointKey}`}
value={tokens.size.breakpoints.width[widthBreakpointKey].value || 0}
/>
<br />
Expand Down
6 changes: 3 additions & 3 deletions apps/host-docs/src/color-tokens.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Meta, ColorPalette, ColorItem } from "@storybook/blocks";
import * as tokens from "@esnet/esnet-tokens/tokens.json";
import * as tokens from "@esnet/pkts-tokens/tokens.json";

<Meta title="Design Tokens/Colors" />

Expand All @@ -21,7 +21,7 @@ Here are the inital set of color ramps and color alias tokens
const formattedColorGroups = {};

Object.keys(currentColorRamp).forEach(color => {
formattedColorGroups[`--esnet-color-core-${colorRamp}-${color}`] = currentColorRamp[color].value
formattedColorGroups[`--pkts-color-core-${colorRamp}-${color}`] = currentColorRamp[color].value
})

return (<ColorItem
Expand All @@ -34,7 +34,7 @@ Here are the inital set of color ramps and color alias tokens
const formattedColorGroups = {};

Object.keys(currentColorGroup).forEach(color => {
formattedColorGroups[`--esnet-color-${colorGroup}-${color}`] = currentColorGroup[color].value
formattedColorGroups[`--pkts-color-${colorGroup}-${color}`] = currentColorGroup[color].value
})

return (<ColorItem
Expand Down
4 changes: 2 additions & 2 deletions apps/host-docs/src/design-tokens.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import { Meta } from "@storybook/blocks";

```javascript
// tailwind.config.js
import tokens from '@esnet/esnet-tokens/tokens.json';
import tokens from '@esnet/pkts-tokens/tokens.json';

export default {
theme: {
Expand All @@ -56,7 +56,7 @@ export default {
Use design tokens directly in your custom components:

```typescript
import tokens from '@esnet/esnet-tokens/tokens.json';
import tokens from '@esnet/pkts-tokens/tokens.json';

const CustomButton = styled.button`
background-color: ${tokens.color.primary.base.value};
Expand Down
4 changes: 2 additions & 2 deletions apps/host-docs/src/elevation-and-shadows-tokens.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Meta, ColorPalette, ColorItem } from "@storybook/blocks";
import * as tokens from "@esnet/esnet-tokens/tokens.json";
import * as tokens from "@esnet/pkts-tokens/tokens.json";
import { ShadowDocBlock } from "doc-ui";

<Meta title="Design Tokens/Elevation and Shadows" />
Expand All @@ -15,6 +15,6 @@ import { ShadowDocBlock } from "doc-ui";
### Tokens
{
Object.keys(tokens.default["box-shadow"].core).map(shadowTokenKey => {
return(<ShadowDocBlock name={`--esnet-box-shadow-core-${shadowTokenKey}`} value={tokens.default["box-shadow"].core[shadowTokenKey].value || 0} />)
return(<ShadowDocBlock name={`--pkts-box-shadow-core-${shadowTokenKey}`} value={tokens.default["box-shadow"].core[shadowTokenKey].value || 0} />)
})
}
2 changes: 1 addition & 1 deletion apps/host-docs/src/icon-tokens.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useState } from "react";
import { Meta, IconGallery, IconItem, Title } from "@storybook/blocks";
import * as tokens from "@esnet/esnet-tokens/tokens.json";
import * as tokens from "@esnet/pkts-tokens/tokens.json";
import { icons, Network } from "lucide-react";

<Meta title="Design Tokens/Icons" />
Expand Down
4 changes: 2 additions & 2 deletions apps/host-docs/src/motion-tokens.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Meta, ColorPalette, ColorItem } from "@storybook/blocks";
import * as tokens from "@esnet/esnet-tokens/tokens.json";
import * as tokens from "@esnet/pkts-tokens/tokens.json";
import { DurationDocBlock } from "doc-ui";

<Meta title="Design Tokens/Motion" />
Expand All @@ -18,6 +18,6 @@ Our design tokens provide a set of semantic speeds for motion.

{
Object.keys(tokens.time.duration).map(durationKey => {
return(<DurationDocBlock name={`--esnet-time-duration-${durationKey}`} duration={tokens.time.duration[durationKey].value || 0} />)
return(<DurationDocBlock name={`--pkts-time-duration-${durationKey}`} duration={tokens.time.duration[durationKey].value || 0} />)
})
}
6 changes: 3 additions & 3 deletions apps/host-docs/src/radius-and-borders-tokens.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Meta, ColorPalette, ColorItem } from "@storybook/blocks";
import * as tokens from "@esnet/esnet-tokens/tokens.json";
import * as tokens from "@esnet/pkts-tokens/tokens.json";
import { BorderDocBlock, RadiusDocBlock } from "doc-ui";

<Meta title="Design Tokens/Radiuses and Borders" />
Expand All @@ -17,7 +17,7 @@ They can also be used to create circles with a 1/1 aspect ratio.

{
Object.keys(tokens.size.radius).map(raidusTokenKey => {
return(<RadiusDocBlock name={`--esnet-size-radius-${raidusTokenKey}`} value={tokens.size.radius[raidusTokenKey].value || 0} />)
return(<RadiusDocBlock name={`--pkts-size-radius-${raidusTokenKey}`} value={tokens.size.radius[raidusTokenKey].value || 0} />)
})
}

Expand All @@ -29,6 +29,6 @@ Borders are the layer just inside the margin layer in the box model.

{
Object.keys(tokens.size["border-width"]).map(borderTokenKey => {
return(<BorderDocBlock name={`--esnet-size-border-width-${borderTokenKey}`} value={tokens.size["border-width"][borderTokenKey].value || 0} />)
return(<BorderDocBlock name={`--pkts-size-border-width-${borderTokenKey}`} value={tokens.size["border-width"][borderTokenKey].value || 0} />)
})
}
4 changes: 2 additions & 2 deletions apps/host-docs/src/spacing-tokens.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Meta, ColorPalette, ColorItem } from "@storybook/blocks";
import * as tokens from "@esnet/esnet-tokens/tokens.json";
import * as tokens from "@esnet/pkts-tokens/tokens.json";
import { SpacingDocBlock } from "doc-ui";

<Meta title="Design Tokens/Spacing" />
Expand All @@ -14,6 +14,6 @@ Spacing tokens can be used to represent the values inbetween elements (padding,

{
Object.keys(tokens.size.spacing).map(spacingTokenKey => {
return(<SpacingDocBlock name={`--esnet-size-spacing-${spacingTokenKey}`} value={tokens.size.spacing[spacingTokenKey].value || 0} />)
return(<SpacingDocBlock name={`--pkts-size-spacing-${spacingTokenKey}`} value={tokens.size.spacing[spacingTokenKey].value || 0} />)
})
}
12 changes: 6 additions & 6 deletions apps/host-docs/src/typography.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Meta, ColorPalette, ColorItem } from "@storybook/blocks";
import * as tokens from "@esnet/esnet-tokens/tokens.json";
import * as tokens from "@esnet/pkts-tokens/tokens.json";
import { TypographyDocBlock } from "doc-ui";

{
Expand All @@ -13,7 +13,7 @@ console.log("tokens", tokens)

{
Object.keys(tokens.font.family).map(familyKey => {
const rampKey = ` --esnet-font-family-${familyKey}`;
const rampKey = ` --pkts-font-family-${familyKey}`;
const familyOptions = tokens.font.family[familyKey];

const result = Object.keys(familyOptions).map(familyOptionKey => {
Expand All @@ -32,7 +32,7 @@ const familyOptions = tokens.font.family[familyKey];

{
Object.keys(tokens.typography.header).map(headerRampKey => {
const rampKey = `--esnet-typography-header-${headerRampKey}`;
const rampKey = `--pkts-typography-header-${headerRampKey}`;
const headerOptions = tokens.typography.header[headerRampKey];

const result = Object.keys(headerOptions).map(headerOptionKey => {
Expand All @@ -51,7 +51,7 @@ const headerOptions = tokens.typography.header[headerRampKey];

{
Object.keys(tokens.typography.copy).map(copyRampKey => {
const rampKey = `--esnet-typography-copy-${copyRampKey}`;
const rampKey = `--pkts-typography-copy-${copyRampKey}`;
const copyOptions = tokens.typography.copy[copyRampKey];

const result = Object.keys(copyOptions).map(copyOptionKey => {
Expand All @@ -70,7 +70,7 @@ const copyOptions = tokens.typography.copy[copyRampKey];

{
Object.keys(tokens.typography.label).map(labelRampKey => {
const rampKey = `--esnet-typography-label-${labelRampKey}`;
const rampKey = `--pkts-typography-label-${labelRampKey}`;
const labelOptions = tokens.typography.label[labelRampKey];

const result = Object.keys(labelOptions).map(labelOptionKey => {
Expand All @@ -90,7 +90,7 @@ const labelOptions = tokens.typography.label[labelRampKey];

{
Object.keys(tokens.typography.button).map(buttonRampKey => {
const rampKey = `--esnet-typography-button-${buttonRampKey}`;
const rampKey = `--pkts-typography-button-${buttonRampKey}`;
const buttonOptions = tokens.typography.button[buttonRampKey];

const result = Object.keys(buttonOptions).map(buttonOptionKey => {
Expand Down
2 changes: 1 addition & 1 deletion apps/react-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"preview": "serve storybook-static"
},
"dependencies": {
"@esnet/esnet-tokens": "workspace:*",
"@esnet/pkts-tokens": "workspace:*",
"@esnet/packets-ui-css": "workspace:*",
"@esnet/packets-ui-react": "workspace:*",
"@rive-app/react-canvas-lite": "^4.20.1",
Expand Down
4 changes: 2 additions & 2 deletions apps/react-docs/src/stories/PktsSpinner.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const BrandedESSpinnerRive: Story = {
height: size,
}}
>
<Rive src="/riv/esnetspinner.riv" />
<Rive src="/riv/pkts-spinner.riv" />
</div>
),
name: "PktsSpinner Branded RIVE",
Expand All @@ -48,7 +48,7 @@ export const BrandedESSpinnerRiveEasing: Story = {
height: size,
}}
>
<Rive src="/riv/esnetspinner_easing.riv" />
<Rive src="/riv/pkts-spinner-easing.riv" />
</div>
),
name: "PktsSpinner Branded RIVE with Easing",
Expand Down
2 changes: 1 addition & 1 deletion apps/react-docs/src/stories/PktsTitleSection.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const WithIcons: Story = {
args: {
title: (
<>
ESNet <ZapIcon size={24} />
Accelerating Science <ZapIcon size={24} />
</>
),
subtitle: (
Expand Down
2 changes: 1 addition & 1 deletion apps/web-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"build": "storybook build"
},
"dependencies": {
"@esnet/esnet-tokens": "workspace:*",
"@esnet/pkts-tokens": "workspace:*",
"@esnet/packets-ui-web": "workspace:*",
"@rive-app/react-canvas-lite": "^4.20.1",
"doc-ui": "workspace:*",
Expand Down
6 changes: 3 additions & 3 deletions apps/web-docs/src/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ import { Meta } from "@storybook/blocks";
```

4. Run <br />
`npm i @esnet/esnet-tokens @esnet/packets-ui-react`, <br />
`pnpm i @esnet/esnet-tokens @esnet/packets-ui-react`, or <br />
`yarn add @esnet/esnet-tokens @esnet/packets-ui-react`
`npm i @esnet/pkts-tokens @esnet/packets-ui-react`, <br />
`pnpm i @esnet/pkts-tokens @esnet/packets-ui-react`, or <br />
`yarn add @esnet/pkts-tokens @esnet/packets-ui-react`
5. Add the `packets-ui` class to the body or root level tag of your project.
6. (Optional) Add `dark` or `light` classes to the `packets-ui` node to force light or dark mode only.
7. Add the following to your header element to fetch our fonts from Google's CDN
Expand Down
2 changes: 1 addition & 1 deletion dev-docs/release-process.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This document outlines the processes to reelease a new build of the npm package

## Package Registry

The Gitlab Package Registry can be found [here](https://gitlab.es.net/esnet/packets-design-system/-/packages). It contains npm files for both `@esnet/packets-ui` and `@esnet/esnet-tokens`. If you need to debug artifacts, you can click in on a published version and see downloaded published artifacts.
The Gitlab Package Registry can be found [here](https://gitlab.es.net/esnet/packets-design-system/-/packages). It contains npm files for both `@esnet/packets-ui` and `@esnet/pkts-tokens`. If you need to debug artifacts, you can click in on a published version and see downloaded published artifacts.

## Changesets

Expand Down
8 changes: 4 additions & 4 deletions packages/design-tokens/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
## ESNet UI Design Tokens
## Packets UI Design Tokens

#### Exports

ESNet's code repository of tokens, available in the following formats:
Packets' code repository of tokens, available in the following formats:

- JavaScript constants, including ESM, CJS, and UMD definitions, along with TypeScript declarations
- Tailwind configuration object (soon to support Tailwind v4 configuration)
Expand All @@ -11,11 +11,11 @@ ESNet's code repository of tokens, available in the following formats:

The default export is the JavaScript constants with the TypeScript type declaration.

If you wish to consume any other files, you can conveniently import them as such: `import "@esnet/design-tokens/filename"`, as defined in the package.json's `exports` field.
If you wish to consume any other files, you can conveniently import them as such: `import "@esnet/pkts-tokens/filename"`, as defined in the package.json's `exports` field.

##### Caveats

When importing token files in CSS using PostCSS (or likely any CSS compiler), it struggles to resolve the path names exported by package.json's `exports` field. Import them like this instead: `@import "@esnet/esnet-tokens/dist/esnet-tokens.css";`.
When importing token files in CSS using PostCSS (or likely any CSS compiler), it struggles to resolve the path names exported by package.json's `exports` field. Import them like this instead: `@import "@esnet/pkts-tokens/dist/pkts-tokens.css";`.

#### Build process

Expand Down
14 changes: 7 additions & 7 deletions packages/design-tokens/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
"typography/shorthand",
"duration/units"
],
"prefix": "esnet",
"prefix": "pkts",
"transformGroup": "css",
"buildPath": "dist/",
"files": [
{
"format": "css/variables",
"destination": "esnet-tokens.css",
"destination": "pkts-tokens.css",
"options": {
"outputReferences": true
}
Expand All @@ -32,20 +32,20 @@
"typography/shorthand",
"duration/units"
],
"prefix": "esnet",
"prefix": "pkts",
"transformGroup": "scss",
"buildPath": "dist/",
"files": [
{
"destination": "esnet-tokens.scss",
"destination": "pkts-tokens.scss",
"format": "scss/variables",
"options": {
"outputReferences": true
}
},
{
"format": "css/variables",
"destination": "_esnet-tokens-css-variables.scss",
"destination": "_pkts-tokens-css-variables.scss",
"options": {
"outputReferences": true
}
Expand All @@ -60,7 +60,7 @@
"size/pxToRem",
"duration/units"
],
"prefix": "esnet",
"prefix": "pkts",
"transformGroup": "js",
"buildPath": "dist/",
"files": [
Expand All @@ -82,7 +82,7 @@
"size/pxToRem",
"duration/units"
],
"prefix": "esnet",
"prefix": "pkts",
"transformGroup": "js",
"buildPath": "dist/",
"files": [
Expand Down
4 changes: 2 additions & 2 deletions packages/design-tokens/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions packages/design-tokens/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "@esnet/esnet-tokens",
"name": "@esnet/pkts-tokens",
"version": "1.1.1",
"type": "module",
"description": "A set of reusable UI tokens for the various ESnet frontend systems.",
"description": "A set of reusable UI tokens created by ESnet for various frontend systems.",
"author": "Jason Roeckle",
"scripts": {
"build": "node ./build.js && pnpm run format && rollup --config rollup.config.js",
Expand All @@ -17,8 +17,8 @@
"exports": {
".": {
"types": "./dist/tokens.d.ts",
"import": "./dist/esnet-tokens.esm.js",
"require": "./dist/esnet-tokens.cjs.js",
"import": "./dist/pkts-tokens.esm.js",
"require": "./dist/pkts-tokens.cjs.js",
"default": "./dist/tokens.js"
},
"./*": "./dist/*"
Expand Down
Loading