@selfhelp/shared 1.14.9 → 1.14.12
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 +73 -0
- package/dist/{common-DVC0R_AX.d.mts → common-DMm4kymA.d.mts} +1 -1
- package/dist/{common-DVC0R_AX.d.ts → common-DMm4kymA.d.ts} +1 -1
- package/dist/index.d.mts +10 -4
- package/dist/index.d.ts +10 -4
- package/dist/index.js +50 -0
- package/dist/index.mjs +46 -0
- 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-BkHw6CdG.d.ts → styles.registry-CA6p55GE.d.mts} +45 -44
- package/dist/{styles.registry-CImqMXS4.d.mts → styles.registry-DACrC1dz.d.ts} +45 -44
- package/dist/theme/index.d.mts +42 -2
- package/dist/theme/index.d.ts +42 -2
- package/dist/theme/index.js +50 -0
- package/dist/theme/index.mjs +46 -0
- package/package.json +1 -1
- package/src/theme/__tests__/semantic.test.ts +77 -0
- package/src/theme/semantic.ts +95 -0
- package/src/types/mobile-adapters.ts +6 -0
- package/src/types/styles/layout.ts +60 -45
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,79 @@ 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.12
|
|
13
|
+
|
|
14
|
+
Layout cross-platform pass — the 13 layout styles (`container`, `box`, `flex`,
|
|
15
|
+
`group`, `stack`, `simple-grid`, `grid`, `grid-column`, `space`, `divider`,
|
|
16
|
+
`paper`, `center`, `scroll-area`) are now configurable on mobile, not just web.
|
|
17
|
+
The portable sizing/behaviour props that were trapped under `web_*` were promoted
|
|
18
|
+
to `shared_*` so the same field drives the Mantine (web) and the React-Native
|
|
19
|
+
(mobile) renderer through the semantic mapper. Pairs with backend migration
|
|
20
|
+
`Version20260622063129`. Patch bump (pre-1.0; style contracts are renamed/additive
|
|
21
|
+
but not guaranteed backward compatible).
|
|
22
|
+
|
|
23
|
+
### Changed (style contracts in `types/styles/layout.ts`)
|
|
24
|
+
|
|
25
|
+
- **width/height are cross-platform**: `web_width`/`web_height` → `shared_width`/
|
|
26
|
+
`shared_height` on `flex`, `group`, `stack`, `grid`, `grid-column`, `simple-grid`,
|
|
27
|
+
`center`, and (height only) `scroll-area`, typed `TSharedDimension`.
|
|
28
|
+
- **`grid`/`simple-grid` columns**: `web_cols` → `shared_cols` (`TSharedCols`);
|
|
29
|
+
`simple-grid` gains `shared_gap`, `shared_vertical_spacing`, and the web-only
|
|
30
|
+
responsive overrides `web_cols_sm`/`web_cols_md`/`web_cols_lg`.
|
|
31
|
+
- **`grid-column`**: `web_grid_span|offset|order|grow` → `shared_grid_*`; now
|
|
32
|
+
extends `IStyleWithSpacing`.
|
|
33
|
+
- **`center`**: `web_miw|mih|maw|mah` → `shared_miw|mih|maw|mah`; now extends
|
|
34
|
+
`IStyleWithSpacing`.
|
|
35
|
+
- **`divider`**: `web_divider_variant` → `shared_divider_variant`
|
|
36
|
+
(`TSharedDividerVariant`), `web_divider_label_position` →
|
|
37
|
+
`shared_divider_label_position` (`TSharedDividerLabelPosition`); now extends
|
|
38
|
+
`IStyleWithSpacing`.
|
|
39
|
+
- **`space`**: `web_space_direction` → `shared_orientation`.
|
|
40
|
+
- **`paper`**: `web_border` → `shared_border` (`TSharedBorder`, matches `card`)
|
|
41
|
+
plus a new optional auto-styled `title` content field; `web_px`/`web_py` removed
|
|
42
|
+
(padding is the portable `shared_spacing`).
|
|
43
|
+
- **`container`**: `web_px`/`web_py` removed (padding via `shared_spacing`).
|
|
44
|
+
|
|
45
|
+
### Added (semantic mapper `theme/semantic.ts`)
|
|
46
|
+
|
|
47
|
+
- **`parseDimensionToReactNative`** / **`parseDimensionToWeb`**: turn a CMS
|
|
48
|
+
dimension (`"320px"`/`"100%"`/`"auto"`) into an RN-safe value (a `px` suffix
|
|
49
|
+
becomes a unitless number; web keeps the string verbatim).
|
|
50
|
+
- **`gridSpanToReactNativeColumn`**: convert a Mantine `Grid.Col` span into the RN
|
|
51
|
+
flex layout (`flexBasis`/`flexGrow`/`flexShrink`) for the emulated mobile grid.
|
|
52
|
+
- **`mapDividerVariantToReactNative`**: map `shared_divider_variant` onto an RN
|
|
53
|
+
`borderStyle` (identical vocabulary, validated; defaults to `solid`).
|
|
54
|
+
|
|
55
|
+
## v1.14.11
|
|
56
|
+
|
|
57
|
+
Style polish wave (card) — remove the redundant web-only card padding control.
|
|
58
|
+
`ICardStyle` already extends `IStyleWithSpacing` (`shared_spacing`), whose padding
|
|
59
|
+
side renders on web AND mobile, so the separate `web_card_padding` (Mantine
|
|
60
|
+
`padding` prop) was a duplicate that confused authors. Patch bump: one optional
|
|
61
|
+
field removed from a style contract (pre-1.0, not backward compatible). Pairs with
|
|
62
|
+
backend migration `Version20260619205908` (unlinks the field from `card`; it stays
|
|
63
|
+
on `validate`) and the web `CardStyle` renderer (fixed `padding="md"` default).
|
|
64
|
+
|
|
65
|
+
### Removed
|
|
66
|
+
|
|
67
|
+
- **`ICardStyle.web_card_padding`**: padding is now the portable `shared_spacing`
|
|
68
|
+
(`pt`/`pb`/`ps`/`pe`) field exclusively. The web renderer keeps a fixed Mantine
|
|
69
|
+
inner padding (`"md"`) as the default + Card.Section image-bleed reference.
|
|
70
|
+
|
|
71
|
+
## v1.14.10
|
|
72
|
+
|
|
73
|
+
Style polish wave (mobile) — extend the mobile checkbox adapter contract so the
|
|
74
|
+
`checkbox` style's `shared_label_position` is honoured on mobile too (it already
|
|
75
|
+
worked on web via Mantine `labelPosition`). Patch bump: one additive optional
|
|
76
|
+
adapter prop.
|
|
77
|
+
|
|
78
|
+
### Added
|
|
79
|
+
|
|
80
|
+
- **`IMobileCheckboxProps.labelPosition`** (`'left' | 'right'`, optional,
|
|
81
|
+
defaults to `right`): mirrors the cross-platform `shared_label_position` field
|
|
82
|
+
so the mobile `MobileCheckbox` adapter can place the label before or after the
|
|
83
|
+
box, matching the web Mantine `labelPosition`.
|
|
84
|
+
|
|
12
85
|
## v1.14.9
|
|
13
86
|
|
|
14
87
|
Style polish wave (card / card-segment / checkbox / chip / code / title) — align
|
|
@@ -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 $,
|
|
92
|
+
export type { TMantineInline as $, TMantineAllowNextClicks as A, TMantineAllowStepClick as B, TMantineAspectRatio as C, TMantineAutoContrast as D, TMantineBlock as E, TMantineCenterInline as F, TMantineChecked as G, TMantineChipChecked as H, TMantineChipMultiple as I, TMantineClampBehavior as J, TMantineCodeBlock as K, TMantineColorFormat as L, TMantineColorInputSwatches as M, TMantineColorPickerSwatches as N, TMantineColorPickerSwatchesPerRow as O, TMantineCompact as P, TMantineContainerFluid as Q, TMantineDisabled as R, TMantineFileAccept as S, TMantineColor as T, TMantineFileInputMultiple as U, TMantineFluid as V, TMantineFullWidth 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, TMantineJustify as c, TMantineAlign as d, TMantineDirection as e, TMantineWrap as f, TMantineGridOverflow as g, TMantineGridSpan as h, TMantineGridGrow as i, TMantineOrientation as j, TSharedRadius as k, TMantineTitleOrder as l, TMantineSize as m, TMantineFieldsetVariant as n, TMantineSpoilerMaxHeight as o, TMantineVariant as p, TMantineBadgeVariant as q, TMantineAvatarVariant as r, TMantineChipVariant as s, TMantineIndicatorPosition as t, TMantineThemeIconVariant as u, TMantineAccordionVariant as v, TMantineTabsVariant as w, TMantineTimelineLineVariant as x, TMantineSpacing as y, TMantineActionIconLoading 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 $,
|
|
92
|
+
export type { TMantineInline as $, TMantineAllowNextClicks as A, TMantineAllowStepClick as B, TMantineAspectRatio as C, TMantineAutoContrast as D, TMantineBlock as E, TMantineCenterInline as F, TMantineChecked as G, TMantineChipChecked as H, TMantineChipMultiple as I, TMantineClampBehavior as J, TMantineCodeBlock as K, TMantineColorFormat as L, TMantineColorInputSwatches as M, TMantineColorPickerSwatches as N, TMantineColorPickerSwatchesPerRow as O, TMantineCompact as P, TMantineContainerFluid as Q, TMantineDisabled as R, TMantineFileAccept as S, TMantineColor as T, TMantineFileInputMultiple as U, TMantineFluid as V, TMantineFullWidth 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, TMantineJustify as c, TMantineAlign as d, TMantineDirection as e, TMantineWrap as f, TMantineGridOverflow as g, TMantineGridSpan as h, TMantineGridGrow as i, TMantineOrientation as j, TSharedRadius as k, TMantineTitleOrder as l, TMantineSize as m, TMantineFieldsetVariant as n, TMantineSpoilerMaxHeight as o, TMantineVariant as p, TMantineBadgeVariant as q, TMantineAvatarVariant as r, TMantineChipVariant as s, TMantineIndicatorPosition as t, TMantineThemeIconVariant as u, TMantineAccordionVariant as v, TMantineTabsVariant as w, TMantineTimelineLineVariant as x, TMantineSpacing as y, TMantineActionIconLoading 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 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
|
|
3
|
-
export {
|
|
1
|
+
import { T as TStyleName, j as IContentField } from './styles.registry-CA6p55GE.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 TSharedCols, bB as TSharedDimension, bC as TSharedDividerLabelPosition, bD as TSharedDividerVariant, bE as TSharedLabelPosition, bF 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-CA6p55GE.mjs';
|
|
3
|
+
export { v as TMantineAccordionVariant, z as TMantineActionIconLoading, d as TMantineAlign, A as TMantineAllowNextClicks, B as TMantineAllowStepClick, C as TMantineAspectRatio, D as TMantineAutoContrast, r as TMantineAvatarVariant, q as TMantineBadgeVariant, E as TMantineBlock, F as TMantineCenterInline, G as TMantineChecked, H as TMantineChipChecked, I as TMantineChipMultiple, s as TMantineChipVariant, J as TMantineClampBehavior, K as TMantineCodeBlock, T as TMantineColor, L as TMantineColorFormat, M as TMantineColorInputSwatches, N as TMantineColorPickerSwatches, O as TMantineColorPickerSwatchesPerRow, P as TMantineCompact, Q as TMantineContainerFluid, e as TMantineDirection, R as TMantineDisabled, n as TMantineFieldsetVariant, S as TMantineFileAccept, U as TMantineFileInputMultiple, V as TMantineFluid, W as TMantineFullWidth, i as TMantineGridGrow, g as TMantineGridOverflow, h as TMantineGridSpan, X as TMantineGroupGrow, Y as TMantineGroupWrap, Z as TMantineGrow, _ as TMantineHighlight, t as TMantineIndicatorPosition, $ as TMantineInline, a0 as TMantineIsLink, c as TMantineJustify, a1 as TMantineKbdSize, a2 as TMantineLoading, a3 as TMantineMultiple, a4 as TMantineNotificationWithCloseButton, a5 as TMantineNumberInputDecimalScale, a6 as TMantineOpenInNewTab, j as TMantineOrientation, a7 as TMantineProcessing, a as TMantineRadius, a8 as TMantineRangeSliderMarks, a9 as TMantineRatingCount, aa as TMantineRatingFractions, ab as TMantineRatingReadonly, ac as TMantineReadonly, m as TMantineSize, ad as TMantineSpaceHorizontal, y as TMantineSpacing, o as TMantineSpoilerMaxHeight, ae as TMantineSwatches, af as TMantineTabDisabled, w as TMantineTabsVariant, u as TMantineThemeIconVariant, x as TMantineTimelineLineVariant, l as TMantineTitleOrder, ag as TMantineUseMantineStyle, p as TMantineVariant, ah as TMantineWithCloseButton, ai as TMantineWithIcon, f as TMantineWrap, k as TSharedRadius, b as TSharedSize } from './common-DMm4kymA.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, 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';
|
|
6
|
+
export { COLOR_PALETTE, COLOR_SCALES, CONTAINER_SIZE_PX, FONT_SIZE_PX, FULL_RADIUS_PX, IHeroUiResolvedStyle, IMantineResolvedStyle, IReactNativeGridColumn, IReactNativeResolvedStyle, IReactNativeThemeScales, IResolvedVariant, ISharedStyleProps, ISpacingResolved, LINE_HEIGHT, RADIUS_PX, SPACING_PX, SPACING_TO_TAILWIND, TCanonicalColor, TCanonicalRadius, TCanonicalSpacing, THeroUiColor, TMantineMappedColor, TMantineMappedVariant, TReactNativeDimension, TSemanticColor, TSemanticIntent, TSemanticRadius, TSemanticSize, TSemanticSpacing, TSemanticState, TSemanticVariant, colorToHex, gridSpanToReactNativeColumn, mapAccordionVariantToHeroUiVariant, mapChipVariantToHeroUiVariant, mapDividerVariantToReactNative, mapIntentToHeroUiButtonVariant, mapIntentToHeroUiColor, mapIntentToMantine, mapMantineColorToHeroUiButtonVariant, mapMantineColorToHeroUiColor, mapMantineVariantToHeroUiButtonVariant, mapRadiusToMantine, mapRadiusToPx, mapSizeToHeroUi, mapSizeToMantine, mapSpacingToPx, parseDimensionToReactNative, parseDimensionToWeb, 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
|
|
|
@@ -1254,6 +1254,12 @@ interface IMobileCheckboxProps extends IMobileAdapterBaseProps {
|
|
|
1254
1254
|
onSelectedChange?: (next: boolean) => void;
|
|
1255
1255
|
isDisabled?: boolean;
|
|
1256
1256
|
label?: string;
|
|
1257
|
+
/**
|
|
1258
|
+
* Where the label sits relative to the box. Mirrors the cross-platform
|
|
1259
|
+
* `shared_label_position` field (Mantine `labelPosition` on web). Defaults
|
|
1260
|
+
* to `right`.
|
|
1261
|
+
*/
|
|
1262
|
+
labelPosition?: 'left' | 'right';
|
|
1257
1263
|
}
|
|
1258
1264
|
interface IMobileSelectOption {
|
|
1259
1265
|
value: string;
|
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 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
|
|
3
|
-
export {
|
|
1
|
+
import { T as TStyleName, j as IContentField } from './styles.registry-DACrC1dz.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 TSharedCols, bB as TSharedDimension, bC as TSharedDividerLabelPosition, bD as TSharedDividerVariant, bE as TSharedLabelPosition, bF 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-DACrC1dz.js';
|
|
3
|
+
export { v as TMantineAccordionVariant, z as TMantineActionIconLoading, d as TMantineAlign, A as TMantineAllowNextClicks, B as TMantineAllowStepClick, C as TMantineAspectRatio, D as TMantineAutoContrast, r as TMantineAvatarVariant, q as TMantineBadgeVariant, E as TMantineBlock, F as TMantineCenterInline, G as TMantineChecked, H as TMantineChipChecked, I as TMantineChipMultiple, s as TMantineChipVariant, J as TMantineClampBehavior, K as TMantineCodeBlock, T as TMantineColor, L as TMantineColorFormat, M as TMantineColorInputSwatches, N as TMantineColorPickerSwatches, O as TMantineColorPickerSwatchesPerRow, P as TMantineCompact, Q as TMantineContainerFluid, e as TMantineDirection, R as TMantineDisabled, n as TMantineFieldsetVariant, S as TMantineFileAccept, U as TMantineFileInputMultiple, V as TMantineFluid, W as TMantineFullWidth, i as TMantineGridGrow, g as TMantineGridOverflow, h as TMantineGridSpan, X as TMantineGroupGrow, Y as TMantineGroupWrap, Z as TMantineGrow, _ as TMantineHighlight, t as TMantineIndicatorPosition, $ as TMantineInline, a0 as TMantineIsLink, c as TMantineJustify, a1 as TMantineKbdSize, a2 as TMantineLoading, a3 as TMantineMultiple, a4 as TMantineNotificationWithCloseButton, a5 as TMantineNumberInputDecimalScale, a6 as TMantineOpenInNewTab, j as TMantineOrientation, a7 as TMantineProcessing, a as TMantineRadius, a8 as TMantineRangeSliderMarks, a9 as TMantineRatingCount, aa as TMantineRatingFractions, ab as TMantineRatingReadonly, ac as TMantineReadonly, m as TMantineSize, ad as TMantineSpaceHorizontal, y as TMantineSpacing, o as TMantineSpoilerMaxHeight, ae as TMantineSwatches, af as TMantineTabDisabled, w as TMantineTabsVariant, u as TMantineThemeIconVariant, x as TMantineTimelineLineVariant, l as TMantineTitleOrder, ag as TMantineUseMantineStyle, p as TMantineVariant, ah as TMantineWithCloseButton, ai as TMantineWithIcon, f as TMantineWrap, k as TSharedRadius, b as TSharedSize } from './common-DMm4kymA.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, 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';
|
|
6
|
+
export { COLOR_PALETTE, COLOR_SCALES, CONTAINER_SIZE_PX, FONT_SIZE_PX, FULL_RADIUS_PX, IHeroUiResolvedStyle, IMantineResolvedStyle, IReactNativeGridColumn, IReactNativeResolvedStyle, IReactNativeThemeScales, IResolvedVariant, ISharedStyleProps, ISpacingResolved, LINE_HEIGHT, RADIUS_PX, SPACING_PX, SPACING_TO_TAILWIND, TCanonicalColor, TCanonicalRadius, TCanonicalSpacing, THeroUiColor, TMantineMappedColor, TMantineMappedVariant, TReactNativeDimension, TSemanticColor, TSemanticIntent, TSemanticRadius, TSemanticSize, TSemanticSpacing, TSemanticState, TSemanticVariant, colorToHex, gridSpanToReactNativeColumn, mapAccordionVariantToHeroUiVariant, mapChipVariantToHeroUiVariant, mapDividerVariantToReactNative, mapIntentToHeroUiButtonVariant, mapIntentToHeroUiColor, mapIntentToMantine, mapMantineColorToHeroUiButtonVariant, mapMantineColorToHeroUiColor, mapMantineVariantToHeroUiButtonVariant, mapRadiusToMantine, mapRadiusToPx, mapSizeToHeroUi, mapSizeToMantine, mapSpacingToPx, parseDimensionToReactNative, parseDimensionToWeb, 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
|
|
|
@@ -1254,6 +1254,12 @@ interface IMobileCheckboxProps extends IMobileAdapterBaseProps {
|
|
|
1254
1254
|
onSelectedChange?: (next: boolean) => void;
|
|
1255
1255
|
isDisabled?: boolean;
|
|
1256
1256
|
label?: string;
|
|
1257
|
+
/**
|
|
1258
|
+
* Where the label sits relative to the box. Mirrors the cross-platform
|
|
1259
|
+
* `shared_label_position` field (Mantine `labelPosition` on web). Defaults
|
|
1260
|
+
* to `right`.
|
|
1261
|
+
*/
|
|
1262
|
+
labelPosition?: 'left' | 'right';
|
|
1257
1263
|
}
|
|
1258
1264
|
interface IMobileSelectOption {
|
|
1259
1265
|
value: string;
|
package/dist/index.js
CHANGED
|
@@ -71,6 +71,7 @@ __export(index_exports, {
|
|
|
71
71
|
getStylePlacement: () => getStylePlacement,
|
|
72
72
|
getStylePlatforms: () => getStylePlatforms,
|
|
73
73
|
getStylePluginId: () => getStylePluginId,
|
|
74
|
+
gridSpanToReactNativeColumn: () => gridSpanToReactNativeColumn,
|
|
74
75
|
isKnownStyleName: () => isKnownStyleName,
|
|
75
76
|
isRegisteredStyleName: () => isRegisteredStyleName,
|
|
76
77
|
isStyleAllowedOnPage: () => isStyleAllowedOnPage,
|
|
@@ -78,6 +79,7 @@ __export(index_exports, {
|
|
|
78
79
|
isStyleSupportedOnPlatform: () => isStyleSupportedOnPlatform,
|
|
79
80
|
mapAccordionVariantToHeroUiVariant: () => mapAccordionVariantToHeroUiVariant,
|
|
80
81
|
mapChipVariantToHeroUiVariant: () => mapChipVariantToHeroUiVariant,
|
|
82
|
+
mapDividerVariantToReactNative: () => mapDividerVariantToReactNative,
|
|
81
83
|
mapIntentToHeroUiButtonVariant: () => mapIntentToHeroUiButtonVariant,
|
|
82
84
|
mapIntentToHeroUiColor: () => mapIntentToHeroUiColor,
|
|
83
85
|
mapIntentToMantine: () => mapIntentToMantine,
|
|
@@ -89,6 +91,8 @@ __export(index_exports, {
|
|
|
89
91
|
mapSizeToHeroUi: () => mapSizeToHeroUi,
|
|
90
92
|
mapSizeToMantine: () => mapSizeToMantine,
|
|
91
93
|
mapSpacingToPx: () => mapSpacingToPx,
|
|
94
|
+
parseDimensionToReactNative: () => parseDimensionToReactNative,
|
|
95
|
+
parseDimensionToWeb: () => parseDimensionToWeb,
|
|
92
96
|
parseSpacing: () => parseSpacing,
|
|
93
97
|
radiusToPx: () => radiusToPx,
|
|
94
98
|
replaceCalcedValues: () => replaceCalcedValues,
|
|
@@ -790,6 +794,48 @@ function mapChipVariantToHeroUiVariant(variant) {
|
|
|
790
794
|
return "primary";
|
|
791
795
|
}
|
|
792
796
|
}
|
|
797
|
+
function parseDimensionToReactNative(value) {
|
|
798
|
+
if (value === void 0 || value === null) return void 0;
|
|
799
|
+
if (typeof value === "number") return Number.isFinite(value) ? value : void 0;
|
|
800
|
+
const trimmed = value.trim();
|
|
801
|
+
if (trimmed === "") return void 0;
|
|
802
|
+
if (trimmed === "auto") return "auto";
|
|
803
|
+
const pct = /^(\d+(?:\.\d+)?)%$/.exec(trimmed);
|
|
804
|
+
if (pct) {
|
|
805
|
+
const n = Number(pct[1]);
|
|
806
|
+
return `${n}%`;
|
|
807
|
+
}
|
|
808
|
+
const px2 = /^(\d+(?:\.\d+)?)(?:px)?$/.exec(trimmed);
|
|
809
|
+
if (px2) return Number(px2[1]);
|
|
810
|
+
return void 0;
|
|
811
|
+
}
|
|
812
|
+
function parseDimensionToWeb(value) {
|
|
813
|
+
if (value === void 0 || value === null) return void 0;
|
|
814
|
+
if (typeof value === "number") return value;
|
|
815
|
+
const trimmed = value.trim();
|
|
816
|
+
return trimmed === "" ? void 0 : trimmed;
|
|
817
|
+
}
|
|
818
|
+
function gridSpanToReactNativeColumn(span, cols = 12) {
|
|
819
|
+
const totalCols = cols > 0 ? cols : 12;
|
|
820
|
+
if (span === "auto") return { flexBasis: 0, flexGrow: 1, flexShrink: 1 };
|
|
821
|
+
if (span === "content") return { flexBasis: "auto", flexGrow: 0, flexShrink: 0 };
|
|
822
|
+
const n = typeof span === "number" ? span : Number.parseInt(String(span ?? ""), 10);
|
|
823
|
+
if (!Number.isFinite(n) || n <= 0) return { flexBasis: "100%", flexGrow: 0, flexShrink: 1 };
|
|
824
|
+
const clamped = Math.min(n, totalCols);
|
|
825
|
+
const pct = Math.round(clamped / totalCols * 1e4) / 100;
|
|
826
|
+
return { flexBasis: `${pct}%`, flexGrow: 0, flexShrink: 1 };
|
|
827
|
+
}
|
|
828
|
+
function mapDividerVariantToReactNative(variant) {
|
|
829
|
+
switch (variant) {
|
|
830
|
+
case "dashed":
|
|
831
|
+
return "dashed";
|
|
832
|
+
case "dotted":
|
|
833
|
+
return "dotted";
|
|
834
|
+
case "solid":
|
|
835
|
+
default:
|
|
836
|
+
return "solid";
|
|
837
|
+
}
|
|
838
|
+
}
|
|
793
839
|
function hasState(states, state) {
|
|
794
840
|
return !!states && states.includes(state);
|
|
795
841
|
}
|
|
@@ -1356,6 +1402,7 @@ function transformPagesData(pages) {
|
|
|
1356
1402
|
getStylePlacement,
|
|
1357
1403
|
getStylePlatforms,
|
|
1358
1404
|
getStylePluginId,
|
|
1405
|
+
gridSpanToReactNativeColumn,
|
|
1359
1406
|
isKnownStyleName,
|
|
1360
1407
|
isRegisteredStyleName,
|
|
1361
1408
|
isStyleAllowedOnPage,
|
|
@@ -1363,6 +1410,7 @@ function transformPagesData(pages) {
|
|
|
1363
1410
|
isStyleSupportedOnPlatform,
|
|
1364
1411
|
mapAccordionVariantToHeroUiVariant,
|
|
1365
1412
|
mapChipVariantToHeroUiVariant,
|
|
1413
|
+
mapDividerVariantToReactNative,
|
|
1366
1414
|
mapIntentToHeroUiButtonVariant,
|
|
1367
1415
|
mapIntentToHeroUiColor,
|
|
1368
1416
|
mapIntentToMantine,
|
|
@@ -1374,6 +1422,8 @@ function transformPagesData(pages) {
|
|
|
1374
1422
|
mapSizeToHeroUi,
|
|
1375
1423
|
mapSizeToMantine,
|
|
1376
1424
|
mapSpacingToPx,
|
|
1425
|
+
parseDimensionToReactNative,
|
|
1426
|
+
parseDimensionToWeb,
|
|
1377
1427
|
parseSpacing,
|
|
1378
1428
|
radiusToPx,
|
|
1379
1429
|
replaceCalcedValues,
|
package/dist/index.mjs
CHANGED
|
@@ -674,6 +674,48 @@ function mapChipVariantToHeroUiVariant(variant) {
|
|
|
674
674
|
return "primary";
|
|
675
675
|
}
|
|
676
676
|
}
|
|
677
|
+
function parseDimensionToReactNative(value) {
|
|
678
|
+
if (value === void 0 || value === null) return void 0;
|
|
679
|
+
if (typeof value === "number") return Number.isFinite(value) ? value : void 0;
|
|
680
|
+
const trimmed = value.trim();
|
|
681
|
+
if (trimmed === "") return void 0;
|
|
682
|
+
if (trimmed === "auto") return "auto";
|
|
683
|
+
const pct = /^(\d+(?:\.\d+)?)%$/.exec(trimmed);
|
|
684
|
+
if (pct) {
|
|
685
|
+
const n = Number(pct[1]);
|
|
686
|
+
return `${n}%`;
|
|
687
|
+
}
|
|
688
|
+
const px2 = /^(\d+(?:\.\d+)?)(?:px)?$/.exec(trimmed);
|
|
689
|
+
if (px2) return Number(px2[1]);
|
|
690
|
+
return void 0;
|
|
691
|
+
}
|
|
692
|
+
function parseDimensionToWeb(value) {
|
|
693
|
+
if (value === void 0 || value === null) return void 0;
|
|
694
|
+
if (typeof value === "number") return value;
|
|
695
|
+
const trimmed = value.trim();
|
|
696
|
+
return trimmed === "" ? void 0 : trimmed;
|
|
697
|
+
}
|
|
698
|
+
function gridSpanToReactNativeColumn(span, cols = 12) {
|
|
699
|
+
const totalCols = cols > 0 ? cols : 12;
|
|
700
|
+
if (span === "auto") return { flexBasis: 0, flexGrow: 1, flexShrink: 1 };
|
|
701
|
+
if (span === "content") return { flexBasis: "auto", flexGrow: 0, flexShrink: 0 };
|
|
702
|
+
const n = typeof span === "number" ? span : Number.parseInt(String(span ?? ""), 10);
|
|
703
|
+
if (!Number.isFinite(n) || n <= 0) return { flexBasis: "100%", flexGrow: 0, flexShrink: 1 };
|
|
704
|
+
const clamped = Math.min(n, totalCols);
|
|
705
|
+
const pct = Math.round(clamped / totalCols * 1e4) / 100;
|
|
706
|
+
return { flexBasis: `${pct}%`, flexGrow: 0, flexShrink: 1 };
|
|
707
|
+
}
|
|
708
|
+
function mapDividerVariantToReactNative(variant) {
|
|
709
|
+
switch (variant) {
|
|
710
|
+
case "dashed":
|
|
711
|
+
return "dashed";
|
|
712
|
+
case "dotted":
|
|
713
|
+
return "dotted";
|
|
714
|
+
case "solid":
|
|
715
|
+
default:
|
|
716
|
+
return "solid";
|
|
717
|
+
}
|
|
718
|
+
}
|
|
677
719
|
function hasState(states, state) {
|
|
678
720
|
return !!states && states.includes(state);
|
|
679
721
|
}
|
|
@@ -1239,6 +1281,7 @@ export {
|
|
|
1239
1281
|
getStylePlacement,
|
|
1240
1282
|
getStylePlatforms,
|
|
1241
1283
|
getStylePluginId,
|
|
1284
|
+
gridSpanToReactNativeColumn,
|
|
1242
1285
|
isKnownStyleName,
|
|
1243
1286
|
isRegisteredStyleName,
|
|
1244
1287
|
isStyleAllowedOnPage,
|
|
@@ -1246,6 +1289,7 @@ export {
|
|
|
1246
1289
|
isStyleSupportedOnPlatform,
|
|
1247
1290
|
mapAccordionVariantToHeroUiVariant,
|
|
1248
1291
|
mapChipVariantToHeroUiVariant,
|
|
1292
|
+
mapDividerVariantToReactNative,
|
|
1249
1293
|
mapIntentToHeroUiButtonVariant,
|
|
1250
1294
|
mapIntentToHeroUiColor,
|
|
1251
1295
|
mapIntentToMantine,
|
|
@@ -1257,6 +1301,8 @@ export {
|
|
|
1257
1301
|
mapSizeToHeroUi,
|
|
1258
1302
|
mapSizeToMantine,
|
|
1259
1303
|
mapSpacingToPx,
|
|
1304
|
+
parseDimensionToReactNative,
|
|
1305
|
+
parseDimensionToWeb,
|
|
1260
1306
|
parseSpacing,
|
|
1261
1307
|
radiusToPx,
|
|
1262
1308
|
replaceCalcedValues,
|
|
@@ -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-CA6p55GE.mjs';
|
|
3
|
+
import '../common-DMm4kymA.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-DACrC1dz.js';
|
|
3
|
+
import '../common-DMm4kymA.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-CA6p55GE.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-CA6p55GE.mjs';
|
|
3
|
+
import '../common-DMm4kymA.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-DACrC1dz.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-DACrC1dz.js';
|
|
3
|
+
import '../common-DMm4kymA.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Open style-name type: a core `TStyleName` literal OR any plugin style
|