@amboss/design-system 4.0.0-next.4 → 4.0.0-next.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/build/cjs/components/AvatarGroup/AvatarGroup.d.ts +1 -1
- package/build/cjs/components/AvatarGroup/AvatarGroup.js +1 -1
- package/build/cjs/components/BinaryFeedback/-types.d.ts +1 -1
- package/build/cjs/components/BulkActionsToolbar/BulkActionsToolbar.d.ts +1 -1
- package/build/cjs/components/CatalogCard/CatalogCard.js +1 -1
- package/build/cjs/components/ColorPicker/ColorPicker.d.ts +1 -1
- package/build/cjs/components/ColorPicker/ColorPickerDropdown.d.ts +1 -1
- package/build/cjs/components/Content/ContentPictogramButton/ContentPictogramButton.d.ts +1 -1
- package/build/cjs/components/Content/ContentTableModal/ContentTableModal.d.ts +1 -1
- package/build/cjs/components/EntityList/BaseEntityList.js +1 -1
- package/build/cjs/components/EntityList/VirtualizedEntityList.d.ts +3 -2
- package/build/cjs/components/EntityList/roles.d.ts +9 -0
- package/build/cjs/components/EntityList/roles.js +1 -0
- package/build/cjs/components/EntityList/types.d.ts +24 -7
- package/build/cjs/components/Form/SegmentedControl/-types.d.ts +3 -3
- package/build/cjs/components/Icon/Icon.d.ts +2 -2
- package/build/cjs/components/Icon/Icon.js +1 -1
- package/build/cjs/components/IconTile/IconTile.d.ts +1 -1
- package/build/cjs/components/Image/Image.d.ts +13 -21
- package/build/cjs/components/Image/Image.js +1 -1
- package/build/cjs/components/Internal/BaseTag/BaseTag.d.ts +1 -1
- package/build/cjs/components/Internal/Panel/Panel.d.ts +36 -0
- package/build/cjs/components/Internal/Panel/Panel.js +1 -0
- package/build/cjs/components/Internal/Panel/index.d.ts +2 -0
- package/build/cjs/components/Internal/Panel/index.js +1 -0
- package/build/cjs/components/Internal/Sandwich/-types.d.ts +36 -0
- package/build/cjs/components/Internal/Sandwich/-types.js +1 -0
- package/build/cjs/components/Internal/Sandwich/Sandwich.d.ts +23 -0
- package/build/cjs/components/Internal/Sandwich/Sandwich.js +1 -0
- package/build/cjs/components/Internal/Sandwich/SandwichBody.d.ts +3 -0
- package/build/cjs/components/Internal/Sandwich/SandwichBody.js +1 -0
- package/build/cjs/components/Internal/Sandwich/SandwichFooter.d.ts +3 -0
- package/build/cjs/components/Internal/Sandwich/SandwichFooter.js +1 -0
- package/build/cjs/components/Internal/Sandwich/SandwichHeader.d.ts +3 -0
- package/build/cjs/components/Internal/Sandwich/SandwichHeader.js +1 -0
- package/build/cjs/components/Internal/Sandwich/useSandwichContext.d.ts +12 -0
- package/build/cjs/components/Internal/Sandwich/useSandwichContext.js +1 -0
- package/build/cjs/components/Layout/-constants.d.ts +30 -0
- package/build/cjs/components/Layout/-constants.js +1 -0
- package/build/cjs/components/Layout/-types.d.ts +214 -0
- package/build/cjs/components/Layout/-types.js +1 -0
- package/build/cjs/components/Layout/Content.d.ts +7 -0
- package/build/cjs/components/Layout/Content.js +1 -0
- package/build/cjs/components/Layout/Layout.d.ts +17 -0
- package/build/cjs/components/Layout/Layout.js +1 -0
- package/build/cjs/components/Layout/LayoutProvider.d.ts +15 -0
- package/build/cjs/components/Layout/LayoutProvider.js +1 -0
- package/build/cjs/components/Layout/LayoutVars.d.ts +18 -0
- package/build/cjs/components/Layout/LayoutVars.js +1 -0
- package/build/cjs/components/Layout/RightPanel.d.ts +9 -0
- package/build/cjs/components/Layout/RightPanel.js +1 -0
- package/build/cjs/components/Layout/RightPanelContainer.d.ts +3 -0
- package/build/cjs/components/Layout/RightPanelContainer.js +1 -0
- package/build/cjs/components/Layout/Sidebar.d.ts +8 -0
- package/build/cjs/components/Layout/Sidebar.js +1 -0
- package/build/cjs/components/Layout/Split.d.ts +7 -0
- package/build/cjs/components/Layout/Split.js +1 -0
- package/build/cjs/components/Layout/context.d.ts +22 -0
- package/build/cjs/components/Layout/context.js +1 -0
- package/build/cjs/components/Layout/index.d.ts +9 -0
- package/build/cjs/components/Layout/index.js +1 -0
- package/build/cjs/components/Layout/reducer.d.ts +5 -0
- package/build/cjs/components/Layout/reducer.js +1 -0
- package/build/cjs/components/Layout/registry.d.ts +31 -0
- package/build/cjs/components/Layout/registry.js +1 -0
- package/build/cjs/components/Layout/store.d.ts +10 -0
- package/build/cjs/components/Layout/store.js +1 -0
- package/build/cjs/components/Layout/useLayout.d.ts +7 -0
- package/build/cjs/components/Layout/useLayout.js +1 -0
- package/build/cjs/components/Layout/usePanelRefs.d.ts +19 -0
- package/build/cjs/components/Layout/usePanelRefs.js +1 -0
- package/build/cjs/components/Layout/usePortalContainerRefs.d.ts +20 -0
- package/build/cjs/components/Layout/usePortalContainerRefs.js +1 -0
- package/build/cjs/components/Layout/varStore.d.ts +17 -0
- package/build/cjs/components/Layout/varStore.js +1 -0
- package/build/cjs/components/Lightbox/Lightbox.d.ts +1 -1
- package/build/cjs/components/NavBar/NavBarPrimaryNav.d.ts +4 -2
- package/build/cjs/components/NavBar/NavBarPrimaryNav.js +1 -1
- package/build/cjs/components/NavBar/NavBarSearchInput.d.ts +3 -2
- package/build/cjs/components/NavBar/NavBarSearchInput.js +1 -1
- package/build/cjs/components/NavBar/NavBarSecondaryNav.d.ts +5 -2
- package/build/cjs/components/NavBar/NavBarSecondaryNav.js +1 -1
- package/build/cjs/components/NavBar/NavBarSubMenuContainer.js +1 -1
- package/build/cjs/components/NavBar/constants.d.ts +1 -0
- package/build/cjs/components/NavBar/constants.js +1 -1
- package/build/cjs/components/Pagination/-types.d.ts +1 -1
- package/build/cjs/components/Patterns/EmptyState/EmptyState.d.ts +1 -1
- package/build/cjs/components/PictogramButton/PictogramButton.d.ts +14 -5
- package/build/cjs/components/PictogramButton/PictogramButton.js +1 -1
- package/build/cjs/components/ProgressBar/ProgressBar.d.ts +1 -1
- package/build/cjs/components/PromptInput/CategoryList.js +1 -1
- package/build/cjs/components/PromptInput/PromptTextArea.d.ts +1 -1
- package/build/cjs/components/SplashCardMedia/SplashCardMedia.d.ts +2 -2
- package/build/cjs/components/SplashCardMedia/SplashCardMedia.js +1 -1
- package/build/cjs/components/Typography/Header/Header.d.ts +1 -1
- package/build/cjs/index.d.ts +1 -0
- package/build/cjs/index.js +1 -1
- package/build/cjs/types/a11y.d.ts +10 -8
- package/build/cjs/types/index.d.ts +15 -1
- package/build/cjs/types/index.js +1 -1
- package/build/cjs/types/type-helpers.d.ts +39 -0
- package/build/cjs/types/type-helpers.js +1 -0
- package/build/esm/components/AvatarGroup/AvatarGroup.d.ts +1 -1
- package/build/esm/components/AvatarGroup/AvatarGroup.js +1 -1
- package/build/esm/components/BinaryFeedback/-types.d.ts +1 -1
- package/build/esm/components/BulkActionsToolbar/BulkActionsToolbar.d.ts +1 -1
- package/build/esm/components/CatalogCard/CatalogCard.js +1 -1
- package/build/esm/components/ColorPicker/ColorPicker.d.ts +1 -1
- package/build/esm/components/ColorPicker/ColorPickerDropdown.d.ts +1 -1
- package/build/esm/components/Content/ContentPictogramButton/ContentPictogramButton.d.ts +1 -1
- package/build/esm/components/Content/ContentTableModal/ContentTableModal.d.ts +1 -1
- package/build/esm/components/EntityList/BaseEntityList.js +1 -1
- package/build/esm/components/EntityList/VirtualizedEntityList.d.ts +3 -2
- package/build/esm/components/EntityList/roles.d.ts +9 -0
- package/build/esm/components/EntityList/roles.js +1 -0
- package/build/esm/components/EntityList/types.d.ts +24 -7
- package/build/esm/components/Form/SegmentedControl/-types.d.ts +3 -3
- package/build/esm/components/Icon/Icon.d.ts +2 -2
- package/build/esm/components/Icon/Icon.js +1 -1
- package/build/esm/components/IconTile/IconTile.d.ts +1 -1
- package/build/esm/components/Image/Image.d.ts +13 -21
- package/build/esm/components/Image/Image.js +1 -1
- package/build/esm/components/Internal/BaseTag/BaseTag.d.ts +1 -1
- package/build/esm/components/Internal/Panel/Panel.d.ts +36 -0
- package/build/esm/components/Internal/Panel/Panel.js +1 -0
- package/build/esm/components/Internal/Panel/index.d.ts +2 -0
- package/build/esm/components/Internal/Panel/index.js +1 -0
- package/build/esm/components/Internal/Sandwich/-types.d.ts +36 -0
- package/build/esm/components/Internal/Sandwich/-types.js +1 -0
- package/build/esm/components/Internal/Sandwich/Sandwich.d.ts +23 -0
- package/build/esm/components/Internal/Sandwich/Sandwich.js +1 -0
- package/build/esm/components/Internal/Sandwich/SandwichBody.d.ts +3 -0
- package/build/esm/components/Internal/Sandwich/SandwichBody.js +1 -0
- package/build/esm/components/Internal/Sandwich/SandwichFooter.d.ts +3 -0
- package/build/esm/components/Internal/Sandwich/SandwichFooter.js +1 -0
- package/build/esm/components/Internal/Sandwich/SandwichHeader.d.ts +3 -0
- package/build/esm/components/Internal/Sandwich/SandwichHeader.js +1 -0
- package/build/esm/components/Internal/Sandwich/useSandwichContext.d.ts +12 -0
- package/build/esm/components/Internal/Sandwich/useSandwichContext.js +1 -0
- package/build/esm/components/Layout/-constants.d.ts +30 -0
- package/build/esm/components/Layout/-constants.js +1 -0
- package/build/esm/components/Layout/-types.d.ts +214 -0
- package/build/esm/components/Layout/-types.js +1 -0
- package/build/esm/components/Layout/Content.d.ts +7 -0
- package/build/esm/components/Layout/Content.js +1 -0
- package/build/esm/components/Layout/Layout.d.ts +17 -0
- package/build/esm/components/Layout/Layout.js +1 -0
- package/build/esm/components/Layout/LayoutProvider.d.ts +15 -0
- package/build/esm/components/Layout/LayoutProvider.js +1 -0
- package/build/esm/components/Layout/LayoutVars.d.ts +18 -0
- package/build/esm/components/Layout/LayoutVars.js +1 -0
- package/build/esm/components/Layout/RightPanel.d.ts +9 -0
- package/build/esm/components/Layout/RightPanel.js +1 -0
- package/build/esm/components/Layout/RightPanelContainer.d.ts +3 -0
- package/build/esm/components/Layout/RightPanelContainer.js +1 -0
- package/build/esm/components/Layout/Sidebar.d.ts +8 -0
- package/build/esm/components/Layout/Sidebar.js +1 -0
- package/build/esm/components/Layout/Split.d.ts +7 -0
- package/build/esm/components/Layout/Split.js +1 -0
- package/build/esm/components/Layout/context.d.ts +22 -0
- package/build/esm/components/Layout/context.js +1 -0
- package/build/esm/components/Layout/index.d.ts +9 -0
- package/build/esm/components/Layout/index.js +1 -0
- package/build/esm/components/Layout/reducer.d.ts +5 -0
- package/build/esm/components/Layout/reducer.js +1 -0
- package/build/esm/components/Layout/registry.d.ts +31 -0
- package/build/esm/components/Layout/registry.js +1 -0
- package/build/esm/components/Layout/store.d.ts +10 -0
- package/build/esm/components/Layout/store.js +1 -0
- package/build/esm/components/Layout/useLayout.d.ts +7 -0
- package/build/esm/components/Layout/useLayout.js +1 -0
- package/build/esm/components/Layout/usePanelRefs.d.ts +19 -0
- package/build/esm/components/Layout/usePanelRefs.js +1 -0
- package/build/esm/components/Layout/usePortalContainerRefs.d.ts +20 -0
- package/build/esm/components/Layout/usePortalContainerRefs.js +1 -0
- package/build/esm/components/Layout/varStore.d.ts +17 -0
- package/build/esm/components/Layout/varStore.js +1 -0
- package/build/esm/components/Lightbox/Lightbox.d.ts +1 -1
- package/build/esm/components/NavBar/NavBarPrimaryNav.d.ts +4 -2
- package/build/esm/components/NavBar/NavBarPrimaryNav.js +1 -1
- package/build/esm/components/NavBar/NavBarSearchInput.d.ts +3 -2
- package/build/esm/components/NavBar/NavBarSearchInput.js +1 -1
- package/build/esm/components/NavBar/NavBarSecondaryNav.d.ts +5 -2
- package/build/esm/components/NavBar/NavBarSecondaryNav.js +1 -1
- package/build/esm/components/NavBar/NavBarSubMenuContainer.js +1 -1
- package/build/esm/components/NavBar/constants.d.ts +1 -0
- package/build/esm/components/NavBar/constants.js +1 -1
- package/build/esm/components/Pagination/-types.d.ts +1 -1
- package/build/esm/components/Patterns/EmptyState/EmptyState.d.ts +1 -1
- package/build/esm/components/PictogramButton/PictogramButton.d.ts +14 -5
- package/build/esm/components/PictogramButton/PictogramButton.js +1 -1
- package/build/esm/components/ProgressBar/ProgressBar.d.ts +1 -1
- package/build/esm/components/PromptInput/CategoryList.js +1 -1
- package/build/esm/components/PromptInput/PromptTextArea.d.ts +1 -1
- package/build/esm/components/SplashCardMedia/SplashCardMedia.d.ts +2 -2
- package/build/esm/components/SplashCardMedia/SplashCardMedia.js +1 -1
- package/build/esm/components/Typography/Header/Header.d.ts +1 -1
- package/build/esm/index.d.ts +1 -0
- package/build/esm/index.js +1 -1
- package/build/esm/types/a11y.d.ts +10 -8
- package/build/esm/types/index.d.ts +15 -1
- package/build/esm/types/index.js +1 -1
- package/build/esm/types/type-helpers.d.ts +39 -0
- package/build/esm/types/type-helpers.js +1 -0
- package/package.json +4 -2
- package/build/cjs/components/Content/ContentTableModal/ContentTableModal.mocks.d.ts +0 -3
- package/build/cjs/components/Content/ContentTableModal/ContentTableModal.mocks.js +0 -1
- package/build/cjs/components/EntityTree/treeListData.mock.d.ts +0 -3
- package/build/cjs/components/EntityTree/treeListData.mock.js +0 -1
- package/build/cjs/components/MediaViewerCarousel/MediaViewerCarousel.mocks.d.ts +0 -2
- package/build/cjs/components/MediaViewerCarousel/MediaViewerCarousel.mocks.js +0 -1
- package/build/esm/components/Content/ContentTableModal/ContentTableModal.mocks.d.ts +0 -3
- package/build/esm/components/Content/ContentTableModal/ContentTableModal.mocks.js +0 -1
- package/build/esm/components/EntityTree/treeListData.mock.d.ts +0 -3
- package/build/esm/components/EntityTree/treeListData.mock.js +0 -1
- package/build/esm/components/MediaViewerCarousel/MediaViewerCarousel.mocks.d.ts +0 -2
- package/build/esm/components/MediaViewerCarousel/MediaViewerCarousel.mocks.js +0 -1
package/build/esm/types/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Literal,Union}from"runtypes";export const LinkTextSizeRuntype=Union(Literal("xs"),Literal("s"),Literal("m"),Literal("l"));export const TextSizeRuntype=Union(Literal("xs"),Literal("s"),Literal("m"),Literal("l"));export const InputTextSizeRuntype=Union(Literal("s"),Literal("m"));export const BaseTagSizeRuntype=Union(Literal("s"),Literal("m"));export const BorderRadiusRuntype=Union(Literal("none"),Literal("xs"),Literal("s"),Literal("m"));export const TextAlignmentRuntype=Union(Literal("left"),Literal("right"),Literal("center"));export const HorizontalAlignmentRuntype=Union(Literal("left"),Literal("right"),Literal("center"),Literal("spaceBetween"));export const VerticalAlignmentRuntype=Union(Literal("top"),Literal("bottom"),Literal("center"),Literal("stretch"));export const StackVerticalAlignmentRuntype=Union(Literal("top"),Literal("bottom"),Literal("center"),Literal("spaceBetween"));export const LightboxVerticalAlignmentRuntype=Union(Literal("top"),Literal("center"));export const StackHorizontalAlignmentRuntype=Union(Literal("left"),Literal("right"),Literal("center"),Literal("stretch"));export const SpaceSizesRuntype=Union(Literal("zero"),Literal("xxxs"),Literal("xxs"),Literal("xs"),Literal("s"),Literal("m"),Literal("l"),Literal("xl"),Literal("xxl"));export const ColumsSizesRuntype=Union(Literal(1),Literal(2),Literal(3),Literal(4),Literal(5),Literal(6),Literal(7),Literal(8),Literal(9),Literal(10),Literal(11),Literal(12),Literal("auto"),Literal("narrow"),Literal("fill"));export const ColumnAlignmentRunType=Union(Literal("auto"),Literal("start"),Literal("center"),Literal("end"));export const OrderRuntype=Union(Literal("first"),Literal("last"),Literal("unset"));export const BaseVariationsRuntype=Union(Literal("primary"),Literal("secondary"),Literal("tertiary"));export const BaseColorsRuntype=Union(BaseVariationsRuntype,Literal("accent"),Literal("onAccent"));export const AIButtonVariationsRuntype=Union(BaseVariationsRuntype,Literal("gradient"));export const PictogramVariationsRuntype=Union(Literal("secondary"),Literal("tertiary"),Literal("quaternary"));export const TextColorsRuntype=Union(BaseColorsRuntype,Literal("success"),Literal("info"),Literal("error"),Literal("warning"));export const TextVariationsRuntype=Union(BaseVariationsRuntype,Literal("success"),Literal("info"),Literal("error"),Literal("warning"));export const TextWeightRuntype=Union(Literal("normal"),Literal("bold"),Literal("black"),Literal("inherit"));export const IconsColorsRuntime=Union(BaseColorsRuntype,Literal("success"),Literal("info"),Literal("error"),Literal("warning"),Literal("inherit"),Literal("brand"),Literal("quaternary"),Literal("ai"));export const IconsVariationsRuntype=Union(BaseVariationsRuntype,Literal("success"),Literal("info"),Literal("error"),Literal("warning"),Literal("inherit"),Literal("brand"));export const IconSizesRuntype=Union(Literal("s"),Literal("m"),Literal("l"));export const CalloutVariationsRuntype=Union(Literal("info"),Literal("success"),Literal("error"),Literal("warning"),Literal("neutral"),Literal("ai"));export const LinkVariationsRuntype=Union(BaseVariationsRuntype);export const LinkColorsRuntype=Union(BaseColorsRuntype);export const ButtonSizeRuntype=Union(Literal("s"),Literal("m"),Literal("l"));export const RoundButtonSizeRuntype=Union(Literal("xs"),Literal("s"),Literal("m"));export const DropdownMenuSizeRuntype=Union(Literal("xs"),Literal("s"),Literal("m"));export const HyphensRuntype=Union(Literal("auto"),Literal("none"),Literal("manual"));export const OverflowWrapRuntype=Union(Literal("normal"),Literal("break-word"));export const ToggleSizeRuntype=Union(Literal("s"),Literal("m"));export const ListSizeRuntype=Union(Literal("xs"),Literal("s"),Literal("m"),Literal("l"));export const PromptInputSizesRuntype=Union(Literal("s"),Literal("m"));export const MediaItemSizeRuntype=Union(Literal("xs"),Literal("s"),Literal("m"),Literal("l"),Literal("xl"));
|
|
1
|
+
import{Literal,Union}from"runtypes";export function asValidProps(props){return props}export const LinkTextSizeRuntype=Union(Literal("xs"),Literal("s"),Literal("m"),Literal("l"));export const TextSizeRuntype=Union(Literal("xs"),Literal("s"),Literal("m"),Literal("l"));export const InputTextSizeRuntype=Union(Literal("s"),Literal("m"));export const BaseTagSizeRuntype=Union(Literal("s"),Literal("m"));export const BorderRadiusRuntype=Union(Literal("none"),Literal("xs"),Literal("s"),Literal("m"));export const TextAlignmentRuntype=Union(Literal("left"),Literal("right"),Literal("center"));export const HorizontalAlignmentRuntype=Union(Literal("left"),Literal("right"),Literal("center"),Literal("spaceBetween"));export const VerticalAlignmentRuntype=Union(Literal("top"),Literal("bottom"),Literal("center"),Literal("stretch"));export const StackVerticalAlignmentRuntype=Union(Literal("top"),Literal("bottom"),Literal("center"),Literal("spaceBetween"));export const LightboxVerticalAlignmentRuntype=Union(Literal("top"),Literal("center"));export const StackHorizontalAlignmentRuntype=Union(Literal("left"),Literal("right"),Literal("center"),Literal("stretch"));export const SpaceSizesRuntype=Union(Literal("zero"),Literal("xxxs"),Literal("xxs"),Literal("xs"),Literal("s"),Literal("m"),Literal("l"),Literal("xl"),Literal("xxl"));export const ColumsSizesRuntype=Union(Literal(1),Literal(2),Literal(3),Literal(4),Literal(5),Literal(6),Literal(7),Literal(8),Literal(9),Literal(10),Literal(11),Literal(12),Literal("auto"),Literal("narrow"),Literal("fill"));export const ColumnAlignmentRunType=Union(Literal("auto"),Literal("start"),Literal("center"),Literal("end"));export const OrderRuntype=Union(Literal("first"),Literal("last"),Literal("unset"));export const BaseVariationsRuntype=Union(Literal("primary"),Literal("secondary"),Literal("tertiary"));export const BaseColorsRuntype=Union(BaseVariationsRuntype,Literal("accent"),Literal("onAccent"));export const AIButtonVariationsRuntype=Union(BaseVariationsRuntype,Literal("gradient"));export const PictogramVariationsRuntype=Union(Literal("secondary"),Literal("tertiary"),Literal("quaternary"));export const TextColorsRuntype=Union(BaseColorsRuntype,Literal("success"),Literal("info"),Literal("error"),Literal("warning"));export const TextVariationsRuntype=Union(BaseVariationsRuntype,Literal("success"),Literal("info"),Literal("error"),Literal("warning"));export const TextWeightRuntype=Union(Literal("normal"),Literal("bold"),Literal("black"),Literal("inherit"));export const IconsColorsRuntime=Union(BaseColorsRuntype,Literal("success"),Literal("info"),Literal("error"),Literal("warning"),Literal("inherit"),Literal("brand"),Literal("quaternary"),Literal("ai"));export const IconsVariationsRuntype=Union(BaseVariationsRuntype,Literal("success"),Literal("info"),Literal("error"),Literal("warning"),Literal("inherit"),Literal("brand"));export const IconSizesRuntype=Union(Literal("s"),Literal("m"),Literal("l"));export const CalloutVariationsRuntype=Union(Literal("info"),Literal("success"),Literal("error"),Literal("warning"),Literal("neutral"),Literal("ai"));export const LinkVariationsRuntype=Union(BaseVariationsRuntype);export const LinkColorsRuntype=Union(BaseColorsRuntype);export const ButtonSizeRuntype=Union(Literal("s"),Literal("m"),Literal("l"));export const RoundButtonSizeRuntype=Union(Literal("xs"),Literal("s"),Literal("m"));export const DropdownMenuSizeRuntype=Union(Literal("xs"),Literal("s"),Literal("m"));export const HyphensRuntype=Union(Literal("auto"),Literal("none"),Literal("manual"));export const OverflowWrapRuntype=Union(Literal("normal"),Literal("break-word"));export const ToggleSizeRuntype=Union(Literal("s"),Literal("m"));export const ListSizeRuntype=Union(Literal("xs"),Literal("s"),Literal("m"),Literal("l"));export const PromptInputSizesRuntype=Union(Literal("s"),Literal("m"));export const MediaItemSizeRuntype=Union(Literal("xs"),Literal("s"),Literal("m"),Literal("l"),Literal("xl"));
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Marks a forbidden or mutually-exclusive OPTIONAL prop. Intersecting with
|
|
3
|
+
* `string` keeps a marked value assignable to a real HTML attribute, so it
|
|
4
|
+
* forwards with no stripping; passing a real string still errors, surfacing the
|
|
5
|
+
* message as an object key.
|
|
6
|
+
*/
|
|
7
|
+
export type ForbiddenProp<Message extends string> = string & {
|
|
8
|
+
[Key in Message]: never;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Marks the standalone "no accessible name supplied" case as a union branch.
|
|
12
|
+
* The message is the required key, so TypeScript reports it as the missing
|
|
13
|
+
* property. No value can satisfy it, so the branch never exists at runtime.
|
|
14
|
+
*/
|
|
15
|
+
export type MissingProps<Message extends string> = {
|
|
16
|
+
[Key in Message]: never;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* The keys of `T` that are both required and typed `never`. A `MissingProps`
|
|
20
|
+
* branch carries exactly one such key — its message — which is what marks the
|
|
21
|
+
* branch as unsatisfiable. An optional `never` slot (the `aria-label?` of a
|
|
22
|
+
* forbidden-prop branch, or a decorative `role?: never`) is skipped, so only the
|
|
23
|
+
* standalone "nothing supplied" branch is identified.
|
|
24
|
+
*/
|
|
25
|
+
type RequiredNeverKeys<T> = {
|
|
26
|
+
[Key in keyof T]-?: {} extends Pick<T, Key> ? never : [T[Key]] extends [never] ? Key : never;
|
|
27
|
+
}[keyof T];
|
|
28
|
+
/**
|
|
29
|
+
* Drops the unsatisfiable `MissingProps` branch so a component can read the real
|
|
30
|
+
* keys off the remaining valid branches.
|
|
31
|
+
*
|
|
32
|
+
* A plain `Exclude<T, MissingProps<string>>` would miss the branch whenever the
|
|
33
|
+
* union is intersected with a base props object (e.g. `ImageBaseProps &
|
|
34
|
+
* ImageA11y`): the intersection gives the branch real-typed keys alongside its
|
|
35
|
+
* `never` message key, so it no longer matches the all-`never` index signature.
|
|
36
|
+
* Detecting the branch by its required `never` key survives that intersection.
|
|
37
|
+
*/
|
|
38
|
+
export type WithoutMissingBranch<T> = T extends unknown ? [RequiredNeverKeys<T>] extends [never] ? T : never : never;
|
|
39
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amboss/design-system",
|
|
3
|
-
"version": "4.0.0-next.
|
|
3
|
+
"version": "4.0.0-next.6",
|
|
4
4
|
"description": "the design system for AMBOSS products",
|
|
5
5
|
"author": "AMBOSS",
|
|
6
6
|
"license": "ISC",
|
|
@@ -131,9 +131,9 @@
|
|
|
131
131
|
"@floating-ui/react-dom": "^2.1.8",
|
|
132
132
|
"@react-aria/interactions": "^3.27.0",
|
|
133
133
|
"@swc/helpers": "~0.5.17",
|
|
134
|
-
"@vitejs/plugin-react-swc": "~3.10.1",
|
|
135
134
|
"focus-trap-react": "^10.2.3",
|
|
136
135
|
"imask": "^7.4.0",
|
|
136
|
+
"react-resizable-panels": "4.11.2",
|
|
137
137
|
"runtypes": "^6.7.0",
|
|
138
138
|
"svgo": "^3.3.3"
|
|
139
139
|
},
|
|
@@ -187,6 +187,7 @@
|
|
|
187
187
|
"@types/react-dom": "^18.3.0",
|
|
188
188
|
"@typescript-eslint/eslint-plugin": "^8.46.0",
|
|
189
189
|
"@typescript-eslint/parser": "^8.46.0",
|
|
190
|
+
"@vitejs/plugin-react-swc": "~3.10.1",
|
|
190
191
|
"@vitest/browser": "^3.2.4",
|
|
191
192
|
"@vitest/coverage-v8": "^3.2.4",
|
|
192
193
|
"auto": "^11.1.6",
|
|
@@ -226,6 +227,7 @@
|
|
|
226
227
|
"svg2vectordrawable": "^2.9.1",
|
|
227
228
|
"tinycolor2": "^1.6.0",
|
|
228
229
|
"ts-jest": "^29.1.1",
|
|
230
|
+
"tsc-alias": "^1.8.17",
|
|
229
231
|
"typescript": "^5.3.3",
|
|
230
232
|
"vitest": "^3.2.4"
|
|
231
233
|
},
|