@skopon-cool/form-sdk 0.6.5 → 0.6.7
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/AskUserFormCard.d.ts.map +1 -1
- package/dist/components/CurlSubmitBlock.d.ts.map +1 -1
- package/dist/form-sdk.css +1 -1
- package/dist/index.js +209 -215
- package/package.json +1 -1
- package/src/catalog/a2uiCustomCatalog.tsx +2 -2
- package/src/components/AskUserFormCard.tsx +8 -16
- package/src/components/CurlSubmitBlock.tsx +9 -11
- package/src/styles/index.css +69 -0
package/package.json
CHANGED
|
@@ -1146,7 +1146,7 @@ function TextPreview({ context }: { context: ComponentContext }) {
|
|
|
1146
1146
|
if (NON_MARKDOWN_TEXT_VARIANTS.has(variant)) {
|
|
1147
1147
|
if (variant === 'caption') {
|
|
1148
1148
|
return (
|
|
1149
|
-
<Typography.Text type="secondary" className="form-block-preview-paragraph">
|
|
1149
|
+
<Typography.Text type="secondary" className="form-block-preview-paragraph" style={{ whiteSpace: 'pre-wrap' }}>
|
|
1150
1150
|
<em>{text}</em>
|
|
1151
1151
|
</Typography.Text>
|
|
1152
1152
|
)
|
|
@@ -1156,7 +1156,7 @@ function TextPreview({ context }: { context: ComponentContext }) {
|
|
|
1156
1156
|
}
|
|
1157
1157
|
|
|
1158
1158
|
return (
|
|
1159
|
-
<Typography.Paragraph className="form-block-preview-paragraph">{text}</Typography.Paragraph>
|
|
1159
|
+
<Typography.Paragraph className="form-block-preview-paragraph" style={{ whiteSpace: 'pre-wrap' }}>{text}</Typography.Paragraph>
|
|
1160
1160
|
)
|
|
1161
1161
|
}
|
|
1162
1162
|
|
|
@@ -525,23 +525,15 @@ function AskUserFormCardBody({
|
|
|
525
525
|
/>
|
|
526
526
|
|
|
527
527
|
<div className="ask-user-form-actions">
|
|
528
|
-
<
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
}
|
|
528
|
+
<Button
|
|
529
|
+
type="primary"
|
|
530
|
+
size="small"
|
|
531
|
+
loading={submitting}
|
|
532
|
+
disabled={submitting || uploading}
|
|
533
|
+
onClick={() => void handleSubmit()}
|
|
534
534
|
>
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
size="small"
|
|
538
|
-
loading={submitting}
|
|
539
|
-
disabled={submitting || uploading}
|
|
540
|
-
onClick={() => void handleSubmit()}
|
|
541
|
-
>
|
|
542
|
-
提交
|
|
543
|
-
</Button>
|
|
544
|
-
</Tooltip>
|
|
535
|
+
提交
|
|
536
|
+
</Button>
|
|
545
537
|
</div>
|
|
546
538
|
</div>
|
|
547
539
|
)
|
|
@@ -119,17 +119,15 @@ export default function CurlSubmitBlock({
|
|
|
119
119
|
</Tooltip>
|
|
120
120
|
) : null}
|
|
121
121
|
</div>
|
|
122
|
-
<
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
</Button>
|
|
132
|
-
</Tooltip>
|
|
122
|
+
<Button
|
|
123
|
+
size="small"
|
|
124
|
+
type="text"
|
|
125
|
+
loading={submitting}
|
|
126
|
+
disabled={submitting}
|
|
127
|
+
onClick={() => void handleSubmit()}
|
|
128
|
+
>
|
|
129
|
+
提交
|
|
130
|
+
</Button>
|
|
133
131
|
</div>
|
|
134
132
|
<pre className="skopon-form-curl-json">{displayCurl}</pre>
|
|
135
133
|
</div>
|
package/src/styles/index.css
CHANGED
|
@@ -825,10 +825,79 @@
|
|
|
825
825
|
.skopon-file-source-actions {
|
|
826
826
|
display: flex;
|
|
827
827
|
flex-wrap: wrap;
|
|
828
|
+
align-items: center;
|
|
828
829
|
gap: 8px;
|
|
829
830
|
margin: 8px 0;
|
|
830
831
|
}
|
|
831
832
|
|
|
833
|
+
.skopon-file-source-actions > .ant-upload-wrapper,
|
|
834
|
+
.skopon-file-source-actions > .ant-upload-wrapper > .ant-upload,
|
|
835
|
+
.skopon-card-form .skopon-file-source-actions > .ant-upload-wrapper,
|
|
836
|
+
.skopon-card-form .skopon-file-source-actions > .ant-upload-wrapper > .ant-upload {
|
|
837
|
+
display: inline-flex;
|
|
838
|
+
width: auto;
|
|
839
|
+
flex: 0 0 auto;
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
/* Keep the three form actions consistent across hosts with different CSS resets. */
|
|
843
|
+
.skopon-resume-select-actions .ant-btn,
|
|
844
|
+
.skopon-file-source-actions .ant-btn,
|
|
845
|
+
.skopon-card-form .skopon-resume-select-actions .ant-btn,
|
|
846
|
+
.skopon-card-form .skopon-file-source-actions .ant-btn {
|
|
847
|
+
box-sizing: border-box;
|
|
848
|
+
display: inline-flex;
|
|
849
|
+
min-width: 0;
|
|
850
|
+
min-height: 32px;
|
|
851
|
+
height: 32px;
|
|
852
|
+
align-items: center;
|
|
853
|
+
justify-content: center;
|
|
854
|
+
gap: 6px;
|
|
855
|
+
padding: 0 13px;
|
|
856
|
+
border: 1px solid var(--color-border-strong, #cbd5d1);
|
|
857
|
+
border-radius: var(--radius-button, 9999px);
|
|
858
|
+
background: var(--color-surface, #fff);
|
|
859
|
+
color: var(--color-primary, #208368);
|
|
860
|
+
font-family: var(--font-sans, sans-serif);
|
|
861
|
+
font-size: 13px;
|
|
862
|
+
font-weight: var(--font-weight-medium, 500);
|
|
863
|
+
line-height: 18px;
|
|
864
|
+
box-shadow: none !important;
|
|
865
|
+
filter: none !important;
|
|
866
|
+
white-space: nowrap;
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
.skopon-resume-select-actions .ant-btn:hover:not(:disabled),
|
|
870
|
+
.skopon-file-source-actions .ant-btn:hover:not(:disabled),
|
|
871
|
+
.skopon-card-form .skopon-resume-select-actions .ant-btn:hover:not(:disabled),
|
|
872
|
+
.skopon-card-form .skopon-file-source-actions .ant-btn:hover:not(:disabled) {
|
|
873
|
+
border-color: var(--color-primary, #208368);
|
|
874
|
+
background: var(--color-primary-subtle, #e6f7ed);
|
|
875
|
+
color: var(--color-primary, #208368);
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
.skopon-resume-select-actions .ant-btn:focus:not(:focus-visible),
|
|
879
|
+
.skopon-file-source-actions .ant-btn:focus:not(:focus-visible),
|
|
880
|
+
.skopon-card-form .skopon-resume-select-actions .ant-btn:focus:not(:focus-visible),
|
|
881
|
+
.skopon-card-form .skopon-file-source-actions .ant-btn:focus:not(:focus-visible) {
|
|
882
|
+
outline: none;
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
.skopon-resume-select-actions .ant-btn:focus-visible,
|
|
886
|
+
.skopon-file-source-actions .ant-btn:focus-visible,
|
|
887
|
+
.skopon-card-form .skopon-resume-select-actions .ant-btn:focus-visible,
|
|
888
|
+
.skopon-card-form .skopon-file-source-actions .ant-btn:focus-visible {
|
|
889
|
+
outline: 2px solid var(--color-focus-ring, color-mix(in srgb, var(--color-primary, #208368) 35%, transparent));
|
|
890
|
+
outline-offset: 2px;
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
.skopon-resume-select-actions .ant-btn::before,
|
|
894
|
+
.skopon-file-source-actions .ant-btn::before,
|
|
895
|
+
.skopon-card-form .skopon-resume-select-actions .ant-btn::before,
|
|
896
|
+
.skopon-card-form .skopon-file-source-actions .ant-btn::before {
|
|
897
|
+
box-shadow: none !important;
|
|
898
|
+
filter: none !important;
|
|
899
|
+
}
|
|
900
|
+
|
|
832
901
|
.skopon-asset-picker {
|
|
833
902
|
display: grid;
|
|
834
903
|
grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
|