@useblu/ocean-react 1.123.0 → 1.125.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/Progress/Progress.d.ts +2 -0
- package/Progress/Progress.d.ts.map +1 -1
- package/Progress/img/IconDeterminate.d.ts +8 -0
- package/Progress/img/IconDeterminate.d.ts.map +1 -0
- package/index.es.js +22 -3
- package/index.es.js.map +1 -1
- package/index.js +22 -3
- package/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,18 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [1.125.0](https://github.com/ocean-ds/ocean-web/compare/v1.124.0...v1.125.0) (2026-01-13)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- Introduces a new percentage property to the component to enable loading progress control. ([#1215](https://github.com/ocean-ds/ocean-web/issues/1215)) ([688bf8e](https://github.com/ocean-ds/ocean-web/commit/688bf8e260add9d6e8b042744ddd7d5ecbe686fa))
|
|
11
|
+
|
|
12
|
+
# [1.124.0](https://github.com/ocean-ds/ocean-web/compare/v1.123.0...v1.124.0) (2026-01-08)
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
- card list item ([#1213](https://github.com/ocean-ds/ocean-web/issues/1213)) ([1f6344b](https://github.com/ocean-ds/ocean-web/commit/1f6344bfd098f60bbc48e9c905ee406a674644fa))
|
|
17
|
+
|
|
6
18
|
# [1.123.0](https://github.com/ocean-ds/ocean-web/compare/v1.122.0...v1.123.0) (2025-12-22)
|
|
7
19
|
|
|
8
20
|
### Features
|
package/Progress/Progress.d.ts
CHANGED
|
@@ -2,10 +2,12 @@ import React from 'react';
|
|
|
2
2
|
export type ProgressProps = {
|
|
3
3
|
size?: 'md' | 'lg' | 'sm';
|
|
4
4
|
onColor?: boolean;
|
|
5
|
+
percentage?: undefined | number;
|
|
5
6
|
} & React.ComponentPropsWithoutRef<'div'>;
|
|
6
7
|
declare const Progress: React.ForwardRefExoticComponent<{
|
|
7
8
|
size?: "md" | "lg" | "sm";
|
|
8
9
|
onColor?: boolean;
|
|
10
|
+
percentage?: undefined | number;
|
|
9
11
|
} & Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & React.RefAttributes<HTMLDivElement>>;
|
|
10
12
|
export default Progress;
|
|
11
13
|
//# sourceMappingURL=Progress.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Progress.d.ts","sourceRoot":"","sources":["../../src/Progress/Progress.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Progress.d.ts","sourceRoot":"","sources":["../../src/Progress/Progress.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,MAAM,MAAM,aAAa,GAAG;IAK1B,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAM1B,OAAO,CAAC,EAAE,OAAO,CAAC;IAOlB,UAAU,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;CACjC,GAAG,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC;AAE1C,QAAA,MAAM,QAAQ;WAhBL,IAAI,GAAG,IAAI,GAAG,IAAI;cAMf,OAAO;iBAOJ,SAAS,GAAG,MAAM;kLAsChC,CAAC;AAIF,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type IconDeterminateProps = {
|
|
3
|
+
size: 'sm' | 'md' | 'lg';
|
|
4
|
+
percentage: undefined | number;
|
|
5
|
+
};
|
|
6
|
+
declare const IconDeterminate: React.FunctionComponent<IconDeterminateProps>;
|
|
7
|
+
export default IconDeterminate;
|
|
8
|
+
//# sourceMappingURL=IconDeterminate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconDeterminate.d.ts","sourceRoot":"","sources":["../../../src/Progress/img/IconDeterminate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,KAAK,oBAAoB,GAAG;IAC1B,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACzB,UAAU,EAAE,SAAS,GAAG,MAAM,CAAC;CAChC,CAAC;AAEF,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,iBAAiB,CAAC,oBAAoB,CAyClE,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
package/index.es.js
CHANGED
|
@@ -375,14 +375,33 @@ var IconLg = function () { return (e.createElement("svg", { width: "32", height:
|
|
|
375
375
|
e.createElement("circle", { opacity: "0.4", cx: "16", cy: "16", r: "14", stroke: "#B8C3FF", strokeWidth: "4" }),
|
|
376
376
|
e.createElement("path", { d: "M16 2C17.8385 2 19.659 2.36212 21.3576 3.06569C23.0561 3.76925 24.5995 4.80049 25.8995 6.10051C27.1995 7.40053 28.2307 8.94388 28.9343 10.6424C29.6379 12.341 30 14.1615 30 16", stroke: "#0025E0", strokeWidth: "4", strokeLinecap: "round", strokeLinejoin: "round" }))); };
|
|
377
377
|
|
|
378
|
+
var SIZE_CONFIG = {
|
|
379
|
+
sm: { size: 16, strokeWidth: 3, radius: 6 },
|
|
380
|
+
md: { size: 24, strokeWidth: 4, radius: 10 },
|
|
381
|
+
lg: { size: 32, strokeWidth: 5, radius: 13 },
|
|
382
|
+
};
|
|
383
|
+
var IconDeterminate = function (_a) {
|
|
384
|
+
var size = _a.size, percentage = _a.percentage;
|
|
385
|
+
var config = SIZE_CONFIG[size];
|
|
386
|
+
var circumference = 2 * Math.PI * config.radius;
|
|
387
|
+
var normalizedPercentage = Math.min(100, Math.max(0, percentage !== null && percentage !== void 0 ? percentage : 0));
|
|
388
|
+
var strokeDashoffset = circumference - (normalizedPercentage / 100) * circumference;
|
|
389
|
+
return (e.createElement("svg", { width: config.size, height: config.size, viewBox: "0 0 ".concat(config.size, " ").concat(config.size), fill: "none", xmlns: "http://www.w3.org/2000/svg", className: "ods-progress__determinate" },
|
|
390
|
+
e.createElement("circle", { className: "ods-progress__track", cx: config.size / 2, cy: config.size / 2, r: config.radius, strokeWidth: config.strokeWidth, fill: "none" }),
|
|
391
|
+
e.createElement("circle", { className: "ods-progress__fill", cx: config.size / 2, cy: config.size / 2, r: config.radius, strokeWidth: config.strokeWidth, fill: "none", strokeLinecap: "round", strokeDasharray: circumference, strokeDashoffset: strokeDashoffset, transform: "rotate(-90 ".concat(config.size / 2, " ").concat(config.size / 2, ")") })));
|
|
392
|
+
};
|
|
393
|
+
|
|
378
394
|
var Progress = e.forwardRef(function (_a, ref) {
|
|
379
|
-
var _b = _a.onColor, onColor = _b === void 0 ? false : _b, _c = _a.size, size = _c === void 0 ? 'md' : _c, className = _a.className, rest = __rest$1(_a, ["onColor", "size", "className"]);
|
|
395
|
+
var _b = _a.onColor, onColor = _b === void 0 ? false : _b, _c = _a.size, size = _c === void 0 ? 'md' : _c, percentage = _a.percentage, className = _a.className, rest = __rest$1(_a, ["onColor", "size", "percentage", "className"]);
|
|
396
|
+
var isIndeterminate = typeof percentage === 'undefined';
|
|
380
397
|
return (e.createElement("div", __assign$1({ ref: ref, className: classNames('ods-progress', "ods-progress--".concat(size), className, {
|
|
381
398
|
'ods-progress--on-color': onColor,
|
|
382
|
-
|
|
399
|
+
'ods-progress--indeterminate': isIndeterminate,
|
|
400
|
+
'ods-progress--determinate': !isIndeterminate,
|
|
401
|
+
}), role: "progressbar", "aria-valuenow": isIndeterminate ? undefined : percentage, "aria-valuemin": isIndeterminate ? undefined : 0, "aria-valuemax": isIndeterminate ? undefined : 100 }, rest), isIndeterminate ? (e.createElement(e.Fragment, null,
|
|
383
402
|
size === 'sm' && e.createElement(IconSm, null),
|
|
384
403
|
size === 'md' && e.createElement(IconMd, null),
|
|
385
|
-
size === 'lg' && e.createElement(IconLg, null)));
|
|
404
|
+
size === 'lg' && e.createElement(IconLg, null))) : (e.createElement(IconDeterminate, { size: size, percentage: percentage }))));
|
|
386
405
|
});
|
|
387
406
|
Progress.displayName = 'Progress';
|
|
388
407
|
|