@geneui/components 3.0.0-next-b9961e0-15012025 → 3.0.0-next-4a5f662-06022025

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/Avatar.js CHANGED
@@ -37,7 +37,7 @@ const AvatarWrapper = ({ onClick, children, parentClass, isDisabled }) => {
37
37
  /**
38
38
  * An avatar is a graphical representation of a user, typically displayed as a small image or icon. It can be a photo, illustration, or initials, and is used to personalize the user experience by visually identifying the user in interfaces such as profiles, comment sections, and messaging apps.
39
39
  */
40
- const Avatar = ({ size = "medium", color = "magenta", fullName = "", src, onClick, isDisabled, isLoading, Icon = SvgSquare, // todo need to change to User icon after releasing icons
40
+ const Avatar = ({ size = "medium", color = "magenta", fullName = "", src, onClick, isDisabled, isLoading, Icon = SvgSquare, // todo need to change to User icon after releasing new icons
41
41
  className }) => {
42
42
  const [proceedFullName, setProceedFullName] = useState(fullName);
43
43
  useEffect(() => {
package/Badge.js ADDED
@@ -0,0 +1,36 @@
1
+ import React__default from 'react';
2
+ import { c as classNames } from './index-ce02421b.js';
3
+ import { s as styleInject } from './style-inject.es-746bb8ed.js';
4
+
5
+ var css_248z = ".badge{position:relative;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.badge__content{align-items:center;display:flex;justify-content:center;-webkit-user-select:none;user-select:none}.badge__content_position_absolute{position:absolute;z-index:1}.badge__content_position_absolute.badge__content_size_small,.badge__content_position_absolute.badge__content_size_smallNudge{inset-block-start:-.6rem;inset-inline-end:-.6rem}.badge__content_position_absolute.badge__content_size_xSmall{inset-block-start:-.4rem;inset-inline-end:-.4rem}.badge__content_position_absolute.badge__content_size_3xSmall{inset-block-start:-.2rem;inset-inline-end:-.2rem}.badge__content_size_small{border-radius:var(--guit-ref-radius-medium);height:var(--guit-sem-dimension-height-small);min-width:var(--guit-sem-dimension-width-small)}.badge__content_size_smallNudge{border-radius:var(--guit-ref-radius-full);height:var(--guit-sem-dimension-height-small-nudge);width:var(--guit-sem-dimension-width-small-nudge)}.badge__content_size_xSmall{border-radius:var(--guit-ref-radius-full);height:var(--guit-sem-dimension-height-xsmall);width:var(--guit-sem-dimension-width-xsmall)}.badge__content_size_3xSmall{border-radius:var(--guit-ref-radius-full);height:var(--guit-sem-dimension-height-3xsmall);width:var(--guit-sem-dimension-width-3xsmall)}.badge__content_color_brand{background-color:var(--guit-sem-color-background-brand-2);color:var(--guit-sem-color-foreground-inverse)}.badge__content_color_brand.badge__content_bordered{border-color:var(--guit-sem-color-border-neutral-1)}.badge__content_color_neutral{background-color:var(--guit-sem-color-background-neutral-4);color:var(--guit-sem-color-foreground-neutral-2)}.badge__content_color_neutral.badge__content_bordered{border-color:var(--guit-sem-color-border-neutral-1)}.badge__content_color_red{background-color:var(--guit-sem-color-background-accent-red-2);color:var(--guit-sem-color-foreground-inverse)}.badge__content_color_red.badge__content_bordered{border-color:var(--guit-sem-color-border-neutral-1)}.badge__content_color_inverse{background-color:var(--guit-sem-color-foreground-inverse);color:var(--guit-sem-color-foreground-neutral-2)}.badge__content_color_inverse.badge__content_bordered{border-color:var(--guit-sem-color-border-neutral-2)}.badge__content:has(.badge__num){padding:var(--guit-ref-spacing-4xsmall) var(--guit-ref-spacing-2xsmall)}.badge__content_bordered{border:var(--guit-sem-border-default-width) var(--guit-sem-border-default-style)}.badge__num{font-family:var(--guit-sem-font-label-medium-default-semibold-font-family);font-size:var(--guit-sem-font-label-medium-default-semibold-font-size);font-weight:var(--guit-sem-font-label-medium-default-medium-font-weight);line-height:var(--guit-sem-font-label-medium-default-semibold-line-height)}";
6
+ styleInject(css_248z);
7
+
8
+ const MAX_VALUE = 99;
9
+ const getValue = (value, maxValue, size) => {
10
+ if (!Number(value) || size !== "small" || !value)
11
+ return null;
12
+ if (!maxValue)
13
+ return value;
14
+ const calculatedMaxValue = maxValue > 0 && maxValue < MAX_VALUE ? maxValue : MAX_VALUE;
15
+ return value > calculatedMaxValue ? `${calculatedMaxValue}+` : value;
16
+ };
17
+ const getSize = (withChildren, size) => {
18
+ if (!withChildren || size === "xSmall")
19
+ return size;
20
+ return "3xSmall";
21
+ };
22
+ /**
23
+ * Numeric Badge component is a small, circular indicator that displays numerical information, often used to highlight counts or statuses. It is typically positioned adjacent to icons or labels, providing users with a quick visual cue about the number of notifications, messages, or items requiring attention.
24
+ */
25
+ const Badge = ({ className, appearance = "brand", withBorder, size = "small", value, maxValue = 99, children }) => {
26
+ const badgeSize = getSize(!!children, size);
27
+ const badgeValue = getValue(value, maxValue, badgeSize);
28
+ return (React__default.createElement("div", { className: classNames("badge", className) },
29
+ React__default.createElement("div", { className: classNames(`badge__content badge__content_color_${appearance} badge__content_size_${badgeSize}`, {
30
+ badge__content_bordered: withBorder,
31
+ badge__content_position_absolute: children
32
+ }) }, !!badgeValue && React__default.createElement("p", { className: "badge__num" }, badgeValue)),
33
+ children));
34
+ };
35
+
36
+ export { Badge as default };
package/Button.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import React__default, { forwardRef } from 'react';
2
2
  import { c as classNames } from './index-ce02421b.js';
3
- import { s as styleInject } from './style-inject.es-746bb8ed.js';
4
3
  import Loader from './Loader.js';
4
+ import { s as styleInject } from './style-inject.es-746bb8ed.js';
5
5
 
6
6
  var css_248z = ".button{align-items:center;border-style:var(--guit-ref-border-style-solid);border-width:var(--guit-ref-border-width-thin);cursor:pointer;display:inline-flex;justify-content:center;min-width:-webkit-max-content;min-width:max-content;position:relative;-webkit-user-select:none;user-select:none}.button:not(.button_type_outline){border-color:var(--guit-ref-color-transparent-neutral-0-0)}.button_icon_before{flex-direction:row}.button_icon_after{flex-direction:row-reverse}.button_color_primary.button_type_fill{background-color:var(--guit-sem-color-background-brand-2);color:var(--guit-sem-color-foreground-inverse)}.button_color_primary.button_type_fill:hover{background-color:var(--guit-sem-color-background-brand-2-hover)}.button_color_primary.button_type_fill:active{background-color:var(--guit-sem-color-background-brand-2-pressed)}.button_color_primary.button_type_fill:disabled{background-color:var(--guit-sem-color-background-disabled)}.button_color_primary.button_type_outline{border-color:var(--guit-sem-color-border-brand);color:var(--guit-sem-color-foreground-brand)}.button_color_primary.button_type_outline:hover{background-color:var(--guit-sem-color-background-brand-1-hover)}.button_color_primary.button_type_outline:active{background-color:var(--guit-sem-color-background-brand-1-pressed)}.button_color_primary.button_type_outline:disabled{border-color:var(--guit-sem-color-border-disabled-1)}.button_color_primary.button_type_text{color:var(--guit-sem-color-foreground-brand)}.button_color_primary.button_type_text:hover{background-color:var(--guit-sem-color-background-brand-1-hover)}.button_color_primary.button_type_text:active{background-color:var(--guit-sem-color-background-brand-1-pressed)}.button_color_secondary.button_type_fill{background-color:var(--guit-sem-color-background-neutral-2);color:var(--guit-sem-color-foreground-neutral-2)}.button_color_secondary.button_type_fill:hover{background-color:var(--guit-sem-color-background-neutral-2-hover)}.button_color_secondary.button_type_fill:active{background-color:var(--guit-sem-color-background-neutral-2-pressed)}.button_color_secondary.button_type_fill:disabled{background-color:var(--guit-sem-color-background-disabled)}.button_color_secondary.button_type_outline{background-color:var(--guit-sem-color-background-transparent-1);border-color:var(--guit-sem-color-border-neutral-2);color:var(--guit-sem-color-foreground-neutral-2)}.button_color_secondary.button_type_outline:hover{background-color:var(--guit-sem-color-background-transparent-1-hover)}.button_color_secondary.button_type_outline:active{background-color:var(--guit-sem-color-background-transparent-1-pressed)}.button_color_secondary.button_type_outline:disabled{border-color:var(--guit-sem-color-border-disabled-1)}.button_color_secondary.button_type_text{background-color:var(--guit-sem-color-background-transparent-1);color:var(--guit-sem-color-foreground-neutral-2)}.button_color_secondary.button_type_text:hover{background-color:var(--guit-sem-color-background-transparent-1-hover)}.button_color_secondary.button_type_text:active{background-color:var(--guit-sem-color-background-transparent-1-pressed)}.button_color_danger.button_type_fill{background-color:var(--guit-sem-color-background-error-2);color:var(--guit-sem-color-foreground-inverse)}.button_color_danger.button_type_fill:hover{background-color:var(--guit-sem-color-background-error-2-hover)}.button_color_danger.button_type_fill:active{background-color:var(--guit-sem-color-background-error-2-pressed)}.button_color_danger.button_type_fill:disabled{background-color:var(--guit-sem-color-background-disabled)}.button_color_danger.button_type_outline{border-color:var(--guit-sem-color-border-error);color:var(--guit-sem-color-foreground-error)}.button_color_danger.button_type_outline:hover{background-color:var(--guit-sem-color-background-error-1-hover)}.button_color_danger.button_type_outline:active{background-color:var(--guit-sem-color-background-error-1-pressed)}.button_color_danger.button_type_outline:disabled{border-color:var(--guit-sem-color-border-disabled-1)}.button_color_danger.button_type_text{background-color:var(--guit-sem-color-background-transparent-1);color:var(--guit-sem-color-foreground-error)}.button_color_danger.button_type_text:hover{background-color:var(--guit-sem-color-background-error-1-hover)}.button_color_danger.button_type_text:active{background-color:var(--guit-sem-color-background-error-1-pressed)}.button_color_success.button_type_fill{background-color:var(--guit-sem-color-background-success-2);color:var(--guit-sem-color-foreground-neutral-2-notheme)}.button_color_success.button_type_fill:hover{background-color:var(--guit-sem-color-background-success-2-hover)}.button_color_success.button_type_fill:active{background-color:var(--guit-sem-color-background-success-2-pressed)}.button_color_success.button_type_fill:disabled{background-color:var(--guit-sem-color-background-disabled)}.button_color_success.button_type_outline{border-color:var(--guit-sem-color-border-success);color:var(--guit-sem-color-foreground-success)}.button_color_success.button_type_outline:hover{background-color:var(--guit-sem-color-background-success-1-hover)}.button_color_success.button_type_outline:active{background-color:var(--guit-sem-color-background-success-1-pressed)}.button_color_success.button_type_outline:disabled{border-color:var(--guit-sem-color-border-disabled-1)}.button_color_success.button_type_text{background-color:var(--guit-sem-color-background-transparent-1);color:var(--guit-sem-color-foreground-success)}.button_color_success.button_type_text:hover{background-color:var(--guit-sem-color-background-success-1-hover)}.button_color_success.button_type_text:active{background-color:var(--guit-sem-color-background-success-1-pressed)}.button_color_inverse.button_type_fill{background-color:var(--guit-sem-color-background-inverse);color:var(--guit-sem-color-foreground-neutral-2)}.button_color_inverse.button_type_fill:hover{background-color:var(--guit-sem-color-background-inverse-hover)}.button_color_inverse.button_type_fill:active{background-color:var(--guit-sem-color-background-inverse-pressed)}.button_color_inverse.button_type_fill:disabled{background-color:var(--guit-sem-color-background-disabled)}.button_color_inverse.button_type_outline{background-color:var(--guit-sem-color-background-transparent-1);border-color:var(--guit-sem-color-border-inverse);color:var(--guit-sem-color-foreground-inverse)}.button_color_inverse.button_type_outline:hover{background-color:var(--guit-sem-color-background-transparent-1-hover)}.button_color_inverse.button_type_outline:active{background-color:var(--guit-sem-color-background-transparent-1-pressed)}.button_color_inverse.button_type_outline:disabled{border-color:var(--guit-sem-color-border-inverse-disabled);color:var(--guit-sem-color-foreground-inverse-disabled)}.button_color_inverse.button_type_text{background-color:var(--guit-sem-color-background-transparent-1);color:var(--guit-sem-color-foreground-inverse)}.button_color_inverse.button_type_text:hover{background-color:var(--guit-sem-color-background-transparent-1-hover)}.button_color_inverse.button_type_text:active{background-color:var(--guit-sem-color-background-transparent-1-pressed)}.button_color_inverse.button_type_text:disabled{color:var(--guit-sem-color-foreground-inverse-disabled)}.button_color_transparent.button_type_fill{background-color:var(--guit-sem-color-background-transparent-inverse-2);color:var(--guit-sem-color-foreground-inverse)}.button_color_transparent.button_type_fill:hover{background-color:var(--guit-sem-color-background-transparent-inverse-2-hover)}.button_color_transparent.button_type_fill:active{background-color:var(--guit-sem-color-background-transparent-inverse-2-pressed)}.button_color_transparent.button_type_fill:disabled{background-color:var(--guit-sem-color-background-disabled)}.button_color_transparent.button_type_outline{border-color:var(--guit-sem-color-border-inverse);color:var(--guit-sem-color-foreground-inverse)}.button_color_transparent.button_type_outline:hover{background-color:var(--guit-sem-color-background-transparent-inverse-2-hover)}.button_color_transparent.button_type_outline:active{background-color:var(--guit-sem-color-background-transparent-inverse-2-pressed)}.button_color_transparent.button_type_outline:disabled{border-color:var(--guit-sem-color-border-inverse-disabled);color:var(--guit-sem-color-foreground-disabled)}.button_color_transparent.button_type_text{background-color:var(--guit-sem-color-background-transparent-inverse-1);color:var(--guit-sem-color-foreground-inverse)}.button_color_transparent.button_type_text:hover{background-color:var(--guit-sem-color-background-transparent-inverse-2-hover)}.button_color_transparent.button_type_text:active{background-color:var(--guit-sem-color-background-transparent-inverse-2-pressed)}.button_color_transparent.button_type_text:disabled{color:var(--guit-sem-color-foreground-disabled)}.button_size_large{border-radius:var(--guit-ref-radius-2xsmall);gap:var(--guit-ref-spacing-xsmall);height:var(--guit-sem-dimension-height-large)}.button_size_large:not(.button_icon_only){padding-bottom:var(--guit-ref-spacing-small);padding-top:var(--guit-ref-spacing-small)}.button_size_large:not(.button_icon_before,.button_size_large.button_icon_after,.button_icon_only){-webkit-padding-start:var(--guit-ref-spacing-large);-webkit-padding-end:var(--guit-ref-spacing-large);min-width:var(--guit-sem-dimension-width-2xlarge);padding-inline-end:var(--guit-ref-spacing-large);padding-inline-start:var(--guit-ref-spacing-large)}.button_size_large.button_icon_after,.button_size_large.button_icon_before{min-width:var(--guit-sem-dimension-width-5xlarge)}.button_size_large.button_icon_before{-webkit-padding-start:var(--guit-ref-spacing-medium);-webkit-padding-end:var(--guit-ref-spacing-large);padding-inline-end:var(--guit-ref-spacing-large);padding-inline-start:var(--guit-ref-spacing-medium)}.button_size_large.button_icon_after{-webkit-padding-start:var(--guit-ref-spacing-large);-webkit-padding-end:var(--guit-ref-spacing-medium);padding-inline-end:var(--guit-ref-spacing-medium);padding-inline-start:var(--guit-ref-spacing-large)}.button_size_large.button_icon_only{min-width:var(--guit-sem-dimension-width-large);padding:var(--guit-ref-spacing-small)}.button_size_medium{border-radius:var(--guit-ref-radius-3xsmall);gap:var(--guit-ref-spacing-xsmall);height:var(--guit-sem-dimension-height-medium)}.button_size_medium:not(.button_icon_only){padding-bottom:var(--guit-ref-spacing-2xsmall);padding-top:var(--guit-ref-spacing-2xsmall)}.button_size_medium:not(.button_icon_before,.button_size_medium.button_icon_after,.button_icon_only){-webkit-padding-start:var(--guit-ref-spacing-medium);-webkit-padding-end:var(--guit-ref-spacing-medium);min-width:var(--guit-sem-dimension-width-2xlarge);padding-inline-end:var(--guit-ref-spacing-medium);padding-inline-start:var(--guit-ref-spacing-medium)}.button_size_medium.button_icon_after,.button_size_medium.button_icon_before{min-width:var(--guit-sem-dimension-width-3xlarge)}.button_size_medium.button_icon_before{-webkit-padding-start:var(--guit-ref-spacing-xsmall);-webkit-padding-end:var(--guit-ref-spacing-medium);padding-inline-end:var(--guit-ref-spacing-medium);padding-inline-start:var(--guit-ref-spacing-xsmall)}.button_size_medium.button_icon_after{-webkit-padding-start:var(--guit-ref-spacing-medium);-webkit-padding-end:var(--guit-ref-spacing-xsmall);padding-inline-end:var(--guit-ref-spacing-xsmall);padding-inline-start:var(--guit-ref-spacing-medium)}.button_size_medium.button_icon_only{min-width:var(--guit-sem-dimension-width-medium);padding:var(--guit-ref-spacing-2xsmall)}.button_size_small{border-radius:var(--guit-ref-radius-3xsmall);gap:var(--guit-ref-spacing-2xsmall);height:var(--guit-sem-dimension-height-small)}.button_size_small:not(.button_icon_only){padding-bottom:var(--guit-ref-spacing-4xsmall);padding-top:var(--guit-ref-spacing-4xsmall)}.button_size_small:not(.button_icon_before,.button_size_small.button_icon_after,.button_icon_only){-webkit-padding-start:var(--guit-ref-spacing-medium);-webkit-padding-end:var(--guit-ref-spacing-medium);min-width:var(--guit-sem-dimension-width-2xlarge);padding-inline-end:var(--guit-ref-spacing-medium);padding-inline-start:var(--guit-ref-spacing-medium)}.button_size_small.button_icon_after,.button_size_small.button_icon_before{min-width:var(--guit-sem-dimension-width-3xlarge)}.button_size_small.button_icon_before{-webkit-padding-start:var(--guit-ref-spacing-xsmall);-webkit-padding-end:var(--guit-ref-spacing-medium);padding-inline-end:var(--guit-ref-spacing-medium);padding-inline-start:var(--guit-ref-spacing-xsmall)}.button_size_small.button_icon_after{-webkit-padding-start:var(--guit-ref-spacing-medium);-webkit-padding-end:var(--guit-ref-spacing-xsmall);padding-inline-end:var(--guit-ref-spacing-xsmall);padding-inline-start:var(--guit-ref-spacing-medium)}.button_size_small.button_icon_only{min-width:var(--guit-sem-dimension-width-small);padding:var(--guit-ref-spacing-4xsmall)}.button_size_XSmall{border-radius:var(--guit-ref-radius-4xsmall);height:var(--guit-sem-dimension-height-small-nudge)}.button_size_XSmall.button_icon_only{min-width:var(--guit-sem-dimension-width-small-nudge);padding:var(--guit-ref-spacing-4xsmall)}.button_fullWidth{width:100%}.button_loading .button__loader{visibility:visible}.button_loading .button__icon,.button_loading .button__text{visibility:hidden}.button.disabled,.button:disabled{color:var(--guit-sem-color-foreground-disabled);pointer-events:none}.button__text{font-family:var(--guit-sem-font-label-medium-default-semibold-font-family);font-size:var(--guit-sem-font-label-medium-default-semibold-font-size);font-weight:var(--guit-sem-font-label-medium-default-semibold-font-weight);line-height:var(--guit-sem-font-label-medium-default-semibold-line-height);white-space:nowrap}.button__icon{flex:0 0 auto}.button__loader{align-items:center;border-radius:inherit;display:flex;height:100%;justify-content:center;left:0;position:absolute;top:0;visibility:hidden;width:100%}";
7
7
  styleInject(css_248z);
package/GeneUIProvider.js CHANGED
@@ -1111,24 +1111,24 @@ var typings = "index.d.ts";
1111
1111
  var scripts = {
1112
1112
  start: "npm run test && storybook dev -p 6006",
1113
1113
  dev: "concurrently --kill-others -g \"npm:test:watch\" \"npm:start\"",
1114
- test: "jest --config ./configs/jest.config.js --rootDir ./ --coverage --json --outputFile=./coverage/.jest-test-results.json",
1114
+ test: "jest --config ./jest.config.js --rootDir ./ --coverage --json --outputFile=./coverage/.jest-test-results.json",
1115
1115
  "test:watch": "npm run test -- --watchAll --json",
1116
- "test-report": "babel-node --config-file ./configs/.babelrc ./scripts/testReport.js",
1117
- build: "babel-node --config-file ./configs/.babelrc ./scripts/build.js",
1118
- "copy-build-statics-files": "babel-node --config-file ./configs/.babelrc ./scripts/copyFiles.js",
1119
- "bump-up-commit": "babel-node --config-file ./configs/.babelrc ./scripts/postPublish.js",
1116
+ "test-report": "babel-node --config-file ./.babelrc ./scripts/testReport.js",
1117
+ build: "babel-node --config-file ./.babelrc ./scripts/build.js",
1118
+ "copy-build-statics-files": "babel-node --config-file ./.babelrc ./scripts/copyFiles.js",
1119
+ "bump-up-commit": "babel-node --config-file ./.babelrc ./scripts/postPublish.js",
1120
1120
  "build:watch": "watch 'npm run build' ./src",
1121
1121
  commit: "cross-env DISABLE_SCOPE_LOWERCASE=true git-cz",
1122
1122
  changelog: "conventional-changelog -i CHANGELOG.md -s",
1123
1123
  "build-storybook": "npm run test && storybook build",
1124
- "semantic-release": "semantic-release --extends ./configs/.releaserc.json --no-ci",
1125
- "create-component": "babel-node --config-file ./configs/.babelrc ./scripts/createComponent.js",
1126
- "find-component-usage": "babel-node --config-file ./configs/.babelrc ./scripts/findComponentUsage.js",
1127
- "format-code": "prettier --config ./configs/.prettierrc --write . --ignore-path ./configs/.prettierignore",
1128
- "lint-styles": "stylelint **/*.{css,scss,sass} --config ./configs/.stylelintrc.json --fix",
1129
- "lint-scripts": "eslint --config ./configs/.eslintrc.json src --ignore-path ./configs/.eslintignore --fix",
1124
+ "semantic-release": "semantic-release --extends ./.releaserc.json --no-ci",
1125
+ "create-component": "babel-node --config-file ./.babelrc ./scripts/createComponent.js",
1126
+ "find-component-usage": "babel-node --config-file ./.babelrc ./scripts/findComponentUsage.js",
1127
+ "format-code": "prettier --config ./.prettierrc --write . --ignore-path ./.prettierignore",
1128
+ "lint-styles": "stylelint **/*.{css,scss,sass} --config ./.stylelintrc.json --fix",
1129
+ "lint-scripts": "eslint --config ./.eslintrc.json src --ignore-path ./.eslintignore --fix",
1130
1130
  "fix-code-style": "npm run format-code && npm run lint-styles && npm run lint-scripts",
1131
- "analyze-bundle-size": "babel-node --config-file ./configs/.babelrc ./scripts/analyzeBundleSize.js"
1131
+ "analyze-bundle-size": "babel-node --config-file ./.babelrc ./scripts/analyzeBundleSize.js"
1132
1132
  };
1133
1133
  var peerDependencies = {
1134
1134
  "prop-types": "^15.8.1",
@@ -1151,6 +1151,7 @@ var devDependencies = {
1151
1151
  "@commitlint/cli": "^17.1.2",
1152
1152
  "@commitlint/config-conventional": "^17.1.0",
1153
1153
  "@faker-js/faker": "^7.6.0",
1154
+ "@rollup/plugin-alias": "^5.1.1",
1154
1155
  "@rollup/plugin-commonjs": "^23.0.0",
1155
1156
  "@rollup/plugin-image": "^3.0.1",
1156
1157
  "@rollup/plugin-json": "^6.0.0",
@@ -1182,6 +1183,7 @@ var devDependencies = {
1182
1183
  autoprefixer: "^10.4.13",
1183
1184
  "babel-jest": "^29.7.0",
1184
1185
  "babel-loader": "^8.2.5",
1186
+ "babel-plugin-module-resolver": "^5.0.2",
1185
1187
  chalk: "^4.1.2",
1186
1188
  chromatic: "^11.5.5",
1187
1189
  commitizen: "^4.2.5",
@@ -1203,6 +1205,7 @@ var devDependencies = {
1203
1205
  "eslint-plugin-prettier": "^5.2.1",
1204
1206
  "eslint-plugin-react": "^7.37.1",
1205
1207
  "eslint-plugin-react-hooks": "^4.6.2",
1208
+ "eslint-plugin-simple-import-sort": "^12.1.1",
1206
1209
  figlet: "^1.5.2",
1207
1210
  "file-loader": "^6.2.0",
1208
1211
  "git-cz": "^4.9.0",
@@ -1262,8 +1265,8 @@ var dependencies = {
1262
1265
  };
1263
1266
  var husky = {
1264
1267
  hooks: {
1265
- "pre-commit": "lint-staged --concurrent false --config ./configs/.lintstagedrc.json",
1266
- "commit-msg": "commitlint --config ./configs/commitlint.config.js -E HUSKY_GIT_PARAMS"
1268
+ "pre-commit": "lint-staged --concurrent false --config ./.lintstagedrc.json",
1269
+ "commit-msg": "commitlint --config ./commitlint.config.js -E HUSKY_GIT_PARAMS"
1267
1270
  }
1268
1271
  };
1269
1272
  var browserslist = [
@@ -0,0 +1,48 @@
1
+ import { FC, JSX } from "react";
2
+ import "./Badge.scss";
3
+ interface IBadgeProps {
4
+ /**
5
+ * Determines whether the badge component should display a border around it.
6
+ * When set to `true`, the `badge` will render with a visible `border`.
7
+ */
8
+ withBorder?: boolean;
9
+ /**
10
+ * Size <br>
11
+ * Possible values: `small | smallNudge | xSmall | 3xSmall`
12
+ */
13
+ size?: "small" | "smallNudge" | "xSmall" | "3xSmall";
14
+ /**
15
+ * Determines the visual appearance of the `badge`. <br>
16
+ * Possible values: `brand | neutral | red | inverse`
17
+ */
18
+ appearance?: "brand" | "neutral" | "red" | "inverse";
19
+ /**
20
+ * The value will shown as content of the `badge`.
21
+ */
22
+ value?: number;
23
+ /**
24
+ * Specifies the maximum value to display inside the `badge`.
25
+ * If the badge's `value` exceeds this maximum, it will display as `{maxValue}+`.
26
+ * The maximum allowable value for `maxValue` is capped at `99`.
27
+ */
28
+ maxValue?: number;
29
+ /**
30
+ * Additional class for the parent element.
31
+ * This prop should be used to set placement properties for the element relative to its parent using `BEM` conventions.
32
+ */
33
+ className?: string;
34
+ /**
35
+ * Specifies the element or component on which the `badge` will be displayed.
36
+ * The `badge` is positioned `relative` to this child `element`, allowing it to overlay or attach to the `element`.
37
+ *
38
+ * **Note**: When using the `children` prop, only `xSmall` and `3xSmall` sizes are supported for the `badge`.
39
+ *
40
+ * The default size for the badge when `children` is provided is `3xSmall`.
41
+ */
42
+ children?: JSX.Element;
43
+ }
44
+ /**
45
+ * Numeric Badge component is a small, circular indicator that displays numerical information, often used to highlight counts or statuses. It is typically positioned adjacent to icons or labels, providing users with a quick visual cue about the number of notifications, messages, or items requiring attention.
46
+ */
47
+ declare const Badge: FC<IBadgeProps>;
48
+ export { IBadgeProps, Badge as default };
@@ -0,0 +1 @@
1
+ export { IBadgeProps, default } from "./Badge";
package/index.d.ts CHANGED
@@ -6,10 +6,11 @@ export { default as Pill, IPillProps } from "./components/atoms/Pill";
6
6
  export { default as Divider, IDividerProps } from "./components/atoms/Divider";
7
7
  export { default as Info, IInfoProps } from "./components/atoms/Info";
8
8
  export { default as Button, IButtonProps } from "./components/atoms/Button";
9
- export { default as Scrollbar } from "./components/atoms/Scrollbar";
10
- export { default as Tooltip } from "./components/molecules/Tooltip";
11
- export { default as ProgressBar } from "./components/molecules/ProgressBar";
12
- export { default as Tag } from "./components/molecules/Tag";
9
+ export { default as Badge, IBadgeProps } from "./components/atoms/Badge";
10
+ export { default as Scrollbar, IScrollbarProps } from "./components/atoms/Scrollbar";
11
+ export { default as Tooltip, ITooltipProps } from "./components/molecules/Tooltip";
12
+ export { default as ProgressBar, IProgressBarProps } from "./components/molecules/ProgressBar";
13
+ export { default as Tag, ITagProps } from "./components/molecules/Tag";
13
14
  export { default as GeneUIProvider, GeneUIDesignSystemContext, IGeneUIDesignSystemContext, IGeneUIProviderProps } from "./components/providers/GeneUIProvider";
14
15
  export { default as useDebounce } from "./hooks/useDebounceCallback";
15
16
  export { default as useEllipsisDetection } from "./hooks/useEllipsisDetection";
package/index.js CHANGED
@@ -6,6 +6,7 @@ export { default as Pill } from './Pill.js';
6
6
  export { default as Divider } from './Divider.js';
7
7
  export { default as Info } from './Info.js';
8
8
  export { default as Button } from './Button.js';
9
+ export { default as Badge } from './Badge.js';
9
10
  export { default as Scrollbar } from './Scrollbar.js';
10
11
  export { default as Tooltip } from './Tooltip.js';
11
12
  export { default as ProgressBar } from './ProgressBar.js';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@geneui/components",
3
3
  "description": "The Gene UI components library designed for BI tools",
4
- "version": "3.0.0-next-b9961e0-15012025",
4
+ "version": "3.0.0-next-4a5f662-06022025",
5
5
  "author": "SoftConstruct",
6
6
  "homepage": "https://github.com/softconstruct/gene-ui-components#readme",
7
7
  "repository": {
@@ -22,24 +22,24 @@
22
22
  "scripts": {
23
23
  "start": "npm run test && storybook dev -p 6006",
24
24
  "dev": "concurrently --kill-others -g \"npm:test:watch\" \"npm:start\"",
25
- "test": "jest --config ./configs/jest.config.js --rootDir ./ --coverage --json --outputFile=./coverage/.jest-test-results.json",
25
+ "test": "jest --config ./jest.config.js --rootDir ./ --coverage --json --outputFile=./coverage/.jest-test-results.json",
26
26
  "test:watch": "npm run test -- --watchAll --json",
27
- "test-report": "babel-node --config-file ./configs/.babelrc ./scripts/testReport.js",
28
- "build": "babel-node --config-file ./configs/.babelrc ./scripts/build.js",
29
- "copy-build-statics-files": "babel-node --config-file ./configs/.babelrc ./scripts/copyFiles.js",
30
- "bump-up-commit": "babel-node --config-file ./configs/.babelrc ./scripts/postPublish.js",
27
+ "test-report": "babel-node --config-file ./.babelrc ./scripts/testReport.js",
28
+ "build": "babel-node --config-file ./.babelrc ./scripts/build.js",
29
+ "copy-build-statics-files": "babel-node --config-file ./.babelrc ./scripts/copyFiles.js",
30
+ "bump-up-commit": "babel-node --config-file ./.babelrc ./scripts/postPublish.js",
31
31
  "build:watch": "watch 'npm run build' ./src",
32
32
  "commit": "cross-env DISABLE_SCOPE_LOWERCASE=true git-cz",
33
33
  "changelog": "conventional-changelog -i CHANGELOG.md -s",
34
34
  "build-storybook": "npm run test && storybook build",
35
- "semantic-release": "semantic-release --extends ./configs/.releaserc.json --no-ci",
36
- "create-component": "babel-node --config-file ./configs/.babelrc ./scripts/createComponent.js",
37
- "find-component-usage": "babel-node --config-file ./configs/.babelrc ./scripts/findComponentUsage.js",
38
- "format-code": "prettier --config ./configs/.prettierrc --write . --ignore-path ./configs/.prettierignore",
39
- "lint-styles": "stylelint **/*.{css,scss,sass} --config ./configs/.stylelintrc.json --fix",
40
- "lint-scripts": "eslint --config ./configs/.eslintrc.json src --ignore-path ./configs/.eslintignore --fix",
35
+ "semantic-release": "semantic-release --extends ./.releaserc.json --no-ci",
36
+ "create-component": "babel-node --config-file ./.babelrc ./scripts/createComponent.js",
37
+ "find-component-usage": "babel-node --config-file ./.babelrc ./scripts/findComponentUsage.js",
38
+ "format-code": "prettier --config ./.prettierrc --write . --ignore-path ./.prettierignore",
39
+ "lint-styles": "stylelint **/*.{css,scss,sass} --config ./.stylelintrc.json --fix",
40
+ "lint-scripts": "eslint --config ./.eslintrc.json src --ignore-path ./.eslintignore --fix",
41
41
  "fix-code-style": "npm run format-code && npm run lint-styles && npm run lint-scripts",
42
- "analyze-bundle-size": "babel-node --config-file ./configs/.babelrc ./scripts/analyzeBundleSize.js"
42
+ "analyze-bundle-size": "babel-node --config-file ./.babelrc ./scripts/analyzeBundleSize.js"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "prop-types": "^15.8.1",
@@ -62,6 +62,7 @@
62
62
  "@commitlint/cli": "^17.1.2",
63
63
  "@commitlint/config-conventional": "^17.1.0",
64
64
  "@faker-js/faker": "^7.6.0",
65
+ "@rollup/plugin-alias": "^5.1.1",
65
66
  "@rollup/plugin-commonjs": "^23.0.0",
66
67
  "@rollup/plugin-image": "^3.0.1",
67
68
  "@rollup/plugin-json": "^6.0.0",
@@ -93,6 +94,7 @@
93
94
  "autoprefixer": "^10.4.13",
94
95
  "babel-jest": "^29.7.0",
95
96
  "babel-loader": "^8.2.5",
97
+ "babel-plugin-module-resolver": "^5.0.2",
96
98
  "chalk": "^4.1.2",
97
99
  "chromatic": "^11.5.5",
98
100
  "commitizen": "^4.2.5",
@@ -114,6 +116,7 @@
114
116
  "eslint-plugin-prettier": "^5.2.1",
115
117
  "eslint-plugin-react": "^7.37.1",
116
118
  "eslint-plugin-react-hooks": "^4.6.2",
119
+ "eslint-plugin-simple-import-sort": "^12.1.1",
117
120
  "figlet": "^1.5.2",
118
121
  "file-loader": "^6.2.0",
119
122
  "git-cz": "^4.9.0",
@@ -173,8 +176,8 @@
173
176
  },
174
177
  "husky": {
175
178
  "hooks": {
176
- "pre-commit": "lint-staged --concurrent false --config ./configs/.lintstagedrc.json",
177
- "commit-msg": "commitlint --config ./configs/commitlint.config.js -E HUSKY_GIT_PARAMS"
179
+ "pre-commit": "lint-staged --concurrent false --config ./.lintstagedrc.json",
180
+ "commit-msg": "commitlint --config ./commitlint.config.js -E HUSKY_GIT_PARAMS"
178
181
  }
179
182
  },
180
183
  "browserslist": [