@selfhelp/shared 1.7.2 → 1.10.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/CHANGELOG.md +72 -0
- package/dist/{common-B96dASgu.d.mts → common-CJSHQL1E.d.mts} +13 -1
- package/dist/{common-B96dASgu.d.ts → common-CJSHQL1E.d.ts} +13 -1
- package/dist/index.d.mts +7 -44
- package/dist/index.d.ts +7 -44
- package/dist/index.js +400 -13
- package/dist/index.mjs +376 -13
- package/dist/plugin-sdk/index.d.mts +2 -2
- package/dist/plugin-sdk/index.d.ts +2 -2
- package/dist/plugin-sdk/index.js +15 -6
- package/dist/plugin-sdk/index.mjs +15 -6
- package/dist/registry/index.d.mts +42 -4
- package/dist/registry/index.d.ts +42 -4
- package/dist/registry/index.js +61 -8
- package/dist/registry/index.mjs +53 -7
- package/dist/{styles.registry-B147FVHY.d.mts → styles.registry-BV1iF7k-.d.ts} +695 -478
- package/dist/{styles.registry-D49K8F5z.d.ts → styles.registry-DkoT-FmN.d.mts} +695 -478
- package/dist/theme/index.d.mts +225 -4
- package/dist/theme/index.d.ts +225 -4
- package/dist/theme/index.js +343 -9
- package/dist/theme/index.mjs +325 -8
- package/dist/theme/tailwind.d.mts +2 -2
- package/dist/theme/tailwind.d.ts +2 -2
- package/package.json +1 -1
- package/src/registry/__tests__/platform.test.ts +187 -0
- package/src/registry/index.ts +73 -0
- package/src/registry/styles.registry.ts +65 -5
- package/src/theme/__tests__/mantineVariant.test.ts +87 -0
- package/src/theme/__tests__/semantic.test.ts +231 -0
- package/src/theme/index.ts +2 -0
- package/src/theme/mantineVariant.ts +145 -0
- package/src/theme/semantic.ts +472 -0
- package/src/theme/tailwind.ts +2 -2
- package/src/theme/tokens.ts +2 -2
- package/src/types/mantine/common.ts +13 -0
- package/src/types/styles/auth.ts +13 -13
- package/src/types/styles/base.ts +5 -5
- package/src/types/styles/composite.ts +62 -48
- package/src/types/styles/error.ts +26 -15
- package/src/types/styles/forms.ts +185 -185
- package/src/types/styles/interactive.ts +81 -76
- package/src/types/styles/layout.ts +103 -85
- package/src/types/styles/media.ts +20 -20
- package/src/types/styles/typography.ts +39 -39
- package/src/types/styles/unknown.ts +20 -2
- package/src/utils/spacing.ts +1 -1
|
@@ -4,7 +4,6 @@ SPDX-License-Identifier: MPL-2.0
|
|
|
4
4
|
*/
|
|
5
5
|
import type { IBaseStyle, IContentField, IStyleWithSpacing } from './base';
|
|
6
6
|
import type {
|
|
7
|
-
TMantineSize,
|
|
8
7
|
TMantineColor,
|
|
9
8
|
TMantineRadius,
|
|
10
9
|
TMantineSpacing,
|
|
@@ -12,6 +11,8 @@ import type {
|
|
|
12
11
|
TMantineAccordionVariant,
|
|
13
12
|
TMantineTabsVariant,
|
|
14
13
|
TMantineTimelineLineVariant,
|
|
14
|
+
TSharedSize,
|
|
15
|
+
TSharedRadius,
|
|
15
16
|
} from '../mantine/common';
|
|
16
17
|
import type { TMantineWidth, TMantineHeight } from './layout';
|
|
17
18
|
import type { TMantineLineClamp } from './typography';
|
|
@@ -39,90 +40,103 @@ export type TMantineListCenter = '0' | '1';
|
|
|
39
40
|
|
|
40
41
|
export interface IAccordionStyle extends IStyleWithSpacing {
|
|
41
42
|
style_name: 'accordion';
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
43
|
+
web_accordion_variant?: IContentField<TMantineAccordionVariant>;
|
|
44
|
+
web_accordion_multiple?: IContentField<TMantineAccordionMultiple>;
|
|
45
|
+
web_accordion_chevron_position?: IContentField<TMantineAccordionChevronPosition>;
|
|
46
|
+
web_accordion_chevron_size?: IContentField<string>;
|
|
47
|
+
web_accordion_disable_chevron_rotation?: IContentField<TMantineAccordionDisableChevronRotation>;
|
|
48
|
+
web_accordion_loop?: IContentField<TMantineAccordionLoop>;
|
|
49
|
+
web_accordion_transition_duration?: IContentField<string>;
|
|
50
|
+
web_accordion_default_value?: IContentField<string>;
|
|
51
|
+
shared_radius?: IContentField<TSharedRadius>;
|
|
52
|
+
use_web_style?: IContentField<string>;
|
|
52
53
|
}
|
|
53
54
|
|
|
54
55
|
export interface IAccordionItemStyle extends IStyleWithSpacing {
|
|
55
56
|
style_name: 'accordion-item';
|
|
56
|
-
|
|
57
|
+
web_accordion_item_value?: IContentField<string>;
|
|
57
58
|
label?: IContentField<string>;
|
|
58
|
-
|
|
59
|
+
web_accordion_item_icon?: IContentField<string>;
|
|
59
60
|
disabled?: IContentField<string>;
|
|
60
|
-
|
|
61
|
+
use_web_style?: IContentField<string>;
|
|
61
62
|
}
|
|
62
63
|
|
|
63
64
|
export interface ITabsStyle extends IStyleWithSpacing {
|
|
64
65
|
style_name: 'tabs';
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
66
|
+
web_tabs_variant?: IContentField<TMantineTabsVariant>;
|
|
67
|
+
web_tabs_orientation?: IContentField<TMantineOrientation>;
|
|
68
|
+
web_tabs_radius?: IContentField<TMantineRadius>;
|
|
69
|
+
web_color?: IContentField<TMantineColor>;
|
|
70
|
+
web_width?: IContentField<TMantineWidth>;
|
|
71
|
+
web_height?: IContentField<TMantineHeight>;
|
|
72
|
+
use_web_style?: IContentField<string>;
|
|
72
73
|
}
|
|
73
74
|
|
|
74
75
|
export interface ITabStyle extends IBaseStyle {
|
|
75
76
|
style_name: 'tab';
|
|
76
77
|
label?: IContentField<string>;
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
78
|
+
web_left_icon?: IContentField<string>;
|
|
79
|
+
web_right_icon?: IContentField<string>;
|
|
80
|
+
web_tab_disabled?: IContentField<string>;
|
|
81
|
+
web_width?: IContentField<TMantineWidth>;
|
|
82
|
+
web_height?: IContentField<TMantineHeight>;
|
|
83
|
+
use_web_style?: IContentField<string>;
|
|
83
84
|
}
|
|
84
85
|
|
|
85
86
|
export interface ITimelineStyle extends IStyleWithSpacing {
|
|
86
87
|
style_name: 'timeline';
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
88
|
+
web_timeline_bullet_size?: IContentField<string>;
|
|
89
|
+
web_timeline_line_width?: IContentField<string>;
|
|
90
|
+
web_timeline_active?: IContentField<string>;
|
|
91
|
+
web_timeline_align?: IContentField<TMantineTimelineAlign>;
|
|
92
|
+
web_timeline_line_variant?: IContentField<TMantineTimelineLineVariant>;
|
|
93
|
+
web_color?: IContentField<TMantineColor>;
|
|
94
|
+
use_web_style?: IContentField<string>;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* A single entry inside a `timeline`. Child-only style; placement is enforced
|
|
99
|
+
* by the backend parent/child relationship rules.
|
|
100
|
+
*/
|
|
101
|
+
export interface ITimelineItemStyle extends IBaseStyle {
|
|
102
|
+
style_name: 'timeline-item';
|
|
103
|
+
title?: IContentField<string>;
|
|
104
|
+
web_timeline_item_bullet?: IContentField<string>;
|
|
105
|
+
web_timeline_item_line_variant?: IContentField<TMantineTimelineLineVariant>;
|
|
106
|
+
web_color?: IContentField<TMantineColor>;
|
|
107
|
+
use_web_style?: IContentField<string>;
|
|
94
108
|
}
|
|
95
109
|
|
|
96
110
|
export interface IListStyle extends IStyleWithSpacing {
|
|
97
111
|
style_name: 'list';
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
112
|
+
web_list_type?: IContentField<TMantineListType>;
|
|
113
|
+
web_spacing?: IContentField<TMantineSpacing>;
|
|
114
|
+
shared_size?: IContentField<TSharedSize>;
|
|
115
|
+
use_web_style?: IContentField<string>;
|
|
116
|
+
web_list_list_style_type?: IContentField<TMantineListStyleType>;
|
|
117
|
+
web_list_with_padding?: IContentField<TMantineListWithPadding>;
|
|
118
|
+
web_list_center?: IContentField<TMantineListCenter>;
|
|
119
|
+
web_list_icon?: IContentField<string>;
|
|
106
120
|
}
|
|
107
121
|
|
|
108
122
|
export interface IListItemStyle extends IStyleWithSpacing {
|
|
109
123
|
style_name: 'list-item';
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
124
|
+
web_list_item_content?: IContentField<string>;
|
|
125
|
+
web_list_item_icon?: IContentField<string>;
|
|
126
|
+
use_web_style?: IContentField<string>;
|
|
113
127
|
}
|
|
114
128
|
|
|
115
129
|
export interface IEntryListStyle extends IBaseStyle {
|
|
116
|
-
style_name: '
|
|
130
|
+
style_name: 'entry-list';
|
|
117
131
|
line_clamp?: IContentField<TMantineLineClamp>;
|
|
118
132
|
}
|
|
119
133
|
|
|
120
134
|
export interface IEntryRecordStyle extends IBaseStyle {
|
|
121
|
-
style_name: '
|
|
135
|
+
style_name: 'entry-record';
|
|
122
136
|
}
|
|
123
137
|
|
|
124
138
|
export interface IEntryRecordDeleteStyle extends IBaseStyle {
|
|
125
|
-
style_name: '
|
|
139
|
+
style_name: 'entry-record-delete';
|
|
126
140
|
}
|
|
127
141
|
|
|
128
142
|
export interface ILoopStyle extends IBaseStyle {
|
|
@@ -2,32 +2,33 @@
|
|
|
2
2
|
SPDX-FileCopyrightText: 2026 Humdek, University of Bern
|
|
3
3
|
SPDX-License-Identifier: MPL-2.0
|
|
4
4
|
*/
|
|
5
|
-
import type { IContentField, IStyleWithSpacing } from './base';
|
|
5
|
+
import type { IBaseStyle, IContentField, IStyleWithSpacing } from './base';
|
|
6
|
+
import type { TSharedRadius } from '../mantine/common';
|
|
6
7
|
|
|
7
8
|
export interface INoAccessStyle extends IStyleWithSpacing {
|
|
8
|
-
style_name: '
|
|
9
|
+
style_name: 'no-access';
|
|
9
10
|
title?: IContentField<string>;
|
|
10
11
|
message?: IContentField<string>;
|
|
11
12
|
button_label?: IContentField<string>;
|
|
12
13
|
login_label?: IContentField<string>;
|
|
13
14
|
show_login?: IContentField<string>;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
web_color?: IContentField<string>;
|
|
16
|
+
shared_radius?: IContentField<TSharedRadius>;
|
|
17
|
+
web_shadow?: IContentField<string>;
|
|
18
|
+
web_button_variant?: IContentField<string>;
|
|
18
19
|
show_icon?: IContentField<string>;
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
export interface INotFoundStyle extends IStyleWithSpacing {
|
|
22
|
-
style_name: '
|
|
23
|
+
style_name: 'not-found';
|
|
23
24
|
title?: IContentField<string>;
|
|
24
25
|
message?: IContentField<string>;
|
|
25
26
|
button_label?: IContentField<string>;
|
|
26
27
|
login_label?: IContentField<string>;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
web_color?: IContentField<string>;
|
|
29
|
+
shared_radius?: IContentField<TSharedRadius>;
|
|
30
|
+
web_shadow?: IContentField<string>;
|
|
31
|
+
web_button_variant?: IContentField<string>;
|
|
31
32
|
show_icon?: IContentField<string>;
|
|
32
33
|
}
|
|
33
34
|
|
|
@@ -36,9 +37,19 @@ export interface IMissingStyle extends IStyleWithSpacing {
|
|
|
36
37
|
title?: IContentField<string>;
|
|
37
38
|
message?: IContentField<string>;
|
|
38
39
|
button_label?: IContentField<string>;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
web_color?: IContentField<string>;
|
|
41
|
+
shared_radius?: IContentField<TSharedRadius>;
|
|
42
|
+
web_shadow?: IContentField<string>;
|
|
43
|
+
web_button_variant?: IContentField<string>;
|
|
43
44
|
show_icon?: IContentField<string>;
|
|
44
45
|
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Build/version diagnostic surface. Has no content fields in the catalog.
|
|
49
|
+
* Per the mobile rendering plan (section 5.3) it is a candidate to be marked
|
|
50
|
+
* web-only or removed after a zero-reference check; kept `both` for now to
|
|
51
|
+
* match the backend render-target backfill.
|
|
52
|
+
*/
|
|
53
|
+
export interface IVersionStyle extends IBaseStyle {
|
|
54
|
+
style_name: 'version';
|
|
55
|
+
}
|