@selfhelp/shared 1.0.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 +39 -0
- package/LICENSE +381 -0
- package/README.md +266 -0
- package/dist/common-B96dASgu.d.mts +80 -0
- package/dist/common-B96dASgu.d.ts +80 -0
- package/dist/index-Bg60YTsF.d.mts +1743 -0
- package/dist/index-DEOVT86P.d.ts +1743 -0
- package/dist/index.d.mts +597 -0
- package/dist/index.d.ts +597 -0
- package/dist/index.js +796 -0
- package/dist/index.mjs +718 -0
- package/dist/registry/index.d.mts +2 -0
- package/dist/registry/index.d.ts +2 -0
- package/dist/registry/index.js +134 -0
- package/dist/registry/index.mjs +105 -0
- package/dist/theme/index.d.mts +63 -0
- package/dist/theme/index.d.ts +63 -0
- package/dist/theme/index.js +202 -0
- package/dist/theme/index.mjs +162 -0
- package/dist/theme/tailwind.d.mts +36 -0
- package/dist/theme/tailwind.d.ts +36 -0
- package/dist/theme/tailwind.js +125 -0
- package/dist/theme/tailwind.mjs +97 -0
- package/package.json +69 -0
- package/src/api/endpoints.ts +58 -0
- package/src/api/index.ts +5 -0
- package/src/assets/index.ts +5 -0
- package/src/assets/resolveAssetUrl.ts +44 -0
- package/src/cms-classes/allow-list.ts +158 -0
- package/src/cms-classes/classify.ts +90 -0
- package/src/cms-classes/index.ts +7 -0
- package/src/cms-classes/remap.ts +44 -0
- package/src/condition/evaluate.ts +121 -0
- package/src/condition/index.ts +5 -0
- package/src/index.ts +25 -0
- package/src/interpolation/index.ts +5 -0
- package/src/interpolation/replaceCalcedValues.ts +27 -0
- package/src/registry/index.ts +37 -0
- package/src/registry/styles.registry.ts +158 -0
- package/src/theme/index.ts +6 -0
- package/src/theme/tailwind.ts +73 -0
- package/src/theme/tokens.ts +177 -0
- package/src/types/api/auth.ts +46 -0
- package/src/types/api/envelope.ts +34 -0
- package/src/types/api/forms.ts +38 -0
- package/src/types/api/index.ts +9 -0
- package/src/types/api/language.ts +12 -0
- package/src/types/api/page.ts +9 -0
- package/src/types/auth.ts +110 -0
- package/src/types/index.ts +17 -0
- package/src/types/mantine/common.ts +142 -0
- package/src/types/pages.ts +107 -0
- package/src/types/styles/auth.ts +165 -0
- package/src/types/styles/base.ts +72 -0
- package/src/types/styles/composite.ts +131 -0
- package/src/types/styles/forms.ts +439 -0
- package/src/types/styles/interactive.ts +165 -0
- package/src/types/styles/layout.ts +184 -0
- package/src/types/styles/media.ts +68 -0
- package/src/types/styles/typography.ts +118 -0
- package/src/types/styles/unknown.ts +220 -0
- package/src/utils/index.ts +6 -0
- package/src/utils/spacing.ts +64 -0
- package/src/utils/transformPageData.ts +93 -0
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
/*
|
|
2
|
+
SPDX-FileCopyrightText: 2026 Humdek, University of Bern
|
|
3
|
+
SPDX-License-Identifier: MPL-2.0
|
|
4
|
+
*/
|
|
5
|
+
import type { IBaseStyle, IContentField, IStyleWithSpacing } from './base';
|
|
6
|
+
import type {
|
|
7
|
+
TMantineSize,
|
|
8
|
+
TMantineColor,
|
|
9
|
+
TMantineRadius,
|
|
10
|
+
TMantineVariant,
|
|
11
|
+
TMantineBadgeVariant,
|
|
12
|
+
TMantineAvatarVariant,
|
|
13
|
+
TMantineChipVariant,
|
|
14
|
+
TMantineIndicatorPosition,
|
|
15
|
+
TMantineThemeIconVariant,
|
|
16
|
+
} from '../mantine/common';
|
|
17
|
+
import type { TMantineIconSize } from './typography';
|
|
18
|
+
|
|
19
|
+
export interface IButtonStyle extends IStyleWithSpacing {
|
|
20
|
+
style_name: 'button';
|
|
21
|
+
mantine_variant?: IContentField<TMantineVariant>;
|
|
22
|
+
mantine_color?: IContentField<TMantineColor>;
|
|
23
|
+
mantine_size?: IContentField<TMantineSize>;
|
|
24
|
+
mantine_radius?: IContentField<TMantineRadius>;
|
|
25
|
+
mantine_left_icon?: IContentField<string>;
|
|
26
|
+
mantine_right_icon?: IContentField<string>;
|
|
27
|
+
mantine_fullwidth?: IContentField<string>;
|
|
28
|
+
mantine_compact?: IContentField<string>;
|
|
29
|
+
mantine_auto_contrast?: IContentField<string>;
|
|
30
|
+
is_link?: IContentField<string>;
|
|
31
|
+
use_mantine_style?: IContentField<string>;
|
|
32
|
+
disabled?: IContentField<string>;
|
|
33
|
+
open_in_new_tab?: IContentField<string>;
|
|
34
|
+
page_keyword?: IContentField<string>;
|
|
35
|
+
url?: IContentField<string>;
|
|
36
|
+
label?: IContentField<string>;
|
|
37
|
+
label_cancel?: IContentField<string>;
|
|
38
|
+
confirmation_title?: IContentField<string>;
|
|
39
|
+
confirmation_continue?: IContentField<string>;
|
|
40
|
+
confirmation_message?: IContentField<string>;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface ILinkStyle extends IStyleWithSpacing {
|
|
44
|
+
style_name: 'link';
|
|
45
|
+
label?: IContentField<string>;
|
|
46
|
+
url?: IContentField<string>;
|
|
47
|
+
open_in_new_tab?: IContentField<string>;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface IActionIconStyle extends IStyleWithSpacing {
|
|
51
|
+
style_name: 'action-icon';
|
|
52
|
+
mantine_variant?: IContentField<TMantineVariant>;
|
|
53
|
+
mantine_action_icon_loading?: IContentField<string>;
|
|
54
|
+
mantine_size?: IContentField<TMantineSize>;
|
|
55
|
+
mantine_radius?: IContentField<TMantineRadius>;
|
|
56
|
+
mantine_color?: IContentField<TMantineColor>;
|
|
57
|
+
mantine_left_icon?: IContentField<string>;
|
|
58
|
+
is_link?: IContentField<string>;
|
|
59
|
+
page_keyword?: IContentField<string>;
|
|
60
|
+
open_in_new_tab?: IContentField<string>;
|
|
61
|
+
disabled?: IContentField<string>;
|
|
62
|
+
use_mantine_style?: IContentField<string>;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface IAlertStyle extends IStyleWithSpacing {
|
|
66
|
+
style_name: 'alert';
|
|
67
|
+
mantine_alert_title?: IContentField<string>;
|
|
68
|
+
close_button_label?: IContentField<string>;
|
|
69
|
+
mantine_variant?: IContentField<TMantineVariant>;
|
|
70
|
+
mantine_color?: IContentField<TMantineColor>;
|
|
71
|
+
mantine_radius?: IContentField<TMantineRadius>;
|
|
72
|
+
mantine_left_icon?: IContentField<string>;
|
|
73
|
+
mantine_with_close_button?: IContentField<string>;
|
|
74
|
+
content?: IContentField<string>;
|
|
75
|
+
use_mantine_style?: IContentField<string>;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface IBadgeStyle extends IStyleWithSpacing {
|
|
79
|
+
style_name: 'badge';
|
|
80
|
+
label?: IContentField<string>;
|
|
81
|
+
mantine_variant?: IContentField<TMantineBadgeVariant>;
|
|
82
|
+
mantine_size?: IContentField<TMantineSize>;
|
|
83
|
+
mantine_left_icon?: IContentField<string>;
|
|
84
|
+
mantine_radius?: IContentField<TMantineRadius>;
|
|
85
|
+
mantine_color?: IContentField<TMantineColor>;
|
|
86
|
+
use_mantine_style?: IContentField<string>;
|
|
87
|
+
mantine_right_icon?: IContentField<string>;
|
|
88
|
+
mantine_auto_contrast?: IContentField<string>;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export interface IAvatarStyle extends IStyleWithSpacing {
|
|
92
|
+
style_name: 'avatar';
|
|
93
|
+
alt?: IContentField<string>;
|
|
94
|
+
mantine_avatar_variant?: IContentField<TMantineAvatarVariant>;
|
|
95
|
+
mantine_size?: IContentField<TMantineSize>;
|
|
96
|
+
mantine_radius?: IContentField<TMantineRadius>;
|
|
97
|
+
mantine_color?: IContentField<TMantineColor>;
|
|
98
|
+
use_mantine_style?: IContentField<string>;
|
|
99
|
+
mantine_left_icon?: IContentField<string>;
|
|
100
|
+
mantine_avatar_initials?: IContentField<string>;
|
|
101
|
+
img_src?: IContentField<string>;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export interface IChipStyle extends IStyleWithSpacing {
|
|
105
|
+
style_name: 'chip';
|
|
106
|
+
label?: IContentField<string>;
|
|
107
|
+
mantine_chip_variant?: IContentField<TMantineChipVariant>;
|
|
108
|
+
mantine_size?: IContentField<TMantineSize>;
|
|
109
|
+
mantine_radius?: IContentField<TMantineRadius>;
|
|
110
|
+
mantine_color?: IContentField<TMantineColor>;
|
|
111
|
+
mantine_chip_checked?: IContentField<string>;
|
|
112
|
+
mantine_chip_multiple?: IContentField<string>;
|
|
113
|
+
disabled?: IContentField<string>;
|
|
114
|
+
use_mantine_style?: IContentField<string>;
|
|
115
|
+
mantine_left_icon?: IContentField<string>;
|
|
116
|
+
mantine_icon_size?: IContentField<TMantineIconSize>;
|
|
117
|
+
name?: IContentField<string>;
|
|
118
|
+
value?: IContentField<string>;
|
|
119
|
+
mantine_chip_on_value?: IContentField<string>;
|
|
120
|
+
mantine_chip_off_value?: IContentField<string>;
|
|
121
|
+
is_required?: IContentField<string>;
|
|
122
|
+
tooltip?: IContentField<string>;
|
|
123
|
+
mantine_tooltip_position?: IContentField<string>;
|
|
124
|
+
chip_on_value?: IContentField<string>;
|
|
125
|
+
chip_off_value?: IContentField<string>;
|
|
126
|
+
chip_checked?: IContentField<string>;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export interface IIndicatorStyle extends IBaseStyle {
|
|
130
|
+
style_name: 'indicator';
|
|
131
|
+
mantine_indicator_processing?: IContentField<string>;
|
|
132
|
+
mantine_indicator_disabled?: IContentField<string>;
|
|
133
|
+
mantine_indicator_size?: IContentField<string>;
|
|
134
|
+
mantine_indicator_position?: IContentField<TMantineIndicatorPosition>;
|
|
135
|
+
label?: IContentField<string>;
|
|
136
|
+
mantine_indicator_inline?: IContentField<string>;
|
|
137
|
+
mantine_indicator_offset?: IContentField<string>;
|
|
138
|
+
mantine_border?: IContentField<string>;
|
|
139
|
+
mantine_radius?: IContentField<TMantineRadius>;
|
|
140
|
+
mantine_color?: IContentField<TMantineColor>;
|
|
141
|
+
use_mantine_style?: IContentField<string>;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export interface IThemeIconStyle extends IStyleWithSpacing {
|
|
145
|
+
style_name: 'theme-icon';
|
|
146
|
+
mantine_variant?: IContentField<TMantineThemeIconVariant>;
|
|
147
|
+
mantine_size?: IContentField<TMantineSize>;
|
|
148
|
+
mantine_radius?: IContentField<TMantineRadius>;
|
|
149
|
+
mantine_color?: IContentField<TMantineColor>;
|
|
150
|
+
use_mantine_style?: IContentField<string>;
|
|
151
|
+
mantine_left_icon?: IContentField<string>;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export interface INotificationStyle extends IStyleWithSpacing {
|
|
155
|
+
style_name: 'notification';
|
|
156
|
+
title?: IContentField<string>;
|
|
157
|
+
content?: IContentField<string>;
|
|
158
|
+
mantine_left_icon?: IContentField<string>;
|
|
159
|
+
mantine_color?: IContentField<TMantineColor>;
|
|
160
|
+
mantine_notification_loading?: IContentField<string>;
|
|
161
|
+
mantine_notification_with_close_button?: IContentField<string>;
|
|
162
|
+
mantine_border?: IContentField<string>;
|
|
163
|
+
mantine_radius?: IContentField<TMantineRadius>;
|
|
164
|
+
use_mantine_style?: IContentField<string>;
|
|
165
|
+
}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
/*
|
|
2
|
+
SPDX-FileCopyrightText: 2026 Humdek, University of Bern
|
|
3
|
+
SPDX-License-Identifier: MPL-2.0
|
|
4
|
+
*/
|
|
5
|
+
import type { IBaseStyle, IContentField, IStyleWithSpacing } from './base';
|
|
6
|
+
import type {
|
|
7
|
+
TMantineSize,
|
|
8
|
+
TMantineSpacing,
|
|
9
|
+
TMantineRadius,
|
|
10
|
+
TMantineColor,
|
|
11
|
+
TMantineOrientation,
|
|
12
|
+
TMantineDirection,
|
|
13
|
+
TMantineWrap,
|
|
14
|
+
TMantineJustify,
|
|
15
|
+
TMantineAlign,
|
|
16
|
+
TMantineGridSpan,
|
|
17
|
+
} from '../mantine/common';
|
|
18
|
+
|
|
19
|
+
// Style-specific helper types only used in layout interfaces
|
|
20
|
+
export type TMantineBorder = '0' | '1';
|
|
21
|
+
export type TMantineWidth = string;
|
|
22
|
+
export type TMantineHeight = string;
|
|
23
|
+
export type TMantineDividerVariant = 'solid' | 'dashed' | 'dotted';
|
|
24
|
+
export type TMantinePaperShadow = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
25
|
+
export type TMantineCardShadow = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
26
|
+
export type TMantineGap = '0' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
27
|
+
export type TMantineCols = string;
|
|
28
|
+
export type TMantineGridOffset = string;
|
|
29
|
+
export type TMantineGridOrder = string;
|
|
30
|
+
export type TMantineScrollAreaSize = string;
|
|
31
|
+
export type TMantineScrollAreaType = 'hover' | 'always' | 'never' | 'scroll';
|
|
32
|
+
|
|
33
|
+
export interface IContainerStyle extends IStyleWithSpacing {
|
|
34
|
+
style_name: 'container';
|
|
35
|
+
mantine_size?: IContentField<TMantineSize>;
|
|
36
|
+
mantine_fluid?: IContentField<string>;
|
|
37
|
+
mantine_px?: IContentField<TMantineSpacing>;
|
|
38
|
+
mantine_py?: IContentField<TMantineSpacing>;
|
|
39
|
+
use_mantine_style?: IContentField<string>;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface IBoxStyle extends IStyleWithSpacing {
|
|
43
|
+
style_name: 'box';
|
|
44
|
+
content?: IContentField<string>;
|
|
45
|
+
use_mantine_style?: IContentField<string>;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface IFlexStyle extends IStyleWithSpacing {
|
|
49
|
+
style_name: 'flex';
|
|
50
|
+
mantine_gap?: IContentField<TMantineGap>;
|
|
51
|
+
mantine_justify?: IContentField<TMantineJustify>;
|
|
52
|
+
mantine_align?: IContentField<TMantineAlign>;
|
|
53
|
+
mantine_direction?: IContentField<TMantineDirection>;
|
|
54
|
+
mantine_wrap?: IContentField<TMantineWrap>;
|
|
55
|
+
mantine_width?: IContentField<TMantineWidth>;
|
|
56
|
+
mantine_height?: IContentField<TMantineHeight>;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface IGroupStyle extends IStyleWithSpacing {
|
|
60
|
+
style_name: 'group';
|
|
61
|
+
mantine_gap?: IContentField<TMantineGap>;
|
|
62
|
+
mantine_justify?: IContentField<TMantineJustify>;
|
|
63
|
+
mantine_align?: IContentField<TMantineAlign>;
|
|
64
|
+
mantine_group_wrap?: IContentField<'0' | '1'>;
|
|
65
|
+
mantine_group_grow?: IContentField<'0' | '1'>;
|
|
66
|
+
mantine_width?: IContentField<TMantineWidth>;
|
|
67
|
+
mantine_height?: IContentField<TMantineHeight>;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export interface IStackStyle extends IStyleWithSpacing {
|
|
71
|
+
style_name: 'stack';
|
|
72
|
+
mantine_gap?: IContentField<TMantineGap>;
|
|
73
|
+
mantine_justify?: IContentField<TMantineJustify>;
|
|
74
|
+
mantine_align?: IContentField<TMantineAlign>;
|
|
75
|
+
mantine_width?: IContentField<TMantineWidth>;
|
|
76
|
+
mantine_height?: IContentField<TMantineHeight>;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export interface ISimpleGridStyle extends IStyleWithSpacing {
|
|
80
|
+
style_name: 'simple-grid';
|
|
81
|
+
mantine_cols?: IContentField<TMantineCols>;
|
|
82
|
+
mantine_spacing?: IContentField<TMantineSpacing>;
|
|
83
|
+
mantine_breakpoints?: IContentField<string>;
|
|
84
|
+
mantine_vertical_spacing?: IContentField<TMantineSpacing>;
|
|
85
|
+
mantine_width?: IContentField<TMantineWidth>;
|
|
86
|
+
mantine_height?: IContentField<TMantineHeight>;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export interface IGridStyle extends IStyleWithSpacing {
|
|
90
|
+
style_name: 'grid';
|
|
91
|
+
mantine_cols?: IContentField<TMantineCols>;
|
|
92
|
+
mantine_gap?: IContentField<TMantineGap>;
|
|
93
|
+
mantine_justify?: IContentField<TMantineJustify>;
|
|
94
|
+
mantine_align?: IContentField<TMantineAlign>;
|
|
95
|
+
mantine_grid_overflow?: IContentField<string>;
|
|
96
|
+
mantine_width?: IContentField<TMantineWidth>;
|
|
97
|
+
mantine_height?: IContentField<TMantineHeight>;
|
|
98
|
+
use_mantine_style?: IContentField<string>;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export interface IGridColumnStyle extends IStyleWithSpacing {
|
|
102
|
+
style_name: 'grid-column';
|
|
103
|
+
mantine_grid_span?: IContentField<TMantineGridSpan>;
|
|
104
|
+
mantine_grid_offset?: IContentField<TMantineGridOffset>;
|
|
105
|
+
mantine_grid_order?: IContentField<TMantineGridOrder>;
|
|
106
|
+
mantine_grid_grow?: IContentField<string>;
|
|
107
|
+
mantine_width?: IContentField<TMantineWidth>;
|
|
108
|
+
mantine_height?: IContentField<TMantineHeight>;
|
|
109
|
+
use_mantine_style?: IContentField<string>;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export interface ISpaceStyle extends IStyleWithSpacing {
|
|
113
|
+
style_name: 'space';
|
|
114
|
+
mantine_size?: IContentField<TMantineSize>;
|
|
115
|
+
mantine_space_direction?: IContentField<string>;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export interface IDividerStyle extends IBaseStyle {
|
|
119
|
+
style_name: 'divider';
|
|
120
|
+
mantine_divider_variant?: IContentField<TMantineDividerVariant>;
|
|
121
|
+
mantine_size?: IContentField<TMantineSize>;
|
|
122
|
+
mantine_divider_label?: IContentField<string>;
|
|
123
|
+
mantine_divider_label_position?: IContentField<string>;
|
|
124
|
+
mantine_orientation?: IContentField<TMantineOrientation>;
|
|
125
|
+
mantine_color?: IContentField<TMantineColor>;
|
|
126
|
+
use_mantine_style?: IContentField<string>;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export interface IPaperStyle extends IStyleWithSpacing {
|
|
130
|
+
style_name: 'paper';
|
|
131
|
+
mantine_paper_shadow?: IContentField<TMantinePaperShadow>;
|
|
132
|
+
mantine_radius?: IContentField<TMantineRadius>;
|
|
133
|
+
mantine_px?: IContentField<TMantineSpacing>;
|
|
134
|
+
mantine_py?: IContentField<TMantineSpacing>;
|
|
135
|
+
mantine_border?: IContentField<TMantineBorder>;
|
|
136
|
+
use_mantine_style?: IContentField<string>;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export interface ICenterStyle extends IBaseStyle {
|
|
140
|
+
style_name: 'center';
|
|
141
|
+
mantine_center_inline?: IContentField<string>;
|
|
142
|
+
mantine_width?: IContentField<TMantineWidth>;
|
|
143
|
+
mantine_height?: IContentField<TMantineHeight>;
|
|
144
|
+
mantine_miw?: IContentField<TMantineWidth>;
|
|
145
|
+
mantine_mih?: IContentField<TMantineHeight>;
|
|
146
|
+
mantine_maw?: IContentField<TMantineWidth>;
|
|
147
|
+
mantine_mah?: IContentField<TMantineHeight>;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export interface IScrollAreaStyle extends IStyleWithSpacing {
|
|
151
|
+
style_name: 'scroll-area';
|
|
152
|
+
mantine_scroll_area_scrollbar_size?: IContentField<TMantineScrollAreaSize>;
|
|
153
|
+
mantine_scroll_area_type?: IContentField<TMantineScrollAreaType>;
|
|
154
|
+
mantine_scroll_area_offset_scrollbars?: IContentField<string>;
|
|
155
|
+
mantine_scroll_area_scroll_hide_delay?: IContentField<string>;
|
|
156
|
+
mantine_height?: IContentField<TMantineHeight>;
|
|
157
|
+
mantine_width?: IContentField<TMantineWidth>;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export interface ICardStyle extends IStyleWithSpacing {
|
|
161
|
+
style_name: 'card';
|
|
162
|
+
mantine_card_shadow?: IContentField<TMantineCardShadow>;
|
|
163
|
+
mantine_border?: IContentField<TMantineBorder>;
|
|
164
|
+
mantine_radius?: IContentField<TMantineRadius>;
|
|
165
|
+
use_mantine_style?: IContentField<string>;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export interface ICardSegmentStyle extends IStyleWithSpacing {
|
|
169
|
+
style_name: 'card-segment';
|
|
170
|
+
use_mantine_style?: IContentField<string>;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export interface IAspectRatioStyle extends IBaseStyle {
|
|
174
|
+
style_name: 'aspect-ratio';
|
|
175
|
+
mantine_aspect_ratio?: IContentField<string>;
|
|
176
|
+
use_mantine_style?: IContentField<string>;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export interface IBackgroundImageStyle extends IStyleWithSpacing {
|
|
180
|
+
style_name: 'background-image';
|
|
181
|
+
img_src?: IContentField<string>;
|
|
182
|
+
mantine_radius?: IContentField<TMantineRadius>;
|
|
183
|
+
use_mantine_style?: IContentField<string>;
|
|
184
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/*
|
|
2
|
+
SPDX-FileCopyrightText: 2026 Humdek, University of Bern
|
|
3
|
+
SPDX-License-Identifier: MPL-2.0
|
|
4
|
+
*/
|
|
5
|
+
import type { IBaseStyle, IContentField, IStyleWithSpacing } from './base';
|
|
6
|
+
import type { TMantineRadius } from '../mantine/common';
|
|
7
|
+
import type { TMantineWidth, TMantineHeight } from './layout';
|
|
8
|
+
|
|
9
|
+
export type TMantineImageFit = 'contain' | 'cover' | 'fill' | 'none' | 'scale-down';
|
|
10
|
+
|
|
11
|
+
export interface IImageStyle extends IStyleWithSpacing {
|
|
12
|
+
style_name: 'image';
|
|
13
|
+
title?: IContentField<string>;
|
|
14
|
+
is_fluid?: IContentField<string>;
|
|
15
|
+
alt?: IContentField<string>;
|
|
16
|
+
img_src?: IContentField<string>;
|
|
17
|
+
height?: IContentField<string>;
|
|
18
|
+
width?: IContentField<string>;
|
|
19
|
+
mantine_image_fit?: IContentField<TMantineImageFit>;
|
|
20
|
+
mantine_width?: IContentField<TMantineWidth>;
|
|
21
|
+
mantine_height?: IContentField<TMantineHeight>;
|
|
22
|
+
mantine_radius?: IContentField<TMantineRadius>;
|
|
23
|
+
use_mantine_style?: IContentField<string>;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface IVideoStyle extends IBaseStyle {
|
|
27
|
+
style_name: 'video';
|
|
28
|
+
is_fluid?: IContentField<string>;
|
|
29
|
+
alt?: IContentField<string>;
|
|
30
|
+
sources?: IContentField<unknown[]>;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface IAudioStyle extends IBaseStyle {
|
|
34
|
+
style_name: 'audio';
|
|
35
|
+
sources?: IContentField<unknown[]>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface IFigureStyle extends IBaseStyle {
|
|
39
|
+
style_name: 'figure';
|
|
40
|
+
caption_title?: IContentField<string>;
|
|
41
|
+
caption?: IContentField<string>;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface ICarouselStyle extends IStyleWithSpacing {
|
|
45
|
+
style_name: 'carousel';
|
|
46
|
+
id_prefix?: IContentField<string>;
|
|
47
|
+
has_controls?: IContentField<string>;
|
|
48
|
+
has_indicators?: IContentField<string>;
|
|
49
|
+
has_crossfade?: IContentField<string>;
|
|
50
|
+
sources?: IContentField<unknown[]>;
|
|
51
|
+
mantine_height?: IContentField<string>;
|
|
52
|
+
mantine_carousel_slide_size?: IContentField<string>;
|
|
53
|
+
mantine_carousel_slide_gap?: IContentField<string>;
|
|
54
|
+
mantine_orientation?: IContentField<string>;
|
|
55
|
+
mantine_control_size?: IContentField<string>;
|
|
56
|
+
mantine_carousel_controls_offset?: IContentField<string>;
|
|
57
|
+
mantine_carousel_next_control_icon?: IContentField<string>;
|
|
58
|
+
mantine_carousel_previous_control_icon?: IContentField<string>;
|
|
59
|
+
mantine_loop?: IContentField<string>;
|
|
60
|
+
drag_free?: IContentField<string>;
|
|
61
|
+
mantine_carousel_align?: IContentField<string>;
|
|
62
|
+
mantine_carousel_contain_scroll?: IContentField<string>;
|
|
63
|
+
skip_snaps?: IContentField<string>;
|
|
64
|
+
mantine_carousel_in_view_threshold?: IContentField<string>;
|
|
65
|
+
mantine_carousel_duration?: IContentField<string>;
|
|
66
|
+
mantine_carousel_embla_options?: IContentField<string>;
|
|
67
|
+
use_mantine_style?: IContentField<string>;
|
|
68
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/*
|
|
2
|
+
SPDX-FileCopyrightText: 2026 Humdek, University of Bern
|
|
3
|
+
SPDX-License-Identifier: MPL-2.0
|
|
4
|
+
*/
|
|
5
|
+
import type { IBaseStyle, IContentField, IStyleWithSpacing } from './base';
|
|
6
|
+
import type {
|
|
7
|
+
TMantineSize,
|
|
8
|
+
TMantineColor,
|
|
9
|
+
TMantineRadius,
|
|
10
|
+
TMantineTitleOrder,
|
|
11
|
+
TMantineFieldsetVariant,
|
|
12
|
+
TMantineSpoilerMaxHeight,
|
|
13
|
+
} from '../mantine/common';
|
|
14
|
+
|
|
15
|
+
export type TMantineTitleTextWrap = 'wrap' | 'balance' | 'nowrap';
|
|
16
|
+
export type TMantineTitleLineClamp = '1' | '2' | '3' | '4' | '5' | string;
|
|
17
|
+
export type TMantineTextFontWeight = '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
|
|
18
|
+
export type TMantineTextFontStyle = 'normal' | 'italic';
|
|
19
|
+
export type TMantineTextDecoration = 'none' | 'underline' | 'line-through';
|
|
20
|
+
export type TMantineTextTransform = 'none' | 'uppercase' | 'capitalize' | 'lowercase';
|
|
21
|
+
export type TMantineTextAlign = 'left' | 'center' | 'right' | 'justify';
|
|
22
|
+
export type TMantineTextVariant = 'default' | 'gradient';
|
|
23
|
+
export type TMantineTextTruncate = 'none' | 'end' | 'start';
|
|
24
|
+
export type TMantineLineClamp = '2' | '3' | '4' | '5' | string;
|
|
25
|
+
export type TMantineTextInherit = '0' | '1';
|
|
26
|
+
export type TMantineTextSpan = '0' | '1';
|
|
27
|
+
export type TMantineIconSize = string;
|
|
28
|
+
|
|
29
|
+
export interface ITitleStyle extends IStyleWithSpacing {
|
|
30
|
+
style_name: 'title';
|
|
31
|
+
content?: IContentField<string>;
|
|
32
|
+
mantine_title_order?: IContentField<TMantineTitleOrder>;
|
|
33
|
+
mantine_size?: IContentField<TMantineSize>;
|
|
34
|
+
mantine_title_text_wrap?: IContentField<TMantineTitleTextWrap>;
|
|
35
|
+
mantine_title_line_clamp?: IContentField<TMantineTitleLineClamp>;
|
|
36
|
+
use_mantine_style?: IContentField<string>;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface ITextStyle extends IStyleWithSpacing {
|
|
40
|
+
style_name: 'text';
|
|
41
|
+
text?: IContentField<string>;
|
|
42
|
+
mantine_size?: IContentField<TMantineSize>;
|
|
43
|
+
mantine_color?: IContentField<TMantineColor>;
|
|
44
|
+
mantine_text_font_weight?: IContentField<TMantineTextFontWeight>;
|
|
45
|
+
mantine_text_font_style?: IContentField<TMantineTextFontStyle>;
|
|
46
|
+
mantine_text_text_decoration?: IContentField<TMantineTextDecoration>;
|
|
47
|
+
mantine_text_text_transform?: IContentField<TMantineTextTransform>;
|
|
48
|
+
mantine_text_align?: IContentField<TMantineTextAlign>;
|
|
49
|
+
mantine_text_variant?: IContentField<TMantineTextVariant>;
|
|
50
|
+
mantine_text_gradient?: IContentField<string>;
|
|
51
|
+
mantine_text_truncate?: IContentField<TMantineTextTruncate>;
|
|
52
|
+
mantine_text_line_clamp?: IContentField<TMantineLineClamp>;
|
|
53
|
+
mantine_text_inherit?: IContentField<TMantineTextInherit>;
|
|
54
|
+
mantine_text_span?: IContentField<TMantineTextSpan>;
|
|
55
|
+
use_mantine_style?: IContentField<string>;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface ICodeStyle extends IStyleWithSpacing {
|
|
59
|
+
style_name: 'code';
|
|
60
|
+
mantine_code_block?: IContentField<string>;
|
|
61
|
+
mantine_color?: IContentField<TMantineColor>;
|
|
62
|
+
use_mantine_style?: IContentField<string>;
|
|
63
|
+
content?: IContentField<string>;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export interface IHighlightStyle extends IStyleWithSpacing {
|
|
67
|
+
style_name: 'highlight';
|
|
68
|
+
text?: IContentField<string>;
|
|
69
|
+
mantine_highlight_highlight?: IContentField<string>;
|
|
70
|
+
mantine_color?: IContentField<TMantineColor>;
|
|
71
|
+
use_mantine_style?: IContentField<string>;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export interface IBlockquoteStyle extends IStyleWithSpacing {
|
|
75
|
+
style_name: 'blockquote';
|
|
76
|
+
content?: IContentField<string>;
|
|
77
|
+
cite?: IContentField<string>;
|
|
78
|
+
mantine_left_icon?: IContentField<string>;
|
|
79
|
+
mantine_icon_size?: IContentField<TMantineIconSize>;
|
|
80
|
+
mantine_color?: IContentField<TMantineColor>;
|
|
81
|
+
use_mantine_style?: IContentField<string>;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export interface IHtmlTagStyle extends IBaseStyle {
|
|
85
|
+
style_name: 'html-tag';
|
|
86
|
+
html_tag?: IContentField<string>;
|
|
87
|
+
html_tag_content?: IContentField<string>;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export interface IKbdStyle extends IStyleWithSpacing {
|
|
91
|
+
style_name: 'kbd';
|
|
92
|
+
label?: IContentField<string>;
|
|
93
|
+
mantine_size?: IContentField<TMantineSize>;
|
|
94
|
+
use_mantine_style?: IContentField<string>;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export interface ITypographyStyle extends IStyleWithSpacing {
|
|
98
|
+
style_name: 'typography';
|
|
99
|
+
use_mantine_style?: IContentField<string>;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export interface IFieldsetStyle extends IStyleWithSpacing {
|
|
103
|
+
style_name: 'fieldset';
|
|
104
|
+
label?: IContentField<string>;
|
|
105
|
+
legend?: IContentField<string>;
|
|
106
|
+
mantine_fieldset_variant?: IContentField<TMantineFieldsetVariant>;
|
|
107
|
+
mantine_radius?: IContentField<TMantineRadius>;
|
|
108
|
+
use_mantine_style?: IContentField<string>;
|
|
109
|
+
disabled?: IContentField<string>;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export interface ISpoilerStyle extends IStyleWithSpacing {
|
|
113
|
+
style_name: 'spoiler';
|
|
114
|
+
mantine_height?: IContentField<TMantineSpoilerMaxHeight>;
|
|
115
|
+
mantine_spoiler_show_label?: IContentField<string>;
|
|
116
|
+
mantine_spoiler_hide_label?: IContentField<string>;
|
|
117
|
+
use_mantine_style?: IContentField<string>;
|
|
118
|
+
}
|