@selfhelp/shared 1.14.4 → 1.14.6
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 +64 -0
- package/dist/{common-CJSHQL1E.d.mts → common-DVC0R_AX.d.mts} +1 -1
- package/dist/{common-CJSHQL1E.d.ts → common-DVC0R_AX.d.ts} +1 -1
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +70 -2
- package/dist/index.mjs +67 -2
- package/dist/plugin-sdk/index.d.mts +2 -2
- package/dist/plugin-sdk/index.d.ts +2 -2
- package/dist/registry/index.d.mts +3 -3
- package/dist/registry/index.d.ts +3 -3
- package/dist/{styles.registry-B0G7kKxh.d.mts → styles.registry-CxVYVra_.d.ts} +16 -4
- package/dist/{styles.registry-D4bQy2Pz.d.ts → styles.registry-DcE83d4x.d.mts} +16 -4
- package/dist/theme/index.d.mts +59 -3
- package/dist/theme/index.d.ts +59 -3
- package/dist/theme/index.js +70 -2
- package/dist/theme/index.mjs +67 -2
- package/package.json +1 -1
- package/src/theme/__tests__/semantic.test.ts +70 -0
- package/src/theme/semantic.ts +142 -4
- package/src/types/styles/auth.ts +5 -1
- package/src/types/styles/interactive.ts +19 -7
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,70 @@ 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.6
|
|
13
|
+
|
|
14
|
+
Style polish wave (alert/badge/avatar/button/login) — align the typed contracts
|
|
15
|
+
with the backend `Version20260619131830` migration. Patch bump: additive/renamed
|
|
16
|
+
optional style fields plus a behaviour-preserving mapper lint fix.
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- **`IButtonStyle`:** the variant is now the cross-platform `shared_variant`
|
|
21
|
+
(`TMantineVariant`); the button-only `web_variant` was removed (the backend
|
|
22
|
+
migrated existing values onto `shared_variant`).
|
|
23
|
+
- **`IBadgeStyle`:** added the cross-platform `shared_variant`
|
|
24
|
+
(`TMantineBadgeVariant`) as the primary control and a `circle` toggle;
|
|
25
|
+
`web_variant` stays as an optional web-only override (e.g. `dot`).
|
|
26
|
+
- **`IAvatarStyle`:** renamed the stale `web_avatar_variant` to `web_variant`
|
|
27
|
+
(matches the DB field) and added the `name` field (auto-initials + auto colour).
|
|
28
|
+
- **`IAlertStyle`:** renamed `web_with_close_button` to the cross-platform
|
|
29
|
+
`closable` (the DB field is now `common`-scoped so mobile can honour it).
|
|
30
|
+
- **`ILoginStyle`:** added the optional translatable `subtitle` and the
|
|
31
|
+
`shared_color` submit-button colour (both now in the live catalog).
|
|
32
|
+
- **`semantic.ts`:** removed an unnecessary `as TSemanticColor` assertion
|
|
33
|
+
(`TMantineColor` already collapses to `string`); resolves a pre-existing
|
|
34
|
+
`@typescript-eslint/no-unnecessary-type-assertion` lint error. No behaviour
|
|
35
|
+
change — `resolveSharedStyleProps`/`toHeroUiSemanticProps` already read
|
|
36
|
+
`shared_variant`/`shared_color`, so the new badge/button variants flow through
|
|
37
|
+
the existing mapper unchanged.
|
|
38
|
+
|
|
39
|
+
## v1.14.5
|
|
40
|
+
|
|
41
|
+
Semantic mapper completion — reconcile the shared mapper with the live DB
|
|
42
|
+
catalog (style-field audit, "shared semantics disconnected from the database").
|
|
43
|
+
Minor bump: additive new exports + the `toHeroUiSemanticProps` /
|
|
44
|
+
`resolveSharedStyleProps` resolvers now read the REAL cross-platform appearance
|
|
45
|
+
fields instead of the phantom `shared_intent`. Pairs with the coupled mobile
|
|
46
|
+
renderer reads (mobile `mobileStyleProps` + the layout/typography/interactive
|
|
47
|
+
components switched from phantom `web_*` to the real `shared_*` fields).
|
|
48
|
+
|
|
49
|
+
### Added
|
|
50
|
+
|
|
51
|
+
- **`semantic.ts` — Mantine → HeroUI Native maps:** `mapMantineColorToHeroUiColor`,
|
|
52
|
+
`mapMantineColorToHeroUiButtonVariant`, `mapMantineVariantToHeroUiButtonVariant`,
|
|
53
|
+
plus the `TSemanticColor` / `TSemanticVariant` types. These turn the catalog's
|
|
54
|
+
Mantine palette/variant values (stored verbatim in `shared_color` /
|
|
55
|
+
`shared_variant`) into the HeroUI Native button/colour vocabulary.
|
|
56
|
+
- **`ISharedStyleProps`:** new optional `color` / `variant` fields (the real
|
|
57
|
+
cross-platform appearance inputs).
|
|
58
|
+
|
|
59
|
+
### Changed
|
|
60
|
+
|
|
61
|
+
- **`resolveSharedStyleProps`:** now reads `shared_color` + `shared_variant`
|
|
62
|
+
(the fields the DB actually has, and the same ones the web renderer reads). The
|
|
63
|
+
legacy `shared_intent` read is kept as a back-compat fallback only — it is not
|
|
64
|
+
in the live catalog.
|
|
65
|
+
- **`toHeroUiSemanticProps`:** appearance precedence is now `shared_variant` →
|
|
66
|
+
`shared_color` → legacy `intent`, mirroring the web renderer. Existing
|
|
67
|
+
intent-only callers are unaffected (intent stays the final fallback).
|
|
68
|
+
|
|
69
|
+
### Notes
|
|
70
|
+
|
|
71
|
+
- The web frontend does not consume this mapper (it reads `shared_*` straight
|
|
72
|
+
into Mantine), so this change is mobile-facing only; web behaviour is unchanged.
|
|
73
|
+
- Fixes the latent bug where CMS-authored `shared_color` / `shared_variant` were
|
|
74
|
+
silently dropped on mobile because the mapper only looked for `shared_intent`.
|
|
75
|
+
|
|
12
76
|
## v1.14.4
|
|
13
77
|
|
|
14
78
|
Style-field cleanup slice 9 — spacing consolidation (RF-15). Pairs with backend
|
|
@@ -89,4 +89,4 @@ type TMantineGrow = '0' | '1';
|
|
|
89
89
|
type TMantineInline = '0' | '1';
|
|
90
90
|
type TMantineFluid = '0' | '1';
|
|
91
91
|
|
|
92
|
-
export type { TMantineInline as $, TMantineAspectRatio as A, TMantineAutoContrast as B, TMantineBlock as C, TMantineCenterInline as D, TMantineChecked as E, TMantineChipChecked as F, TMantineChipMultiple as G, TMantineClampBehavior as H, TMantineCodeBlock as I, TMantineColorFormat as J, TMantineColorInputSwatches as K, TMantineColorPickerSwatches as L, TMantineColorPickerSwatchesPerRow as M, TMantineCompact as N, TMantineContainerFluid as O, TMantineDisabled as P, TMantineFileAccept as Q, TMantineFileInputMultiple as R, TMantineFluid as S,
|
|
92
|
+
export type { TMantineInline as $, TMantineAspectRatio as A, TMantineAutoContrast as B, TMantineBlock as C, TMantineCenterInline as D, TMantineChecked as E, TMantineChipChecked as F, TMantineChipMultiple as G, TMantineClampBehavior as H, TMantineCodeBlock as I, TMantineColorFormat as J, TMantineColorInputSwatches as K, TMantineColorPickerSwatches as L, TMantineColorPickerSwatchesPerRow as M, TMantineCompact as N, TMantineContainerFluid as O, TMantineDisabled as P, TMantineFileAccept as Q, TMantineFileInputMultiple as R, TMantineFluid as S, TMantineColor as T, TMantineFullWidth as U, TMantineGridGrow as V, TMantineGridOverflow as W, TMantineGroupGrow as X, TMantineGroupWrap as Y, TMantineGrow as Z, TMantineHighlight as _, TMantineRadius as a, TMantineIsLink as a0, TMantineKbdSize as a1, TMantineLoading as a2, TMantineMultiple as a3, TMantineNotificationWithCloseButton as a4, TMantineNumberInputDecimalScale as a5, TMantineOpenInNewTab as a6, TMantineProcessing as a7, TMantineRangeSliderMarks as a8, TMantineRatingCount as a9, TMantineRatingFractions as aa, TMantineRatingReadonly as ab, TMantineReadonly as ac, TMantineSpaceHorizontal as ad, TMantineSwatches as ae, TMantineTabDisabled as af, TMantineUseMantineStyle as ag, TMantineWithCloseButton as ah, TMantineWithIcon as ai, TSharedSize as b, TMantineSpacing as c, TMantineJustify as d, TMantineAlign as e, TMantineDirection as f, TMantineWrap as g, TMantineGridSpan as h, TMantineOrientation as i, TSharedRadius as j, TMantineTitleOrder as k, TMantineSize as l, TMantineFieldsetVariant as m, TMantineSpoilerMaxHeight as n, TMantineVariant as o, TMantineBadgeVariant as p, TMantineAvatarVariant as q, TMantineChipVariant as r, TMantineIndicatorPosition as s, TMantineThemeIconVariant as t, TMantineAccordionVariant as u, TMantineTabsVariant as v, TMantineTimelineLineVariant as w, TMantineActionIconLoading as x, TMantineAllowNextClicks as y, TMantineAllowStepClick as z };
|
|
@@ -89,4 +89,4 @@ type TMantineGrow = '0' | '1';
|
|
|
89
89
|
type TMantineInline = '0' | '1';
|
|
90
90
|
type TMantineFluid = '0' | '1';
|
|
91
91
|
|
|
92
|
-
export type { TMantineInline as $, TMantineAspectRatio as A, TMantineAutoContrast as B, TMantineBlock as C, TMantineCenterInline as D, TMantineChecked as E, TMantineChipChecked as F, TMantineChipMultiple as G, TMantineClampBehavior as H, TMantineCodeBlock as I, TMantineColorFormat as J, TMantineColorInputSwatches as K, TMantineColorPickerSwatches as L, TMantineColorPickerSwatchesPerRow as M, TMantineCompact as N, TMantineContainerFluid as O, TMantineDisabled as P, TMantineFileAccept as Q, TMantineFileInputMultiple as R, TMantineFluid as S,
|
|
92
|
+
export type { TMantineInline as $, TMantineAspectRatio as A, TMantineAutoContrast as B, TMantineBlock as C, TMantineCenterInline as D, TMantineChecked as E, TMantineChipChecked as F, TMantineChipMultiple as G, TMantineClampBehavior as H, TMantineCodeBlock as I, TMantineColorFormat as J, TMantineColorInputSwatches as K, TMantineColorPickerSwatches as L, TMantineColorPickerSwatchesPerRow as M, TMantineCompact as N, TMantineContainerFluid as O, TMantineDisabled as P, TMantineFileAccept as Q, TMantineFileInputMultiple as R, TMantineFluid as S, TMantineColor as T, TMantineFullWidth as U, TMantineGridGrow as V, TMantineGridOverflow as W, TMantineGroupGrow as X, TMantineGroupWrap as Y, TMantineGrow as Z, TMantineHighlight as _, TMantineRadius as a, TMantineIsLink as a0, TMantineKbdSize as a1, TMantineLoading as a2, TMantineMultiple as a3, TMantineNotificationWithCloseButton as a4, TMantineNumberInputDecimalScale as a5, TMantineOpenInNewTab as a6, TMantineProcessing as a7, TMantineRangeSliderMarks as a8, TMantineRatingCount as a9, TMantineRatingFractions as aa, TMantineRatingReadonly as ab, TMantineReadonly as ac, TMantineSpaceHorizontal as ad, TMantineSwatches as ae, TMantineTabDisabled as af, TMantineUseMantineStyle as ag, TMantineWithCloseButton as ah, TMantineWithIcon as ai, TSharedSize as b, TMantineSpacing as c, TMantineJustify as d, TMantineAlign as e, TMantineDirection as f, TMantineWrap as g, TMantineGridSpan as h, TMantineOrientation as i, TSharedRadius as j, TMantineTitleOrder as k, TMantineSize as l, TMantineFieldsetVariant as m, TMantineSpoilerMaxHeight as n, TMantineVariant as o, TMantineBadgeVariant as p, TMantineAvatarVariant as q, TMantineChipVariant as r, TMantineIndicatorPosition as s, TMantineThemeIconVariant as t, TMantineAccordionVariant as u, TMantineTabsVariant as v, TMantineTimelineLineVariant as w, TMantineActionIconLoading as x, TMantineAllowNextClicks as y, TMantineAllowStepClick as z };
|
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 TMantineCardShadow, a_ as TMantineCheckboxLabelPosition, 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 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-
|
|
3
|
-
export { u as TMantineAccordionVariant, x as TMantineActionIconLoading,
|
|
1
|
+
import { T as TStyleName, j as IContentField } from './styles.registry-DcE83d4x.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 TMantineCardShadow, a_ as TMantineCheckboxLabelPosition, 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 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-DcE83d4x.mjs';
|
|
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, TSemanticIntent, TSemanticRadius, TSemanticSize, TSemanticSpacing, TSemanticState, colorToHex, mapIntentToHeroUiButtonVariant, mapIntentToHeroUiColor, mapIntentToMantine, 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, 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 TMantineCardShadow, a_ as TMantineCheckboxLabelPosition, 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 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-
|
|
3
|
-
export { u as TMantineAccordionVariant, x as TMantineActionIconLoading,
|
|
1
|
+
import { T as TStyleName, j as IContentField } from './styles.registry-CxVYVra_.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 TMantineCardShadow, a_ as TMantineCheckboxLabelPosition, 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 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-CxVYVra_.js';
|
|
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, TSemanticIntent, TSemanticRadius, TSemanticSize, TSemanticSpacing, TSemanticState, colorToHex, mapIntentToHeroUiButtonVariant, mapIntentToHeroUiColor, mapIntentToMantine, 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, 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
|
@@ -79,6 +79,9 @@ __export(index_exports, {
|
|
|
79
79
|
mapIntentToHeroUiButtonVariant: () => mapIntentToHeroUiButtonVariant,
|
|
80
80
|
mapIntentToHeroUiColor: () => mapIntentToHeroUiColor,
|
|
81
81
|
mapIntentToMantine: () => mapIntentToMantine,
|
|
82
|
+
mapMantineColorToHeroUiButtonVariant: () => mapMantineColorToHeroUiButtonVariant,
|
|
83
|
+
mapMantineColorToHeroUiColor: () => mapMantineColorToHeroUiColor,
|
|
84
|
+
mapMantineVariantToHeroUiButtonVariant: () => mapMantineVariantToHeroUiButtonVariant,
|
|
82
85
|
mapRadiusToMantine: () => mapRadiusToMantine,
|
|
83
86
|
mapRadiusToPx: () => mapRadiusToPx,
|
|
84
87
|
mapSizeToHeroUi: () => mapSizeToHeroUi,
|
|
@@ -711,6 +714,58 @@ function mapIntentToHeroUiColor(intent) {
|
|
|
711
714
|
return void 0;
|
|
712
715
|
}
|
|
713
716
|
}
|
|
717
|
+
function mapMantineColorToHeroUiColor(color) {
|
|
718
|
+
if (!color) return void 0;
|
|
719
|
+
switch (color) {
|
|
720
|
+
case "red":
|
|
721
|
+
case "pink":
|
|
722
|
+
return "danger";
|
|
723
|
+
case "green":
|
|
724
|
+
case "teal":
|
|
725
|
+
case "lime":
|
|
726
|
+
return "success";
|
|
727
|
+
case "yellow":
|
|
728
|
+
case "orange":
|
|
729
|
+
return "warning";
|
|
730
|
+
case "gray":
|
|
731
|
+
case "dark":
|
|
732
|
+
return "default";
|
|
733
|
+
default:
|
|
734
|
+
return "accent";
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
function mapMantineColorToHeroUiButtonVariant(color) {
|
|
738
|
+
if (!color) return void 0;
|
|
739
|
+
switch (color) {
|
|
740
|
+
case "red":
|
|
741
|
+
case "pink":
|
|
742
|
+
return "danger";
|
|
743
|
+
case "gray":
|
|
744
|
+
case "dark":
|
|
745
|
+
return "secondary";
|
|
746
|
+
default:
|
|
747
|
+
return "primary";
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
function mapMantineVariantToHeroUiButtonVariant(variant) {
|
|
751
|
+
if (!variant) return void 0;
|
|
752
|
+
switch (variant) {
|
|
753
|
+
case "filled":
|
|
754
|
+
case "gradient":
|
|
755
|
+
return "primary";
|
|
756
|
+
case "light":
|
|
757
|
+
case "white":
|
|
758
|
+
case "default":
|
|
759
|
+
return "secondary";
|
|
760
|
+
case "outline":
|
|
761
|
+
return "outline";
|
|
762
|
+
case "subtle":
|
|
763
|
+
case "transparent":
|
|
764
|
+
return "ghost";
|
|
765
|
+
default:
|
|
766
|
+
return void 0;
|
|
767
|
+
}
|
|
768
|
+
}
|
|
714
769
|
function hasState(states, state) {
|
|
715
770
|
return !!states && states.includes(state);
|
|
716
771
|
}
|
|
@@ -734,6 +789,14 @@ function resolveSharedStyleProps(fields) {
|
|
|
734
789
|
if (radius !== void 0 && SEMANTIC_RADII.includes(radius)) {
|
|
735
790
|
resolved.radius = radius;
|
|
736
791
|
}
|
|
792
|
+
const color = readString(fields.shared_color);
|
|
793
|
+
if (color !== void 0) {
|
|
794
|
+
resolved.color = color;
|
|
795
|
+
}
|
|
796
|
+
const variant = readString(fields.shared_variant);
|
|
797
|
+
if (variant !== void 0) {
|
|
798
|
+
resolved.variant = variant;
|
|
799
|
+
}
|
|
737
800
|
const intent = readString(fields.shared_intent);
|
|
738
801
|
if (intent !== void 0 && SEMANTIC_INTENTS.includes(intent)) {
|
|
739
802
|
resolved.intent = intent;
|
|
@@ -761,10 +824,12 @@ function toMantineSemanticProps(props) {
|
|
|
761
824
|
};
|
|
762
825
|
}
|
|
763
826
|
function toHeroUiSemanticProps(props) {
|
|
827
|
+
const buttonVariant = mapMantineVariantToHeroUiButtonVariant(props.variant) ?? mapMantineColorToHeroUiButtonVariant(props.color) ?? mapIntentToHeroUiButtonVariant(props.intent);
|
|
828
|
+
const color = mapMantineColorToHeroUiColor(props.color) ?? mapIntentToHeroUiColor(props.intent);
|
|
764
829
|
return {
|
|
765
830
|
size: mapSizeToHeroUi(props.size),
|
|
766
|
-
buttonVariant
|
|
767
|
-
color
|
|
831
|
+
buttonVariant,
|
|
832
|
+
color,
|
|
768
833
|
radiusPx: mapRadiusToPx(props.radius),
|
|
769
834
|
spacingPx: mapSpacingToPx(props.spacing),
|
|
770
835
|
isDisabled: hasState(props.states, "disabled") || void 0,
|
|
@@ -1275,6 +1340,9 @@ function transformPagesData(pages) {
|
|
|
1275
1340
|
mapIntentToHeroUiButtonVariant,
|
|
1276
1341
|
mapIntentToHeroUiColor,
|
|
1277
1342
|
mapIntentToMantine,
|
|
1343
|
+
mapMantineColorToHeroUiButtonVariant,
|
|
1344
|
+
mapMantineColorToHeroUiColor,
|
|
1345
|
+
mapMantineVariantToHeroUiButtonVariant,
|
|
1278
1346
|
mapRadiusToMantine,
|
|
1279
1347
|
mapRadiusToPx,
|
|
1280
1348
|
mapSizeToHeroUi,
|
package/dist/index.mjs
CHANGED
|
@@ -600,6 +600,58 @@ function mapIntentToHeroUiColor(intent) {
|
|
|
600
600
|
return void 0;
|
|
601
601
|
}
|
|
602
602
|
}
|
|
603
|
+
function mapMantineColorToHeroUiColor(color) {
|
|
604
|
+
if (!color) return void 0;
|
|
605
|
+
switch (color) {
|
|
606
|
+
case "red":
|
|
607
|
+
case "pink":
|
|
608
|
+
return "danger";
|
|
609
|
+
case "green":
|
|
610
|
+
case "teal":
|
|
611
|
+
case "lime":
|
|
612
|
+
return "success";
|
|
613
|
+
case "yellow":
|
|
614
|
+
case "orange":
|
|
615
|
+
return "warning";
|
|
616
|
+
case "gray":
|
|
617
|
+
case "dark":
|
|
618
|
+
return "default";
|
|
619
|
+
default:
|
|
620
|
+
return "accent";
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
function mapMantineColorToHeroUiButtonVariant(color) {
|
|
624
|
+
if (!color) return void 0;
|
|
625
|
+
switch (color) {
|
|
626
|
+
case "red":
|
|
627
|
+
case "pink":
|
|
628
|
+
return "danger";
|
|
629
|
+
case "gray":
|
|
630
|
+
case "dark":
|
|
631
|
+
return "secondary";
|
|
632
|
+
default:
|
|
633
|
+
return "primary";
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
function mapMantineVariantToHeroUiButtonVariant(variant) {
|
|
637
|
+
if (!variant) return void 0;
|
|
638
|
+
switch (variant) {
|
|
639
|
+
case "filled":
|
|
640
|
+
case "gradient":
|
|
641
|
+
return "primary";
|
|
642
|
+
case "light":
|
|
643
|
+
case "white":
|
|
644
|
+
case "default":
|
|
645
|
+
return "secondary";
|
|
646
|
+
case "outline":
|
|
647
|
+
return "outline";
|
|
648
|
+
case "subtle":
|
|
649
|
+
case "transparent":
|
|
650
|
+
return "ghost";
|
|
651
|
+
default:
|
|
652
|
+
return void 0;
|
|
653
|
+
}
|
|
654
|
+
}
|
|
603
655
|
function hasState(states, state) {
|
|
604
656
|
return !!states && states.includes(state);
|
|
605
657
|
}
|
|
@@ -623,6 +675,14 @@ function resolveSharedStyleProps(fields) {
|
|
|
623
675
|
if (radius !== void 0 && SEMANTIC_RADII.includes(radius)) {
|
|
624
676
|
resolved.radius = radius;
|
|
625
677
|
}
|
|
678
|
+
const color = readString(fields.shared_color);
|
|
679
|
+
if (color !== void 0) {
|
|
680
|
+
resolved.color = color;
|
|
681
|
+
}
|
|
682
|
+
const variant = readString(fields.shared_variant);
|
|
683
|
+
if (variant !== void 0) {
|
|
684
|
+
resolved.variant = variant;
|
|
685
|
+
}
|
|
626
686
|
const intent = readString(fields.shared_intent);
|
|
627
687
|
if (intent !== void 0 && SEMANTIC_INTENTS.includes(intent)) {
|
|
628
688
|
resolved.intent = intent;
|
|
@@ -650,10 +710,12 @@ function toMantineSemanticProps(props) {
|
|
|
650
710
|
};
|
|
651
711
|
}
|
|
652
712
|
function toHeroUiSemanticProps(props) {
|
|
713
|
+
const buttonVariant = mapMantineVariantToHeroUiButtonVariant(props.variant) ?? mapMantineColorToHeroUiButtonVariant(props.color) ?? mapIntentToHeroUiButtonVariant(props.intent);
|
|
714
|
+
const color = mapMantineColorToHeroUiColor(props.color) ?? mapIntentToHeroUiColor(props.intent);
|
|
653
715
|
return {
|
|
654
716
|
size: mapSizeToHeroUi(props.size),
|
|
655
|
-
buttonVariant
|
|
656
|
-
color
|
|
717
|
+
buttonVariant,
|
|
718
|
+
color,
|
|
657
719
|
radiusPx: mapRadiusToPx(props.radius),
|
|
658
720
|
spacingPx: mapSpacingToPx(props.spacing),
|
|
659
721
|
isDisabled: hasState(props.states, "disabled") || void 0,
|
|
@@ -1163,6 +1225,9 @@ export {
|
|
|
1163
1225
|
mapIntentToHeroUiButtonVariant,
|
|
1164
1226
|
mapIntentToHeroUiColor,
|
|
1165
1227
|
mapIntentToMantine,
|
|
1228
|
+
mapMantineColorToHeroUiButtonVariant,
|
|
1229
|
+
mapMantineColorToHeroUiColor,
|
|
1230
|
+
mapMantineVariantToHeroUiButtonVariant,
|
|
1166
1231
|
mapRadiusToMantine,
|
|
1167
1232
|
mapRadiusToPx,
|
|
1168
1233
|
mapSizeToHeroUi,
|
|
@@ -1,6 +1,6 @@
|
|
|
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-
|
|
3
|
-
import '../common-
|
|
2
|
+
import { I as IStyleRegistryEntry } from '../styles.registry-DcE83d4x.mjs';
|
|
3
|
+
import '../common-DVC0R_AX.mjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* SDK contract version. Plugins declare which API they target in
|
|
@@ -1,6 +1,6 @@
|
|
|
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-
|
|
3
|
-
import '../common-
|
|
2
|
+
import { I as IStyleRegistryEntry } from '../styles.registry-CxVYVra_.js';
|
|
3
|
+
import '../common-DVC0R_AX.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* SDK contract version. Plugins declare which API they target in
|
|
@@ -1,6 +1,6 @@
|
|
|
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-
|
|
3
|
-
import '../common-
|
|
1
|
+
import { T as TStyleName, I as IStyleRegistryEntry, a as IPluginStyleRegistryEntry, b as TStylePlacement, c as TConcretePlatform, d as TStylePlatform } from '../styles.registry-DcE83d4x.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-DcE83d4x.mjs';
|
|
3
|
+
import '../common-DVC0R_AX.mjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Open style-name type: a core `TStyleName` literal OR any plugin style
|
package/dist/registry/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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-
|
|
3
|
-
import '../common-
|
|
1
|
+
import { T as TStyleName, I as IStyleRegistryEntry, a as IPluginStyleRegistryEntry, b as TStylePlacement, c as TConcretePlatform, d as TStylePlatform } from '../styles.registry-CxVYVra_.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-CxVYVra_.js';
|
|
3
|
+
import '../common-DVC0R_AX.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Open style-name type: a core `TStyleName` literal OR any plugin style
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as
|
|
1
|
+
import { T as TMantineColor, a as TMantineRadius, b as TSharedSize, c as TMantineSpacing, d as TMantineJustify, e as TMantineAlign, f as TMantineDirection, g as TMantineWrap, h as TMantineGridSpan, i as TMantineOrientation, j as TSharedRadius, k as TMantineTitleOrder, l as TMantineSize, m as TMantineFieldsetVariant, n as TMantineSpoilerMaxHeight, o as TMantineVariant, p as TMantineBadgeVariant, q as TMantineAvatarVariant, r as TMantineChipVariant, s as TMantineIndicatorPosition, t as TMantineThemeIconVariant, u as TMantineAccordionVariant, v as TMantineTabsVariant, w as TMantineTimelineLineVariant } from './common-DVC0R_AX.js';
|
|
2
2
|
|
|
3
3
|
interface ILoginStyle extends IStyleWithSpacing {
|
|
4
4
|
style_name: 'login';
|
|
@@ -8,6 +8,10 @@ interface ILoginStyle extends IStyleWithSpacing {
|
|
|
8
8
|
label_pw_reset?: IContentField<string>;
|
|
9
9
|
alert_fail?: IContentField<string>;
|
|
10
10
|
login_title?: IContentField<string>;
|
|
11
|
+
/** Optional subtitle under the title; hidden when empty. */
|
|
12
|
+
subtitle?: IContentField<string>;
|
|
13
|
+
/** Submit-button colour (cross-platform, via the shared mapper). */
|
|
14
|
+
shared_color?: IContentField<TMantineColor>;
|
|
11
15
|
/** Label of the link that opens the registration page. */
|
|
12
16
|
label_register?: IContentField<string>;
|
|
13
17
|
}
|
|
@@ -469,7 +473,7 @@ interface ICarouselStyle extends IStyleWithSpacing {
|
|
|
469
473
|
|
|
470
474
|
interface IButtonStyle extends IStyleWithSpacing {
|
|
471
475
|
style_name: 'button';
|
|
472
|
-
|
|
476
|
+
shared_variant?: IContentField<TMantineVariant>;
|
|
473
477
|
shared_color?: IContentField<TMantineColor>;
|
|
474
478
|
shared_size?: IContentField<TSharedSize>;
|
|
475
479
|
shared_radius?: IContentField<TSharedRadius>;
|
|
@@ -515,13 +519,19 @@ interface IAlertStyle extends IStyleWithSpacing {
|
|
|
515
519
|
shared_color?: IContentField<TMantineColor>;
|
|
516
520
|
shared_radius?: IContentField<TSharedRadius>;
|
|
517
521
|
web_left_icon?: IContentField<string>;
|
|
518
|
-
web_with_close_button
|
|
522
|
+
/** Cross-platform dismiss toggle (was the web-only `web_with_close_button`). */
|
|
523
|
+
closable?: IContentField<string>;
|
|
519
524
|
content?: IContentField<string>;
|
|
520
525
|
}
|
|
521
526
|
interface IBadgeStyle extends IStyleWithSpacing {
|
|
522
527
|
style_name: 'badge';
|
|
523
528
|
label?: IContentField<string>;
|
|
529
|
+
/** Cross-platform variant (web Mantine + mobile HeroUI). Primary control. */
|
|
530
|
+
shared_variant?: IContentField<TMantineBadgeVariant>;
|
|
531
|
+
/** Web-only variant override (e.g. `dot`); empty falls back to shared_variant. */
|
|
524
532
|
web_variant?: IContentField<TMantineBadgeVariant>;
|
|
533
|
+
/** Render as a circle (equal width/height) for short counts. */
|
|
534
|
+
circle?: IContentField<string>;
|
|
525
535
|
shared_size?: IContentField<TSharedSize>;
|
|
526
536
|
web_left_icon?: IContentField<string>;
|
|
527
537
|
shared_radius?: IContentField<TSharedRadius>;
|
|
@@ -532,7 +542,9 @@ interface IBadgeStyle extends IStyleWithSpacing {
|
|
|
532
542
|
interface IAvatarStyle extends IStyleWithSpacing {
|
|
533
543
|
style_name: 'avatar';
|
|
534
544
|
alt?: IContentField<string>;
|
|
535
|
-
|
|
545
|
+
/** Person name; seeds auto-initials + a stable auto colour when no image. */
|
|
546
|
+
name?: IContentField<string>;
|
|
547
|
+
web_variant?: IContentField<TMantineAvatarVariant>;
|
|
536
548
|
shared_size?: IContentField<TSharedSize>;
|
|
537
549
|
shared_radius?: IContentField<TSharedRadius>;
|
|
538
550
|
shared_color?: IContentField<TMantineColor>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as
|
|
1
|
+
import { T as TMantineColor, a as TMantineRadius, b as TSharedSize, c as TMantineSpacing, d as TMantineJustify, e as TMantineAlign, f as TMantineDirection, g as TMantineWrap, h as TMantineGridSpan, i as TMantineOrientation, j as TSharedRadius, k as TMantineTitleOrder, l as TMantineSize, m as TMantineFieldsetVariant, n as TMantineSpoilerMaxHeight, o as TMantineVariant, p as TMantineBadgeVariant, q as TMantineAvatarVariant, r as TMantineChipVariant, s as TMantineIndicatorPosition, t as TMantineThemeIconVariant, u as TMantineAccordionVariant, v as TMantineTabsVariant, w as TMantineTimelineLineVariant } from './common-DVC0R_AX.mjs';
|
|
2
2
|
|
|
3
3
|
interface ILoginStyle extends IStyleWithSpacing {
|
|
4
4
|
style_name: 'login';
|
|
@@ -8,6 +8,10 @@ interface ILoginStyle extends IStyleWithSpacing {
|
|
|
8
8
|
label_pw_reset?: IContentField<string>;
|
|
9
9
|
alert_fail?: IContentField<string>;
|
|
10
10
|
login_title?: IContentField<string>;
|
|
11
|
+
/** Optional subtitle under the title; hidden when empty. */
|
|
12
|
+
subtitle?: IContentField<string>;
|
|
13
|
+
/** Submit-button colour (cross-platform, via the shared mapper). */
|
|
14
|
+
shared_color?: IContentField<TMantineColor>;
|
|
11
15
|
/** Label of the link that opens the registration page. */
|
|
12
16
|
label_register?: IContentField<string>;
|
|
13
17
|
}
|
|
@@ -469,7 +473,7 @@ interface ICarouselStyle extends IStyleWithSpacing {
|
|
|
469
473
|
|
|
470
474
|
interface IButtonStyle extends IStyleWithSpacing {
|
|
471
475
|
style_name: 'button';
|
|
472
|
-
|
|
476
|
+
shared_variant?: IContentField<TMantineVariant>;
|
|
473
477
|
shared_color?: IContentField<TMantineColor>;
|
|
474
478
|
shared_size?: IContentField<TSharedSize>;
|
|
475
479
|
shared_radius?: IContentField<TSharedRadius>;
|
|
@@ -515,13 +519,19 @@ interface IAlertStyle extends IStyleWithSpacing {
|
|
|
515
519
|
shared_color?: IContentField<TMantineColor>;
|
|
516
520
|
shared_radius?: IContentField<TSharedRadius>;
|
|
517
521
|
web_left_icon?: IContentField<string>;
|
|
518
|
-
web_with_close_button
|
|
522
|
+
/** Cross-platform dismiss toggle (was the web-only `web_with_close_button`). */
|
|
523
|
+
closable?: IContentField<string>;
|
|
519
524
|
content?: IContentField<string>;
|
|
520
525
|
}
|
|
521
526
|
interface IBadgeStyle extends IStyleWithSpacing {
|
|
522
527
|
style_name: 'badge';
|
|
523
528
|
label?: IContentField<string>;
|
|
529
|
+
/** Cross-platform variant (web Mantine + mobile HeroUI). Primary control. */
|
|
530
|
+
shared_variant?: IContentField<TMantineBadgeVariant>;
|
|
531
|
+
/** Web-only variant override (e.g. `dot`); empty falls back to shared_variant. */
|
|
524
532
|
web_variant?: IContentField<TMantineBadgeVariant>;
|
|
533
|
+
/** Render as a circle (equal width/height) for short counts. */
|
|
534
|
+
circle?: IContentField<string>;
|
|
525
535
|
shared_size?: IContentField<TSharedSize>;
|
|
526
536
|
web_left_icon?: IContentField<string>;
|
|
527
537
|
shared_radius?: IContentField<TSharedRadius>;
|
|
@@ -532,7 +542,9 @@ interface IBadgeStyle extends IStyleWithSpacing {
|
|
|
532
542
|
interface IAvatarStyle extends IStyleWithSpacing {
|
|
533
543
|
style_name: 'avatar';
|
|
534
544
|
alt?: IContentField<string>;
|
|
535
|
-
|
|
545
|
+
/** Person name; seeds auto-initials + a stable auto colour when no image. */
|
|
546
|
+
name?: IContentField<string>;
|
|
547
|
+
web_variant?: IContentField<TMantineAvatarVariant>;
|
|
536
548
|
shared_size?: IContentField<TSharedSize>;
|
|
537
549
|
shared_radius?: IContentField<TSharedRadius>;
|
|
538
550
|
shared_color?: IContentField<TMantineColor>;
|