bianic-ui 2.4.0 → 2.5.1-beta.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.
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ interface NotificationProps {
3
+ children?: React.ReactNode;
4
+ color?: 'red' | 'white';
5
+ isVisible?: boolean;
6
+ }
7
+ declare const Notification: (props: NotificationProps) => React.JSX.Element;
8
+ export default Notification;
@@ -17,6 +17,7 @@ export { TextInput, Radio, TextArea, Checkbox, SelectInput, LiveSearch, Toggle,
17
17
  export * from './Icons';
18
18
  export { default as InfoPanel } from './InfoPanel';
19
19
  export { default as Modal } from './Modal/Modal';
20
+ export { default as Notification } from './Notification';
20
21
  export { default as PaginationBar } from './PaginationBar/PaginationBar';
21
22
  export { default as Pills } from './Pills/Pills';
22
23
  export { default as Popover } from './Popover';
package/dist/esm/index.js CHANGED
@@ -1550,10 +1550,10 @@ var ContextualButton = forwardRef(function (_a, ref) {
1550
1550
  : 'text-primary-white'
1551
1551
  : textColorConfig[variant];
1552
1552
  var stateColor = stateColorConfig[isSelected ? 'selected' : 'default'];
1553
- return (React.createElement("button", __assign({ ref: ref, className: "bianic-contextual-button box-border flex flex-row items-center rounded-radius-sm border border-transparent p-[1px] outline-none ".concat(stateColor, " ").concat(textColor) }, props, { disabled: disabled }),
1553
+ return (React.createElement("button", __assign({ ref: ref, className: "bianic-contextual-button box-border flex min-h-[22px] flex-row items-center rounded-radius-sm border border-transparent p-[1px] outline-none ".concat(stateColor, " ").concat(textColor) }, props, { disabled: disabled }),
1554
1554
  icon,
1555
- label && (React.createElement("div", { className: "label flex max-h-[46px] items-center px-[5px] text-[12px] leading-none" },
1556
- React.createElement("span", { className: "mr-0.5" }, label),
1555
+ label && (React.createElement("div", { className: "label flex max-h-[46px] items-center gap-x-0.5 px-[5px] text-[12px] leading-none" },
1556
+ React.createElement("span", null, label),
1557
1557
  actionElement))));
1558
1558
  });
1559
1559
 
@@ -2238,7 +2238,7 @@ var styleConfig = {
2238
2238
  iconStyle: '',
2239
2239
  },
2240
2240
  text: {
2241
- fieldStyle: 'pe-8',
2241
+ fieldStyle: '',
2242
2242
  iconStyle: 'pointer-events-none',
2243
2243
  },
2244
2244
  number: {
@@ -2299,9 +2299,13 @@ var TextInput = forwardRef(function (_a, ref) {
2299
2299
  return (React.createElement("div", { className: "bianic-text-input-container bianic-fgc-container group/form flex w-full flex-col gap-y-2 text-bia-black" },
2300
2300
  label && (React.createElement(FormLabel, { htmlFor: id, required: required, readOnly: readOnly }, label)),
2301
2301
  React.createElement("div", { className: "relative w-full ".concat(disabledClass) },
2302
- React.createElement("input", __assign({ className: "bianic-text-input bianic-fgc-target w-full rounded read-only:pointer-events-none read-only:border-bia-grey-light-50 hover:rounded-b-none focus:rounded-b-none focus-visible:outline-none disabled:cursor-not-allowed disabled:border-bia-grey-dark-10 disabled:bg-bia-grey-light-80 disabled:text-bia-grey-active ".concat(extendedInputClassName), disabled: disabled, id: id, placeholder: placeholder || label, readOnly: readOnly, required: required, type: typeVariant, value: value, onChange: function (e) { return onChange(e); }, maxLength: maxLength, autoComplete: autoComplete, ref: ref, style: { paddingRight: "".concat(10 + Number(iconSize), "px") } }, props)),
2303
- React.createElement("div", { className: "absolute inset-y-0 flex items-center pl-3 ".concat(actionElement ? '' : iconStyle, " ").concat(iconPosition, " ").concat(iconSizing) }, iconElement)),
2304
- (descText || maxLength) && (React.createElement("div", { className: "bianic-text-input-desc flex justify-between gap-1 whitespace-nowrap text-xs ".concat(descColor) },
2302
+ React.createElement("input", __assign({ className: "bianic-text-input bianic-fgc-target w-full rounded read-only:pointer-events-none read-only:border-bia-grey-light-50 hover:rounded-b-none focus:rounded-b-none focus-visible:outline-none disabled:cursor-not-allowed disabled:border-bia-grey-dark-10 disabled:bg-bia-grey-light-80 disabled:text-bia-grey-active ".concat(extendedInputClassName), disabled: disabled, id: id, placeholder: placeholder || label, readOnly: readOnly, required: required, type: typeVariant, value: value, onChange: function (e) { return onChange(e); }, maxLength: maxLength, autoComplete: autoComplete, ref: ref, style: {
2303
+ paddingRight: iconElement
2304
+ ? "".concat(10 + Number(iconSize), "px")
2305
+ : undefined,
2306
+ } }, props)),
2307
+ iconElement && (React.createElement("div", { className: "absolute inset-y-0 flex items-center pl-3 ".concat(actionElement ? '' : iconStyle, " ").concat(iconPosition, " ").concat(iconSizing) }, iconElement))),
2308
+ (descText || maxLength) && (React.createElement("div", { className: "bianic-text-input-desc flex justify-between gap-1 text-xs ".concat(descColor) },
2305
2309
  React.createElement("span", null, descText),
2306
2310
  maxLength && (React.createElement("span", null,
2307
2311
  remainWords,
@@ -3690,7 +3694,7 @@ function Modal(_a) {
3690
3694
  if (open) {
3691
3695
  return (
3692
3696
  // eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events
3693
- createPortal(React.createElement("div", { className: "bianic-modal-wrapper fixed inset-0 flex items-center justify-center bg-bia-black-transparent-75", style: { zIndex: !zIndex && isNaN(zIndex) ? 'auto' : zIndex }, id: "wrapper", onClick: handleClose },
3697
+ createPortal(React.createElement("div", { className: "bianic-modal-wrapper fixed inset-0 flex items-center justify-center bg-bia-black-transparent-75", style: { zIndex: !zIndex && isNaN(zIndex) ? 'auto' : zIndex }, id: "wrapper", onPointerDown: handleClose },
3694
3698
  React.createElement("div", { className: "bianic-modal flex flex-col gap-[20px] rounded-[5px] bg-white p-[20px] ".concat(modalSize), onClick: onClick },
3695
3699
  React.createElement("div", { className: "bianic-modal-header flex justify-between" },
3696
3700
  React.createElement("div", { className: " text-wrap text-left font-humnst777 text-[18px] font-bold leading-[21.85px] text-primary-black" }, title),
@@ -3700,6 +3704,14 @@ function Modal(_a) {
3700
3704
  return null;
3701
3705
  }
3702
3706
 
3707
+ var Notification = function (props) {
3708
+ var children = props.children, _a = props.color, color = _a === void 0 ? 'red' : _a, _b = props.isVisible, isVisible = _b === void 0 ? true : _b;
3709
+ var bgColor = color === 'red' ? 'bg-bia-red' : 'bg-bia-white';
3710
+ return (React.createElement("div", { className: "relative" },
3711
+ React.createElement("div", { className: "absolute -right-[3px] -top-[3px] h-1.5 w-1.5 rounded-radius-full ".concat(bgColor), style: { display: isVisible ? 'block' : 'none' } }),
3712
+ children));
3713
+ };
3714
+
3703
3715
  var sizeConfig$2 = {
3704
3716
  md: 'min-w-[38px] h-[40px] text-[14px] font-semibold',
3705
3717
  sm: 'min-w-[29px] h-[30px] text-[12px] font-normal',
@@ -4455,4 +4467,4 @@ function getRelativeTime(date) {
4455
4467
  return "".concat(Math.floor(diffMs / year), " years ago");
4456
4468
  }
4457
4469
 
4458
- export { Accordions, Alert, Avatar, AlertRoundedSquare as BCAlertRoundedSquare, CubeHeader as BCCubeHeader, Discrepancy as BCDiscrepancy, ExposedPort as BCExposedPort, FQAnalytical as BCFQAnalytical, FQGetaway as BCFQGetaway, FQModeler as BCFQModeler, FQOperation as BCFQOperation, FQWelldone as BCFQWelldone, Flowqount as BCFlowqount, Inlet as BCInlet, Legend as BCLegend, ModalBalance as BCModalBalance, Neutral as BCNeutral, Node as BCNode, Outlet as BCOutlet, Port as BCPort, SelectAllAdd as BCSelectAllAdd, SelectAllRemove as BCSelectAllRemove, Spinner$1 as BCSpinner, Stack as BCStack, VirtualPort as BCVirtualPort, Badge, Banner, Brand, Breadcrumb, Button, ButtonApp, Card, Checkbox, Color, ContextualButton, DatePicker, Display, Divider, DropdownContainer, DropdownItem, FileTree, FormGroup, FormGroupButton, FormGroupLabel, FormLabel, Heading, InfoPanel, Link, LiveSearch, MenuContainer, MenuItem, Modal, P, PaginationBar, PickerCalendar, Pills, Popover, ProgressBar, ProgressCircle, Radio, ResizeableDiv, SegmentButtonGroup, SegmentButtonItem, SelectInput, Slider, Spinner, Tab, TabMenu, TableCell, TagLabel, Text, TextArea, TextInput, Toaster, Toggle, Tooltip, TreeItem, Window, getRelativeTime, useFileTree };
4470
+ export { Accordions, Alert, Avatar, AlertRoundedSquare as BCAlertRoundedSquare, CubeHeader as BCCubeHeader, Discrepancy as BCDiscrepancy, ExposedPort as BCExposedPort, FQAnalytical as BCFQAnalytical, FQGetaway as BCFQGetaway, FQModeler as BCFQModeler, FQOperation as BCFQOperation, FQWelldone as BCFQWelldone, Flowqount as BCFlowqount, Inlet as BCInlet, Legend as BCLegend, ModalBalance as BCModalBalance, Neutral as BCNeutral, Node as BCNode, Outlet as BCOutlet, Port as BCPort, SelectAllAdd as BCSelectAllAdd, SelectAllRemove as BCSelectAllRemove, Spinner$1 as BCSpinner, Stack as BCStack, VirtualPort as BCVirtualPort, Badge, Banner, Brand, Breadcrumb, Button, ButtonApp, Card, Checkbox, Color, ContextualButton, DatePicker, Display, Divider, DropdownContainer, DropdownItem, FileTree, FormGroup, FormGroupButton, FormGroupLabel, FormLabel, Heading, InfoPanel, Link, LiveSearch, MenuContainer, MenuItem, Modal, Notification, P, PaginationBar, PickerCalendar, Pills, Popover, ProgressBar, ProgressCircle, Radio, ResizeableDiv, SegmentButtonGroup, SegmentButtonItem, SelectInput, Slider, Spinner, Tab, TabMenu, TableCell, TagLabel, Text, TextArea, TextInput, Toaster, Toggle, Tooltip, TreeItem, Window, getRelativeTime, useFileTree };