@prijsvrijtechsupport/ui 0.0.38 → 0.0.39
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/dist/dist/index.css +9 -5
- package/dist/dist/index.css.map +1 -1
- package/dist/globals.css +4 -0
- package/dist/index.cjs +9 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -11
- package/dist/index.js.map +1 -1
- package/dist/src/components/toggle/index.d.ts +2 -20
- package/dist/styles/variables.css +5 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -156,13 +156,11 @@ var globals_default = {};
|
|
|
156
156
|
* This prevents global style conflicts when the UI package is imported.
|
|
157
157
|
*/
|
|
158
158
|
function withPvUi(Component) {
|
|
159
|
-
const WrappedComponent = forwardRef((props, ref) => {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
});
|
|
165
|
-
});
|
|
159
|
+
const WrappedComponent = forwardRef((props, ref) => /* @__PURE__ */ jsx(Component, {
|
|
160
|
+
...props,
|
|
161
|
+
ref,
|
|
162
|
+
"data-pv-ui": true
|
|
163
|
+
}));
|
|
166
164
|
WrappedComponent.displayName = `withPvUi(${Component.displayName || Component.name || "Component"})`;
|
|
167
165
|
return WrappedComponent;
|
|
168
166
|
}
|
|
@@ -4295,7 +4293,7 @@ const iconMap = {
|
|
|
4295
4293
|
FL: IconPlane,
|
|
4296
4294
|
HO: IconCar
|
|
4297
4295
|
};
|
|
4298
|
-
const TransportToggle = ({ options, selectedValue, onSelect, disabled = false, disabledSingle = undefined, disabledSingleText = "", className, loading, orientation = "horizontal" }) => {
|
|
4296
|
+
const TransportToggle = withPvUi(({ options, selectedValue, onSelect, disabled = false, disabledSingle = undefined, disabledSingleText = "", className, loading, orientation = "horizontal" }) => {
|
|
4299
4297
|
const normalizeOptionValue = (value) => value?.trim().toUpperCase() ?? "";
|
|
4300
4298
|
const normalizedOptionIds = options.map((option) => normalizeOptionValue(option.id));
|
|
4301
4299
|
const normalizedSelectedValue = normalizeOptionValue(selectedValue);
|
|
@@ -4311,7 +4309,7 @@ const TransportToggle = ({ options, selectedValue, onSelect, disabled = false, d
|
|
|
4311
4309
|
const isDisabledSingle = (optionId) => disabledSingle && normalizeOptionValue(optionId) === normalizeOptionValue(disabledSingle);
|
|
4312
4310
|
const isActive = (optionId) => resolvedSelectedValue === normalizeOptionValue(optionId);
|
|
4313
4311
|
return /* @__PURE__ */ jsx("div", {
|
|
4314
|
-
className: "@container w-full",
|
|
4312
|
+
className: "@container w-full box-border",
|
|
4315
4313
|
children: /* @__PURE__ */ jsx("div", {
|
|
4316
4314
|
className: cn("flex justify-between text-xs w-full toggle p-1 rounded-sm font-bold min-h-12", orientation === "horizontal" ? "flex-row" : "flex-col", disabled && "opacity-50", className),
|
|
4317
4315
|
"data-testid": "transport-toggle-wrapper",
|
|
@@ -4345,8 +4343,8 @@ const TransportToggle = ({ options, selectedValue, onSelect, disabled = false, d
|
|
|
4345
4343
|
}, option.id)) })
|
|
4346
4344
|
})
|
|
4347
4345
|
});
|
|
4348
|
-
};
|
|
4349
|
-
const Toggle = TransportToggle;
|
|
4346
|
+
});
|
|
4347
|
+
const Toggle = withPvUi(TransportToggle);
|
|
4350
4348
|
|
|
4351
4349
|
//#endregion
|
|
4352
4350
|
//#region src/components/topHeaderMenu/index.tsx
|