Skip to content

Commit

Permalink
merge with master
Browse files Browse the repository at this point in the history
  • Loading branch information
britt6612 committed Dec 17, 2024
2 parents d4eaac4 + 0a2accd commit 1dcc22b
Show file tree
Hide file tree
Showing 19 changed files with 2,974 additions and 2,717 deletions.
11 changes: 11 additions & 0 deletions .changeset/lovely-penguins-rule.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
"hpe-design-tokens": minor
---

- Removed `color.text.xweak`, `color.icon.xweak`, `color.text.brand`, `color.icon.brand`
- Renamed `enabled` in component tokens to `rest`
- Removed `checkbox.control.selected.disabled` (use `checkbox.control.disabled.rest`)
- Removed `radiobutton.control.selected.disabled` (use `radiobutton.control.disabled.rest`)
- Removed `dataCell.primary.disabled (use `dataCell.disabld.rest`)
- Updated Anchor token structure from `anchor.[size].default` to `anchor.default.[size]` in alignment with button token structure.
- Updated component state tokens for all but formField tokens to align with new state combinations.
12 changes: 12 additions & 0 deletions .changeset/tame-elephants-notice.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
'hpe-design-tokens': minor
---

- Added `formField.input.group.container.error.rest` tokens
- Removed `formField.input.group.item.status.critical` tokens
- Removed formField text "error" tokens for complex states, now only support `error.rest`, `error.hover`, `error.focus`.
- Renamed formField "enabled" tokens to "rest"
- Renamed formField "status.critical" tokens to "error.rest"
- Renamed formField "disabled" tokens to "disabled.rest"
- Renamed formField "readOnly" tokens to "readOnly.rest"
- Renamed `base.static` tokens to `static`.
3 changes: 3 additions & 0 deletions design-tokens-manager/src/routes/Scaler/Results.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ export const Results = ({
<ScaleToolbar
direction="row-reverse"
scale={scale}
settings={{ base, contentBase, factor, steps, nearest }}
contentSizes={tshirtContent}
spacingSizes={tshirtSpacing}
open={open}
setOpen={setOpen}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,24 @@ import { Box, Button } from 'grommet';
import { Sidebar } from 'grommet-icons';
import { CopyButton } from '../../../components/CopyButton';

export const ScaleToolbar = ({ scale, open, setOpen, ...rest }) => {
export const ScaleToolbar = ({
scale: scaleProp,
settings,
contentSizes,
spacingSizes,
open,
setOpen,
...rest
}) => {
const scale = {
name: `${settings.base}-${settings.factor}-${settings.nearest}-${settings.steps}`,
description: `${settings.base}px based scale at ${settings.factor} factor. Rounded to ${settings.nearest}px grid unit with ${settings.steps} steps`,
settings: settings,
scale: scaleProp,
content: contentSizes,
spacing: spacingSizes,
};

return (
<Box gap="xsmall" flex={false} {...rest}>
<Button
Expand Down
2 changes: 1 addition & 1 deletion design-tokens/src/formats/commonJs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const commonJs: FormatFn = async ({
}: FormatFnArguments) => {
const { prefix } = platform;
const tokens = prefix ? { [prefix]: dictionary.tokens } : dictionary.tokens;
//

const output = `${await fileHeader({
file,
})}module.exports = ${JSON.stringify(
Expand Down
4 changes: 2 additions & 2 deletions design-tokens/src/token_export.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,12 +205,12 @@ export function tokenFilesFromLocalVariables(
let token: Token;
// TO DO this is temp way of handling the gradient on the primary button background
// which is only stored in code but handled as a solid color in Figma
if (variable.name === 'button/primary/enabled/background') {
if (variable.name === 'button/primary/rest/background') {
const componentTokens = fs.readFileSync(
'tokens/component/component.default.json',
);
const parsed = JSON.parse(componentTokens.toString());
token = parsed.button.primary.enabled.background;
token = parsed.button.primary.rest.background;
} else {
token = {
$type: tokenTypeFromVariable(variable),
Expand Down
Loading

0 comments on commit 1dcc22b

Please sign in to comment.