Skip to content
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
ff7cc10
feat: init progressbar
joacotornello Jul 22, 2025
ac3284a
feat: improved granularity in gradient support from styles package
joacotornello Jul 22, 2025
c21aea1
feat: progressbar skeleton
joacotornello Jul 24, 2025
bbf2c49
fix: styles exports
joacotornello Jul 24, 2025
093e872
Merge branch 'master' into feat/progress-bar
joacotornello Jul 31, 2025
3be98dd
Revert feat: improved granularity in gradient support from styles pac…
joacotornello Jul 31, 2025
3cf8724
feat: adds changelogs and base setup
joacotornello Jul 31, 2025
7d2792f
feat: support className and styles
joacotornello Jul 31, 2025
bfe6194
feat: bump coverage and fix exports
joacotornello Jul 31, 2025
ee824b0
feat: cleaner code and adds progress bar to externals list
joacotornello Jul 31, 2025
af041b4
Merge branch 'master' into feat/progress-bar
joacotornello Jul 31, 2025
affd19f
fix: changelog and version
joacotornello Jul 31, 2025
68aed6e
Merge branch 'master' into feat/progress-bar
joacotornello Aug 1, 2025
035c669
feat: adds ai-interactive appearance in progressbar
joacotornello Aug 1, 2025
ea10c60
fix: removed unnecessary type
joacotornello Aug 1, 2025
89046b2
Update packages/react/src/atomic/ProgressBar/src/progressBar.stories.tsx
joacotornello Aug 1, 2025
c5d9a7a
Update packages/react/src/atomic/ProgressBar/src/progressBar.stories.tsx
joacotornello Aug 1, 2025
9669063
feat: adds note for progressbar value type
joacotornello Aug 1, 2025
b934895
fix: renamed ai-interactive to ai-generative
joacotornello Aug 1, 2025
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
48 changes: 48 additions & 0 deletions .yarn/versions/61e59c2c.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
releases:
"@nimbus-ds/components": minor
"@nimbus-ds/progress-bar": major
"@nimbus-ds/styles": minor
"@nimbus-ds/webpack": minor

declined:
- nimbus-design-system
- "@nimbus-ds/typings"
- "@nimbus-ds/icons"
- "@nimbus-ds/badge"
- "@nimbus-ds/box"
- "@nimbus-ds/button"
- "@nimbus-ds/checkbox"
- "@nimbus-ds/chip"
- "@nimbus-ds/file-uploader"
- "@nimbus-ds/icon"
- "@nimbus-ds/icon-button"
- "@nimbus-ds/input"
- "@nimbus-ds/label"
- "@nimbus-ds/link"
- "@nimbus-ds/list"
- "@nimbus-ds/multi-select"
- "@nimbus-ds/popover"
- "@nimbus-ds/radio"
- "@nimbus-ds/select"
- "@nimbus-ds/skeleton"
- "@nimbus-ds/spinner"
- "@nimbus-ds/tag"
- "@nimbus-ds/text"
- "@nimbus-ds/textarea"
- "@nimbus-ds/thumbnail"
- "@nimbus-ds/title"
- "@nimbus-ds/toast"
- "@nimbus-ds/toggle"
- "@nimbus-ds/tooltip"
- "@nimbus-ds/accordion"
- "@nimbus-ds/alert"
- "@nimbus-ds/card"
- "@nimbus-ds/collapsible"
- "@nimbus-ds/modal"
- "@nimbus-ds/pagination"
- "@nimbus-ds/scroll-pane"
- "@nimbus-ds/segmented-control"
- "@nimbus-ds/sidebar"
- "@nimbus-ds/stepper"
- "@nimbus-ds/table"
- "@nimbus-ds/tabs"
2 changes: 2 additions & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ const config: Config.InitialOptions = {
"@nimbus-ds/toast": "<rootDir>/packages/react/src/atomic/Toast/src",
"@nimbus-ds/toggle": "<rootDir>/packages/react/src/atomic/Toggle/src",
"@nimbus-ds/tooltip": "<rootDir>/packages/react/src/atomic/Tooltip/src",
"@nimbus-ds/progress-bar":
"<rootDir>/packages/react/src/atomic/ProgressBar/src",
// composites
"@nimbus-ds/accordion":
"<rootDir>/packages/react/src/composite/Accordion/src",
Expand Down
6 changes: 6 additions & 0 deletions packages/core/styles/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

Nimbus Styles deprive all styles needed to build nimbus components.

## 2025-08-01 `9.20.0`

#### πŸŽ‰ New features

- Added `progress-bar` new atomic component styles. ([#325](https://github.com/TiendaNube/nimbus-design-system/pull/325) by [@joacotornello](https://github.com/joacotornello))

## 2025-07-30 `9.19.0`

#### πŸŽ‰ New features
Expand Down
1 change: 1 addition & 0 deletions packages/core/styles/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export { link } from "./packages/atomic/link";
export { tooltip } from "./packages/atomic/tooltip";
export { thumbnail } from "./packages/atomic/thumbnail";
export { textarea } from "./packages/atomic/textarea";
export { progressBar } from "./packages/atomic/progressBar";
Comment thread
joacotornello marked this conversation as resolved.

export { accordion } from "./packages/composite/accordion";
export { alert } from "./packages/composite/alert";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import * as styles from "./nimbus-progressBar.css";

export const progressBar = {
classnames: { ...styles },
};
Comment thread
joacotornello marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import { style, styleVariants } from "@vanilla-extract/css";
import { varsThemeBase } from "../../../themes";
import { gradients } from "../../../gradients";

const base = style({
display: "flex",
alignItems: "center",
width: "100%",
height: "0.5rem", // 8px
borderRadius: varsThemeBase.shape.border.radius.full,
backgroundColor: varsThemeBase.colors.neutral.surfaceDisabled,
overflow: "hidden",
position: "relative",
});

const fill = style({
height: "100%",
borderRadius: varsThemeBase.shape.border.radius.full,
transition: `width ${varsThemeBase.motion.speed.slow} ease`,
minWidth: "0.5rem",
});
Comment thread
joacotornello marked this conversation as resolved.

export const container = base;

export const appearance = styleVariants({
primary: [
fill,
{
backgroundColor: varsThemeBase.colors.primary.interactive,
},
],
success: [
fill,
{
backgroundColor: varsThemeBase.colors.success.interactive,
},
],
warning: [
fill,
{
backgroundColor: varsThemeBase.colors.warning.interactive,
},
],
danger: [
fill,
{
backgroundColor: varsThemeBase.colors.danger.interactive,
},
],
neutral: [
fill,
{
backgroundColor: varsThemeBase.colors.neutral.interactive,
},
],
"ai-interactive": [
fill,
{
backgroundImage: gradients.aiGradientInteractive,
},
],
});
6 changes: 6 additions & 0 deletions packages/core/webpack/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

This package is intended for internal use in generating builds of each design system package. It contains all the necessary settings and dependencies to optimize the creation of our builds.

## 2025-08-01 `1.6.0`

#### πŸŽ‰ New features

- Added `ProgressBar` component as an external package. ([#325](https://github.com/TiendaNube/nimbus-design-system/pull/325) by [@joacotornello](https://github.com/joacotornello))

## 2025-03-18 `1.5.0`

#### πŸŽ‰ New features
Expand Down
1 change: 1 addition & 0 deletions packages/core/webpack/src/config/external.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export const externalPackages = {
"@nimbus-ds/tokens": "@nimbus-ds/tokens",
"@nimbus-ds/box": "@nimbus-ds/box",
"@nimbus-ds/chip": "@nimbus-ds/chip",
"@nimbus-ds/progress-bar": "@nimbus-ds/progress-bar",
};

export const externalItems = { ...externalLibs, ...externalPackages };
6 changes: 6 additions & 0 deletions packages/react/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

Nimbus is an open-source Design System created by Tiendanube / Nuvemshop's team to empower and enhance more stories every day, with simplicity, accessibility, consistency and performance.

## 2025-07-31 `5.16.0`

#### πŸŽ‰ New features

- Created new component ProgressBar. ([#323](https://github.com/TiendaNube/nimbus-design-system/pull/323) by [@joacotornello](https://github.com/joacotornello))

## 2025-07-30 `5.15.0`

#### πŸŽ‰ New features
Expand Down
14 changes: 14 additions & 0 deletions packages/react/src/atomic/ProgressBar/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Changelog

The ProgressBar component allows us to display the progress of an operation or task in a visual format.

## 2025-08-01 `1.0.0`

### πŸŽ‰ New features

- Added ProgressBar component. ([#325](https://github.com/TiendaNube/nimbus-design-system/pull/325))
- Added `value` prop to control progress from 0 to 100.
- Added `appearance` prop with variants: primary, success, warning, danger, neutral and ai-interactive.
- Included ProgressBar skeleton component for loading states.
- Implemented accessibility support with ARIA attributes.
- Provided comprehensive TypeScript types and documentation.
51 changes: 51 additions & 0 deletions packages/react/src/atomic/ProgressBar/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# `@nimbus-ds/progress-bar`

[![@nimbus-ds/progress-bar](https://img.shields.io/npm/v/@nimbus-ds/progress-bar?label=%40nimbus-ds%2Fprogress-bar)](https://www.npmjs.com/package/@nimbus-ds/progress-bar)

The ProgressBar component is used to display the progress of an operation or task in a visual format.

## Installation

```sh
$ yarn add @nimbus-ds/progress-bar
# or
$ npm install @nimbus-ds/progress-bar
```

### Component Anatomy

The component consists of a horizontal bar with a fill that represents the progress value as a percentage from 0 to 100.

## Guidelines

We use the ProgressBar component to visually communicate the completion status of operations, tasks, or any measurable progress.

### Variants

The component has 5 appearance variants that can be used according to the context:

- **Neutral** - Used for general progress indication without specific semantic meaning
- **Primary** - Used to highlight important progress or main tasks
- **Success** - Used to indicate positive progress or successful completion stages
- **Warning** - Used to indicate caution or attention-required progress
- **Danger** - Used to indicate critical or error-related progress

### Usage recommendations

- Use to show completion percentage of tasks, uploads, downloads, or any measurable operation
- Ensure the progress value is meaningful and accurately represents the actual completion state
- Consider adding text labels to provide additional context when necessary
- Use appropriate appearance variants to convey the semantic meaning of the progress

### Accessibility

The component includes proper ARIA attributes:
- `role="progressbar"` to identify the element as a progress indicator
- `aria-valuenow` to indicate the current progress value
- `aria-valuemin` and `aria-valuemax` to define the range (0-100)
Comment on lines +42 to +45

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Address minor markdown formatting issues.

Static analysis identified some formatting improvements that would enhance readability:

-### Accessibility
-
-The component includes proper ARIA attributes:
+### Accessibility
+
+The component includes proper ARIA attributes:
+
 - `role="progressbar"` to identify the element as a progress indicator
 - `aria-valuenow` to indicate the current progress value
 - `aria-valuemin` and `aria-valuemax` to define the range (0-100)
πŸ“ Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
The component includes proper ARIA attributes:
- `role="progressbar"` to identify the element as a progress indicator
- `aria-valuenow` to indicate the current progress value
- `aria-valuemin` and `aria-valuemax` to define the range (0-100)
### Accessibility
The component includes proper ARIA attributes:
- `role="progressbar"` to identify the element as a progress indicator
- `aria-valuenow` to indicate the current progress value
- `aria-valuemin` and `aria-valuemax` to define the range (0-100)
🧰 Tools
πŸͺ› markdownlint-cli2 (0.17.2)

43-43: Lists should be surrounded by blank lines

(MD032, blanks-around-lists)

πŸͺ› LanguageTool

[grammar] ~42-~42: Use correct spacing
Context: ...ity The component includes proper ARIA attributes: - role="progressbar" to identify the element as a progress indi...

(QB_NEW_EN_OTHER_ERROR_IDS_5)


[grammar] ~43-~43: There might be a mistake here.
Context: ...to identify the element as a progress indicator -aria-valuenow` to indicate the current progress value -...

(QB_NEW_EN_OTHER)


[grammar] ~44-~44: There might be a mistake here.
Context: ...uenowto indicate the current progress value -aria-valueminandaria-valuemax` to define the range ...

(QB_NEW_EN_OTHER)


[grammar] ~45-~45: There might be a problem here.
Context: ...and aria-valuemax to define the range (0-100) ## Usage View docs [here](https://nimbus.nuvemsho...

(QB_NEW_EN_MERGED_MATCH)

πŸ€– Prompt for AI Agents
In packages/react/src/atomic/ProgressBar/README.md around lines 42 to 45, the
markdown formatting for the ARIA attributes list is inconsistent or unclear. Fix
the formatting by ensuring proper use of markdown syntax for lists, such as
consistent use of hyphens or asterisks, correct indentation, and spacing to
improve readability and maintain markdown standards.


## Usage

View docs [here](https://nimbus.nuvemshop.com.br/documentation/atomic-components/progress-bar).

<img alt="Nimbus" style="margin-bottom: 30px;" src="https://tiendanube.github.io/design-system-nimbus/static/media/nimbus-logo.ab60bd79.png" height="30" />

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Remove trailing space from image element.

-<img alt="Nimbus" style="margin-bottom: 30px;" src="https://tiendanube.github.io/design-system-nimbus/static/media/nimbus-logo.ab60bd79.png" height="30" /> 
+<img alt="Nimbus" style="margin-bottom: 30px;" src="https://tiendanube.github.io/design-system-nimbus/static/media/nimbus-logo.ab60bd79.png" height="30" />
πŸ“ Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<img alt="Nimbus" style="margin-bottom: 30px;" src="https://tiendanube.github.io/design-system-nimbus/static/media/nimbus-logo.ab60bd79.png" height="30" />
<img alt="Nimbus" style="margin-bottom: 30px;" src="https://tiendanube.github.io/design-system-nimbus/static/media/nimbus-logo.ab60bd79.png" height="30" />
🧰 Tools
πŸͺ› markdownlint-cli2 (0.17.2)

51-51: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


51-51: Inline HTML
Element: img

(MD033, no-inline-html)

πŸ€– Prompt for AI Agents
In packages/react/src/atomic/ProgressBar/README.md at line 51, remove the
trailing space after the closing img tag to clean up the markup and avoid
unnecessary whitespace.

36 changes: 36 additions & 0 deletions packages/react/src/atomic/ProgressBar/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"name": "@nimbus-ds/progress-bar",
"version": "0.0.0",
"license": "MIT",
"main": "dist/index.js",
"files": [
"dist",
"README.md"
],
"sideEffects": false,
"scripts": {
"build": "yarn g:webpack",
"clean": "rm -rf dist",
"version": "yarn version"
},
"dependencies": {
"@nimbus-ds/skeleton": "workspace:^"
},
"peerDependencies": {
"@nimbus-ds/styles": "workspace:^",
"react": "^16.8 || ^17.0 || ^18.0",
"react-dom": "^16.8 || ^17.0 || ^18.0"
},
"homepage": "https://nimbus.nuvemshop.com.br/documentation",
"repository": {
"type": "git",
"url": "git+https://github.com/TiendaNube/nimbus-design-system.git"
},
"bugs": {
"url": "https://github.com/TiendaNube/nimbus-design-system/issues"
},
"devDependencies": {
"@nimbus-ds/box": "workspace:^",
"@nimbus-ds/webpack": "workspace:^"
}
}
Comment thread
joacotornello marked this conversation as resolved.
63 changes: 63 additions & 0 deletions packages/react/src/atomic/ProgressBar/src/ProgressBar.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
import React, { ComponentPropsWithRef, forwardRef, useMemo } from "react";
import { progressBar } from "@nimbus-ds/styles";

import { ProgressBarBaseProps, ProgressBarComponents } from "./progressBar.types";
import { ProgressBarSkeleton } from "./components";

/**
* ProgressBar component displays the progress of an operation or task in a visual format.
* It provides a horizontal bar that fills based on the completion percentage.
*
* @component
* @example
* <ProgressBar value={50} appearance="primary" />
*
* @example
* // With skeleton loading state
* <ProgressBar.Skeleton width="200px" />
*/
const ProgressBar = forwardRef<HTMLDivElement, ProgressBarBaseProps>(
(
{
className: _className,
style: _style,
value,
appearance = "neutral",
...rest
},
ref
) => {
// Ensure value is within 0-100 range
const clampedValue = useMemo(() => Math.min(100, Math.max(0, value)), [value]);
const percentage = `${clampedValue}%`;

return (
<div
{...rest}
ref={ref}
className={[progressBar.classnames.container, _className].filter(Boolean).join(" ")}
style={_style}
role="progressbar"
aria-valuenow={clampedValue}
aria-valuemin={0}
aria-valuemax={100}
>
<div
className={progressBar.classnames.appearance[appearance]}
style={{ width: percentage }}
data-testid="progress-bar-fill"
/>
</div>
);
Comment thread
joacotornello marked this conversation as resolved.
}
Comment thread
joacotornello marked this conversation as resolved.
) as React.ForwardRefExoticComponent<
ProgressBarBaseProps & React.RefAttributes<HTMLDivElement>
> &
ProgressBarComponents;

ProgressBar.Skeleton = ProgressBarSkeleton;
ProgressBar.displayName = "ProgressBar";
ProgressBar.Skeleton.displayName = "ProgressBar.Skeleton";

export type ProgressBarProps = ComponentPropsWithRef<typeof ProgressBar>;
export { ProgressBar };
Comment thread
joacotornello marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import type { Meta, StoryObj } from "@storybook/react";
import { ProgressBar } from "../../ProgressBar";

const meta: Meta<typeof ProgressBar.Skeleton> = {
title: "atomic/ProgressBar/ProgressBar.Skeleton",
component: ProgressBar.Skeleton,
tags: ["autodocs"],
};
Comment on lines +4 to +8

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Rename story to PascalCase for Storybook autogeneration

Storybook treats lowercase identifiers as non-component docs. To keep consistency with other atomic stories, use ProgressBarSkeleton instead of basic.

-export const basic: Story = { args: {} };
+export const ProgressBarSkeleton: Story = { args: {} };
πŸ“ Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const meta: Meta<typeof ProgressBar.Skeleton> = {
title: "atomic/ProgressBar/ProgressBar.Skeleton",
component: ProgressBar.Skeleton,
tags: ["autodocs"],
};
const meta: Meta<typeof ProgressBar.Skeleton> = {
title: "atomic/ProgressBar/ProgressBar.Skeleton",
component: ProgressBar.Skeleton,
tags: ["autodocs"],
};
export const ProgressBarSkeleton: Story = { args: {} };
πŸ€– Prompt for AI Agents
In
packages/react/src/atomic/ProgressBar/src/components/ProgressBarSkeleton/ProgressBarSkeleton.stories.tsx
around lines 4 to 8, the story name should be renamed from a lowercase
identifier to PascalCase to ensure Storybook autogeneration treats it as a
component. Change the story name to ProgressBarSkeleton to maintain consistency
with other atomic stories and enable proper documentation generation.


export default meta;
type Story = StoryObj<typeof ProgressBar.Skeleton>;

export const basic: Story = { args: {} };
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React from "react";
import { Skeleton } from "@nimbus-ds/skeleton";
import { ProgressBarSkeletonProperties } from "./ProgressBarSkeleton.types";

const ProgressBarSkeleton: React.FC<ProgressBarSkeletonProperties> = ({
width = "100%",
...rest
}) => <Skeleton width={width} height="0.5rem" borderRadius="0.5rem" {...rest} />;

export { ProgressBarSkeleton };
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { SkeletonProps } from "@nimbus-ds/skeleton";

export type ProgressBarSkeletonProperties = Partial<
Pick<SkeletonProps, "width" | "height" | "data-testid">
>;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { ProgressBarSkeleton } from "./ProgressBarSkeleton";
Loading