@olenbetong/synergi-react 5.1.0 → 5.3.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.
- package/dist/styles/styles.css +1 -1
- package/dist/styles/styles.css.map +1 -1
- package/es/components/Checkbox/index.css +1 -1
- package/es/components/ColorCard/index.css +17 -28
- package/es/components/DateNavigator/index.css +5 -7
- package/es/components/ImageEditor/ImageEditor.css +10 -10
- package/es/components/ImageEditor/ImageEditor.d.ts +18 -1
- package/es/components/ImageEditor/ImageEditor.js +30 -13
- package/es/components/ImageEditor/ResponsiveButton.js +2 -2
- package/es/components/ImageEditor/encodeImage.d.ts +33 -0
- package/es/components/ImageEditor/encodeImage.js +60 -0
- package/es/components/ImageEditor/index.d.ts +2 -0
- package/es/components/ImageEditor/index.js +1 -0
- package/es/components/ImageEditor/plugins/cropPlugin/CropToolbar.js +1 -1
- package/es/components/ImageEditor/plugins/cropPlugin/useCropTool.js +3 -9
- package/es/components/ImageEditor/plugins/redactPlugin/RedactToolbar.js +1 -1
- package/es/components/ImageEditor/plugins/redactPlugin/useRedactTool.js +3 -4
- package/es/components/ImageEditor/plugins/rotatePlugin.js +2 -1
- package/es/components/MergeProgressDialog/MergeProgressDialogDs.js +3 -3
- package/es/components/PageBanner/index.css +1 -1
- package/es/components/PdfViewer/PdfViewer.js +1 -1
- package/es/components/Spinner/index.css +1 -1
- package/es/components/SplitContainer/index.css +1 -1
- package/es/components/ValueToggleGroup/index.css +2 -2
- package/es/elements/ElementLookupDialog/BarcodeScanner/BarcodeScanner.css +7 -7
- package/es/elements-ds/ElementLookupDialog.js +1 -1
- package/es/improve/ReportIssueAttachments.d.ts +6 -0
- package/es/improve/ReportIssueAttachments.js +45 -0
- package/es/improve/ReportIssueForm.css +133 -0
- package/es/improve/ReportIssueForm.d.ts +18 -0
- package/es/improve/ReportIssueForm.js +71 -0
- package/es/improve/data/dsReportIssueAreas.d.ts +8 -0
- package/es/improve/data/dsReportIssueAreas.js +37 -0
- package/es/improve/data/dsReportIssueFiles.d.ts +15 -0
- package/es/improve/data/dsReportIssueFiles.js +55 -0
- package/es/improve/data/index.d.ts +3 -0
- package/es/improve/data/index.js +3 -0
- package/es/improve/data/procReportIssue.d.ts +16 -0
- package/es/improve/data/procReportIssue.js +44 -0
- package/es/improve/index.d.ts +3 -0
- package/es/improve/index.js +3 -0
- package/es/index.css +1 -1
- package/package.json +7 -3
- package/src/components/Checkbox/index.scss +2 -2
- package/src/components/ColorCard/index.css +17 -28
- package/src/components/DateNavigator/index.css +5 -7
- package/src/components/ImageEditor/ImageEditor.browser.test.tsx +30 -5
- package/src/components/ImageEditor/ImageEditor.css +10 -10
- package/src/components/ImageEditor/ImageEditor.test.tsx +4 -3
- package/src/components/ImageEditor/ImageEditor.tsx +47 -14
- package/src/components/ImageEditor/ResponsiveButton.tsx +2 -2
- package/src/components/ImageEditor/encodeImage.browser.test.ts +88 -0
- package/src/components/ImageEditor/encodeImage.ts +80 -0
- package/src/components/ImageEditor/index.ts +2 -0
- package/src/components/ImageEditor/plugins/cropPlugin/CropToolbar.tsx +2 -8
- package/src/components/ImageEditor/plugins/cropPlugin/useCropTool.ts +3 -10
- package/src/components/ImageEditor/plugins/plugins.browser.test.ts +20 -2
- package/src/components/ImageEditor/plugins/redactPlugin/RedactToolbar.tsx +3 -3
- package/src/components/ImageEditor/plugins/redactPlugin/useRedactTool.ts +3 -4
- package/src/components/ImageEditor/plugins/rotatePlugin.ts +2 -1
- package/src/components/MergeProgressDialog/MergeProgressDialogDs.tsx +3 -3
- package/src/components/PageBanner/index.scss +10 -10
- package/src/components/PdfViewer/PdfViewer.tsx +1 -1
- package/src/components/Spinner/index.css +1 -1
- package/src/components/SplitContainer/index.scss +5 -1
- package/src/components/ValueToggleGroup/index.css +2 -2
- package/src/elements/ElementLookupDialog/BarcodeScanner/BarcodeScanner.css +7 -7
- package/src/elements-ds/ElementLookupDialog.tsx +1 -3
- package/src/improve/ReportIssueAttachments.tsx +138 -0
- package/src/improve/ReportIssueForm.css +133 -0
- package/src/improve/ReportIssueForm.tsx +218 -0
- package/src/improve/data/dsReportIssueAreas.ts +45 -0
- package/src/improve/data/dsReportIssueFiles.ts +66 -0
- package/src/improve/data/index.ts +3 -0
- package/src/improve/data/procReportIssue.ts +58 -0
- package/src/improve/index.ts +3 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ProcedureAPI } from "@olenbetong/appframe-data";
|
|
2
|
+
export type ReportIssueParams = {
|
|
3
|
+
IssueType: "Issue" | "Suggestion";
|
|
4
|
+
Area?: string | null;
|
|
5
|
+
Description: string;
|
|
6
|
+
IncidentDate?: string | null;
|
|
7
|
+
SubmitFiles?: boolean | null;
|
|
8
|
+
CauseAnalysis?: string | null;
|
|
9
|
+
};
|
|
10
|
+
export type ReportIssueResult = {
|
|
11
|
+
Table: {
|
|
12
|
+
IssueID: number;
|
|
13
|
+
}[];
|
|
14
|
+
};
|
|
15
|
+
/** Creates the issue and moves the user's uploaded attachments onto it. */
|
|
16
|
+
export declare const procReportIssue: ProcedureAPI<ReportIssueParams, ReportIssueResult>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { ProcedureAPI } from "@olenbetong/appframe-data";
|
|
2
|
+
/** Creates the issue and moves the user's uploaded attachments onto it. */
|
|
3
|
+
export const procReportIssue = new ProcedureAPI({
|
|
4
|
+
procedureId: "astp_Improve_CreateNewIssue2",
|
|
5
|
+
parameters: [
|
|
6
|
+
{
|
|
7
|
+
name: "IssueType",
|
|
8
|
+
type: "string",
|
|
9
|
+
hasDefault: false,
|
|
10
|
+
required: true,
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
name: "Area",
|
|
14
|
+
type: "string",
|
|
15
|
+
hasDefault: true,
|
|
16
|
+
required: false,
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: "Description",
|
|
20
|
+
type: "string",
|
|
21
|
+
hasDefault: false,
|
|
22
|
+
required: true,
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
name: "IncidentDate",
|
|
26
|
+
type: "datetime",
|
|
27
|
+
hasDefault: true,
|
|
28
|
+
required: false,
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
name: "SubmitFiles",
|
|
32
|
+
type: "boolean",
|
|
33
|
+
hasDefault: true,
|
|
34
|
+
required: false,
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: "CauseAnalysis",
|
|
38
|
+
type: "string",
|
|
39
|
+
hasDefault: true,
|
|
40
|
+
required: false,
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
timeout: 30000,
|
|
44
|
+
});
|
package/es/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.ObCheckbox-root{--check-width: 2rem;--bg-color: var(--brand-dark, rgba(42, 65, 50, 0.5));--bg-color-hover: var(--brand-primary, rgba(42, 65, 50, 0.8));--bg-color-selected: var(--brand-light);display:inline-block;height:var(--check-width);margin-bottom:0}.ObCheckbox-root:focus-within .ObCheckbox-box{border:.1rem solid #000}.ObCheckbox-root.Ob-disabled{--bg-color: rgba(150, 150, 150, 0.5);--bg-color-hover: var(--bg-color)}.ObCheckbox-box{position:relative;background:var(--bg-color);transition:background 300ms ease;overflow:hidden;border-radius:calc(var(--check-width)/15);height:var(--check-width);width:var(--check-width)}.ObCheckbox-box:hover{background:var(--bg-color-hover)}.ObCheckbox-label{position:relative;margin-bottom:0;overflow:hidden}.ObCheckbox-label:focus{outline:none}.ObCheckbox-mark{color:#fff;display:inline-block;font-size:calc(var(--check-width)*.4);left:50%;opacity:0;pointer-events:none;position:absolute;top:50%;transition:all 300ms ease-in-out;transition-delay:0ms;transform:translate(-50%, -50%) scale(6)}.ObCheckbox-input{clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}.ObCheckbox-input:focus{outline:none}.ObCheckbox-label{display:flex;gap:.5rem;align-items:center;overflow:visible}.ObCheckbox-root.Ob-reverse .ObCheckbox-label{flex-direction:row-reverse}.ObCheckbox-input:checked:not(:disabled)+.ObCheckbox-label .ObCheckbox-box{animation:animOn 600ms 1 forwards}.ObCheckbox-input:checked:not(:disabled)+.ObCheckbox-label .ObCheckbox-box{background:var(--bg-color-selected)}.ObCheckbox-input:checked+.ObCheckbox-label .ObCheckbox-box .ObCheckbox-mark{transform:translate(-50%, -50%) scale(1);transition-delay:200ms;opacity:1}.ObCheckbox-root.Ob-disabled .ObCheckbox-box{cursor:not-allowed}@keyframes animOn{40%{transform:scaleY(0.4) scaleX(2)}50%{transform:scaleY(1.2) scaleX(0.6)}60%{transform:scaleY(0.8) scaleX(1.4)}70%{transform:scaleY(1.1) scaleX(0.9)}100%{transform:scaleY(1) scaleX(1)}}.ObColorCard-root{--bg-color-border: black;--bg-color-main: white;--bg-size: 0.75rem;--card-color: rgb(0, 0, 0);display:flex;align-items:stretch;min-height:10rem;overflow:hidden;border-radius:.25rem;box-shadow:0 1px 12px rgba(0, 0, 0, 0.15),0 1px 6px rgba(0, 0, 0, 0.25);color:#666;background-image:linear-gradient(to right, var(--bg-color-border), var(--bg-color-border) var(--bg-size), var(--bg-color-main) var(--bg-size), var(--bg-color-main));font-family:"Variable Bahnschrift","Bahnschrift","Open Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:1rem;transition:all ease-in-out 300ms;cursor:pointer;&:nth-of-type(5n + 1){--bg-color-border: rgb(178, 108, 190)}&:nth-of-type(5n + 2){--bg-color-border: rgb(79, 164, 61)}&:nth-of-type(5n + 3){--bg-color-border: rgb(246, 170, 23)}&:nth-of-type(5n + 4){--bg-color-border: rgb(218, 93, 83)}&:nth-of-type(5n + 5){--bg-color-border: rgb(23, 162, 184)}&:hover,&:focus{--bg-color-main: #f5f5f5;box-shadow:0 3px 18px rgba(0, 0, 0, 0.15),0 3px 12px rgba(0, 0, 0, 0.25);text-decoration:none}}@media screen and (min-width: 48rem){.ObColorCard-root{font-size:1.2rem}}.ObColorCard-column{display:flex;flex:1 1 100%;flex-direction:column;justify-content:space-between;margin:1rem 0;padding:.5rem 1.5rem .5rem 1rem;overflow:hidden;text-overflow:ellipsis;&:first-child{margin-left:var(--bg-size, 0.75rem)}&.ObColorCard-minor{flex:0 0 4rem;border-right:1px solid #e3e3e3;transition:margin ease-in-out 300ms;@media screen and (min-width: 48rem){flex:0 0 8rem}}}.ObColorCard-detailValue{color:#555}.ObColorCard-detailLabel{color:dimgray;font-size:.8rem;text-transform:uppercase}.ObColorCard-detail{&:not(:last-child){margin-right:1.5rem}&.ObColorCard-primary,&.ObColorCard-primary .ObColorCard-detailValue{font-size:1.25rem;font-weight:300}&.ObColorCard-primary .ObColorCard-detailValue{color:unset}}@media screen and (min-width: 48rem){.ObColorCard-detail{font-size:1rem}}.ObColorCard-stepList{display:flex;flex-direction:column;gap:1rem}.ObColorCard-step{position:relative;text-box-trim:trim-both;display:flex;align-items:flex-start;gap:.5rem}.ObColorCard-step::before{flex:.6em 0 0;content:"";position:relative;top:.25em;width:.6em;height:.6em;background:white;border:2px solid var(--bg-color-border, #999);border-radius:50%;box-sizing:border-box;z-index:1}.ObColorCard-step:not(:last-child)::after{content:"";position:absolute;top:1em;left:calc(.3em - 1px);height:calc(100% - .95em + 1rem + .0625em);border-left:2px dotted #999;z-index:0}:root{--ob-datenavigator-height: 3rem}.ObDateNavigator-icon{display:inline-block;svg{width:.625em;position:relative;top:-1px}}.ObDateNavigator-root{background-color:hsl(220, 20%, 96%);background-color:var(--block-header-color-bg);display:flex;font-size:1rem;outline:none;&:focus-visible{outline:2px solid var(--brand-dark, #336699);outline-offset:2px}}.ObDateNavigator-arrow{display:flex;align-items:center;flex:0 0 var(--ob-datenavigator-height);justify-content:center;height:var(--ob-datenavigator-height);cursor:pointer;text-align:center;&:hover:not(:disabled){background-color:#e3e3e3;background-color:var(--block-header-button-hover)}&:disabled{cursor:not-allowed;color:rgba(0 0 0/0.2)}}.ObDateNavigator-arrowLeft{border-right:1px solid #ddd;order:1}.ObDateNavigator-arrowRight{border-left:1px solid #ddd;order:3}.ObDateNavigator-date{display:flex;flex:1 1 100%;flex-direction:column;justify-content:center;order:2;height:var(--ob-datenavigator-height);text-align:center}.ObDateNavigator-today{order:4;padding:0 1rem;height:var(--ob-datenavigator-height);display:flex;align-items:center;justify-content:center;font-size:.875rem;color:var(--brand-dark, #336699);text-transform:uppercase;cursor:pointer;text-wrap:nowrap;border-left:1px solid #ddd;&:hover:not(:disabled){background-color:var(--block-header-button-hover)}&:focus-visible{outline:2px solid var(--brand-dark, #336699);outline-offset:2px}}:root{--ob-linked-list-bullet-size: 0.7em;--ob-linked-list-line-width: 0.2em}.ObLinkedList-root{list-style-type:none;margin-left:0;padding-left:0}.ObLinkedList-item{display:flex;align-items:center;flex-direction:row}.ObLinkedList-leftColumn{flex:1 1 4em;font-size:.75em;padding:0 1em;text-align:center}.ObLinkedList-rightColumn{flex:1 1 100%;padding:1em 1em 1em 1.5em}.ObLinkedList-line{display:flex;align-self:stretch;flex:0 0 .2em;background:#fff;position:relative}.ObLinkedList-bullet{background:#fff;border:1px solid rgba(50,50,50,.25);border-radius:.55em;height:.7em;width:.7em;position:absolute;left:0;top:50%;transform:translate(calc(-1 * var(--ob-linked-list-bullet-size) / 2 + var(--ob-linked-list-line-width) / 2), -50%)}.ObLinkedList-card{display:block;background:#fff;border:1px solid;border-color:#e5e6e9 #dfe0e4 #d0d1d5;border-radius:.1875em;color:inherit;cursor:pointer;flex:100% 1 1;position:relative}.ObLinkedList-card::before{border-bottom:.5em solid rgba(0,0,0,0);border-right:1em solid #fff;border-top:.5em solid rgba(0,0,0,0);content:" ";filter:drop-shadow(-1px 0px 1px rgba(50, 50, 50, 0.2));height:1em;left:-1em;margin-top:-0.5em;position:absolute;top:50%;width:1em}.ObLinkedList-card:hover{background-color:hsl(220,20%,94%) !important;color:inherit;text-decoration:inherit}.ObLinkedList-card:hover::before{border-right-color:hsl(220,20%,94%) !important}.ObPageBanner-root{background-color:hsl(186,72%,24%);background-color:var(--brand-dark);box-shadow:0px 8px 8px rgba(0,0,0,.2);color:#fff}.ObPageBanner-root a{color:hsl(200,50%,80%)}.ObPageBanner-inner{display:flex;align-items:center;flex-direction:column}@media screen and (min-width: 768px){.ObPageBanner-inner{align-items:flex-start;flex-direction:row}}.ObPageBanner-plantTitle{font-size:2rem}@media screen and (min-width: 992px){.ObPageBanner-plantTitle{font-size:3rem}}.ObPageBanner-bannerImage{align-self:stretch;background-color:#ddd;display:inline-block;height:20vh;object-fit:cover;object-position:center center;width:100%}@media screen and (min-width: 576px){.ObPageBanner-bannerImage{align-self:center;margin:0;margin-right:1rem;border:.4rem solid #fff;border-radius:50%;height:150px;width:150px}}@media screen and (min-width: 992px){.ObPageBanner-bannerImage{height:250px;width:250px}}.ObPageBanner-bannerTitle{margin-bottom:1rem;margin-top:1rem;font-size:2rem}@media screen and (min-width: 768px){.ObPageBanner-bannerTitle{margin-top:0}}@media screen and (min-width: 992px){.ObPageBanner-bannerTitle{font-size:3rem}}.ObPageBanner-tabList.sticky{position:-webkit-sticky;position:sticky;top:0;z-index:1000}.ObPageBanner-tabListInner{overflow-x:auto;scrollbar-width:thin;white-space:nowrap}.ObPageBanner-tab{border-bottom:.25rem solid rgba(0,0,0,0);display:inline-block;margin-top:.5rem;min-width:8rem;padding:.5rem 1rem;text-align:center;text-transform:capitalize}.ObPageBanner-tab.active{border-color:#fff}.ObProgressBar-root{--ob-progress-track: var(--ds-color-neutral-surface-active, whiteSmoke);--ob-progress-value-start: var(--ds-color-brand-base-default, var(--brand-primary));--ob-progress-value-end: var(--ds-color-brand-base-hover, var(--brand-light));--ob-progress-stripe: rgb(0 0 0 / 0.1);--ob-progress-shadow: 0 2px 3px rgb(0 0 0 / 0.2) inset;height:1.5em;width:100%;appearance:none;-webkit-appearance:none;background-color:var(--ob-progress-track);border:none;border-radius:var(--ds-border-radius-sm, 3px);box-shadow:var(--ob-progress-shadow);color:var(--ob-progress-value-start);position:relative}.ObProgressBar-root::-webkit-progress-bar{background-color:var(--ob-progress-track);border-radius:var(--ds-border-radius-sm, 3px);box-shadow:var(--ob-progress-shadow)}.ObProgressBar-root::-webkit-progress-value{background-image:linear-gradient(135deg, transparent, transparent 33%, var(--ob-progress-stripe) 33%, var(--ob-progress-stripe) 66%, transparent 66%),linear-gradient(to right, var(--ob-progress-value-start), var(--ob-progress-value-end));background-size:35px 20px,100% 100%;border-radius:var(--ds-border-radius-sm, 3px);position:relative;transition:width .5s ease-out}.ObProgressBar-root::-moz-progress-bar{background-image:linear-gradient(135deg, transparent, transparent 33%, var(--ob-progress-stripe) 33%, var(--ob-progress-stripe) 66%, transparent 66%),linear-gradient(to right, var(--ob-progress-value-start), var(--ob-progress-value-end));background-size:35px 20px,100% 100%;border-radius:var(--ds-border-radius-sm, 3px);transition:width .5s ease-out}.ObSidebar-root{position:fixed;bottom:0;left:0;top:0;z-index:2;background-color:#fff;transform:translateX(-100%);transition:transform .2s ease-out;will-change:transform}.ObSidebar-root.Ob-right{left:unset;right:0;transform:translateX(100%)}.ObSidebar-root{overflow-y:auto}.ObSidebar-root.Ob-open{transform:translateX(0)}.ObSidebar-root.ObSidebar-shadow{box-shadow:2px 2px 4px rgba(0,0,0,.15)}.ObSidebar-root.ObSidebar-shadow.Ob-right{box-shadow:-2px 2px 4px rgba(0,0,0,.15)}.ObSidebar-overlay{position:fixed;bottom:0;left:0;right:0;top:0;z-index:1;opacity:0;visibility:hidden;transition:opacity .3s ease-out,visibility .3s ease-out;background-color:rgba(0,0,0,.3)}.ObSidebar-overlay.Ob-open{opacity:1;visibility:visible}.ObSpinner-wrapper,.ObSpinner-fullPage{--bullet-size: 0.5em}.ObSpinner-root{display:inline-block}.ObSpinner-fullPage{display:flex;align-items:center;justify-content:center;height:100vh;width:100vw}.ObSpinner-spinner{display:inline-block;height:calc(var(--bullet-size)*1.5);position:relative;width:calc(var(--bullet-size)*5)}.ObSpinner-bullet{animation-timing-function:cubic-bezier(0, 1, 1, 0);background:#666;border-radius:50%;height:var(--bullet-size);position:absolute;top:.2rem;width:var(--bullet-size);&:nth-child(1){animation:scaleAnimation .6s infinite ease-in-out;left:calc(var(--bullet-size)*.5)}&:nth-child(2){animation:translateAnimation .6s infinite ease-in-out;left:calc(var(--bullet-size)*.5)}&:nth-child(3){animation:translateAnimation .6s infinite ease-in-out;left:calc(var(--bullet-size)*2.4)}&:nth-child(4){animation:scaleAnimation .6s infinite ease-in-out reverse;left:calc(var(--bullet-size)*4)}}@keyframes scaleAnimation{from{transform:scale(0)}to{transform:scale(1)}}@keyframes translateAnimation{from{transform:translate(0, 0)}to{transform:translate(calc(var(--bullet-size) * 1.65), 0)}}.😖{display:initial}.ObSplitContainer-root{display:flex;flex-direction:column;height:100%;width:100%}.ObSplitContainer-root.horizontal{flex-direction:row}.ObSplitContainer-panel{overflow:hidden}.ObSplitContainer-divider{flex:0 0 .5rem;background-color:rgba(0,0,0,0);line-height:.75;cursor:ns-resize;display:flex;align-items:center;justify-content:center}.ObSplitContainer-divider:focus{background-color:rgba(0,0,0,.3)}.ObSplitContainer-root.horizontal>.ObSplitContainer-divider{cursor:ew-resize;writing-mode:vertical-lr}.ObSplitContainer-panel.dragging{pointer-events:none}.ObValueToggleOption{display:flex;align-items:center;margin:0;position:relative}.ObValueToggleLabel{font-size:.8em;margin:0 .2em;padding:.3em .5em;text-transform:uppercase;transition:background .2s ease,color .2s ease;border-radius:4px}.ObValueToggleGroup{padding:.25rem;border:2px solid rgb(0 0 0/0.2);border-radius:4px;display:flex;gap:.25rem;flex-wrap:wrap;&.vertical{flex-direction:column;align-items:center;& .ObValueToggleOption{width:100%;& .ObValueToggleLabel{width:100%;text-align:center}}}&:focus-within{border-color:rgb(0 0 0/0.8)}}.ObValueToggleOption input{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.ObValueToggleOption:hover input:not(:disabled)+.ObValueToggleLabel{cursor:pointer;background:#ccc}.ObValueToggleOption input:checked+.ObValueToggleLabel{--color-bg: var(--brand-dark);background-color:var(--color-bg);color:white;cursor:default}.ObValueToggleOption input:disabled+.ObValueToggleLabel{color:rgb(0 0 0/0.5)}.ObValueToggleOption input:checked:focus-visible+.ObValueToggleLabel{--color-bg: var(--brand-light);outline:2px solid var(--brand-light)}.ObValueToggleOption input:checked:hover+.ObValueToggleLabel{background-color:var(--color-bg)}
|
|
1
|
+
.ObCheckbox-root{--check-width: var(--ds-size-8, 2rem);--bg-color: var(--brand-dark, rgba(42, 65, 50, 0.5));--bg-color-hover: var(--brand-primary, rgba(42, 65, 50, 0.8));--bg-color-selected: var(--brand-light);display:inline-block;height:var(--check-width);margin-bottom:0}.ObCheckbox-root:focus-within .ObCheckbox-box{border:.1rem solid #000}.ObCheckbox-root.Ob-disabled{--bg-color: rgba(150, 150, 150, 0.5);--bg-color-hover: var(--bg-color)}.ObCheckbox-box{position:relative;background:var(--bg-color);transition:background 300ms ease;overflow:hidden;border-radius:calc(var(--check-width)/15);height:var(--check-width);width:var(--check-width)}.ObCheckbox-box:hover{background:var(--bg-color-hover)}.ObCheckbox-label{position:relative;margin-bottom:0;overflow:hidden}.ObCheckbox-label:focus{outline:none}.ObCheckbox-mark{color:#fff;display:inline-block;font-size:calc(var(--check-width)*.4);left:50%;opacity:0;pointer-events:none;position:absolute;top:50%;transition:all 300ms ease-in-out;transition-delay:0ms;transform:translate(-50%, -50%) scale(6)}.ObCheckbox-input{clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}.ObCheckbox-input:focus{outline:none}.ObCheckbox-label{display:flex;gap:var(--ds-size-2, 0.5rem);align-items:center;overflow:visible}.ObCheckbox-root.Ob-reverse .ObCheckbox-label{flex-direction:row-reverse}.ObCheckbox-input:checked:not(:disabled)+.ObCheckbox-label .ObCheckbox-box{animation:animOn 600ms 1 forwards}.ObCheckbox-input:checked:not(:disabled)+.ObCheckbox-label .ObCheckbox-box{background:var(--bg-color-selected)}.ObCheckbox-input:checked+.ObCheckbox-label .ObCheckbox-box .ObCheckbox-mark{transform:translate(-50%, -50%) scale(1);transition-delay:200ms;opacity:1}.ObCheckbox-root.Ob-disabled .ObCheckbox-box{cursor:not-allowed}@keyframes animOn{40%{transform:scaleY(0.4) scaleX(2)}50%{transform:scaleY(1.2) scaleX(0.6)}60%{transform:scaleY(0.8) scaleX(1.4)}70%{transform:scaleY(1.1) scaleX(0.9)}100%{transform:scaleY(1) scaleX(1)}}.ObColorCard-root{--bg-color-border: black;--bg-color-main: white;--bg-size: var(--ds-size-3, 0.75rem);--card-color: rgb(0, 0, 0);display:flex;align-items:stretch;min-height:calc(var(--ds-size-10, 2.5rem)*4);overflow:hidden;border-radius:.25rem;box-shadow:0 1px 12px rgba(0, 0, 0, 0.15),0 1px 6px rgba(0, 0, 0, 0.25);color:#666;background-image:linear-gradient(to right, var(--bg-color-border), var(--bg-color-border) var(--bg-size), var(--bg-color-main) var(--bg-size), var(--bg-color-main));font-family:"Variable Bahnschrift","Bahnschrift","Open Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:var(--ds-font-size-3, 1rem);transition:all ease-in-out 300ms;cursor:pointer;&:nth-of-type(5n + 1){--bg-color-border: rgb(178, 108, 190)}&:nth-of-type(5n + 2){--bg-color-border: rgb(79, 164, 61)}&:nth-of-type(5n + 3){--bg-color-border: rgb(246, 170, 23)}&:nth-of-type(5n + 4){--bg-color-border: rgb(218, 93, 83)}&:nth-of-type(5n + 5){--bg-color-border: rgb(23, 162, 184)}&:hover,&:focus{--bg-color-main: #f5f5f5;box-shadow:0 3px 18px rgba(0, 0, 0, 0.15),0 3px 12px rgba(0, 0, 0, 0.25);text-decoration:none}}@media screen and (min-width: 48rem){.ObColorCard-root{font-size:var(--ds-font-size-4, 1.2rem)}}.ObColorCard-column{display:flex;flex:1 1 100%;flex-direction:column;justify-content:space-between;margin:var(--ds-size-4, 1rem) 0;padding:var(--ds-size-2, 0.5rem) var(--ds-size-6, 1.5rem) var(--ds-size-2, 0.5rem) var(--ds-size-4, 1rem);overflow:hidden;text-overflow:ellipsis;&:first-child{margin-left:var(--bg-size, 0.75rem)}&.ObColorCard-minor{flex:0 0 calc(var(--ds-size-8, 2rem)*2);border-right:1px solid #e3e3e3;transition:margin ease-in-out 300ms;@media screen and (min-width: 48rem){flex:0 0 calc(var(--ds-size-8, 2rem)*4)}}}.ObColorCard-detailValue{color:#555}.ObColorCard-detailLabel{color:dimgray;font-size:var(--ds-font-size-1, 0.8rem);text-transform:uppercase}.ObColorCard-detail{&:not(:last-child){margin-right:var(--ds-size-6, 1.5rem)}&.ObColorCard-primary,&.ObColorCard-primary .ObColorCard-detailValue{font-size:var(--ds-font-size-5, 1.25rem);font-weight:300}&.ObColorCard-primary .ObColorCard-detailValue{color:unset}}@media screen and (min-width: 48rem){.ObColorCard-detail{font-size:var(--ds-font-size-3, 1rem)}}.ObColorCard-stepList{display:flex;flex-direction:column;gap:var(--ds-size-4, 1rem)}.ObColorCard-step{position:relative;text-box-trim:trim-both;display:flex;align-items:flex-start;gap:var(--ds-size-2, 0.5rem)}.ObColorCard-step::before{flex:.6em 0 0;content:"";position:relative;top:.25em;width:.6em;height:.6em;background:white;border:2px solid var(--bg-color-border, #999);border-radius:50%;box-sizing:border-box;z-index:1}.ObColorCard-step:not(:last-child)::after{content:"";position:absolute;top:1em;left:calc(.3em - 1px);height:calc(100% - .95em + var(--ds-size-4, 1rem) + .0625em);border-left:2px dotted #999;z-index:0}.ObDateNavigator-icon{display:inline-block;svg{width:.625em;position:relative;top:-1px}}.ObDateNavigator-root{background-color:hsl(220, 20%, 96%);background-color:var(--block-header-color-bg);display:flex;font-size:var(--ds-font-size-3, 1rem);outline:none;--ob-datenavigator-height: var(--ds-size-12, 3rem);&:focus-visible{outline:2px solid var(--brand-dark, #336699);outline-offset:2px}}.ObDateNavigator-arrow{display:flex;align-items:center;flex:0 0 var(--ob-datenavigator-height);justify-content:center;height:var(--ob-datenavigator-height);cursor:pointer;text-align:center;&:hover:not(:disabled){background-color:#e3e3e3;background-color:var(--block-header-button-hover)}&:disabled{cursor:not-allowed;color:rgba(0 0 0/0.2)}}.ObDateNavigator-arrowLeft{border-right:1px solid #ddd;order:1}.ObDateNavigator-arrowRight{border-left:1px solid #ddd;order:3}.ObDateNavigator-date{display:flex;flex:1 1 100%;flex-direction:column;justify-content:center;order:2;height:var(--ob-datenavigator-height);text-align:center}.ObDateNavigator-today{order:4;padding:0 var(--ds-size-4, 1rem);height:var(--ob-datenavigator-height);display:flex;align-items:center;justify-content:center;font-size:var(--ds-font-size-2, 0.875rem);color:var(--brand-dark, #336699);text-transform:uppercase;cursor:pointer;text-wrap:nowrap;border-left:1px solid #ddd;&:hover:not(:disabled){background-color:var(--block-header-button-hover)}&:focus-visible{outline:2px solid var(--brand-dark, #336699);outline-offset:2px}}:root{--ob-linked-list-bullet-size: 0.7em;--ob-linked-list-line-width: 0.2em}.ObLinkedList-root{list-style-type:none;margin-left:0;padding-left:0}.ObLinkedList-item{display:flex;align-items:center;flex-direction:row}.ObLinkedList-leftColumn{flex:1 1 4em;font-size:.75em;padding:0 1em;text-align:center}.ObLinkedList-rightColumn{flex:1 1 100%;padding:1em 1em 1em 1.5em}.ObLinkedList-line{display:flex;align-self:stretch;flex:0 0 .2em;background:#fff;position:relative}.ObLinkedList-bullet{background:#fff;border:1px solid rgba(50,50,50,.25);border-radius:.55em;height:.7em;width:.7em;position:absolute;left:0;top:50%;transform:translate(calc(-1 * var(--ob-linked-list-bullet-size) / 2 + var(--ob-linked-list-line-width) / 2), -50%)}.ObLinkedList-card{display:block;background:#fff;border:1px solid;border-color:#e5e6e9 #dfe0e4 #d0d1d5;border-radius:.1875em;color:inherit;cursor:pointer;flex:100% 1 1;position:relative}.ObLinkedList-card::before{border-bottom:.5em solid rgba(0,0,0,0);border-right:1em solid #fff;border-top:.5em solid rgba(0,0,0,0);content:" ";filter:drop-shadow(-1px 0px 1px rgba(50, 50, 50, 0.2));height:1em;left:-1em;margin-top:-0.5em;position:absolute;top:50%;width:1em}.ObLinkedList-card:hover{background-color:hsl(220,20%,94%) !important;color:inherit;text-decoration:inherit}.ObLinkedList-card:hover::before{border-right-color:hsl(220,20%,94%) !important}.ObPageBanner-root{background-color:hsl(186,72%,24%);background-color:var(--brand-dark);box-shadow:0px 8px 8px rgba(0,0,0,.2);color:#fff}.ObPageBanner-root a{color:hsl(200,50%,80%)}.ObPageBanner-inner{display:flex;align-items:center;flex-direction:column}@media screen and (min-width: 768px){.ObPageBanner-inner{align-items:flex-start;flex-direction:row}}.ObPageBanner-plantTitle{font-size:var(--ds-font-size-7, 2rem)}@media screen and (min-width: 992px){.ObPageBanner-plantTitle{font-size:var(--ds-font-size-9, 3rem)}}.ObPageBanner-bannerImage{align-self:stretch;background-color:#ddd;display:inline-block;height:20vh;object-fit:cover;object-position:center center;width:100%}@media screen and (min-width: 576px){.ObPageBanner-bannerImage{align-self:center;margin:0;margin-right:var(--ds-size-4, 1rem);border:.4rem solid #fff;border-radius:50%;height:150px;width:150px}}@media screen and (min-width: 992px){.ObPageBanner-bannerImage{height:250px;width:250px}}.ObPageBanner-bannerTitle{margin-bottom:var(--ds-size-4, 1rem);margin-top:var(--ds-size-4, 1rem);font-size:var(--ds-font-size-7, 2rem)}@media screen and (min-width: 768px){.ObPageBanner-bannerTitle{margin-top:0}}@media screen and (min-width: 992px){.ObPageBanner-bannerTitle{font-size:var(--ds-font-size-9, 3rem)}}.ObPageBanner-tabList.sticky{position:-webkit-sticky;position:sticky;top:0;z-index:1000}.ObPageBanner-tabListInner{overflow-x:auto;scrollbar-width:thin;white-space:nowrap}.ObPageBanner-tab{border-bottom:.25rem solid rgba(0,0,0,0);display:inline-block;margin-top:var(--ds-size-2, 0.5rem);min-width:calc(var(--ds-size-8, 2rem)*4);padding:var(--ds-size-2, 0.5rem) var(--ds-size-4, 1rem);text-align:center;text-transform:capitalize}.ObPageBanner-tab.active{border-color:#fff}.ObProgressBar-root{--ob-progress-track: var(--ds-color-neutral-surface-active, whiteSmoke);--ob-progress-value-start: var(--ds-color-brand-base-default, var(--brand-primary));--ob-progress-value-end: var(--ds-color-brand-base-hover, var(--brand-light));--ob-progress-stripe: rgb(0 0 0 / 0.1);--ob-progress-shadow: 0 2px 3px rgb(0 0 0 / 0.2) inset;height:1.5em;width:100%;appearance:none;-webkit-appearance:none;background-color:var(--ob-progress-track);border:none;border-radius:var(--ds-border-radius-sm, 3px);box-shadow:var(--ob-progress-shadow);color:var(--ob-progress-value-start);position:relative}.ObProgressBar-root::-webkit-progress-bar{background-color:var(--ob-progress-track);border-radius:var(--ds-border-radius-sm, 3px);box-shadow:var(--ob-progress-shadow)}.ObProgressBar-root::-webkit-progress-value{background-image:linear-gradient(135deg, transparent, transparent 33%, var(--ob-progress-stripe) 33%, var(--ob-progress-stripe) 66%, transparent 66%),linear-gradient(to right, var(--ob-progress-value-start), var(--ob-progress-value-end));background-size:35px 20px,100% 100%;border-radius:var(--ds-border-radius-sm, 3px);position:relative;transition:width .5s ease-out}.ObProgressBar-root::-moz-progress-bar{background-image:linear-gradient(135deg, transparent, transparent 33%, var(--ob-progress-stripe) 33%, var(--ob-progress-stripe) 66%, transparent 66%),linear-gradient(to right, var(--ob-progress-value-start), var(--ob-progress-value-end));background-size:35px 20px,100% 100%;border-radius:var(--ds-border-radius-sm, 3px);transition:width .5s ease-out}.ObSidebar-root{position:fixed;bottom:0;left:0;top:0;z-index:2;background-color:#fff;transform:translateX(-100%);transition:transform .2s ease-out;will-change:transform}.ObSidebar-root.Ob-right{left:unset;right:0;transform:translateX(100%)}.ObSidebar-root{overflow-y:auto}.ObSidebar-root.Ob-open{transform:translateX(0)}.ObSidebar-root.ObSidebar-shadow{box-shadow:2px 2px 4px rgba(0,0,0,.15)}.ObSidebar-root.ObSidebar-shadow.Ob-right{box-shadow:-2px 2px 4px rgba(0,0,0,.15)}.ObSidebar-overlay{position:fixed;bottom:0;left:0;right:0;top:0;z-index:1;opacity:0;visibility:hidden;transition:opacity .3s ease-out,visibility .3s ease-out;background-color:rgba(0,0,0,.3)}.ObSidebar-overlay.Ob-open{opacity:1;visibility:visible}.ObSpinner-wrapper,.ObSpinner-fullPage{--bullet-size: 0.5em}.ObSpinner-root{display:inline-block}.ObSpinner-fullPage{display:flex;align-items:center;justify-content:center;height:100vh;width:100vw}.ObSpinner-spinner{display:inline-block;height:calc(var(--bullet-size)*1.5);position:relative;width:calc(var(--bullet-size)*5)}.ObSpinner-bullet{animation-timing-function:cubic-bezier(0, 1, 1, 0);background:#666;border-radius:50%;height:var(--bullet-size);position:absolute;top:calc(var(--bullet-size)*.4);width:var(--bullet-size);&:nth-child(1){animation:scaleAnimation .6s infinite ease-in-out;left:calc(var(--bullet-size)*.5)}&:nth-child(2){animation:translateAnimation .6s infinite ease-in-out;left:calc(var(--bullet-size)*.5)}&:nth-child(3){animation:translateAnimation .6s infinite ease-in-out;left:calc(var(--bullet-size)*2.4)}&:nth-child(4){animation:scaleAnimation .6s infinite ease-in-out reverse;left:calc(var(--bullet-size)*4)}}@keyframes scaleAnimation{from{transform:scale(0)}to{transform:scale(1)}}@keyframes translateAnimation{from{transform:translate(0, 0)}to{transform:translate(calc(var(--bullet-size) * 1.65), 0)}}.😖{display:initial}.ObSplitContainer-root{display:flex;flex-direction:column;height:100%;width:100%}.ObSplitContainer-root.horizontal{flex-direction:row}.ObSplitContainer-panel{overflow:hidden}.ObSplitContainer-divider{flex:0 0 var(--ds-size-2, 0.5rem);background-color:rgba(0,0,0,0);color:var(--ds-color-neutral-text-subtle, currentColor);font-size:var(--ds-font-size-2, 0.875rem);line-height:.75;cursor:ns-resize;display:flex;align-items:center;justify-content:center}.ObSplitContainer-divider:focus{background-color:rgba(0,0,0,.3)}.ObSplitContainer-root.horizontal>.ObSplitContainer-divider{cursor:ew-resize;writing-mode:vertical-lr}.ObSplitContainer-panel.dragging{pointer-events:none}.ObValueToggleOption{display:flex;align-items:center;margin:0;position:relative}.ObValueToggleLabel{font-size:.8em;margin:0 .2em;padding:.3em .5em;text-transform:uppercase;transition:background .2s ease,color .2s ease;border-radius:4px}.ObValueToggleGroup{padding:var(--ds-size-1, 0.25rem);border:2px solid rgb(0 0 0/0.2);border-radius:4px;display:flex;gap:var(--ds-size-1, 0.25rem);flex-wrap:wrap;&.vertical{flex-direction:column;align-items:center;& .ObValueToggleOption{width:100%;& .ObValueToggleLabel{width:100%;text-align:center}}}&:focus-within{border-color:rgb(0 0 0/0.8)}}.ObValueToggleOption input{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.ObValueToggleOption:hover input:not(:disabled)+.ObValueToggleLabel{cursor:pointer;background:#ccc}.ObValueToggleOption input:checked+.ObValueToggleLabel{--color-bg: var(--brand-dark);background-color:var(--color-bg);color:white;cursor:default}.ObValueToggleOption input:disabled+.ObValueToggleLabel{color:rgb(0 0 0/0.5)}.ObValueToggleOption input:checked:focus-visible+.ObValueToggleLabel{--color-bg: var(--brand-light);outline:2px solid var(--brand-light)}.ObValueToggleOption input:checked:hover+.ObValueToggleLabel{background-color:var(--color-bg)}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@olenbetong/synergi-react",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.3.0",
|
|
4
4
|
"description": "Standalone React component for SynergiWeb and Partner Portal",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -16,6 +16,10 @@
|
|
|
16
16
|
"types": "./es/elements-ds/index.d.ts",
|
|
17
17
|
"import": "./es/elements-ds/index.js"
|
|
18
18
|
},
|
|
19
|
+
"./improve": {
|
|
20
|
+
"types": "./es/improve/index.d.ts",
|
|
21
|
+
"import": "./es/improve/index.js"
|
|
22
|
+
},
|
|
19
23
|
"./mui": {
|
|
20
24
|
"types": "./es/mui/index.d.ts",
|
|
21
25
|
"import": "./es/mui/index.js"
|
|
@@ -52,8 +56,8 @@
|
|
|
52
56
|
"@mui/icons-material": "9.5.0",
|
|
53
57
|
"@mui/material": "9.5.0",
|
|
54
58
|
"@olenbetong/appframe-core": "^2.15.2",
|
|
55
|
-
"@olenbetong/appframe-data": "^1.8.
|
|
56
|
-
"@olenbetong/appframe-ds": "^1.
|
|
59
|
+
"@olenbetong/appframe-data": "^1.8.6",
|
|
60
|
+
"@olenbetong/appframe-ds": "^1.9.1",
|
|
57
61
|
"@olenbetong/appframe-mui": "^7.0.13",
|
|
58
62
|
"@olenbetong/appframe-react": "^2.2.8",
|
|
59
63
|
"clsx": "^2.1.1",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.ObCheckbox-root {
|
|
2
|
-
--check-width: 2rem;
|
|
2
|
+
--check-width: var(--ds-size-8, 2rem);
|
|
3
3
|
--bg-color: var(--brand-dark, rgba(42, 65, 50, 0.5));
|
|
4
4
|
--bg-color-hover: var(--brand-primary, rgba(42, 65, 50, 0.8));
|
|
5
5
|
--bg-color-selected: var(--brand-light);
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
|
|
76
76
|
.ObCheckbox-label {
|
|
77
77
|
display: flex;
|
|
78
|
-
gap: 0.5rem;
|
|
78
|
+
gap: var(--ds-size-2, 0.5rem);
|
|
79
79
|
align-items: center;
|
|
80
80
|
|
|
81
81
|
overflow: visible;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
.ObColorCard-root {
|
|
2
2
|
--bg-color-border: black;
|
|
3
3
|
--bg-color-main: white;
|
|
4
|
-
--bg-size: 0.75rem;
|
|
4
|
+
--bg-size: var(--ds-size-3, 0.75rem);
|
|
5
5
|
--card-color: rgb(0, 0, 0);
|
|
6
6
|
|
|
7
7
|
display: flex;
|
|
8
8
|
align-items: stretch;
|
|
9
|
-
min-height:
|
|
9
|
+
min-height: calc(var(--ds-size-10, 2.5rem) * 4);
|
|
10
10
|
overflow: hidden;
|
|
11
11
|
border-radius: 0.25rem;
|
|
12
12
|
box-shadow:
|
|
@@ -21,20 +21,9 @@
|
|
|
21
21
|
var(--bg-color-main)
|
|
22
22
|
);
|
|
23
23
|
font-family:
|
|
24
|
-
"Variable Bahnschrift",
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
-apple-system,
|
|
28
|
-
BlinkMacSystemFont,
|
|
29
|
-
"Segoe UI",
|
|
30
|
-
Roboto,
|
|
31
|
-
"Helvetica Neue",
|
|
32
|
-
Arial,
|
|
33
|
-
sans-serif,
|
|
34
|
-
"Apple Color Emoji",
|
|
35
|
-
"Segoe UI Emoji",
|
|
36
|
-
"Segoe UI Symbol";
|
|
37
|
-
font-size: 1rem;
|
|
24
|
+
"Variable Bahnschrift", "Bahnschrift", "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
|
|
25
|
+
"Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
|
26
|
+
font-size: var(--ds-font-size-3, 1rem);
|
|
38
27
|
transition: all ease-in-out 300ms;
|
|
39
28
|
cursor: pointer;
|
|
40
29
|
|
|
@@ -64,7 +53,7 @@
|
|
|
64
53
|
}
|
|
65
54
|
|
|
66
55
|
@media screen and (min-width: 48rem) {
|
|
67
|
-
font-size: 1.2rem;
|
|
56
|
+
font-size: var(--ds-font-size-4, 1.2rem);
|
|
68
57
|
}
|
|
69
58
|
}
|
|
70
59
|
|
|
@@ -73,8 +62,8 @@
|
|
|
73
62
|
flex: 1 1 100%;
|
|
74
63
|
flex-direction: column;
|
|
75
64
|
justify-content: space-between;
|
|
76
|
-
margin: 1rem 0;
|
|
77
|
-
padding: 0.5rem 1.5rem 0.5rem 1rem;
|
|
65
|
+
margin: var(--ds-size-4, 1rem) 0;
|
|
66
|
+
padding: var(--ds-size-2, 0.5rem) var(--ds-size-6, 1.5rem) var(--ds-size-2, 0.5rem) var(--ds-size-4, 1rem);
|
|
78
67
|
overflow: hidden;
|
|
79
68
|
text-overflow: ellipsis;
|
|
80
69
|
|
|
@@ -83,12 +72,12 @@
|
|
|
83
72
|
}
|
|
84
73
|
|
|
85
74
|
&.ObColorCard-minor {
|
|
86
|
-
flex: 0 0
|
|
75
|
+
flex: 0 0 calc(var(--ds-size-8, 2rem) * 2);
|
|
87
76
|
border-right: 1px solid #e3e3e3;
|
|
88
77
|
transition: margin ease-in-out 300ms;
|
|
89
78
|
|
|
90
79
|
@media screen and (min-width: 48rem) {
|
|
91
|
-
flex: 0 0
|
|
80
|
+
flex: 0 0 calc(var(--ds-size-8, 2rem) * 4);
|
|
92
81
|
}
|
|
93
82
|
}
|
|
94
83
|
}
|
|
@@ -99,18 +88,18 @@
|
|
|
99
88
|
|
|
100
89
|
.ObColorCard-detailLabel {
|
|
101
90
|
color: #696969;
|
|
102
|
-
font-size: 0.8rem;
|
|
91
|
+
font-size: var(--ds-font-size-1, 0.8rem);
|
|
103
92
|
text-transform: uppercase;
|
|
104
93
|
}
|
|
105
94
|
|
|
106
95
|
.ObColorCard-detail {
|
|
107
96
|
&:not(:last-child) {
|
|
108
|
-
margin-right: 1.5rem;
|
|
97
|
+
margin-right: var(--ds-size-6, 1.5rem);
|
|
109
98
|
}
|
|
110
99
|
|
|
111
100
|
&.ObColorCard-primary,
|
|
112
101
|
&.ObColorCard-primary .ObColorCard-detailValue {
|
|
113
|
-
font-size: 1.25rem;
|
|
102
|
+
font-size: var(--ds-font-size-5, 1.25rem);
|
|
114
103
|
font-weight: 300;
|
|
115
104
|
}
|
|
116
105
|
|
|
@@ -119,14 +108,14 @@
|
|
|
119
108
|
}
|
|
120
109
|
|
|
121
110
|
@media screen and (min-width: 48rem) {
|
|
122
|
-
font-size: 1rem;
|
|
111
|
+
font-size: var(--ds-font-size-3, 1rem);
|
|
123
112
|
}
|
|
124
113
|
}
|
|
125
114
|
|
|
126
115
|
.ObColorCard-stepList {
|
|
127
116
|
display: flex;
|
|
128
117
|
flex-direction: column;
|
|
129
|
-
gap: 1rem;
|
|
118
|
+
gap: var(--ds-size-4, 1rem);
|
|
130
119
|
}
|
|
131
120
|
|
|
132
121
|
.ObColorCard-step {
|
|
@@ -135,7 +124,7 @@
|
|
|
135
124
|
|
|
136
125
|
display: flex;
|
|
137
126
|
align-items: flex-start;
|
|
138
|
-
gap: 0.5rem;
|
|
127
|
+
gap: var(--ds-size-2, 0.5rem);
|
|
139
128
|
}
|
|
140
129
|
|
|
141
130
|
.ObColorCard-step::before {
|
|
@@ -159,7 +148,7 @@
|
|
|
159
148
|
position: absolute;
|
|
160
149
|
top: calc(0.25em + 0.6em + 0.15em); /* dot top + dot height + 0.15em spacing */
|
|
161
150
|
left: calc(0.3em - 1px); /* half of the circle width minus half the border width */
|
|
162
|
-
height: calc(100% - 0.95em + 1rem + 0.0625em); /* height of container - top + gap */
|
|
151
|
+
height: calc(100% - 0.95em + var(--ds-size-4, 1rem) + 0.0625em); /* height of container - top + gap */
|
|
163
152
|
border-left: 2px dotted #999;
|
|
164
153
|
z-index: 0;
|
|
165
154
|
}
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
--ob-datenavigator-height: 3rem;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
1
|
.ObDateNavigator-icon {
|
|
6
2
|
display: inline-block;
|
|
7
3
|
|
|
@@ -16,8 +12,10 @@
|
|
|
16
12
|
background-color: hsl(220, 20%, 96%);
|
|
17
13
|
background-color: var(--block-header-color-bg);
|
|
18
14
|
display: flex;
|
|
19
|
-
font-size: 1rem;
|
|
15
|
+
font-size: var(--ds-font-size-3, 1rem);
|
|
20
16
|
outline: none;
|
|
17
|
+
/* Set here rather than on :root so it follows the nearest data-size. */
|
|
18
|
+
--ob-datenavigator-height: var(--ds-size-12, 3rem);
|
|
21
19
|
|
|
22
20
|
&:focus-visible {
|
|
23
21
|
outline: 2px solid var(--brand-dark, #336699);
|
|
@@ -71,12 +69,12 @@
|
|
|
71
69
|
|
|
72
70
|
.ObDateNavigator-today {
|
|
73
71
|
order: 4;
|
|
74
|
-
padding: 0 1rem;
|
|
72
|
+
padding: 0 var(--ds-size-4, 1rem);
|
|
75
73
|
height: var(--ob-datenavigator-height);
|
|
76
74
|
display: flex;
|
|
77
75
|
align-items: center;
|
|
78
76
|
justify-content: center;
|
|
79
|
-
font-size: 0.875rem;
|
|
77
|
+
font-size: var(--ds-font-size-2, 0.875rem);
|
|
80
78
|
color: var(--brand-dark, #336699);
|
|
81
79
|
text-transform: uppercase;
|
|
82
80
|
cursor: pointer;
|
|
@@ -3,6 +3,7 @@ import { createRef } from "react";
|
|
|
3
3
|
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
|
4
4
|
|
|
5
5
|
import { defaultPlugins, defaultViewPlugin } from "./defaultPlugins";
|
|
6
|
+
import type { ImageOutputOptions } from "./encodeImage";
|
|
6
7
|
import { ImageEditor, type ImageEditorRef } from "./ImageEditor";
|
|
7
8
|
import { configureOpenCV } from "./useOpenCV";
|
|
8
9
|
|
|
@@ -89,7 +90,9 @@ function expectColour(actual: Rgb, expected: Rgb, tolerance = 30) {
|
|
|
89
90
|
}
|
|
90
91
|
|
|
91
92
|
/** Renders the editor in a box the size of a phone screen, like the full-screen layer apps use. */
|
|
92
|
-
function renderEditor(
|
|
93
|
+
function renderEditor(
|
|
94
|
+
props: { initialTool?: string; ref?: React.Ref<ImageEditorRef>; output?: ImageOutputOptions } = {},
|
|
95
|
+
) {
|
|
93
96
|
let onConfirm = vi.fn<(blob: Blob) => void>();
|
|
94
97
|
render(
|
|
95
98
|
<div style={{ position: "relative", width: 400, height: 600 }}>
|
|
@@ -99,6 +102,7 @@ function renderEditor(props: { initialTool?: string; ref?: React.Ref<ImageEditor
|
|
|
99
102
|
plugins={defaultPlugins}
|
|
100
103
|
viewPlugin={defaultViewPlugin}
|
|
101
104
|
initialTool={props.initialTool}
|
|
105
|
+
output={props.output}
|
|
102
106
|
onConfirm={onConfirm}
|
|
103
107
|
/>
|
|
104
108
|
</div>,
|
|
@@ -187,11 +191,16 @@ describe("ImageEditor output", () => {
|
|
|
187
191
|
let ref = createRef<ImageEditorRef>();
|
|
188
192
|
renderEditor({ ref });
|
|
189
193
|
|
|
194
|
+
expect(await ref.current!.getResultBlob()).toBeNull();
|
|
195
|
+
|
|
190
196
|
// What the scans app does: fire rotations, then await whenIdle() before saving.
|
|
191
197
|
void ref.current!.executeAction("rotate-ccw");
|
|
192
198
|
void ref.current!.executeAction("rotate-ccw");
|
|
193
199
|
await act(() => ref.current!.whenIdle());
|
|
194
|
-
let
|
|
200
|
+
let blob = (await ref.current!.getResultBlob())!;
|
|
201
|
+
let image = await read(blob);
|
|
202
|
+
|
|
203
|
+
expect(blob.type).toBe("image/jpeg");
|
|
195
204
|
|
|
196
205
|
// Two quarter turns: upside down, same size.
|
|
197
206
|
expect([image.width, image.height]).toEqual([WIDTH, HEIGHT]);
|
|
@@ -218,8 +227,8 @@ describe("ImageEditor output", () => {
|
|
|
218
227
|
let blob = await done(onConfirm);
|
|
219
228
|
let image = await read(blob);
|
|
220
229
|
|
|
221
|
-
//
|
|
222
|
-
expect(blob.type).toBe("image/
|
|
230
|
+
// Encoded once, as the default output type; within a pixel of the quadrant's size.
|
|
231
|
+
expect(blob.type).toBe("image/jpeg");
|
|
223
232
|
expect(Math.abs(image.width - WIDTH / 2)).toBeLessThanOrEqual(2);
|
|
224
233
|
expect(Math.abs(image.height - HEIGHT / 2)).toBeLessThanOrEqual(2);
|
|
225
234
|
for (let [x, y] of [
|
|
@@ -228,10 +237,26 @@ describe("ImageEditor output", () => {
|
|
|
228
237
|
[image.width - 3, image.height - 3],
|
|
229
238
|
[3, image.height - 3],
|
|
230
239
|
]) {
|
|
231
|
-
expectColour(image.pixel(x, y), GREEN
|
|
240
|
+
expectColour(image.pixel(x, y), GREEN);
|
|
232
241
|
}
|
|
233
242
|
});
|
|
234
243
|
|
|
244
|
+
it("hands out the requested output type without a lossy step", async () => {
|
|
245
|
+
let onConfirm = renderEditor({ initialTool: "crop", output: { type: "image/png" } });
|
|
246
|
+
click("Draw rectangle");
|
|
247
|
+
drag(await screen.findByRole("application", { name: "Drag to draw a rectangle to crop to" }), [0.5, 0.5], [1, 0]);
|
|
248
|
+
await waitFor(() => expect(screen.getByRole("button", { name: "Apply crop" })).toBeEnabled());
|
|
249
|
+
click("Apply crop");
|
|
250
|
+
await screen.findByRole("img", { name: "Image to edit" });
|
|
251
|
+
|
|
252
|
+
let blob = await done(onConfirm);
|
|
253
|
+
let image = await read(blob);
|
|
254
|
+
|
|
255
|
+
expect(blob.type).toBe("image/png");
|
|
256
|
+
expectColour(image.pixel(3, 3), GREEN, 0);
|
|
257
|
+
expectColour(image.pixel(image.width - 3, image.height - 3), GREEN, 0);
|
|
258
|
+
});
|
|
259
|
+
|
|
235
260
|
it("returns to the full image when a crop is undone", async () => {
|
|
236
261
|
let onConfirm = renderEditor({ initialTool: "crop" });
|
|
237
262
|
click("Draw rectangle");
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
display: flex;
|
|
13
13
|
align-items: center;
|
|
14
14
|
justify-content: space-between;
|
|
15
|
-
gap: 1rem;
|
|
16
|
-
padding: 0.5rem 1rem;
|
|
15
|
+
gap: var(--ds-size-4, 1rem);
|
|
16
|
+
padding: var(--ds-size-2, 0.5rem) var(--ds-size-4, 1rem);
|
|
17
17
|
background: var(--ds-color-neutral-background-tinted, rgba(0, 0, 0, 0.4));
|
|
18
18
|
border-bottom: 1px solid var(--ds-color-neutral-border-subtle, rgba(255, 255, 255, 0.08));
|
|
19
19
|
}
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
|
|
43
43
|
.image-editor__done {
|
|
44
44
|
position: absolute;
|
|
45
|
-
bottom: 1rem;
|
|
46
|
-
right: 1rem;
|
|
45
|
+
bottom: var(--ds-size-4, 1rem);
|
|
46
|
+
right: var(--ds-size-4, 1rem);
|
|
47
47
|
z-index: 5;
|
|
48
48
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
|
|
49
49
|
}
|
|
@@ -62,27 +62,27 @@
|
|
|
62
62
|
display: flex;
|
|
63
63
|
align-items: center;
|
|
64
64
|
justify-content: space-between;
|
|
65
|
-
padding: 0.75rem 1rem;
|
|
65
|
+
padding: var(--ds-size-3, 0.75rem) var(--ds-size-4, 1rem);
|
|
66
66
|
background: var(--ds-color-neutral-background-tinted, #1a1a1a);
|
|
67
67
|
border-top: 1px solid var(--ds-color-neutral-border-subtle, rgba(255, 255, 255, 0.08));
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
.image-editor__toolbar-group {
|
|
71
71
|
display: flex;
|
|
72
|
-
gap: 0.5rem;
|
|
72
|
+
gap: var(--ds-size-2, 0.5rem);
|
|
73
73
|
align-items: center;
|
|
74
74
|
flex-wrap: wrap;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
.image-editor__topbar-divider {
|
|
78
78
|
width: 1px;
|
|
79
|
-
height: 1.5rem;
|
|
79
|
+
height: var(--ds-size-6, 1.5rem);
|
|
80
80
|
background: var(--ds-color-neutral-border-subtle, rgba(255, 255, 255, 0.15));
|
|
81
81
|
flex-shrink: 0;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
.image-editor__zoom-level {
|
|
85
|
-
font-size: 0.8125rem;
|
|
85
|
+
font-size: var(--ds-font-size-2, 0.8125rem);
|
|
86
86
|
color: var(--ds-color-neutral-text-subtle, rgba(255, 255, 255, 0.6));
|
|
87
87
|
min-width: 3.25ch;
|
|
88
88
|
text-align: center;
|
|
@@ -226,8 +226,8 @@
|
|
|
226
226
|
.crop-loading {
|
|
227
227
|
align-items: center;
|
|
228
228
|
justify-content: center;
|
|
229
|
-
gap: 0.75rem;
|
|
230
|
-
padding: 0.75rem 1rem;
|
|
229
|
+
gap: var(--ds-size-3, 0.75rem);
|
|
230
|
+
padding: var(--ds-size-3, 0.75rem) var(--ds-size-4, 1rem);
|
|
231
231
|
color: var(--ds-color-neutral-text-subtle, rgba(255, 255, 255, 0.7));
|
|
232
232
|
position: absolute;
|
|
233
233
|
inset: auto 0 0 0;
|
|
@@ -41,7 +41,7 @@ function actionPlugin(id: string, label: string, execute?: ActionPlugin["execute
|
|
|
41
41
|
id,
|
|
42
42
|
label,
|
|
43
43
|
Icon,
|
|
44
|
-
execute: vi.fn(execute ?? (async (url: string) => new Blob([`${id}(${url})`]))),
|
|
44
|
+
execute: vi.fn(execute ?? (async (url: string) => new Blob([`${id}(${url})`], { type: "image/png" }))),
|
|
45
45
|
};
|
|
46
46
|
return plugin;
|
|
47
47
|
}
|
|
@@ -184,13 +184,14 @@ describe("ImageEditor", () => {
|
|
|
184
184
|
it("hands the app the edited image", async () => {
|
|
185
185
|
let onConfirm = vi.fn();
|
|
186
186
|
let rotate = actionPlugin("rotate-cw", "Rotate right");
|
|
187
|
-
|
|
187
|
+
// The fakes are not real images, so ask for the intermediate type: nothing to re-encode.
|
|
188
|
+
render(<ImageEditor imageUrl={SOURCE} plugins={[rotate]} onConfirm={onConfirm} output={{ type: "image/png" }} />);
|
|
188
189
|
fireEvent.click(button("Rotate right"));
|
|
189
190
|
await waitFor(() => expect(button("Undo")).toBeEnabled());
|
|
190
191
|
|
|
191
192
|
fireEvent.click(button("Done"));
|
|
192
193
|
|
|
193
|
-
expect(onConfirm).toHaveBeenCalledOnce();
|
|
194
|
+
await waitFor(() => expect(onConfirm).toHaveBeenCalledOnce());
|
|
194
195
|
expect(await (onConfirm.mock.calls[0][0] as Blob).text()).toBe(`rotate-cw(${SOURCE})`);
|
|
195
196
|
});
|
|
196
197
|
|
|
@@ -2,6 +2,7 @@ import { Button, Spinner, Tooltip } from "@digdir/designsystemet-react";
|
|
|
2
2
|
import { ArrowCirclepathIcon, ArrowLeftIcon, ArrowRedoIcon, ArrowUndoIcon, CheckmarkIcon } from "@navikt/aksel-icons";
|
|
3
3
|
import { forwardRef, useImperativeHandle, useMemo, useRef, useState } from "react";
|
|
4
4
|
|
|
5
|
+
import { encodeImage, type ImageOutputOptions } from "./encodeImage.js";
|
|
5
6
|
import "./ImageEditor.css";
|
|
6
7
|
import { ResponsiveButton } from "./ResponsiveButton.js";
|
|
7
8
|
import type { ActionPlugin, ActionRegistry, EditAction, Plugin, ToolPlugin, ViewPlugin } from "./types.js";
|
|
@@ -11,8 +12,17 @@ import { useIsSmall } from "./useIsSmall.js";
|
|
|
11
12
|
import { getLocalizedString } from "../../i18n.js";
|
|
12
13
|
|
|
13
14
|
export type ImageEditorRef = {
|
|
14
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* Returns the current edited blob, or null if no edits have been applied since the last source image.
|
|
17
|
+
* This is the editor's lossless intermediate (PNG): to save the result, use `getResultBlob()`.
|
|
18
|
+
*/
|
|
15
19
|
getCurrentBlob: () => Blob | null;
|
|
20
|
+
/**
|
|
21
|
+
* The edited image encoded once - what the Done button hands to `onConfirm` - or null if nothing has been
|
|
22
|
+
* edited. `options` override the output props for this call. Await `whenIdle()` first when an action may
|
|
23
|
+
* still be running.
|
|
24
|
+
*/
|
|
25
|
+
getResultBlob: (options?: ImageOutputOptions) => Promise<Blob | null>;
|
|
16
26
|
/**
|
|
17
27
|
* Runs a registered action plugin (e.g. `"rotate-cw"`) against the current image.
|
|
18
28
|
* Use this instead of calling `plugin.execute()` directly so external toolbars and
|
|
@@ -41,6 +51,13 @@ interface Props {
|
|
|
41
51
|
* plain image. Cancelling the tool returns to the plain image as usual.
|
|
42
52
|
*/
|
|
43
53
|
initialTool?: string;
|
|
54
|
+
/**
|
|
55
|
+
* How the image is handed out (default JPEG at 0.92, any size). Edits are kept lossless in between and
|
|
56
|
+
* encoded once, here, so repeated rotations or crops do not lose quality step by step. When set, it applies
|
|
57
|
+
* to an unedited image too, which is then re-encoded only when it is too large or of another type; without
|
|
58
|
+
* it an unedited image is handed back exactly as it came.
|
|
59
|
+
*/
|
|
60
|
+
output?: ImageOutputOptions;
|
|
44
61
|
}
|
|
45
62
|
|
|
46
63
|
/**
|
|
@@ -50,7 +67,7 @@ interface Props {
|
|
|
50
67
|
* Supports undo/redo: each applied transformation is recorded with its EditAction list.
|
|
51
68
|
*/
|
|
52
69
|
export const ImageEditor = forwardRef<ImageEditorRef, Props>(function ImageEditor(
|
|
53
|
-
{ imageUrl, onConfirm, onCancel, plugins, viewPlugin, initialTool }: Props,
|
|
70
|
+
{ imageUrl, onConfirm, onCancel, plugins, viewPlugin, initialTool, output }: Props,
|
|
54
71
|
ref,
|
|
55
72
|
) {
|
|
56
73
|
let registry = useMemo(() => buildActionRegistry(plugins), [plugins]);
|
|
@@ -70,6 +87,7 @@ export const ImageEditor = forwardRef<ImageEditorRef, Props>(function ImageEdito
|
|
|
70
87
|
|
|
71
88
|
useImperativeHandle(ref, () => ({
|
|
72
89
|
getCurrentBlob: () => historyRef.current.getCurrentBlob(),
|
|
90
|
+
getResultBlob: (options?: ImageOutputOptions) => getResultBlob(options),
|
|
73
91
|
whenIdle: () => actionQueueRef.current,
|
|
74
92
|
executeAction: (pluginId: string) => {
|
|
75
93
|
let plugin = plugins.find((p): p is ActionPlugin => p.type === "action" && p.id === pluginId);
|
|
@@ -103,15 +121,30 @@ export const ImageEditor = forwardRef<ImageEditorRef, Props>(function ImageEdito
|
|
|
103
121
|
deactivateTool();
|
|
104
122
|
}
|
|
105
123
|
|
|
106
|
-
function
|
|
124
|
+
function outputOptions(options?: ImageOutputOptions): ImageOutputOptions {
|
|
125
|
+
return { ...output, ...options };
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
async function getResultBlob(options?: ImageOutputOptions): Promise<Blob | null> {
|
|
129
|
+
let blob = historyRef.current.getCurrentBlob();
|
|
130
|
+
return blob ? encodeImage(blob, outputOptions(options)) : null;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
async function confirm() {
|
|
107
134
|
if (!onConfirm) return;
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
135
|
+
setBusy(true);
|
|
136
|
+
try {
|
|
137
|
+
let blob = await getResultBlob();
|
|
138
|
+
if (!blob) {
|
|
139
|
+
// Nothing edited: the original as it came, unless the app set an output it must meet.
|
|
140
|
+
let response = await fetch(historyRef.current.getCurrentImageUrl());
|
|
141
|
+
blob = await response.blob();
|
|
142
|
+
if (output) blob = await encodeImage(blob, output);
|
|
143
|
+
}
|
|
144
|
+
onConfirm(blob);
|
|
145
|
+
} finally {
|
|
146
|
+
setBusy(false);
|
|
111
147
|
}
|
|
112
|
-
fetch(history.currentImageUrl)
|
|
113
|
-
.then((r) => r.blob())
|
|
114
|
-
.then(onConfirm);
|
|
115
148
|
}
|
|
116
149
|
|
|
117
150
|
let CanvasWrapper = viewPlugin?.CanvasWrapper;
|
|
@@ -190,7 +223,7 @@ export const ImageEditor = forwardRef<ImageEditorRef, Props>(function ImageEdito
|
|
|
190
223
|
variant="primary"
|
|
191
224
|
icon={isSmall}
|
|
192
225
|
aria-label={isSmall ? getLocalizedString("Done") : undefined}
|
|
193
|
-
onClick={confirm}
|
|
226
|
+
onClick={() => void confirm()}
|
|
194
227
|
disabled={disabled}
|
|
195
228
|
>
|
|
196
229
|
<CheckmarkIcon aria-hidden />
|
|
@@ -273,7 +306,7 @@ function ToolButton({
|
|
|
273
306
|
if (isSmall) {
|
|
274
307
|
return (
|
|
275
308
|
<Tooltip content={label}>
|
|
276
|
-
<Button icon variant="tertiary"
|
|
309
|
+
<Button icon variant="tertiary" aria-label={label} onClick={onActivate} disabled={busy}>
|
|
277
310
|
<Icon />
|
|
278
311
|
</Button>
|
|
279
312
|
</Tooltip>
|
|
@@ -281,7 +314,7 @@ function ToolButton({
|
|
|
281
314
|
}
|
|
282
315
|
|
|
283
316
|
return (
|
|
284
|
-
<Button variant="tertiary"
|
|
317
|
+
<Button variant="tertiary" onClick={onActivate} disabled={busy}>
|
|
285
318
|
<Icon />
|
|
286
319
|
{label}
|
|
287
320
|
</Button>
|
|
@@ -306,7 +339,7 @@ function ActionButton({
|
|
|
306
339
|
if (isSmall) {
|
|
307
340
|
return (
|
|
308
341
|
<Tooltip content={label}>
|
|
309
|
-
<Button icon variant="tertiary"
|
|
342
|
+
<Button icon variant="tertiary" aria-label={label} onClick={onExecute} disabled={busy}>
|
|
310
343
|
{icon}
|
|
311
344
|
</Button>
|
|
312
345
|
</Tooltip>
|
|
@@ -314,7 +347,7 @@ function ActionButton({
|
|
|
314
347
|
}
|
|
315
348
|
|
|
316
349
|
return (
|
|
317
|
-
<Button variant="tertiary"
|
|
350
|
+
<Button variant="tertiary" onClick={onExecute} disabled={busy}>
|
|
318
351
|
{icon}
|
|
319
352
|
{label}
|
|
320
353
|
</Button>
|