@wavelengthusaf/components 3.0.0 → 3.0.1

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/README.md CHANGED
@@ -14,6 +14,11 @@ npm install @wavelengthusaf/components
14
14
 
15
15
  ## Release Notes
16
16
 
17
+ ### 3.0.1
18
+
19
+ - 5/27/2025
20
+ - Updated `WavelengthProgressBar` to be a web component; added several new props
21
+
17
22
  ### 3.0.0
18
23
 
19
24
  - 5/16/2025
@@ -63,7 +68,7 @@ npm install @wavelengthusaf/components
63
68
  ### 2.9.1
64
69
 
65
70
  - 5/02/2025
66
- - WavelengthButton updated; new props
71
+ - `WavelengthButton` updated; new props
67
72
  - Minor bug fixes
68
73
 
69
74
  ### 2.9.0
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var __create = Object.create;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var __create = Object.create;
2
2
  var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1503,6 +1503,85 @@ if (!customElements.get("wavelength-button")) {
1503
1503
  customElements.define("wavelength-button", WavelengthButton);
1504
1504
  }
1505
1505
 
1506
+ // src/web-components/wavelength-progress-bar.ts
1507
+ var template2 = document.createElement("template");
1508
+ template2.innerHTML = `
1509
+ <style>
1510
+ .label {
1511
+ display: flex;
1512
+ justify-content: space-between;
1513
+ font-family: Arial, sans-serif;
1514
+ margin-bottom: 6px;
1515
+ }
1516
+ .progress-bar {
1517
+ background-color: #e0e0e0;
1518
+ border: 1px solid black;
1519
+ border-radius: 12px;
1520
+ overflow: hidden;
1521
+ position: relative;
1522
+ }
1523
+ .progress-fill {
1524
+ background-color: #1976d2;
1525
+ height: 100%;
1526
+ transition: width 0.3s ease-in-out;
1527
+ border-right: 1px solid black;
1528
+ }
1529
+ </style>
1530
+ <div class="container">
1531
+ <div class="label">
1532
+ <span class="name"></span>
1533
+ <span class="status"></span>
1534
+ </div>
1535
+ <div class="progress-bar">
1536
+ <div class="progress-fill"></div>
1537
+ </div>
1538
+ </div>
1539
+ `;
1540
+ var WavelengthProgressBar = class extends HTMLElement {
1541
+ static get observedAttributes() {
1542
+ return ["value", "width", "height", "font-size", "font-color", "progress-border", "progress-color", "name"];
1543
+ }
1544
+ constructor() {
1545
+ super();
1546
+ const shadow = this.attachShadow({ mode: "open" });
1547
+ shadow.appendChild(template2.content.cloneNode(true));
1548
+ this.container = shadow.querySelector(".container");
1549
+ this.nameSpan = shadow.querySelector(".name");
1550
+ this.statusSpan = shadow.querySelector(".status");
1551
+ this.progressBar = shadow.querySelector(".progress-bar");
1552
+ this.progressFill = shadow.querySelector(".progress-fill");
1553
+ }
1554
+ connectedCallback() {
1555
+ this.updateRendering();
1556
+ }
1557
+ attributeChangedCallback() {
1558
+ this.updateRendering();
1559
+ }
1560
+ updateRendering() {
1561
+ const value = Number(_nullishCoalesce(this.getAttribute("value"), () => ( "0")));
1562
+ const width2 = _nullishCoalesce(this.getAttribute("width"), () => ( "425px"));
1563
+ const height2 = _nullishCoalesce(this.getAttribute("height"), () => ( "12px"));
1564
+ const fontSize = _nullishCoalesce(this.getAttribute("font-size"), () => ( "inherit"));
1565
+ const fontColor = _nullishCoalesce(this.getAttribute("font-color"), () => ( "#000000"));
1566
+ const progressBorder = _nullishCoalesce(this.getAttribute("progress-border"), () => ( "10px solid black"));
1567
+ const progressColor = _nullishCoalesce(this.getAttribute("progress-color"), () => ( "#1976d2"));
1568
+ const name = _nullishCoalesce(this.getAttribute("name"), () => ( ""));
1569
+ this.container.style.width = width2;
1570
+ this.progressBar.style.width = width2;
1571
+ this.progressBar.style.height = height2;
1572
+ this.progressBar.style.border = progressBorder;
1573
+ this.progressFill.style.width = `${Math.min(value, 100)}%`;
1574
+ this.progressFill.style.backgroundColor = progressColor;
1575
+ this.nameSpan.textContent = name;
1576
+ this.statusSpan.textContent = value === 100 ? `Complete! - ${value}%` : `Uploading - ${value}%`;
1577
+ this.nameSpan.style.fontSize = fontSize;
1578
+ this.nameSpan.style.color = fontColor;
1579
+ this.statusSpan.style.fontSize = fontSize;
1580
+ this.statusSpan.style.color = fontColor;
1581
+ }
1582
+ };
1583
+ customElements.define("wavelength-progress-bar", WavelengthProgressBar);
1584
+
1506
1585
  // src/styles/fontBase64.tsx
1507
1586
  var goldmanFont = `@font-face {
1508
1587
  font-family: 'Goldman';
@@ -5154,41 +5233,24 @@ function WavelengthDragAndDrop({
5154
5233
  }
5155
5234
 
5156
5235
  // src/components/PageComponents/WavelengthProgressBar.tsx
5157
- var _Box = require('@mui/material/Box'); var _Box2 = _interopRequireDefault(_Box);
5158
- var _LinearProgress = require('@mui/material/LinearProgress'); var _LinearProgress2 = _interopRequireDefault(_LinearProgress);
5159
5236
 
5160
- function WavelengthProgressBar({ dataTestId, width: width2 = "425px", height: height2 = "12px", backgroundColor: backgroundColor2, borderRadius: borderRadius2 = "24px", progressColor, value, name, textColor = "inherit" }) {
5161
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
5162
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: { display: "flex", flexDirection: "row", width: width2, justifyContent: "space-between", color: textColor }, children: [
5163
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "label", { htmlFor: "", children: name }),
5164
- value === 100 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "label", { htmlFor: "", children: [
5165
- "Complete! - ",
5166
- value,
5167
- "%"
5168
- ] }),
5169
- value !== 100 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "label", { htmlFor: "", children: [
5170
- "Uploading - ",
5171
- value,
5172
- "%"
5173
- ] })
5174
- ] }),
5175
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Box2.default, { "data-testid": dataTestId, sx: { width: width2, height: "12px", borderRadius: "24px" }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
5176
- _LinearProgress2.default,
5177
- {
5178
- variant: "determinate",
5179
- value,
5180
- style: { backgroundColor: backgroundColor2, height: height2, borderRadius: borderRadius2, border: "2px solid black" },
5181
- sx: {
5182
- "& .MuiLinearProgress-bar": {
5183
- backgroundColor: progressColor,
5184
- borderRadius: borderRadius2,
5185
- border: "1px solid black"
5186
- }
5187
- }
5188
- }
5189
- ) })
5190
- ] });
5191
- }
5237
+
5238
+ var WavelengthProgressBar2 = ({ name, value, width: width2, height: height2, fontSize, fontColor, progressBorder, progressColor, ...rest }) => {
5239
+ const ref = _react.useRef.call(void 0, null);
5240
+ _react.useEffect.call(void 0, () => {
5241
+ if (ref.current) {
5242
+ if (name !== void 0) ref.current.setAttribute("name", name);
5243
+ if (value !== void 0) ref.current.setAttribute("value", value.toString());
5244
+ if (width2 !== void 0) ref.current.setAttribute("width", width2);
5245
+ if (height2 !== void 0) ref.current.setAttribute("height", height2);
5246
+ if (fontSize !== void 0) ref.current.setAttribute("font-size", fontSize);
5247
+ if (fontColor !== void 0) ref.current.setAttribute("font-color", fontColor);
5248
+ if (progressBorder !== void 0) ref.current.setAttribute("progress-border", progressBorder);
5249
+ if (progressColor !== void 0) ref.current.setAttribute("progress-color", progressColor);
5250
+ }
5251
+ }, [name, value, width2, height2, fontSize, fontColor, progressBorder, progressColor]);
5252
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "wavelength-progress-bar", { ref, ...rest });
5253
+ };
5192
5254
 
5193
5255
  // src/components/PageComponents/WavelengthCommentDisplay.tsx
5194
5256
 
@@ -5561,7 +5623,7 @@ function WavelengthAlert({
5561
5623
 
5562
5624
  // src/components/footers/WavelengthFooter/WavelengthFooter.tsx
5563
5625
 
5564
-
5626
+ var _Box = require('@mui/material/Box'); var _Box2 = _interopRequireDefault(_Box);
5565
5627
  var _Container = require('@mui/material/Container'); var _Container2 = _interopRequireDefault(_Container);
5566
5628
 
5567
5629
 
@@ -7294,7 +7356,7 @@ var SampleComponent2 = ({
7294
7356
 
7295
7357
 
7296
7358
 
7297
- exports.ButtonIcon = ButtonIcon; exports.ButtonMenu = ButtonMenu; exports.DefaultCarousel = DefaultCarousel; exports.DefaultPagination = DefaultPagination; exports.SampleComponent = SampleComponent2; exports.SliderCardCarousel = SliderCardCarousel; exports.WavelengthAccessAlert = WavelengthAccessAlert; exports.WavelengthAlert = WavelengthAlert; exports.WavelengthAppLogo = WavelengthAppLogo; exports.WavelengthAppTheme = WavelengthAppTheme; exports.WavelengthAutocomplete = WavelengthAutocomplete; exports.WavelengthBanner = WavelengthBanner2; exports.WavelengthBox = WavelengthBox; exports.WavelengthButton = WavelengthButton2; exports.WavelengthCommentDisplay = WavelengthCommentDisplay; exports.WavelengthConfirmationModal = WavelengthConfirmationModal; exports.WavelengthContentModal = WavelengthContentModal; exports.WavelengthContentPlaceholder = WavelengthContentPlaceholder; exports.WavelengthDataTable = WavelengthDataTable; exports.WavelengthDefaultIcon = WavelengthDefaultIcon; exports.WavelengthDragAndDrop = WavelengthDragAndDrop; exports.WavelengthDropdown = WavelengthDropdown; exports.WavelengthDropdownButton = WavelengthDropdownButton; exports.WavelengthExampleComponent = WavelengthExampleComponent; exports.WavelengthFileDownloader = WavelengthFileDownloader; exports.WavelengthFooter = WavelengthFooter; exports.WavelengthManyPlanes = WavelengthManyPlanes; exports.WavelengthNotAvailablePage = WavelengthNotAvailablePage; exports.WavelengthPermissionAlert = WavelengthPermissionAlert; exports.WavelengthPlaneTrail = WavelengthPlaneTrail; exports.WavelengthPopUpMenu = WavelengthPopUpMenu; exports.WavelengthProgressBar = WavelengthProgressBar; exports.WavelengthSearch = WavelengthSearch; exports.WavelengthSearchTextField = WavelengthSearchTextField; exports.WavelengthSideBar = WavelengthSideBar; exports.WavelengthSlider = WavelengthSlider; exports.WavelengthSnackbar = WavelengthSnackbar; exports.WavelengthSpinningLogo = WavelengthSpinningLogo; exports.WavelengthSpinningOuterCircle = WavelengthSpinningOuterCircle; exports.WavelengthStandardSnackbar = WavelengthStandardSnackbar; exports.WavelengthStyledButton = WavelengthStyledButton; exports.WavelengthTestSnackbar = WavelengthTestSnackbar; exports.WavelengthTextField = WavelengthTextField; exports.WavelengthTitleBar = WavelengthTitleBar2; exports.add = add; exports.ascendingRange = ascendingRange; exports.concat = concat; exports.findBestStringMatch = findBestStringMatch; exports.range = range; exports.useOutsideClick = useOutsideClick; exports.useThemeContext = useThemeContext;
7359
+ exports.ButtonIcon = ButtonIcon; exports.ButtonMenu = ButtonMenu; exports.DefaultCarousel = DefaultCarousel; exports.DefaultPagination = DefaultPagination; exports.SampleComponent = SampleComponent2; exports.SliderCardCarousel = SliderCardCarousel; exports.WavelengthAccessAlert = WavelengthAccessAlert; exports.WavelengthAlert = WavelengthAlert; exports.WavelengthAppLogo = WavelengthAppLogo; exports.WavelengthAppTheme = WavelengthAppTheme; exports.WavelengthAutocomplete = WavelengthAutocomplete; exports.WavelengthBanner = WavelengthBanner2; exports.WavelengthBox = WavelengthBox; exports.WavelengthButton = WavelengthButton2; exports.WavelengthCommentDisplay = WavelengthCommentDisplay; exports.WavelengthConfirmationModal = WavelengthConfirmationModal; exports.WavelengthContentModal = WavelengthContentModal; exports.WavelengthContentPlaceholder = WavelengthContentPlaceholder; exports.WavelengthDataTable = WavelengthDataTable; exports.WavelengthDefaultIcon = WavelengthDefaultIcon; exports.WavelengthDragAndDrop = WavelengthDragAndDrop; exports.WavelengthDropdown = WavelengthDropdown; exports.WavelengthDropdownButton = WavelengthDropdownButton; exports.WavelengthExampleComponent = WavelengthExampleComponent; exports.WavelengthFileDownloader = WavelengthFileDownloader; exports.WavelengthFooter = WavelengthFooter; exports.WavelengthManyPlanes = WavelengthManyPlanes; exports.WavelengthNotAvailablePage = WavelengthNotAvailablePage; exports.WavelengthPermissionAlert = WavelengthPermissionAlert; exports.WavelengthPlaneTrail = WavelengthPlaneTrail; exports.WavelengthPopUpMenu = WavelengthPopUpMenu; exports.WavelengthProgressBar = WavelengthProgressBar2; exports.WavelengthSearch = WavelengthSearch; exports.WavelengthSearchTextField = WavelengthSearchTextField; exports.WavelengthSideBar = WavelengthSideBar; exports.WavelengthSlider = WavelengthSlider; exports.WavelengthSnackbar = WavelengthSnackbar; exports.WavelengthSpinningLogo = WavelengthSpinningLogo; exports.WavelengthSpinningOuterCircle = WavelengthSpinningOuterCircle; exports.WavelengthStandardSnackbar = WavelengthStandardSnackbar; exports.WavelengthStyledButton = WavelengthStyledButton; exports.WavelengthTestSnackbar = WavelengthTestSnackbar; exports.WavelengthTextField = WavelengthTextField; exports.WavelengthTitleBar = WavelengthTitleBar2; exports.add = add; exports.ascendingRange = ascendingRange; exports.concat = concat; exports.findBestStringMatch = findBestStringMatch; exports.range = range; exports.useOutsideClick = useOutsideClick; exports.useThemeContext = useThemeContext;
7298
7360
  /*! Bundled license information:
7299
7361
 
7300
7362
  react-is/cjs/react-is.production.min.js: