@ostack.tech/ui-kform 1.2.0-beta.0 → 1.2.0-beta.1
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/chunks/{en-D4xMcf6Q.js → en-BHlLXSzh.js} +4 -16
- package/dist/chunks/en-BHlLXSzh.js.map +1 -0
- package/dist/locales/en-GB.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/fr-FR.js +5 -17
- package/dist/locales/fr-FR.js.map +1 -1
- package/dist/locales/pt-PT.js +3 -15
- package/dist/locales/pt-PT.js.map +1 -1
- package/dist/ostack-ui-kform.js +15299 -4434
- package/dist/ostack-ui-kform.js.map +1 -1
- package/package.json +16 -14
- package/scss/components/Annexes/_Annexes-variables.scss +4 -9
- package/scss/components/Annexes/_Annexes.scss +9 -15
- package/scss/components/FormApp/_FormApp.scss +1 -4
- package/scss/components/FormPages/_FormPages-variables.scss +8 -27
- package/scss/components/FormPages/_FormPages.scss +11 -33
- package/scss/components/IssuesPanel/_IssuesPanel-variables.scss +3 -8
- package/scss/components/IssuesPanel/_IssuesPanel.scss +3 -8
- package/types/components/Annexes/Annex.d.ts +26 -37
- package/types/components/Annexes/Annexes.d.ts +8 -10
- package/types/components/Annexes/AnnexesContext.d.ts +1 -1
- package/types/components/Annexes/AnnexesManager.d.ts +8 -12
- package/types/components/CheckboxControl/CheckboxControl.d.ts +9 -19
- package/types/components/CheckboxGroupControl/CheckboxGroupControl.d.ts +14 -31
- package/types/components/CheckboxGroupControl/CheckboxGroupControlItem.d.ts +1 -2
- package/types/components/ControlField/ControlField.d.ts +6 -6
- package/types/components/DateControl/DateControl.d.ts +13 -18
- package/types/components/DateRangeControl/DateRangeControl.d.ts +16 -22
- package/types/components/DebugInfo/DebugInfo.d.ts +3 -4
- package/types/components/DebugInfo/DebugInfoControlAddonTrigger.d.ts +1 -1
- package/types/components/FileControl/FileControl.d.ts +16 -22
- package/types/components/FileControl/FileControlDownloadAddon.d.ts +2 -2
- package/types/components/FileControl/FileControlViewAddon.d.ts +1 -1
- package/types/components/FormApp/FormApp.d.ts +25 -34
- package/types/components/FormApp/FormAppContext.d.ts +20 -44
- package/types/components/FormApp/FormAppIssueMessages.d.ts +6 -8
- package/types/components/FormApp/FormAppStatus.d.ts +1 -1
- package/types/components/FormPages/FormPage.d.ts +12 -20
- package/types/components/FormPages/FormPages.d.ts +8 -17
- package/types/components/FormPages/FormPagesContext.d.ts +1 -1
- package/types/components/FormPages/FormPagesNavigation.d.ts +3 -3
- package/types/components/FormStepper/FormStep.d.ts +8 -9
- package/types/components/FormStepper/FormStepper.d.ts +14 -18
- package/types/components/FormStepper/FormStepperContext.d.ts +1 -1
- package/types/components/IssueMessage/IssueMessage.d.ts +1 -1
- package/types/components/IssueMessages/IssueMessages.d.ts +17 -25
- package/types/components/IssuesPanel/IssuesPanel.d.ts +11 -15
- package/types/components/IssuesPanel/IssuesPanelControls.d.ts +1 -1
- package/types/components/IssuesPopover/IssuesPopover.d.ts +4 -4
- package/types/components/LoadAction/LoadAction.d.ts +7 -10
- package/types/components/NumericControl/NumericControl.d.ts +15 -21
- package/types/components/PathLink/PathLink.d.ts +4 -5
- package/types/components/PrintAction/PrintAction.d.ts +7 -11
- package/types/components/RadioGroupControl/RadioGroupControl.d.ts +12 -21
- package/types/components/RadioGroupControl/RadioGroupControlItem.d.ts +2 -2
- package/types/components/ResetOnChange/ResetOnChange.d.ts +6 -14
- package/types/components/ResetOnChange/index.d.ts +1 -1
- package/types/components/ResetOnChange/useResetOnChange.d.ts +22 -32
- package/types/components/SaveAction/SaveAction.d.ts +22 -30
- package/types/components/SelectControl/SelectControl.d.ts +11 -21
- package/types/components/SelectControl/SelectControlItem.d.ts +2 -2
- package/types/components/SelectControl/SelectControlItemGroup.d.ts +2 -3
- package/types/components/SelectMultipleControl/SelectMultipleControl.d.ts +17 -35
- package/types/components/SelectMultipleControl/SelectMultipleControlItem.d.ts +1 -2
- package/types/components/SelectMultipleControl/SelectMultipleControlItemGroup.d.ts +2 -2
- package/types/components/SubmitAction/SubmitAction.d.ts +19 -33
- package/types/components/TableControl/TableControl.d.ts +27 -41
- package/types/components/TableControl/TableControlActionsColumn.d.ts +3 -5
- package/types/components/TableControl/TableControlAddRowTrigger.d.ts +7 -13
- package/types/components/TableControl/TableControlApi.d.ts +4 -4
- package/types/components/TableControl/TableControlColumn.d.ts +5 -8
- package/types/components/TableControl/TableControlColumnFns.d.ts +21 -31
- package/types/components/TableControl/TableControlColumnGroup.d.ts +3 -6
- package/types/components/TableControl/TableControlColumns.d.ts +4 -4
- package/types/components/TableControl/TableControlContent.d.ts +1 -1
- package/types/components/TableControl/TableControlIndexColumn.d.ts +2 -2
- package/types/components/TableControl/TableControlRemoveRowTrigger.d.ts +9 -16
- package/types/components/TextControl/TextControl.d.ts +7 -13
- package/types/components/UnknownValue/UnknownValue.d.ts +1 -1
- package/types/components/ValidateAction/ValidateAction.d.ts +7 -10
- package/types/providers/ActivePathProvider/ActivePathProvider.d.ts +4 -7
- package/types/providers/LocalizationProvider/LocalizationProvider.d.ts +1 -4
- package/types/providers/LocalizationProvider/useLocale.d.ts +1 -4
- package/types/providers/PrefixSuffixProvider/PrefixSuffixProvider.d.ts +1 -1
- package/types/providers/PrefixSuffixProvider/defaultPrefixSuffix.d.ts +3 -3
- package/types/providers/PrefixSuffixProvider/usePrefix.d.ts +1 -4
- package/types/utils/mostSpecificPath.d.ts +4 -6
- package/types/utils/pathSpecificity.d.ts +7 -8
- package/types/utils/selectionTransformations.d.ts +2 -8
- package/types/utils/useControlAutofocus.d.ts +6 -8
- package/types/utils/useControlIssues.d.ts +4 -4
- package/types/utils/useFormLoader.d.ts +24 -31
- package/types/utils/useFormSaver.d.ts +29 -34
- package/types/utils/useFormValidator.d.ts +13 -20
- package/types/utils/useRegisterControl.d.ts +1 -1
- package/types/utils/useTemporalStringTransformer.d.ts +4 -10
- package/dist/chunks/en-D4xMcf6Q.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ostack.tech/ui-kform",
|
|
3
|
+
"version": "1.2.0-beta.1",
|
|
3
4
|
"description": "Integration of ostack/UI with ostack/KForm.",
|
|
4
|
-
"version": "1.2.0-beta.0",
|
|
5
5
|
"homepage": "https://ui.ostack.tech/",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Opensoft",
|
|
@@ -12,15 +12,22 @@
|
|
|
12
12
|
"url": "git+https://bitbucket.org/opensoftgitrepo/ostack-ui.git",
|
|
13
13
|
"directory": "packages/ui-kform/"
|
|
14
14
|
},
|
|
15
|
+
"style": "dist/ostack-ui-kform.css",
|
|
16
|
+
"files": [
|
|
17
|
+
"dist/",
|
|
18
|
+
"scss/",
|
|
19
|
+
"types/"
|
|
20
|
+
],
|
|
15
21
|
"type": "module",
|
|
22
|
+
"sideEffects": false,
|
|
16
23
|
"main": "dist/ostack-ui-kform.js",
|
|
17
24
|
"types": "types/index.d.ts",
|
|
18
|
-
"sass": "scss/index.scss",
|
|
19
|
-
"style": "dist/ostack-ui-kform.css",
|
|
20
25
|
"exports": {
|
|
21
26
|
".": {
|
|
22
27
|
"types": "./types/index.d.ts",
|
|
23
|
-
"import": "./dist/ostack-ui-kform.js"
|
|
28
|
+
"import": "./dist/ostack-ui-kform.js",
|
|
29
|
+
"style": "./dist/ostack-ui-kform.css",
|
|
30
|
+
"sass": "./scss/index.scss"
|
|
24
31
|
},
|
|
25
32
|
"./locales": {
|
|
26
33
|
"types": "./types/locales/index.d.ts",
|
|
@@ -35,15 +42,10 @@
|
|
|
35
42
|
"./scss/*": "./scss/*",
|
|
36
43
|
"./package.json": "./package.json"
|
|
37
44
|
},
|
|
38
|
-
"sideEffects": false,
|
|
39
|
-
"files": [
|
|
40
|
-
"dist/",
|
|
41
|
-
"scss/",
|
|
42
|
-
"types/"
|
|
43
|
-
],
|
|
44
45
|
"scripts": {
|
|
45
46
|
"build": "tsc -b && vite build && npm run copy:scss",
|
|
46
|
-
"copy:scss": "cpy 'src/**/*.scss' '!src/**/*.stories.scss' scss/"
|
|
47
|
+
"copy:scss": "cpy 'src/**/*.scss' '!src/**/*.stories.scss' scss/",
|
|
48
|
+
"test": "vitest --run"
|
|
47
49
|
},
|
|
48
50
|
"dependencies": {
|
|
49
51
|
"browser-fs-access": "^0.38.0",
|
|
@@ -53,9 +55,9 @@
|
|
|
53
55
|
"@fortawesome/fontawesome-svg-core": "^6.2.0 || ^7.0.0",
|
|
54
56
|
"@fortawesome/free-regular-svg-icons": "^6.2.0 || ^7.0.0",
|
|
55
57
|
"@fortawesome/free-solid-svg-icons": "^6.2.0 || ^7.0.0",
|
|
56
|
-
"@ostack.tech/kform": "^1.1.0",
|
|
57
|
-
"@ostack.tech/kform-react": "^1.1.0",
|
|
58
|
-
"@ostack.tech/ui": "~1.2.0-beta.
|
|
58
|
+
"@ostack.tech/kform": "^1.1.0 || ^1.2.0-0",
|
|
59
|
+
"@ostack.tech/kform-react": "^1.1.0 || ^1.2.0-0",
|
|
60
|
+
"@ostack.tech/ui": "~1.2.0-beta.1",
|
|
59
61
|
"@types/react": "^19.0.0",
|
|
60
62
|
"@types/react-dom": "^19.0.0",
|
|
61
63
|
"date-fns": "^4.1.0",
|
|
@@ -6,18 +6,13 @@ $annexes-manager-min-width: 200px !default;
|
|
|
6
6
|
// Menu trigger
|
|
7
7
|
$annexes-menu-trigger-height: 44px !default;
|
|
8
8
|
$annexes-menu-trigger-open-z-index: calc(
|
|
9
|
-
var(--#{o-ui.$prefix}layer-z-index, 0) +
|
|
10
|
-
var(--#{o-ui.$prefix}z-index-dropdown) + 1
|
|
9
|
+
var(--#{o-ui.$prefix}layer-z-index, 0) + var(--#{o-ui.$prefix}z-index-dropdown) + 1
|
|
11
10
|
) !default;
|
|
12
11
|
|
|
13
12
|
// Tab issues
|
|
14
13
|
$annexes-tab-issues-popover-button-icon-border-width: 1px !default;
|
|
15
14
|
$annexes-tab-issues-popover-button-padding: calc(
|
|
16
|
-
(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
$annexes-tab-issues-popover-button-icon-border-width * 2
|
|
20
|
-
) /
|
|
21
|
-
2
|
|
22
|
-
)
|
|
15
|
+
((o-ui.$icon-button-md-min-size - o-ui.$icon-button-md-font-size -
|
|
16
|
+
$annexes-tab-issues-popover-button-icon-border-width * 2) /
|
|
17
|
+
2)
|
|
23
18
|
);
|
|
@@ -94,8 +94,8 @@
|
|
|
94
94
|
left: calc((o-ui.$menu-padding-x + o-ui.$menu-item-margin-x) * -1);
|
|
95
95
|
height: 100%;
|
|
96
96
|
width: 3px;
|
|
97
|
-
border-radius: 0 var(--#{o-ui.$prefix}border-radius-sm)
|
|
98
|
-
|
|
97
|
+
border-radius: 0 var(--#{o-ui.$prefix}border-radius-sm) var(--#{o-ui.$prefix}border-radius-sm)
|
|
98
|
+
0;
|
|
99
99
|
background-color: var(--#{o-ui.$prefix}accent-9);
|
|
100
100
|
}
|
|
101
101
|
}
|
|
@@ -197,8 +197,7 @@
|
|
|
197
197
|
// Tab issues
|
|
198
198
|
&__tab[data-has-issues] &__tab-inner {
|
|
199
199
|
padding-right: calc(
|
|
200
|
-
o-ui.$tabs-tab-inner-annexes-padding-x * 2 +
|
|
201
|
-
o-ui.$icon-button-md-font-size +
|
|
200
|
+
o-ui.$tabs-tab-inner-annexes-padding-x * 2 + o-ui.$icon-button-md-font-size +
|
|
202
201
|
$annexes-tab-issues-popover-button-padding
|
|
203
202
|
);
|
|
204
203
|
}
|
|
@@ -206,21 +205,18 @@
|
|
|
206
205
|
&__tab-issues-popover-button-container {
|
|
207
206
|
z-index: calc(o-ui.$tabs-tab-focus-z-index + 1);
|
|
208
207
|
margin-left: calc(
|
|
209
|
-
o-ui.$icon-button-md-min-size *
|
|
210
|
-
-1 - var(--#{o-ui.$prefix}tabs-tab-list-gap-x) -
|
|
208
|
+
o-ui.$icon-button-md-min-size * -1 - var(--#{o-ui.$prefix}tabs-tab-list-gap-x) -
|
|
211
209
|
$annexes-tab-issues-popover-button-padding / 2
|
|
212
210
|
);
|
|
213
211
|
padding-right: calc(
|
|
214
|
-
var(--#{o-ui.$prefix}tabs-tab-list-gap-x) +
|
|
215
|
-
$annexes-tab-issues-popover-button-padding / 2
|
|
212
|
+
var(--#{o-ui.$prefix}tabs-tab-list-gap-x) + $annexes-tab-issues-popover-button-padding / 2
|
|
216
213
|
);
|
|
217
214
|
}
|
|
218
215
|
|
|
219
216
|
&__tab-issues-popover-button .#{o-ui.$prefix}icon {
|
|
220
217
|
// Border around the icon
|
|
221
218
|
filter: drop-shadow(
|
|
222
|
-
/* Top */ 0
|
|
223
|
-
calc($annexes-tab-issues-popover-button-icon-border-width * -1) 0
|
|
219
|
+
/* Top */ 0 calc($annexes-tab-issues-popover-button-icon-border-width * -1) 0
|
|
224
220
|
var(--#{o-ui.$prefix}background-color)
|
|
225
221
|
)
|
|
226
222
|
drop-shadow(
|
|
@@ -232,8 +228,7 @@
|
|
|
232
228
|
var(--#{o-ui.$prefix}background-color)
|
|
233
229
|
)
|
|
234
230
|
drop-shadow(
|
|
235
|
-
/* Left */
|
|
236
|
-
calc($annexes-tab-issues-popover-button-icon-border-width * -1) 0 0
|
|
231
|
+
/* Left */ calc($annexes-tab-issues-popover-button-icon-border-width * -1) 0 0
|
|
237
232
|
var(--#{o-ui.$prefix}background-color)
|
|
238
233
|
);
|
|
239
234
|
}
|
|
@@ -244,9 +239,8 @@
|
|
|
244
239
|
|
|
245
240
|
&__annex {
|
|
246
241
|
min-height: calc(
|
|
247
|
-
var(--#{$prefix}form-app-min-height) - var(
|
|
248
|
-
|
|
249
|
-
) - var(--#{$prefix}bottom-panel-height)
|
|
242
|
+
var(--#{$prefix}form-app-min-height) - var(--#{$prefix}top-bar-height) -
|
|
243
|
+
var(--#{$prefix}bottom-panel-height)
|
|
250
244
|
);
|
|
251
245
|
}
|
|
252
246
|
|
|
@@ -10,10 +10,7 @@
|
|
|
10
10
|
background-color: $form-app-background-color;
|
|
11
11
|
|
|
12
12
|
// Base `top` value for top-sticky elements
|
|
13
|
-
@include o-ui.declare-var(
|
|
14
|
-
--#{$prefix}form-app-base-sticky-top,
|
|
15
|
-
$form-app-base-sticky-top
|
|
16
|
-
);
|
|
13
|
+
@include o-ui.declare-var(--#{$prefix}form-app-base-sticky-top, $form-app-base-sticky-top);
|
|
17
14
|
|
|
18
15
|
@include o-ui.responsive-values(
|
|
19
16
|
--#{$prefix}form-app,
|
|
@@ -14,39 +14,20 @@ $form-pages-sidebar-item-code-margin-x: o-ui.spacing(2) !default;
|
|
|
14
14
|
$form-pages-sidebar-item-code-padding: o-ui.spacing(0.5) !default;
|
|
15
15
|
$form-pages-sidebar-item-code-padding: o-ui.spacing(0.5) !default;
|
|
16
16
|
$form-pages-sidebar-item-code-border-radius: o-ui.$control-code-border-radius !default;
|
|
17
|
-
$form-pages-sidebar-item-code-font-size: var(
|
|
18
|
-
|
|
19
|
-
) !default;
|
|
20
|
-
$form-pages-sidebar-item-code-line-height: var(
|
|
21
|
-
--#{o-ui.$prefix}line-height-xs
|
|
22
|
-
) !default;
|
|
17
|
+
$form-pages-sidebar-item-code-font-size: var(--#{o-ui.$prefix}font-size-xs) !default;
|
|
18
|
+
$form-pages-sidebar-item-code-line-height: var(--#{o-ui.$prefix}line-height-xs) !default;
|
|
23
19
|
$form-pages-sidebar-item-code-font-weight: o-ui.$font-weight-bold !default;
|
|
24
|
-
$form-pages-sidebar-item-code-background-color: var(
|
|
25
|
-
--#{o-ui.$prefix}primary-2
|
|
26
|
-
) !default;
|
|
20
|
+
$form-pages-sidebar-item-code-background-color: var(--#{o-ui.$prefix}primary-2) !default;
|
|
27
21
|
$form-pages-sidebar-item-code-color: var(--#{o-ui.$prefix}primary-9) !default;
|
|
28
22
|
|
|
29
23
|
// Sidebar item code - Selected
|
|
30
|
-
$form-pages-sidebar-item-code-selected-background-color: rgba(
|
|
31
|
-
|
|
32
|
-
255,
|
|
33
|
-
255,
|
|
34
|
-
0.25
|
|
35
|
-
) !default;
|
|
36
|
-
$form-pages-sidebar-item-code-selected-color: var(
|
|
37
|
-
--#{o-ui.$prefix}primary-contrast
|
|
38
|
-
) !default;
|
|
24
|
+
$form-pages-sidebar-item-code-selected-background-color: rgba(255, 255, 255, 0.25) !default;
|
|
25
|
+
$form-pages-sidebar-item-code-selected-color: var(--#{o-ui.$prefix}primary-contrast) !default;
|
|
39
26
|
|
|
40
27
|
// Sidebar item code - Status
|
|
41
|
-
$form-pages-sidebar-item-code-status-background-color: var(
|
|
42
|
-
|
|
43
|
-
) !default;
|
|
44
|
-
$form-pages-sidebar-item-code-status-color: var(
|
|
45
|
-
--#{o-ui.$prefix}accent-contrast
|
|
46
|
-
) !default;
|
|
28
|
+
$form-pages-sidebar-item-code-status-background-color: var(--#{o-ui.$prefix}accent-9) !default;
|
|
29
|
+
$form-pages-sidebar-item-code-status-color: var(--#{o-ui.$prefix}accent-contrast) !default;
|
|
47
30
|
|
|
48
31
|
// Select
|
|
49
32
|
$form-pages-select-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) !default;
|
|
50
|
-
$form-pages-select-menu-background-color: var(
|
|
51
|
-
--#{o-ui.$prefix}primary-2
|
|
52
|
-
) !default;
|
|
33
|
+
$form-pages-select-menu-background-color: var(--#{o-ui.$prefix}primary-2) !default;
|
|
@@ -17,15 +17,12 @@
|
|
|
17
17
|
&__navigation[data-navigation-mode="sidebar"] {
|
|
18
18
|
flex-shrink: 0;
|
|
19
19
|
width: $form-pages-sidebar-width;
|
|
20
|
-
min-height: calc(
|
|
21
|
-
var(--#{$prefix}form-app-min-height) - var(--#{$prefix}top-bar-height)
|
|
22
|
-
);
|
|
20
|
+
min-height: calc(var(--#{$prefix}form-app-min-height) - var(--#{$prefix}top-bar-height));
|
|
23
21
|
margin-bottom: calc(var(--#{$prefix}bottom-panel-height) * -1);
|
|
24
22
|
border-radius: $form-pages-sidebar-border-radius;
|
|
25
23
|
|
|
26
24
|
background-color: $form-pages-sidebar-background-color;
|
|
27
|
-
border-right: $form-pages-sidebar-border-width solid
|
|
28
|
-
$form-pages-sidebar-border-color;
|
|
25
|
+
border-right: $form-pages-sidebar-border-width solid $form-pages-sidebar-border-color;
|
|
29
26
|
|
|
30
27
|
@include o-ui.media-breakpoint-up(xl) {
|
|
31
28
|
width: $form-pages-sidebar-width-xl;
|
|
@@ -34,10 +31,7 @@
|
|
|
34
31
|
|
|
35
32
|
&__sidebar {
|
|
36
33
|
position: sticky;
|
|
37
|
-
top: calc(
|
|
38
|
-
var(--#{$prefix}form-app-base-sticky-top, 0px) +
|
|
39
|
-
var(--#{$prefix}top-bar-height)
|
|
40
|
-
);
|
|
34
|
+
top: calc(var(--#{$prefix}form-app-base-sticky-top, 0px) + var(--#{$prefix}top-bar-height));
|
|
41
35
|
|
|
42
36
|
max-height: calc(100dvh - var(--#{$prefix}top-bar-height));
|
|
43
37
|
overflow: auto;
|
|
@@ -86,10 +80,7 @@
|
|
|
86
80
|
|
|
87
81
|
&__navigation[data-navigation-mode="select"] {
|
|
88
82
|
position: sticky;
|
|
89
|
-
top: calc(
|
|
90
|
-
var(--#{$prefix}form-app-base-sticky-top, 0px) +
|
|
91
|
-
var(--#{$prefix}top-bar-height)
|
|
92
|
-
);
|
|
83
|
+
top: calc(var(--#{$prefix}form-app-base-sticky-top, 0px) + var(--#{$prefix}top-bar-height));
|
|
93
84
|
box-shadow: $form-pages-select-box-shadow;
|
|
94
85
|
}
|
|
95
86
|
|
|
@@ -172,11 +163,8 @@
|
|
|
172
163
|
flex: 1;
|
|
173
164
|
min-width: 0;
|
|
174
165
|
min-height: calc(
|
|
175
|
-
var(--#{$prefix}form-app-min-height) - var(
|
|
176
|
-
|
|
177
|
-
) - var(--#{$prefix}form-pages-navigation-select-height) - var(
|
|
178
|
-
--#{$prefix}bottom-panel-height
|
|
179
|
-
)
|
|
166
|
+
var(--#{$prefix}form-app-min-height) - var(--#{$prefix}top-bar-height) -
|
|
167
|
+
var(--#{$prefix}form-pages-navigation-select-height) - var(--#{$prefix}bottom-panel-height)
|
|
180
168
|
);
|
|
181
169
|
background-color: var(--#{o-ui.$prefix}background-color);
|
|
182
170
|
|
|
@@ -187,10 +175,7 @@
|
|
|
187
175
|
|
|
188
176
|
&__page-header {
|
|
189
177
|
position: sticky;
|
|
190
|
-
top: calc(
|
|
191
|
-
var(--#{$prefix}form-app-base-sticky-top, 0px) +
|
|
192
|
-
var(--#{$prefix}top-bar-height)
|
|
193
|
-
);
|
|
178
|
+
top: calc(var(--#{$prefix}form-app-base-sticky-top, 0px) + var(--#{$prefix}top-bar-height));
|
|
194
179
|
|
|
195
180
|
display: flex;
|
|
196
181
|
align-items: center;
|
|
@@ -220,8 +205,7 @@
|
|
|
220
205
|
|
|
221
206
|
& > #{$form-pages}__page-content {
|
|
222
207
|
top: calc(
|
|
223
|
-
var(--#{$prefix}top-bar-height) +
|
|
224
|
-
var(--#{$prefix}form-pages-navigation-select-height)
|
|
208
|
+
var(--#{$prefix}top-bar-height) + var(--#{$prefix}form-pages-navigation-select-height)
|
|
225
209
|
);
|
|
226
210
|
}
|
|
227
211
|
}
|
|
@@ -282,22 +266,16 @@
|
|
|
282
266
|
}
|
|
283
267
|
|
|
284
268
|
&__page-helper-popover {
|
|
285
|
-
max-width: min(
|
|
286
|
-
#{o-ui.$container-md-max-width},
|
|
287
|
-
var(--radix-popover-content-available-width)
|
|
288
|
-
);
|
|
269
|
+
max-width: min(#{o-ui.$container-md-max-width}, var(--radix-popover-content-available-width));
|
|
289
270
|
max-height: min(600px, var(--radix-popover-content-available-height));
|
|
290
|
-
padding: o-ui.$label-helper-popover-padding-y
|
|
291
|
-
o-ui.$label-helper-popover-padding-x;
|
|
271
|
+
padding: o-ui.$label-helper-popover-padding-y o-ui.$label-helper-popover-padding-x;
|
|
292
272
|
}
|
|
293
273
|
|
|
294
274
|
&__page-content {
|
|
295
275
|
padding: o-ui.spacing(4);
|
|
296
276
|
|
|
297
277
|
@include o-ui.media-breakpoint-up(sm) {
|
|
298
|
-
padding-bottom: calc(
|
|
299
|
-
var(--#{$prefix}bottom-panel-height, 0px) + o-ui.spacing(4)
|
|
300
|
-
);
|
|
278
|
+
padding-bottom: calc(var(--#{$prefix}bottom-panel-height, 0px) + o-ui.spacing(4));
|
|
301
279
|
margin-bottom: calc(var(--#{$prefix}bottom-panel-height) * -1);
|
|
302
280
|
}
|
|
303
281
|
}
|
|
@@ -4,8 +4,7 @@ $issues-panel-margin-x: o-ui.spacing(4) !default;
|
|
|
4
4
|
$issues-panel-padding-y: o-ui.spacing(3) !default;
|
|
5
5
|
$issues-panel-padding-x: o-ui.spacing(4) !default;
|
|
6
6
|
|
|
7
|
-
$issues-panel-border-radius: o-ui.$card-border-radius o-ui.$card-border-radius 0
|
|
8
|
-
0 !default;
|
|
7
|
+
$issues-panel-border-radius: o-ui.$card-border-radius o-ui.$card-border-radius 0 0 !default;
|
|
9
8
|
$issues-panel-border-width: 1px 1px 0 1px !default;
|
|
10
9
|
$issues-panel-stuck-border-radius: null !default;
|
|
11
10
|
$issues-panel-stuck-border-width: null !default;
|
|
@@ -57,12 +56,8 @@ $issues-panel-messages-max-height: 260px !default;
|
|
|
57
56
|
|
|
58
57
|
// Issues panel issues list title
|
|
59
58
|
$issues-panel-issues-list-title-margin-bottom: o-ui.spacing(2) !default;
|
|
60
|
-
$issues-panel-issues-list-title-font-size: var(
|
|
61
|
-
|
|
62
|
-
) !default;
|
|
63
|
-
$issues-panel-issues-list-title-line-height: var(
|
|
64
|
-
--#{o-ui.$prefix}line-height-sm
|
|
65
|
-
) !default;
|
|
59
|
+
$issues-panel-issues-list-title-font-size: var(--#{o-ui.$prefix}font-size-sm) !default;
|
|
60
|
+
$issues-panel-issues-list-title-line-height: var(--#{o-ui.$prefix}line-height-sm) !default;
|
|
66
61
|
|
|
67
62
|
// Issues panel issues list
|
|
68
63
|
$issues-panel-issues-list-margin-bottom: o-ui.spacing(4) !default;
|
|
@@ -70,8 +70,7 @@
|
|
|
70
70
|
|
|
71
71
|
&__header {
|
|
72
72
|
display: block;
|
|
73
|
-
padding: 0 $issues-panel-header-padding-x
|
|
74
|
-
$issues-panel-header-padding-bottom !important;
|
|
73
|
+
padding: 0 $issues-panel-header-padding-x $issues-panel-header-padding-bottom !important;
|
|
75
74
|
background-color: inherit;
|
|
76
75
|
|
|
77
76
|
// Sticky
|
|
@@ -86,10 +85,7 @@
|
|
|
86
85
|
height: $issues-panel-header-stuck-shadow-size;
|
|
87
86
|
left: 0;
|
|
88
87
|
bottom: -$issues-panel-header-stuck-shadow-size;
|
|
89
|
-
background-image: linear-gradient(
|
|
90
|
-
180deg,
|
|
91
|
-
$issues-panel-header-stuck-shadow-gradient
|
|
92
|
-
);
|
|
88
|
+
background-image: linear-gradient(180deg, $issues-panel-header-stuck-shadow-gradient);
|
|
93
89
|
}
|
|
94
90
|
}
|
|
95
91
|
|
|
@@ -105,8 +101,7 @@
|
|
|
105
101
|
&__icon {
|
|
106
102
|
display: inline-block;
|
|
107
103
|
vertical-align: middle;
|
|
108
|
-
margin: $issues-panel-icon-margin-y $issues-panel-icon-margin-x
|
|
109
|
-
$issues-panel-icon-margin-y 0;
|
|
104
|
+
margin: $issues-panel-icon-margin-y $issues-panel-icon-margin-x $issues-panel-icon-margin-y 0;
|
|
110
105
|
}
|
|
111
106
|
|
|
112
107
|
&__action:not(:first-child) {
|
|
@@ -5,9 +5,8 @@ import type { IssueMessagesByCode } from "../IssueMessages";
|
|
|
5
5
|
/** Object representation of an annex. */
|
|
6
6
|
export interface AnnexObject<T = any> {
|
|
7
7
|
/**
|
|
8
|
-
* Annex path. This path may contain a single wildcard (`*`) at the end, when
|
|
9
|
-
*
|
|
10
|
-
* path may contain no other wildcards.
|
|
8
|
+
* Annex path. This path may contain a single wildcard (`*`) at the end, when the elements of a
|
|
9
|
+
* collection should be counted as annexes. Otherwise, the path may contain no other wildcards.
|
|
11
10
|
*/
|
|
12
11
|
path?: string | Path;
|
|
13
12
|
/** Annex's title. */
|
|
@@ -16,53 +15,44 @@ export interface AnnexObject<T = any> {
|
|
|
16
15
|
subtitle?: ReactNode | ((value: T, index?: number) => ReactNode);
|
|
17
16
|
/** Annex's description. */
|
|
18
17
|
description?: ReactNode;
|
|
19
|
-
/**
|
|
20
|
-
* Annex's label in the issues panel. The `title` and `subtitle` are used by
|
|
21
|
-
* default.
|
|
22
|
-
*/
|
|
18
|
+
/** Annex's label in the issues panel. The `title` and `subtitle` are used by default. */
|
|
23
19
|
issuesPanelLabel?: ReactNode | ((value: T) => ReactNode);
|
|
24
|
-
/**
|
|
25
|
-
* Title of an annex within a collection of annexes. The `title` is used by
|
|
26
|
-
* default.
|
|
27
|
-
*/
|
|
20
|
+
/** Title of an annex within a collection of annexes. The `title` is used by default. */
|
|
28
21
|
itemTitle?: ReactNode | ((value: T, index: number) => ReactNode);
|
|
29
22
|
/**
|
|
30
|
-
* Issues panel label for each annex of a collection of annexes. The
|
|
31
|
-
*
|
|
23
|
+
* Issues panel label for each annex of a collection of annexes. The `subtitle` and index of the
|
|
24
|
+
* item are used by default.
|
|
32
25
|
*/
|
|
33
26
|
itemIssuesPanelLabel?: ReactNode | ((value: T, index: number) => ReactNode);
|
|
34
27
|
/**
|
|
35
28
|
* Title of the annex as a string to display in the document's title.
|
|
36
29
|
*
|
|
37
|
-
* Defaults to the `title` together with the `subtitle` (if it exists) when
|
|
38
|
-
* they are strings.
|
|
30
|
+
* Defaults to the `title` together with the `subtitle` (if it exists) when they are strings.
|
|
39
31
|
*
|
|
40
|
-
* A warning is printed if either the title or the subtitle are defined but
|
|
41
|
-
*
|
|
32
|
+
* A warning is printed if either the title or the subtitle are defined but aren't strings and
|
|
33
|
+
* `documentTitle` is not provided.
|
|
42
34
|
*/
|
|
43
35
|
documentTitle?: string | null | ((value: T, index?: number) => string | null);
|
|
44
36
|
/**
|
|
45
|
-
* Maximum number of annexes matching this path that can be added, when
|
|
46
|
-
*
|
|
47
|
-
*
|
|
37
|
+
* Maximum number of annexes matching this path that can be added, when counting collection
|
|
38
|
+
* elements as annexes. By default, if the collection has a `MaxSize` validation, then its value
|
|
39
|
+
* is used.
|
|
48
40
|
*/
|
|
49
41
|
maxAnnexes?: number;
|
|
50
42
|
/**
|
|
51
|
-
* Function called when an annex matching this path is being added to choose
|
|
52
|
-
*
|
|
43
|
+
* Function called when an annex matching this path is being added to choose the value that should
|
|
44
|
+
* be added.
|
|
53
45
|
*
|
|
54
|
-
* The default value being added is provided as an argument and may be edited
|
|
55
|
-
* if required.
|
|
46
|
+
* The default value being added is provided as an argument and may be edited if required.
|
|
56
47
|
*
|
|
57
|
-
* The value to be added should be returned, or a promise that resolves with
|
|
58
|
-
* said value.
|
|
48
|
+
* The value to be added should be returned, or a promise that resolves with said value.
|
|
59
49
|
*
|
|
60
|
-
* To prevent an annex from being added, return `undefined`/`null` (or a
|
|
61
|
-
*
|
|
50
|
+
* To prevent an annex from being added, return `undefined`/`null` (or a promise which resolves
|
|
51
|
+
* with `undefined`/`null`).
|
|
62
52
|
*
|
|
63
53
|
* @param value - Value being added, can be edited.
|
|
64
|
-
* @returns Value to be added, `undefined`/`null` if the annex shouldn't be
|
|
65
|
-
*
|
|
54
|
+
* @returns Value to be added, `undefined`/`null` if the annex shouldn't be added (or a promise
|
|
55
|
+
* that resolves with said values).
|
|
66
56
|
*/
|
|
67
57
|
getValue?: (value: T) => T | null | undefined | PromiseLike<T | null | undefined>;
|
|
68
58
|
}
|
|
@@ -73,17 +63,16 @@ export interface AnnexProps extends AnnexObject, Omit<TabContentProps, "value" |
|
|
|
73
63
|
/** Sets the annex as read-only. */
|
|
74
64
|
readOnly?: boolean;
|
|
75
65
|
/**
|
|
76
|
-
* Mapping of issue messages from the path of the field with issues to the
|
|
77
|
-
*
|
|
66
|
+
* Mapping of issue messages from the path of the field with issues to the issue messages of said
|
|
67
|
+
* field (which are themselves grouped by their code).
|
|
78
68
|
*
|
|
79
|
-
* Provided paths are relative to the annex's path and may contain wildcards,
|
|
80
|
-
*
|
|
69
|
+
* Provided paths are relative to the annex's path and may contain wildcards, which will have a
|
|
70
|
+
* lower priority when matched against.
|
|
81
71
|
*
|
|
82
72
|
* These messages are used by the `IssueMessages` component.
|
|
83
73
|
*
|
|
84
|
-
* > **Note:** Changes to `issueMessages` are handled correctly, but are not
|
|
85
|
-
* >
|
|
86
|
-
* > change at every render.
|
|
74
|
+
* > **Note:** Changes to `issueMessages` are handled correctly, but are not efficient. Please make
|
|
75
|
+
* > sure that the identity of the provided value doesn't change at every render.
|
|
87
76
|
*
|
|
88
77
|
* Example value:
|
|
89
78
|
*
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { type AbsolutePath, Path } from "@ostack.tech/kform";
|
|
2
2
|
import { type TabsProps } from "@ostack.tech/ui";
|
|
3
|
-
import {
|
|
3
|
+
import type { ReactNode } from "react";
|
|
4
4
|
import { type AnnexObject } from "./Annex.tsx";
|
|
5
5
|
/** Properties of the annexes component. */
|
|
6
6
|
export interface AnnexesProps extends Omit<TabsProps, "defaultValue" | "value" | "onValueChange" | "showAllTabsWhilePrinting"> {
|
|
7
7
|
/** Base path for all declared annexes. */
|
|
8
8
|
path?: string | Path;
|
|
9
9
|
/**
|
|
10
|
-
* List of all annexes. When not provided, the list of annexes is obtained
|
|
11
|
-
*
|
|
10
|
+
* List of all annexes. When not provided, the list of annexes is obtained from the direct
|
|
11
|
+
* children `Annex` components.
|
|
12
12
|
*/
|
|
13
13
|
annexes?: AnnexObject[];
|
|
14
14
|
/** Default active annex. */
|
|
@@ -36,10 +36,9 @@ export interface AnnexesProps extends Omit<TabsProps, "defaultValue" | "value" |
|
|
|
36
36
|
children?: ReactNode;
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
39
|
-
* The annexes component can be used to split parts of a form into separate
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
* represented by its own class, with its own schema and distinct path.
|
|
39
|
+
* The annexes component can be used to split parts of a form into separate annexes (tabs), while
|
|
40
|
+
* providing means of managing and navigating between them. Although not strictly mandatory, each
|
|
41
|
+
* annex (tab) is typically represented by its own class, with its own schema and distinct path.
|
|
43
42
|
*
|
|
44
43
|
* It further supports optional annexes (via
|
|
45
44
|
* [nullable](https://kform.ostack.tech/api/packages/kform/tech.ostack.kform.schemas/-nullable-schema/index.html)
|
|
@@ -55,8 +54,7 @@ export interface AnnexesProps extends Omit<TabsProps, "defaultValue" | "value" |
|
|
|
55
54
|
*
|
|
56
55
|
* It composes the following subcomponents:
|
|
57
56
|
*
|
|
58
|
-
* - `AnnexesManager`: Component used to manage and navigate between annexes
|
|
59
|
-
* (tabs).
|
|
57
|
+
* - `AnnexesManager`: Component used to manage and navigate between annexes (tabs).
|
|
60
58
|
* - `Annex`: Content of a single annex (tab) of the form.
|
|
61
59
|
*
|
|
62
60
|
* Example usage:
|
|
@@ -79,4 +77,4 @@ export interface AnnexesProps extends Omit<TabsProps, "defaultValue" | "value" |
|
|
|
79
77
|
* }
|
|
80
78
|
* ```
|
|
81
79
|
*/
|
|
82
|
-
export declare function Annexes({ path, annexes, defaultActiveAnnex, activeAnnex, onActiveAnnexChange, onAnnexAdd, onAnnexRemove, variant, className, children, ...otherProps }: AnnexesProps): import("react").JSX.Element;
|
|
80
|
+
export declare function Annexes({ path, annexes: annexesProp, defaultActiveAnnex, activeAnnex, onActiveAnnexChange, onAnnexAdd, onAnnexRemove, variant, className, children, ...otherProps }: AnnexesProps): import("react").JSX.Element;
|
|
@@ -74,7 +74,7 @@ export interface UseCreateAnnexesContextOptions extends Pick<AnnexesProps, "defa
|
|
|
74
74
|
resolvedAnnexes: ResolvedAnnexObject[];
|
|
75
75
|
}
|
|
76
76
|
/** Hook used to create the annexes' context. */
|
|
77
|
-
export declare function useCreateAnnexesContext({ formManager, basePath, resolvedAnnexes, defaultActiveAnnex, activeAnnex, onActiveAnnexChange, onAnnexAdd, onAnnexRemove, }: UseCreateAnnexesContextOptions): Omit<import("zustand").StoreApi<AnnexesState>, "subscribe"> & {
|
|
77
|
+
export declare function useCreateAnnexesContext({ formManager, basePath, resolvedAnnexes, defaultActiveAnnex, activeAnnex: activeAnnexProp, onActiveAnnexChange, onAnnexAdd, onAnnexRemove, }: UseCreateAnnexesContextOptions): Omit<import("zustand").StoreApi<AnnexesState>, "subscribe"> & {
|
|
78
78
|
subscribe: {
|
|
79
79
|
(listener: (selectedState: AnnexesState, previousSelectedState: AnnexesState) => void): () => void;
|
|
80
80
|
<U>(selector: (state: AnnexesState) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
|
|
@@ -3,8 +3,8 @@ import { type ComponentProps, type ReactNode } from "react";
|
|
|
3
3
|
/** Properties of the annexes' manager component. */
|
|
4
4
|
export interface AnnexesManagerProps extends ComponentProps<"nav"> {
|
|
5
5
|
/**
|
|
6
|
-
* Whether to show the annexes manager menu. This defaults to `true` if there
|
|
7
|
-
*
|
|
6
|
+
* Whether to show the annexes manager menu. This defaults to `true` if there is at least one
|
|
7
|
+
* optional or repetitive annex, and `false` otherwise.
|
|
8
8
|
*/
|
|
9
9
|
showMenu?: boolean;
|
|
10
10
|
/** Text of the menu button. */
|
|
@@ -17,16 +17,13 @@ export interface AnnexesManagerProps extends ComponentProps<"nav"> {
|
|
|
17
17
|
addAnnexSuccessMessage?: (annexName: ReactNode) => ReactNode;
|
|
18
18
|
/** Label of the remove annex button, announced by assistive technologies. */
|
|
19
19
|
removeAnnexButtonLabel?: string;
|
|
20
|
-
/**
|
|
21
|
-
* Hint on how to remove an annex via keyboard, announced by assistive
|
|
22
|
-
* technologies.
|
|
23
|
-
*/
|
|
20
|
+
/** Hint on how to remove an annex via keyboard, announced by assistive technologies. */
|
|
24
21
|
removeAnnexKeyboardHint?: string;
|
|
25
22
|
/** Title of the "remove annex" confirm dialog. */
|
|
26
23
|
removeAnnexConfirmDialogTitle?: ReactNode;
|
|
27
24
|
/**
|
|
28
|
-
* Function that should return the message of the "remove annex" confirm
|
|
29
|
-
*
|
|
25
|
+
* Function that should return the message of the "remove annex" confirm dialog, given a node with
|
|
26
|
+
* the name of the annex.
|
|
30
27
|
*
|
|
31
28
|
* @param annexName Node containing the name of the annex.
|
|
32
29
|
*/
|
|
@@ -49,8 +46,7 @@ export interface AnnexesManagerProps extends ComponentProps<"nav"> {
|
|
|
49
46
|
tabListProps?: TabListProps;
|
|
50
47
|
}
|
|
51
48
|
/**
|
|
52
|
-
* Component used to manage the form's annexes. Provides a menu that allows
|
|
53
|
-
*
|
|
54
|
-
* existing annex.
|
|
49
|
+
* Component used to manage the form's annexes. Provides a menu that allows changing, adding, and
|
|
50
|
+
* removing annexes, as well as a list of tabs for each existing annex.
|
|
55
51
|
*/
|
|
56
|
-
export declare function AnnexesManager({ showMenu, menuButtonText, menuButtonLabel, addAnnexText, removeAnnexButtonLabel, removeAnnexKeyboardHint, removeAnnexConfirmDialogTitle, removeAnnexConfirmDialogMessage, removeAnnexConfirmDialogOkText, removeAnnexConfirmDialogCancelText, className, "aria-label":
|
|
52
|
+
export declare function AnnexesManager({ showMenu, menuButtonText: menuButtonTextProp, menuButtonLabel: menuButtonLabelProp, addAnnexText: addAnnexTextProp, removeAnnexButtonLabel: removeAnnexButtonLabelProp, removeAnnexKeyboardHint: removeAnnexKeyboardHintProp, removeAnnexConfirmDialogTitle: removeAnnexConfirmDialogTitleProp, removeAnnexConfirmDialogMessage: removeAnnexConfirmDialogMessageProp, removeAnnexConfirmDialogOkText: removeAnnexConfirmDialogOkTextProp, removeAnnexConfirmDialogCancelText: removeAnnexConfirmDialogCancelTextProp, className, "aria-label": ariaLabelProp, menuContainerProps, menuTriggerProps, menuContentProps, menuProps, tabListContainerProps, tabListProps, ref, ...otherProps }: AnnexesManagerProps): import("react").JSX.Element;
|
|
@@ -14,8 +14,7 @@ export interface CheckboxControlProps<T extends boolean | null = boolean | null>
|
|
|
14
14
|
*/
|
|
15
15
|
issueMessages?: IssueMessagesByCode;
|
|
16
16
|
/**
|
|
17
|
-
* Label to use in the issues panel when displaying issues associated with
|
|
18
|
-
* this field.
|
|
17
|
+
* Label to use in the issues panel when displaying issues associated with this field.
|
|
19
18
|
*
|
|
20
19
|
* This label has priority over the field's `Label`.
|
|
21
20
|
*/
|
|
@@ -27,19 +26,16 @@ export interface CheckboxControlProps<T extends boolean | null = boolean | null>
|
|
|
27
26
|
*/
|
|
28
27
|
displayIssues?: boolean;
|
|
29
28
|
/**
|
|
30
|
-
* Whether to prevent the auto-focusing behaviour that causes this control to
|
|
31
|
-
*
|
|
29
|
+
* Whether to prevent the auto-focusing behaviour that causes this control to be focused when the
|
|
30
|
+
* form app's `focus` is called with this control's path.
|
|
32
31
|
*
|
|
33
|
-
* Preventing this behaviour is useful when multiple controls for the same
|
|
34
|
-
*
|
|
32
|
+
* Preventing this behaviour is useful when multiple controls for the same path are rendered at
|
|
33
|
+
* once, and only one of them should be focused.
|
|
35
34
|
*
|
|
36
35
|
* @default false
|
|
37
36
|
*/
|
|
38
37
|
preventAutoFocus?: boolean;
|
|
39
|
-
/**
|
|
40
|
-
* Whether to show debug information. This property has no effect in
|
|
41
|
-
* production builds.
|
|
42
|
-
*/
|
|
38
|
+
/** Whether to show debug information. This property has no effect in production builds. */
|
|
43
39
|
debug?: boolean;
|
|
44
40
|
/** Reference to the control's API. */
|
|
45
41
|
apiRef?: Ref<InputController<T, CheckboxChecked, ComponentRef<typeof Checkbox>> | undefined>;
|
|
@@ -47,13 +43,11 @@ export interface CheckboxControlProps<T extends boolean | null = boolean | null>
|
|
|
47
43
|
issueMessagesProps?: Omit<IssueMessagesProps, "path" | "issues" | "messages" | "unwrapped">;
|
|
48
44
|
}
|
|
49
45
|
/**
|
|
50
|
-
* The checkbox control component is a KForm form control for values with
|
|
51
|
-
* (possibly
|
|
46
|
+
* The checkbox control component is a KForm form control for values with (possibly
|
|
52
47
|
* [nullable](https://kform.ostack.tech/api/packages/kform/tech.ostack.kform.schemas/-nullable-schema/index.html))
|
|
53
48
|
* schemas of type
|
|
54
49
|
* [`BooleanSchema`](https://kform.ostack.tech/api/packages/kform/tech.ostack.kform.schemas/-boolean-schema/index.html).
|
|
55
|
-
* It is built on top of the [`Checkbox`](/docs/ostack-ui-forms-checkbox--docs)
|
|
56
|
-
* component.
|
|
50
|
+
* It is built on top of the [`Checkbox`](/docs/ostack-ui-forms-checkbox--docs) component.
|
|
57
51
|
*
|
|
58
52
|
* The following built-in KForm validation affects this control:
|
|
59
53
|
*
|
|
@@ -66,11 +60,7 @@ export interface CheckboxControlProps<T extends boolean | null = boolean | null>
|
|
|
66
60
|
* import { CheckboxControl } from "@ostack.tech/ui-kform";
|
|
67
61
|
*
|
|
68
62
|
* function TermsControl() {
|
|
69
|
-
* return
|
|
70
|
-
* <CheckboxControl path="/terms">
|
|
71
|
-
* Accept terms and conditions
|
|
72
|
-
* </CheckboxControl>
|
|
73
|
-
* );
|
|
63
|
+
* return <CheckboxControl path="/terms">Accept terms and conditions</CheckboxControl>;
|
|
74
64
|
* }
|
|
75
65
|
* ```
|
|
76
66
|
*/
|