@linzjs/lui 17.52.2 → 17.53.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 CHANGED
@@ -1,3 +1,17 @@
1
+ # [17.53.0](https://github.com/linz/lui/compare/v17.52.3...v17.53.0) (2023-05-05)
2
+
3
+
4
+ ### Features
5
+
6
+ * Update LuiBadge to do Same Colour fill and added info type ([#938](https://github.com/linz/lui/issues/938)) ([75d88f1](https://github.com/linz/lui/commit/75d88f1b19bfbb73a2a24534a84fad4a13732896))
7
+
8
+ ## [17.52.3](https://github.com/linz/lui/compare/v17.52.2...v17.52.3) (2023-05-02)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * added styling for text input with :disabled attribute ([#935](https://github.com/linz/lui/issues/935)) ([cd4fb16](https://github.com/linz/lui/commit/cd4fb16b03188ff6a6ec19c1e8d20cb30ec16acc))
14
+
1
15
  ## [17.52.2](https://github.com/linz/lui/compare/v17.52.1...v17.52.2) (2023-04-26)
2
16
 
3
17
 
@@ -1,9 +1,12 @@
1
1
  import React from 'react';
2
+ declare type LuiBadgeFillVariation = 'outline' | 'fill';
2
3
  export interface ILuiBadge {
3
4
  children: React.ReactNode;
4
5
  size?: 'sm' | 'default' | 'lg';
5
6
  backgroundFill?: boolean;
6
- variation?: 'default' | 'warning';
7
+ variation?: 'default' | 'warning' | 'info';
7
8
  ariaRoleDescription: string;
9
+ fillVariation?: LuiBadgeFillVariation;
8
10
  }
9
- export declare const LuiBadge: (props: ILuiBadge) => JSX.Element;
11
+ export declare const LuiBadge: ({ size, variation, backgroundFill, ariaRoleDescription, fillVariation, children, }: ILuiBadge) => JSX.Element;
12
+ export {};
package/dist/index.js CHANGED
@@ -55008,7 +55008,7 @@ var LuiModalHeader = function (props) {
55008
55008
  React__default["default"].createElement(LuiIcon, { name: "ic_clear", alt: "Help", size: "lg" }))))))));
55009
55009
  };
55010
55010
 
55011
- var css_248z$6 = "@keyframes react-loading-skeleton {\n 100% {\n transform: translateX(100%);\n }\n}\n\n.react-loading-skeleton {\n --base-color: #ebebeb;\n --highlight-color: #f5f5f5;\n --animation-duration: 1.5s;\n --animation-direction: normal;\n --pseudo-element-display: block; /* Enable animation */\n\n background-color: var(--base-color);\n\n width: 100%;\n border-radius: 0.25rem;\n display: inline-flex;\n line-height: 1;\n\n position: relative;\n overflow: hidden;\n z-index: 1; /* Necessary for overflow: hidden to work correctly in Safari */\n}\n\n.react-loading-skeleton::after {\n content: ' ';\n display: var(--pseudo-element-display);\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n height: 100%;\n background-repeat: no-repeat;\n background-image: linear-gradient(\n 90deg,\n var(--base-color),\n var(--highlight-color),\n var(--base-color)\n );\n transform: translateX(-100%);\n\n animation-name: react-loading-skeleton;\n animation-direction: var(--animation-direction);\n animation-duration: var(--animation-duration);\n animation-timing-function: ease-in-out;\n animation-iteration-count: infinite;\n}\n";
55011
+ var css_248z$6 = "@keyframes react-loading-skeleton {\n 100% {\n transform: translateX(100%);\n }\n}\n\n.react-loading-skeleton {\n --base-color: #ebebeb;\n --highlight-color: #f5f5f5;\n --animation-duration: 1.5s;\n --animation-direction: normal;\n --pseudo-element-display: block; /* Enable animation */\n\n background-color: var(--base-color);\n\n width: 100%;\n border-radius: 0.25rem;\n display: inline-flex;\n line-height: 1;\n\n position: relative;\n user-select: none;\n overflow: hidden;\n z-index: 1; /* Necessary for overflow: hidden to work correctly in Safari */\n}\n\n.react-loading-skeleton::after {\n content: ' ';\n display: var(--pseudo-element-display);\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n height: 100%;\n background-repeat: no-repeat;\n background-image: linear-gradient(\n 90deg,\n var(--base-color),\n var(--highlight-color),\n var(--base-color)\n );\n transform: translateX(-100%);\n\n animation-name: react-loading-skeleton;\n animation-direction: var(--animation-direction);\n animation-duration: var(--animation-duration);\n animation-timing-function: ease-in-out;\n animation-iteration-count: infinite;\n}\n\n@media (prefers-reduced-motion) {\n .react-loading-skeleton {\n --pseudo-element-display: none; /* Disable animation */\n }\n}\n";
55012
55012
  styleInject(css_248z$6);
55013
55013
 
55014
55014
  /**
@@ -60223,7 +60223,19 @@ function useClickedOutsideElement(refElement, handleClickOutside) {
60223
60223
  }, []);
60224
60224
  }
60225
60225
 
60226
- var LuiBadge = function (props) { return (React__default["default"].createElement("p", { className: clsx('LuiBadge', props.size === 'sm' && 'LuiBadge--sm', props.size === 'lg' && 'LuiBadge--lg', props.backgroundFill && 'LuiBadge--fill', props.variation === 'warning' && 'LuiBadge--warning'), "aria-roledescription": props.ariaRoleDescription }, props.children)); };
60226
+ var getFillClassName = function (fillVariation, backgroundFill) {
60227
+ if (backgroundFill) {
60228
+ return 'LuiBadge--fill';
60229
+ }
60230
+ else if (fillVariation === 'fill') {
60231
+ return 'LuiBadge--fill-color';
60232
+ }
60233
+ return 'LuiBadge--outline';
60234
+ };
60235
+ var LuiBadge = function (_a) {
60236
+ var _b = _a.size, size = _b === void 0 ? 'default' : _b, _c = _a.variation, variation = _c === void 0 ? 'default' : _c, backgroundFill = _a.backgroundFill, ariaRoleDescription = _a.ariaRoleDescription, _d = _a.fillVariation, fillVariation = _d === void 0 ? 'outline' : _d, children = _a.children;
60237
+ return (React__default["default"].createElement("p", { className: clsx('LuiBadge', "LuiBadge--".concat(size), getFillClassName(fillVariation, backgroundFill), "LuiBadge--variation-".concat(variation)), "aria-roledescription": ariaRoleDescription }, children));
60238
+ };
60227
60239
 
60228
60240
  var LuiSidePanelContext = React__default["default"].createContext({ setProps: function () { return undefined; } });
60229
60241
  var LuiSidePanel = function (_a) {