@mittwald/flow-react-components 0.2.0-alpha.645 → 0.2.0-alpha.646
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 +4 -0
- package/dist/assets/doc-properties.json +3327 -3346
- package/dist/js/components/src/components/Action/Action.mjs +8 -0
- package/dist/js/components/src/components/Action/Action.mjs.map +1 -1
- package/dist/js/components/src/components/Action/models/ActionExecution.mjs +2 -2
- package/dist/js/components/src/components/Action/models/ActionExecution.mjs.map +1 -1
- package/dist/js/components/src/components/Action/models/getExecutionFunction.mjs +2 -8
- package/dist/js/components/src/components/Action/models/getExecutionFunction.mjs.map +1 -1
- package/dist/js/components/src/components/CopyButton/CopyButton.mjs +1 -1
- package/dist/js/components/src/components/CopyButton/CopyButton.mjs.map +1 -1
- package/dist/js/components/src/components/PasswordCreationField/components/PasswordGenerateButton/PasswordGenerateButton.mjs +1 -1
- package/dist/js/components/src/components/PasswordCreationField/components/PasswordGenerateButton/PasswordGenerateButton.mjs.map +1 -1
- package/dist/js/components/src/components/PasswordCreationField/components/TogglePasswordVisibilityButton/TogglePasswordVisibilityButton.mjs +1 -1
- package/dist/js/components/src/components/PasswordCreationField/components/TogglePasswordVisibilityButton/TogglePasswordVisibilityButton.mjs.map +1 -1
- package/dist/types/components/Action/Action.d.ts.map +1 -1
- package/dist/types/components/Action/models/getExecutionFunction.d.ts.map +1 -1
- package/dist/types/components/Action/stories/Default.stories.d.ts.map +1 -1
- package/dist/types/components/Action/stories/EdgeCases.stories.d.ts.map +1 -1
- package/dist/types/components/Action/types.d.ts +0 -1
- package/dist/types/components/Action/types.d.ts.map +1 -1
- package/dist/types/components/ActionGroup/stories/Default.stories.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -48,6 +48,14 @@ const Action = flowComponent(
|
|
|
48
48
|
actionModel: actionModelFromProps,
|
|
49
49
|
...actionProps
|
|
50
50
|
} = props;
|
|
51
|
+
if ("action" in actionProps && typeof actionProps.action === "function") {
|
|
52
|
+
console.warn(
|
|
53
|
+
"The 'action' prop is now deprecated. Use 'onAction' instead."
|
|
54
|
+
);
|
|
55
|
+
if ("onAction" in actionProps === false) {
|
|
56
|
+
actionProps.onAction = actionProps.action;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
51
59
|
const newActionModel = ActionModel.useNew(actionProps);
|
|
52
60
|
const actionModel = actionModelFromProps ?? newActionModel;
|
|
53
61
|
const propsContext = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Action.mjs","sources":["../../../../../../src/components/Action/Action.tsx"],"sourcesContent":["import { ActionModel as ActionModel } from \"@/components/Action/models/ActionModel\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { dynamic, PropsContextProvider } from \"@/lib/propsContext\";\nimport { ActionContextProvider } from \"@/components/Action/context\";\nimport { useActionStateContext } from \"@/components/Action/models/ActionStateContext\";\nimport { useConfirmationModalButtonSlot } from \"@/components/Action/hooks/useConfirmationModalButtonSlot\";\nimport { useActionButtonState } from \"@/components/Action/hooks/useActionButtonState\";\nimport type { ComponentPropsContext } from \"@/lib/propsContext/types\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\n\nconst actionButtonContext: ComponentPropsContext<\"Button\"> = {\n onPress: dynamic((props) => {\n const action = ActionModel.use();\n const confirmAction = ActionModel.useConfirmationAction();\n const isConfirmationButton =\n useConfirmationModalButtonSlot(props) === \"primary\";\n const isAbortButton = useConfirmationModalButtonSlot(props) === \"abort\";\n if (isAbortButton) {\n return action.confirmationModalController.close;\n }\n return isConfirmationButton ? confirmAction.execute : action.execute;\n }),\n\n isPending: dynamic((props) => {\n const actionState = useActionButtonState(props);\n return props.isPending ?? actionState === \"isPending\";\n }),\n\n isSucceeded: dynamic((props) => {\n const actionState = useActionButtonState(props);\n return props.isSucceeded ?? actionState === \"isSucceeded\";\n }),\n\n isFailed: dynamic((props) => {\n const actionState = useActionButtonState(props);\n return props.isFailed ?? actionState === \"isFailed\";\n }),\n\n \"aria-disabled\": dynamic((props) => {\n const state = useActionButtonState(props);\n const someActionInContextIsBusy = useActionStateContext().useIsBusy();\n return (\n props[\"aria-disabled\"] ??\n (state === \"isExecuting\" || someActionInContextIsBusy)\n );\n }),\n};\n\nexport const Action = flowComponent(\n \"Action\",\n (props) => {\n const {\n children,\n actionModel: actionModelFromProps,\n ...actionProps\n } = props;\n const newActionModel = ActionModel.useNew(actionProps);\n const actionModel = actionModelFromProps ?? newActionModel;\n\n const propsContext: PropsContext = {\n Button: actionButtonContext,\n\n Link: {\n onPress: dynamic(() => ActionModel.use().execute),\n },\n\n MenuItem: {\n onAction: dynamic(() => ActionModel.use().execute),\n },\n\n Modal: {\n slot: dynamic((props) => {\n const { slot } = props;\n const action = ActionModel.use();\n action.needsConfirmation = slot === \"actionConfirm\";\n return slot;\n }),\n isDismissable: dynamic((props) => {\n const action = ActionModel.use();\n const actionState = action.state.useValue();\n return actionState === \"isExecuting\" || actionState === \"isPending\"\n ? false\n : props.isDismissable;\n }),\n controller: dynamic(() => {\n const action = ActionModel.use();\n return action.needsConfirmation\n ? action.confirmationModalController\n : action.getOverlayController(\"Modal\");\n }),\n ActionGroup: {\n Button: actionButtonContext,\n },\n },\n };\n\n return (\n <ActionContextProvider value={actionModel}>\n <PropsContextProvider props={propsContext}>\n {children}\n </PropsContextProvider>\n </ActionContextProvider>\n );\n },\n {\n type: \"provider\",\n },\n);\n\nexport default Action;\n"],"names":["props"],"mappings":";;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"Action.mjs","sources":["../../../../../../src/components/Action/Action.tsx"],"sourcesContent":["import { ActionModel as ActionModel } from \"@/components/Action/models/ActionModel\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { dynamic, PropsContextProvider } from \"@/lib/propsContext\";\nimport { ActionContextProvider } from \"@/components/Action/context\";\nimport { useActionStateContext } from \"@/components/Action/models/ActionStateContext\";\nimport { useConfirmationModalButtonSlot } from \"@/components/Action/hooks/useConfirmationModalButtonSlot\";\nimport { useActionButtonState } from \"@/components/Action/hooks/useActionButtonState\";\nimport type { ComponentPropsContext } from \"@/lib/propsContext/types\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport type { ActionFn } from \"@/components/Action/types\";\n\nconst actionButtonContext: ComponentPropsContext<\"Button\"> = {\n onPress: dynamic((props) => {\n const action = ActionModel.use();\n const confirmAction = ActionModel.useConfirmationAction();\n const isConfirmationButton =\n useConfirmationModalButtonSlot(props) === \"primary\";\n const isAbortButton = useConfirmationModalButtonSlot(props) === \"abort\";\n if (isAbortButton) {\n return action.confirmationModalController.close;\n }\n return isConfirmationButton ? confirmAction.execute : action.execute;\n }),\n\n isPending: dynamic((props) => {\n const actionState = useActionButtonState(props);\n return props.isPending ?? actionState === \"isPending\";\n }),\n\n isSucceeded: dynamic((props) => {\n const actionState = useActionButtonState(props);\n return props.isSucceeded ?? actionState === \"isSucceeded\";\n }),\n\n isFailed: dynamic((props) => {\n const actionState = useActionButtonState(props);\n return props.isFailed ?? actionState === \"isFailed\";\n }),\n\n \"aria-disabled\": dynamic((props) => {\n const state = useActionButtonState(props);\n const someActionInContextIsBusy = useActionStateContext().useIsBusy();\n return (\n props[\"aria-disabled\"] ??\n (state === \"isExecuting\" || someActionInContextIsBusy)\n );\n }),\n};\n\nexport const Action = flowComponent(\n \"Action\",\n (props) => {\n const {\n children,\n actionModel: actionModelFromProps,\n ...actionProps\n } = props;\n\n if (\"action\" in actionProps && typeof actionProps.action === \"function\") {\n console.warn(\n \"The 'action' prop is now deprecated. Use 'onAction' instead.\",\n );\n if (\"onAction\" in actionProps === false) {\n actionProps.onAction = actionProps.action as ActionFn;\n }\n }\n\n const newActionModel = ActionModel.useNew(actionProps);\n const actionModel = actionModelFromProps ?? newActionModel;\n\n const propsContext: PropsContext = {\n Button: actionButtonContext,\n\n Link: {\n onPress: dynamic(() => ActionModel.use().execute),\n },\n\n MenuItem: {\n onAction: dynamic(() => ActionModel.use().execute),\n },\n\n Modal: {\n slot: dynamic((props) => {\n const { slot } = props;\n const action = ActionModel.use();\n action.needsConfirmation = slot === \"actionConfirm\";\n return slot;\n }),\n isDismissable: dynamic((props) => {\n const action = ActionModel.use();\n const actionState = action.state.useValue();\n return actionState === \"isExecuting\" || actionState === \"isPending\"\n ? false\n : props.isDismissable;\n }),\n controller: dynamic(() => {\n const action = ActionModel.use();\n return action.needsConfirmation\n ? action.confirmationModalController\n : action.getOverlayController(\"Modal\");\n }),\n ActionGroup: {\n Button: actionButtonContext,\n },\n },\n };\n\n return (\n <ActionContextProvider value={actionModel}>\n <PropsContextProvider props={propsContext}>\n {children}\n </PropsContextProvider>\n </ActionContextProvider>\n );\n },\n {\n type: \"provider\",\n },\n);\n\nexport default Action;\n"],"names":["props"],"mappings":";;;;;;;;;;;AAWA,MAAM,mBAAA,GAAuD;AAAA,EAC3D,OAAA,EAAS,OAAA,CAAQ,CAAC,KAAA,KAAU;AAC1B,IAAA,MAAM,MAAA,GAAS,YAAY,GAAA,EAAI;AAC/B,IAAA,MAAM,aAAA,GAAgB,YAAY,qBAAA,EAAsB;AACxD,IAAA,MAAM,oBAAA,GACJ,8BAAA,CAA+B,KAAK,CAAA,KAAM,SAAA;AAC5C,IAAA,MAAM,aAAA,GAAgB,8BAAA,CAA+B,KAAK,CAAA,KAAM,OAAA;AAChE,IAAA,IAAI,aAAA,EAAe;AACjB,MAAA,OAAO,OAAO,2BAAA,CAA4B,KAAA;AAAA,IAC5C;AACA,IAAA,OAAO,oBAAA,GAAuB,aAAA,CAAc,OAAA,GAAU,MAAA,CAAO,OAAA;AAAA,EAC/D,CAAC,CAAA;AAAA,EAED,SAAA,EAAW,OAAA,CAAQ,CAAC,KAAA,KAAU;AAC5B,IAAA,MAAM,WAAA,GAAc,qBAAqB,KAAK,CAAA;AAC9C,IAAA,OAAO,KAAA,CAAM,aAAa,WAAA,KAAgB,WAAA;AAAA,EAC5C,CAAC,CAAA;AAAA,EAED,WAAA,EAAa,OAAA,CAAQ,CAA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AM;AAAA;AAEV;;;;"}
|
|
@@ -24,7 +24,7 @@ class ActionExecution {
|
|
|
24
24
|
);
|
|
25
25
|
let skipCount = 0;
|
|
26
26
|
while (currentAction) {
|
|
27
|
-
const {
|
|
27
|
+
const { onAction, break: $break, skip } = currentAction.actionProps;
|
|
28
28
|
if (currentAction.needsConfirmation) {
|
|
29
29
|
currentBatch.addAction(currentAction);
|
|
30
30
|
break;
|
|
@@ -42,7 +42,7 @@ class ActionExecution {
|
|
|
42
42
|
if ($break) {
|
|
43
43
|
break;
|
|
44
44
|
}
|
|
45
|
-
if (
|
|
45
|
+
if (onAction) {
|
|
46
46
|
currentBatch.addAction(currentAction);
|
|
47
47
|
} else {
|
|
48
48
|
batches.push(currentBatch);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionExecution.mjs","sources":["../../../../../../../src/components/Action/models/ActionExecution.tsx"],"sourcesContent":["import type { ActionModel } from \"@/components/Action/models/ActionModel\";\nimport { ActionExecutionBatch } from \"@/components/Action/models/ActionExecutionBatch\";\n\nexport class ActionExecution {\n private readonly action: ActionModel;\n\n public constructor(action: ActionModel) {\n this.action = action;\n }\n\n public execute = (...args: unknown[]): void => {\n const batches = this.getBatchedActions();\n\n const executeAllBatches = async () => {\n for (const batch of batches) {\n await batch.executeBatch(args);\n }\n };\n\n void executeAllBatches().catch((error) => console.error(error));\n };\n\n private getBatchedActions = (): ActionExecutionBatch[] => {\n let currentAction: ActionModel | undefined = this.action;\n\n const batches: ActionExecutionBatch[] = [];\n let currentBatch: ActionExecutionBatch = new ActionExecutionBatch(\n this.action,\n );\n\n let skipCount = 0;\n\n while (currentAction) {\n const {
|
|
1
|
+
{"version":3,"file":"ActionExecution.mjs","sources":["../../../../../../../src/components/Action/models/ActionExecution.tsx"],"sourcesContent":["import type { ActionModel } from \"@/components/Action/models/ActionModel\";\nimport { ActionExecutionBatch } from \"@/components/Action/models/ActionExecutionBatch\";\n\nexport class ActionExecution {\n private readonly action: ActionModel;\n\n public constructor(action: ActionModel) {\n this.action = action;\n }\n\n public execute = (...args: unknown[]): void => {\n const batches = this.getBatchedActions();\n\n const executeAllBatches = async () => {\n for (const batch of batches) {\n await batch.executeBatch(args);\n }\n };\n\n void executeAllBatches().catch((error) => console.error(error));\n };\n\n private getBatchedActions = (): ActionExecutionBatch[] => {\n let currentAction: ActionModel | undefined = this.action;\n\n const batches: ActionExecutionBatch[] = [];\n let currentBatch: ActionExecutionBatch = new ActionExecutionBatch(\n this.action,\n );\n\n let skipCount = 0;\n\n while (currentAction) {\n const { onAction, break: $break, skip } = currentAction.actionProps;\n\n if (currentAction.needsConfirmation) {\n currentBatch.addAction(currentAction);\n break;\n }\n\n if (skip) {\n skipCount = skip === true ? 1 : skip;\n currentAction = currentAction.parentAction;\n continue;\n }\n\n if (skipCount > 0) {\n currentAction = currentAction.parentAction;\n skipCount--;\n continue;\n }\n\n if ($break) {\n break;\n }\n\n if (onAction) {\n currentBatch.addAction(currentAction);\n } else {\n batches.push(currentBatch);\n currentBatch = new ActionExecutionBatch(this.action);\n currentBatch.addAction(currentAction);\n }\n\n currentAction = currentAction.parentAction;\n }\n\n batches.push(currentBatch);\n return batches;\n };\n}\n"],"names":[],"mappings":";;AAGO,MAAM,eAAA,CAAgB;AAAA,EACV,MAAA;AAAA,EAEV,YAAY,MAAA,EAAqB;AACtC,IAAA,IAAA,CAAK,MAAA,GAAS,MAAA;AAAA,EAChB;AAAA,EAEO,OAAA,GAAU,IAAI,IAAA,KAA0B;AAC7C,IAAA,MAAM,OAAA,GAAU,KAAK,iBAAA,EAAkB;AAEvC,IAAA,MAAM,oBAAoB,YAAY;AACpC,MAAA,KAAA,MAAW,SAAS,OAAA,EAAS;AAC3B,QAAA,MAAM,KAAA,CAAM,aAAa,IAAI,CAAA;AAAA,MAC/B;AAAA,IACF,CAAA;AAEA,IAAA,KAAK,iBAAA,GAAoB,KAAA,CAAM,CAAC,UAAU,OAAA,CAAQ,KAAA,CAAM,KAAK,CAAC,CAA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@ function getExecutionFunction(action) {
|
|
|
12
12
|
}
|
|
13
13
|
return from;
|
|
14
14
|
};
|
|
15
|
-
const {
|
|
16
|
-
|
|
17
|
-
onAction: actionFn = actionProp,
|
|
18
|
-
toggleOverlay,
|
|
19
|
-
closeOverlay,
|
|
20
|
-
openOverlay
|
|
21
|
-
} = action.actionProps;
|
|
22
|
-
const maybeAction = actionFn ? actionFn : openOverlay ? getOverlayController(openOverlay)?.open : closeOverlay ? getOverlayController(closeOverlay)?.close : toggleOverlay ? getOverlayController(toggleOverlay)?.toggle : voidAction;
|
|
15
|
+
const { onAction, toggleOverlay, closeOverlay, openOverlay } = action.actionProps;
|
|
16
|
+
const maybeAction = onAction ? onAction : openOverlay ? getOverlayController(openOverlay)?.open : closeOverlay ? getOverlayController(closeOverlay)?.close : toggleOverlay ? getOverlayController(toggleOverlay)?.toggle : voidAction;
|
|
23
17
|
return maybeAction ?? voidAction;
|
|
24
18
|
}
|
|
25
19
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getExecutionFunction.mjs","sources":["../../../../../../../src/components/Action/models/getExecutionFunction.ts"],"sourcesContent":["import type { ActionModel } from \"@/components/Action/models/ActionModel\";\nimport type { ActionFn } from \"@/components/Action\";\nimport type { OverlayController } from \"@/lib/controller\";\nimport type { FlowComponentName } from \"@/components/propTypes\";\n\nconst voidAction = () => {\n // do nothing\n};\n\nexport function getExecutionFunction(action: ActionModel): ActionFn {\n if (action.needsConfirmation) {\n return action.confirmationModalController.open;\n }\n\n const getOverlayController = (\n from: OverlayController | FlowComponentName,\n ): OverlayController | undefined => {\n if (typeof from === \"string\") {\n return action.getOverlayController(from);\n }\n return from;\n };\n\n const {
|
|
1
|
+
{"version":3,"file":"getExecutionFunction.mjs","sources":["../../../../../../../src/components/Action/models/getExecutionFunction.ts"],"sourcesContent":["import type { ActionModel } from \"@/components/Action/models/ActionModel\";\nimport type { ActionFn } from \"@/components/Action\";\nimport type { OverlayController } from \"@/lib/controller\";\nimport type { FlowComponentName } from \"@/components/propTypes\";\n\nconst voidAction = () => {\n // do nothing\n};\n\nexport function getExecutionFunction(action: ActionModel): ActionFn {\n if (action.needsConfirmation) {\n return action.confirmationModalController.open;\n }\n\n const getOverlayController = (\n from: OverlayController | FlowComponentName,\n ): OverlayController | undefined => {\n if (typeof from === \"string\") {\n return action.getOverlayController(from);\n }\n return from;\n };\n\n const { onAction, toggleOverlay, closeOverlay, openOverlay } =\n action.actionProps;\n\n const maybeAction = onAction\n ? onAction\n : openOverlay\n ? getOverlayController(openOverlay)?.open\n : closeOverlay\n ? getOverlayController(closeOverlay)?.close\n : toggleOverlay\n ? getOverlayController(toggleOverlay)?.toggle\n : voidAction;\n\n return maybeAction ?? voidAction;\n}\n"],"names":[],"mappings":"AAKA,MAAM,aAAa,MAAM;AAEzB,CAAA;AAEO,SAAS,qBAAqB,MAAA,EAA+B;AAClE,EAAA,IAAI,OAAO,iBAAA,EAAmB;AAC5B,IAAA,OAAO,OAAO,2BAAA,CAA4B,IAAA;AAAA,EAC5C;AAEA,EAAA,MAAM,oBAAA,GAAuB,CAC3B,IAAA,KACkC;AAClC,IAAA,IAAI,OAAO,SAAS,QAAA,EAAU;AAC5B,MAAA,OAAO,MAAA,CAAO,qBAAqB,IAAI,CAAA;AAAA,IACzC;AACA,IAAA,OAAO,IAAA;AAAA,EACT,CAAA;AAEA,EAAA,MAAM,EAAE,QAAA,EAAU,aAAA,EAAe,YAAA,EAAc,WAAA,KAC7C,MAAA,CAAO,WAAA;AAET,EAAA,MAAM,cAAc,QAAA,GAChB,QAAA,GACA,WAAA,GACE,oBAAA,CAAqB,WAAW,CAAA,EAAG,IAAA,GACnC,YAAA,GACE,oBAAA,CAAqB,YAAY,CAAA,EAAG,KAAA,GACpC,gBACE,oBAAA,CAAqB,aAAa,GAAG,MAAA,GACrC,UAAA;AAEV,EAAA,OAAO,WAAA,IAAe,UAAA;AACxB;;;;"}
|
|
@@ -31,7 +31,7 @@ const CopyButton = flowComponent("CopyButton", (props) => {
|
|
|
31
31
|
copy(onlyText(text));
|
|
32
32
|
};
|
|
33
33
|
return /* @__PURE__ */ jsxs(TooltipTrigger, { children: [
|
|
34
|
-
/* @__PURE__ */ jsx(Action, {
|
|
34
|
+
/* @__PURE__ */ jsx(Action, { onAction: copyValue, showFeedback: true, children: /* @__PURE__ */ jsx(
|
|
35
35
|
Button,
|
|
36
36
|
{
|
|
37
37
|
"aria-label": tooltip,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CopyButton.mjs","sources":["../../../../../../src/components/CopyButton/CopyButton.tsx"],"sourcesContent":["import copy from \"copy-to-clipboard\";\nimport type { ButtonProps } from \"@/components/Button\";\nimport { Button } from \"@/components/Button\";\nimport { IconCopy } from \"@/components/Icon/components/icons\";\nimport locales from \"./locales/*.locale.json\";\nimport { useLocalizedStringFormatter } from \"react-aria\";\nimport { Tooltip, TooltipTrigger } from \"@/components/Tooltip\";\nimport { onlyText } from \"react-children-utilities\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { Action } from \"@/components/Action\";\n\nexport interface CopyButtonProps\n extends Omit<ButtonProps, \"onPress\" | \"aria-label\" | \"render\">,\n FlowComponentProps<HTMLButtonElement> {\n /** The text to copy. */\n text?: string;\n}\n\n/** @flr-generate all */\nexport const CopyButton = flowComponent(\"CopyButton\", (props) => {\n const {\n text = \"\",\n ref,\n variant = \"plain\",\n color = \"secondary\",\n ...buttonProps\n } = props;\n\n const stringFormatter = useLocalizedStringFormatter(locales);\n\n const tooltip = stringFormatter.format(\"copyButton.copy\");\n\n const copyValue = () => {\n copy(onlyText(text));\n };\n\n return (\n <TooltipTrigger>\n <Action
|
|
1
|
+
{"version":3,"file":"CopyButton.mjs","sources":["../../../../../../src/components/CopyButton/CopyButton.tsx"],"sourcesContent":["import copy from \"copy-to-clipboard\";\nimport type { ButtonProps } from \"@/components/Button\";\nimport { Button } from \"@/components/Button\";\nimport { IconCopy } from \"@/components/Icon/components/icons\";\nimport locales from \"./locales/*.locale.json\";\nimport { useLocalizedStringFormatter } from \"react-aria\";\nimport { Tooltip, TooltipTrigger } from \"@/components/Tooltip\";\nimport { onlyText } from \"react-children-utilities\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { Action } from \"@/components/Action\";\n\nexport interface CopyButtonProps\n extends Omit<ButtonProps, \"onPress\" | \"aria-label\" | \"render\">,\n FlowComponentProps<HTMLButtonElement> {\n /** The text to copy. */\n text?: string;\n}\n\n/** @flr-generate all */\nexport const CopyButton = flowComponent(\"CopyButton\", (props) => {\n const {\n text = \"\",\n ref,\n variant = \"plain\",\n color = \"secondary\",\n ...buttonProps\n } = props;\n\n const stringFormatter = useLocalizedStringFormatter(locales);\n\n const tooltip = stringFormatter.format(\"copyButton.copy\");\n\n const copyValue = () => {\n copy(onlyText(text));\n };\n\n return (\n <TooltipTrigger>\n <Action onAction={copyValue} showFeedback>\n <Button\n aria-label={tooltip}\n {...buttonProps}\n ref={ref}\n variant={variant}\n color={color}\n >\n <IconCopy />\n </Button>\n </Action>\n <Tooltip>{tooltip}</Tooltip>\n </TooltipTrigger>\n );\n});\n\nexport default CopyButton;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAoBO,MAAM,UAAA,GAAa,aAAA,CAAc,YAAA,EAAc,CAAC,KAAA,KAAU;AAC/D,EAAA,MAAM;AAAA,IACJ,IAAA,GAAO,EAAA;AAAA,IACP,GAAA;AAAA,IACA,OAAA,GAAU,OAAA;AAAA,IACV,KAAA,GAAQ,WAAA;AAAA,IACR,GAAG;AAAA,GACL,GAAI,KAAA;AAEJ,EAAA,MAAM,eAAA,GAAkB,4BAA4B,OAAO,CAAA;AAE3D,EAAA,MAAM,OAAA,GAAU,eAAA,CAAgB,MAAA,CAAO,iBAAiB,CAAA;AAExD,EAAA,MAAM,YAAY,MAAM;AACtB,IAAA,IAAA,CAAK,QAAA,CAAS,IAAI,CAAC,CAAA;AAAA,EACrB,CAAA;AAEA,EAAA,4BACG,cAAA,EAAA,EACC,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,MAAA,EAAA,EAAO,QAAA,EAAU,SAAA,EAAW,YAAA,EAAY,IAAA,EACvC,QAAA,kBAAA,GAAA;AAAA,MAAC,MAAA;AAAA,MAAA;AAAA,QACC,YAAA,EAAY,OAAA;AAAA,QACX,GAAG,WAAA;AAAA,QACJ,GAAA;AAAA,QACA,OAAA;AAAA,QACA,KAAA;AAAA,QAEA,8BAAC,QAAA,EAAA,EAAS;AAAA;AAAA,KACZ,EACF,CAAA;AAAA,oBACA,GAAA,CAAC,WAAS,QAAA,EAAA,OAAA,EAAQ;AAAA,GAAA,EACpB,CAAA;AAEJ,CAAC;;;;"}
|
|
@@ -11,7 +11,7 @@ import '@react-aria/live-announcer';
|
|
|
11
11
|
const PasswordGenerateButton = (props) => {
|
|
12
12
|
const { isDisabled, onGeneratePasswordAction } = props;
|
|
13
13
|
const translate = useLocalizedStringFormatter(locales);
|
|
14
|
-
return /* @__PURE__ */ jsx(Action, {
|
|
14
|
+
return /* @__PURE__ */ jsx(Action, { onAction: onGeneratePasswordAction, showFeedback: false, children: /* @__PURE__ */ jsx(
|
|
15
15
|
Button,
|
|
16
16
|
{
|
|
17
17
|
"data-component": "generatePassword",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PasswordGenerateButton.mjs","sources":["../../../../../../../../src/components/PasswordCreationField/components/PasswordGenerateButton/PasswordGenerateButton.tsx"],"sourcesContent":["import { type FC } from \"react\";\nimport { useLocalizedStringFormatter } from \"react-aria\";\nimport locales from \"./../../locales/*.locale.json\";\nimport { Button } from \"@/components/Button\";\nimport { Action, type ActionFn } from \"@/components/Action\";\n\ninterface Props {\n isDisabled?: boolean;\n onGeneratePasswordAction?: ActionFn;\n}\n\nexport const PasswordGenerateButton: FC<Props> = (props) => {\n const { isDisabled, onGeneratePasswordAction } = props;\n const translate = useLocalizedStringFormatter(locales);\n\n return (\n <Action
|
|
1
|
+
{"version":3,"file":"PasswordGenerateButton.mjs","sources":["../../../../../../../../src/components/PasswordCreationField/components/PasswordGenerateButton/PasswordGenerateButton.tsx"],"sourcesContent":["import { type FC } from \"react\";\nimport { useLocalizedStringFormatter } from \"react-aria\";\nimport locales from \"./../../locales/*.locale.json\";\nimport { Button } from \"@/components/Button\";\nimport { Action, type ActionFn } from \"@/components/Action\";\n\ninterface Props {\n isDisabled?: boolean;\n onGeneratePasswordAction?: ActionFn;\n}\n\nexport const PasswordGenerateButton: FC<Props> = (props) => {\n const { isDisabled, onGeneratePasswordAction } = props;\n const translate = useLocalizedStringFormatter(locales);\n\n return (\n <Action onAction={onGeneratePasswordAction} showFeedback={false}>\n <Button\n data-component=\"generatePassword\"\n isDisabled={isDisabled}\n variant=\"plain\"\n color=\"dark\"\n >\n {translate.format(\"button.generate\")}\n </Button>\n </Action>\n );\n};\n"],"names":[],"mappings":";;;;;;;;AAWO,MAAM,sBAAA,GAAoC,CAAC,KAAA,KAAU;AAC1D,EAAA,MAAM,EAAE,UAAA,EAAY,wBAAA,EAAyB,GAAI,KAAA;AACjD,EAAA,MAAM,SAAA,GAAY,4BAA4B,OAAO,CAAA;AAErD,EAAA,uBACE,GAAA,CAAC,MAAA,EAAA,EAAO,QAAA,EAAU,wBAAA,EAA0B,cAAc,KAAA,EACxD,QAAA,kBAAA,GAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,gBAAA,EAAe,kBAAA;AAAA,MACf,UAAA;AAAA,MACA,OAAA,EAAQ,OAAA;AAAA,MACR,KAAA,EAAM,MAAA;AAAA,MAEL,QAAA,EAAA,SAAA,CAAU,OAAO,iBAAiB;AAAA;AAAA,GACrC,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -26,7 +26,7 @@ const TogglePasswordVisibilityButton = ({
|
|
|
26
26
|
const tooltipText = translate.format(
|
|
27
27
|
"button.generate.tooltip." + (isVisible ? "hide" : "show")
|
|
28
28
|
);
|
|
29
|
-
return /* @__PURE__ */ jsx(Action, {
|
|
29
|
+
return /* @__PURE__ */ jsx(Action, { onAction: onPress, children: /* @__PURE__ */ jsx(TooltipTrigger, { children: /* @__PURE__ */ jsxs(
|
|
30
30
|
Button,
|
|
31
31
|
{
|
|
32
32
|
className,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TogglePasswordVisibilityButton.mjs","sources":["../../../../../../../../src/components/PasswordCreationField/components/TogglePasswordVisibilityButton/TogglePasswordVisibilityButton.tsx"],"sourcesContent":["import { type FC } from \"react\";\nimport { Tooltip, TooltipTrigger } from \"@/components/Tooltip\";\nimport Button from \"@/components/Button\";\nimport { IconHide, IconShow } from \"@/components/Icon/components/icons\";\nimport { Action, type ActionFn } from \"@/components/Action\";\nimport locales from \"./../../locales/*.locale.json\";\nimport { useLocalizedStringFormatter } from \"react-aria\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\n\ninterface Props extends PropsWithClassName {\n isDisabled?: boolean;\n isVisible: boolean;\n onPress: ActionFn;\n}\n\n/** @internal */\nexport const TogglePasswordVisibilityButton: FC<Props> = ({\n isVisible,\n isDisabled = false,\n onPress,\n className,\n}) => {\n const translate = useLocalizedStringFormatter(locales);\n\n const icon = isVisible ? <IconHide /> : <IconShow />;\n const tooltipText = translate.format(\n \"button.generate.tooltip.\" + (isVisible ? \"hide\" : \"show\"),\n );\n\n return (\n <Action
|
|
1
|
+
{"version":3,"file":"TogglePasswordVisibilityButton.mjs","sources":["../../../../../../../../src/components/PasswordCreationField/components/TogglePasswordVisibilityButton/TogglePasswordVisibilityButton.tsx"],"sourcesContent":["import { type FC } from \"react\";\nimport { Tooltip, TooltipTrigger } from \"@/components/Tooltip\";\nimport Button from \"@/components/Button\";\nimport { IconHide, IconShow } from \"@/components/Icon/components/icons\";\nimport { Action, type ActionFn } from \"@/components/Action\";\nimport locales from \"./../../locales/*.locale.json\";\nimport { useLocalizedStringFormatter } from \"react-aria\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\n\ninterface Props extends PropsWithClassName {\n isDisabled?: boolean;\n isVisible: boolean;\n onPress: ActionFn;\n}\n\n/** @internal */\nexport const TogglePasswordVisibilityButton: FC<Props> = ({\n isVisible,\n isDisabled = false,\n onPress,\n className,\n}) => {\n const translate = useLocalizedStringFormatter(locales);\n\n const icon = isVisible ? <IconHide /> : <IconShow />;\n const tooltipText = translate.format(\n \"button.generate.tooltip.\" + (isVisible ? \"hide\" : \"show\"),\n );\n\n return (\n <Action onAction={onPress}>\n <TooltipTrigger>\n <Button\n className={className}\n size=\"m\"\n tunnelId={null}\n variant=\"plain\"\n color=\"secondary\"\n isDisabled={isDisabled}\n data-component=\"toggleRevealPassword\"\n aria-label={tooltipText}\n >\n {icon}\n <Tooltip>{tooltipText}</Tooltip>\n </Button>\n </TooltipTrigger>\n </Action>\n );\n};\n\nexport default TogglePasswordVisibilityButton;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAgBO,MAAM,iCAA4C,CAAC;AAAA,EACxD,SAAA;AAAA,EACA,UAAA,GAAa,KAAA;AAAA,EACb,OAAA;AAAA,EACA;AACF,CAAA,KAAM;AACJ,EAAA,MAAM,SAAA,GAAY,4BAA4B,OAAO,CAAA;AAErD,EAAA,MAAM,OAAO,SAAA,mBAAY,GAAA,CAAC,QAAA,EAAA,EAAS,CAAA,uBAAM,QAAA,EAAA,EAAS,CAAA;AAClD,EAAA,MAAM,cAAc,SAAA,CAAU,MAAA;AAAA,IAC5B,0BAAA,IAA8B,YAAY,MAAA,GAAS,MAAA;AAAA,GACrD;AAEA,EAAA,uBACE,GAAA,CAAC,MAAA,EAAA,EAAO,QAAA,EAAU,OAAA,EAChB,8BAAC,cAAA,EAAA,EACC,QAAA,kBAAA,IAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,SAAA;AAAA,MACA,IAAA,EAAK,GAAA;AAAA,MACL,QAAA,EAAU,IAAA;AAAA,MACV,OAAA,EAAQ,OAAA;AAAA,MACR,KAAA,EAAM,WAAA;AAAA,MACN,UAAA;AAAA,MACA,gBAAA,EAAe,sBAAA;AAAA,MACf,YAAA,EAAY,WAAA;AAAA,MAEX,QAAA,EAAA;AAAA,QAAA,IAAA;AAAA,wBACD,GAAA,CAAC,WAAS,QAAA,EAAA,WAAA,EAAY;AAAA;AAAA;AAAA,KAE1B,CAAA,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Action.d.ts","sourceRoot":"","sources":["../../../../src/components/Action/Action.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Action.d.ts","sourceRoot":"","sources":["../../../../src/components/Action/Action.tsx"],"names":[],"mappings":"AAiDA,eAAO,MAAM,MAAM,oIAqElB,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getExecutionFunction.d.ts","sourceRoot":"","sources":["../../../../../src/components/Action/models/getExecutionFunction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAQpD,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,WAAW,GAAG,QAAQ,
|
|
1
|
+
{"version":3,"file":"getExecutionFunction.d.ts","sourceRoot":"","sources":["../../../../../src/components/Action/models/getExecutionFunction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAQpD,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,WAAW,GAAG,QAAQ,CA4BlE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Default.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Action/stories/Default.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"Default.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Action/stories/Default.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAYvD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,MAAM,CAsB7B,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,MAAM,CAAC,CAAC;AAErC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,KAAK,EAAE,KAInB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAIvB,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAK/B,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,KAKnC,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAIpB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAKzB,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,KAkBnC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EdgeCases.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Action/stories/EdgeCases.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"EdgeCases.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Action/stories/EdgeCases.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAOvD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,MAAM,CAG7B,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,MAAM,CAAC,CAAC;AAErC,eAAO,MAAM,oBAAoB,EAAE,KAWlC,CAAC"}
|
|
@@ -5,7 +5,6 @@ import { FlowComponentName } from '../propTypes';
|
|
|
5
5
|
import { FlowComponentProps } from '../../lib/componentFactory/flowComponent';
|
|
6
6
|
export type ActionFn = (...args: unknown[]) => unknown;
|
|
7
7
|
export interface ActionProps extends PropsWithChildren, FlowComponentProps {
|
|
8
|
-
action?: ActionFn;
|
|
9
8
|
onAction?: ActionFn;
|
|
10
9
|
actionModel?: ActionModel;
|
|
11
10
|
closeOverlay?: FlowComponentName | OverlayController;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/Action/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAE/E,MAAM,MAAM,QAAQ,GAAG,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC;AAEvD,MAAM,WAAW,WAAY,SAAQ,iBAAiB,EAAE,kBAAkB;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/Action/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAE/E,MAAM,MAAM,QAAQ,GAAG,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC;AAEvD,MAAM,WAAW,WAAY,SAAQ,iBAAiB,EAAE,kBAAkB;IACxE,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,YAAY,CAAC,EAAE,iBAAiB,GAAG,iBAAiB,CAAC;IACrD,WAAW,CAAC,EAAE,iBAAiB,GAAG,iBAAiB,CAAC;IACpD,aAAa,CAAC,EAAE,iBAAiB,GAAG,iBAAiB,CAAC;IACtD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Default.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/ActionGroup/stories/Default.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,WAAW,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"Default.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/ActionGroup/stories/Default.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,WAAW,MAAM,gBAAgB,CAAC;AASzC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,WAAW,CAelC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,WAAW,CAAC,CAAC;AAE1C,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,MAAM,EAAE,KASpB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAMlB,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KAcjC,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,KAiBtC,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAEpB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAOxB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAOtB,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAc/B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mittwald/flow-react-components",
|
|
3
|
-
"version": "0.2.0-alpha.
|
|
3
|
+
"version": "0.2.0-alpha.646",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A React implementation of Flow, mittwald’s design system",
|
|
6
6
|
"homepage": "https://mittwald.github.io/flow",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"@internationalized/string-compiler": "^3.2.6",
|
|
60
60
|
"@mittwald/password-tools-js": "3.0.0-alpha.18",
|
|
61
|
-
"@mittwald/react-tunnel": "0.2.0-alpha.
|
|
61
|
+
"@mittwald/react-tunnel": "0.2.0-alpha.646",
|
|
62
62
|
"@mittwald/react-use-promise": "^4.2.2",
|
|
63
63
|
"@react-aria/form": "^3.1.2",
|
|
64
64
|
"@react-aria/live-announcer": "^3.4.4",
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"@faker-js/faker": "^10.1.0",
|
|
104
104
|
"@internationalized/date": "^3.10.0",
|
|
105
105
|
"@mittwald/flow-core": "",
|
|
106
|
-
"@mittwald/flow-design-tokens": "0.2.0-alpha.
|
|
106
|
+
"@mittwald/flow-design-tokens": "0.2.0-alpha.646",
|
|
107
107
|
"@mittwald/react-use-promise": "^4.2.2",
|
|
108
108
|
"@mittwald/remote-dom-react": "1.2.2-mittwald.10",
|
|
109
109
|
"@mittwald/typescript-config": "",
|
|
@@ -172,5 +172,5 @@
|
|
|
172
172
|
"optional": true
|
|
173
173
|
}
|
|
174
174
|
},
|
|
175
|
-
"gitHead": "
|
|
175
|
+
"gitHead": "bc2fba7e551b84a3c0f252020673a176fcb06e17"
|
|
176
176
|
}
|