@selfhelp/shared 1.14.8 → 1.14.9
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 +36 -0
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +13 -0
- package/dist/index.mjs +12 -0
- package/dist/plugin-sdk/index.d.mts +1 -1
- package/dist/plugin-sdk/index.d.ts +1 -1
- package/dist/registry/index.d.mts +2 -2
- package/dist/registry/index.d.ts +2 -2
- package/dist/{styles.registry-CRtHSMQq.d.ts → styles.registry-BkHw6CdG.d.ts} +17 -8
- package/dist/{styles.registry-zgJnv5zg.d.mts → styles.registry-CImqMXS4.d.mts} +17 -8
- package/dist/theme/index.d.mts +10 -1
- package/dist/theme/index.d.ts +10 -1
- package/dist/theme/index.js +13 -0
- package/dist/theme/index.mjs +12 -0
- package/package.json +1 -1
- package/src/theme/__tests__/semantic.test.ts +8 -0
- package/src/theme/semantic.ts +22 -0
- package/src/types/styles/forms.ts +3 -2
- package/src/types/styles/interactive.ts +2 -1
- package/src/types/styles/layout.ts +16 -2
- package/src/types/styles/typography.ts +11 -4
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,42 @@ All notable changes to `@selfhelp/shared` will be documented in this file.
|
|
|
9
9
|
|
|
10
10
|
This project follows semantic versioning.
|
|
11
11
|
|
|
12
|
+
## v1.14.9
|
|
13
|
+
|
|
14
|
+
Style polish wave (card / card-segment / checkbox / chip / code / title) — align
|
|
15
|
+
the typed contracts with the backend `Version20260619191224` migration and the
|
|
16
|
+
coupled web + mobile renderer reads. Patch bump: renamed optional style fields,
|
|
17
|
+
additive optional content/visual fields, and a new additive mobile mapper helper.
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- **`ICardStyle`:** border is now the cross-platform `shared_border`
|
|
22
|
+
(`TSharedBorder`); the web-only `web_border` was replaced (the global
|
|
23
|
+
`web_border` field stays on indicator/notification/paper/validate). Added the
|
|
24
|
+
optional auto-styled `title` and `img_src` content fields (rendered only when
|
|
25
|
+
non-empty) and the explicit `web_card_padding` (`TMantineCardPadding`).
|
|
26
|
+
- **`ICardSegmentStyle`:** added `shared_border` (Mantine `Card.Section`
|
|
27
|
+
`withBorder` / themed divider on mobile) and the web-only
|
|
28
|
+
`web_segment_inherit_padding` (Mantine `inheritPadding`).
|
|
29
|
+
- **`ICheckboxStyle`:** `web_checkbox_label_position` →
|
|
30
|
+
`shared_label_position` (`TSharedLabelPosition`; honoured on both platforms).
|
|
31
|
+
- **`IChipStyle`:** `web_chip_variant` → `shared_chip_variant`
|
|
32
|
+
(`TMantineChipVariant`; cross-platform).
|
|
33
|
+
- **`ICodeStyle`:** `web_code_block` → `code_block` (cross-platform
|
|
34
|
+
block-vs-inline) and added `shared_radius` (`TSharedRadius`).
|
|
35
|
+
- **`ITitleStyle`:** added `shared_color` (`TMantineColor`); `web_title_order` →
|
|
36
|
+
`title_order` (`TMantineTitleOrder`) and `web_title_line_clamp` →
|
|
37
|
+
`shared_line_clamp` (`TMantineTitleLineClamp`). `web_title_text_wrap` stays
|
|
38
|
+
web-only.
|
|
39
|
+
|
|
40
|
+
### Added
|
|
41
|
+
|
|
42
|
+
- **`mapChipVariantToHeroUiVariant(variant)`:** maps the chip variant token
|
|
43
|
+
(`filled`/`outline`/`light`) onto the HeroUI Native Chip `variant`
|
|
44
|
+
(`primary` | `secondary` | `tertiary` | `soft`): filled → primary, light →
|
|
45
|
+
soft, outline → tertiary.
|
|
46
|
+
- **`TSharedBorder`, `TMantineCardPadding`, `TSharedLabelPosition`** helper types.
|
|
47
|
+
|
|
12
48
|
## v1.14.8
|
|
13
49
|
|
|
14
50
|
Accordion polish wave (accordion / accordion-item) — align the typed contracts
|
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { T as TStyleName, j as IContentField } from './styles.registry-
|
|
2
|
-
export { B as BASE_STYLE_REGISTRY, k as IAccordionItemStyle, l as IAccordionStyle, m as IActionIconStyle, n as IAlertStyle, o as IAspectRatioStyle, p as IAudioStyle, q as IAvatarStyle, r as IBackgroundImageStyle, s as IBadgeStyle, t as IBaseStyle, u as IBlockquoteStyle, v as IBoxStyle, w as IButtonStyle, x as ICardSegmentStyle, y as ICardStyle, z as ICarouselStyle, A as ICenterStyle, C as ICheckboxStyle, D as IChipStyle, E as ICodeStyle, F as IColorInputStyle, G as IColorPickerStyle, H as IComboboxStyle, J as IContainerStyle, K as IDataContainerStyle, L as IDatePickerStyle, M as IDividerStyle, N as IEntryListStyle, O as IEntryRecordDeleteStyle, P as IEntryRecordStyle, Q as IFieldsetStyle, R as IFigureStyle, U as IFileInputStyle, V as IFlexStyle, W as IFormLogStyle, X as IFormRecordStyle, Y as IFormStyle, Z as IGridColumnStyle, $ as IGridStyle, a0 as IGroupStyle, a1 as IHighlightStyle, a2 as IHtmlTagStyle, a3 as IImageStyle, a4 as IIndicatorStyle, a5 as IInputStyle, a6 as IKbdStyle, a7 as ILinkStyle, a8 as IListItemStyle, a9 as IListStyle, aa as ILoginStyle, ab as ILoopStyle, ac as IMissingStyle, ad as INoAccessStyle, ae as INotFoundStyle, af as INotificationStyle, ag as INumberInputStyle, ah as IPaperStyle, a as IPluginStyleRegistryEntry, ai as IProfileStyle, aj as IProgressRootStyle, ak as IProgressSectionStyle, al as IProgressStyle, am as IRadioStyle, an as IRangeSliderStyle, ao as IRatingStyle, ap as IRefContainerStyle, aq as IRegisterStyle, ar as IResetPasswordStyle, as as IRichTextEditorStyle, at as IScrollAreaStyle, au as ISegmentedControlStyle, av as ISelectStyle, aw as IShowUserInputEntry, ax as IShowUserInputStyle, ay as ISimpleGridStyle, az as ISliderStyle, aA as ISpaceStyle, aB as ISpoilerStyle, aC as IStackStyle, I as IStyleRegistryEntry, aD as IStyleWithSpacing, aE as ISwitchStyle, aF as ITabStyle, aG as ITabsStyle, aH as ITextInputStyle, aI as ITextStyle, aJ as ITextareaStyle, aK as IThemeIconStyle, aL as ITimelineItemStyle, aM as ITimelineStyle, aN as ITitleStyle, aO as ITwoFactorAuthStyle, aP as ITypographyStyle, aQ as IUnknownStyle, aR as IValidateStyle, aS as IVersionStyle, aT as IVideoStyle, S as STYLE_REGISTRY, c as TConcretePlatform, aU as TMantineAccordionChevronPosition, aV as TMantineAccordionDisableChevronRotation, aW as TMantineAccordionLoop, aX as TMantineAccordionMultiple, aY as TMantineBorder, aZ as
|
|
1
|
+
import { T as TStyleName, j as IContentField } from './styles.registry-CImqMXS4.mjs';
|
|
2
|
+
export { B as BASE_STYLE_REGISTRY, k as IAccordionItemStyle, l as IAccordionStyle, m as IActionIconStyle, n as IAlertStyle, o as IAspectRatioStyle, p as IAudioStyle, q as IAvatarStyle, r as IBackgroundImageStyle, s as IBadgeStyle, t as IBaseStyle, u as IBlockquoteStyle, v as IBoxStyle, w as IButtonStyle, x as ICardSegmentStyle, y as ICardStyle, z as ICarouselStyle, A as ICenterStyle, C as ICheckboxStyle, D as IChipStyle, E as ICodeStyle, F as IColorInputStyle, G as IColorPickerStyle, H as IComboboxStyle, J as IContainerStyle, K as IDataContainerStyle, L as IDatePickerStyle, M as IDividerStyle, N as IEntryListStyle, O as IEntryRecordDeleteStyle, P as IEntryRecordStyle, Q as IFieldsetStyle, R as IFigureStyle, U as IFileInputStyle, V as IFlexStyle, W as IFormLogStyle, X as IFormRecordStyle, Y as IFormStyle, Z as IGridColumnStyle, $ as IGridStyle, a0 as IGroupStyle, a1 as IHighlightStyle, a2 as IHtmlTagStyle, a3 as IImageStyle, a4 as IIndicatorStyle, a5 as IInputStyle, a6 as IKbdStyle, a7 as ILinkStyle, a8 as IListItemStyle, a9 as IListStyle, aa as ILoginStyle, ab as ILoopStyle, ac as IMissingStyle, ad as INoAccessStyle, ae as INotFoundStyle, af as INotificationStyle, ag as INumberInputStyle, ah as IPaperStyle, a as IPluginStyleRegistryEntry, ai as IProfileStyle, aj as IProgressRootStyle, ak as IProgressSectionStyle, al as IProgressStyle, am as IRadioStyle, an as IRangeSliderStyle, ao as IRatingStyle, ap as IRefContainerStyle, aq as IRegisterStyle, ar as IResetPasswordStyle, as as IRichTextEditorStyle, at as IScrollAreaStyle, au as ISegmentedControlStyle, av as ISelectStyle, aw as IShowUserInputEntry, ax as IShowUserInputStyle, ay as ISimpleGridStyle, az as ISliderStyle, aA as ISpaceStyle, aB as ISpoilerStyle, aC as IStackStyle, I as IStyleRegistryEntry, aD as IStyleWithSpacing, aE as ISwitchStyle, aF as ITabStyle, aG as ITabsStyle, aH as ITextInputStyle, aI as ITextStyle, aJ as ITextareaStyle, aK as IThemeIconStyle, aL as ITimelineItemStyle, aM as ITimelineStyle, aN as ITitleStyle, aO as ITwoFactorAuthStyle, aP as ITypographyStyle, aQ as IUnknownStyle, aR as IValidateStyle, aS as IVersionStyle, aT as IVideoStyle, S as STYLE_REGISTRY, c as TConcretePlatform, aU as TMantineAccordionChevronPosition, aV as TMantineAccordionDisableChevronRotation, aW as TMantineAccordionLoop, aX as TMantineAccordionMultiple, aY as TMantineBorder, aZ as TMantineCardPadding, a_ as TMantineCardShadow, a$ as TMantineCols, b0 as TMantineDividerVariant, b1 as TMantineGap, b2 as TMantineGridOffset, b3 as TMantineGridOrder, b4 as TMantineHeight, b5 as TMantineIconSize, b6 as TMantineImageFit, b7 as TMantineLineClamp, b8 as TMantineListCenter, b9 as TMantineListStyleType, ba as TMantineListType, bb as TMantineListWithPadding, bc as TMantinePaperShadow, bd as TMantineProgressTransition, be as TMantineScrollAreaSize, bf as TMantineScrollAreaType, bg as TMantineTextAlign, bh as TMantineTextDecoration, bi as TMantineTextFontStyle, bj as TMantineTextFontWeight, bk as TMantineTextInherit, bl as TMantineTextInputVariant, bm as TMantineTextSpan, bn as TMantineTextTransform, bo as TMantineTextTruncate, bp as TMantineTextVariant, bq as TMantineTextareaAutosize, br as TMantineTextareaResize, bs as TMantineTextareaVariant, bt as TMantineTimelineAlign, bu as TMantineTitleLineClamp, bv as TMantineTitleTextWrap, bw as TMantineTranslatable, bx as TMantineUseInputWrapper, by as TMantineWidth, bz as TSharedBorder, bA as TSharedLabelPosition, bB as TStyle, b as TStylePlacement, d as TStylePlatform, e as TStyleRegistryKey, _ as _AssertRegistryMatchesStyleName, f as _resetPluginStyleRegistry, g as extendStyleRegistry, h as getMergedStyleRegistry, i as getPluginStyleRegistry } from './styles.registry-CImqMXS4.mjs';
|
|
3
3
|
export { u as TMantineAccordionVariant, x as TMantineActionIconLoading, e as TMantineAlign, y as TMantineAllowNextClicks, z as TMantineAllowStepClick, A as TMantineAspectRatio, B as TMantineAutoContrast, q as TMantineAvatarVariant, p as TMantineBadgeVariant, C as TMantineBlock, D as TMantineCenterInline, E as TMantineChecked, F as TMantineChipChecked, G as TMantineChipMultiple, r as TMantineChipVariant, H as TMantineClampBehavior, I as TMantineCodeBlock, T as TMantineColor, J as TMantineColorFormat, K as TMantineColorInputSwatches, L as TMantineColorPickerSwatches, M as TMantineColorPickerSwatchesPerRow, N as TMantineCompact, O as TMantineContainerFluid, f as TMantineDirection, P as TMantineDisabled, m as TMantineFieldsetVariant, Q as TMantineFileAccept, R as TMantineFileInputMultiple, S as TMantineFluid, U as TMantineFullWidth, V as TMantineGridGrow, W as TMantineGridOverflow, h as TMantineGridSpan, X as TMantineGroupGrow, Y as TMantineGroupWrap, Z as TMantineGrow, _ as TMantineHighlight, s as TMantineIndicatorPosition, $ as TMantineInline, a0 as TMantineIsLink, d as TMantineJustify, a1 as TMantineKbdSize, a2 as TMantineLoading, a3 as TMantineMultiple, a4 as TMantineNotificationWithCloseButton, a5 as TMantineNumberInputDecimalScale, a6 as TMantineOpenInNewTab, i as TMantineOrientation, a7 as TMantineProcessing, a as TMantineRadius, a8 as TMantineRangeSliderMarks, a9 as TMantineRatingCount, aa as TMantineRatingFractions, ab as TMantineRatingReadonly, ac as TMantineReadonly, l as TMantineSize, ad as TMantineSpaceHorizontal, c as TMantineSpacing, n as TMantineSpoilerMaxHeight, ae as TMantineSwatches, af as TMantineTabDisabled, v as TMantineTabsVariant, t as TMantineThemeIconVariant, w as TMantineTimelineLineVariant, k as TMantineTitleOrder, ag as TMantineUseMantineStyle, o as TMantineVariant, ah as TMantineWithCloseButton, ai as TMantineWithIcon, g as TMantineWrap, j as TSharedRadius, b as TSharedSize } from './common-DVC0R_AX.mjs';
|
|
4
4
|
import { ReactNode, ComponentType } from 'react';
|
|
5
5
|
import { THeroUiButtonVariant, THeroUiSize } from './theme/index.mjs';
|
|
6
|
-
export { COLOR_PALETTE, COLOR_SCALES, CONTAINER_SIZE_PX, FONT_SIZE_PX, FULL_RADIUS_PX, IHeroUiResolvedStyle, IMantineResolvedStyle, IReactNativeResolvedStyle, IReactNativeThemeScales, IResolvedVariant, ISharedStyleProps, ISpacingResolved, LINE_HEIGHT, RADIUS_PX, SPACING_PX, SPACING_TO_TAILWIND, TCanonicalColor, TCanonicalRadius, TCanonicalSpacing, THeroUiColor, TMantineMappedColor, TMantineMappedVariant, TSemanticColor, TSemanticIntent, TSemanticRadius, TSemanticSize, TSemanticSpacing, TSemanticState, TSemanticVariant, colorToHex, mapAccordionVariantToHeroUiVariant, mapIntentToHeroUiButtonVariant, mapIntentToHeroUiColor, mapIntentToMantine, mapMantineColorToHeroUiButtonVariant, mapMantineColorToHeroUiColor, mapMantineVariantToHeroUiButtonVariant, mapRadiusToMantine, mapRadiusToPx, mapSizeToHeroUi, mapSizeToMantine, mapSpacingToPx, radiusToPx, resolveMantineVariant, resolveSharedStyle, resolveSharedStyleForMobile, resolveSharedStyleForWeb, resolveSharedStyleProps, sizeToFontPx, spacingToPx, toHeroUiSemanticProps, toMantineSemanticProps, toReactNativeSemanticStyle } from './theme/index.mjs';
|
|
6
|
+
export { COLOR_PALETTE, COLOR_SCALES, CONTAINER_SIZE_PX, FONT_SIZE_PX, FULL_RADIUS_PX, IHeroUiResolvedStyle, IMantineResolvedStyle, IReactNativeResolvedStyle, IReactNativeThemeScales, IResolvedVariant, ISharedStyleProps, ISpacingResolved, LINE_HEIGHT, RADIUS_PX, SPACING_PX, SPACING_TO_TAILWIND, TCanonicalColor, TCanonicalRadius, TCanonicalSpacing, THeroUiColor, TMantineMappedColor, TMantineMappedVariant, TSemanticColor, TSemanticIntent, TSemanticRadius, TSemanticSize, TSemanticSpacing, TSemanticState, TSemanticVariant, colorToHex, mapAccordionVariantToHeroUiVariant, mapChipVariantToHeroUiVariant, mapIntentToHeroUiButtonVariant, mapIntentToHeroUiColor, mapIntentToMantine, mapMantineColorToHeroUiButtonVariant, mapMantineColorToHeroUiColor, mapMantineVariantToHeroUiButtonVariant, mapRadiusToMantine, mapRadiusToPx, mapSizeToHeroUi, mapSizeToMantine, mapSpacingToPx, radiusToPx, resolveMantineVariant, resolveSharedStyle, resolveSharedStyleForMobile, resolveSharedStyleForWeb, resolveSharedStyleProps, sizeToFontPx, spacingToPx, toHeroUiSemanticProps, toMantineSemanticProps, toReactNativeSemanticStyle } from './theme/index.mjs';
|
|
7
7
|
export { TAnyStyleName, TPluginStyleImplMap, TStyleImplMap, getRegistryEntry, getRegistryEntryAny, getStylePlacement, getStylePlatforms, getStylePluginId, isKnownStyleName, isRegisteredStyleName, isStyleAllowedOnPage, isStylePlacementAllowed, isStyleSupportedOnPlatform, setToStylePlatform, stylePlatformToSet } from './registry/index.mjs';
|
|
8
8
|
export { sharedTailwindExtend, sharedTailwindPreset } from './theme/tailwind.mjs';
|
|
9
9
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { T as TStyleName, j as IContentField } from './styles.registry-
|
|
2
|
-
export { B as BASE_STYLE_REGISTRY, k as IAccordionItemStyle, l as IAccordionStyle, m as IActionIconStyle, n as IAlertStyle, o as IAspectRatioStyle, p as IAudioStyle, q as IAvatarStyle, r as IBackgroundImageStyle, s as IBadgeStyle, t as IBaseStyle, u as IBlockquoteStyle, v as IBoxStyle, w as IButtonStyle, x as ICardSegmentStyle, y as ICardStyle, z as ICarouselStyle, A as ICenterStyle, C as ICheckboxStyle, D as IChipStyle, E as ICodeStyle, F as IColorInputStyle, G as IColorPickerStyle, H as IComboboxStyle, J as IContainerStyle, K as IDataContainerStyle, L as IDatePickerStyle, M as IDividerStyle, N as IEntryListStyle, O as IEntryRecordDeleteStyle, P as IEntryRecordStyle, Q as IFieldsetStyle, R as IFigureStyle, U as IFileInputStyle, V as IFlexStyle, W as IFormLogStyle, X as IFormRecordStyle, Y as IFormStyle, Z as IGridColumnStyle, $ as IGridStyle, a0 as IGroupStyle, a1 as IHighlightStyle, a2 as IHtmlTagStyle, a3 as IImageStyle, a4 as IIndicatorStyle, a5 as IInputStyle, a6 as IKbdStyle, a7 as ILinkStyle, a8 as IListItemStyle, a9 as IListStyle, aa as ILoginStyle, ab as ILoopStyle, ac as IMissingStyle, ad as INoAccessStyle, ae as INotFoundStyle, af as INotificationStyle, ag as INumberInputStyle, ah as IPaperStyle, a as IPluginStyleRegistryEntry, ai as IProfileStyle, aj as IProgressRootStyle, ak as IProgressSectionStyle, al as IProgressStyle, am as IRadioStyle, an as IRangeSliderStyle, ao as IRatingStyle, ap as IRefContainerStyle, aq as IRegisterStyle, ar as IResetPasswordStyle, as as IRichTextEditorStyle, at as IScrollAreaStyle, au as ISegmentedControlStyle, av as ISelectStyle, aw as IShowUserInputEntry, ax as IShowUserInputStyle, ay as ISimpleGridStyle, az as ISliderStyle, aA as ISpaceStyle, aB as ISpoilerStyle, aC as IStackStyle, I as IStyleRegistryEntry, aD as IStyleWithSpacing, aE as ISwitchStyle, aF as ITabStyle, aG as ITabsStyle, aH as ITextInputStyle, aI as ITextStyle, aJ as ITextareaStyle, aK as IThemeIconStyle, aL as ITimelineItemStyle, aM as ITimelineStyle, aN as ITitleStyle, aO as ITwoFactorAuthStyle, aP as ITypographyStyle, aQ as IUnknownStyle, aR as IValidateStyle, aS as IVersionStyle, aT as IVideoStyle, S as STYLE_REGISTRY, c as TConcretePlatform, aU as TMantineAccordionChevronPosition, aV as TMantineAccordionDisableChevronRotation, aW as TMantineAccordionLoop, aX as TMantineAccordionMultiple, aY as TMantineBorder, aZ as
|
|
1
|
+
import { T as TStyleName, j as IContentField } from './styles.registry-BkHw6CdG.js';
|
|
2
|
+
export { B as BASE_STYLE_REGISTRY, k as IAccordionItemStyle, l as IAccordionStyle, m as IActionIconStyle, n as IAlertStyle, o as IAspectRatioStyle, p as IAudioStyle, q as IAvatarStyle, r as IBackgroundImageStyle, s as IBadgeStyle, t as IBaseStyle, u as IBlockquoteStyle, v as IBoxStyle, w as IButtonStyle, x as ICardSegmentStyle, y as ICardStyle, z as ICarouselStyle, A as ICenterStyle, C as ICheckboxStyle, D as IChipStyle, E as ICodeStyle, F as IColorInputStyle, G as IColorPickerStyle, H as IComboboxStyle, J as IContainerStyle, K as IDataContainerStyle, L as IDatePickerStyle, M as IDividerStyle, N as IEntryListStyle, O as IEntryRecordDeleteStyle, P as IEntryRecordStyle, Q as IFieldsetStyle, R as IFigureStyle, U as IFileInputStyle, V as IFlexStyle, W as IFormLogStyle, X as IFormRecordStyle, Y as IFormStyle, Z as IGridColumnStyle, $ as IGridStyle, a0 as IGroupStyle, a1 as IHighlightStyle, a2 as IHtmlTagStyle, a3 as IImageStyle, a4 as IIndicatorStyle, a5 as IInputStyle, a6 as IKbdStyle, a7 as ILinkStyle, a8 as IListItemStyle, a9 as IListStyle, aa as ILoginStyle, ab as ILoopStyle, ac as IMissingStyle, ad as INoAccessStyle, ae as INotFoundStyle, af as INotificationStyle, ag as INumberInputStyle, ah as IPaperStyle, a as IPluginStyleRegistryEntry, ai as IProfileStyle, aj as IProgressRootStyle, ak as IProgressSectionStyle, al as IProgressStyle, am as IRadioStyle, an as IRangeSliderStyle, ao as IRatingStyle, ap as IRefContainerStyle, aq as IRegisterStyle, ar as IResetPasswordStyle, as as IRichTextEditorStyle, at as IScrollAreaStyle, au as ISegmentedControlStyle, av as ISelectStyle, aw as IShowUserInputEntry, ax as IShowUserInputStyle, ay as ISimpleGridStyle, az as ISliderStyle, aA as ISpaceStyle, aB as ISpoilerStyle, aC as IStackStyle, I as IStyleRegistryEntry, aD as IStyleWithSpacing, aE as ISwitchStyle, aF as ITabStyle, aG as ITabsStyle, aH as ITextInputStyle, aI as ITextStyle, aJ as ITextareaStyle, aK as IThemeIconStyle, aL as ITimelineItemStyle, aM as ITimelineStyle, aN as ITitleStyle, aO as ITwoFactorAuthStyle, aP as ITypographyStyle, aQ as IUnknownStyle, aR as IValidateStyle, aS as IVersionStyle, aT as IVideoStyle, S as STYLE_REGISTRY, c as TConcretePlatform, aU as TMantineAccordionChevronPosition, aV as TMantineAccordionDisableChevronRotation, aW as TMantineAccordionLoop, aX as TMantineAccordionMultiple, aY as TMantineBorder, aZ as TMantineCardPadding, a_ as TMantineCardShadow, a$ as TMantineCols, b0 as TMantineDividerVariant, b1 as TMantineGap, b2 as TMantineGridOffset, b3 as TMantineGridOrder, b4 as TMantineHeight, b5 as TMantineIconSize, b6 as TMantineImageFit, b7 as TMantineLineClamp, b8 as TMantineListCenter, b9 as TMantineListStyleType, ba as TMantineListType, bb as TMantineListWithPadding, bc as TMantinePaperShadow, bd as TMantineProgressTransition, be as TMantineScrollAreaSize, bf as TMantineScrollAreaType, bg as TMantineTextAlign, bh as TMantineTextDecoration, bi as TMantineTextFontStyle, bj as TMantineTextFontWeight, bk as TMantineTextInherit, bl as TMantineTextInputVariant, bm as TMantineTextSpan, bn as TMantineTextTransform, bo as TMantineTextTruncate, bp as TMantineTextVariant, bq as TMantineTextareaAutosize, br as TMantineTextareaResize, bs as TMantineTextareaVariant, bt as TMantineTimelineAlign, bu as TMantineTitleLineClamp, bv as TMantineTitleTextWrap, bw as TMantineTranslatable, bx as TMantineUseInputWrapper, by as TMantineWidth, bz as TSharedBorder, bA as TSharedLabelPosition, bB as TStyle, b as TStylePlacement, d as TStylePlatform, e as TStyleRegistryKey, _ as _AssertRegistryMatchesStyleName, f as _resetPluginStyleRegistry, g as extendStyleRegistry, h as getMergedStyleRegistry, i as getPluginStyleRegistry } from './styles.registry-BkHw6CdG.js';
|
|
3
3
|
export { u as TMantineAccordionVariant, x as TMantineActionIconLoading, e as TMantineAlign, y as TMantineAllowNextClicks, z as TMantineAllowStepClick, A as TMantineAspectRatio, B as TMantineAutoContrast, q as TMantineAvatarVariant, p as TMantineBadgeVariant, C as TMantineBlock, D as TMantineCenterInline, E as TMantineChecked, F as TMantineChipChecked, G as TMantineChipMultiple, r as TMantineChipVariant, H as TMantineClampBehavior, I as TMantineCodeBlock, T as TMantineColor, J as TMantineColorFormat, K as TMantineColorInputSwatches, L as TMantineColorPickerSwatches, M as TMantineColorPickerSwatchesPerRow, N as TMantineCompact, O as TMantineContainerFluid, f as TMantineDirection, P as TMantineDisabled, m as TMantineFieldsetVariant, Q as TMantineFileAccept, R as TMantineFileInputMultiple, S as TMantineFluid, U as TMantineFullWidth, V as TMantineGridGrow, W as TMantineGridOverflow, h as TMantineGridSpan, X as TMantineGroupGrow, Y as TMantineGroupWrap, Z as TMantineGrow, _ as TMantineHighlight, s as TMantineIndicatorPosition, $ as TMantineInline, a0 as TMantineIsLink, d as TMantineJustify, a1 as TMantineKbdSize, a2 as TMantineLoading, a3 as TMantineMultiple, a4 as TMantineNotificationWithCloseButton, a5 as TMantineNumberInputDecimalScale, a6 as TMantineOpenInNewTab, i as TMantineOrientation, a7 as TMantineProcessing, a as TMantineRadius, a8 as TMantineRangeSliderMarks, a9 as TMantineRatingCount, aa as TMantineRatingFractions, ab as TMantineRatingReadonly, ac as TMantineReadonly, l as TMantineSize, ad as TMantineSpaceHorizontal, c as TMantineSpacing, n as TMantineSpoilerMaxHeight, ae as TMantineSwatches, af as TMantineTabDisabled, v as TMantineTabsVariant, t as TMantineThemeIconVariant, w as TMantineTimelineLineVariant, k as TMantineTitleOrder, ag as TMantineUseMantineStyle, o as TMantineVariant, ah as TMantineWithCloseButton, ai as TMantineWithIcon, g as TMantineWrap, j as TSharedRadius, b as TSharedSize } from './common-DVC0R_AX.js';
|
|
4
4
|
import { ReactNode, ComponentType } from 'react';
|
|
5
5
|
import { THeroUiButtonVariant, THeroUiSize } from './theme/index.js';
|
|
6
|
-
export { COLOR_PALETTE, COLOR_SCALES, CONTAINER_SIZE_PX, FONT_SIZE_PX, FULL_RADIUS_PX, IHeroUiResolvedStyle, IMantineResolvedStyle, IReactNativeResolvedStyle, IReactNativeThemeScales, IResolvedVariant, ISharedStyleProps, ISpacingResolved, LINE_HEIGHT, RADIUS_PX, SPACING_PX, SPACING_TO_TAILWIND, TCanonicalColor, TCanonicalRadius, TCanonicalSpacing, THeroUiColor, TMantineMappedColor, TMantineMappedVariant, TSemanticColor, TSemanticIntent, TSemanticRadius, TSemanticSize, TSemanticSpacing, TSemanticState, TSemanticVariant, colorToHex, mapAccordionVariantToHeroUiVariant, mapIntentToHeroUiButtonVariant, mapIntentToHeroUiColor, mapIntentToMantine, mapMantineColorToHeroUiButtonVariant, mapMantineColorToHeroUiColor, mapMantineVariantToHeroUiButtonVariant, mapRadiusToMantine, mapRadiusToPx, mapSizeToHeroUi, mapSizeToMantine, mapSpacingToPx, radiusToPx, resolveMantineVariant, resolveSharedStyle, resolveSharedStyleForMobile, resolveSharedStyleForWeb, resolveSharedStyleProps, sizeToFontPx, spacingToPx, toHeroUiSemanticProps, toMantineSemanticProps, toReactNativeSemanticStyle } from './theme/index.js';
|
|
6
|
+
export { COLOR_PALETTE, COLOR_SCALES, CONTAINER_SIZE_PX, FONT_SIZE_PX, FULL_RADIUS_PX, IHeroUiResolvedStyle, IMantineResolvedStyle, IReactNativeResolvedStyle, IReactNativeThemeScales, IResolvedVariant, ISharedStyleProps, ISpacingResolved, LINE_HEIGHT, RADIUS_PX, SPACING_PX, SPACING_TO_TAILWIND, TCanonicalColor, TCanonicalRadius, TCanonicalSpacing, THeroUiColor, TMantineMappedColor, TMantineMappedVariant, TSemanticColor, TSemanticIntent, TSemanticRadius, TSemanticSize, TSemanticSpacing, TSemanticState, TSemanticVariant, colorToHex, mapAccordionVariantToHeroUiVariant, mapChipVariantToHeroUiVariant, mapIntentToHeroUiButtonVariant, mapIntentToHeroUiColor, mapIntentToMantine, mapMantineColorToHeroUiButtonVariant, mapMantineColorToHeroUiColor, mapMantineVariantToHeroUiButtonVariant, mapRadiusToMantine, mapRadiusToPx, mapSizeToHeroUi, mapSizeToMantine, mapSpacingToPx, radiusToPx, resolveMantineVariant, resolveSharedStyle, resolveSharedStyleForMobile, resolveSharedStyleForWeb, resolveSharedStyleProps, sizeToFontPx, spacingToPx, toHeroUiSemanticProps, toMantineSemanticProps, toReactNativeSemanticStyle } from './theme/index.js';
|
|
7
7
|
export { TAnyStyleName, TPluginStyleImplMap, TStyleImplMap, getRegistryEntry, getRegistryEntryAny, getStylePlacement, getStylePlatforms, getStylePluginId, isKnownStyleName, isRegisteredStyleName, isStyleAllowedOnPage, isStylePlacementAllowed, isStyleSupportedOnPlatform, setToStylePlatform, stylePlatformToSet } from './registry/index.js';
|
|
8
8
|
export { sharedTailwindExtend, sharedTailwindPreset } from './theme/tailwind.js';
|
|
9
9
|
|
package/dist/index.js
CHANGED
|
@@ -77,6 +77,7 @@ __export(index_exports, {
|
|
|
77
77
|
isStylePlacementAllowed: () => isStylePlacementAllowed,
|
|
78
78
|
isStyleSupportedOnPlatform: () => isStyleSupportedOnPlatform,
|
|
79
79
|
mapAccordionVariantToHeroUiVariant: () => mapAccordionVariantToHeroUiVariant,
|
|
80
|
+
mapChipVariantToHeroUiVariant: () => mapChipVariantToHeroUiVariant,
|
|
80
81
|
mapIntentToHeroUiButtonVariant: () => mapIntentToHeroUiButtonVariant,
|
|
81
82
|
mapIntentToHeroUiColor: () => mapIntentToHeroUiColor,
|
|
82
83
|
mapIntentToMantine: () => mapIntentToMantine,
|
|
@@ -778,6 +779,17 @@ function mapAccordionVariantToHeroUiVariant(variant) {
|
|
|
778
779
|
return "default";
|
|
779
780
|
}
|
|
780
781
|
}
|
|
782
|
+
function mapChipVariantToHeroUiVariant(variant) {
|
|
783
|
+
switch (variant) {
|
|
784
|
+
case "light":
|
|
785
|
+
return "soft";
|
|
786
|
+
case "outline":
|
|
787
|
+
return "tertiary";
|
|
788
|
+
case "filled":
|
|
789
|
+
default:
|
|
790
|
+
return "primary";
|
|
791
|
+
}
|
|
792
|
+
}
|
|
781
793
|
function hasState(states, state) {
|
|
782
794
|
return !!states && states.includes(state);
|
|
783
795
|
}
|
|
@@ -1350,6 +1362,7 @@ function transformPagesData(pages) {
|
|
|
1350
1362
|
isStylePlacementAllowed,
|
|
1351
1363
|
isStyleSupportedOnPlatform,
|
|
1352
1364
|
mapAccordionVariantToHeroUiVariant,
|
|
1365
|
+
mapChipVariantToHeroUiVariant,
|
|
1353
1366
|
mapIntentToHeroUiButtonVariant,
|
|
1354
1367
|
mapIntentToHeroUiColor,
|
|
1355
1368
|
mapIntentToMantine,
|
package/dist/index.mjs
CHANGED
|
@@ -663,6 +663,17 @@ function mapAccordionVariantToHeroUiVariant(variant) {
|
|
|
663
663
|
return "default";
|
|
664
664
|
}
|
|
665
665
|
}
|
|
666
|
+
function mapChipVariantToHeroUiVariant(variant) {
|
|
667
|
+
switch (variant) {
|
|
668
|
+
case "light":
|
|
669
|
+
return "soft";
|
|
670
|
+
case "outline":
|
|
671
|
+
return "tertiary";
|
|
672
|
+
case "filled":
|
|
673
|
+
default:
|
|
674
|
+
return "primary";
|
|
675
|
+
}
|
|
676
|
+
}
|
|
666
677
|
function hasState(states, state) {
|
|
667
678
|
return !!states && states.includes(state);
|
|
668
679
|
}
|
|
@@ -1234,6 +1245,7 @@ export {
|
|
|
1234
1245
|
isStylePlacementAllowed,
|
|
1235
1246
|
isStyleSupportedOnPlatform,
|
|
1236
1247
|
mapAccordionVariantToHeroUiVariant,
|
|
1248
|
+
mapChipVariantToHeroUiVariant,
|
|
1237
1249
|
mapIntentToHeroUiButtonVariant,
|
|
1238
1250
|
mapIntentToHeroUiColor,
|
|
1239
1251
|
mapIntentToMantine,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { I as IPluginManifest, a as IPluginManifestAdminPage, b as IPluginManifestApiRoute, c as IPluginManifestAsset, d as IPluginManifestCapability, e as IPluginManifestCompatibility, f as IPluginManifestConflict, g as IPluginManifestDataAccess, h as IPluginManifestDependency, i as IPluginManifestExternalHost, j as IPluginManifestFeatureFlag, k as IPluginManifestHealth, l as IPluginManifestLookupExtension, m as IPluginManifestMobile, n as IPluginManifestPermission, o as IPluginManifestRealtimeTopic, p as IPluginManifestScheduledJob, q as IPluginManifestSecurity, r as IPluginManifestStyle, s as IPluginManifestTrustLevel } from '../manifest-C8sBTLJb.mjs';
|
|
2
|
-
import { I as IStyleRegistryEntry } from '../styles.registry-
|
|
2
|
+
import { I as IStyleRegistryEntry } from '../styles.registry-CImqMXS4.mjs';
|
|
3
3
|
import '../common-DVC0R_AX.mjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { I as IPluginManifest, a as IPluginManifestAdminPage, b as IPluginManifestApiRoute, c as IPluginManifestAsset, d as IPluginManifestCapability, e as IPluginManifestCompatibility, f as IPluginManifestConflict, g as IPluginManifestDataAccess, h as IPluginManifestDependency, i as IPluginManifestExternalHost, j as IPluginManifestFeatureFlag, k as IPluginManifestHealth, l as IPluginManifestLookupExtension, m as IPluginManifestMobile, n as IPluginManifestPermission, o as IPluginManifestRealtimeTopic, p as IPluginManifestScheduledJob, q as IPluginManifestSecurity, r as IPluginManifestStyle, s as IPluginManifestTrustLevel } from '../manifest-C8sBTLJb.js';
|
|
2
|
-
import { I as IStyleRegistryEntry } from '../styles.registry-
|
|
2
|
+
import { I as IStyleRegistryEntry } from '../styles.registry-BkHw6CdG.js';
|
|
3
3
|
import '../common-DVC0R_AX.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as TStyleName, I as IStyleRegistryEntry, a as IPluginStyleRegistryEntry, b as TStylePlacement, c as TConcretePlatform, d as TStylePlatform } from '../styles.registry-
|
|
2
|
-
export { B as BASE_STYLE_REGISTRY, S as STYLE_REGISTRY, e as TStyleRegistryKey, _ as _AssertRegistryMatchesStyleName, f as _resetPluginStyleRegistry, g as extendStyleRegistry, h as getMergedStyleRegistry, i as getPluginStyleRegistry } from '../styles.registry-
|
|
1
|
+
import { T as TStyleName, I as IStyleRegistryEntry, a as IPluginStyleRegistryEntry, b as TStylePlacement, c as TConcretePlatform, d as TStylePlatform } from '../styles.registry-CImqMXS4.mjs';
|
|
2
|
+
export { B as BASE_STYLE_REGISTRY, S as STYLE_REGISTRY, e as TStyleRegistryKey, _ as _AssertRegistryMatchesStyleName, f as _resetPluginStyleRegistry, g as extendStyleRegistry, h as getMergedStyleRegistry, i as getPluginStyleRegistry } from '../styles.registry-CImqMXS4.mjs';
|
|
3
3
|
import '../common-DVC0R_AX.mjs';
|
|
4
4
|
|
|
5
5
|
/**
|
package/dist/registry/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as TStyleName, I as IStyleRegistryEntry, a as IPluginStyleRegistryEntry, b as TStylePlacement, c as TConcretePlatform, d as TStylePlatform } from '../styles.registry-
|
|
2
|
-
export { B as BASE_STYLE_REGISTRY, S as STYLE_REGISTRY, e as TStyleRegistryKey, _ as _AssertRegistryMatchesStyleName, f as _resetPluginStyleRegistry, g as extendStyleRegistry, h as getMergedStyleRegistry, i as getPluginStyleRegistry } from '../styles.registry-
|
|
1
|
+
import { T as TStyleName, I as IStyleRegistryEntry, a as IPluginStyleRegistryEntry, b as TStylePlacement, c as TConcretePlatform, d as TStylePlatform } from '../styles.registry-BkHw6CdG.js';
|
|
2
|
+
export { B as BASE_STYLE_REGISTRY, S as STYLE_REGISTRY, e as TStyleRegistryKey, _ as _AssertRegistryMatchesStyleName, f as _resetPluginStyleRegistry, g as extendStyleRegistry, h as getMergedStyleRegistry, i as getPluginStyleRegistry } from '../styles.registry-BkHw6CdG.js';
|
|
3
3
|
import '../common-DVC0R_AX.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -177,11 +177,13 @@ interface IProfileStyle extends IStyleWithSpacing {
|
|
|
177
177
|
}
|
|
178
178
|
|
|
179
179
|
type TMantineBorder = '0' | '1';
|
|
180
|
+
type TSharedBorder = '0' | '1';
|
|
180
181
|
type TMantineWidth = string;
|
|
181
182
|
type TMantineHeight = string;
|
|
182
183
|
type TMantineDividerVariant = 'solid' | 'dashed' | 'dotted';
|
|
183
184
|
type TMantinePaperShadow = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
184
185
|
type TMantineCardShadow = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
186
|
+
type TMantineCardPadding = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
185
187
|
type TMantineGap = '0' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
186
188
|
type TMantineCols = string;
|
|
187
189
|
type TMantineGridOffset = string;
|
|
@@ -298,12 +300,17 @@ interface IScrollAreaStyle extends IStyleWithSpacing {
|
|
|
298
300
|
}
|
|
299
301
|
interface ICardStyle extends IStyleWithSpacing {
|
|
300
302
|
style_name: 'card';
|
|
303
|
+
title?: IContentField<string>;
|
|
304
|
+
img_src?: IContentField<string>;
|
|
305
|
+
shared_border?: IContentField<TSharedBorder>;
|
|
306
|
+
web_card_padding?: IContentField<TMantineCardPadding>;
|
|
301
307
|
web_card_shadow?: IContentField<TMantineCardShadow>;
|
|
302
|
-
web_border?: IContentField<TMantineBorder>;
|
|
303
308
|
shared_radius?: IContentField<TSharedRadius>;
|
|
304
309
|
}
|
|
305
310
|
interface ICardSegmentStyle extends IStyleWithSpacing {
|
|
306
311
|
style_name: 'card-segment';
|
|
312
|
+
shared_border?: IContentField<TSharedBorder>;
|
|
313
|
+
web_segment_inherit_padding?: IContentField<'0' | '1'>;
|
|
307
314
|
}
|
|
308
315
|
interface IAspectRatioStyle extends IBaseStyle {
|
|
309
316
|
style_name: 'aspect-ratio';
|
|
@@ -347,10 +354,11 @@ type TMantineIconSize = string;
|
|
|
347
354
|
interface ITitleStyle extends IStyleWithSpacing {
|
|
348
355
|
style_name: 'title';
|
|
349
356
|
content?: IContentField<string>;
|
|
350
|
-
|
|
357
|
+
title_order?: IContentField<TMantineTitleOrder>;
|
|
351
358
|
shared_size?: IContentField<TMantineSize>;
|
|
359
|
+
shared_color?: IContentField<TMantineColor>;
|
|
352
360
|
web_title_text_wrap?: IContentField<TMantineTitleTextWrap>;
|
|
353
|
-
|
|
361
|
+
shared_line_clamp?: IContentField<TMantineTitleLineClamp>;
|
|
354
362
|
}
|
|
355
363
|
interface ITextStyle extends IStyleWithSpacing {
|
|
356
364
|
style_name: 'text';
|
|
@@ -371,8 +379,9 @@ interface ITextStyle extends IStyleWithSpacing {
|
|
|
371
379
|
}
|
|
372
380
|
interface ICodeStyle extends IStyleWithSpacing {
|
|
373
381
|
style_name: 'code';
|
|
374
|
-
|
|
382
|
+
code_block?: IContentField<string>;
|
|
375
383
|
shared_color?: IContentField<TMantineColor>;
|
|
384
|
+
shared_radius?: IContentField<TSharedRadius>;
|
|
376
385
|
content?: IContentField<string>;
|
|
377
386
|
}
|
|
378
387
|
interface IHighlightStyle extends IStyleWithSpacing {
|
|
@@ -555,7 +564,7 @@ interface IAvatarStyle extends IStyleWithSpacing {
|
|
|
555
564
|
interface IChipStyle extends IStyleWithSpacing {
|
|
556
565
|
style_name: 'chip';
|
|
557
566
|
label?: IContentField<string>;
|
|
558
|
-
|
|
567
|
+
shared_chip_variant?: IContentField<TMantineChipVariant>;
|
|
559
568
|
shared_size?: IContentField<TSharedSize>;
|
|
560
569
|
shared_radius?: IContentField<TSharedRadius>;
|
|
561
570
|
shared_color?: IContentField<TMantineColor>;
|
|
@@ -615,7 +624,7 @@ type TMantineTextareaVariant = 'default' | 'filled' | 'unstyled';
|
|
|
615
624
|
type TMantineUseInputWrapper = '0' | '1';
|
|
616
625
|
type TMantineTranslatable = '0' | '1';
|
|
617
626
|
type TMantineProgressTransition = '150' | '200' | '300' | '400' | '0' | string;
|
|
618
|
-
type
|
|
627
|
+
type TSharedLabelPosition = 'left' | 'right';
|
|
619
628
|
interface IFormStyle extends IStyleWithSpacing {
|
|
620
629
|
style_name: 'form-log' | 'form-record';
|
|
621
630
|
btn_save_label?: IContentField<string>;
|
|
@@ -752,7 +761,7 @@ interface ICheckboxStyle extends IStyleWithSpacing {
|
|
|
752
761
|
is_required?: IContentField<string>;
|
|
753
762
|
checkbox_value?: IContentField<string>;
|
|
754
763
|
web_checkbox_icon?: IContentField<string>;
|
|
755
|
-
|
|
764
|
+
shared_label_position?: IContentField<TSharedLabelPosition>;
|
|
756
765
|
description?: IContentField<string>;
|
|
757
766
|
disabled?: IContentField<string>;
|
|
758
767
|
shared_size?: IContentField<TSharedSize>;
|
|
@@ -2507,4 +2516,4 @@ declare function getPluginStyleRegistry(): Record<string, IPluginStyleRegistryEn
|
|
|
2507
2516
|
*/
|
|
2508
2517
|
declare function _resetPluginStyleRegistry(): void;
|
|
2509
2518
|
|
|
2510
|
-
export { type IGridStyle as $, type ICenterStyle as A, BASE_STYLE_REGISTRY as B, type ICheckboxStyle as C, type IChipStyle as D, type ICodeStyle as E, type IColorInputStyle as F, type IColorPickerStyle as G, type IComboboxStyle as H, type IStyleRegistryEntry as I, type IContainerStyle as J, type IDataContainerStyle as K, type IDatePickerStyle as L, type IDividerStyle as M, type IEntryListStyle as N, type IEntryRecordDeleteStyle as O, type IEntryRecordStyle as P, type IFieldsetStyle as Q, type IFigureStyle as R, STYLE_REGISTRY as S, type TStyleName as T, type IFileInputStyle as U, type IFlexStyle as V, type IFormLogStyle as W, type IFormRecordStyle as X, type IFormStyle as Y, type IGridColumnStyle as Z, type _AssertRegistryMatchesStyleName as _, type IPluginStyleRegistryEntry as a, type TMantineCols as a$, type IGroupStyle as a0, type IHighlightStyle as a1, type IHtmlTagStyle as a2, type IImageStyle as a3, type IIndicatorStyle as a4, type IInputStyle as a5, type IKbdStyle as a6, type ILinkStyle as a7, type IListItemStyle as a8, type IListStyle as a9, type ISpaceStyle as aA, type ISpoilerStyle as aB, type IStackStyle as aC, type IStyleWithSpacing as aD, type ISwitchStyle as aE, type ITabStyle as aF, type ITabsStyle as aG, type ITextInputStyle as aH, type ITextStyle as aI, type ITextareaStyle as aJ, type IThemeIconStyle as aK, type ITimelineItemStyle as aL, type ITimelineStyle as aM, type ITitleStyle as aN, type ITwoFactorAuthStyle as aO, type ITypographyStyle as aP, type IUnknownStyle as aQ, type IValidateStyle as aR, type IVersionStyle as aS, type IVideoStyle as aT, type TMantineAccordionChevronPosition as aU, type TMantineAccordionDisableChevronRotation as aV, type TMantineAccordionLoop as aW, type TMantineAccordionMultiple as aX, type TMantineBorder as aY, type
|
|
2519
|
+
export { type IGridStyle as $, type ICenterStyle as A, BASE_STYLE_REGISTRY as B, type ICheckboxStyle as C, type IChipStyle as D, type ICodeStyle as E, type IColorInputStyle as F, type IColorPickerStyle as G, type IComboboxStyle as H, type IStyleRegistryEntry as I, type IContainerStyle as J, type IDataContainerStyle as K, type IDatePickerStyle as L, type IDividerStyle as M, type IEntryListStyle as N, type IEntryRecordDeleteStyle as O, type IEntryRecordStyle as P, type IFieldsetStyle as Q, type IFigureStyle as R, STYLE_REGISTRY as S, type TStyleName as T, type IFileInputStyle as U, type IFlexStyle as V, type IFormLogStyle as W, type IFormRecordStyle as X, type IFormStyle as Y, type IGridColumnStyle as Z, type _AssertRegistryMatchesStyleName as _, type IPluginStyleRegistryEntry as a, type TMantineCols as a$, type IGroupStyle as a0, type IHighlightStyle as a1, type IHtmlTagStyle as a2, type IImageStyle as a3, type IIndicatorStyle as a4, type IInputStyle as a5, type IKbdStyle as a6, type ILinkStyle as a7, type IListItemStyle as a8, type IListStyle as a9, type ISpaceStyle as aA, type ISpoilerStyle as aB, type IStackStyle as aC, type IStyleWithSpacing as aD, type ISwitchStyle as aE, type ITabStyle as aF, type ITabsStyle as aG, type ITextInputStyle as aH, type ITextStyle as aI, type ITextareaStyle as aJ, type IThemeIconStyle as aK, type ITimelineItemStyle as aL, type ITimelineStyle as aM, type ITitleStyle as aN, type ITwoFactorAuthStyle as aO, type ITypographyStyle as aP, type IUnknownStyle as aQ, type IValidateStyle as aR, type IVersionStyle as aS, type IVideoStyle as aT, type TMantineAccordionChevronPosition as aU, type TMantineAccordionDisableChevronRotation as aV, type TMantineAccordionLoop as aW, type TMantineAccordionMultiple as aX, type TMantineBorder as aY, type TMantineCardPadding as aZ, type TMantineCardShadow as a_, type ILoginStyle as aa, type ILoopStyle as ab, type IMissingStyle as ac, type INoAccessStyle as ad, type INotFoundStyle as ae, type INotificationStyle as af, type INumberInputStyle as ag, type IPaperStyle as ah, type IProfileStyle as ai, type IProgressRootStyle as aj, type IProgressSectionStyle as ak, type IProgressStyle as al, type IRadioStyle as am, type IRangeSliderStyle as an, type IRatingStyle as ao, type IRefContainerStyle as ap, type IRegisterStyle as aq, type IResetPasswordStyle as ar, type IRichTextEditorStyle as as, type IScrollAreaStyle as at, type ISegmentedControlStyle as au, type ISelectStyle as av, type IShowUserInputEntry as aw, type IShowUserInputStyle as ax, type ISimpleGridStyle as ay, type ISliderStyle as az, type TStylePlacement as b, type TMantineDividerVariant as b0, type TMantineGap as b1, type TMantineGridOffset as b2, type TMantineGridOrder as b3, type TMantineHeight as b4, type TMantineIconSize as b5, type TMantineImageFit as b6, type TMantineLineClamp as b7, type TMantineListCenter as b8, type TMantineListStyleType as b9, type TSharedLabelPosition as bA, type TStyle as bB, type TMantineListType as ba, type TMantineListWithPadding as bb, type TMantinePaperShadow as bc, type TMantineProgressTransition as bd, type TMantineScrollAreaSize as be, type TMantineScrollAreaType as bf, type TMantineTextAlign as bg, type TMantineTextDecoration as bh, type TMantineTextFontStyle as bi, type TMantineTextFontWeight as bj, type TMantineTextInherit as bk, type TMantineTextInputVariant as bl, type TMantineTextSpan as bm, type TMantineTextTransform as bn, type TMantineTextTruncate as bo, type TMantineTextVariant as bp, type TMantineTextareaAutosize as bq, type TMantineTextareaResize as br, type TMantineTextareaVariant as bs, type TMantineTimelineAlign as bt, type TMantineTitleLineClamp as bu, type TMantineTitleTextWrap as bv, type TMantineTranslatable as bw, type TMantineUseInputWrapper as bx, type TMantineWidth as by, type TSharedBorder as bz, type TConcretePlatform as c, type TStylePlatform as d, type TStyleRegistryKey as e, _resetPluginStyleRegistry as f, extendStyleRegistry as g, getMergedStyleRegistry as h, getPluginStyleRegistry as i, type IContentField as j, type IAccordionItemStyle as k, type IAccordionStyle as l, type IActionIconStyle as m, type IAlertStyle as n, type IAspectRatioStyle as o, type IAudioStyle as p, type IAvatarStyle as q, type IBackgroundImageStyle as r, type IBadgeStyle as s, type IBaseStyle as t, type IBlockquoteStyle as u, type IBoxStyle as v, type IButtonStyle as w, type ICardSegmentStyle as x, type ICardStyle as y, type ICarouselStyle as z };
|
|
@@ -177,11 +177,13 @@ interface IProfileStyle extends IStyleWithSpacing {
|
|
|
177
177
|
}
|
|
178
178
|
|
|
179
179
|
type TMantineBorder = '0' | '1';
|
|
180
|
+
type TSharedBorder = '0' | '1';
|
|
180
181
|
type TMantineWidth = string;
|
|
181
182
|
type TMantineHeight = string;
|
|
182
183
|
type TMantineDividerVariant = 'solid' | 'dashed' | 'dotted';
|
|
183
184
|
type TMantinePaperShadow = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
184
185
|
type TMantineCardShadow = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
186
|
+
type TMantineCardPadding = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
185
187
|
type TMantineGap = '0' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
186
188
|
type TMantineCols = string;
|
|
187
189
|
type TMantineGridOffset = string;
|
|
@@ -298,12 +300,17 @@ interface IScrollAreaStyle extends IStyleWithSpacing {
|
|
|
298
300
|
}
|
|
299
301
|
interface ICardStyle extends IStyleWithSpacing {
|
|
300
302
|
style_name: 'card';
|
|
303
|
+
title?: IContentField<string>;
|
|
304
|
+
img_src?: IContentField<string>;
|
|
305
|
+
shared_border?: IContentField<TSharedBorder>;
|
|
306
|
+
web_card_padding?: IContentField<TMantineCardPadding>;
|
|
301
307
|
web_card_shadow?: IContentField<TMantineCardShadow>;
|
|
302
|
-
web_border?: IContentField<TMantineBorder>;
|
|
303
308
|
shared_radius?: IContentField<TSharedRadius>;
|
|
304
309
|
}
|
|
305
310
|
interface ICardSegmentStyle extends IStyleWithSpacing {
|
|
306
311
|
style_name: 'card-segment';
|
|
312
|
+
shared_border?: IContentField<TSharedBorder>;
|
|
313
|
+
web_segment_inherit_padding?: IContentField<'0' | '1'>;
|
|
307
314
|
}
|
|
308
315
|
interface IAspectRatioStyle extends IBaseStyle {
|
|
309
316
|
style_name: 'aspect-ratio';
|
|
@@ -347,10 +354,11 @@ type TMantineIconSize = string;
|
|
|
347
354
|
interface ITitleStyle extends IStyleWithSpacing {
|
|
348
355
|
style_name: 'title';
|
|
349
356
|
content?: IContentField<string>;
|
|
350
|
-
|
|
357
|
+
title_order?: IContentField<TMantineTitleOrder>;
|
|
351
358
|
shared_size?: IContentField<TMantineSize>;
|
|
359
|
+
shared_color?: IContentField<TMantineColor>;
|
|
352
360
|
web_title_text_wrap?: IContentField<TMantineTitleTextWrap>;
|
|
353
|
-
|
|
361
|
+
shared_line_clamp?: IContentField<TMantineTitleLineClamp>;
|
|
354
362
|
}
|
|
355
363
|
interface ITextStyle extends IStyleWithSpacing {
|
|
356
364
|
style_name: 'text';
|
|
@@ -371,8 +379,9 @@ interface ITextStyle extends IStyleWithSpacing {
|
|
|
371
379
|
}
|
|
372
380
|
interface ICodeStyle extends IStyleWithSpacing {
|
|
373
381
|
style_name: 'code';
|
|
374
|
-
|
|
382
|
+
code_block?: IContentField<string>;
|
|
375
383
|
shared_color?: IContentField<TMantineColor>;
|
|
384
|
+
shared_radius?: IContentField<TSharedRadius>;
|
|
376
385
|
content?: IContentField<string>;
|
|
377
386
|
}
|
|
378
387
|
interface IHighlightStyle extends IStyleWithSpacing {
|
|
@@ -555,7 +564,7 @@ interface IAvatarStyle extends IStyleWithSpacing {
|
|
|
555
564
|
interface IChipStyle extends IStyleWithSpacing {
|
|
556
565
|
style_name: 'chip';
|
|
557
566
|
label?: IContentField<string>;
|
|
558
|
-
|
|
567
|
+
shared_chip_variant?: IContentField<TMantineChipVariant>;
|
|
559
568
|
shared_size?: IContentField<TSharedSize>;
|
|
560
569
|
shared_radius?: IContentField<TSharedRadius>;
|
|
561
570
|
shared_color?: IContentField<TMantineColor>;
|
|
@@ -615,7 +624,7 @@ type TMantineTextareaVariant = 'default' | 'filled' | 'unstyled';
|
|
|
615
624
|
type TMantineUseInputWrapper = '0' | '1';
|
|
616
625
|
type TMantineTranslatable = '0' | '1';
|
|
617
626
|
type TMantineProgressTransition = '150' | '200' | '300' | '400' | '0' | string;
|
|
618
|
-
type
|
|
627
|
+
type TSharedLabelPosition = 'left' | 'right';
|
|
619
628
|
interface IFormStyle extends IStyleWithSpacing {
|
|
620
629
|
style_name: 'form-log' | 'form-record';
|
|
621
630
|
btn_save_label?: IContentField<string>;
|
|
@@ -752,7 +761,7 @@ interface ICheckboxStyle extends IStyleWithSpacing {
|
|
|
752
761
|
is_required?: IContentField<string>;
|
|
753
762
|
checkbox_value?: IContentField<string>;
|
|
754
763
|
web_checkbox_icon?: IContentField<string>;
|
|
755
|
-
|
|
764
|
+
shared_label_position?: IContentField<TSharedLabelPosition>;
|
|
756
765
|
description?: IContentField<string>;
|
|
757
766
|
disabled?: IContentField<string>;
|
|
758
767
|
shared_size?: IContentField<TSharedSize>;
|
|
@@ -2507,4 +2516,4 @@ declare function getPluginStyleRegistry(): Record<string, IPluginStyleRegistryEn
|
|
|
2507
2516
|
*/
|
|
2508
2517
|
declare function _resetPluginStyleRegistry(): void;
|
|
2509
2518
|
|
|
2510
|
-
export { type IGridStyle as $, type ICenterStyle as A, BASE_STYLE_REGISTRY as B, type ICheckboxStyle as C, type IChipStyle as D, type ICodeStyle as E, type IColorInputStyle as F, type IColorPickerStyle as G, type IComboboxStyle as H, type IStyleRegistryEntry as I, type IContainerStyle as J, type IDataContainerStyle as K, type IDatePickerStyle as L, type IDividerStyle as M, type IEntryListStyle as N, type IEntryRecordDeleteStyle as O, type IEntryRecordStyle as P, type IFieldsetStyle as Q, type IFigureStyle as R, STYLE_REGISTRY as S, type TStyleName as T, type IFileInputStyle as U, type IFlexStyle as V, type IFormLogStyle as W, type IFormRecordStyle as X, type IFormStyle as Y, type IGridColumnStyle as Z, type _AssertRegistryMatchesStyleName as _, type IPluginStyleRegistryEntry as a, type TMantineCols as a$, type IGroupStyle as a0, type IHighlightStyle as a1, type IHtmlTagStyle as a2, type IImageStyle as a3, type IIndicatorStyle as a4, type IInputStyle as a5, type IKbdStyle as a6, type ILinkStyle as a7, type IListItemStyle as a8, type IListStyle as a9, type ISpaceStyle as aA, type ISpoilerStyle as aB, type IStackStyle as aC, type IStyleWithSpacing as aD, type ISwitchStyle as aE, type ITabStyle as aF, type ITabsStyle as aG, type ITextInputStyle as aH, type ITextStyle as aI, type ITextareaStyle as aJ, type IThemeIconStyle as aK, type ITimelineItemStyle as aL, type ITimelineStyle as aM, type ITitleStyle as aN, type ITwoFactorAuthStyle as aO, type ITypographyStyle as aP, type IUnknownStyle as aQ, type IValidateStyle as aR, type IVersionStyle as aS, type IVideoStyle as aT, type TMantineAccordionChevronPosition as aU, type TMantineAccordionDisableChevronRotation as aV, type TMantineAccordionLoop as aW, type TMantineAccordionMultiple as aX, type TMantineBorder as aY, type
|
|
2519
|
+
export { type IGridStyle as $, type ICenterStyle as A, BASE_STYLE_REGISTRY as B, type ICheckboxStyle as C, type IChipStyle as D, type ICodeStyle as E, type IColorInputStyle as F, type IColorPickerStyle as G, type IComboboxStyle as H, type IStyleRegistryEntry as I, type IContainerStyle as J, type IDataContainerStyle as K, type IDatePickerStyle as L, type IDividerStyle as M, type IEntryListStyle as N, type IEntryRecordDeleteStyle as O, type IEntryRecordStyle as P, type IFieldsetStyle as Q, type IFigureStyle as R, STYLE_REGISTRY as S, type TStyleName as T, type IFileInputStyle as U, type IFlexStyle as V, type IFormLogStyle as W, type IFormRecordStyle as X, type IFormStyle as Y, type IGridColumnStyle as Z, type _AssertRegistryMatchesStyleName as _, type IPluginStyleRegistryEntry as a, type TMantineCols as a$, type IGroupStyle as a0, type IHighlightStyle as a1, type IHtmlTagStyle as a2, type IImageStyle as a3, type IIndicatorStyle as a4, type IInputStyle as a5, type IKbdStyle as a6, type ILinkStyle as a7, type IListItemStyle as a8, type IListStyle as a9, type ISpaceStyle as aA, type ISpoilerStyle as aB, type IStackStyle as aC, type IStyleWithSpacing as aD, type ISwitchStyle as aE, type ITabStyle as aF, type ITabsStyle as aG, type ITextInputStyle as aH, type ITextStyle as aI, type ITextareaStyle as aJ, type IThemeIconStyle as aK, type ITimelineItemStyle as aL, type ITimelineStyle as aM, type ITitleStyle as aN, type ITwoFactorAuthStyle as aO, type ITypographyStyle as aP, type IUnknownStyle as aQ, type IValidateStyle as aR, type IVersionStyle as aS, type IVideoStyle as aT, type TMantineAccordionChevronPosition as aU, type TMantineAccordionDisableChevronRotation as aV, type TMantineAccordionLoop as aW, type TMantineAccordionMultiple as aX, type TMantineBorder as aY, type TMantineCardPadding as aZ, type TMantineCardShadow as a_, type ILoginStyle as aa, type ILoopStyle as ab, type IMissingStyle as ac, type INoAccessStyle as ad, type INotFoundStyle as ae, type INotificationStyle as af, type INumberInputStyle as ag, type IPaperStyle as ah, type IProfileStyle as ai, type IProgressRootStyle as aj, type IProgressSectionStyle as ak, type IProgressStyle as al, type IRadioStyle as am, type IRangeSliderStyle as an, type IRatingStyle as ao, type IRefContainerStyle as ap, type IRegisterStyle as aq, type IResetPasswordStyle as ar, type IRichTextEditorStyle as as, type IScrollAreaStyle as at, type ISegmentedControlStyle as au, type ISelectStyle as av, type IShowUserInputEntry as aw, type IShowUserInputStyle as ax, type ISimpleGridStyle as ay, type ISliderStyle as az, type TStylePlacement as b, type TMantineDividerVariant as b0, type TMantineGap as b1, type TMantineGridOffset as b2, type TMantineGridOrder as b3, type TMantineHeight as b4, type TMantineIconSize as b5, type TMantineImageFit as b6, type TMantineLineClamp as b7, type TMantineListCenter as b8, type TMantineListStyleType as b9, type TSharedLabelPosition as bA, type TStyle as bB, type TMantineListType as ba, type TMantineListWithPadding as bb, type TMantinePaperShadow as bc, type TMantineProgressTransition as bd, type TMantineScrollAreaSize as be, type TMantineScrollAreaType as bf, type TMantineTextAlign as bg, type TMantineTextDecoration as bh, type TMantineTextFontStyle as bi, type TMantineTextFontWeight as bj, type TMantineTextInherit as bk, type TMantineTextInputVariant as bl, type TMantineTextSpan as bm, type TMantineTextTransform as bn, type TMantineTextTruncate as bo, type TMantineTextVariant as bp, type TMantineTextareaAutosize as bq, type TMantineTextareaResize as br, type TMantineTextareaVariant as bs, type TMantineTimelineAlign as bt, type TMantineTitleLineClamp as bu, type TMantineTitleTextWrap as bv, type TMantineTranslatable as bw, type TMantineUseInputWrapper as bx, type TMantineWidth as by, type TSharedBorder as bz, type TConcretePlatform as c, type TStylePlatform as d, type TStyleRegistryKey as e, _resetPluginStyleRegistry as f, extendStyleRegistry as g, getMergedStyleRegistry as h, getPluginStyleRegistry as i, type IContentField as j, type IAccordionItemStyle as k, type IAccordionStyle as l, type IActionIconStyle as m, type IAlertStyle as n, type IAspectRatioStyle as o, type IAudioStyle as p, type IAvatarStyle as q, type IBackgroundImageStyle as r, type IBadgeStyle as s, type IBaseStyle as t, type IBlockquoteStyle as u, type IBoxStyle as v, type IButtonStyle as w, type ICardSegmentStyle as x, type ICardStyle as y, type ICarouselStyle as z };
|
package/dist/theme/index.d.mts
CHANGED
|
@@ -265,6 +265,15 @@ declare function mapMantineVariantToHeroUiButtonVariant(variant: TSemanticVarian
|
|
|
265
265
|
* (grouped container), so every "boxed" Mantine variant collapses to `surface`.
|
|
266
266
|
*/
|
|
267
267
|
declare function mapAccordionVariantToHeroUiVariant(variant: string | undefined): 'default' | 'surface';
|
|
268
|
+
/**
|
|
269
|
+
* Map the chip variant token (`shared_chip_variant`: Mantine
|
|
270
|
+
* filled/outline/light) onto the HeroUI Native Chip `variant` vocabulary
|
|
271
|
+
* (`primary`/`secondary`/`tertiary`/`soft`):
|
|
272
|
+
* - filled -> primary (solid accent fill)
|
|
273
|
+
* - light -> soft (tinted accent background)
|
|
274
|
+
* - outline -> tertiary (transparent; the renderer adds the accent border)
|
|
275
|
+
*/
|
|
276
|
+
declare function mapChipVariantToHeroUiVariant(variant: string | undefined): 'primary' | 'secondary' | 'tertiary' | 'soft';
|
|
268
277
|
/**
|
|
269
278
|
* Read the `shared_*` CMS fields of a section into {@link ISharedStyleProps}.
|
|
270
279
|
*
|
|
@@ -345,4 +354,4 @@ interface IResolvedVariant {
|
|
|
345
354
|
}
|
|
346
355
|
declare function resolveMantineVariant(variant: string | undefined, color: string | undefined): IResolvedVariant;
|
|
347
356
|
|
|
348
|
-
export { COLOR_PALETTE, COLOR_SCALES, CONTAINER_SIZE_PX, FONT_SIZE_PX, FULL_RADIUS_PX, type IHeroUiResolvedStyle, type IMantineResolvedStyle, type IReactNativeResolvedStyle, type IReactNativeThemeScales, type IResolvedVariant, type ISharedStyleProps, type ISpacingResolved, LINE_HEIGHT, RADIUS_PX, SPACING_PX, SPACING_TO_TAILWIND, type TCanonicalColor, type TCanonicalRadius, type TCanonicalSpacing, type THeroUiButtonVariant, type THeroUiColor, type THeroUiSize, type TMantineMappedColor, type TMantineMappedVariant, type TSemanticColor, type TSemanticIntent, type TSemanticRadius, type TSemanticSize, type TSemanticSpacing, type TSemanticState, type TSemanticVariant, colorToHex, mapAccordionVariantToHeroUiVariant, mapIntentToHeroUiButtonVariant, mapIntentToHeroUiColor, mapIntentToMantine, mapMantineColorToHeroUiButtonVariant, mapMantineColorToHeroUiColor, mapMantineVariantToHeroUiButtonVariant, mapRadiusToMantine, mapRadiusToPx, mapSizeToHeroUi, mapSizeToMantine, mapSpacingToPx, radiusToPx, resolveMantineVariant, resolveSharedStyle, resolveSharedStyleForMobile, resolveSharedStyleForWeb, resolveSharedStyleProps, sizeToFontPx, spacingToPx, toHeroUiSemanticProps, toMantineSemanticProps, toReactNativeSemanticStyle };
|
|
357
|
+
export { COLOR_PALETTE, COLOR_SCALES, CONTAINER_SIZE_PX, FONT_SIZE_PX, FULL_RADIUS_PX, type IHeroUiResolvedStyle, type IMantineResolvedStyle, type IReactNativeResolvedStyle, type IReactNativeThemeScales, type IResolvedVariant, type ISharedStyleProps, type ISpacingResolved, LINE_HEIGHT, RADIUS_PX, SPACING_PX, SPACING_TO_TAILWIND, type TCanonicalColor, type TCanonicalRadius, type TCanonicalSpacing, type THeroUiButtonVariant, type THeroUiColor, type THeroUiSize, type TMantineMappedColor, type TMantineMappedVariant, type TSemanticColor, type TSemanticIntent, type TSemanticRadius, type TSemanticSize, type TSemanticSpacing, type TSemanticState, type TSemanticVariant, colorToHex, mapAccordionVariantToHeroUiVariant, mapChipVariantToHeroUiVariant, mapIntentToHeroUiButtonVariant, mapIntentToHeroUiColor, mapIntentToMantine, mapMantineColorToHeroUiButtonVariant, mapMantineColorToHeroUiColor, mapMantineVariantToHeroUiButtonVariant, mapRadiusToMantine, mapRadiusToPx, mapSizeToHeroUi, mapSizeToMantine, mapSpacingToPx, radiusToPx, resolveMantineVariant, resolveSharedStyle, resolveSharedStyleForMobile, resolveSharedStyleForWeb, resolveSharedStyleProps, sizeToFontPx, spacingToPx, toHeroUiSemanticProps, toMantineSemanticProps, toReactNativeSemanticStyle };
|
package/dist/theme/index.d.ts
CHANGED
|
@@ -265,6 +265,15 @@ declare function mapMantineVariantToHeroUiButtonVariant(variant: TSemanticVarian
|
|
|
265
265
|
* (grouped container), so every "boxed" Mantine variant collapses to `surface`.
|
|
266
266
|
*/
|
|
267
267
|
declare function mapAccordionVariantToHeroUiVariant(variant: string | undefined): 'default' | 'surface';
|
|
268
|
+
/**
|
|
269
|
+
* Map the chip variant token (`shared_chip_variant`: Mantine
|
|
270
|
+
* filled/outline/light) onto the HeroUI Native Chip `variant` vocabulary
|
|
271
|
+
* (`primary`/`secondary`/`tertiary`/`soft`):
|
|
272
|
+
* - filled -> primary (solid accent fill)
|
|
273
|
+
* - light -> soft (tinted accent background)
|
|
274
|
+
* - outline -> tertiary (transparent; the renderer adds the accent border)
|
|
275
|
+
*/
|
|
276
|
+
declare function mapChipVariantToHeroUiVariant(variant: string | undefined): 'primary' | 'secondary' | 'tertiary' | 'soft';
|
|
268
277
|
/**
|
|
269
278
|
* Read the `shared_*` CMS fields of a section into {@link ISharedStyleProps}.
|
|
270
279
|
*
|
|
@@ -345,4 +354,4 @@ interface IResolvedVariant {
|
|
|
345
354
|
}
|
|
346
355
|
declare function resolveMantineVariant(variant: string | undefined, color: string | undefined): IResolvedVariant;
|
|
347
356
|
|
|
348
|
-
export { COLOR_PALETTE, COLOR_SCALES, CONTAINER_SIZE_PX, FONT_SIZE_PX, FULL_RADIUS_PX, type IHeroUiResolvedStyle, type IMantineResolvedStyle, type IReactNativeResolvedStyle, type IReactNativeThemeScales, type IResolvedVariant, type ISharedStyleProps, type ISpacingResolved, LINE_HEIGHT, RADIUS_PX, SPACING_PX, SPACING_TO_TAILWIND, type TCanonicalColor, type TCanonicalRadius, type TCanonicalSpacing, type THeroUiButtonVariant, type THeroUiColor, type THeroUiSize, type TMantineMappedColor, type TMantineMappedVariant, type TSemanticColor, type TSemanticIntent, type TSemanticRadius, type TSemanticSize, type TSemanticSpacing, type TSemanticState, type TSemanticVariant, colorToHex, mapAccordionVariantToHeroUiVariant, mapIntentToHeroUiButtonVariant, mapIntentToHeroUiColor, mapIntentToMantine, mapMantineColorToHeroUiButtonVariant, mapMantineColorToHeroUiColor, mapMantineVariantToHeroUiButtonVariant, mapRadiusToMantine, mapRadiusToPx, mapSizeToHeroUi, mapSizeToMantine, mapSpacingToPx, radiusToPx, resolveMantineVariant, resolveSharedStyle, resolveSharedStyleForMobile, resolveSharedStyleForWeb, resolveSharedStyleProps, sizeToFontPx, spacingToPx, toHeroUiSemanticProps, toMantineSemanticProps, toReactNativeSemanticStyle };
|
|
357
|
+
export { COLOR_PALETTE, COLOR_SCALES, CONTAINER_SIZE_PX, FONT_SIZE_PX, FULL_RADIUS_PX, type IHeroUiResolvedStyle, type IMantineResolvedStyle, type IReactNativeResolvedStyle, type IReactNativeThemeScales, type IResolvedVariant, type ISharedStyleProps, type ISpacingResolved, LINE_HEIGHT, RADIUS_PX, SPACING_PX, SPACING_TO_TAILWIND, type TCanonicalColor, type TCanonicalRadius, type TCanonicalSpacing, type THeroUiButtonVariant, type THeroUiColor, type THeroUiSize, type TMantineMappedColor, type TMantineMappedVariant, type TSemanticColor, type TSemanticIntent, type TSemanticRadius, type TSemanticSize, type TSemanticSpacing, type TSemanticState, type TSemanticVariant, colorToHex, mapAccordionVariantToHeroUiVariant, mapChipVariantToHeroUiVariant, mapIntentToHeroUiButtonVariant, mapIntentToHeroUiColor, mapIntentToMantine, mapMantineColorToHeroUiButtonVariant, mapMantineColorToHeroUiColor, mapMantineVariantToHeroUiButtonVariant, mapRadiusToMantine, mapRadiusToPx, mapSizeToHeroUi, mapSizeToMantine, mapSpacingToPx, radiusToPx, resolveMantineVariant, resolveSharedStyle, resolveSharedStyleForMobile, resolveSharedStyleForWeb, resolveSharedStyleProps, sizeToFontPx, spacingToPx, toHeroUiSemanticProps, toMantineSemanticProps, toReactNativeSemanticStyle };
|
package/dist/theme/index.js
CHANGED
|
@@ -31,6 +31,7 @@ __export(theme_exports, {
|
|
|
31
31
|
SPACING_TO_TAILWIND: () => SPACING_TO_TAILWIND,
|
|
32
32
|
colorToHex: () => colorToHex,
|
|
33
33
|
mapAccordionVariantToHeroUiVariant: () => mapAccordionVariantToHeroUiVariant,
|
|
34
|
+
mapChipVariantToHeroUiVariant: () => mapChipVariantToHeroUiVariant,
|
|
34
35
|
mapIntentToHeroUiButtonVariant: () => mapIntentToHeroUiButtonVariant,
|
|
35
36
|
mapIntentToHeroUiColor: () => mapIntentToHeroUiColor,
|
|
36
37
|
mapIntentToMantine: () => mapIntentToMantine,
|
|
@@ -392,6 +393,17 @@ function mapAccordionVariantToHeroUiVariant(variant) {
|
|
|
392
393
|
return "default";
|
|
393
394
|
}
|
|
394
395
|
}
|
|
396
|
+
function mapChipVariantToHeroUiVariant(variant) {
|
|
397
|
+
switch (variant) {
|
|
398
|
+
case "light":
|
|
399
|
+
return "soft";
|
|
400
|
+
case "outline":
|
|
401
|
+
return "tertiary";
|
|
402
|
+
case "filled":
|
|
403
|
+
default:
|
|
404
|
+
return "primary";
|
|
405
|
+
}
|
|
406
|
+
}
|
|
395
407
|
function hasState(states, state) {
|
|
396
408
|
return !!states && states.includes(state);
|
|
397
409
|
}
|
|
@@ -590,6 +602,7 @@ function resolveMantineVariant(variant, color) {
|
|
|
590
602
|
SPACING_TO_TAILWIND,
|
|
591
603
|
colorToHex,
|
|
592
604
|
mapAccordionVariantToHeroUiVariant,
|
|
605
|
+
mapChipVariantToHeroUiVariant,
|
|
593
606
|
mapIntentToHeroUiButtonVariant,
|
|
594
607
|
mapIntentToHeroUiColor,
|
|
595
608
|
mapIntentToMantine,
|
package/dist/theme/index.mjs
CHANGED
|
@@ -332,6 +332,17 @@ function mapAccordionVariantToHeroUiVariant(variant) {
|
|
|
332
332
|
return "default";
|
|
333
333
|
}
|
|
334
334
|
}
|
|
335
|
+
function mapChipVariantToHeroUiVariant(variant) {
|
|
336
|
+
switch (variant) {
|
|
337
|
+
case "light":
|
|
338
|
+
return "soft";
|
|
339
|
+
case "outline":
|
|
340
|
+
return "tertiary";
|
|
341
|
+
case "filled":
|
|
342
|
+
default:
|
|
343
|
+
return "primary";
|
|
344
|
+
}
|
|
345
|
+
}
|
|
335
346
|
function hasState(states, state) {
|
|
336
347
|
return !!states && states.includes(state);
|
|
337
348
|
}
|
|
@@ -529,6 +540,7 @@ export {
|
|
|
529
540
|
SPACING_TO_TAILWIND,
|
|
530
541
|
colorToHex,
|
|
531
542
|
mapAccordionVariantToHeroUiVariant,
|
|
543
|
+
mapChipVariantToHeroUiVariant,
|
|
532
544
|
mapIntentToHeroUiButtonVariant,
|
|
533
545
|
mapIntentToHeroUiColor,
|
|
534
546
|
mapIntentToMantine,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@selfhelp/shared",
|
|
3
|
-
"version": "1.14.
|
|
3
|
+
"version": "1.14.9",
|
|
4
4
|
"description": "Shared TypeScript package for SelfHelp web frontend and mobile app: style registry, types, API contracts, Mantine theme tokens, condition + interpolation engines, CMS class allow-list.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
mapMantineColorToHeroUiButtonVariant,
|
|
12
12
|
mapMantineColorToHeroUiColor,
|
|
13
13
|
mapAccordionVariantToHeroUiVariant,
|
|
14
|
+
mapChipVariantToHeroUiVariant,
|
|
14
15
|
mapMantineVariantToHeroUiButtonVariant,
|
|
15
16
|
mapRadiusToMantine,
|
|
16
17
|
mapRadiusToPx,
|
|
@@ -181,6 +182,13 @@ describe('semantic style mapper', () => {
|
|
|
181
182
|
expect(mapAccordionVariantToHeroUiVariant(undefined)).toBe('default');
|
|
182
183
|
});
|
|
183
184
|
|
|
185
|
+
it('maps the chip variant token onto the HeroUI Native chip variant', () => {
|
|
186
|
+
expect(mapChipVariantToHeroUiVariant('filled')).toBe('primary');
|
|
187
|
+
expect(mapChipVariantToHeroUiVariant('light')).toBe('soft');
|
|
188
|
+
expect(mapChipVariantToHeroUiVariant('outline')).toBe('tertiary');
|
|
189
|
+
expect(mapChipVariantToHeroUiVariant(undefined)).toBe('primary');
|
|
190
|
+
});
|
|
191
|
+
|
|
184
192
|
it('derives a button variant from the colour when no variant is set', () => {
|
|
185
193
|
expect(mapMantineColorToHeroUiButtonVariant('red')).toBe('danger');
|
|
186
194
|
expect(mapMantineColorToHeroUiButtonVariant('gray')).toBe('secondary');
|
package/src/theme/semantic.ts
CHANGED
|
@@ -453,6 +453,28 @@ export function mapAccordionVariantToHeroUiVariant(
|
|
|
453
453
|
}
|
|
454
454
|
}
|
|
455
455
|
|
|
456
|
+
/**
|
|
457
|
+
* Map the chip variant token (`shared_chip_variant`: Mantine
|
|
458
|
+
* filled/outline/light) onto the HeroUI Native Chip `variant` vocabulary
|
|
459
|
+
* (`primary`/`secondary`/`tertiary`/`soft`):
|
|
460
|
+
* - filled -> primary (solid accent fill)
|
|
461
|
+
* - light -> soft (tinted accent background)
|
|
462
|
+
* - outline -> tertiary (transparent; the renderer adds the accent border)
|
|
463
|
+
*/
|
|
464
|
+
export function mapChipVariantToHeroUiVariant(
|
|
465
|
+
variant: string | undefined,
|
|
466
|
+
): 'primary' | 'secondary' | 'tertiary' | 'soft' {
|
|
467
|
+
switch (variant) {
|
|
468
|
+
case 'light':
|
|
469
|
+
return 'soft';
|
|
470
|
+
case 'outline':
|
|
471
|
+
return 'tertiary';
|
|
472
|
+
case 'filled':
|
|
473
|
+
default:
|
|
474
|
+
return 'primary';
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
|
|
456
478
|
// ===== state helpers =====
|
|
457
479
|
|
|
458
480
|
function hasState(states: readonly TSemanticState[] | undefined, state: TSemanticState): boolean {
|
|
@@ -16,7 +16,7 @@ export type TMantineTextareaVariant = 'default' | 'filled' | 'unstyled';
|
|
|
16
16
|
export type TMantineUseInputWrapper = '0' | '1';
|
|
17
17
|
export type TMantineTranslatable = '0' | '1';
|
|
18
18
|
export type TMantineProgressTransition = '150' | '200' | '300' | '400' | '0' | string;
|
|
19
|
-
export type
|
|
19
|
+
export type TSharedLabelPosition = 'left' | 'right';
|
|
20
20
|
|
|
21
21
|
export interface IFormStyle extends IStyleWithSpacing {
|
|
22
22
|
style_name: 'form-log' | 'form-record';
|
|
@@ -165,7 +165,8 @@ export interface ICheckboxStyle extends IStyleWithSpacing {
|
|
|
165
165
|
is_required?: IContentField<string>;
|
|
166
166
|
checkbox_value?: IContentField<string>;
|
|
167
167
|
web_checkbox_icon?: IContentField<string>;
|
|
168
|
-
|
|
168
|
+
// Label side (left/right) honoured on both platforms.
|
|
169
|
+
shared_label_position?: IContentField<TSharedLabelPosition>;
|
|
169
170
|
description?: IContentField<string>;
|
|
170
171
|
disabled?: IContentField<string>;
|
|
171
172
|
shared_size?: IContentField<TSharedSize>;
|
|
@@ -104,7 +104,8 @@ export interface IAvatarStyle extends IStyleWithSpacing {
|
|
|
104
104
|
export interface IChipStyle extends IStyleWithSpacing {
|
|
105
105
|
style_name: 'chip';
|
|
106
106
|
label?: IContentField<string>;
|
|
107
|
-
|
|
107
|
+
// Cross-platform variant (Mantine filled/outline/light; HeroUI Native chip variant).
|
|
108
|
+
shared_chip_variant?: IContentField<TMantineChipVariant>;
|
|
108
109
|
shared_size?: IContentField<TSharedSize>;
|
|
109
110
|
shared_radius?: IContentField<TSharedRadius>;
|
|
110
111
|
shared_color?: IContentField<TMantineColor>;
|
|
@@ -18,11 +18,15 @@ import type {
|
|
|
18
18
|
|
|
19
19
|
// Style-specific helper types only used in layout interfaces
|
|
20
20
|
export type TMantineBorder = '0' | '1';
|
|
21
|
+
// Cross-platform border toggle (card family): Mantine `withBorder` on web,
|
|
22
|
+
// a themed border/divider on mobile.
|
|
23
|
+
export type TSharedBorder = '0' | '1';
|
|
21
24
|
export type TMantineWidth = string;
|
|
22
25
|
export type TMantineHeight = string;
|
|
23
26
|
export type TMantineDividerVariant = 'solid' | 'dashed' | 'dotted';
|
|
24
27
|
export type TMantinePaperShadow = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
25
28
|
export type TMantineCardShadow = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
29
|
+
export type TMantineCardPadding = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
26
30
|
export type TMantineGap = '0' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
27
31
|
export type TMantineCols = string;
|
|
28
32
|
export type TMantineGridOffset = string;
|
|
@@ -147,12 +151,22 @@ export interface IScrollAreaStyle extends IStyleWithSpacing {
|
|
|
147
151
|
|
|
148
152
|
export interface ICardStyle extends IStyleWithSpacing {
|
|
149
153
|
style_name: 'card';
|
|
154
|
+
// Optional auto-styled convenience content: rendered only when non-empty,
|
|
155
|
+
// never auto-creating a child section.
|
|
156
|
+
title?: IContentField<string>;
|
|
157
|
+
img_src?: IContentField<string>;
|
|
158
|
+
// Cross-platform border (Mantine withBorder / themed border on mobile).
|
|
159
|
+
shared_border?: IContentField<TSharedBorder>;
|
|
160
|
+
web_card_padding?: IContentField<TMantineCardPadding>;
|
|
150
161
|
web_card_shadow?: IContentField<TMantineCardShadow>;
|
|
151
|
-
web_border?: IContentField<TMantineBorder>;
|
|
152
162
|
shared_radius?: IContentField<TSharedRadius>;}
|
|
153
163
|
|
|
154
164
|
export interface ICardSegmentStyle extends IStyleWithSpacing {
|
|
155
|
-
style_name: 'card-segment';
|
|
165
|
+
style_name: 'card-segment';
|
|
166
|
+
// Mantine Card.Section withBorder (themed divider on mobile).
|
|
167
|
+
shared_border?: IContentField<TSharedBorder>;
|
|
168
|
+
// Mantine Card.Section inheritPadding (web only).
|
|
169
|
+
web_segment_inherit_padding?: IContentField<'0' | '1'>;}
|
|
156
170
|
|
|
157
171
|
export interface IAspectRatioStyle extends IBaseStyle {
|
|
158
172
|
style_name: 'aspect-ratio';
|
|
@@ -10,6 +10,7 @@ import type {
|
|
|
10
10
|
TMantineTitleOrder,
|
|
11
11
|
TMantineFieldsetVariant,
|
|
12
12
|
TMantineSpoilerMaxHeight,
|
|
13
|
+
TSharedRadius,
|
|
13
14
|
} from '../mantine/common';
|
|
14
15
|
|
|
15
16
|
export type TMantineTitleTextWrap = 'wrap' | 'balance' | 'nowrap';
|
|
@@ -29,10 +30,13 @@ export type TMantineIconSize = string;
|
|
|
29
30
|
export interface ITitleStyle extends IStyleWithSpacing {
|
|
30
31
|
style_name: 'title';
|
|
31
32
|
content?: IContentField<string>;
|
|
32
|
-
|
|
33
|
+
// Semantic heading level (H1-H6) read on both platforms.
|
|
34
|
+
title_order?: IContentField<TMantineTitleOrder>;
|
|
33
35
|
shared_size?: IContentField<TMantineSize>;
|
|
36
|
+
shared_color?: IContentField<TMantineColor>;
|
|
34
37
|
web_title_text_wrap?: IContentField<TMantineTitleTextWrap>;
|
|
35
|
-
|
|
38
|
+
// Web lineClamp / mobile numberOfLines.
|
|
39
|
+
shared_line_clamp?: IContentField<TMantineTitleLineClamp>;}
|
|
36
40
|
|
|
37
41
|
export interface ITextStyle extends IStyleWithSpacing {
|
|
38
42
|
style_name: 'text';
|
|
@@ -53,8 +57,11 @@ export interface ITextStyle extends IStyleWithSpacing {
|
|
|
53
57
|
|
|
54
58
|
export interface ICodeStyle extends IStyleWithSpacing {
|
|
55
59
|
style_name: 'code';
|
|
56
|
-
|
|
57
|
-
|
|
60
|
+
// Cross-platform block-vs-inline behaviour.
|
|
61
|
+
code_block?: IContentField<string>;
|
|
62
|
+
shared_color?: IContentField<TMantineColor>;
|
|
63
|
+
shared_radius?: IContentField<TSharedRadius>;
|
|
64
|
+
content?: IContentField<string>;
|
|
58
65
|
}
|
|
59
66
|
|
|
60
67
|
export interface IHighlightStyle extends IStyleWithSpacing {
|