@useblu/ocean-react 1.127.0 → 1.129.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.
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { MergeElementProps } from '../_util/type';
3
3
  type DeprecatedVariant = 'text' | 'textCritical';
4
- type Variant = 'primary' | 'primaryCritical' | 'secondary' | 'secondaryCritical' | 'tertiary' | 'tertiaryCritical' | 'textTertiary' | 'textTertiaryCritical' | 'inverse' | DeprecatedVariant;
4
+ type Variant = 'primary' | 'primaryCritical' | 'primaryWarning' | 'secondary' | 'secondaryCritical' | 'secondaryWarning' | 'tertiary' | 'tertiaryCritical' | 'tertiaryWarning' | 'textTertiary' | 'textTertiaryCritical' | 'inverse' | DeprecatedVariant;
5
5
  type ButtonVariant = Exclude<Variant, DeprecatedVariant>;
6
6
  export type ButtonProps<P extends React.ElementType = 'button'> = {
7
7
  component?: P;
@@ -1 +1 @@
1
- {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAGlD,KAAK,iBAAiB,GAAG,MAAM,GAAG,cAAc,CAAC;AAEjD,KAAK,OAAO,GACR,SAAS,GACT,iBAAiB,GACjB,WAAW,GACX,mBAAmB,GACnB,UAAU,GACV,kBAAkB,GAClB,cAAc,GACd,sBAAsB,GACtB,SAAS,GACT,iBAAiB,CAAC;AAEtB,KAAK,aAAa,GAAG,OAAO,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC;AAEzD,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,QAAQ,IAAI;IAKhE,SAAS,CAAC,EAAE,CAAC,CAAC;CACf,GAAG,iBAAiB,CACnB,CAAC,EACD;IAKE,OAAO,CAAC,EAAE,aAAa,CAAC;IAK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OAAO,CAAC,EAAE,OAAO,CAAC;IAKlB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CACF,CAAC;AAEF,iBAAS,UAAU,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,QAAQ,EACxD,EACE,QAAQ,EACR,SAAS,EACT,IAAW,EACX,OAAmB,EACnB,OAAe,EACf,OAAe,EACf,SAAS,EACT,GAAG,IAAI,EACR,EAAE,WAAW,CAAC,CAAC,CAAC,EACjB,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,sEA2ClC;AAED,QAAA,MAAM,MAAM,EAA8C,OAAO,UAAU,CAAC;AAE5E,eAAe,MAAM,CAAC"}
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.129.0](https://github.com/ocean-ds/ocean-web/compare/v1.128.1...v1.129.0) (2026-02-05)
7
+
8
+ ### Features
9
+
10
+ - create new properties to internal contextual hero ([#1223](https://github.com/ocean-ds/ocean-web/issues/1223)) ([5e2103c](https://github.com/ocean-ds/ocean-web/commit/5e2103cc6d2f16c6f06cf702686409381d4e99d6))
11
+
12
+ # [1.128.0](https://github.com/ocean-ds/ocean-web/compare/v1.127.0...v1.128.0) (2026-02-04)
13
+
14
+ ### Features
15
+
16
+ - create new Button variants ([#1222](https://github.com/ocean-ds/ocean-web/issues/1222)) ([7db9ec6](https://github.com/ocean-ds/ocean-web/commit/7db9ec6c24ea52241ebb63c2303c62937e3c27a3))
17
+
6
18
  # [1.127.0](https://github.com/ocean-ds/ocean-web/compare/v1.126.0...v1.127.0) (2026-01-14)
7
19
 
8
20
  ### Features
@@ -8,12 +8,14 @@ export type InternalContextualHeroAction = {
8
8
  onClick: () => void;
9
9
  };
10
10
  export type InternalContextualHeroProps = {
11
+ type?: 'default' | 'warning' | 'negative';
11
12
  title: string;
12
13
  description: string;
13
14
  image?: string | ReactNode;
14
15
  listItems: (ReactNode | InternalContextualHeroListItemString)[];
15
16
  actions?: [InternalContextualHeroAction] | [InternalContextualHeroAction, InternalContextualHeroAction];
16
17
  className?: string;
18
+ imagePosition?: 'top' | 'bottom' | 'full';
17
19
  };
18
20
  declare const InternalContextualHero: React.ForwardRefExoticComponent<InternalContextualHeroProps & React.RefAttributes<HTMLDivElement>>;
19
21
  export default InternalContextualHero;
@@ -1 +1 @@
1
- {"version":3,"file":"InternalContextualHero.d.ts","sourceRoot":"","sources":["../../src/InternalContextualHero/InternalContextualHero.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKzC,MAAM,MAAM,oCAAoC,GAAG;IACjD,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAOF,MAAM,MAAM,2BAA2B,GAAG;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,SAAS,EAAE,CAAC,SAAS,GAAG,oCAAoC,CAAC,EAAE,CAAC;IAChE,OAAO,CAAC,EAAE,CAAC,4BAA4B,CAAC,GAAG,CAAC,4BAA4B,EAAE,4BAA4B,CAAC,CAAC;IACxG,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,QAAA,MAAM,sBAAsB,oGAuD3B,CAAC;AAIF,eAAe,sBAAsB,CAAC"}
1
+ {"version":3,"file":"InternalContextualHero.d.ts","sourceRoot":"","sources":["../../src/InternalContextualHero/InternalContextualHero.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKzC,MAAM,MAAM,oCAAoC,GAAG;IAIjD,IAAI,CAAC,EAAE,SAAS,CAAC;IAIjB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG;IAIzC,KAAK,EAAE,MAAM,CAAC;IAId,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IAKxC,IAAI,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;IAI1C,KAAK,EAAE,MAAM,CAAC;IAId,WAAW,EAAE,MAAM,CAAC;IAIpB,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAK3B,SAAS,EAAE,CAAC,SAAS,GAAG,oCAAoC,CAAC,EAAE,CAAC;IAKhE,OAAO,CAAC,EAAE,CAAC,4BAA4B,CAAC,GAAG,CAAC,4BAA4B,EAAE,4BAA4B,CAAC,CAAC;IAIxG,SAAS,CAAC,EAAE,MAAM,CAAC;IAKnB,aAAa,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;CAC3C,CAAC;AAmBF,QAAA,MAAM,sBAAsB,oGA0D3B,CAAC;AAIF,eAAe,sBAAsB,CAAC"}
package/index.es.js CHANGED
@@ -420,7 +420,7 @@ function ButtonBase(_a, ref) {
420
420
  console.warn('Ocean Design System: The "textCritical" variant is deprecated. Please use "tertiaryCritical" instead.');
421
421
  }
422
422
  }, [variant]);
423
- var onColor = ['primary', 'primaryCritical', 'inverse'].includes(variant);
423
+ var onColor = ['primary', 'primaryCritical', 'primaryWarning', 'inverse'].includes(variant);
424
424
  return e.createElement(component || 'button', __assign$1(__assign$1({ 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.createElement(e.Fragment, null,
425
425
  e.createElement(Progress, { size: size, onColor: onColor }),
426
426
  e.createElement("span", null, children))) : (children));
@@ -47808,26 +47808,40 @@ ListExpandable.displayName = 'ListExpandable';
47808
47808
  var isListItemString = function (item) {
47809
47809
  return typeof item === 'object' && item !== null && 'description' in item;
47810
47810
  };
47811
+ var primaryButtonVariants = {
47812
+ default: 'primary',
47813
+ warning: 'primaryWarning',
47814
+ negative: 'primaryCritical',
47815
+ };
47816
+ var secondaryButtonVariants = {
47817
+ default: 'tertiary',
47818
+ warning: 'tertiaryWarning',
47819
+ negative: 'tertiaryCritical',
47820
+ };
47811
47821
  var InternalContextualHero = e.forwardRef(function (_a, ref) {
47812
- var title = _a.title, description = _a.description, image = _a.image, listItems = _a.listItems, actions = _a.actions, className = _a.className;
47822
+ var _b;
47823
+ var title = _a.title, description = _a.description, image = _a.image, listItems = _a.listItems, actions = _a.actions, className = _a.className, _c = _a.imagePosition, imagePosition = _c === void 0 ? 'top' : _c, _d = _a.type, type = _d === void 0 ? 'default' : _d;
47813
47824
  var renderImage = function () {
47814
47825
  if (typeof image === 'string') {
47815
47826
  return e.createElement("img", { src: image, alt: title });
47816
47827
  }
47817
47828
  return image;
47818
47829
  };
47819
- return (e.createElement("div", { "data-testid": "internal-contextual-hero", className: classNames('ods-internal-contextual-hero', className), ref: ref },
47830
+ return (e.createElement("div", { "data-testid": "internal-contextual-hero", className: classNames('ods-internal-contextual-hero', className, (_b = {},
47831
+ _b["ods-internal-contextual-hero--".concat(type)] = type,
47832
+ _b["ods-internal-contextual-hero--".concat(imagePosition)] = imagePosition,
47833
+ _b)), ref: ref },
47820
47834
  e.createElement("div", { className: 'ods-internal-contextual-hero__body' },
47821
47835
  e.createElement("div", { className: 'ods-internal-contextual-hero__content' },
47822
47836
  e.createElement("div", { className: 'ods-internal-contextual-hero__header' },
47823
47837
  e.createElement(Typography, { variant: "heading3" }, title),
47824
47838
  e.createElement(Typography, { variant: "description" }, description)),
47825
47839
  actions && actions.length > 0 && (e.createElement("div", { className: 'ods-internal-contextual-hero__actions' },
47826
- e.createElement(Button$1, { variant: 'primary', size: 'sm', onClick: actions[0].onClick }, actions[0].label),
47827
- actions[1] && (e.createElement(Button$1, { variant: 'tertiary', size: 'sm', onClick: actions[1].onClick }, actions[1].label))))),
47840
+ e.createElement(Button$1, { variant: primaryButtonVariants[type], size: 'sm', onClick: actions[0].onClick }, actions[0].label),
47841
+ actions[1] && (e.createElement(Button$1, { variant: secondaryButtonVariants[type], size: 'sm', onClick: actions[1].onClick }, actions[1].label))))),
47828
47842
  e.createElement("div", { className: 'ods-internal-contextual-hero__list' }, listItems === null || listItems === void 0 ? void 0 : listItems.map(function (item) {
47829
47843
  return isListItemString(item) ? (e.createElement("div", { key: item.description, className: 'ods-internal-contextual-hero__list-item' },
47830
- item.icon && e.createElement("div", null, item.icon),
47844
+ item.icon && e.createElement("div", { className: "ods-internal-contextual-hero__list-item-icon" }, item.icon),
47831
47845
  e.createElement(Typography, { variant: "description" }, item.description))) : (item);
47832
47846
  }))),
47833
47847
  image && (e.createElement("div", { className: 'ods-internal-contextual-hero__image' }, renderImage()))));