@lumx/core 4.17.1-alpha.2 → 4.17.1-alpha.3
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/README.md +19 -0
- package/_internal/_virtual/_rolldown/runtime.js +13 -0
- package/{js → _internal/js}/constants/browser/index.d.ts +6 -3
- package/_internal/js/constants/browser/index.js +15 -0
- package/_internal/js/constants/className/index.d.ts +7 -0
- package/_internal/js/constants/className/index.js +7 -0
- package/{js/constants/components/index.js → _internal/js/constants/components/index.d.ts} +13 -12
- package/_internal/js/constants/components/index.js +27 -0
- package/_internal/js/constants/enums/index.d.ts +207 -0
- package/_internal/js/constants/enums/index.js +165 -0
- package/{js/constants/keycodes/index.js → _internal/js/constants/keycodes/index.d.ts} +12 -11
- package/_internal/js/constants/keycodes/index.js +39 -0
- package/_internal/js/types/AriaAttributes.d.ts +32 -0
- package/_internal/js/types/Booleanish.d.ts +4 -0
- package/_internal/js/types/Callback.d.ts +7 -0
- package/_internal/js/types/CommonRef.d.ts +4 -0
- package/_internal/js/types/Direction.d.ts +4 -0
- package/_internal/js/types/Falsy.d.ts +8 -0
- package/_internal/js/types/GenericProps.d.ts +14 -0
- package/_internal/js/types/HasAriaDisabled.d.ts +9 -0
- package/_internal/js/types/HasAriaLabelOrLabelledBy.d.ts +19 -0
- package/_internal/js/types/HasChecked.d.ts +9 -0
- package/_internal/js/types/HasClassName.d.ts +9 -0
- package/_internal/js/types/HasCloseMode.d.ts +10 -0
- package/_internal/js/types/HasDisabled.d.ts +9 -0
- package/_internal/js/types/HasPolymorphicAs.d.ts +12 -0
- package/_internal/js/types/HasRequiredLinkHref.d.ts +6 -0
- package/_internal/js/types/HasTheme.d.ts +11 -0
- package/_internal/js/types/HeadingElement.d.ts +5 -0
- package/_internal/js/types/JSXElement.d.ts +13 -0
- package/_internal/js/types/KebabCase.d.ts +5 -0
- package/_internal/js/types/LumxClassName.d.ts +7 -0
- package/{js → _internal/js}/types/NamedProps.d.ts +4 -3
- package/{js → _internal/js}/types/NestedComponents.d.ts +5 -2
- package/_internal/js/types/ObjectValues.d.ts +8 -0
- package/{js → _internal/js}/types/PartialBy.d.ts +5 -2
- package/_internal/js/types/Point.d.ts +10 -0
- package/_internal/js/types/Predicate.d.ts +5 -0
- package/_internal/js/types/RectSize.d.ts +10 -0
- package/_internal/js/types/Selector.d.ts +11 -0
- package/_internal/js/types/Spacing.d.ts +4 -0
- package/_internal/js/types/TextElement.d.ts +7 -0
- package/_internal/js/types/ValueOf.d.ts +5 -0
- package/_internal/js/types/jsx/PropsToOverride.d.ts +5 -0
- package/_internal/js/utils/_internal/color/resolveColorWithVariants.js +9 -0
- package/{js → _internal/js}/utils/classNames/action-area/index.d.ts +5 -4
- package/_internal/js/utils/classNames/action-area/index.js +22 -0
- package/_internal/js/utils/classNames/bem/block.d.ts +1 -0
- package/_internal/js/utils/classNames/bem/block.js +16 -0
- package/_internal/js/utils/classNames/bem/element.d.ts +1 -0
- package/_internal/js/utils/classNames/bem/element.js +7 -0
- package/_internal/js/utils/classNames/bem/index.d.ts +18 -0
- package/_internal/js/utils/classNames/bem/index.js +22 -0
- package/_internal/js/utils/classNames/bem/modifier.js +19 -0
- package/_internal/js/utils/classNames/bem/types.d.ts +15 -0
- package/{js → _internal/js}/utils/classNames/color/index.d.ts +8 -4
- package/_internal/js/utils/classNames/color/index.js +50 -0
- package/{js → _internal/js}/utils/classNames/spacing/index.d.ts +23 -18
- package/_internal/js/utils/classNames/spacing/index.js +75 -0
- package/_internal/js/utils/classNames/typography/index.d.ts +10 -0
- package/_internal/js/utils/classNames/typography/index.js +10 -0
- package/_internal/js/utils/classNames/visually-hidden/index.d.ts +8 -0
- package/_internal/js/utils/classNames/visually-hidden/index.js +9 -0
- package/{js → _internal/js}/utils/events/keyboard.d.ts +7 -5
- package/_internal/js/utils/events/keyboard.js +39 -0
- package/{js → _internal/js}/utils/events/swipe.d.ts +4 -1
- package/_internal/js/utils/events/swipe.js +58 -0
- package/_internal/js/utils/selectors/getWithSelector.d.ts +7 -0
- package/_internal/js/utils/selectors/getWithSelector.js +9 -0
- package/_internal/js/utils/selectors/groupBySelector.d.ts +10 -0
- package/_internal/js/utils/selectors/groupBySelector.js +21 -0
- package/js/constants/index.d.ts +6 -5
- package/js/constants/index.js +6 -5
- package/js/types/index.d.ts +31 -30
- package/js/types/index.js +0 -1
- package/js/utils/classNames/index.d.ts +14 -7
- package/js/utils/classNames/index.js +27 -7
- package/js/utils/disabledState/index.d.ts +17 -14
- package/js/utils/disabledState/index.js +9 -8
- package/js/utils/index.d.ts +6 -3
- package/js/utils/index.js +6 -6
- package/js/utils/selectors/index.d.ts +3 -2
- package/js/utils/selectors/index.js +3 -2
- package/package.json +6 -12
- package/_internal/DPnPEC08.js +0 -9
- package/js/components/AlertDialog/Stories.d.ts +0 -115
- package/js/components/AlertDialog/Tests.d.ts +0 -11
- package/js/components/AlertDialog/index.d.ts +0 -91
- package/js/components/Avatar/Stories.d.ts +0 -52
- package/js/components/Avatar/Tests.d.ts +0 -11
- package/js/components/Avatar/index.d.ts +0 -50
- package/js/components/Badge/BadgeWrapper.d.ts +0 -13
- package/js/components/Badge/BadgeWrapperStories.d.ts +0 -29
- package/js/components/Badge/BadgeWrapperTests.d.ts +0 -9
- package/js/components/Badge/Stories.d.ts +0 -46
- package/js/components/Badge/Tests.d.ts +0 -12
- package/js/components/Badge/index.d.ts +0 -37
- package/js/components/Button/Button.d.ts +0 -48
- package/js/components/Button/ButtonGroup.d.ts +0 -36
- package/js/components/Button/ButtonGroupStories.d.ts +0 -33
- package/js/components/Button/ButtonRoot.d.ts +0 -55
- package/js/components/Button/ButtonRootTests.d.ts +0 -12
- package/js/components/Button/IconButton.d.ts +0 -45
- package/js/components/Button/IconButtonStories.d.ts +0 -210
- package/js/components/Button/IconButtonTests.d.ts +0 -15
- package/js/components/Button/Stories.d.ts +0 -302
- package/js/components/Button/Tests.d.ts +0 -15
- package/js/components/Checkbox/Stories.d.ts +0 -89
- package/js/components/Checkbox/Tests.d.ts +0 -15
- package/js/components/Checkbox/index.d.ts +0 -49
- package/js/components/Chip/ChipGroup.d.ts +0 -35
- package/js/components/Chip/ChipGroupStories.d.ts +0 -17
- package/js/components/Chip/ChipGroupTests.d.ts +0 -11
- package/js/components/Chip/SelectionChipGroup.d.ts +0 -56
- package/js/components/Chip/SelectionChipGroupStories.d.ts +0 -54
- package/js/components/Chip/SelectionChipGroupTests.d.ts +0 -23
- package/js/components/Chip/Stories.d.ts +0 -127
- package/js/components/Chip/Tests.d.ts +0 -11
- package/js/components/Chip/index.d.ts +0 -81
- package/js/components/Chip/setupSelectionChipGroupEvents.d.ts +0 -28
- package/js/components/Combobox/ComboboxButton.d.ts +0 -57
- package/js/components/Combobox/ComboboxInput.d.ts +0 -57
- package/js/components/Combobox/ComboboxList.d.ts +0 -47
- package/js/components/Combobox/ComboboxOption.d.ts +0 -74
- package/js/components/Combobox/ComboboxOptionAction.d.ts +0 -35
- package/js/components/Combobox/ComboboxOptionMoreInfo.d.ts +0 -54
- package/js/components/Combobox/ComboboxOptionSkeleton.d.ts +0 -47
- package/js/components/Combobox/ComboboxOptionTests.d.ts +0 -24
- package/js/components/Combobox/ComboboxPopover.d.ts +0 -41
- package/js/components/Combobox/ComboboxSection.d.ts +0 -58
- package/js/components/Combobox/ComboboxState.d.ts +0 -99
- package/js/components/Combobox/Stories.d.ts +0 -167
- package/js/components/Combobox/TestStories.d.ts +0 -189
- package/js/components/Combobox/Tests.d.ts +0 -170
- package/js/components/Combobox/constants.d.ts +0 -2
- package/js/components/Combobox/index.d.ts +0 -25
- package/js/components/Combobox/setupCombobox.d.ts +0 -24
- package/js/components/Combobox/setupComboboxButton.d.ts +0 -16
- package/js/components/Combobox/setupComboboxInput.d.ts +0 -24
- package/js/components/Combobox/setupListbox.d.ts +0 -23
- package/js/components/Combobox/subscribeComboboxState.d.ts +0 -23
- package/js/components/Combobox/types.d.ts +0 -175
- package/js/components/Combobox/utils.d.ts +0 -30
- package/js/components/Dialog/Stories.d.ts +0 -97
- package/js/components/Dialog/Tests.d.ts +0 -12
- package/js/components/Dialog/index.d.ts +0 -99
- package/js/components/Divider/Stories.d.ts +0 -21
- package/js/components/Divider/Tests.d.ts +0 -12
- package/js/components/Divider/index.d.ts +0 -27
- package/js/components/DragHandle/Stories.d.ts +0 -18
- package/js/components/DragHandle/Tests.d.ts +0 -12
- package/js/components/DragHandle/index.d.ts +0 -27
- package/js/components/ExpansionPanel/Stories.d.ts +0 -67
- package/js/components/ExpansionPanel/Tests.d.ts +0 -12
- package/js/components/ExpansionPanel/index.d.ts +0 -70
- package/js/components/Flag/Stories.d.ts +0 -120
- package/js/components/Flag/Tests.d.ts +0 -14
- package/js/components/Flag/index.d.ts +0 -34
- package/js/components/FlexBox/Stories.d.ts +0 -116
- package/js/components/FlexBox/Tests.d.ts +0 -13
- package/js/components/FlexBox/constants.d.ts +0 -4
- package/js/components/FlexBox/index.d.ts +0 -54
- package/js/components/FlexBox/types.d.ts +0 -7
- package/js/components/GenericBlock/Stories.d.ts +0 -74
- package/js/components/GenericBlock/Tests.d.ts +0 -13
- package/js/components/GenericBlock/constants.d.ts +0 -19
- package/js/components/GenericBlock/index.d.ts +0 -85
- package/js/components/GridColumn/GridColumn.d.ts +0 -48
- package/js/components/GridColumn/GridColumnStories.d.ts +0 -45
- package/js/components/GridColumn/GridColumnTests.d.ts +0 -12
- package/js/components/GridColumn/index.d.ts +0 -2
- package/js/components/Heading/Stories.d.ts +0 -90
- package/js/components/Heading/Tests.d.ts +0 -11
- package/js/components/Heading/constants.d.ts +0 -21
- package/js/components/Heading/index.d.ts +0 -44
- package/js/components/Heading/utils.d.ts +0 -8
- package/js/components/Icon/Stories.d.ts +0 -156
- package/js/components/Icon/Tests.d.ts +0 -14
- package/js/components/Icon/constants.d.ts +0 -1
- package/js/components/Icon/index.d.ts +0 -41
- package/js/components/ImageBlock/ImageCaption.d.ts +0 -36
- package/js/components/ImageBlock/Stories.d.ts +0 -187
- package/js/components/ImageBlock/Tests.d.ts +0 -11
- package/js/components/ImageBlock/index.d.ts +0 -63
- package/js/components/InlineList/Stories.d.ts +0 -64
- package/js/components/InlineList/Tests.d.ts +0 -12
- package/js/components/InlineList/index.d.ts +0 -53
- package/js/components/InputHelper/Stories.d.ts +0 -35
- package/js/components/InputHelper/Tests.d.ts +0 -12
- package/js/components/InputHelper/constants.d.ts +0 -3
- package/js/components/InputHelper/index.d.ts +0 -26
- package/js/components/InputLabel/Stories.d.ts +0 -40
- package/js/components/InputLabel/Tests.d.ts +0 -12
- package/js/components/InputLabel/index.d.ts +0 -29
- package/js/components/Lightbox/Stories.d.ts +0 -40
- package/js/components/Lightbox/Tests.d.ts +0 -11
- package/js/components/Lightbox/index.d.ts +0 -68
- package/js/components/Link/Stories.d.ts +0 -282
- package/js/components/Link/Tests.d.ts +0 -8
- package/js/components/Link/index.d.ts +0 -47
- package/js/components/LinkPreview/Stories.d.ts +0 -61
- package/js/components/LinkPreview/Tests.d.ts +0 -15
- package/js/components/LinkPreview/index.d.ts +0 -53
- package/js/components/List/ListDivider.d.ts +0 -33
- package/js/components/List/ListDividerStories.d.ts +0 -17
- package/js/components/List/ListDividerTests.d.ts +0 -11
- package/js/components/List/ListItem.d.ts +0 -58
- package/js/components/List/ListItemAction.d.ts +0 -24
- package/js/components/List/ListItemActionTests.d.ts +0 -11
- package/js/components/List/ListItemStories.d.ts +0 -53
- package/js/components/List/ListItemTests.d.ts +0 -12
- package/js/components/List/ListSection.d.ts +0 -45
- package/js/components/List/ListSectionStories.d.ts +0 -125
- package/js/components/List/ListSectionTests.d.ts +0 -13
- package/js/components/List/ListStories.d.ts +0 -34
- package/js/components/List/ListTests.d.ts +0 -11
- package/js/components/List/index.d.ts +0 -39
- package/js/components/Menu/MenuButton.d.ts +0 -41
- package/js/components/Menu/MenuButtonStories.d.ts +0 -50
- package/js/components/Menu/MenuButtonTestStories.d.ts +0 -31
- package/js/components/Menu/MenuButtonTests.d.ts +0 -34
- package/js/components/Menu/MenuItem.d.ts +0 -26
- package/js/components/Menu/MenuItemTests.d.ts +0 -11
- package/js/components/Menu/MenuList.d.ts +0 -16
- package/js/components/Menu/MenuPopover.d.ts +0 -18
- package/js/components/Menu/MenuTrigger.d.ts +0 -23
- package/js/components/Menu/setupMenu.d.ts +0 -18
- package/js/components/Menu/types.d.ts +0 -40
- package/js/components/Menu/utils.d.ts +0 -9
- package/js/components/Message/Stories.d.ts +0 -119
- package/js/components/Message/Tests.d.ts +0 -14
- package/js/components/Message/index.d.ts +0 -75
- package/js/components/Mosaic/Stories.d.ts +0 -102
- package/js/components/Mosaic/Tests.d.ts +0 -13
- package/js/components/Mosaic/index.d.ts +0 -40
- package/js/components/Popover/Stories.d.ts +0 -156
- package/js/components/Popover/Tests.d.ts +0 -11
- package/js/components/Popover/constants.d.ts +0 -43
- package/js/components/Popover/index.d.ts +0 -120
- package/js/components/Popover/types.d.ts +0 -35
- package/js/components/Popover/utils/buildPopoverMiddleware.d.ts +0 -25
- package/js/components/Popover/utils/computeArrowStyles.d.ts +0 -5
- package/js/components/Popover/utils/getFloatingPlacement.d.ts +0 -7
- package/js/components/Popover/utils/index.d.ts +0 -5
- package/js/components/Popover/utils/parseAutoPlacement.d.ts +0 -22
- package/js/components/Popover/utils/parseFitWidth.d.ts +0 -4
- package/js/components/PopoverDialog/Stories.d.ts +0 -44
- package/js/components/PopoverDialog/Tests.d.ts +0 -11
- package/js/components/PopoverDialog/index.d.ts +0 -22
- package/js/components/ProgressCircular/Stories.d.ts +0 -30
- package/js/components/ProgressCircular/Tests.d.ts +0 -11
- package/js/components/ProgressCircular/index.d.ts +0 -52
- package/js/components/ProgressLinear/Stories.d.ts +0 -11
- package/js/components/ProgressLinear/Tests.d.ts +0 -11
- package/js/components/ProgressLinear/index.d.ts +0 -27
- package/js/components/RadioButton/Stories.d.ts +0 -78
- package/js/components/RadioButton/Tests.d.ts +0 -15
- package/js/components/RadioButton/index.d.ts +0 -45
- package/js/components/RadioGroup/index.d.ts +0 -34
- package/js/components/RawClickable/Tests.d.ts +0 -14
- package/js/components/RawClickable/index.d.ts +0 -14
- package/js/components/SelectButton/Stories.d.ts +0 -135
- package/js/components/SelectButton/TestStories.d.ts +0 -45
- package/js/components/SelectButton/Tests.d.ts +0 -34
- package/js/components/SelectButton/index.d.ts +0 -88
- package/js/components/SelectTextField/Stories.d.ts +0 -192
- package/js/components/SelectTextField/TestStories.d.ts +0 -39
- package/js/components/SelectTextField/Tests.d.ts +0 -38
- package/js/components/SelectTextField/index.d.ts +0 -87
- package/js/components/Skeleton/SkeletonCircle.d.ts +0 -32
- package/js/components/Skeleton/SkeletonCircleStories.d.ts +0 -43
- package/js/components/Skeleton/SkeletonCircleTests.d.ts +0 -12
- package/js/components/Skeleton/SkeletonRectangle.d.ts +0 -47
- package/js/components/Skeleton/SkeletonRectangleStories.d.ts +0 -83
- package/js/components/Skeleton/SkeletonRectangleTests.d.ts +0 -13
- package/js/components/Skeleton/SkeletonTypography.d.ts +0 -37
- package/js/components/Skeleton/SkeletonTypographyStories.d.ts +0 -53
- package/js/components/Skeleton/SkeletonTypographyTests.d.ts +0 -13
- package/js/components/Skeleton/index.d.ts +0 -3
- package/js/components/Switch/Stories.d.ts +0 -94
- package/js/components/Switch/Tests.d.ts +0 -15
- package/js/components/Switch/index.d.ts +0 -47
- package/js/components/Table/Stories.d.ts +0 -30
- package/js/components/Table/TableBody.d.ts +0 -25
- package/js/components/Table/TableCell.d.ts +0 -55
- package/js/components/Table/TableCellStories.d.ts +0 -47
- package/js/components/Table/TableCellTests.d.ts +0 -11
- package/js/components/Table/TableHeader.d.ts +0 -29
- package/js/components/Table/TableRow.d.ts +0 -35
- package/js/components/Table/TableRowStories.d.ts +0 -23
- package/js/components/Table/Tests.d.ts +0 -11
- package/js/components/Table/constants.d.ts +0 -9
- package/js/components/Table/index.d.ts +0 -27
- package/js/components/Tabs/Tab.d.ts +0 -70
- package/js/components/Tabs/TabList.d.ts +0 -39
- package/js/components/Tabs/TabListTests.d.ts +0 -12
- package/js/components/Tabs/TabPanel.d.ts +0 -43
- package/js/components/Tabs/TabPanelTests.d.ts +0 -11
- package/js/components/Tabs/TabProviderTestUtils.d.ts +0 -17
- package/js/components/Tabs/Tests.d.ts +0 -11
- package/js/components/Tabs/constants.d.ts +0 -4
- package/js/components/Tabs/state.d.ts +0 -34
- package/js/components/Text/Stories.d.ts +0 -164
- package/js/components/Text/Tests.d.ts +0 -10
- package/js/components/Text/index.d.ts +0 -935
- package/js/components/TextField/RawInputText.d.ts +0 -24
- package/js/components/TextField/RawInputTextStories.d.ts +0 -16
- package/js/components/TextField/RawInputTextTests.d.ts +0 -11
- package/js/components/TextField/RawInputTextarea.d.ts +0 -23
- package/js/components/TextField/RawInputTextareaStories.d.ts +0 -21
- package/js/components/TextField/RawInputTextareaTests.d.ts +0 -11
- package/js/components/TextField/Stories.d.ts +0 -101
- package/js/components/TextField/Tests.d.ts +0 -14
- package/js/components/TextField/TextField.d.ts +0 -84
- package/js/components/TextField/constants.d.ts +0 -13
- package/js/components/Thumbnail/Stories.d.ts +0 -178
- package/js/components/Thumbnail/Tests.d.ts +0 -11
- package/js/components/Thumbnail/index.d.ts +0 -84
- package/js/components/Thumbnail/types.d.ts +0 -45
- package/js/components/Thumbnail/utils.d.ts +0 -79
- package/js/components/TimePickerField/Stories.d.ts +0 -64
- package/js/components/TimePickerField/Tests.d.ts +0 -29
- package/js/components/TimePickerField/index.d.ts +0 -119
- package/js/components/Toolbar/Stories.d.ts +0 -29
- package/js/components/Toolbar/Tests.d.ts +0 -12
- package/js/components/Toolbar/index.d.ts +0 -33
- package/js/components/Tooltip/Stories.d.ts +0 -61
- package/js/components/Tooltip/TestStories.d.ts +0 -72
- package/js/components/Tooltip/Tests.d.ts +0 -11
- package/js/components/Tooltip/constants.d.ts +0 -10
- package/js/components/Tooltip/index.d.ts +0 -65
- package/js/components/Tooltip/tooltipOpenManager.d.ts +0 -21
- package/js/components/Uploader/Stories.d.ts +0 -116
- package/js/components/Uploader/Tests.d.ts +0 -14
- package/js/components/Uploader/index.d.ts +0 -79
- package/js/components/UserBlock/Stories.d.ts +0 -153
- package/js/components/UserBlock/Tests.d.ts +0 -13
- package/js/components/UserBlock/index.d.ts +0 -145
- package/js/constants/_internal/design-tokens.d.ts +0 -5421
- package/js/constants/browser/index.js +0 -14
- package/js/constants/className/index.d.ts +0 -4
- package/js/constants/className/index.js +0 -6
- package/js/constants/components/index.d.ts +0 -24
- package/js/constants/enums/index.d.ts +0 -210
- package/js/constants/enums/index.js +0 -164
- package/js/constants/keycodes/index.d.ts +0 -36
- package/js/types/AriaAttributes.d.ts +0 -29
- package/js/types/Booleanish.d.ts +0 -1
- package/js/types/Callback.d.ts +0 -4
- package/js/types/CommonRef.d.ts +0 -1
- package/js/types/Direction.d.ts +0 -1
- package/js/types/Falsy.d.ts +0 -5
- package/js/types/GenericProps.d.ts +0 -10
- package/js/types/HasAriaDisabled.d.ts +0 -5
- package/js/types/HasAriaLabelOrLabelledBy.d.ts +0 -17
- package/js/types/HasChecked.d.ts +0 -6
- package/js/types/HasClassName.d.ts +0 -6
- package/js/types/HasCloseMode.d.ts +0 -7
- package/js/types/HasDisabled.d.ts +0 -6
- package/js/types/HasPolymorphicAs.d.ts +0 -8
- package/js/types/HasRequiredLinkHref.d.ts +0 -3
- package/js/types/HasTheme.d.ts +0 -7
- package/js/types/HeadingElement.d.ts +0 -2
- package/js/types/JSXElement.d.ts +0 -9
- package/js/types/KebabCase.d.ts +0 -2
- package/js/types/LumxClassName.d.ts +0 -3
- package/js/types/ObjectValues.d.ts +0 -5
- package/js/types/Point.d.ts +0 -7
- package/js/types/Predicate.d.ts +0 -2
- package/js/types/RectSize.d.ts +0 -7
- package/js/types/Selector.d.ts +0 -11
- package/js/types/Spacing.d.ts +0 -1
- package/js/types/TextElement.d.ts +0 -3
- package/js/types/ValueOf.d.ts +0 -2
- package/js/types/jsx/PropsToOverride.d.ts +0 -2
- package/js/utils/ClickAway/TestStories.d.ts +0 -36
- package/js/utils/ClickAway/index.d.ts +0 -34
- package/js/utils/InfiniteScroll/TestStories.d.ts +0 -50
- package/js/utils/InfiniteScroll/index.d.ts +0 -21
- package/js/utils/InfiniteScroll/setupInfiniteScrollObserver.d.ts +0 -8
- package/js/utils/Portal/Stories.d.ts +0 -29
- package/js/utils/Portal/Tests.d.ts +0 -25
- package/js/utils/Portal/index.d.ts +0 -25
- package/js/utils/_internal/color/index.d.ts +0 -1
- package/js/utils/_internal/color/resolveColorWithVariants.d.ts +0 -3
- package/js/utils/action-area/Stories.d.ts +0 -38
- package/js/utils/browser/createSelectorTreeWalker.d.ts +0 -13
- package/js/utils/browser/css/combineSize.d.ts +0 -4
- package/js/utils/browser/css/resolveCssSize.d.ts +0 -4
- package/js/utils/browser/css/types.d.ts +0 -7
- package/js/utils/browser/isFocusVisible.d.ts +0 -2
- package/js/utils/browser/isHoverNotSupported.d.ts +0 -2
- package/js/utils/browser/isPrintableKey.d.ts +0 -7
- package/js/utils/browser/lastDescendant.d.ts +0 -2
- package/js/utils/browser/querySelectorInclusive.d.ts +0 -11
- package/js/utils/browser/trackContainerFocus.d.ts +0 -11
- package/js/utils/classNames/action-area/index.js +0 -21
- package/js/utils/classNames/bem/block.d.ts +0 -15
- package/js/utils/classNames/bem/block.js +0 -26
- package/js/utils/classNames/bem/element.d.ts +0 -16
- package/js/utils/classNames/bem/element.js +0 -7
- package/js/utils/classNames/bem/index.d.ts +0 -18
- package/js/utils/classNames/bem/index.js +0 -22
- package/js/utils/classNames/bem/modifier.d.ts +0 -13
- package/js/utils/classNames/bem/modifier.js +0 -21
- package/js/utils/classNames/bem/types.d.ts +0 -11
- package/js/utils/classNames/color/index.js +0 -51
- package/js/utils/classNames/spacing/index.js +0 -73
- package/js/utils/classNames/typography/index.d.ts +0 -6
- package/js/utils/classNames/typography/index.js +0 -9
- package/js/utils/classNames/visually-hidden/index.d.ts +0 -5
- package/js/utils/classNames/visually-hidden/index.js +0 -11
- package/js/utils/events/index.d.ts +0 -2
- package/js/utils/events/keyboard.js +0 -44
- package/js/utils/events/swipe.js +0 -79
- package/js/utils/focus/constants.d.ts +0 -10
- package/js/utils/focus/getFirstAndLastFocusable.d.ts +0 -13
- package/js/utils/focus/getFocusableElements.d.ts +0 -1
- package/js/utils/focus/index.d.ts +0 -4
- package/js/utils/focus/setupFocusTrap.d.ts +0 -28
- package/js/utils/focusNavigation/createActiveItemState.d.ts +0 -26
- package/js/utils/focusNavigation/createGridFocusNavigation.d.ts +0 -16
- package/js/utils/focusNavigation/createListFocusNavigation.d.ts +0 -15
- package/js/utils/focusNavigation/createPendingNavigation.d.ts +0 -7
- package/js/utils/focusNavigation/index.d.ts +0 -5
- package/js/utils/focusNavigation/setupRovingTabIndex.d.ts +0 -37
- package/js/utils/focusNavigation/types.d.ts +0 -68
- package/js/utils/function/listenerTower.d.ts +0 -13
- package/js/utils/iterable/first.d.ts +0 -2
- package/js/utils/locale/getCurrentLocale.d.ts +0 -7
- package/js/utils/locale/index.d.ts +0 -1
- package/js/utils/select/findOptionById.d.ts +0 -13
- package/js/utils/select/getOptionDisplayName.d.ts +0 -8
- package/js/utils/select/renderSelectOptions.d.ts +0 -7
- package/js/utils/select/toggleSelection.d.ts +0 -23
- package/js/utils/select/types.d.ts +0 -243
- package/js/utils/selectors/getWithSelector.d.ts +0 -3
- package/js/utils/selectors/getWithSelector.js +0 -14
- package/js/utils/selectors/groupBySelector.d.ts +0 -6
- package/js/utils/selectors/groupBySelector.js +0 -21
- package/js/utils/theme/invertTheme.d.ts +0 -3
- package/js/utils/time/buildTimeList.d.ts +0 -34
- package/js/utils/time/formatTime.d.ts +0 -6
- package/js/utils/time/getDateAtTime.d.ts +0 -8
- package/js/utils/time/index.d.ts +0 -8
- package/js/utils/time/isDateOnTime.d.ts +0 -8
- package/js/utils/time/parseTimeInput.d.ts +0 -16
- package/js/utils/time/snapTimeToBounds.d.ts +0 -7
- package/js/utils/time/timeOfDayMinutes.d.ts +0 -4
- package/js/utils/typeahead/index.d.ts +0 -37
- package/stories/controls/color.d.ts +0 -15
- package/stories/controls/element.d.ts +0 -16
- package/stories/controls/focusPoint.d.ts +0 -8
- package/stories/controls/icons.d.ts +0 -66
- package/stories/controls/image.d.ts +0 -96
- package/stories/controls/selectArgType.d.ts +0 -7
- package/stories/controls/theme.d.ts +0 -7
- package/stories/controls/typography.d.ts +0 -8
- package/stories/controls/withUndefined.d.ts +0 -1
- package/stories/types.d.ts +0 -67
- package/stories/utils/CombinationsTable.d.ts +0 -26
- package/stories/utils/ThemingVariablesTable.d.ts +0 -29
- package/stories/utils/combinations.d.ts +0 -100
- package/stories/utils/concatPath.d.ts +0 -10
- package/stories/utils/disableArgTypes.d.ts +0 -7
- package/stories/utils/initDemoShadowDOMPortal.d.ts +0 -5
- package/stories/utils/lorem.d.ts +0 -7
- package/stories/utils/themeVariables.d.ts +0 -39
- package/stories/utils/toFlattenProps.d.ts +0 -12
- package/stories/utils/withCategory.d.ts +0 -4
- package/testing/commonTestsSuiteTL.d.ts +0 -87
- package/testing/index.d.ts +0 -1
- package/testing/queries.d.ts +0 -4
- /package/{css → src/css}/_retro-compat-v2.css +0 -0
- /package/{css → src/css}/design-tokens.css +0 -0
- /package/{css → src/css}/material.css +0 -0
- /package/{scss → src/scss}/_components.scss +0 -0
- /package/{scss → src/scss}/_components_classes.scss +0 -0
- /package/{scss → src/scss}/_core.scss +0 -0
- /package/{scss → src/scss}/_core_classes.scss +0 -0
- /package/{scss → src/scss}/_design-tokens.scss +0 -0
- /package/{scss → src/scss}/_retro-compat-v2.scss +0 -0
- /package/{scss → src/scss}/components/avatar/_index.scss +0 -0
- /package/{scss → src/scss}/components/badge/_index.scss +0 -0
- /package/{scss → src/scss}/components/button/_index.scss +0 -0
- /package/{scss → src/scss}/components/button/_mixins.scss +0 -0
- /package/{scss → src/scss}/components/button/_variables.scss +0 -0
- /package/{scss → src/scss}/components/checkbox/_index.scss +0 -0
- /package/{scss → src/scss}/components/checkbox/_mixins.scss +0 -0
- /package/{scss → src/scss}/components/chip/_index.scss +0 -0
- /package/{scss → src/scss}/components/chip/_mixins.scss +0 -0
- /package/{scss → src/scss}/components/chip/_variables.scss +0 -0
- /package/{scss → src/scss}/components/combobox/_index.scss +0 -0
- /package/{scss → src/scss}/components/comment-block/_index.scss +0 -0
- /package/{scss → src/scss}/components/date-picker/_index.scss +0 -0
- /package/{scss → src/scss}/components/dialog/_index.scss +0 -0
- /package/{scss → src/scss}/components/dialog/_variables.scss +0 -0
- /package/{scss → src/scss}/components/divider/_index.scss +0 -0
- /package/{scss → src/scss}/components/divider/_mixins.scss +0 -0
- /package/{scss → src/scss}/components/divider/_variables.scss +0 -0
- /package/{scss → src/scss}/components/drag-handle/_index.scss +0 -0
- /package/{scss → src/scss}/components/dropdown/_index.scss +0 -0
- /package/{scss → src/scss}/components/expansion-panel/_index.scss +0 -0
- /package/{scss → src/scss}/components/expansion-panel/_variables.scss +0 -0
- /package/{scss → src/scss}/components/flag/_index.scss +0 -0
- /package/{scss → src/scss}/components/flex-box/_index.scss +0 -0
- /package/{scss → src/scss}/components/generic-block/_index.scss +0 -0
- /package/{scss → src/scss}/components/grid/_index.scss +0 -0
- /package/{scss → src/scss}/components/grid-column/_index.scss +0 -0
- /package/{scss → src/scss}/components/icon/_index.scss +0 -0
- /package/{scss → src/scss}/components/icon/_mixins.scss +0 -0
- /package/{scss → src/scss}/components/icon/_variables.scss +0 -0
- /package/{scss → src/scss}/components/image-block/_index.scss +0 -0
- /package/{scss → src/scss}/components/image-lightbox/_index.scss +0 -0
- /package/{scss → src/scss}/components/inline-list/_index.scss +0 -0
- /package/{scss → src/scss}/components/input-helper/_index.scss +0 -0
- /package/{scss → src/scss}/components/input-helper/_mixins.scss +0 -0
- /package/{scss → src/scss}/components/input-helper/_variables.scss +0 -0
- /package/{scss → src/scss}/components/input-label/_index.scss +0 -0
- /package/{scss → src/scss}/components/input-label/_mixins.scss +0 -0
- /package/{scss → src/scss}/components/lightbox/_index.scss +0 -0
- /package/{scss → src/scss}/components/lightbox/_variables.scss +0 -0
- /package/{scss → src/scss}/components/link/_index.scss +0 -0
- /package/{scss → src/scss}/components/link/_mixins.scss +0 -0
- /package/{scss → src/scss}/components/link-preview/_index.scss +0 -0
- /package/{scss → src/scss}/components/list/_index.scss +0 -0
- /package/{scss → src/scss}/components/list/_mixins.scss +0 -0
- /package/{scss → src/scss}/components/list/_variables.scss +0 -0
- /package/{scss → src/scss}/components/menu/_index.scss +0 -0
- /package/{scss → src/scss}/components/message/_index.scss +0 -0
- /package/{scss → src/scss}/components/mosaic/_index.scss +0 -0
- /package/{scss → src/scss}/components/navigation/_index.scss +0 -0
- /package/{scss → src/scss}/components/navigation/_mixins.scss +0 -0
- /package/{scss → src/scss}/components/notification/_index.scss +0 -0
- /package/{scss → src/scss}/components/notification/_variables.scss +0 -0
- /package/{scss → src/scss}/components/notification-block/_index.scss +0 -0
- /package/{scss → src/scss}/components/popover/_index.scss +0 -0
- /package/{scss → src/scss}/components/popover/_variables.scss +0 -0
- /package/{scss → src/scss}/components/post-block/_index.scss +0 -0
- /package/{scss → src/scss}/components/progress/_index.scss +0 -0
- /package/{scss → src/scss}/components/progress/_variables.scss +0 -0
- /package/{scss → src/scss}/components/progress-tracker/_index.scss +0 -0
- /package/{scss → src/scss}/components/progress-tracker/_variables.scss +0 -0
- /package/{scss → src/scss}/components/radio-button/_index.scss +0 -0
- /package/{scss → src/scss}/components/radio-button/_mixins.scss +0 -0
- /package/{scss → src/scss}/components/select/_index.scss +0 -0
- /package/{scss → src/scss}/components/select/_mixins.scss +0 -0
- /package/{scss → src/scss}/components/side-navigation/_index.scss +0 -0
- /package/{scss → src/scss}/components/side-navigation/_mixins.scss +0 -0
- /package/{scss → src/scss}/components/skeleton/_index.scss +0 -0
- /package/{scss → src/scss}/components/skeleton/_mixins.scss +0 -0
- /package/{scss → src/scss}/components/slider/_index.scss +0 -0
- /package/{scss → src/scss}/components/slideshow/_index.scss +0 -0
- /package/{scss → src/scss}/components/slideshow/_variables.scss +0 -0
- /package/{scss → src/scss}/components/switch/_index.scss +0 -0
- /package/{scss → src/scss}/components/switch/_mixins.scss +0 -0
- /package/{scss → src/scss}/components/table/_index.scss +0 -0
- /package/{scss → src/scss}/components/table/_mixins.scss +0 -0
- /package/{scss → src/scss}/components/tabs/_index.scss +0 -0
- /package/{scss → src/scss}/components/tabs/_mixins.scss +0 -0
- /package/{scss → src/scss}/components/text/_index.scss +0 -0
- /package/{scss → src/scss}/components/text-field/_index.scss +0 -0
- /package/{scss → src/scss}/components/text-field/_mixins.scss +0 -0
- /package/{scss → src/scss}/components/text-field/_variables.scss +0 -0
- /package/{scss → src/scss}/components/thumbnail/_index.scss +0 -0
- /package/{scss → src/scss}/components/thumbnail/_variables.scss +0 -0
- /package/{scss → src/scss}/components/toolbar/_index.scss +0 -0
- /package/{scss → src/scss}/components/toolbar/_variables.scss +0 -0
- /package/{scss → src/scss}/components/tooltip/_index.scss +0 -0
- /package/{scss → src/scss}/components/tooltip/_variables.scss +0 -0
- /package/{scss → src/scss}/components/uploader/_index.scss +0 -0
- /package/{scss → src/scss}/components/user-block/_index.scss +0 -0
- /package/{scss → src/scss}/components-and-utils.scss +0 -0
- /package/{scss → src/scss}/core/_normalize.scss +0 -0
- /package/{scss → src/scss}/core/action-area/_index.scss +0 -0
- /package/{scss → src/scss}/core/base/_functions.scss +0 -0
- /package/{scss → src/scss}/core/base/_helpers.scss +0 -0
- /package/{scss → src/scss}/core/base/_index.scss +0 -0
- /package/{scss → src/scss}/core/base/_normalize.scss +0 -0
- /package/{scss → src/scss}/core/base/_variables.scss +0 -0
- /package/{scss → src/scss}/core/color/_functions.scss +0 -0
- /package/{scss → src/scss}/core/color/_index.scss +0 -0
- /package/{scss → src/scss}/core/color/_variables.scss +0 -0
- /package/{scss → src/scss}/core/elevation/_mixins.scss +0 -0
- /package/{scss → src/scss}/core/elevation/_variables.scss +0 -0
- /package/{scss → src/scss}/core/size/_variables.scss +0 -0
- /package/{scss → src/scss}/core/spacing/_index.scss +0 -0
- /package/{scss → src/scss}/core/spacing/_variables.scss +0 -0
- /package/{scss → src/scss}/core/state/_mixins.scss +0 -0
- /package/{scss → src/scss}/core/state/_variables.scss +0 -0
- /package/{scss → src/scss}/core/typography/_index.scss +0 -0
- /package/{scss → src/scss}/core/typography/_mixins.scss +0 -0
- /package/{scss → src/scss}/core/typography/_variables.scss +0 -0
- /package/{scss → src/scss}/lumx.scss +0 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { HasClassName } from "./HasClassName.js";
|
|
2
|
+
|
|
3
|
+
//#region src/js/types/GenericProps.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Define a generic props types.
|
|
6
|
+
*/
|
|
7
|
+
interface GenericProps extends HasClassName {
|
|
8
|
+
/**
|
|
9
|
+
* Any prop (particularly any supported prop for a HTML element).
|
|
10
|
+
*/
|
|
11
|
+
[propName: string]: any;
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
export { GenericProps };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Booleanish } from "./Booleanish.js";
|
|
2
|
+
|
|
3
|
+
//#region src/js/types/HasAriaDisabled.d.ts
|
|
4
|
+
interface HasAriaDisabled {
|
|
5
|
+
/** Similar to `disabled` but does not block pointer events or focus */
|
|
6
|
+
'aria-disabled'?: Booleanish;
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { HasAriaDisabled };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
//#region src/js/types/HasAriaLabelOrLabelledBy.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Require either `aria-label` or `arial-labelledby` prop.
|
|
4
|
+
* If none are set, the order will prioritize `aria-labelledby` over `aria-label` as it
|
|
5
|
+
* needs a visible element.
|
|
6
|
+
*/
|
|
7
|
+
type HasAriaLabelOrLabelledBy<T = string | undefined> = T extends string ? {
|
|
8
|
+
/**
|
|
9
|
+
* The id of the element to use as title of the dialog. Can be within or out of the dialog.
|
|
10
|
+
* Although it is not recommended, aria-label can be used instead if no visible element is available.
|
|
11
|
+
*/
|
|
12
|
+
'aria-labelledby': T; /** The label of the dialog. */
|
|
13
|
+
'aria-label'?: undefined;
|
|
14
|
+
} : {
|
|
15
|
+
'aria-label': string;
|
|
16
|
+
'aria-labelledby'?: undefined;
|
|
17
|
+
};
|
|
18
|
+
//#endregion
|
|
19
|
+
export { HasAriaLabelOrLabelledBy };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region src/js/types/HasCloseMode.d.ts
|
|
2
|
+
interface HasCloseMode {
|
|
3
|
+
/**
|
|
4
|
+
* Choose how the children are hidden when closed
|
|
5
|
+
* ('hide' keeps the children in DOM but hide them, 'unmount' remove the children from the DOM).
|
|
6
|
+
*/
|
|
7
|
+
closeMode?: 'hide' | 'unmount';
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
export { HasCloseMode };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ElementType } from "./JSXElement.js";
|
|
2
|
+
import React from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/js/types/HasPolymorphicAs.d.ts
|
|
5
|
+
type HasPolymorphicAs<E extends ElementType> = React.ComponentPropsWithoutRef<E> & {
|
|
6
|
+
/**
|
|
7
|
+
* Customize the rendered component.
|
|
8
|
+
*/
|
|
9
|
+
as?: E;
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { HasPolymorphicAs };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/js/types/JSXElement.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Framework-agnostic type for renderable content.
|
|
6
|
+
* Vue components should cast VNode[] from slots to this type.
|
|
7
|
+
*
|
|
8
|
+
* Note: Uses type-only import to avoid runtime dependencies.
|
|
9
|
+
*/
|
|
10
|
+
type JSXElement = React.ReactNode;
|
|
11
|
+
type ElementType = React.ElementType;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { ElementType, JSXElement };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
//#region src/js/types/KebabCase.d.ts
|
|
2
|
+
/** Transform a string literal into kebab case */
|
|
3
|
+
type KebabCase<S> = S extends `${infer C}${infer T}` ? T extends Uncapitalize<T> ? `${Uncapitalize<C>}${KebabCase<T>}` : `${Uncapitalize<C>}-${KebabCase<T>}` : S;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { KebabCase };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { KebabCase } from "./KebabCase.js";
|
|
2
|
+
|
|
3
|
+
//#region src/js/types/LumxClassName.d.ts
|
|
4
|
+
/** Transform the component name into the lumx class name. */
|
|
5
|
+
type LumxClassName<TComponentName extends string> = `lumx-${KebabCase<TComponentName>}`;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { LumxClassName };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
//#region src/js/types/NamedProps.d.ts
|
|
1
2
|
/**
|
|
2
3
|
* Strips index signature from a type, keeping only explicitly named properties.
|
|
3
4
|
* Used to prevent `GenericProps`'s `[propName: string]: any` from contaminating
|
|
4
5
|
* TypeScript inference of the option type `O`.
|
|
5
6
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
};
|
|
7
|
+
type NamedProps<T> = { [K in keyof T as string extends K ? never : K]: T[K] };
|
|
8
|
+
//#endregion
|
|
9
|
+
export { NamedProps };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
//#region src/js/types/NestedComponents.d.ts
|
|
1
2
|
/**
|
|
2
3
|
* A component reference that can be used in nested components.
|
|
3
4
|
* This is framework-agnostic and works with both React components (functions)
|
|
4
5
|
* and Vue components (objects/constructors).
|
|
5
6
|
*/
|
|
6
|
-
|
|
7
|
+
type ComponentLike = any;
|
|
7
8
|
/**
|
|
8
9
|
* Represents a mapping of nested component names to their component implementations.
|
|
9
10
|
* Used to provide component references to LumX core components that accept nested components.
|
|
@@ -20,4 +21,6 @@ export type ComponentLike = any;
|
|
|
20
21
|
* // Vue usage with VueToJSX
|
|
21
22
|
* const ui = VueToJSX(FlagUI, { nestedComponents: { Text } });
|
|
22
23
|
*/
|
|
23
|
-
|
|
24
|
+
type NestedComponents = Record<string, ComponentLike>;
|
|
25
|
+
//#endregion
|
|
26
|
+
export { ComponentLike, NestedComponents };
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
+
//#region src/js/types/PartialBy.d.ts
|
|
1
2
|
/**
|
|
2
3
|
* Same as `Partial` but for one property only.
|
|
3
4
|
*
|
|
4
5
|
* @example PartialBy<Foo, 'bar'> => produces a type almost identical to `Foo` but with the `bar` property as optional.
|
|
5
6
|
*/
|
|
6
|
-
|
|
7
|
+
type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
7
8
|
/**
|
|
8
9
|
* Same as `Partial` but for all except some properties only.
|
|
9
10
|
*
|
|
10
11
|
* @example PartialExcept<Foo, 'bar'> => produces a type almost identical to `Foo` but with the `bar` property as it is on the original type.
|
|
11
12
|
*/
|
|
12
|
-
|
|
13
|
+
type PartialExcept<T, K extends keyof T> = Pick<T, K> & Partial<Omit<T, K>>;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { PartialBy, PartialExcept };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region src/js/types/Selector.d.ts
|
|
2
|
+
type FunctionSelector<TObject, TValue> = (o: TObject) => TValue;
|
|
3
|
+
type FieldSelector<TObject, TValue> = keyof { [TKey in keyof TObject as TObject[TKey] extends TValue ? TKey : never]: TObject[TKey] };
|
|
4
|
+
/**
|
|
5
|
+
* Value selector on an object
|
|
6
|
+
* - either via an object key
|
|
7
|
+
* - or a selector function
|
|
8
|
+
*/
|
|
9
|
+
type Selector<TObject, TValue = string> = FieldSelector<TObject, TValue> | FunctionSelector<TObject, TValue>;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { Selector };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
//#region src/js/types/jsx/PropsToOverride.d.ts
|
|
2
|
+
/** list of generic props defined on JSX that need to be redefined for each framework */
|
|
3
|
+
type PropsToOverride = 'ref' | 'handleClick' | 'handleChange' | 'handleInput' | 'handleKeyPress' | 'handleClose' | 'handleFocus' | 'handleBlur' | 'handleBeforeClick' | 'handleAfterClick' | 'handleMouseEnter' | 'handleMouseLeave' | 'handleKeyDown';
|
|
4
|
+
//#endregion
|
|
5
|
+
export { PropsToOverride };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
//#region src/js/utils/_internal/color/resolveColorWithVariants.ts
|
|
2
|
+
/** Resolve color & color variant from a `ColorWithVariants` and optionally a `ColorVariant`. */
|
|
3
|
+
function resolveColorWithVariants(colorWithVariants, colorVariant) {
|
|
4
|
+
if (!colorWithVariants) return [void 0, colorVariant];
|
|
5
|
+
const [color, baseColorVariant] = colorWithVariants.split("-");
|
|
6
|
+
return [color, colorVariant || baseColorVariant];
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { resolveColorWithVariants };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
//#region src/js/utils/classNames/action-area/index.d.ts
|
|
1
2
|
type ActionModifiers = Partial<Record<'has-overlay' | 'focus-outset' | 'focus-inset' | 'theme-dark' | 'theme-light', boolean>>;
|
|
2
3
|
/**
|
|
3
4
|
* Action area CSS utility.
|
|
@@ -8,8 +9,8 @@ type ActionModifiers = Partial<Record<'has-overlay' | 'focus-outset' | 'focus-in
|
|
|
8
9
|
* Apply `actionArea.action()` to the primary interactive element (link or button)
|
|
9
10
|
* whose click area should expand to fill the entire container.
|
|
10
11
|
*/
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
action: (modifiers?: ActionModifiers) => string;
|
|
12
|
+
declare const actionArea: (() => "lumx-action-area") & {
|
|
13
|
+
/** Action element class. Adds a `::before` pseudo-element with `position: absolute; inset: 0` to expand the click area. */action: (modifiers?: ActionModifiers) => string;
|
|
14
14
|
};
|
|
15
|
-
|
|
15
|
+
//#endregion
|
|
16
|
+
export { actionArea };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { block } from "../bem/block.js";
|
|
2
|
+
//#region src/js/utils/classNames/action-area/index.ts
|
|
3
|
+
var PREFIX = "lumx-action-area";
|
|
4
|
+
var ACTION_ELEMENT = `${PREFIX}__action`;
|
|
5
|
+
/**
|
|
6
|
+
* Action area CSS utility.
|
|
7
|
+
*
|
|
8
|
+
* Apply `actionArea()` to the container element to make it a positioning context
|
|
9
|
+
* for the action's expanded click area.
|
|
10
|
+
*
|
|
11
|
+
* Apply `actionArea.action()` to the primary interactive element (link or button)
|
|
12
|
+
* whose click area should expand to fill the entire container.
|
|
13
|
+
*/
|
|
14
|
+
var actionArea = Object.assign(
|
|
15
|
+
/** Action area container class. Sets `position: relative`. */
|
|
16
|
+
() => PREFIX,
|
|
17
|
+
{
|
|
18
|
+
/** Action element class. Adds a `::before` pseudo-element with `position: absolute; inset: 0` to expand the click area. */
|
|
19
|
+
action: (modifiers) => block(ACTION_ELEMENT, modifiers) }
|
|
20
|
+
);
|
|
21
|
+
//#endregion
|
|
22
|
+
export { actionArea };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { modifier } from "./modifier.js";
|
|
2
|
+
import classnames from "classnames";
|
|
3
|
+
//#region src/js/utils/classNames/bem/block.ts
|
|
4
|
+
function block(baseName, modifiersOrAdditionalClasses, additionalClasses) {
|
|
5
|
+
let modifiers;
|
|
6
|
+
let classes;
|
|
7
|
+
if (typeof modifiersOrAdditionalClasses === "string" || Array.isArray(modifiersOrAdditionalClasses)) classes = modifiersOrAdditionalClasses;
|
|
8
|
+
else {
|
|
9
|
+
modifiers = modifiersOrAdditionalClasses;
|
|
10
|
+
classes = additionalClasses;
|
|
11
|
+
}
|
|
12
|
+
if (!modifiers && !classes) return baseName;
|
|
13
|
+
return classnames(classes, baseName, modifiers ? modifier(baseName, modifiers) : null);
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { block };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { block } from "./block.js";
|
|
2
|
+
//#region src/js/utils/classNames/bem/element.ts
|
|
3
|
+
function element(baseClass, elem, modifiersOrAdditionalClasses, additionalClasses) {
|
|
4
|
+
return block(`${baseClass}__${elem}`, modifiersOrAdditionalClasses, additionalClasses);
|
|
5
|
+
}
|
|
6
|
+
//#endregion
|
|
7
|
+
export { element };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AdditionalClasses, Modifier } from "./types.js";
|
|
2
|
+
//#region src/js/utils/classNames/bem/index.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Setup BEM block & element generation for a given base name.
|
|
5
|
+
*/
|
|
6
|
+
declare function bem(baseName: string): {
|
|
7
|
+
block: {
|
|
8
|
+
(additionalClasses: AdditionalClasses): string;
|
|
9
|
+
(modifiers?: Modifier, additionalClasses?: AdditionalClasses): string;
|
|
10
|
+
};
|
|
11
|
+
element: {
|
|
12
|
+
(elem: string, additionalClasses: AdditionalClasses): string;
|
|
13
|
+
(elem: string, modifiers?: Modifier, additionalClasses?: AdditionalClasses): string;
|
|
14
|
+
};
|
|
15
|
+
modifier: (modifiers: Modifier) => string;
|
|
16
|
+
};
|
|
17
|
+
//#endregion
|
|
18
|
+
export { bem };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { modifier } from "./modifier.js";
|
|
2
|
+
import { block } from "./block.js";
|
|
3
|
+
import { element } from "./element.js";
|
|
4
|
+
//#region src/js/utils/classNames/bem/index.ts
|
|
5
|
+
/**
|
|
6
|
+
* Setup BEM block & element generation for a given base name.
|
|
7
|
+
*/
|
|
8
|
+
function bem(baseName) {
|
|
9
|
+
function blockFn(modifiersOrAdditionalClasses, additionalClasses) {
|
|
10
|
+
return block(baseName, modifiersOrAdditionalClasses, additionalClasses);
|
|
11
|
+
}
|
|
12
|
+
function elementFn(elem, modifiersOrAdditionalClasses, additionalClasses) {
|
|
13
|
+
return element(baseName, elem, modifiersOrAdditionalClasses, additionalClasses);
|
|
14
|
+
}
|
|
15
|
+
return {
|
|
16
|
+
block: blockFn,
|
|
17
|
+
element: elementFn,
|
|
18
|
+
modifier: (modifiers) => modifier(baseName, modifiers)
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
export { bem };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
//#region src/js/utils/classNames/bem/modifier.ts
|
|
2
|
+
/**
|
|
3
|
+
* Generates BEM modifier class names.
|
|
4
|
+
*
|
|
5
|
+
* @param baseName The base BEM class to attach modifiers to.
|
|
6
|
+
* @param modifiers Map of modifier names to boolean values.
|
|
7
|
+
* @returns Combined modifier class names string.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* modifier('button', { active: true }); // 'button--active'
|
|
11
|
+
* modifier('button', { active: true, disabled: false }); // 'button--active'
|
|
12
|
+
*/
|
|
13
|
+
function modifier(baseName, modifiers) {
|
|
14
|
+
const modifierClasses = [];
|
|
15
|
+
for (const [key, value] of Object.entries(modifiers)) if (value) modifierClasses.push(`${baseName}--${key}`);
|
|
16
|
+
return modifierClasses.join(" ");
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
export { modifier };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ClassValue } from "classnames/types";
|
|
2
|
+
|
|
3
|
+
//#region src/js/utils/classNames/bem/types.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Modifier
|
|
6
|
+
* @example { 'is-disabled': true, 'is-selected': false }
|
|
7
|
+
*/
|
|
8
|
+
type Modifier = Record<string, boolean | undefined | null>;
|
|
9
|
+
/**
|
|
10
|
+
* Additional classes that can be passed as a single string shorthand
|
|
11
|
+
* or an array of class values.
|
|
12
|
+
*/
|
|
13
|
+
type AdditionalClasses = string | ClassValue[];
|
|
14
|
+
//#endregion
|
|
15
|
+
export { AdditionalClasses, Modifier };
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { ColorVariant, ColorWithVariants } from
|
|
1
|
+
import { ColorVariant, ColorWithVariants } from "../../../constants/enums/index.js";
|
|
2
|
+
|
|
3
|
+
//#region src/js/utils/classNames/color/index.d.ts
|
|
2
4
|
/**
|
|
3
5
|
* Generates a Lumx color class name for the given type, color and variant.
|
|
4
6
|
* This is the base function used by font() and background() utilities.
|
|
@@ -14,7 +16,7 @@ import { ColorVariant, ColorWithVariants } from '@lumx/core/js/constants';
|
|
|
14
16
|
* color('font', 'primary-L2'); // 'lumx-color-font-primary-L2'
|
|
15
17
|
* color('font', undefined); // undefined
|
|
16
18
|
*/
|
|
17
|
-
|
|
19
|
+
declare function color(type: 'font' | 'background', propColor: ColorWithVariants, propColorVariant?: ColorVariant): string;
|
|
18
20
|
/**
|
|
19
21
|
* Generates a Lumx background color class name for the given color and variant.
|
|
20
22
|
*
|
|
@@ -26,7 +28,7 @@ export declare function color(type: 'font' | 'background', propColor: ColorWithV
|
|
|
26
28
|
* background('dark', 'L2'); // 'lumx-color-background-dark-L2'
|
|
27
29
|
* background('primary', 'N'); // 'lumx-color-background-primary-N'
|
|
28
30
|
*/
|
|
29
|
-
|
|
31
|
+
declare const background: (propColor: ColorWithVariants, propColorVariant?: ColorVariant) => string;
|
|
30
32
|
/**
|
|
31
33
|
* Generates a Lumx font color class name for the given color and variant.
|
|
32
34
|
*
|
|
@@ -40,4 +42,6 @@ export declare const background: (propColor: ColorWithVariants, propColorVariant
|
|
|
40
42
|
* font('primary'); // 'lumx-color-font-primary-N'
|
|
41
43
|
* font(undefined); // undefined
|
|
42
44
|
*/
|
|
43
|
-
|
|
45
|
+
declare const font: (propColor: ColorWithVariants, propColorVariant?: ColorVariant) => string;
|
|
46
|
+
//#endregion
|
|
47
|
+
export { background, color, font };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { ColorVariant } from "../../../constants/enums/index.js";
|
|
2
|
+
import { resolveColorWithVariants } from "../../_internal/color/resolveColorWithVariants.js";
|
|
3
|
+
//#region src/js/utils/classNames/color/index.ts
|
|
4
|
+
/**
|
|
5
|
+
* Generates a Lumx color class name for the given type, color and variant.
|
|
6
|
+
* This is the base function used by font() and background() utilities.
|
|
7
|
+
*
|
|
8
|
+
* @param type - The color class type ('font' or 'background')
|
|
9
|
+
* @param propColor - The color palette name (e.g., 'primary', 'dark') with optional variant suffix (e.g., 'primary-L2')
|
|
10
|
+
* @param propColorVariant - Optional color variant override (e.g., 'L1', 'L2', 'D1', 'N')
|
|
11
|
+
* @returns The Lumx color class name or undefined if no color is provided
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* color('font', 'dark', 'L2'); // 'lumx-color-font-dark-L2'
|
|
15
|
+
* color('background', 'primary'); // 'lumx-color-background-primary-N'
|
|
16
|
+
* color('font', 'primary-L2'); // 'lumx-color-font-primary-L2'
|
|
17
|
+
* color('font', undefined); // undefined
|
|
18
|
+
*/
|
|
19
|
+
function color(type, propColor, propColorVariant) {
|
|
20
|
+
const [cColor, cColorVariant = ColorVariant.N] = resolveColorWithVariants(propColor, propColorVariant);
|
|
21
|
+
return `lumx-color-${type}-${cColor}-${cColorVariant}`;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Generates a Lumx background color class name for the given color and variant.
|
|
25
|
+
*
|
|
26
|
+
* @param propColor - The color palette name (e.g., 'primary', 'dark', 'light')
|
|
27
|
+
* @param propColorVariant - The color variant (e.g., 'L1', 'L2', 'D1', 'N')
|
|
28
|
+
* @returns The Lumx background color class name
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* background('dark', 'L2'); // 'lumx-color-background-dark-L2'
|
|
32
|
+
* background('primary', 'N'); // 'lumx-color-background-primary-N'
|
|
33
|
+
*/
|
|
34
|
+
var background = (propColor, propColorVariant) => color("background", propColor, propColorVariant);
|
|
35
|
+
/**
|
|
36
|
+
* Generates a Lumx font color class name for the given color and variant.
|
|
37
|
+
*
|
|
38
|
+
* @param propColor - The color palette name (e.g., 'primary', 'dark') with optional variant suffix (e.g., 'primary-L2')
|
|
39
|
+
* @param propColorVariant - Optional color variant override (e.g., 'L1', 'L2', 'D1', 'N')
|
|
40
|
+
* @returns The Lumx font color class name or undefined if no color is provided
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* font('dark', 'L2'); // 'lumx-color-font-dark-L2'
|
|
44
|
+
* font('primary-L2'); // 'lumx-color-font-primary-L2'
|
|
45
|
+
* font('primary'); // 'lumx-color-font-primary-N'
|
|
46
|
+
* font(undefined); // undefined
|
|
47
|
+
*/
|
|
48
|
+
var font = (propColor, propColorVariant) => color("font", propColor, propColorVariant);
|
|
49
|
+
//#endregion
|
|
50
|
+
export { background, color, font };
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import { Direction } from "../../../types/Direction.js";
|
|
2
|
+
import { Spacing } from "../../../types/Spacing.js";
|
|
3
|
+
import { AbstractSize } from "../../../constants/enums/index.js";
|
|
4
|
+
|
|
5
|
+
//#region src/js/utils/classNames/spacing/index.d.ts
|
|
3
6
|
/**
|
|
4
7
|
* Returns a lumx classname for the given type, direction and size. For example, for
|
|
5
8
|
* arguments type='padding', direction='right', size='regular' it returns lumx-spacing-padding-right-regular
|
|
@@ -8,8 +11,8 @@ import { type AbstractSize } from '@lumx/core/js/constants';
|
|
|
8
11
|
* @param size - Size
|
|
9
12
|
* @returns string
|
|
10
13
|
*/
|
|
11
|
-
|
|
12
|
-
|
|
14
|
+
declare function spacing(type: Spacing, size: AbstractSize | null): string;
|
|
15
|
+
declare function spacing(type: Spacing, direction?: Direction, size?: AbstractSize | null): string;
|
|
13
16
|
/**
|
|
14
17
|
* Returns a list of lumx classnames for the given types, directions and sizes. For example, for
|
|
15
18
|
* arguments [
|
|
@@ -20,10 +23,10 @@ export declare function spacing(type: Spacing, direction?: Direction, size?: Abs
|
|
|
20
23
|
* @param spacingConfigs - Array of spacing configurations with direction and size
|
|
21
24
|
* @returns string
|
|
22
25
|
*/
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
declare const spacings: (spacingConfigs: {
|
|
27
|
+
type: Spacing;
|
|
28
|
+
direction?: Direction;
|
|
29
|
+
size?: AbstractSize | null;
|
|
27
30
|
}[]) => string;
|
|
28
31
|
/**
|
|
29
32
|
* Returns a lumx margin classname for the given direction and size. For example, for
|
|
@@ -34,8 +37,8 @@ export declare const spacings: (spacingConfigs: {
|
|
|
34
37
|
* @param size - Size
|
|
35
38
|
* @returns string
|
|
36
39
|
*/
|
|
37
|
-
|
|
38
|
-
|
|
40
|
+
declare function margin(size: AbstractSize | null): string;
|
|
41
|
+
declare function margin(direction?: Direction, size?: AbstractSize | null): string;
|
|
39
42
|
/**
|
|
40
43
|
* Returns a list of lumx margin classnames for the given directions and sizes. For example, for
|
|
41
44
|
* arguments [
|
|
@@ -46,9 +49,9 @@ export declare function margin(direction?: Direction, size?: AbstractSize | null
|
|
|
46
49
|
* @param marginConfigs - Array of padding configurations with direction and size
|
|
47
50
|
* @returns string
|
|
48
51
|
*/
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
+
declare const margins: (marginConfigs: {
|
|
53
|
+
direction?: Direction;
|
|
54
|
+
size?: AbstractSize | null;
|
|
52
55
|
}[]) => string;
|
|
53
56
|
/**
|
|
54
57
|
* Returns a lumx padding classname for the given direction and size. For example, for
|
|
@@ -59,8 +62,8 @@ export declare const margins: (marginConfigs: {
|
|
|
59
62
|
* @param size - Size
|
|
60
63
|
* @returns string
|
|
61
64
|
*/
|
|
62
|
-
|
|
63
|
-
|
|
65
|
+
declare function padding(size: AbstractSize | null): string;
|
|
66
|
+
declare function padding(direction?: Direction, size?: AbstractSize | null): string;
|
|
64
67
|
/**
|
|
65
68
|
* Returns a list of lumx padding classnames for the given directions and sizes. For example, for
|
|
66
69
|
* arguments [
|
|
@@ -71,7 +74,9 @@ export declare function padding(direction?: Direction, size?: AbstractSize | nul
|
|
|
71
74
|
* @param paddingConfigs - Array of padding configurations with direction and size
|
|
72
75
|
* @returns Combined padding classnames as a string
|
|
73
76
|
*/
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
+
declare const paddings: (paddingConfigs: {
|
|
78
|
+
direction?: Direction;
|
|
79
|
+
size?: AbstractSize | null;
|
|
77
80
|
}[]) => string;
|
|
81
|
+
//#endregion
|
|
82
|
+
export { margin, margins, padding, paddings, spacing, spacings };
|