opus-toolkit-components 1.1.3 → 1.1.6
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.
|
@@ -400,7 +400,8 @@ module.exports = function (item) {
|
|
|
400
400
|
|
|
401
401
|
if (true) {
|
|
402
402
|
module.exports = __webpack_require__(160);
|
|
403
|
-
} else
|
|
403
|
+
} else // removed by dead control flow
|
|
404
|
+
{}
|
|
404
405
|
|
|
405
406
|
|
|
406
407
|
/***/ }),
|
|
@@ -820,9 +821,6 @@ const Accordion = _ref => {
|
|
|
820
821
|
setInternalActiveIndex(isActive ? null : index); // Otherwise, toggle internal state
|
|
821
822
|
}
|
|
822
823
|
};
|
|
823
|
-
(0,external_react_.useEffect)(() => {
|
|
824
|
-
console.log("isPreview updated:", isPreview);
|
|
825
|
-
}, [isPreview]);
|
|
826
824
|
|
|
827
825
|
// Sync internal state with external state if activeIndex changes
|
|
828
826
|
(0,external_react_.useEffect)(() => {
|
|
@@ -862,7 +860,7 @@ const Accordion = _ref => {
|
|
|
862
860
|
}))))), isActive && /*#__PURE__*/external_react_default().createElement("div", {
|
|
863
861
|
className: "accordion-body text-[--color-text-weak] bg-[--color-accordion-body] border-0 border-t-2 border-solid border-[--color-stroke] p-3"
|
|
864
862
|
}, children.content), isPreview && activeIndex !== index && /*#__PURE__*/external_react_default().createElement("div", {
|
|
865
|
-
className: "accordion-body text-[--color-text-weak] border-0 border-t-2 border-solid border-[--color-stroke] p-3"
|
|
863
|
+
className: "accordion-body text-[--color-text-weak] border-0 border-t-2 border-solid border-[--color-stroke] bg-[--color-accordion-body] p-3"
|
|
866
864
|
}, children.preview));
|
|
867
865
|
};
|
|
868
866
|
/* harmony default export */ const Accordions_Accordion = (Accordion);
|
|
@@ -4445,7 +4443,8 @@ function $c87311424ea30a05$var$testPlatform(re) {
|
|
|
4445
4443
|
return typeof window !== 'undefined' && window.navigator != null ? re.test(((_window_navigator_userAgentData = window.navigator['userAgentData']) === null || _window_navigator_userAgentData === void 0 ? void 0 : _window_navigator_userAgentData.platform) || window.navigator.platform) : false;
|
|
4446
4444
|
}
|
|
4447
4445
|
function $c87311424ea30a05$var$cached(fn) {
|
|
4448
|
-
if (false)
|
|
4446
|
+
if (false) // removed by dead control flow
|
|
4447
|
+
{}
|
|
4449
4448
|
let res = null;
|
|
4450
4449
|
return ()=>{
|
|
4451
4450
|
if (res == null) res = fn();
|
|
@@ -4632,7 +4631,7 @@ function $507fabe10e71c6fb$var$handleWindowBlur() {
|
|
|
4632
4631
|
/**
|
|
4633
4632
|
* Setup global event listeners to control when keyboard focus style should be visible.
|
|
4634
4633
|
*/ function $507fabe10e71c6fb$var$setupGlobalFocusEvents(element) {
|
|
4635
|
-
if (typeof window === 'undefined' || $507fabe10e71c6fb$export$d90243b58daecda7.get((0, $431fbd86ca7dc216$export$f21a1ffae260145a)(element))) return;
|
|
4634
|
+
if (typeof window === 'undefined' || typeof document === 'undefined' || $507fabe10e71c6fb$export$d90243b58daecda7.get((0, $431fbd86ca7dc216$export$f21a1ffae260145a)(element))) return;
|
|
4636
4635
|
const windowObject = (0, $431fbd86ca7dc216$export$f21a1ffae260145a)(element);
|
|
4637
4636
|
const documentObject = (0, $431fbd86ca7dc216$export$b204af158042fbac)(element);
|
|
4638
4637
|
// Programmatic focus() calls shouldn't affect the current input modality.
|
|
@@ -4655,7 +4654,8 @@ function $507fabe10e71c6fb$var$handleWindowBlur() {
|
|
|
4655
4654
|
documentObject.addEventListener('pointerdown', $507fabe10e71c6fb$var$handlePointerEvent, true);
|
|
4656
4655
|
documentObject.addEventListener('pointermove', $507fabe10e71c6fb$var$handlePointerEvent, true);
|
|
4657
4656
|
documentObject.addEventListener('pointerup', $507fabe10e71c6fb$var$handlePointerEvent, true);
|
|
4658
|
-
} else if (false)
|
|
4657
|
+
} else if (false) // removed by dead control flow
|
|
4658
|
+
{}
|
|
4659
4659
|
// Add unmount handler
|
|
4660
4660
|
windowObject.addEventListener('beforeunload', ()=>{
|
|
4661
4661
|
$507fabe10e71c6fb$var$tearDownWindowFocusTracking(element);
|
|
@@ -4681,7 +4681,8 @@ const $507fabe10e71c6fb$var$tearDownWindowFocusTracking = (element, loadListener
|
|
|
4681
4681
|
documentObject.removeEventListener('pointerdown', $507fabe10e71c6fb$var$handlePointerEvent, true);
|
|
4682
4682
|
documentObject.removeEventListener('pointermove', $507fabe10e71c6fb$var$handlePointerEvent, true);
|
|
4683
4683
|
documentObject.removeEventListener('pointerup', $507fabe10e71c6fb$var$handlePointerEvent, true);
|
|
4684
|
-
} else if (false)
|
|
4684
|
+
} else if (false) // removed by dead control flow
|
|
4685
|
+
{}
|
|
4685
4686
|
$507fabe10e71c6fb$export$d90243b58daecda7.delete(windowObject);
|
|
4686
4687
|
};
|
|
4687
4688
|
function $507fabe10e71c6fb$export$2f1888112f558a7d(element) {
|
|
@@ -5162,13 +5163,15 @@ function $6179b936705e76d3$var$handleGlobalPointerEvent(e) {
|
|
|
5162
5163
|
function $6179b936705e76d3$var$setupGlobalTouchEvents() {
|
|
5163
5164
|
if (typeof document === 'undefined') return;
|
|
5164
5165
|
if (typeof PointerEvent !== 'undefined') document.addEventListener('pointerup', $6179b936705e76d3$var$handleGlobalPointerEvent);
|
|
5165
|
-
else if (false)
|
|
5166
|
+
else if (false) // removed by dead control flow
|
|
5167
|
+
{}
|
|
5166
5168
|
$6179b936705e76d3$var$hoverCount++;
|
|
5167
5169
|
return ()=>{
|
|
5168
5170
|
$6179b936705e76d3$var$hoverCount--;
|
|
5169
5171
|
if ($6179b936705e76d3$var$hoverCount > 0) return;
|
|
5170
5172
|
if (typeof PointerEvent !== 'undefined') document.removeEventListener('pointerup', $6179b936705e76d3$var$handleGlobalPointerEvent);
|
|
5171
|
-
else if (false)
|
|
5173
|
+
else if (false) // removed by dead control flow
|
|
5174
|
+
{}
|
|
5172
5175
|
};
|
|
5173
5176
|
}
|
|
5174
5177
|
function $6179b936705e76d3$export$ae780daf29e6d456(props) {
|
|
@@ -5230,7 +5233,8 @@ function $6179b936705e76d3$export$ae780daf29e6d456(props) {
|
|
|
5230
5233
|
hoverProps.onPointerLeave = (e)=>{
|
|
5231
5234
|
if (!isDisabled && e.currentTarget.contains(e.target)) triggerHoverEnd(e, e.pointerType);
|
|
5232
5235
|
};
|
|
5233
|
-
} else if (false)
|
|
5236
|
+
} else if (false) // removed by dead control flow
|
|
5237
|
+
{}
|
|
5234
5238
|
return {
|
|
5235
5239
|
hoverProps: hoverProps,
|
|
5236
5240
|
triggerHoverEnd: triggerHoverEnd
|
|
@@ -8060,7 +8064,8 @@ const useInsertionEffect = SafeReact.useInsertionEffect;
|
|
|
8060
8064
|
const useSafeInsertionEffect = useInsertionEffect || (fn => fn());
|
|
8061
8065
|
function useEffectEvent(callback) {
|
|
8062
8066
|
const ref = external_react_.useRef(() => {
|
|
8063
|
-
if (false)
|
|
8067
|
+
if (false) // removed by dead control flow
|
|
8068
|
+
{}
|
|
8064
8069
|
});
|
|
8065
8070
|
useSafeInsertionEffect(() => {
|
|
8066
8071
|
ref.current = callback;
|
|
@@ -8249,7 +8254,8 @@ function buildCellMap(sizes, cols, dense) {
|
|
|
8249
8254
|
height
|
|
8250
8255
|
} = _ref2;
|
|
8251
8256
|
if (width > cols) {
|
|
8252
|
-
if (false)
|
|
8257
|
+
if (false) // removed by dead control flow
|
|
8258
|
+
{}
|
|
8253
8259
|
}
|
|
8254
8260
|
let itemPlaced = false;
|
|
8255
8261
|
if (dense) {
|
|
@@ -8663,7 +8669,8 @@ const useReactId = SafeReact.useId;
|
|
|
8663
8669
|
const useId = useReactId || useFloatingId;
|
|
8664
8670
|
|
|
8665
8671
|
let devMessageSet;
|
|
8666
|
-
if (false)
|
|
8672
|
+
if (false) // removed by dead control flow
|
|
8673
|
+
{}
|
|
8667
8674
|
function warn() {
|
|
8668
8675
|
var _devMessageSet;
|
|
8669
8676
|
for (var _len = arguments.length, messages = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
@@ -8718,7 +8725,8 @@ const FloatingArrow = /*#__PURE__*/(/* unused pure expression or super */ null &
|
|
|
8718
8725
|
} = {},
|
|
8719
8726
|
...rest
|
|
8720
8727
|
} = props;
|
|
8721
|
-
if (false)
|
|
8728
|
+
if (false) // removed by dead control flow
|
|
8729
|
+
{}
|
|
8722
8730
|
const clipPathId = useId();
|
|
8723
8731
|
const [isRTL, setIsRTL] = React.useState(false);
|
|
8724
8732
|
|
|
@@ -10926,7 +10934,8 @@ function useFloatingRootContext(options) {
|
|
|
10926
10934
|
const dataRef = external_react_.useRef({});
|
|
10927
10935
|
const [events] = external_react_.useState(() => createPubSub());
|
|
10928
10936
|
const nested = useFloatingParentNodeId() != null;
|
|
10929
|
-
if (false)
|
|
10937
|
+
if (false) // removed by dead control flow
|
|
10938
|
+
{}
|
|
10930
10939
|
const [positionReference, setPositionReference] = external_react_.useState(elementsProp.reference);
|
|
10931
10940
|
const onOpenChange = useEffectEvent((open, event, reason) => {
|
|
10932
10941
|
dataRef.current.openEvent = open ? event : undefined;
|
|
@@ -11335,7 +11344,8 @@ function useListNavigation(context, props) {
|
|
|
11335
11344
|
itemSizes,
|
|
11336
11345
|
dense = false
|
|
11337
11346
|
} = props;
|
|
11338
|
-
if (false)
|
|
11347
|
+
if (false) // removed by dead control flow
|
|
11348
|
+
{}
|
|
11339
11349
|
const floatingFocusElement = getFloatingFocusElement(elements.floating);
|
|
11340
11350
|
const floatingFocusElementRef = floating_ui_react_useLatestRef(floatingFocusElement);
|
|
11341
11351
|
const parentId = useFloatingParentNodeId();
|
|
@@ -12262,7 +12272,8 @@ const inner = props => ({
|
|
|
12262
12272
|
const floatingIsBordered = floating.clientTop !== 0;
|
|
12263
12273
|
const scrollElIsBordered = scrollEl.clientTop !== 0;
|
|
12264
12274
|
const floatingIsScrollEl = floating === scrollEl;
|
|
12265
|
-
if (false)
|
|
12275
|
+
if (false) // removed by dead control flow
|
|
12276
|
+
{}
|
|
12266
12277
|
if (!item) {
|
|
12267
12278
|
return {};
|
|
12268
12279
|
}
|
|
@@ -12701,7 +12712,7 @@ const esm_ChevronDownIcon_ForwardRef = /*#__PURE__*/ external_react_.forwardRef(
|
|
|
12701
12712
|
|
|
12702
12713
|
function Dropdown(_ref) {
|
|
12703
12714
|
let {
|
|
12704
|
-
items
|
|
12715
|
+
items,
|
|
12705
12716
|
label = 'Test Label',
|
|
12706
12717
|
isValid = true,
|
|
12707
12718
|
required = false,
|
|
@@ -12712,17 +12723,21 @@ function Dropdown(_ref) {
|
|
|
12712
12723
|
tabIndex = '',
|
|
12713
12724
|
onChange,
|
|
12714
12725
|
value,
|
|
12715
|
-
// Controlled from parent
|
|
12716
12726
|
Icon,
|
|
12717
12727
|
errorMessage = 'This field is required',
|
|
12718
12728
|
disabled = false,
|
|
12719
|
-
dataCy
|
|
12729
|
+
dataCy // optional override
|
|
12720
12730
|
} = _ref;
|
|
12731
|
+
const [selectedItem, setSelectedItem] = (0,external_react_.useState)(null);
|
|
12721
12732
|
const [isOpen, setIsOpen] = (0,external_react_.useState)(false);
|
|
12722
|
-
|
|
12733
|
+
(0,external_react_.useEffect)(() => {
|
|
12734
|
+
const newSelectedItem = items.find(item => item.value === value) || null;
|
|
12735
|
+
setSelectedItem(newSelectedItem);
|
|
12736
|
+
}, [value, items]);
|
|
12723
12737
|
const inputClasses = "inline-flex w-full justify-between items-center rounded-md bg-[--color-input-bg] text-md font-normal border p-2 text-[--color-text-weak] ".concat(isValid ? 'border-[--color-stroke]' : 'border-utilRed1000', " ").concat(disabled ? 'opacity-50 cursor-not-allowed' : '', " ").concat(className);
|
|
12724
12738
|
const handleSelect = item => {
|
|
12725
|
-
if (disabled
|
|
12739
|
+
if (disabled) return;
|
|
12740
|
+
setSelectedItem(item);
|
|
12726
12741
|
const event = {
|
|
12727
12742
|
target: {
|
|
12728
12743
|
name,
|
|
@@ -12772,7 +12787,7 @@ function Dropdown(_ref) {
|
|
|
12772
12787
|
return /*#__PURE__*/external_react_default().createElement("button", {
|
|
12773
12788
|
type: "button",
|
|
12774
12789
|
onClick: () => handleSelect(item),
|
|
12775
|
-
className: "block w-full px-4 py-2 text-left text-sm text-[--color-text-weak] ".concat(active ? 'bg-[--color-input-bg]' : '', " hover:bg-[--color-input-bg]")
|
|
12790
|
+
className: "block w-full px-4 py-2 text-left text-sm text-[--color-text-weak] ".concat(active ? 'bg-[--color-input-bg] text-[--color-text-weak]' : '', " hover:bg-[--color-input-bg]")
|
|
12776
12791
|
}, item.label);
|
|
12777
12792
|
})))), !isValid && /*#__PURE__*/external_react_default().createElement("span", {
|
|
12778
12793
|
className: "text-utilRed1000 text-sm"
|
|
@@ -12817,10 +12832,11 @@ var c247_icon_only_svg_default = /*#__PURE__*/__webpack_require__.n(c247_icon_on
|
|
|
12817
12832
|
const Navbar = _ref => {
|
|
12818
12833
|
let {
|
|
12819
12834
|
children,
|
|
12820
|
-
logo
|
|
12835
|
+
logo,
|
|
12836
|
+
className = ""
|
|
12821
12837
|
} = _ref;
|
|
12822
|
-
return /*#__PURE__*/external_react_default().createElement("
|
|
12823
|
-
className: "p-4 w-full bg-[--color-primary-bg] navbar"
|
|
12838
|
+
return /*#__PURE__*/external_react_default().createElement("nav", {
|
|
12839
|
+
className: "p-4 w-full bg-[--color-primary-bg] navbar ".concat(className)
|
|
12824
12840
|
}, /*#__PURE__*/external_react_default().createElement("div", {
|
|
12825
12841
|
className: "container mx-auto flex items-center justify-between"
|
|
12826
12842
|
}, /*#__PURE__*/external_react_default().createElement("img", {
|
|
@@ -12893,6 +12909,9 @@ const Modal = _ref => {
|
|
|
12893
12909
|
}, footer)));
|
|
12894
12910
|
};
|
|
12895
12911
|
/* harmony default export */ const Modals_Modal = (Modal);
|
|
12912
|
+
;// external "opus-toolkit-styles/assets/logos/c247-loader.gif"
|
|
12913
|
+
const c247_loader_gif_namespaceObject = require("opus-toolkit-styles/assets/logos/c247-loader.gif");
|
|
12914
|
+
var c247_loader_gif_default = /*#__PURE__*/__webpack_require__.n(c247_loader_gif_namespaceObject);
|
|
12896
12915
|
;// ./src/components/Loader/Loader.js
|
|
12897
12916
|
|
|
12898
12917
|
|
|
@@ -12904,9 +12923,9 @@ function Loader(_ref) {
|
|
|
12904
12923
|
return isLoading && /*#__PURE__*/external_react_default().createElement("div", {
|
|
12905
12924
|
className: "fixed inset-0 flex flex-col items-center justify-center bg-greySunkenDark1000 bg-opacity-80 z-50"
|
|
12906
12925
|
}, /*#__PURE__*/external_react_default().createElement("img", {
|
|
12907
|
-
src: (
|
|
12926
|
+
src: (c247_loader_gif_default()),
|
|
12908
12927
|
alt: "Loading",
|
|
12909
|
-
className: "
|
|
12928
|
+
className: "h-60"
|
|
12910
12929
|
}), /*#__PURE__*/external_react_default().createElement("h4", {
|
|
12911
12930
|
className: "mt-4 text-greyBaseLight text-lg font-medium animate-pulse"
|
|
12912
12931
|
}, loaderText));
|
|
@@ -12999,4 +13018,4 @@ const CookieBanner = _ref => {
|
|
|
12999
13018
|
/******/ })()
|
|
13000
13019
|
;
|
|
13001
13020
|
});
|
|
13002
|
-
//# sourceMappingURL=main.
|
|
13021
|
+
//# sourceMappingURL=main.7a77388a92b2776c6c2e.js.map
|