ux4g-components-web 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.
@@ -0,0 +1,144 @@
1
+ export type ButtonVariant = 'primary' | 'outline-primary' | 'text-primary' | 'tonal-primary' | 'danger' | 'outline-danger' | 'text-danger' | 'tonal-danger';
2
+ export type ButtonSize = 'xl' | 'lg' | 'md' | 'sm' | 'xs';
3
+ export type ButtonShape = 'rectangle' | 'pill';
4
+ export declare const VARIANT_CLASS_MAP: Record<ButtonVariant, string>;
5
+ export declare const SIZE_CLASS_MAP: Record<ButtonSize, string | null>;
6
+ export declare function buildButtonClasses(variant: ButtonVariant, size: ButtonSize, disabled: boolean, loading: boolean, shape?: ButtonShape, extra?: string): string;
7
+ export type SpinnerVariant = 'primary' | 'inverse' | 'danger';
8
+ export type SpinnerSize = 'xl' | 'lg' | 'md' | 'sm' | 'xs';
9
+ export type SpinnerType = 'full' | 'split' | 'partial';
10
+ export declare const SPINNER_VARIANT_CLASS_PART: Record<SpinnerVariant, string>;
11
+ export declare const SPINNER_SIZE_CLASS_PART: Record<SpinnerSize, string>;
12
+ export declare const SPINNER_TYPE_CLASS_PART: Record<SpinnerType, string>;
13
+ /** Returns the CSS class(es) for a spinner.
14
+ * Base class: `ux4g-spinner-{variant}-{type}` (always present)
15
+ * Size class: `ux4g-spinner-{size}` (omitted when size is 'md' — the default)
16
+ * e.g. `ux4g-spinner-primary-full` (md default)
17
+ * `ux4g-spinner-primary-full ux4g-spinner-xl` (xl size)
18
+ */
19
+ export declare function buildSpinnerClasses(variant: SpinnerVariant, size: SpinnerSize, type: SpinnerType, extra?: string): string;
20
+ export type LinkVariant = 'default' | 'neutral';
21
+ export type LinkSize = 'sm' | 'md';
22
+ export declare function buildLinkClasses(variant: LinkVariant, size: LinkSize, extra?: string): string;
23
+ export type BadgeType = 'dot' | 'icon' | 'digit';
24
+ export type BadgeColor = 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'secondary' | 'tertiary' | 'neutral';
25
+ export type BadgeSize = 's' | 'm' | 'l' | 'profile-l' | 'profile-xl' | 'profile-2xl' | 'profile-3xl';
26
+ export declare function buildBadgeClasses(type: BadgeType, color: BadgeColor, size?: BadgeSize, extra?: string): string;
27
+ export type AvatarType = 'status' | 'profile' | 'group';
28
+ export type AvatarSize = 'xs' | 's' | 'm' | 'l' | 'xl' | '2xl' | '3xl';
29
+ export declare function buildAvatarClasses(avatarType: AvatarType, size?: AvatarSize, extra?: string): string;
30
+ export type ImageRatio = '1-1' | '4-3' | '3-2' | '16-10' | '16-9' | '2-1' | '5-2' | '3-1' | '1-16' | '2-3' | '3-4';
31
+ export type ImageOverlayPosition = 'bottom' | 'top';
32
+ export declare function buildImageContainerClasses(ratio?: ImageRatio, rounded?: boolean, overlay?: boolean, extra?: string): string;
33
+ export type ChipType = 'filter' | 'choice' | 'input';
34
+ export type ChipSize = 'md' | 'sm' | 'xs';
35
+ export declare function buildChipClasses(chipType: ChipType, size: ChipSize, active?: boolean, extra?: string): string;
36
+ export type TagVariant = 'tonal' | 'filled' | 'outline' | 'text';
37
+ export type TagColor = 'neutral' | 'brand' | 'success' | 'warning' | 'error' | 'info';
38
+ export declare function buildTagClasses(variant: TagVariant, color: TagColor, small?: boolean, extra?: string): string;
39
+ export type DividerOrientation = 'horizontal' | 'vertical';
40
+ export declare function buildDividerClasses(orientation: DividerOrientation, extra?: string): string;
41
+ export type BreadcrumbSeparator = 'divider' | 'icon';
42
+ export declare function buildBreadcrumbClasses(separator: BreadcrumbSeparator, extra?: string): string;
43
+ export type CheckboxSize = 'sm' | 'md' | 'lg';
44
+ export declare function buildCheckboxClasses(size: CheckboxSize, error?: boolean, extra?: string): string;
45
+ export type RadioSize = 'sm' | 'md' | 'lg';
46
+ export declare function buildRadioClasses(size: RadioSize, error?: boolean, extra?: string): string;
47
+ export type SwitchSize = 'sm' | 'md' | 'lg';
48
+ export declare function buildSwitchClasses(size: SwitchSize, extra?: string): string;
49
+ export type CardVariant = 'solid' | 'outline' | 'no-fill';
50
+ export type CardLayout = 'vertical' | 'horizontal';
51
+ export declare function buildCardClasses(variant: CardVariant, layout: CardLayout, extra?: string): string;
52
+ export type InputSize = 'sm' | 'md' | 'lg' | 'xl';
53
+ export type InputState = 'default' | 'error' | 'success' | 'warning';
54
+ export declare function buildInputContainerClasses(size: InputSize, state: InputState, extra?: string): string;
55
+ export type ListVariant = 'default' | 'error' | 'success' | 'warning';
56
+ export type ListSize = 's' | 'm' | 'l' | 'xl';
57
+ export declare function buildListClasses(variant: ListVariant, size: ListSize, extra?: string): string;
58
+ export type DropdownType = 'selection' | 'button' | 'overflow';
59
+ export type DropdownMode = 'single' | 'multi';
60
+ export type DropdownSize = 'sm' | 'md' | 'lg';
61
+ export type DropdownState = 'default' | 'error' | 'success' | 'warning';
62
+ export declare function buildDropdownClasses(type: DropdownType, mode: DropdownMode, size: DropdownSize, state: DropdownState, open?: boolean, extra?: string): string;
63
+ export type ComboboxType = 'single' | 'multi';
64
+ export type ComboboxSize = 'sm' | 'md' | 'lg';
65
+ export type ComboboxState = 'default' | 'error' | 'success' | 'warning';
66
+ export declare function buildComboboxClasses(type: ComboboxType, size: ComboboxSize, state: ComboboxState, open?: boolean, extra?: string): string;
67
+ export type ModalSize = 's' | 'm' | 'l';
68
+ export type ModalOpacity = '25' | '50' | '75';
69
+ export declare function buildModalBackdropClasses(opacity: ModalOpacity, blur?: boolean, open?: boolean, extra?: string): string;
70
+ export declare function buildModalBoxClasses(size: ModalSize, centerContent?: boolean, extra?: string): string;
71
+ export type AlertVariant = 'info' | 'success' | 'warning' | 'error';
72
+ export type AlertLayout = 'fluid' | 'center' | 'wide';
73
+ export type AlertPosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
74
+ export declare function buildAlertClasses(variant: AlertVariant, layout?: AlertLayout, extra?: string): string;
75
+ export declare function buildContextAlertClasses(variant: AlertVariant, extra?: string): string;
76
+ export declare function buildAlertContainerClasses(position: AlertPosition, extra?: string): string;
77
+ export type SearchSize = 's' | 'm' | 'lg';
78
+ export declare function buildSearchContainerClasses(size: SearchSize, extra?: string): string;
79
+ export type PaginationVariant = 'default' | 'dotted';
80
+ export type PaginationStyle = 'default' | 'solid' | 'translucent';
81
+ export declare function buildPaginationClasses(variant: PaginationVariant, paginationStyle?: PaginationStyle, extra?: string): string;
82
+ export type TableSize = 's' | 'm' | 'lg';
83
+ export type TableDivider = 'row' | 'column' | 'none';
84
+ export type TableZebra = 'none' | 'rows' | 'cols';
85
+ export declare function buildTableClasses(size: TableSize, divider?: TableDivider, zebra?: TableZebra, interactive?: boolean, sortable?: boolean, resizable?: boolean, headerBrand?: boolean, extra?: string): string;
86
+ export type PopoverPlacement = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end';
87
+ export declare function buildPopoverClasses(placement: PopoverPlacement, show?: boolean, extra?: string): string;
88
+ export type TooltipPlacement = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right' | 'left-center' | 'right-center';
89
+ export type TooltipSize = 's' | 'xs';
90
+ export declare function buildTooltipClasses(placement: TooltipPlacement, size: TooltipSize, extra?: string): string;
91
+ export type TabVariant = 'underline' | 'pill';
92
+ export type TabSize = 'sm' | 'md' | 'lg';
93
+ export declare function buildTabClasses(variant: TabVariant, size: TabSize, vertical?: boolean, extra?: string): string;
94
+ export type IconButtonVariant = 'primary' | 'outline-primary' | 'tonal-primary' | 'text-primary';
95
+ export type IconButtonSize = 'xl' | 'lg' | 'md' | 'sm' | 'xs';
96
+ export declare function buildIconButtonClasses(variant: IconButtonVariant, size: IconButtonSize, pill?: boolean, extra?: string): string;
97
+ export declare function buildAccessibilityBarClasses(extra?: string): string;
98
+ export type AccordionArrowPosition = 'right' | 'left';
99
+ export type AccordionVariant = 'default' | 'bordered';
100
+ export declare function buildAccordionClasses(arrowPosition?: AccordionArrowPosition, variant?: AccordionVariant, extra?: string): string;
101
+ export type StepperOrientation = 'horizontal' | 'vertical';
102
+ export type StepperAlignment = 'default' | 'center' | 'left';
103
+ export type StepperVariant = 'default' | 'bottom-line' | 'bottom-line-fill' | 'mobile' | 'progress';
104
+ export type StepperSize = 'default' | 's';
105
+ export declare function buildStepperClasses(orientation?: StepperOrientation, alignment?: StepperAlignment, variant?: StepperVariant, size?: StepperSize, extra?: string): string;
106
+ export type SliderSize = 'sm' | 'md';
107
+ export declare function buildSliderFieldClasses(size?: SliderSize, extra?: string): string;
108
+ export type DrawerPlacement = 'right' | 'left' | 'top' | 'bottom';
109
+ export declare function buildDrawerClasses(placement: DrawerPlacement, open?: boolean, extra?: string): string;
110
+ export type DateTimePickerMode = 'date' | 'time';
111
+ export declare function buildDateTimePickerClasses(mode: DateTimePickerMode, extra?: string): string;
112
+ export type StatusPipelineOrientation = 'horizontal' | 'vertical';
113
+ export type StatusPipelineAlignment = 'default' | 'center' | 'left';
114
+ export type StatusPipelineVariant = 'default' | 'bottom-line' | 'bottom-line-fill' | 'mobile' | 'progress';
115
+ export type StatusPipelineSize = 'default' | 's';
116
+ export declare function buildStatusPipelineClasses(orientation?: StatusPipelineOrientation, alignment?: StatusPipelineAlignment, variant?: StatusPipelineVariant, size?: StatusPipelineSize, extra?: string): string;
117
+ export type JourneyTimelineOrientation = 'vertical' | 'horizontal';
118
+ export declare function buildJourneyTimelineClasses(orientation?: JourneyTimelineOrientation, extra?: string): string;
119
+ export declare function buildFormFieldGroupClasses(extra?: string): string;
120
+ export type OtpInputState = 'default' | 'success' | 'error' | 'locked';
121
+ export declare function buildOtpInputClasses(state?: OtpInputState, extra?: string): string;
122
+ export type FileUploadState = 'default' | 'default-vle' | 'selecting' | 'scanning' | 'uploaded' | 'uploaded-vle' | 'error';
123
+ export declare function buildFileUploadClasses(state?: FileUploadState, extra?: string): string;
124
+ export type ProgressIndicatorType = 'bar' | 'circle';
125
+ export type ProgressIndicatorSize = 'xs' | 's' | 'm' | 'l' | 'xl' | '2xl' | '3xl';
126
+ export declare function buildProgressIndicatorClasses(type: ProgressIndicatorType, extra?: string): string;
127
+ export declare function buildFeedbackClasses(extra?: string): string;
128
+ export type DraftStatusBannerVariant = 'default' | 'auto' | 'success';
129
+ export declare function buildDraftStatusBannerClasses(variant?: DraftStatusBannerVariant, extra?: string): string;
130
+ export type SlaProgressIndicatorType = 'circle' | 'linear' | 'badge';
131
+ export declare function buildSlaProgressIndicatorClasses(type: SlaProgressIndicatorType, extra?: string): string;
132
+ export declare function buildCarouselClasses(extra?: string): string;
133
+ export declare function buildEmptyStateClasses(extra?: string): string;
134
+ export type ChipGroupVariant = 'filter' | 'choice';
135
+ export declare function buildChipGroupClasses(variant?: ChipGroupVariant, active?: boolean, extra?: string): string;
136
+ export declare function buildNavbarClasses(extra?: string): string;
137
+ export type SocialLinksSize = 'sm' | 'md' | 'lg';
138
+ export declare function buildSocialLinksClasses(size?: SocialLinksSize, extra?: string): string;
139
+ export type SlotGridVariant = 'weekly' | 'compact';
140
+ export declare function buildSlotGridClasses(variant?: SlotGridVariant, extra?: string): string;
141
+ export type FooterTheme = 'default' | 'primary' | 'dark';
142
+ export declare function buildFooterClasses(theme?: FooterTheme, extra?: string): string;
143
+ export type ResultListRowVariation = 'default' | 'v1' | 'v2' | 'v3' | 'v4' | 'v5';
144
+ export declare function buildResultListRowClasses(variation?: ResultListRowVariation, extra?: string): string;
@@ -0,0 +1,524 @@
1
+ // Maps variant → CSS class
2
+ const VARIANT_CLASS_MAP = {
3
+ 'primary': 'ux4g-btn-primary',
4
+ 'outline-primary': 'ux4g-btn-outline-primary',
5
+ 'text-primary': 'ux4g-btn-text-primary',
6
+ 'tonal-primary': 'ux4g-btn-tonal-primary',
7
+ 'danger': 'ux4g-btn-danger',
8
+ 'outline-danger': 'ux4g-btn-outline-danger',
9
+ 'text-danger': 'ux4g-btn-text-danger',
10
+ 'tonal-danger': 'ux4g-btn-tonal-danger',
11
+ };
12
+ // Maps size → CSS class
13
+ const SIZE_CLASS_MAP = {
14
+ 'xl': 'ux4g-btn-xl',
15
+ 'lg': 'ux4g-btn-lg',
16
+ 'md': 'ux4g-btn-md',
17
+ 'sm': 'ux4g-btn-sm',
18
+ 'xs': 'ux4g-btn-xs',
19
+ };
20
+ // Pure utility — used by both React and Angular wrappers
21
+ function buildButtonClasses(variant, size, disabled, loading, shape, extra) {
22
+ const classes = [VARIANT_CLASS_MAP[variant]];
23
+ const sizeClass = SIZE_CLASS_MAP[size];
24
+ if (sizeClass)
25
+ classes.push(sizeClass);
26
+ if (shape === 'pill')
27
+ classes.push('ux4g-btn-pill');
28
+ if (disabled)
29
+ classes.push('ux4g-btn-disabled');
30
+ if (loading)
31
+ classes.push('ux4g-btn-loading');
32
+ if (extra)
33
+ classes.push(extra);
34
+ return classes.join(' ');
35
+ }
36
+ const SPINNER_VARIANT_CLASS_PART = {
37
+ primary: 'primary',
38
+ inverse: 'inverse',
39
+ danger: 'danger',
40
+ };
41
+ const SPINNER_SIZE_CLASS_PART = {
42
+ xl: 'xl',
43
+ lg: 'lg',
44
+ md: 'md',
45
+ sm: 'sm',
46
+ xs: 'xs',
47
+ };
48
+ const SPINNER_TYPE_CLASS_PART = {
49
+ full: 'full',
50
+ split: 'split',
51
+ partial: 'partial',
52
+ };
53
+ /** Returns the CSS class(es) for a spinner.
54
+ * Base class: `ux4g-spinner-{variant}-{type}` (always present)
55
+ * Size class: `ux4g-spinner-{size}` (omitted when size is 'md' — the default)
56
+ * e.g. `ux4g-spinner-primary-full` (md default)
57
+ * `ux4g-spinner-primary-full ux4g-spinner-xl` (xl size)
58
+ */
59
+ function buildSpinnerClasses(variant, size, type, extra) {
60
+ const base = `ux4g-spinner-${variant}-${type}`;
61
+ const sizeClass = size !== 'md' ? `ux4g-spinner-${size}` : null;
62
+ const parts = [base];
63
+ if (sizeClass)
64
+ parts.push(sizeClass);
65
+ if (extra)
66
+ parts.push(extra);
67
+ return parts.join(' ');
68
+ }
69
+ function buildLinkClasses(variant, size, extra) {
70
+ const base = variant === 'neutral'
71
+ ? `ux4g-text-link-neutral-${size}`
72
+ : `ux4g-text-link-${size}`;
73
+ return extra ? `${base} ${extra}` : base;
74
+ }
75
+ function buildBadgeClasses(type, color, size, extra) {
76
+ const parts = [`ux4g-badge-${type}-${color}`];
77
+ if (size)
78
+ parts.push(`ux4g-badge-${size}`);
79
+ if (extra)
80
+ parts.push(extra);
81
+ return parts.join(' ');
82
+ }
83
+ function buildAvatarClasses(avatarType, size, extra) {
84
+ if (avatarType === 'group') {
85
+ return extra ? `ux4g-avatar-group ${extra}` : 'ux4g-avatar-group';
86
+ }
87
+ const parts = ['ux4g-avatar', `ux4g-avatar-${avatarType}`];
88
+ if (size)
89
+ parts.push(`ux4g-avatar-${size}`);
90
+ if (extra)
91
+ parts.push(extra);
92
+ return parts.join(' ');
93
+ }
94
+ function buildImageContainerClasses(ratio, rounded, overlay, extra) {
95
+ const parts = [];
96
+ if (overlay)
97
+ parts.push('ux4g-img-overlay');
98
+ if (rounded)
99
+ parts.push('ux4g-img-rounded');
100
+ if (ratio)
101
+ parts.push(`ux4g-ratio-${ratio}`);
102
+ if (extra)
103
+ parts.push(extra);
104
+ return parts.join(' ');
105
+ }
106
+ function buildChipClasses(chipType, size, active, extra) {
107
+ // xs is only valid for input chips; filter and choice clamp to sm
108
+ const effectiveSize = (chipType !== 'input' && size === 'xs') ? 'sm' : size;
109
+ const parts = [`ux4g-${chipType}-chip-${effectiveSize}`];
110
+ if (active)
111
+ parts.push('active');
112
+ if (extra)
113
+ parts.push(extra);
114
+ return parts.join(' ');
115
+ }
116
+ function buildTagClasses(variant, color, small, extra) {
117
+ const parts = [`ux4g-tag-${variant}-${color}`];
118
+ if (small)
119
+ parts.push('ux4g-tag-s');
120
+ if (extra)
121
+ parts.push(extra);
122
+ return parts.join(' ');
123
+ }
124
+ function buildDividerClasses(orientation, extra) {
125
+ const base = `ux4g-divider-${orientation}`;
126
+ return extra ? `${base} ${extra}` : base;
127
+ }
128
+ function buildBreadcrumbClasses(separator, extra) {
129
+ const base = `ux4g-breadcrumb ux4g-breadcrumb-${separator}`;
130
+ return extra ? `${base} ${extra}` : base;
131
+ }
132
+ function buildCheckboxClasses(size, error, extra) {
133
+ const parts = ['ux4g-checkbox', `ux4g-checkbox-${size}`];
134
+ if (error)
135
+ parts.push('ux4g-checkbox-error');
136
+ if (extra)
137
+ parts.push(extra);
138
+ return parts.join(' ');
139
+ }
140
+ function buildRadioClasses(size, error, extra) {
141
+ const parts = ['ux4g-radio', `ux4g-radio-${size}`];
142
+ if (error)
143
+ parts.push('ux4g-radio-error');
144
+ if (extra)
145
+ parts.push(extra);
146
+ return parts.join(' ');
147
+ }
148
+ function buildSwitchClasses(size, extra) {
149
+ const base = `ux4g-switch ux4g-switch-${size}`;
150
+ return extra ? `${base} ${extra}` : base;
151
+ }
152
+ function buildCardClasses(variant, layout, extra) {
153
+ const parts = ['ux4g-card', `ux4g-card-${variant}`, `ux4g-card-${layout}`];
154
+ if (extra)
155
+ parts.push(extra);
156
+ return parts.join(' ');
157
+ }
158
+ function buildInputContainerClasses(size, state, extra) {
159
+ const parts = ['ux4g-input-container', `ux4g-input-${size}`, `ux4g-input-${state}`];
160
+ if (extra)
161
+ parts.push(extra);
162
+ return parts.join(' ');
163
+ }
164
+ function buildListClasses(variant, size, extra) {
165
+ const parts = ['ux4g-list', `ux4g-list-${variant}`, `ux4g-list-${size}`];
166
+ if (extra)
167
+ parts.push(extra);
168
+ return parts.join(' ');
169
+ }
170
+ function buildDropdownClasses(type, mode, size, state, open, extra) {
171
+ const parts = [
172
+ 'ux4g-dropdown',
173
+ `ux4g-dropdown-${type}`,
174
+ `ux4g-dropdown-${mode}`,
175
+ `ux4g-dropdown-${size}`,
176
+ `ux4g-dropdown-${state}`,
177
+ ];
178
+ if (open)
179
+ parts.push('is-open');
180
+ if (extra)
181
+ parts.push(extra);
182
+ return parts.join(' ');
183
+ }
184
+ function buildComboboxClasses(type, size, state, open, extra) {
185
+ const parts = [
186
+ 'ux4g-combobox',
187
+ `ux4g-combobox-${type}`,
188
+ `ux4g-combobox-${size}`,
189
+ `ux4g-combobox-${state}`,
190
+ ];
191
+ if (open)
192
+ parts.push('is-open');
193
+ if (extra)
194
+ parts.push(extra);
195
+ return parts.join(' ');
196
+ }
197
+ function buildModalBackdropClasses(opacity, blur, open, extra) {
198
+ const parts = ['ux4g-modal-backdrop', `ux4g-modal-backdrop-${opacity}`];
199
+ if (blur)
200
+ parts.push('ux4g-modal-backdrop-blur');
201
+ if (open)
202
+ parts.push('is-open');
203
+ if (extra)
204
+ parts.push(extra);
205
+ return parts.join(' ');
206
+ }
207
+ function buildModalBoxClasses(size, centerContent, extra) {
208
+ const parts = ['ux4g-modal-box', `ux4g-modal-${size}`];
209
+ if (centerContent)
210
+ parts.push('ux4g-modal-center-content');
211
+ if (extra)
212
+ parts.push(extra);
213
+ return parts.join(' ');
214
+ }
215
+ function buildAlertClasses(variant, layout, extra) {
216
+ const parts = ['ux4g-alert', `ux4g-alert-${variant}`];
217
+ if (layout === 'center')
218
+ parts.push('ux4g-alert-center');
219
+ else if (layout === 'wide')
220
+ parts.push('ux4g-alert-wide');
221
+ if (extra)
222
+ parts.push(extra);
223
+ return parts.join(' ');
224
+ }
225
+ function buildContextAlertClasses(variant, extra) {
226
+ const parts = ['ux4g-context-alert', `ux4g-alert-${variant}`];
227
+ if (extra)
228
+ parts.push(extra);
229
+ return parts.join(' ');
230
+ }
231
+ function buildAlertContainerClasses(position, extra) {
232
+ const parts = ['ux4g-alert-container', `ux4g-alert-${position}`];
233
+ if (extra)
234
+ parts.push(extra);
235
+ return parts.join(' ');
236
+ }
237
+ function buildSearchContainerClasses(size, extra) {
238
+ const base = `ux4g-search-container ux4g-search-${size}`;
239
+ return extra ? `${base} ${extra}` : base;
240
+ }
241
+ function buildPaginationClasses(variant, paginationStyle, extra) {
242
+ const parts = ['ux4g-pagination'];
243
+ if (variant === 'dotted') {
244
+ parts.push('ux4g-pagination-dotted');
245
+ if (paginationStyle === 'solid')
246
+ parts.push('ux4g-pagination-solid');
247
+ else if (paginationStyle === 'translucent')
248
+ parts.push('ux4g-pagination-translucent');
249
+ }
250
+ if (extra)
251
+ parts.push(extra);
252
+ return parts.join(' ');
253
+ }
254
+ function buildTableClasses(size, divider, zebra, interactive, sortable, resizable, headerBrand, extra) {
255
+ const parts = ['ux4g-table', `ux4g-table-${size}`];
256
+ if (divider === 'column')
257
+ parts.push('ux4g-table-column-dividers');
258
+ else if (divider === 'none')
259
+ parts.push('ux4g-table-no-row-dividers');
260
+ if (zebra === 'rows')
261
+ parts.push('ux4g-table-zebra-rows');
262
+ else if (zebra === 'cols')
263
+ parts.push('ux4g-table-zebra-cols');
264
+ if (interactive)
265
+ parts.push('ux4g-table-interactive');
266
+ if (sortable)
267
+ parts.push('ux4g-table-sortable');
268
+ if (resizable)
269
+ parts.push('ux4g-table-resizable');
270
+ if (headerBrand)
271
+ parts.push('ux4g-table-header-brand');
272
+ if (extra)
273
+ parts.push(extra);
274
+ return parts.join(' ');
275
+ }
276
+ function buildPopoverClasses(placement, show, extra) {
277
+ const parts = ['ux4g-popover', `ux4g-popover-${placement}`];
278
+ if (show)
279
+ parts.push('show');
280
+ if (extra)
281
+ parts.push(extra);
282
+ return parts.join(' ');
283
+ }
284
+ function buildTooltipClasses(placement, size, extra) {
285
+ const parts = ['ux4g-tooltip', `ux4g-tooltip-${placement}`, `ux4g-tooltip-${size}`];
286
+ if (extra)
287
+ parts.push(extra);
288
+ return parts.join(' ');
289
+ }
290
+ function buildTabClasses(variant, size, vertical, extra) {
291
+ const parts = ['ux4g-tab', `ux4g-tab-${variant}`, `ux4g-tab-${size}`];
292
+ if (vertical)
293
+ parts.push('ux4g-tab-vertical');
294
+ if (extra)
295
+ parts.push(extra);
296
+ return parts.join(' ');
297
+ }
298
+ function buildIconButtonClasses(variant, size, pill, extra) {
299
+ const parts = ['ux4g-icon-btn', `ux4g-icon-btn-${variant}`, `ux4g-icon-btn-${size}`];
300
+ if (pill)
301
+ parts.push('ux4g-icon-btn-pill');
302
+ if (extra)
303
+ parts.push(extra);
304
+ return parts.join(' ');
305
+ }
306
+ // -- Accessibility Bar --------------------------------------------------------
307
+ function buildAccessibilityBarClasses(extra) {
308
+ return extra ? `ux4g-topbar ${extra}` : 'ux4g-topbar';
309
+ }
310
+ function buildAccordionClasses(arrowPosition, variant, extra) {
311
+ const parts = ['ux4g-accordion'];
312
+ if (arrowPosition === 'right')
313
+ parts.push('ux4g-accordion-arrow-right');
314
+ else if (arrowPosition === 'left')
315
+ parts.push('ux4g-accordion-arrow-left');
316
+ if (variant === 'bordered')
317
+ parts.push('ux4g-accordion-bordered');
318
+ if (extra)
319
+ parts.push(extra);
320
+ return parts.join(' ');
321
+ }
322
+ function buildStepperClasses(orientation, alignment, variant, size, extra) {
323
+ const parts = ['ux4g-stepper'];
324
+ if (orientation === 'vertical') {
325
+ parts.push('ux4g-stepper-vertical');
326
+ }
327
+ else {
328
+ // horizontal (default) — only add classes if alignment is non-default
329
+ if (alignment === 'center') {
330
+ parts.push('ux4g-stepper-horizontal');
331
+ parts.push('ux4g-stepper-center');
332
+ }
333
+ else if (alignment === 'left') {
334
+ parts.push('ux4g-stepper-horizontal');
335
+ parts.push('ux4g-stepper-left');
336
+ }
337
+ }
338
+ if (variant === 'bottom-line')
339
+ parts.push('ux4g-stepper-bottom-line');
340
+ else if (variant === 'bottom-line-fill') {
341
+ parts.push('ux4g-stepper-bottom-line');
342
+ parts.push('ux4g-stepper-bottom-line-fill');
343
+ }
344
+ else if (variant === 'mobile')
345
+ parts.push('ux4g-stepper-mobile');
346
+ else if (variant === 'progress')
347
+ parts.push('ux4g-stepper-progress');
348
+ if (size === 's')
349
+ parts.push('ux4g-stepper-s');
350
+ if (extra)
351
+ parts.push(extra);
352
+ return parts.join(' ');
353
+ }
354
+ function buildSliderFieldClasses(size, extra) {
355
+ const parts = ['ux4g-slider-field'];
356
+ if (size === 'md')
357
+ parts.push('ux4g-slider-md');
358
+ if (extra)
359
+ parts.push(extra);
360
+ return parts.join(' ');
361
+ }
362
+ function buildDrawerClasses(placement, open, extra) {
363
+ const parts = ['ux4g-drawer', `ux4g-drawer-${placement}`];
364
+ if (open)
365
+ parts.push('ux4g-drawer-open');
366
+ if (extra)
367
+ parts.push(extra);
368
+ return parts.join(' ');
369
+ }
370
+ function buildDateTimePickerClasses(mode, extra) {
371
+ const base = mode === 'date' ? 'ux4g-date-picker-container' : 'ux4g-time-picker-container';
372
+ return extra ? `${base} ${extra}` : base;
373
+ }
374
+ function buildStatusPipelineClasses(orientation, alignment, variant, size, extra) {
375
+ const parts = ['ux4g-status-pipeline-stepper'];
376
+ if (orientation === 'vertical') {
377
+ parts.push('ux4g-status-pipeline-vertical');
378
+ // alignment is IGNORED when orientation='vertical'
379
+ }
380
+ else {
381
+ // horizontal (default) — only add classes if alignment is non-default
382
+ if (alignment === 'center') {
383
+ parts.push('ux4g-status-pipeline-horizontal');
384
+ parts.push('ux4g-status-pipeline-center');
385
+ }
386
+ else if (alignment === 'left') {
387
+ parts.push('ux4g-status-pipeline-horizontal');
388
+ parts.push('ux4g-status-pipeline-left');
389
+ }
390
+ }
391
+ if (variant === 'bottom-line') {
392
+ parts.push('ux4g-status-pipeline-bottom-line');
393
+ }
394
+ else if (variant === 'bottom-line-fill') {
395
+ parts.push('ux4g-status-pipeline-bottom-line');
396
+ parts.push('ux4g-status-pipeline-bottom-line-fill');
397
+ }
398
+ else if (variant === 'mobile') {
399
+ parts.push('ux4g-status-pipeline-mobile');
400
+ }
401
+ else if (variant === 'progress') {
402
+ parts.push('ux4g-status-pipeline-progress');
403
+ }
404
+ if (size === 's')
405
+ parts.push('ux4g-status-pipeline-s');
406
+ if (extra)
407
+ parts.push(extra);
408
+ return parts.join(' ');
409
+ }
410
+ function buildJourneyTimelineClasses(orientation, extra) {
411
+ const effectiveOrientation = orientation ?? 'vertical';
412
+ const base = `ux4g-journey-timeline ux4g-journey-timeline--${effectiveOrientation}`;
413
+ return extra ? `${base} ${extra}` : base;
414
+ }
415
+ // -- Form Field Group ---------------------------------------------------------
416
+ function buildFormFieldGroupClasses(extra) {
417
+ return extra ? `ux4g-form-group ${extra}` : 'ux4g-form-group';
418
+ }
419
+ function buildOtpInputClasses(state, extra) {
420
+ const parts = ['ux4g-otp'];
421
+ if (state && state !== 'default')
422
+ parts.push(`ux4g-otp-${state}`);
423
+ if (extra)
424
+ parts.push(extra);
425
+ return parts.join(' ');
426
+ }
427
+ function buildFileUploadClasses(state, extra) {
428
+ const parts = ['ux4g-upload'];
429
+ if (state)
430
+ parts.push(`ux4g-upload-state-${state}`);
431
+ if (extra)
432
+ parts.push(extra);
433
+ return parts.join(' ');
434
+ }
435
+ function buildProgressIndicatorClasses(type, extra) {
436
+ const base = type === 'bar' ? 'ux4g-progress-bar' : 'ux4g-progress-circle';
437
+ return extra ? `${base} ${extra}` : base;
438
+ }
439
+ // -- Feedback -----------------------------------------------------------------
440
+ function buildFeedbackClasses(extra) {
441
+ return extra ? `ux4g-feedback ${extra}` : 'ux4g-feedback';
442
+ }
443
+ function buildDraftStatusBannerClasses(variant, extra) {
444
+ let base;
445
+ if (variant === 'auto') {
446
+ base = 'ux4g-auto-daft-staus-bar';
447
+ }
448
+ else if (variant === 'success') {
449
+ base = 'ux4g-success-daft-staus-bar';
450
+ }
451
+ else {
452
+ // 'default' or undefined
453
+ base = 'ux4g-daft-staus-bar';
454
+ }
455
+ return extra ? `${base} ${extra}` : base;
456
+ }
457
+ function buildSlaProgressIndicatorClasses(type, extra) {
458
+ const base = `ux4g-sla-${type}`;
459
+ return extra ? `${base} ${extra}` : base;
460
+ }
461
+ // -- Carousel -----------------------------------------------------------------
462
+ function buildCarouselClasses(extra) {
463
+ return extra ? `ux4g-carousel ${extra}` : 'ux4g-carousel';
464
+ }
465
+ // -- Empty State --------------------------------------------------------------
466
+ function buildEmptyStateClasses(extra) {
467
+ return extra ? `ux4g-empty-state ${extra}` : 'ux4g-empty-state';
468
+ }
469
+ function buildChipGroupClasses(variant, active, extra) {
470
+ const base = variant === 'choice' ? 'ux4g-choice-chip-group' : 'ux4g-filter-chip-group';
471
+ const parts = [base];
472
+ if (active)
473
+ parts.push('active');
474
+ if (extra)
475
+ parts.push(extra);
476
+ return parts.join(' ');
477
+ }
478
+ // -- Navbar -------------------------------------------------------------------
479
+ function buildNavbarClasses(extra) {
480
+ return extra ? `ux4g-navbar ${extra}` : 'ux4g-navbar';
481
+ }
482
+ function buildSocialLinksClasses(size, extra) {
483
+ let gapClass;
484
+ if (size === 'sm') {
485
+ gapClass = 'ux4g-gap-xs';
486
+ }
487
+ else if (size === 'lg') {
488
+ gapClass = 'ux4g-gap-m';
489
+ }
490
+ else {
491
+ // 'md' or undefined (default)
492
+ gapClass = 'ux4g-gap-s';
493
+ }
494
+ const base = `ux4g-d-flex ${gapClass}`;
495
+ return extra ? `${base} ${extra}` : base;
496
+ }
497
+ function buildSlotGridClasses(variant, extra) {
498
+ const base = variant === 'compact'
499
+ ? 'ux4g-time-slot-compact-container'
500
+ : 'ux4g-time-slot-weekly-container';
501
+ return extra ? `${base} ${extra}` : base;
502
+ }
503
+ function buildFooterClasses(theme, extra) {
504
+ let base;
505
+ if (theme === 'primary')
506
+ base = 'ux4g-footer-primary';
507
+ else if (theme === 'dark')
508
+ base = 'ux4g-footer-dark';
509
+ else
510
+ base = '';
511
+ if (extra)
512
+ return base ? `${base} ${extra}` : extra;
513
+ return base;
514
+ }
515
+ function buildResultListRowClasses(variation, extra) {
516
+ const parts = ['ux4g-result-list'];
517
+ if (variation && variation !== 'default')
518
+ parts.push(`ux4g-result-list-${variation}`);
519
+ if (extra)
520
+ parts.push(extra);
521
+ return parts.join(' ');
522
+ }
523
+
524
+ export { SIZE_CLASS_MAP, SPINNER_SIZE_CLASS_PART, SPINNER_TYPE_CLASS_PART, SPINNER_VARIANT_CLASS_PART, VARIANT_CLASS_MAP, buildAccessibilityBarClasses, buildAccordionClasses, buildAlertClasses, buildAlertContainerClasses, buildAvatarClasses, buildBadgeClasses, buildBreadcrumbClasses, buildButtonClasses, buildCardClasses, buildCarouselClasses, buildCheckboxClasses, buildChipClasses, buildChipGroupClasses, buildComboboxClasses, buildContextAlertClasses, buildDateTimePickerClasses, buildDividerClasses, buildDraftStatusBannerClasses, buildDrawerClasses, buildDropdownClasses, buildEmptyStateClasses, buildFeedbackClasses, buildFileUploadClasses, buildFooterClasses, buildFormFieldGroupClasses, buildIconButtonClasses, buildImageContainerClasses, buildInputContainerClasses, buildJourneyTimelineClasses, buildLinkClasses, buildListClasses, buildModalBackdropClasses, buildModalBoxClasses, buildNavbarClasses, buildOtpInputClasses, buildPaginationClasses, buildPopoverClasses, buildProgressIndicatorClasses, buildRadioClasses, buildResultListRowClasses, buildSearchContainerClasses, buildSlaProgressIndicatorClasses, buildSliderFieldClasses, buildSlotGridClasses, buildSocialLinksClasses, buildSpinnerClasses, buildStatusPipelineClasses, buildStepperClasses, buildSwitchClasses, buildTabClasses, buildTableClasses, buildTagClasses, buildTooltipClasses };