@parallelworks/ui 0.10.0 → 0.11.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.
|
@@ -675,7 +675,7 @@ function SectionHeader({ children, className = "" }) {
|
|
|
675
675
|
}
|
|
676
676
|
//#endregion
|
|
677
677
|
//#region src/components/SwitchToggle.tsx
|
|
678
|
-
function SwitchToggle({ onChange, value = void 0, yesLabel = "Yes", noLabel = "No", disabled = false, datatip = "", invalid = false }) {
|
|
678
|
+
function SwitchToggle({ onChange, id, value = void 0, yesLabel = "Yes", noLabel = "No", disabled = false, datatip = "", invalid = false }) {
|
|
679
679
|
const [enabled, setEnabled] = useState(value ?? false);
|
|
680
680
|
const [isFocused, setIsFocused] = useState(false);
|
|
681
681
|
const setIsEnabled = (e) => {
|
|
@@ -691,6 +691,7 @@ function SwitchToggle({ onChange, value = void 0, yesLabel = "Yes", noLabel = "N
|
|
|
691
691
|
"data-tooltip-id": datatip ? TOOLTIP_ID : void 0,
|
|
692
692
|
className: cx("w-[198px] h-[30px] overflow-hidden shadow-sm rounded-md cursor-pointer ring-(--theme-border) ring-1", invalid && "border-red-600 focus:border-red-600 focus:ring-red-500 ring-1 ring-red-500", !invalid && isFocused && "ring-1 ring-[rgba(82,168,236,.8)] drop-shadow-[0_1px_2px_rgba(82,168,236,0.8)]"),
|
|
693
693
|
children: /* @__PURE__ */ jsx(Switch, {
|
|
694
|
+
id,
|
|
694
695
|
checked,
|
|
695
696
|
onChange: setIsEnabled,
|
|
696
697
|
className: "text-white text-sm shadow-sm rounded-md cursor-pointer",
|
|
@@ -410,8 +410,8 @@ export type UILinkComponent = React.ComponentType<{
|
|
|
410
410
|
onClick?: () => void;
|
|
411
411
|
className?: string;
|
|
412
412
|
children: ReactNode;
|
|
413
|
-
title?: string;
|
|
414
|
-
'aria-label'?: string;
|
|
413
|
+
title?: string | undefined;
|
|
414
|
+
'aria-label'?: string | undefined;
|
|
415
415
|
[dataAttr: `data-${string}`]: string | undefined;
|
|
416
416
|
}>;
|
|
417
417
|
/** The provider's link slot, with a plain anchor fallback. */
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
interface IToggleProps {
|
|
2
2
|
onChange: (value: boolean) => void;
|
|
3
|
+
/** Lets a `<label htmlFor>` point at the toggle. */
|
|
4
|
+
id?: string;
|
|
3
5
|
value?: boolean;
|
|
4
6
|
/** Display label for the on/off positions; defaults to Yes/No. */
|
|
5
7
|
yesLabel?: string;
|
|
@@ -8,5 +10,5 @@ interface IToggleProps {
|
|
|
8
10
|
datatip?: string | undefined;
|
|
9
11
|
invalid?: boolean;
|
|
10
12
|
}
|
|
11
|
-
declare function SwitchToggle({ onChange, value, yesLabel, noLabel, disabled, datatip, invalid, }: IToggleProps): import("react").JSX.Element;
|
|
13
|
+
declare function SwitchToggle({ onChange, id, value, yesLabel, noLabel, disabled, datatip, invalid, }: IToggleProps): import("react").JSX.Element;
|
|
12
14
|
export default SwitchToggle;
|
package/dist/form/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { AngleRightIcon, EyeIcon, EyeOffIcon, SuccessCheckmark, TrashIcon } from
|
|
|
2
2
|
import { c as useStrings, s as useSlots } from "../chunks/Provider-CfFV-vc5.js";
|
|
3
3
|
import { n as TOOLTIP_ID, r as TooltipInfo } from "../chunks/Tooltip-WgbiC_nd.js";
|
|
4
4
|
import { n as StatusDot, s as isCategory } from "../chunks/StatusBadge-P6C2tv7Z.js";
|
|
5
|
-
import { a as UncontrolledCollapsiblePanel, c as Dropdown, n as SectionHeader, o as MultiSelectDropdown, r as ControlledCollapsiblePanel, s as CustomListbox, t as SwitchToggle } from "../chunks/SwitchToggle-
|
|
5
|
+
import { a as UncontrolledCollapsiblePanel, c as Dropdown, n as SectionHeader, o as MultiSelectDropdown, r as ControlledCollapsiblePanel, s as CustomListbox, t as SwitchToggle } from "../chunks/SwitchToggle-DcPCXkqL.js";
|
|
6
6
|
import { t as Loader } from "../chunks/Loader-BXoXTZGc.js";
|
|
7
7
|
import { n as Table } from "../chunks/Table-ByziK93x.js";
|
|
8
8
|
import { a as resolvedFlag, c as FieldWrapper, i as initializeValues, n as flattenGroups, o as applySecondaryField, r as impureSetValueFromPath, s as findSecondaryOption, t as enforceOneMustBeTrue } from "../chunks/lib-DTgL8klR.js";
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { a as CreateModalSelect, c as ConfirmModal, d as primaryButtonClasses, f
|
|
|
4
4
|
import { a as useProvisionCorsRules, c as useStrings, i as useNotify, l as useWorkflowJsonResolver, n as useLink, o as useRunFile, r as useNavigation, s as useSlots, t as UIProvider } from "./chunks/Provider-CfFV-vc5.js";
|
|
5
5
|
import { i as formatTooltipContent, n as TOOLTIP_ID, r as TooltipInfo, t as GlobalTooltip } from "./chunks/Tooltip-WgbiC_nd.js";
|
|
6
6
|
import { c as isOption, i as filterOption, l as toggleSetMember, n as StatusDot, o as flattenOptions, r as DropdownCaret, s as isCategory, t as StatusBadge } from "./chunks/StatusBadge-P6C2tv7Z.js";
|
|
7
|
-
import { a as UncontrolledCollapsiblePanel, c as Dropdown, i as MaybeCollapsible, n as SectionHeader, o as MultiSelectDropdown, r as ControlledCollapsiblePanel, s as CustomListbox, t as SwitchToggle } from "./chunks/SwitchToggle-
|
|
7
|
+
import { a as UncontrolledCollapsiblePanel, c as Dropdown, i as MaybeCollapsible, n as SectionHeader, o as MultiSelectDropdown, r as ControlledCollapsiblePanel, s as CustomListbox, t as SwitchToggle } from "./chunks/SwitchToggle-DcPCXkqL.js";
|
|
8
8
|
import { t as Loader } from "./chunks/Loader-BXoXTZGc.js";
|
|
9
9
|
import { n as modalPanelClasses, t as BareModal } from "./chunks/BareModal-DBa84JZO.js";
|
|
10
10
|
import { S as AddMenu, _ as BreadcrumbProvider, a as HeaderAddButton, b as useHideBreadcrumbs, c as PageHeader, i as HeaderActionMenu, n as BreadcrumbsRightAction, o as HeaderEditButton, r as BreadcrumbsTitleAction, s as HeaderRowMenu, t as BreadcrumbsActionButton, v as useBreadcrumb, x as useSetBreadcrumbs, y as useClearBreadcrumbs } from "./chunks/PageHeader-gNiEcD23.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parallelworks/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "Shared UI foundation for Parallel Works packages: theme contract, icons, and core primitives",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Parallel Works <support@parallelworks.com>",
|