@useblu/ocean-react 1.78.0 → 1.80.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/Button/Button.d.ts +4 -1
- package/Button/Button.d.ts.map +1 -1
- package/Button/stories/Button.stories.d.ts +13 -0
- package/Button/stories/Button.stories.d.ts.map +1 -0
- package/CHANGELOG.md +12 -0
- package/Input/stories/Currency.stories.d.ts +12 -0
- package/Input/stories/Currency.stories.d.ts.map +1 -0
- package/Input/stories/Getting-started.stories.d.ts +13 -0
- package/Input/stories/Getting-started.stories.d.ts.map +1 -0
- package/Input/stories/Text.stories.d.ts +11 -0
- package/Input/stories/Text.stories.d.ts.map +1 -0
- package/Input/stories/WithIcon.stories.d.ts +10 -0
- package/Input/stories/WithIcon.stories.d.ts.map +1 -0
- package/Input/stories/WithLabelIconTooltip.stories.d.ts +9 -0
- package/Input/stories/WithLabelIconTooltip.stories.d.ts.map +1 -0
- package/Input/stories/_shared.d.ts +473 -0
- package/Input/stories/_shared.d.ts.map +1 -0
- package/TokenInput/stories/TokenInput.stories.d.ts +10 -0
- package/TokenInput/stories/TokenInput.stories.d.ts.map +1 -0
- package/index.es.js +8 -0
- package/index.es.js.map +1 -1
- package/index.js +8 -0
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -385,6 +385,14 @@ Progress.displayName = 'Progress';
|
|
|
385
385
|
|
|
386
386
|
function ButtonBase(_a, ref) {
|
|
387
387
|
var children = _a.children, className = _a.className, _b = _a.size, size = _b === void 0 ? 'md' : _b, _c = _a.variant, variant = _c === void 0 ? 'primary' : _c, _d = _a.blocked, blocked = _d === void 0 ? false : _d, _e = _a.loading, loading = _e === void 0 ? false : _e, component = _a.component, rest = __rest$2(_a, ["children", "className", "size", "variant", "blocked", "loading", "component"]);
|
|
388
|
+
e__default["default"].useEffect(function () {
|
|
389
|
+
if (variant === 'text') {
|
|
390
|
+
console.warn('Ocean Design System: The "text" variant is deprecated. Please use "tertiary" instead.');
|
|
391
|
+
}
|
|
392
|
+
else if (variant === 'textCritical') {
|
|
393
|
+
console.warn('Ocean Design System: The "textCritical" variant is deprecated. Please use "tertiaryCritical" instead.');
|
|
394
|
+
}
|
|
395
|
+
}, [variant]);
|
|
388
396
|
var onColor = ['primary', 'primaryCritical', 'inverse'].includes(variant);
|
|
389
397
|
return e__default["default"].createElement(component || 'button', __assign$2(__assign$2({ ref: ref, className: classNames('ods-btn', "ods-btn--".concat(size), "ods-btn--".concat(variant.replace(/[A-Z]/g, function (m) { return "-".concat(m.toLowerCase()); })), blocked && 'ods-btn--blocked', className, { 'ods-btn--loading': loading }) }, rest), { onClick: loading ? function () { return false; } : rest.onClick }), loading ? (e__default["default"].createElement(e__default["default"].Fragment, null,
|
|
390
398
|
e__default["default"].createElement(Progress, { size: size, onColor: onColor }),
|