@flipdish/ui-library 0.66.1 → 0.66.2
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/components/forms/FormFooter/index.cjs +3 -3
- package/dist/components/forms/FormFooter/index.cjs.map +1 -1
- package/dist/components/forms/FormFooter/index.js +3 -3
- package/dist/components/forms/FormFooter/index.js.map +1 -1
- package/dist/components/organisms/SidePanel/components/SidePanelFooter.cjs +3 -1
- package/dist/components/organisms/SidePanel/components/SidePanelFooter.cjs.map +1 -1
- package/dist/components/organisms/SidePanel/components/SidePanelFooter.d.ts +2 -2
- package/dist/components/organisms/SidePanel/components/SidePanelFooter.d.ts.map +1 -1
- package/dist/components/organisms/SidePanel/components/SidePanelFooter.js +3 -1
- package/dist/components/organisms/SidePanel/components/SidePanelFooter.js.map +1 -1
- package/package.json +1 -1
|
@@ -32,9 +32,9 @@ const FormFooter = ({ onDiscard, isSaved = false, destructiveAction, isDirty: is
|
|
|
32
32
|
onDiscard();
|
|
33
33
|
};
|
|
34
34
|
return (
|
|
35
|
-
// On a phone the buttons stack full width
|
|
36
|
-
//
|
|
37
|
-
jsxRuntime.jsxs(SectionFooter.SectionFooter.Root, { ref: originRef, "data-testid": rootTestId, className: "flex-col items-stretch gap-3 sm:flex-row sm:flex-wrap sm:items-center sm:gap-5", children: [destructiveAction && (jsxRuntime.jsx(Buttons.Button, { color: "secondary-destructive", size: "md", iconLeading: uiIcons.Trash01, isDisabled: isSaving, isLoading: destructiveAction.isPending, showTextWhileLoading: true, onPress: destructiveAction.confirmation ? confirmation.open : destructiveAction.onPress, "data-testid": testIdUtils.joinTestId(rootTestId, 'destructive-action'), children: destructiveAction.label })), destructiveAction?.confirmation && (jsxRuntime.jsx(Modals.ConfirmationModal, { isOpen: confirmation.isOpen, onOpenChange: confirmation.onOpenChange, title: destructiveAction.confirmation.title, description: destructiveAction.confirmation.description, confirmLabel: destructiveAction.label, onConfirm: confirmation.confirm, isConfirming: confirmation.isConfirming, isDestructive: true, "data-testid": testIdUtils.joinTestId(rootTestId, 'destructive-confirmation') })), jsxRuntime.jsxs(SectionFooter.SectionFooter.Actions, { className: "flex-none flex-col items-stretch sm:flex-1 sm:flex-row sm:flex-wrap sm:items-center", children: [jsxRuntime.jsx("output", { className: "sr-only", children: isSaved && 'Changes saved' }), jsxRuntime.jsx(Buttons.Button, { color: "secondary", size: "md", iconLeading: uiIcons.ReverseLeft, isDisabled: !isDirty || isSaving, onPress: discard, "data-testid": testIdUtils.joinTestId(rootTestId, 'discard'), children: "Discard" }), jsxRuntime.jsx(Buttons.Button, { type: "submit", color: "primary", size: "md", iconLeading: uiIcons.Save01, isDisabled: hasErrors, isLoading: isSaving, showTextWhileLoading: true, isSuccess: isSaved, "data-testid": testIdUtils.joinTestId(rootTestId, 'save'), children: "Save" })] })] }));
|
|
35
|
+
// On a phone the buttons stack full width with the primary one on top, as a bottom sheet's actions do: Save, Discard,
|
|
36
|
+
// then the destructive action last. Where supported, `reading-flow` makes the tab order follow that stack.
|
|
37
|
+
jsxRuntime.jsxs(SectionFooter.SectionFooter.Root, { ref: originRef, "data-testid": rootTestId, className: "flex-col-reverse items-stretch gap-3 [reading-flow:flex-visual] sm:flex-row sm:flex-wrap sm:items-center sm:gap-5", children: [destructiveAction && (jsxRuntime.jsx(Buttons.Button, { color: "secondary-destructive", size: "md", iconLeading: uiIcons.Trash01, isDisabled: isSaving, isLoading: destructiveAction.isPending, showTextWhileLoading: true, onPress: destructiveAction.confirmation ? confirmation.open : destructiveAction.onPress, "data-testid": testIdUtils.joinTestId(rootTestId, 'destructive-action'), children: destructiveAction.label })), destructiveAction?.confirmation && (jsxRuntime.jsx(Modals.ConfirmationModal, { isOpen: confirmation.isOpen, onOpenChange: confirmation.onOpenChange, title: destructiveAction.confirmation.title, description: destructiveAction.confirmation.description, confirmLabel: destructiveAction.label, onConfirm: confirmation.confirm, isConfirming: confirmation.isConfirming, isDestructive: true, "data-testid": testIdUtils.joinTestId(rootTestId, 'destructive-confirmation') })), jsxRuntime.jsxs(SectionFooter.SectionFooter.Actions, { className: "flex-none flex-col-reverse items-stretch [reading-flow:flex-visual] sm:flex-1 sm:flex-row sm:flex-wrap sm:items-center", children: [jsxRuntime.jsx("output", { className: "sr-only", children: isSaved && 'Changes saved' }), jsxRuntime.jsx(Buttons.Button, { color: "secondary", size: "md", iconLeading: uiIcons.ReverseLeft, isDisabled: !isDirty || isSaving, onPress: discard, "data-testid": testIdUtils.joinTestId(rootTestId, 'discard'), children: "Discard" }), jsxRuntime.jsx(Buttons.Button, { type: "submit", color: "primary", size: "md", iconLeading: uiIcons.Save01, isDisabled: hasErrors, isLoading: isSaving, showTextWhileLoading: true, isSuccess: isSaved, "data-testid": testIdUtils.joinTestId(rootTestId, 'save'), children: "Save" })] })] }));
|
|
38
38
|
};
|
|
39
39
|
|
|
40
40
|
exports.FormFooter = FormFooter;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../../src/components/forms/FormFooter/index.tsx"],"sourcesContent":[null],"names":["useFormState","useHasFieldError","useResolvedTestId","useReturnFocus","useDestructiveConfirmation","_jsxs","SectionFooter","_jsx","Button","Trash01","joinTestId","ConfirmationModal","ReverseLeft","Save01"],"mappings":";;;;;;;;;;;;;AAiEA;;;;;AAKG;AACI,MAAM,UAAU,GAAG,CAAC,EACzB,SAAS,EACT,OAAO,GAAG,KAAK,EACf,iBAAiB,EACjB,OAAO,EAAE,WAAW,EACpB,SAAS,EAAE,aAAa,EACxB,QAAQ,EAAE,YAAY,EACtB,aAAa,EAAE,UAAU,GACT,KAAI;AACpB,IAAA,MAAM,SAAS,GAAGA,0BAAY,EAAE;AAChC,IAAA,MAAM,OAAO,GAAG,WAAW,IAAI,SAAS,CAAC,OAAO;AAChD,IAAA,MAAM,gBAAgB,GAAGC,iCAAgB,EAAE;AAC3C,IAAA,MAAM,SAAS,GAAG,aAAa,IAAI,gBAAgB;AACnD,IAAA,MAAM,QAAQ,GAAG,YAAY,IAAI,SAAS,CAAC,YAAY;AACvD,IAAA,MAAM,UAAU,GAAGC,6BAAiB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC;AAC7G,IAAA,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,GAAGC,6BAAc,CAAiB,uBAAuB,EAAE,MAAM,CAAC;IAClG,MAAM,YAAY,GAAGC,qDAA0B,CAAC,iBAAiB,EAAE,SAAS,CAAC;;IAG7E,MAAM,OAAO,GAAG,MAAK;AACnB,QAAA,WAAW,EAAE;AACb,QAAA,SAAS,EAAE;AACb,IAAA,CAAC;IAED;;;IAGEC,eAAA,CAACC,2BAAa,CAAC,IAAI,EAAA,EACjB,GAAG,EAAE,SAAS,EAAA,aAAA,EACD,UAAU,EACvB,SAAS,EAAC,
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../src/components/forms/FormFooter/index.tsx"],"sourcesContent":[null],"names":["useFormState","useHasFieldError","useResolvedTestId","useReturnFocus","useDestructiveConfirmation","_jsxs","SectionFooter","_jsx","Button","Trash01","joinTestId","ConfirmationModal","ReverseLeft","Save01"],"mappings":";;;;;;;;;;;;;AAiEA;;;;;AAKG;AACI,MAAM,UAAU,GAAG,CAAC,EACzB,SAAS,EACT,OAAO,GAAG,KAAK,EACf,iBAAiB,EACjB,OAAO,EAAE,WAAW,EACpB,SAAS,EAAE,aAAa,EACxB,QAAQ,EAAE,YAAY,EACtB,aAAa,EAAE,UAAU,GACT,KAAI;AACpB,IAAA,MAAM,SAAS,GAAGA,0BAAY,EAAE;AAChC,IAAA,MAAM,OAAO,GAAG,WAAW,IAAI,SAAS,CAAC,OAAO;AAChD,IAAA,MAAM,gBAAgB,GAAGC,iCAAgB,EAAE;AAC3C,IAAA,MAAM,SAAS,GAAG,aAAa,IAAI,gBAAgB;AACnD,IAAA,MAAM,QAAQ,GAAG,YAAY,IAAI,SAAS,CAAC,YAAY;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AC/B,YAAY,EAAE,YAAY,CAAC,YAAY,EACvC,aAAa,EAAA,IAAA,EAAA,aAAA,EACAD,sBAAU,CAAC,UAAU,EAAE,0BAA0B,CAAC,EAAA,CAC/D,CACH,EACDL,eAAA,CAACC,2BAAa,CAAC,OAAO,EAAA,EAAC,SAAS,EAAC,wHAAwH,aAEvJC,cAAA,CAAA,QAAA,EAAA,EAAQ,SAAS,EAAC,SAAS,EAAA,QAAA,EAAE,OAAO,IAAI,eAAe,EAAA,CAAU,EACjEA,cAAA,CAACC,cAAM,EAAA,EACL,KAAK,EAAC,WAAW,EACjB,IAAI,EAAC,IAAI,EACT,WAAW,EAAEI,mBAAW,EACxB,UAAU,EAAE,CAAC,OAAO,IAAI,QAAQ,EAChC,OAAO,EAAE,OAAO,EAAA,aAAA,EACHF,sBAAU,CAAC,UAAU,EAAE,SAAS,CAAC,EAAA,QAAA,EAAA,SAAA,EAAA,CAGvC,EAETH,eAACC,cAAM,EAAA,EACL,IAAI,EAAC,QAAQ,EACb,KAAK,EAAC,SAAS,EACf,IAAI,EAAC,IAAI,EACT,WAAW,EAAEK,cAAM,EACnB,UAAU,EAAE,SAAS,EACrB,SAAS,EAAE,QAAQ,EACnB,oBAAoB,EAAA,IAAA,EACpB,SAAS,EAAE,OAAO,EAAA,aAAA,EACLH,sBAAU,CAAC,UAAU,EAAE,MAAM,CAAC,EAAA,QAAA,EAAA,MAAA,EAAA,CAGpC,CAAA,EAAA,CACa,CAAA,EAAA,CACL;AAEzB;;"}
|
|
@@ -30,9 +30,9 @@ const FormFooter = ({ onDiscard, isSaved = false, destructiveAction, isDirty: is
|
|
|
30
30
|
onDiscard();
|
|
31
31
|
};
|
|
32
32
|
return (
|
|
33
|
-
// On a phone the buttons stack full width
|
|
34
|
-
//
|
|
35
|
-
jsxs(SectionFooter.Root, { ref: originRef, "data-testid": rootTestId, className: "flex-col items-stretch gap-3 sm:flex-row sm:flex-wrap sm:items-center sm:gap-5", children: [destructiveAction && (jsx(Button, { color: "secondary-destructive", size: "md", iconLeading: Trash01, isDisabled: isSaving, isLoading: destructiveAction.isPending, showTextWhileLoading: true, onPress: destructiveAction.confirmation ? confirmation.open : destructiveAction.onPress, "data-testid": joinTestId(rootTestId, 'destructive-action'), children: destructiveAction.label })), destructiveAction?.confirmation && (jsx(ConfirmationModal, { isOpen: confirmation.isOpen, onOpenChange: confirmation.onOpenChange, title: destructiveAction.confirmation.title, description: destructiveAction.confirmation.description, confirmLabel: destructiveAction.label, onConfirm: confirmation.confirm, isConfirming: confirmation.isConfirming, isDestructive: true, "data-testid": joinTestId(rootTestId, 'destructive-confirmation') })), jsxs(SectionFooter.Actions, { className: "flex-none flex-col items-stretch sm:flex-1 sm:flex-row sm:flex-wrap sm:items-center", children: [jsx("output", { className: "sr-only", children: isSaved && 'Changes saved' }), jsx(Button, { color: "secondary", size: "md", iconLeading: ReverseLeft, isDisabled: !isDirty || isSaving, onPress: discard, "data-testid": joinTestId(rootTestId, 'discard'), children: "Discard" }), jsx(Button, { type: "submit", color: "primary", size: "md", iconLeading: Save01, isDisabled: hasErrors, isLoading: isSaving, showTextWhileLoading: true, isSuccess: isSaved, "data-testid": joinTestId(rootTestId, 'save'), children: "Save" })] })] }));
|
|
33
|
+
// On a phone the buttons stack full width with the primary one on top, as a bottom sheet's actions do: Save, Discard,
|
|
34
|
+
// then the destructive action last. Where supported, `reading-flow` makes the tab order follow that stack.
|
|
35
|
+
jsxs(SectionFooter.Root, { ref: originRef, "data-testid": rootTestId, className: "flex-col-reverse items-stretch gap-3 [reading-flow:flex-visual] sm:flex-row sm:flex-wrap sm:items-center sm:gap-5", children: [destructiveAction && (jsx(Button, { color: "secondary-destructive", size: "md", iconLeading: Trash01, isDisabled: isSaving, isLoading: destructiveAction.isPending, showTextWhileLoading: true, onPress: destructiveAction.confirmation ? confirmation.open : destructiveAction.onPress, "data-testid": joinTestId(rootTestId, 'destructive-action'), children: destructiveAction.label })), destructiveAction?.confirmation && (jsx(ConfirmationModal, { isOpen: confirmation.isOpen, onOpenChange: confirmation.onOpenChange, title: destructiveAction.confirmation.title, description: destructiveAction.confirmation.description, confirmLabel: destructiveAction.label, onConfirm: confirmation.confirm, isConfirming: confirmation.isConfirming, isDestructive: true, "data-testid": joinTestId(rootTestId, 'destructive-confirmation') })), jsxs(SectionFooter.Actions, { className: "flex-none flex-col-reverse items-stretch [reading-flow:flex-visual] sm:flex-1 sm:flex-row sm:flex-wrap sm:items-center", children: [jsx("output", { className: "sr-only", children: isSaved && 'Changes saved' }), jsx(Button, { color: "secondary", size: "md", iconLeading: ReverseLeft, isDisabled: !isDirty || isSaving, onPress: discard, "data-testid": joinTestId(rootTestId, 'discard'), children: "Discard" }), jsx(Button, { type: "submit", color: "primary", size: "md", iconLeading: Save01, isDisabled: hasErrors, isLoading: isSaving, showTextWhileLoading: true, isSuccess: isSaved, "data-testid": joinTestId(rootTestId, 'save'), children: "Save" })] })] }));
|
|
36
36
|
};
|
|
37
37
|
|
|
38
38
|
export { FormFooter };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/forms/FormFooter/index.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;;;;AAiEA;;;;;AAKG;AACI,MAAM,UAAU,GAAG,CAAC,EACzB,SAAS,EACT,OAAO,GAAG,KAAK,EACf,iBAAiB,EACjB,OAAO,EAAE,WAAW,EACpB,SAAS,EAAE,aAAa,EACxB,QAAQ,EAAE,YAAY,EACtB,aAAa,EAAE,UAAU,GACT,KAAI;AACpB,IAAA,MAAM,SAAS,GAAG,YAAY,EAAE;AAChC,IAAA,MAAM,OAAO,GAAG,WAAW,IAAI,SAAS,CAAC,OAAO;AAChD,IAAA,MAAM,gBAAgB,GAAG,gBAAgB,EAAE;AAC3C,IAAA,MAAM,SAAS,GAAG,aAAa,IAAI,gBAAgB;AACnD,IAAA,MAAM,QAAQ,GAAG,YAAY,IAAI,SAAS,CAAC,YAAY;AACvD,IAAA,MAAM,UAAU,GAAG,iBAAiB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC;AAC7G,IAAA,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,GAAG,cAAc,CAAiB,uBAAuB,EAAE,MAAM,CAAC;IAClG,MAAM,YAAY,GAAG,0BAA0B,CAAC,iBAAiB,EAAE,SAAS,CAAC;;IAG7E,MAAM,OAAO,GAAG,MAAK;AACnB,QAAA,WAAW,EAAE;AACb,QAAA,SAAS,EAAE;AACb,IAAA,CAAC;IAED;;;IAGEA,IAAA,CAAC,aAAa,CAAC,IAAI,EAAA,EACjB,GAAG,EAAE,SAAS,EAAA,aAAA,EACD,UAAU,EACvB,SAAS,EAAC,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/forms/FormFooter/index.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;;;;AAiEA;;;;;AAKG;AACI,MAAM,UAAU,GAAG,CAAC,EACzB,SAAS,EACT,OAAO,GAAG,KAAK,EACf,iBAAiB,EACjB,OAAO,EAAE,WAAW,EACpB,SAAS,EAAE,aAAa,EACxB,QAAQ,EAAE,YAAY,EACtB,aAAa,EAAE,UAAU,GACT,KAAI;AACpB,IAAA,MAAM,SAAS,GAAG,YAAY,EAAE;AAChC,IAAA,MAAM,OAAO,GAAG,WAAW,IAAI,SAAS,CAAC,OAAO;AAChD,IAAA,MAAM,gBAAgB,GAAG,gBAAgB,EAAE;AAC3C,IAAA,MAAM,SAAS,GAAG,aAAa,IAAI,gBAAgB;AACnD,IAAA,MAAM,QAAQ,GAAG,YAAY,IAAI,SAAS,CAAC,YAAY;AACvD,IAAA,MAAM,UAAU,GAAG,iBAAiB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC;AAC7G,IAAA,MAAM,EAAE,SAAS,EAAE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EAAC,SAAS,EAAC,wHAAwH,aAEvJC,GAAA,CAAA,QAAA,EAAA,EAAQ,SAAS,EAAC,SAAS,EAAA,QAAA,EAAE,OAAO,IAAI,eAAe,EAAA,CAAU,EACjEA,GAAA,CAAC,MAAM,EAAA,EACL,KAAK,EAAC,WAAW,EACjB,IAAI,EAAC,IAAI,EACT,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,CAAC,OAAO,IAAI,QAAQ,EAChC,OAAO,EAAE,OAAO,EAAA,aAAA,EACH,UAAU,CAAC,UAAU,EAAE,SAAS,CAAC,EAAA,QAAA,EAAA,SAAA,EAAA,CAGvC,EAETA,IAAC,MAAM,EAAA,EACL,IAAI,EAAC,QAAQ,EACb,KAAK,EAAC,SAAS,EACf,IAAI,EAAC,IAAI,EACT,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,SAAS,EACrB,SAAS,EAAE,QAAQ,EACnB,oBAAoB,EAAA,IAAA,EACpB,SAAS,EAAE,OAAO,EAAA,aAAA,EACL,UAAU,CAAC,UAAU,EAAE,MAAM,CAAC,EAAA,QAAA,EAAA,MAAA,EAAA,CAGpC,CAAA,EAAA,CACa,CAAA,EAAA,CACL;AAEzB;;"}
|
|
@@ -8,7 +8,9 @@ var React = require('react');
|
|
|
8
8
|
/** Pinned actions under the content, such as a message input or a primary button. */
|
|
9
9
|
const SidePanelFooter = React.forwardRef(({ className, variant = 'plain', 'data-testid': dataTestId, ...props }, ref) => {
|
|
10
10
|
const prefix = testIdUtils.useTestIdPrefix();
|
|
11
|
-
return (jsxRuntime.jsx("footer", { ...props, ref: ref, "data-testid": dataTestId ?? (prefix ? testIdUtils.joinTestId(prefix, 'footer') : undefined), className: cx.cx('w-full px-4 pb-4 lg:px-6 lg:pb-5',
|
|
11
|
+
return (jsxRuntime.jsx("footer", { ...props, ref: ref, "data-testid": dataTestId ?? (prefix ? testIdUtils.joinTestId(prefix, 'footer') : undefined), className: cx.cx('w-full px-4 pb-4 lg:px-6 lg:pb-5',
|
|
12
|
+
// Below `md` every action is full width with the primary one, last in the markup, on top, as in the bottom sheets.
|
|
13
|
+
variant === 'actions' && 'flex items-center justify-end gap-3 border-t border-secondary pt-4 max-md:flex-col-reverse max-md:items-stretch', className) }));
|
|
12
14
|
});
|
|
13
15
|
SidePanelFooter.displayName = 'SidePanelFooter';
|
|
14
16
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidePanelFooter.cjs","sources":["../../../../../src/components/organisms/SidePanel/components/SidePanelFooter.tsx"],"sourcesContent":[null],"names":["forwardRef","useTestIdPrefix","_jsx","joinTestId","cx"],"mappings":";;;;;;;AAgBA;AACO,MAAM,eAAe,GAAGA,gBAAU,CACvC,CAAC,EAAE,SAAS,EAAE,OAAO,GAAG,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,KAAI;AAC7E,IAAA,MAAM,MAAM,GAAGC,2BAAe,EAAE;AAEhC,IAAA,QACEC,cAAA,CAAA,QAAA,EAAA,EAAA,GACM,KAAK,EACT,GAAG,EAAE,GAAG,EAAA,aAAA,EACK,UAAU,KAAK,MAAM,GAAGC,sBAAU,CAAC,MAAM,EAAE,QAAQ,CAAC,GAAG,SAAS,CAAC,EAC9E,SAAS,EAAEC,KAAE,CACX,kCAAkC,
|
|
1
|
+
{"version":3,"file":"SidePanelFooter.cjs","sources":["../../../../../src/components/organisms/SidePanel/components/SidePanelFooter.tsx"],"sourcesContent":[null],"names":["forwardRef","useTestIdPrefix","_jsx","joinTestId","cx"],"mappings":";;;;;;;AAgBA;AACO,MAAM,eAAe,GAAGA,gBAAU,CACvC,CAAC,EAAE,SAAS,EAAE,OAAO,GAAG,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,KAAI;AAC7E,IAAA,MAAM,MAAM,GAAGC,2BAAe,EAAE;AAEhC,IAAA,QACEC,cAAA,CAAA,QAAA,EAAA,EAAA,GACM,KAAK,EACT,GAAG,EAAE,GAAG,EAAA,aAAA,EACK,UAAU,KAAK,MAAM,GAAGC,sBAAU,CAAC,MAAM,EAAE,QAAQ,CAAC,GAAG,SAAS,CAAC,EAC9E,SAAS,EAAEC,KAAE,CACX,kCAAkC;;QAElC,OAAO,KAAK,SAAS,IAAI,iHAAiH,EAC1I,SAAS,CACV,EAAA,CACD;AAEN,CAAC;AAEH,eAAe,CAAC,WAAW,GAAG,iBAAiB;;"}
|
|
@@ -2,7 +2,7 @@ import { type ComponentPropsWithoutRef } from 'react';
|
|
|
2
2
|
export type SidePanelFooterProps = ComponentPropsWithoutRef<'footer'> & {
|
|
3
3
|
/**
|
|
4
4
|
* `plain` pads the content, for a message input. `actions` adds the top border of the design's
|
|
5
|
-
* action bar
|
|
5
|
+
* action bar, for one or two buttons: right-aligned from `md`, and below it stacked at full width with the last one on top.
|
|
6
6
|
*/
|
|
7
7
|
variant?: 'plain' | 'actions';
|
|
8
8
|
/** Overrides the footer's `data-testid` (defaults to `<root>--footer`). */
|
|
@@ -12,7 +12,7 @@ export type SidePanelFooterProps = ComponentPropsWithoutRef<'footer'> & {
|
|
|
12
12
|
export declare const SidePanelFooter: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & {
|
|
13
13
|
/**
|
|
14
14
|
* `plain` pads the content, for a message input. `actions` adds the top border of the design's
|
|
15
|
-
* action bar
|
|
15
|
+
* action bar, for one or two buttons: right-aligned from `md`, and below it stacked at full width with the last one on top.
|
|
16
16
|
*/
|
|
17
17
|
variant?: "plain" | "actions";
|
|
18
18
|
/** Overrides the footer's `data-testid` (defaults to `<root>--footer`). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidePanelFooter.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/SidePanel/components/SidePanelFooter.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,wBAAwB,EAAc,MAAM,OAAO,CAAC;AAElE,MAAM,MAAM,oBAAoB,GAAG,wBAAwB,CAAC,QAAQ,CAAC,GAAG;IACtE;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B,2EAA2E;IAC3E,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,qFAAqF;AACrF,eAAO,MAAM,eAAe;IAV1B;;;OAGG;cACO,OAAO,GAAG,SAAS;IAC7B,2EAA2E;oBAC3D,MAAM;+
|
|
1
|
+
{"version":3,"file":"SidePanelFooter.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/SidePanel/components/SidePanelFooter.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,wBAAwB,EAAc,MAAM,OAAO,CAAC;AAElE,MAAM,MAAM,oBAAoB,GAAG,wBAAwB,CAAC,QAAQ,CAAC,GAAG;IACtE;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B,2EAA2E;IAC3E,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,qFAAqF;AACrF,eAAO,MAAM,eAAe;IAV1B;;;OAGG;cACO,OAAO,GAAG,SAAS;IAC7B,2EAA2E;oBAC3D,MAAM;+CAsBvB,CAAC"}
|
|
@@ -6,7 +6,9 @@ import { forwardRef } from 'react';
|
|
|
6
6
|
/** Pinned actions under the content, such as a message input or a primary button. */
|
|
7
7
|
const SidePanelFooter = forwardRef(({ className, variant = 'plain', 'data-testid': dataTestId, ...props }, ref) => {
|
|
8
8
|
const prefix = useTestIdPrefix();
|
|
9
|
-
return (jsx("footer", { ...props, ref: ref, "data-testid": dataTestId ?? (prefix ? joinTestId(prefix, 'footer') : undefined), className: cx('w-full px-4 pb-4 lg:px-6 lg:pb-5',
|
|
9
|
+
return (jsx("footer", { ...props, ref: ref, "data-testid": dataTestId ?? (prefix ? joinTestId(prefix, 'footer') : undefined), className: cx('w-full px-4 pb-4 lg:px-6 lg:pb-5',
|
|
10
|
+
// Below `md` every action is full width with the primary one, last in the markup, on top, as in the bottom sheets.
|
|
11
|
+
variant === 'actions' && 'flex items-center justify-end gap-3 border-t border-secondary pt-4 max-md:flex-col-reverse max-md:items-stretch', className) }));
|
|
10
12
|
});
|
|
11
13
|
SidePanelFooter.displayName = 'SidePanelFooter';
|
|
12
14
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidePanelFooter.js","sources":["../../../../../src/components/organisms/SidePanel/components/SidePanelFooter.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;;;AAgBA;AACO,MAAM,eAAe,GAAG,UAAU,CACvC,CAAC,EAAE,SAAS,EAAE,OAAO,GAAG,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,KAAI;AAC7E,IAAA,MAAM,MAAM,GAAG,eAAe,EAAE;AAEhC,IAAA,QACEA,GAAA,CAAA,QAAA,EAAA,EAAA,GACM,KAAK,EACT,GAAG,EAAE,GAAG,EAAA,aAAA,EACK,UAAU,KAAK,MAAM,GAAG,UAAU,CAAC,MAAM,EAAE,QAAQ,CAAC,GAAG,SAAS,CAAC,EAC9E,SAAS,EAAE,EAAE,CACX,kCAAkC,
|
|
1
|
+
{"version":3,"file":"SidePanelFooter.js","sources":["../../../../../src/components/organisms/SidePanel/components/SidePanelFooter.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;;;AAgBA;AACO,MAAM,eAAe,GAAG,UAAU,CACvC,CAAC,EAAE,SAAS,EAAE,OAAO,GAAG,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,KAAI;AAC7E,IAAA,MAAM,MAAM,GAAG,eAAe,EAAE;AAEhC,IAAA,QACEA,GAAA,CAAA,QAAA,EAAA,EAAA,GACM,KAAK,EACT,GAAG,EAAE,GAAG,EAAA,aAAA,EACK,UAAU,KAAK,MAAM,GAAG,UAAU,CAAC,MAAM,EAAE,QAAQ,CAAC,GAAG,SAAS,CAAC,EAC9E,SAAS,EAAE,EAAE,CACX,kCAAkC;;QAElC,OAAO,KAAK,SAAS,IAAI,iHAAiH,EAC1I,SAAS,CACV,EAAA,CACD;AAEN,CAAC;AAEH,eAAe,CAAC,WAAW,GAAG,iBAAiB;;"}
|