linkedunion-design-kit 1.5.2 → 1.5.4
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/dist/app/layout.d.ts +1 -1
- package/dist/app/layout.js +7 -11
- package/dist/app/page.js +4 -10
- package/dist/index.d.ts +15 -12
- package/dist/index.js +15 -30
- package/dist/jest.config.js +15 -21
- package/dist/jest.setup.d.ts +0 -1
- package/dist/jest.setup.js +3 -12
- package/dist/{components/Color/TextColor/TextColor.stories.d.ts → src/components/Accordion/Accordion.stories.d.ts} +2 -2
- package/dist/src/components/Accordion/Accordion.stories.js +32 -0
- package/dist/{components → src/components}/Avatar/Avatar.d.ts +1 -1
- package/dist/src/components/Avatar/Avatar.js +12 -0
- package/dist/src/components/Avatar/Avatar.stories.js +43 -0
- package/dist/src/components/Avatar/Avatar.test.js +50 -0
- package/dist/src/components/Avatar/index.d.ts +32 -0
- package/dist/src/components/Avatar/index.js +32 -0
- package/dist/src/components/Avatar/type.d.ts +11 -0
- package/dist/src/components/Button/Button.d.ts +3 -0
- package/dist/src/components/Button/Button.js +7 -0
- package/dist/{components → src/components}/Button/Button.stories.d.ts +2 -1
- package/dist/src/components/Button/Button.stories.js +56 -0
- package/dist/src/components/Button/Button.test.js +62 -0
- package/dist/src/components/Button/IconButton.d.ts +3 -0
- package/dist/src/components/Button/IconButton.js +30 -0
- package/dist/src/components/Button/IconButton.stories.d.ts +4 -0
- package/dist/src/components/Button/IconButton.stories.js +53 -0
- package/dist/src/components/Button/IconButton.test.js +30 -0
- package/dist/src/components/Button/index.d.ts +39 -0
- package/dist/src/components/Button/index.js +39 -0
- package/dist/src/components/Button/type.d.ts +23 -0
- package/dist/src/components/ColorPicker/ColorPicker.d.ts +3 -0
- package/dist/src/components/ColorPicker/ColorPicker.js +27 -0
- package/dist/src/components/ColorPicker/ColorPicker.stories.d.ts +5 -0
- package/dist/src/components/ColorPicker/ColorPicker.stories.js +24 -0
- package/dist/src/components/ColorPicker/type.d.ts +4 -0
- package/dist/src/components/Colors/color.d.ts +4 -0
- package/dist/src/components/Colors/color.js +6 -0
- package/dist/src/components/Colors/color.stories.d.ts +7 -0
- package/dist/src/components/Colors/color.stories.js +32 -0
- package/dist/src/components/Colors/color.test.js +24 -0
- package/dist/src/components/EditorTooltip/EditorTooltip.d.ts +5 -0
- package/dist/src/components/EditorTooltip/EditorTooltip.js +9 -0
- package/dist/src/components/EditorTooltip/EditorTooltip.stories.d.ts +6 -0
- package/dist/src/components/EditorTooltip/EditorTooltip.stories.js +24 -0
- package/dist/{components → src/components}/Icons/IconList.test.js +18 -20
- package/dist/src/components/Icons/IconView.js +8 -0
- package/dist/{components → src/components}/Icons/IconView.stories.js +6 -9
- package/dist/src/components/Icons/LUIcon.d.ts +3 -0
- package/dist/src/components/Icons/LUIcon.js +32 -0
- package/dist/src/components/Icons/LUIcon.stories.js +44 -0
- package/dist/src/components/Icons/SingleIcon.test.js +67 -0
- package/dist/src/components/Icons/index.d.ts +16 -0
- package/dist/src/components/Icons/index.js +16 -0
- package/dist/src/components/Icons/type.d.ts +8 -0
- package/dist/src/components/ImageUploader/ImageUploader.stories.d.ts +6 -0
- package/dist/src/components/ImageUploader/ImageUploader.stories.js +18 -0
- package/dist/src/components/ImageUploader/type.d.ts +8 -0
- package/dist/src/components/Images/LuImage.d.ts +3 -0
- package/dist/{components/Typography/Body/Body.js → src/components/Images/LuImage.js} +8 -9
- package/dist/src/components/Images/LuImage.stories.d.ts +6 -0
- package/dist/src/components/Images/LuImage.stories.js +166 -0
- package/dist/src/components/Images/LuImage.test.d.ts +1 -0
- package/dist/src/components/Images/LuImage.test.js +56 -0
- package/dist/src/components/Images/index.d.ts +19 -0
- package/dist/src/components/Images/index.js +19 -0
- package/dist/src/components/Images/type.d.ts +7 -0
- package/dist/src/components/Images/type.js +1 -0
- package/dist/src/components/Input/Input.d.ts +3 -0
- package/dist/{components/Typography/Headings/Headings.js → src/components/Input/Input.js} +6 -9
- package/dist/src/components/Input/Input.stories.d.ts +5 -0
- package/dist/src/components/Input/Input.stories.js +46 -0
- package/dist/src/components/Input/index.d.ts +10 -0
- package/dist/src/components/Input/index.js +10 -0
- package/dist/src/components/Input/type.d.ts +8 -0
- package/dist/src/components/Input/type.js +1 -0
- package/dist/src/components/Label/Label.d.ts +3 -0
- package/dist/{components/Typography/Display/Display.js → src/components/Label/Label.js} +6 -9
- package/dist/src/components/Label/Label.stories.d.ts +5 -0
- package/dist/src/components/Label/Label.stories.js +36 -0
- package/dist/src/components/Label/type.d.ts +9 -0
- package/dist/src/components/Label/type.js +1 -0
- package/dist/src/components/MediaCard/Card.d.ts +3 -0
- package/dist/src/components/MediaCard/Card.js +45 -0
- package/dist/src/components/MediaCard/Card.stories.js +57 -0
- package/dist/src/components/MediaCard/Card.test.js +28 -0
- package/dist/{components → src/components}/MediaCard/ContactProfile/ContactProfile.d.ts +1 -1
- package/dist/src/components/MediaCard/ContactProfile/ContactProfile.js +27 -0
- package/dist/src/components/MediaCard/ContactProfile/ContactProfile.test.d.ts +1 -0
- package/dist/{components → src/components}/MediaCard/ContactProfile/ContactProfile.test.js +17 -13
- package/dist/{components → src/components}/MediaCard/ContactProfile/ContactProfileTheme1.d.ts +1 -1
- package/dist/src/components/MediaCard/ContactProfile/ContactProfileTheme1.js +8 -0
- package/dist/{components → src/components}/MediaCard/ContactProfile/ContactProfileTheme1.test.js +15 -38
- package/dist/{components → src/components}/MediaCard/ContactProfile/ContactProfileTheme2.d.ts +1 -1
- package/dist/src/components/MediaCard/ContactProfile/ContactProfileTheme2.js +8 -0
- package/dist/{components → src/components}/MediaCard/ContactProfile/ContactProfileTheme2.test.js +15 -38
- package/dist/{components → src/components}/MediaCard/PostByCategory/PostByCategory.d.ts +1 -1
- package/dist/src/components/MediaCard/PostByCategory/PostByCategory.js +31 -0
- package/dist/src/components/MediaCard/PostByCategory/PostByCategory.test.d.ts +1 -0
- package/dist/{components → src/components}/MediaCard/PostByCategory/PostByCategory.test.js +18 -13
- package/dist/{components → src/components}/MediaCard/PostByCategory/PostByCategoryTheme1.d.ts +1 -1
- package/dist/src/components/MediaCard/PostByCategory/PostByCategoryTheme1.js +8 -0
- package/dist/{components → src/components}/MediaCard/PostByCategory/PostByCategoryTheme1.test.js +15 -38
- package/dist/{components → src/components}/MediaCard/PostByCategory/PostByCategoryTheme2.d.ts +1 -1
- package/dist/src/components/MediaCard/PostByCategory/PostByCategoryTheme2.js +8 -0
- package/dist/{components → src/components}/MediaCard/PostByCategory/PostByCategoryTheme2.test.js +16 -39
- package/dist/{components → src/components}/MediaCard/index.js +2 -5
- package/dist/src/components/MediaCard/type.d.ts +26 -0
- package/dist/src/components/MediaCard/type.js +1 -0
- package/dist/src/components/Switch/Switch.d.ts +3 -0
- package/dist/src/components/Switch/Switch.js +7 -0
- package/dist/{components/Spacing/Padding/PaddingToken.stories.d.ts → src/components/Switch/Switch.stories.d.ts} +1 -1
- package/dist/src/components/Switch/Switch.stories.js +78 -0
- package/dist/src/components/Switch/type.d.ts +5 -0
- package/dist/src/components/Switch/type.js +1 -0
- package/dist/src/components/Title/Title.js +8 -0
- package/dist/src/components/Title/Title.module.css +43 -0
- package/dist/{components → src/components}/Title/Title.stories.js +9 -15
- package/dist/src/components/Title/Title.test.d.ts +1 -0
- package/dist/src/components/Title/Title.test.js +25 -0
- package/dist/src/components/Typography/Typography.d.ts +3 -0
- package/dist/src/components/Typography/Typography.js +29 -0
- package/dist/src/components/Typography/Typography.stories.d.ts +5 -0
- package/dist/src/components/Typography/Typography.stories.js +37 -0
- package/dist/src/components/Typography/type.d.ts +7 -0
- package/dist/src/components/Typography/type.js +1 -0
- package/dist/src/components/ui/accordion.d.ts +7 -0
- package/dist/src/components/ui/accordion.js +43 -0
- package/dist/src/components/ui/button.d.ts +10 -0
- package/dist/src/components/ui/button.js +54 -0
- package/dist/src/components/ui/imageUploader.d.ts +3 -0
- package/dist/src/components/ui/imageUploader.js +68 -0
- package/dist/src/components/ui/input.d.ts +3 -0
- package/dist/src/components/ui/input.js +29 -0
- package/dist/src/components/ui/label.d.ts +12 -0
- package/dist/src/components/ui/label.js +41 -0
- package/dist/src/components/ui/switch.d.ts +22 -0
- package/dist/src/components/ui/switch.js +70 -0
- package/dist/src/components/ui/tooltip.d.ts +7 -0
- package/dist/src/components/ui/tooltip.js +42 -0
- package/dist/src/components/ui/typography.d.ts +26 -0
- package/dist/src/components/ui/typography.js +65 -0
- package/dist/src/lib/utils.d.ts +2 -0
- package/dist/src/lib/utils.js +9 -0
- package/dist/src/utils/colors.d.ts +70 -0
- package/dist/src/utils/colors.js +70 -0
- package/dist/{utils → src/utils}/constants.d.ts +2 -0
- package/dist/src/utils/constants.js +4 -0
- package/dist/src/utils/enums.d.ts +9 -0
- package/dist/src/utils/enums.js +11 -0
- package/dist/{utils → src/utils}/iconList.js +6 -4
- package/dist/src/utils/index.d.ts +18 -0
- package/dist/src/utils/index.js +20 -0
- package/dist/styles/global.css +2739 -4141
- package/dist/tailwind.config.js +10 -178
- package/package.json +19 -7
- package/dist/.next/types/app/page.d.ts +0 -8
- package/dist/.next/types/app/page.js +0 -57
- package/dist/app/scripts.d.ts +0 -2
- package/dist/app/scripts.js +0 -16
- package/dist/components/Avatar/Avatar.js +0 -15
- package/dist/components/Avatar/Avatar.stories.js +0 -52
- package/dist/components/Avatar/Avatar.test.js +0 -54
- package/dist/components/Border/BorderRadius/BorderRadius.d.ts +0 -2
- package/dist/components/Border/BorderRadius/BorderRadius.js +0 -11
- package/dist/components/Border/BorderRadius/BorderRadius.stories.d.ts +0 -4
- package/dist/components/Border/BorderRadius/BorderRadius.stories.js +0 -38
- package/dist/components/Border/BorderRadius/BorderRadius.test.js +0 -25
- package/dist/components/Border/BorderRadius/BorderRadiusTable.d.ts +0 -1
- package/dist/components/Border/BorderRadius/BorderRadiusTable.js +0 -9
- package/dist/components/Border/BorderRadius/BorderRadiusView.d.ts +0 -2
- package/dist/components/Border/BorderRadius/BorderRadiusView.js +0 -9
- package/dist/components/Border/BorderWidth/BorderWidth.d.ts +0 -2
- package/dist/components/Border/BorderWidth/BorderWidth.js +0 -11
- package/dist/components/Border/BorderWidth/BorderWidth.stories.d.ts +0 -4
- package/dist/components/Border/BorderWidth/BorderWidth.stories.js +0 -38
- package/dist/components/Border/BorderWidth/BorderWidth.test.js +0 -25
- package/dist/components/Border/BorderWidth/BorderWidthTable.d.ts +0 -1
- package/dist/components/Border/BorderWidth/BorderWidthTable.js +0 -9
- package/dist/components/Border/BorderWidth/ViewBorderWidth.d.ts +0 -2
- package/dist/components/Border/BorderWidth/ViewBorderWidth.js +0 -9
- package/dist/components/Button/Button.d.ts +0 -3
- package/dist/components/Button/Button.js +0 -22
- package/dist/components/Button/Button.stories.js +0 -160
- package/dist/components/Button/Button.test.d.ts +0 -1
- package/dist/components/Button/Button.test.js +0 -54
- package/dist/components/Button/index.d.ts +0 -4
- package/dist/components/Button/index.js +0 -8
- package/dist/components/Color/BackgroundColor/BackgroundColor.d.ts +0 -2
- package/dist/components/Color/BackgroundColor/BackgroundColor.js +0 -9
- package/dist/components/Color/BackgroundColor/BackgroundColor.stories.d.ts +0 -10
- package/dist/components/Color/BackgroundColor/BackgroundColor.stories.js +0 -103
- package/dist/components/Color/BackgroundColor/BackgroundColor.test.js +0 -17
- package/dist/components/Color/BackgroundColor/index.d.ts +0 -7
- package/dist/components/Color/BackgroundColor/index.js +0 -18
- package/dist/components/Color/Color.test.d.ts +0 -1
- package/dist/components/Color/Color.test.js +0 -38
- package/dist/components/Color/TextColor/TextColor.d.ts +0 -3
- package/dist/components/Color/TextColor/TextColor.js +0 -9
- package/dist/components/Color/TextColor/TextColor.stories.js +0 -35
- package/dist/components/Color/TextColor/TextColor.test.d.ts +0 -1
- package/dist/components/Color/TextColor/TextColor.test.js +0 -43
- package/dist/components/Icons/IconView.js +0 -11
- package/dist/components/Icons/LUIcon.d.ts +0 -3
- package/dist/components/Icons/LUIcon.js +0 -11
- package/dist/components/Icons/LUIcon.stories.js +0 -56
- package/dist/components/Icons/SingleIcon.test.js +0 -53
- package/dist/components/Images/LuImage.d.ts +0 -3
- package/dist/components/Images/LuImage.js +0 -14
- package/dist/components/Images/LuImage.stories.d.ts +0 -4
- package/dist/components/Images/LuImage.stories.js +0 -53
- package/dist/components/Images/LuImage.test.d.ts +0 -1
- package/dist/components/Images/LuImage.test.js +0 -68
- package/dist/components/MediaCard/Card.d.ts +0 -3
- package/dist/components/MediaCard/Card.js +0 -48
- package/dist/components/MediaCard/Card.stories.js +0 -61
- package/dist/components/MediaCard/Card.test.js +0 -33
- package/dist/components/MediaCard/ContactProfile/ContactProfile.js +0 -27
- package/dist/components/MediaCard/ContactProfile/ContactProfileTheme1.js +0 -16
- package/dist/components/MediaCard/ContactProfile/ContactProfileTheme2.js +0 -16
- package/dist/components/MediaCard/PostByCategory/PostByCategory.js +0 -27
- package/dist/components/MediaCard/PostByCategory/PostByCategoryTheme1.js +0 -16
- package/dist/components/MediaCard/PostByCategory/PostByCategoryTheme2.js +0 -16
- package/dist/components/MediaCard/card.module.css +0 -52
- package/dist/components/Size/MinWidthHeight.d.ts +0 -3
- package/dist/components/Size/MinWidthHeight.js +0 -8
- package/dist/components/Size/MinWidthHeight.stories.d.ts +0 -5
- package/dist/components/Size/MinWidthHeight.stories.js +0 -46
- package/dist/components/Size/MinWidthHeight.test.d.ts +0 -1
- package/dist/components/Size/MinWidthHeight.test.js +0 -34
- package/dist/components/Size/Size.d.ts +0 -4
- package/dist/components/Size/Size.js +0 -10
- package/dist/components/Size/Size.stories.d.ts +0 -6
- package/dist/components/Size/Size.stories.js +0 -35
- package/dist/components/Size/Size.test.d.ts +0 -1
- package/dist/components/Size/Size.test.js +0 -73
- package/dist/components/Size/WidthAndHeight.test.d.ts +0 -1
- package/dist/components/Size/WidthAndHeight.test.js +0 -34
- package/dist/components/Size/WidthHeight.d.ts +0 -3
- package/dist/components/Size/WidthHeight.js +0 -8
- package/dist/components/Size/WidthHeight.stories.d.ts +0 -5
- package/dist/components/Size/WidthHeight.stories.js +0 -46
- package/dist/components/Spacing/Margin/Margin.d.ts +0 -1
- package/dist/components/Spacing/Margin/Margin.js +0 -9
- package/dist/components/Spacing/Margin/MarginBottom.d.ts +0 -1
- package/dist/components/Spacing/Margin/MarginBottom.js +0 -9
- package/dist/components/Spacing/Margin/MarginLeft.d.ts +0 -1
- package/dist/components/Spacing/Margin/MarginLeft.js +0 -9
- package/dist/components/Spacing/Margin/MarginRight.d.ts +0 -1
- package/dist/components/Spacing/Margin/MarginRight.js +0 -9
- package/dist/components/Spacing/Margin/MarginToken.d.ts +0 -1
- package/dist/components/Spacing/Margin/MarginToken.js +0 -16
- package/dist/components/Spacing/Margin/MarginToken.stories.d.ts +0 -4
- package/dist/components/Spacing/Margin/MarginToken.stories.js +0 -22
- package/dist/components/Spacing/Margin/MarginToken.test.js +0 -22
- package/dist/components/Spacing/Margin/MarginTop.d.ts +0 -1
- package/dist/components/Spacing/Margin/MarginTop.js +0 -9
- package/dist/components/Spacing/Margin/MarginX.d.ts +0 -1
- package/dist/components/Spacing/Margin/MarginX.js +0 -9
- package/dist/components/Spacing/Margin/MarginY.d.ts +0 -1
- package/dist/components/Spacing/Margin/MarginY.js +0 -9
- package/dist/components/Spacing/Padding/Padding.d.ts +0 -1
- package/dist/components/Spacing/Padding/Padding.js +0 -9
- package/dist/components/Spacing/Padding/PaddingBottom.d.ts +0 -1
- package/dist/components/Spacing/Padding/PaddingBottom.js +0 -9
- package/dist/components/Spacing/Padding/PaddingLeft.d.ts +0 -1
- package/dist/components/Spacing/Padding/PaddingLeft.js +0 -9
- package/dist/components/Spacing/Padding/PaddingRight.d.ts +0 -1
- package/dist/components/Spacing/Padding/PaddingRight.js +0 -9
- package/dist/components/Spacing/Padding/PaddingToken.d.ts +0 -1
- package/dist/components/Spacing/Padding/PaddingToken.js +0 -16
- package/dist/components/Spacing/Padding/PaddingToken.stories.js +0 -22
- package/dist/components/Spacing/Padding/PaddingToken.test.js +0 -22
- package/dist/components/Spacing/Padding/PaddingTop.d.ts +0 -1
- package/dist/components/Spacing/Padding/PaddingTop.js +0 -9
- package/dist/components/Spacing/Padding/PaddingX.d.ts +0 -1
- package/dist/components/Spacing/Padding/PaddingX.js +0 -9
- package/dist/components/Spacing/Padding/PaddingY.d.ts +0 -1
- package/dist/components/Spacing/Padding/PaddingY.js +0 -9
- package/dist/components/Title/Title.js +0 -13
- package/dist/components/Title/Title.module.css +0 -56
- package/dist/components/Title/Title.test.js +0 -30
- package/dist/components/Typography/Body/Body.d.ts +0 -3
- package/dist/components/Typography/Body/Body.stories.d.ts +0 -6
- package/dist/components/Typography/Body/Body.stories.js +0 -75
- package/dist/components/Typography/Body/body.test.d.ts +0 -1
- package/dist/components/Typography/Body/body.test.js +0 -49
- package/dist/components/Typography/Body/index.d.ts +0 -14
- package/dist/components/Typography/Body/index.js +0 -53
- package/dist/components/Typography/Body/type.d.ts +0 -7
- package/dist/components/Typography/Body/type.js +0 -2
- package/dist/components/Typography/Display/Display.d.ts +0 -3
- package/dist/components/Typography/Display/Display.stories.d.ts +0 -6
- package/dist/components/Typography/Display/Display.stories.js +0 -79
- package/dist/components/Typography/Display/Display.test.d.ts +0 -1
- package/dist/components/Typography/Display/Display.test.js +0 -49
- package/dist/components/Typography/Display/index.d.ts +0 -38
- package/dist/components/Typography/Display/index.js +0 -64
- package/dist/components/Typography/Display/type.d.ts +0 -8
- package/dist/components/Typography/Display/type.js +0 -2
- package/dist/components/Typography/Headings/Heading.test.d.ts +0 -1
- package/dist/components/Typography/Headings/Heading.test.js +0 -49
- package/dist/components/Typography/Headings/Headings.d.ts +0 -3
- package/dist/components/Typography/Headings/Headings.stories.d.ts +0 -6
- package/dist/components/Typography/Headings/Headings.stories.js +0 -69
- package/dist/components/Typography/Headings/index.d.ts +0 -21
- package/dist/components/Typography/Headings/index.js +0 -71
- package/dist/components/Typography/Headings/type.d.ts +0 -6
- package/dist/components/Typography/Headings/type.js +0 -2
- package/dist/components/Typography/Typography.css +0 -3016
- package/dist/components/Typography/Typography.d.ts +0 -2
- package/dist/components/Typography/Typography.js +0 -9
- package/dist/components/Typography/Typography.stories.d.ts +0 -5
- package/dist/components/Typography/Typography.stories.js +0 -87
- package/dist/components/Typography/Typography.test.d.ts +0 -1
- package/dist/components/Typography/Typography.test.js +0 -42
- package/dist/global/components/Table/Table.d.ts +0 -14
- package/dist/global/components/Table/Table.js +0 -14
- package/dist/utils/colors.d.ts +0 -7
- package/dist/utils/colors.js +0 -10
- package/dist/utils/constants.js +0 -5
- package/dist/utils/enums.d.ts +0 -60
- package/dist/utils/enums.js +0 -69
- package/dist/utils/index.d.ts +0 -1448
- package/dist/utils/index.js +0 -1597
- /package/dist/{components → src/components}/Avatar/Avatar.stories.d.ts +0 -0
- /package/dist/{components → src/components}/Avatar/Avatar.test.d.ts +0 -0
- /package/dist/{components/Border/BorderRadius/BorderRadius.test.d.ts → src/components/Avatar/type.js} +0 -0
- /package/dist/{components/Border/BorderWidth/BorderWidth.test.d.ts → src/components/Button/Button.test.d.ts} +0 -0
- /package/dist/{components/Color/BackgroundColor/BackgroundColor.test.d.ts → src/components/Button/IconButton.test.d.ts} +0 -0
- /package/dist/{components/Icons/IconList.test.d.ts → src/components/Button/type.js} +0 -0
- /package/dist/{components/Icons/SingleIcon.test.d.ts → src/components/ColorPicker/type.js} +0 -0
- /package/dist/{components/MediaCard/ContactProfile/ContactProfile.test.d.ts → src/components/Colors/color.test.d.ts} +0 -0
- /package/dist/{components/MediaCard/PostByCategory/PostByCategory.test.d.ts → src/components/Icons/IconList.test.d.ts} +0 -0
- /package/dist/{components → src/components}/Icons/IconView.d.ts +0 -0
- /package/dist/{components → src/components}/Icons/IconView.stories.d.ts +0 -0
- /package/dist/{components → src/components}/Icons/LUIcon.stories.d.ts +0 -0
- /package/dist/{components/Spacing/Margin/MarginToken.test.d.ts → src/components/Icons/SingleIcon.test.d.ts} +0 -0
- /package/dist/{components/Spacing/Padding/PaddingToken.test.d.ts → src/components/Icons/type.js} +0 -0
- /package/dist/{components/Title/Title.test.d.ts → src/components/ImageUploader/type.js} +0 -0
- /package/dist/{components → src/components}/MediaCard/Card.stories.d.ts +0 -0
- /package/dist/{components → src/components}/MediaCard/Card.test.d.ts +0 -0
- /package/dist/{components → src/components}/MediaCard/ContactProfile/ContactProfileTheme1.test.d.ts +0 -0
- /package/dist/{components → src/components}/MediaCard/ContactProfile/ContactProfileTheme2.test.d.ts +0 -0
- /package/dist/{components → src/components}/MediaCard/PostByCategory/PostByCategoryTheme1.test.d.ts +0 -0
- /package/dist/{components → src/components}/MediaCard/PostByCategory/PostByCategoryTheme2.test.d.ts +0 -0
- /package/dist/{components → src/components}/MediaCard/index.d.ts +0 -0
- /package/dist/{components → src/components}/Title/Title.d.ts +0 -0
- /package/dist/{components → src/components}/Title/Title.stories.d.ts +0 -0
- /package/dist/{utils → src/utils}/iconList.d.ts +0 -0
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports._BorderWidth = void 0;
|
|
15
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
|
-
var BorderWidth_1 = require("./BorderWidth");
|
|
17
|
-
var utils_1 = require("../../../utils");
|
|
18
|
-
exports.default = {
|
|
19
|
-
title: "Components/Border",
|
|
20
|
-
component: BorderWidth_1.BorderWidth,
|
|
21
|
-
};
|
|
22
|
-
var Template = function (args) { return (0, jsx_runtime_1.jsx)(BorderWidth_1.BorderWidth, __assign({}, args)); };
|
|
23
|
-
exports._BorderWidth = Template.bind({});
|
|
24
|
-
exports._BorderWidth.args = {
|
|
25
|
-
border: "lu-border-width-125",
|
|
26
|
-
};
|
|
27
|
-
exports._BorderWidth.argTypes = {
|
|
28
|
-
border: {
|
|
29
|
-
control: {
|
|
30
|
-
type: "select",
|
|
31
|
-
labels: Object.fromEntries(utils_1.borderWidthList.map(function (borderWidth) { return [
|
|
32
|
-
borderWidth.key,
|
|
33
|
-
borderWidth.label,
|
|
34
|
-
]; })),
|
|
35
|
-
},
|
|
36
|
-
options: utils_1.borderWidthList.map(function (borderWidth) { return borderWidth.key; }),
|
|
37
|
-
},
|
|
38
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
-
var react_1 = require("@testing-library/react");
|
|
5
|
-
var BorderWidth_1 = require("./BorderWidth");
|
|
6
|
-
describe("BorderWidth Component", function () {
|
|
7
|
-
it("renders BorderWidth component with table and border width view", function () {
|
|
8
|
-
var border = "lu-border-width-125";
|
|
9
|
-
(0, react_1.render)((0, jsx_runtime_1.jsx)(BorderWidth_1.BorderWidth, { border: border }));
|
|
10
|
-
// Check if the main title 'Border Width' is displayed
|
|
11
|
-
expect(react_1.screen.getByText("Border Width")).toBeInTheDocument();
|
|
12
|
-
// Verify the Border Radius Table renders correctly
|
|
13
|
-
expect(react_1.screen.getByText("Alias Token Name")).toBeInTheDocument();
|
|
14
|
-
expect(react_1.screen.getByText("Base unit Multiplier of 8")).toBeInTheDocument();
|
|
15
|
-
expect(react_1.screen.getByText("Value(PX)(REM)")).toBeInTheDocument();
|
|
16
|
-
// Verify the 'lu-border-width-125' row data is in the table
|
|
17
|
-
expect(react_1.screen.getByText("lu-border-width-100")).toBeInTheDocument();
|
|
18
|
-
expect(react_1.screen.getByText("1x")).toBeInTheDocument();
|
|
19
|
-
expect(react_1.screen.getByText("8px = 0.5rem")).toBeInTheDocument();
|
|
20
|
-
// Check if BorderRadiusView is rendered with the correct border width class
|
|
21
|
-
var borderRadiusElement = react_1.screen.getByTestId("border-width");
|
|
22
|
-
expect(borderRadiusElement).toHaveClass("lu-border-width-125");
|
|
23
|
-
expect(borderRadiusElement).toHaveClass("border-primary-600");
|
|
24
|
-
});
|
|
25
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const BorderWidthTable: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BorderWidthTable = void 0;
|
|
4
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
var utils_1 = require("../../../utils");
|
|
6
|
-
var BorderWidthTable = function () {
|
|
7
|
-
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)("table", { className: "lu-width-100 lu-font-size-x-small lu-font-weight-medium", children: [(0, jsx_runtime_1.jsx)("thead", { className: "bg-primary-100", children: (0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("th", { className: "".concat(utils_1.table_header_className), children: "Alias Token Name" }), (0, jsx_runtime_1.jsx)("th", { className: "".concat(utils_1.table_header_className), children: "Base unit Multiplier of 8" }), (0, jsx_runtime_1.jsx)("th", { className: "".concat(utils_1.table_header_className), children: "Value(PX)(REM)" })] }) }), (0, jsx_runtime_1.jsxs)("tbody", { children: [(0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("td", { className: "".concat(utils_1.table_row_className), children: (0, jsx_runtime_1.jsx)("span", { className: "".concat(utils_1.table_data_className), children: "lu-border-width-125" }) }), (0, jsx_runtime_1.jsx)("td", { className: "".concat(utils_1.table_row_className), children: (0, jsx_runtime_1.jsx)("span", { className: "".concat(utils_1.table_data_className), children: "0.125x" }) }), (0, jsx_runtime_1.jsx)("td", { className: "".concat(utils_1.table_row_className), children: (0, jsx_runtime_1.jsx)("span", { className: "".concat(utils_1.table_data_className), children: "1px = 0.063rem" }) })] }), (0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("td", { className: "".concat(utils_1.table_row_className), children: (0, jsx_runtime_1.jsx)("span", { className: "".concat(utils_1.table_data_className), children: "lu-border-width-025" }) }), (0, jsx_runtime_1.jsx)("td", { className: "".concat(utils_1.table_row_className), children: (0, jsx_runtime_1.jsx)("span", { className: "".concat(utils_1.table_data_className), children: "0.25x" }) }), (0, jsx_runtime_1.jsx)("td", { className: "".concat(utils_1.table_row_className), children: (0, jsx_runtime_1.jsx)("span", { className: "".concat(utils_1.table_data_className), children: "2px = 0.125rem" }) })] }), (0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("td", { className: "".concat(utils_1.table_row_className), children: (0, jsx_runtime_1.jsx)("span", { className: "".concat(utils_1.table_data_className), children: "lu-border-width-050" }) }), (0, jsx_runtime_1.jsx)("td", { className: "".concat(utils_1.table_row_className), children: (0, jsx_runtime_1.jsx)("span", { className: "".concat(utils_1.table_data_className), children: "0.50x" }) }), (0, jsx_runtime_1.jsx)("td", { className: "".concat(utils_1.table_row_className), children: (0, jsx_runtime_1.jsx)("span", { className: "".concat(utils_1.table_data_className), children: "4px = 0.25rem" }) })] }), (0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("td", { className: "".concat(utils_1.table_row_className), children: (0, jsx_runtime_1.jsx)("span", { className: "".concat(utils_1.table_data_className), children: "lu-border-width-100" }) }), (0, jsx_runtime_1.jsx)("td", { className: "".concat(utils_1.table_row_className), children: (0, jsx_runtime_1.jsx)("span", { className: "".concat(utils_1.table_data_className), children: "1x" }) }), (0, jsx_runtime_1.jsx)("td", { className: "".concat(utils_1.table_row_className), children: (0, jsx_runtime_1.jsx)("span", { className: "".concat(utils_1.table_data_className), children: "8px = 0.5rem" }) })] })] })] }) }));
|
|
8
|
-
};
|
|
9
|
-
exports.BorderWidthTable = BorderWidthTable;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ViewBorderWidth = void 0;
|
|
4
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
var ViewBorderWidth = function (_a) {
|
|
6
|
-
var border = _a.border;
|
|
7
|
-
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)("div", { className: "border-primary-600 lu-border-rounded-2xl lu-pd-200 lu-size-2500 ".concat(border), "data-testid": "border-width", children: (0, jsx_runtime_1.jsx)("p", { className: "lu-bg-neutral-100 lu-pt-050 lu-pr-100 lu-pb-050 lu-pl-100 rounded lu-font-size-x-small lu-text-center", children: border }) }) }));
|
|
8
|
-
};
|
|
9
|
-
exports.ViewBorderWidth = ViewBorderWidth;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { ButtonProps } from "@/types/interface";
|
|
2
|
-
export declare const Button: ({ contentType, variant, label, iconLeft, iconRight, onClick, shape, size, leftIconSize, rightIconSize, className, icon, iconSize, type, }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
-
export default Button;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Button = void 0;
|
|
7
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
var LUIcon_1 = __importDefault(require("../Icons/LUIcon"));
|
|
9
|
-
var enums_1 = require("../../utils/enums");
|
|
10
|
-
var index_1 = require("./index");
|
|
11
|
-
var Button = function (_a) {
|
|
12
|
-
var _b = _a.contentType, contentType = _b === void 0 ? enums_1.ContentType.text_with_icon : _b, _c = _a.variant, variant = _c === void 0 ? "lu-btn-primary" : _c, _d = _a.label, label = _d === void 0 ? "Button Text" : _d, iconLeft = _a.iconLeft, iconRight = _a.iconRight, onClick = _a.onClick, shape = _a.shape, _e = _a.size, size = _e === void 0 ? "lu-btn-md" : _e, leftIconSize = _a.leftIconSize, rightIconSize = _a.rightIconSize, className = _a.className, icon = _a.icon, iconSize = _a.iconSize, _f = _a.type, type = _f === void 0 ? index_1.ButtonType === null || index_1.ButtonType === void 0 ? void 0 : index_1.ButtonType.fill : _f;
|
|
13
|
-
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)("button", { className: "flex items-center ".concat(shape, " ").concat(type === index_1.ButtonType.outline ? "outline-button ".concat(variant) : variant, " ").concat(className, " ").concat(contentType === enums_1.ContentType.icon_only ? "icon-only ".concat(size) : size), onClick: onClick, children: [contentType === enums_1.ContentType.none && label, contentType === enums_1.ContentType.icon_only && icon && ((0, jsx_runtime_1.jsx)(LUIcon_1.default, { size: iconSize, icon: icon, fill: type === index_1.ButtonType.outline
|
|
14
|
-
? "outline-button ".concat(variant)
|
|
15
|
-
: variant })), contentType === enums_1.ContentType.text_with_icon && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [iconLeft && iconLeft !== "none" && ((0, jsx_runtime_1.jsx)(LUIcon_1.default, { size: leftIconSize, icon: iconLeft, fill: type === index_1.ButtonType.outline
|
|
16
|
-
? "outline-button ".concat(variant)
|
|
17
|
-
: variant, className: "lu-mr-100" })), label, iconRight && iconRight !== "none" && ((0, jsx_runtime_1.jsx)(LUIcon_1.default, { size: rightIconSize, icon: iconRight, fill: type === index_1.ButtonType.outline
|
|
18
|
-
? "outline-button ".concat(variant)
|
|
19
|
-
: variant, className: "lu-ml-100" }))] }))] }) }));
|
|
20
|
-
};
|
|
21
|
-
exports.Button = Button;
|
|
22
|
-
exports.default = exports.Button;
|
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
14
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
15
|
-
if (ar || !(i in from)) {
|
|
16
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
17
|
-
ar[i] = from[i];
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
21
|
-
};
|
|
22
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
-
exports._Button = void 0;
|
|
24
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
25
|
-
var Button_1 = require("./Button");
|
|
26
|
-
var utils_1 = require("../../utils");
|
|
27
|
-
var iconList_1 = require("../../utils/iconList");
|
|
28
|
-
var enums_1 = require("../../utils/enums");
|
|
29
|
-
var _1 = require(".");
|
|
30
|
-
exports.default = {
|
|
31
|
-
title: "Components/Button",
|
|
32
|
-
component: Button_1.Button,
|
|
33
|
-
tags: ["autodocs"],
|
|
34
|
-
};
|
|
35
|
-
var Template = function (args) { return (0, jsx_runtime_1.jsx)(Button_1.Button, __assign({}, args)); };
|
|
36
|
-
exports._Button = Template.bind({});
|
|
37
|
-
exports._Button.args = {
|
|
38
|
-
contentType: enums_1.ContentType.none,
|
|
39
|
-
variant: "lu-btn-primary",
|
|
40
|
-
label: "Button Text",
|
|
41
|
-
onClick: function () { return alert("Button Clicked"); },
|
|
42
|
-
shape: "lu-border-rounded-sm",
|
|
43
|
-
size: "lu-btn-md",
|
|
44
|
-
iconLeft: "chart-simple",
|
|
45
|
-
leftIconSize: "lu-icon-small",
|
|
46
|
-
icon: "chart-simple",
|
|
47
|
-
iconSize: "lu-icon-small",
|
|
48
|
-
type: _1.ButtonType.fill,
|
|
49
|
-
className: "",
|
|
50
|
-
};
|
|
51
|
-
exports._Button.argTypes = {
|
|
52
|
-
contentType: {
|
|
53
|
-
control: { type: "select" },
|
|
54
|
-
options: [
|
|
55
|
-
enums_1.ContentType.none,
|
|
56
|
-
enums_1.ContentType.text_with_icon,
|
|
57
|
-
enums_1.ContentType.icon_only,
|
|
58
|
-
],
|
|
59
|
-
description: "Determines the content of the button",
|
|
60
|
-
},
|
|
61
|
-
label: {
|
|
62
|
-
control: { type: "text" },
|
|
63
|
-
description: "Button label text",
|
|
64
|
-
if: { arg: "contentType", neq: enums_1.ContentType.icon_only },
|
|
65
|
-
},
|
|
66
|
-
variant: {
|
|
67
|
-
control: {
|
|
68
|
-
type: "select",
|
|
69
|
-
labels: Object.fromEntries(utils_1.buttonColorsList.map(function (btnColor) { return [btnColor.key, btnColor.label]; })),
|
|
70
|
-
},
|
|
71
|
-
options: utils_1.buttonColorsList.map(function (btnColor) { return btnColor.key; }),
|
|
72
|
-
},
|
|
73
|
-
iconLeft: {
|
|
74
|
-
control: {
|
|
75
|
-
type: "select",
|
|
76
|
-
labels: Object.fromEntries(iconList_1.iconList.map(function (icon) { return [icon.key, icon.label]; })),
|
|
77
|
-
},
|
|
78
|
-
options: __spreadArray(["none"], iconList_1.iconList.map(function (icon) { return icon.key; }), true),
|
|
79
|
-
if: { arg: "contentType", eq: enums_1.ContentType.text_with_icon },
|
|
80
|
-
},
|
|
81
|
-
iconRight: {
|
|
82
|
-
control: {
|
|
83
|
-
type: "select",
|
|
84
|
-
labels: Object.fromEntries(iconList_1.iconList.map(function (icon) { return [icon.key, icon.label]; })),
|
|
85
|
-
},
|
|
86
|
-
options: __spreadArray(["none"], iconList_1.iconList.map(function (icon) { return icon.key; }), true),
|
|
87
|
-
if: { arg: "contentType", eq: enums_1.ContentType.text_with_icon },
|
|
88
|
-
},
|
|
89
|
-
shape: {
|
|
90
|
-
control: {
|
|
91
|
-
type: "select",
|
|
92
|
-
labels: Object.fromEntries(utils_1.borderRadiusList.map(function (borderRadius) { return [
|
|
93
|
-
borderRadius.key,
|
|
94
|
-
borderRadius.label,
|
|
95
|
-
]; })),
|
|
96
|
-
},
|
|
97
|
-
options: utils_1.borderRadiusList.map(function (borderRadius) { return borderRadius.key; }),
|
|
98
|
-
},
|
|
99
|
-
size: {
|
|
100
|
-
control: {
|
|
101
|
-
type: "select",
|
|
102
|
-
labels: Object.fromEntries(utils_1.buttonSizeList.map(function (size) { return [size.key, size.label]; })),
|
|
103
|
-
},
|
|
104
|
-
options: utils_1.buttonSizeList.map(function (size) { return size.key; }),
|
|
105
|
-
description: "Select the size of the button",
|
|
106
|
-
update: function (args) {
|
|
107
|
-
var isIconOnly = args.contentType === enums_1.ContentType.icon_only;
|
|
108
|
-
// Dynamically update options and labels based on contentType
|
|
109
|
-
return {
|
|
110
|
-
options: isIconOnly
|
|
111
|
-
? utils_1.buttonWithIconList.map(function (size) { return size.key; })
|
|
112
|
-
: utils_1.buttonSizeList.map(function (size) { return size.key; }),
|
|
113
|
-
control: {
|
|
114
|
-
type: "select",
|
|
115
|
-
labels: Object.fromEntries((isIconOnly ? utils_1.buttonWithIconList : utils_1.buttonSizeList).map(function (size) { return [
|
|
116
|
-
size.key,
|
|
117
|
-
size.label,
|
|
118
|
-
]; })),
|
|
119
|
-
},
|
|
120
|
-
};
|
|
121
|
-
},
|
|
122
|
-
},
|
|
123
|
-
leftIconSize: {
|
|
124
|
-
control: {
|
|
125
|
-
type: "select",
|
|
126
|
-
labels: Object.fromEntries(utils_1.buttonIconSizeList.map(function (size) { return [size.key, size.label]; })),
|
|
127
|
-
},
|
|
128
|
-
options: utils_1.buttonIconSizeList.map(function (size) { return size.key; }),
|
|
129
|
-
if: { arg: "contentType", eq: enums_1.ContentType.text_with_icon },
|
|
130
|
-
},
|
|
131
|
-
rightIconSize: {
|
|
132
|
-
control: {
|
|
133
|
-
type: "select",
|
|
134
|
-
labels: Object.fromEntries(utils_1.buttonIconSizeList.map(function (size) { return [size.key, size.label]; })),
|
|
135
|
-
},
|
|
136
|
-
options: utils_1.buttonIconSizeList.map(function (size) { return size.key; }),
|
|
137
|
-
if: { arg: "contentType", eq: enums_1.ContentType.text_with_icon },
|
|
138
|
-
},
|
|
139
|
-
icon: {
|
|
140
|
-
control: {
|
|
141
|
-
type: "select",
|
|
142
|
-
labels: Object.fromEntries(iconList_1.iconList.map(function (icon) { return [icon.key, icon.label]; })),
|
|
143
|
-
},
|
|
144
|
-
options: iconList_1.iconList.map(function (icon) { return icon.key; }),
|
|
145
|
-
if: { arg: "contentType", eq: enums_1.ContentType.icon_only },
|
|
146
|
-
},
|
|
147
|
-
iconSize: {
|
|
148
|
-
control: {
|
|
149
|
-
type: "select",
|
|
150
|
-
labels: Object.fromEntries(utils_1.buttonIconSizeList.map(function (size) { return [size.key, size.label]; })),
|
|
151
|
-
},
|
|
152
|
-
options: utils_1.buttonIconSizeList.map(function (size) { return size.key; }),
|
|
153
|
-
if: { arg: "contentType", eq: enums_1.ContentType.icon_only },
|
|
154
|
-
},
|
|
155
|
-
type: {
|
|
156
|
-
control: { type: "select" },
|
|
157
|
-
options: [_1.ButtonType.fill, _1.ButtonType.outline],
|
|
158
|
-
description: "Determines the type of the button",
|
|
159
|
-
},
|
|
160
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "@testing-library/jest-dom";
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
-
var Button_1 = require("./Button");
|
|
5
|
-
var react_1 = require("@testing-library/react");
|
|
6
|
-
require("@testing-library/jest-dom");
|
|
7
|
-
var enums_1 = require("../../utils/enums");
|
|
8
|
-
var index_1 = require("./index");
|
|
9
|
-
describe("Button Component", function () {
|
|
10
|
-
it("renders with default props", function () {
|
|
11
|
-
(0, react_1.render)((0, jsx_runtime_1.jsx)(Button_1.Button, {}));
|
|
12
|
-
var buttonElement = react_1.screen.getByRole("button", { name: "Button Text" });
|
|
13
|
-
expect(buttonElement).toBeInTheDocument();
|
|
14
|
-
expect(buttonElement).toHaveClass("lu-btn-primary");
|
|
15
|
-
expect(buttonElement).toHaveClass("lu-btn-md");
|
|
16
|
-
});
|
|
17
|
-
it("renders with a custom label", function () {
|
|
18
|
-
(0, react_1.render)((0, jsx_runtime_1.jsx)(Button_1.Button, { label: "Custom Button" }));
|
|
19
|
-
var buttonElement = react_1.screen.getByRole("button", { name: "Custom Button" });
|
|
20
|
-
expect(buttonElement).toBeInTheDocument();
|
|
21
|
-
});
|
|
22
|
-
it("applies additional class names", function () {
|
|
23
|
-
(0, react_1.render)((0, jsx_runtime_1.jsx)(Button_1.Button, { className: "custom-class another-class" }));
|
|
24
|
-
var buttonElement = react_1.screen.getByRole("button", { name: "Button Text" });
|
|
25
|
-
expect(buttonElement).toHaveClass("custom-class");
|
|
26
|
-
expect(buttonElement).toHaveClass("another-class");
|
|
27
|
-
});
|
|
28
|
-
it("triggers the onClick function when clicked", function () {
|
|
29
|
-
var handleClick = jest.fn();
|
|
30
|
-
(0, react_1.render)((0, jsx_runtime_1.jsx)(Button_1.Button, { onClick: handleClick }));
|
|
31
|
-
var buttonElement = react_1.screen.getByRole("button", { name: "Button Text" });
|
|
32
|
-
react_1.fireEvent.click(buttonElement);
|
|
33
|
-
expect(handleClick).toHaveBeenCalledTimes(1);
|
|
34
|
-
});
|
|
35
|
-
it("renders an icon-only button", function () {
|
|
36
|
-
(0, react_1.render)((0, jsx_runtime_1.jsx)(Button_1.Button, { contentType: enums_1.ContentType.icon_only, icon: "star-icon" }));
|
|
37
|
-
var buttonElement = react_1.screen.getByRole("button");
|
|
38
|
-
expect(buttonElement).toBeInTheDocument();
|
|
39
|
-
expect(buttonElement).toHaveTextContent(""); // Ensure it's icon-only
|
|
40
|
-
});
|
|
41
|
-
it("renders a button with left and right icons", function () {
|
|
42
|
-
(0, react_1.render)((0, jsx_runtime_1.jsx)(Button_1.Button, { contentType: enums_1.ContentType.text_with_icon, label: "Button", iconLeft: "left-icon", iconRight: "right-icon" }));
|
|
43
|
-
var buttonElement = react_1.screen.getByRole("button", { name: "Button" });
|
|
44
|
-
expect(buttonElement).toBeInTheDocument();
|
|
45
|
-
// Using test ID instead of role="img"
|
|
46
|
-
var icons = react_1.screen.getAllByTestId("lu-icon");
|
|
47
|
-
expect(icons.length).toBeGreaterThanOrEqual(2);
|
|
48
|
-
});
|
|
49
|
-
it("renders an outlined button", function () {
|
|
50
|
-
(0, react_1.render)((0, jsx_runtime_1.jsx)(Button_1.Button, { type: index_1.ButtonType.outline }));
|
|
51
|
-
var buttonElement = react_1.screen.getByRole("button", { name: "Button Text" });
|
|
52
|
-
expect(buttonElement).toHaveClass("outline-button");
|
|
53
|
-
});
|
|
54
|
-
});
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ButtonType = void 0;
|
|
4
|
-
var ButtonType;
|
|
5
|
-
(function (ButtonType) {
|
|
6
|
-
ButtonType["fill"] = "fill";
|
|
7
|
-
ButtonType["outline"] = "outline";
|
|
8
|
-
})(ButtonType || (exports.ButtonType = ButtonType = {}));
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BackgroundColor = void 0;
|
|
4
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
var BackgroundColor = function (_a) {
|
|
6
|
-
var label = _a.label, color = _a.color;
|
|
7
|
-
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h2", { className: "lu-font-size-large lu-font-weight-bold lu-mb-200", children: label }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-4", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-10 h-10 rounded ".concat(color), "data-testid": "color-box" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("p", { className: "lu-font-weight-semibold", children: color === null || color === void 0 ? void 0 : color.replace("bg-", "") }), (0, jsx_runtime_1.jsx)("code", { className: "lu-font-size-small", children: color })] })] })] }));
|
|
8
|
-
};
|
|
9
|
-
exports.BackgroundColor = BackgroundColor;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Meta } from "@storybook/react";
|
|
2
|
-
import { ColorProps } from "@/types/interface";
|
|
3
|
-
declare const _default: Meta;
|
|
4
|
-
export default _default;
|
|
5
|
-
export declare const Primary: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, ColorProps>;
|
|
6
|
-
export declare const Gray: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, ColorProps>;
|
|
7
|
-
export declare const Success: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, ColorProps>;
|
|
8
|
-
export declare const Warning: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, ColorProps>;
|
|
9
|
-
export declare const Danger: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, ColorProps>;
|
|
10
|
-
export declare const Info: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, ColorProps>;
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.Info = exports.Danger = exports.Warning = exports.Success = exports.Gray = exports.Primary = void 0;
|
|
15
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
|
-
var BackgroundColor_1 = require("../../../components/Color/BackgroundColor/BackgroundColor");
|
|
17
|
-
var index_1 = require("./index");
|
|
18
|
-
exports.default = {
|
|
19
|
-
title: "Components/Color/BackgroundColor",
|
|
20
|
-
component: BackgroundColor_1.BackgroundColor,
|
|
21
|
-
argTypes: {
|
|
22
|
-
label: { control: "text" },
|
|
23
|
-
},
|
|
24
|
-
};
|
|
25
|
-
var Template = function (args) { return (0, jsx_runtime_1.jsx)(BackgroundColor_1.BackgroundColor, __assign({}, args)); };
|
|
26
|
-
exports.Primary = Template.bind({});
|
|
27
|
-
exports.Primary.args = {
|
|
28
|
-
label: "Primary",
|
|
29
|
-
color: "lu-bg-primary-500", // Default color
|
|
30
|
-
};
|
|
31
|
-
exports.Primary.argTypes = {
|
|
32
|
-
color: {
|
|
33
|
-
control: { type: "select" },
|
|
34
|
-
options: Object.keys(index_1.customBackgroundColor)
|
|
35
|
-
.filter(function (key) { return key.startsWith(".lu-bg-primary-"); })
|
|
36
|
-
.map(function (key) { return key.slice(1); }),
|
|
37
|
-
},
|
|
38
|
-
};
|
|
39
|
-
exports.Gray = Template.bind({});
|
|
40
|
-
exports.Gray.argTypes = {
|
|
41
|
-
color: {
|
|
42
|
-
control: { type: "select" },
|
|
43
|
-
options: Object.keys(index_1.customBackgroundColor)
|
|
44
|
-
.filter(function (key) { return key.startsWith(".lu-bg-neutral-"); })
|
|
45
|
-
.map(function (key) { return key.slice(1); }),
|
|
46
|
-
},
|
|
47
|
-
};
|
|
48
|
-
exports.Gray.args = {
|
|
49
|
-
label: "Gray",
|
|
50
|
-
color: "lu-bg-neutral-500",
|
|
51
|
-
};
|
|
52
|
-
exports.Success = Template.bind({});
|
|
53
|
-
exports.Success.argTypes = {
|
|
54
|
-
color: {
|
|
55
|
-
control: { type: "select" },
|
|
56
|
-
options: Object.keys(index_1.customBackgroundColor)
|
|
57
|
-
.filter(function (key) { return key.startsWith(".lu-bg-success-"); })
|
|
58
|
-
.map(function (key) { return key.slice(1); }),
|
|
59
|
-
},
|
|
60
|
-
};
|
|
61
|
-
exports.Success.args = {
|
|
62
|
-
label: "Success",
|
|
63
|
-
color: "lu-bg-success-500",
|
|
64
|
-
};
|
|
65
|
-
exports.Warning = Template.bind({});
|
|
66
|
-
exports.Warning.argTypes = {
|
|
67
|
-
color: {
|
|
68
|
-
control: { type: "select" },
|
|
69
|
-
options: Object.keys(index_1.customBackgroundColor)
|
|
70
|
-
.filter(function (key) { return key.startsWith(".lu-bg-warning-"); })
|
|
71
|
-
.map(function (key) { return key.slice(1); }),
|
|
72
|
-
},
|
|
73
|
-
};
|
|
74
|
-
exports.Warning.args = {
|
|
75
|
-
label: "Warning",
|
|
76
|
-
color: "lu-bg-warning-500",
|
|
77
|
-
};
|
|
78
|
-
exports.Danger = Template.bind({});
|
|
79
|
-
exports.Danger.argTypes = {
|
|
80
|
-
color: {
|
|
81
|
-
control: { type: "select" },
|
|
82
|
-
options: Object.keys(index_1.customBackgroundColor)
|
|
83
|
-
.filter(function (key) { return key.startsWith(".lu-bg-danger-"); })
|
|
84
|
-
.map(function (key) { return key.slice(1); }),
|
|
85
|
-
},
|
|
86
|
-
};
|
|
87
|
-
exports.Danger.args = {
|
|
88
|
-
label: "Danger",
|
|
89
|
-
color: "lu-bg-danger-500",
|
|
90
|
-
};
|
|
91
|
-
exports.Info = Template.bind({});
|
|
92
|
-
exports.Info.argTypes = {
|
|
93
|
-
color: {
|
|
94
|
-
control: { type: "select" },
|
|
95
|
-
options: Object.keys(index_1.customBackgroundColor)
|
|
96
|
-
.filter(function (key) { return key.startsWith(".lu-bg-info-"); })
|
|
97
|
-
.map(function (key) { return key.slice(1); }),
|
|
98
|
-
},
|
|
99
|
-
};
|
|
100
|
-
exports.Info.args = {
|
|
101
|
-
label: "Info",
|
|
102
|
-
color: "lu-bg-info-500",
|
|
103
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
-
var react_1 = require("@testing-library/react");
|
|
5
|
-
var BackgroundColor_1 = require("./BackgroundColor");
|
|
6
|
-
describe("Color Component", function () {
|
|
7
|
-
it("renders the color component with a label", function () {
|
|
8
|
-
(0, react_1.render)((0, jsx_runtime_1.jsx)(BackgroundColor_1.BackgroundColor, { label: "Primary", color: "lu-bg-primary-500" }));
|
|
9
|
-
var labelElement = react_1.screen.getByText("Primary");
|
|
10
|
-
expect(labelElement).toBeInTheDocument();
|
|
11
|
-
});
|
|
12
|
-
it("applies the correct background color", function () {
|
|
13
|
-
(0, react_1.render)((0, jsx_runtime_1.jsx)(BackgroundColor_1.BackgroundColor, { label: "Success", color: "lu-bg-success-500" }));
|
|
14
|
-
var colorBox = react_1.screen.getByTestId("color-box");
|
|
15
|
-
expect(colorBox).toHaveClass("lu-bg-success-500");
|
|
16
|
-
});
|
|
17
|
-
});
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.customBackgroundColor = exports.shades = exports.colorNames = void 0;
|
|
4
|
-
exports.colorNames = [
|
|
5
|
-
"primary",
|
|
6
|
-
"neutral",
|
|
7
|
-
"success",
|
|
8
|
-
"warning",
|
|
9
|
-
"danger",
|
|
10
|
-
"info",
|
|
11
|
-
];
|
|
12
|
-
exports.shades = Array.from({ length: 11 }, function (_, i) { return i * 100; }); // Generates [0, 100, 200, ..., 1000]
|
|
13
|
-
exports.customBackgroundColor = Object.fromEntries(exports.colorNames.flatMap(function (color) {
|
|
14
|
-
return exports.shades.map(function (shade) { return [
|
|
15
|
-
".lu-bg-".concat(color, "-").concat(shade),
|
|
16
|
-
{ backgroundColor: "var(--".concat(color, "-").concat(shade, ")") }, // Generates { ".lu-bg-primary-100": { backgroundColor: "var(--primary-100)" }, ... }
|
|
17
|
-
]; });
|
|
18
|
-
}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "@testing-library/jest-dom";
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
-
var react_1 = require("@testing-library/react");
|
|
5
|
-
require("@testing-library/jest-dom");
|
|
6
|
-
var BackgroundColor_1 = require("./BackgroundColor/BackgroundColor"); // Import the actual component
|
|
7
|
-
describe("Color Component Stories", function () {
|
|
8
|
-
it("renders the Primary color story correctly", function () {
|
|
9
|
-
(0, react_1.render)((0, jsx_runtime_1.jsx)(BackgroundColor_1.BackgroundColor, { label: "Primary", color: "lu-bg-primary-500" }));
|
|
10
|
-
var colorBox = react_1.screen.getByTestId("color-box");
|
|
11
|
-
expect(colorBox).toHaveClass("lu-bg-primary-500");
|
|
12
|
-
});
|
|
13
|
-
it("renders the Gray color story correctly", function () {
|
|
14
|
-
(0, react_1.render)((0, jsx_runtime_1.jsx)(BackgroundColor_1.BackgroundColor, { label: "Gray", color: "lu-bg-neutral-500" }));
|
|
15
|
-
var colorBox = react_1.screen.getByTestId("color-box");
|
|
16
|
-
expect(colorBox).toHaveClass("lu-bg-neutral-500");
|
|
17
|
-
});
|
|
18
|
-
it("renders the Success color story correctly", function () {
|
|
19
|
-
(0, react_1.render)((0, jsx_runtime_1.jsx)(BackgroundColor_1.BackgroundColor, { label: "Success", color: "lu-bg-success-500" }));
|
|
20
|
-
var colorBox = react_1.screen.getByTestId("color-box");
|
|
21
|
-
expect(colorBox).toHaveClass("lu-bg-success-500");
|
|
22
|
-
});
|
|
23
|
-
it("renders the Warning color story correctly", function () {
|
|
24
|
-
(0, react_1.render)((0, jsx_runtime_1.jsx)(BackgroundColor_1.BackgroundColor, { label: "Warning", color: "lu-bg-warning-500" }));
|
|
25
|
-
var colorBox = react_1.screen.getByTestId("color-box");
|
|
26
|
-
expect(colorBox).toHaveClass("lu-bg-warning-500");
|
|
27
|
-
});
|
|
28
|
-
it("renders the Danger color story correctly", function () {
|
|
29
|
-
(0, react_1.render)((0, jsx_runtime_1.jsx)(BackgroundColor_1.BackgroundColor, { label: "Danger", color: "lu-bg-danger-500" }));
|
|
30
|
-
var colorBox = react_1.screen.getByTestId("color-box");
|
|
31
|
-
expect(colorBox).toHaveClass("lu-bg-danger-500");
|
|
32
|
-
});
|
|
33
|
-
it("renders the Info color story correctly", function () {
|
|
34
|
-
(0, react_1.render)((0, jsx_runtime_1.jsx)(BackgroundColor_1.BackgroundColor, { label: "Info", color: "lu-bg-info-500" }));
|
|
35
|
-
var colorBox = react_1.screen.getByTestId("color-box");
|
|
36
|
-
expect(colorBox).toHaveClass("lu-bg-info-500");
|
|
37
|
-
});
|
|
38
|
-
});
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TextColor = void 0;
|
|
4
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
var TextColor = function (_a) {
|
|
6
|
-
var _b = _a.color, color = _b === void 0 ? "lu-text-default" : _b;
|
|
7
|
-
return (0, jsx_runtime_1.jsxs)("div", { className: "".concat(color), children: [".", color] });
|
|
8
|
-
};
|
|
9
|
-
exports.TextColor = TextColor;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports._TextColor = void 0;
|
|
15
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
|
-
var utils_1 = require("../../../utils");
|
|
17
|
-
var TextColor_1 = require("./TextColor");
|
|
18
|
-
exports.default = {
|
|
19
|
-
title: "Components/Color",
|
|
20
|
-
component: TextColor_1.TextColor,
|
|
21
|
-
};
|
|
22
|
-
var Template = function (args) { return (0, jsx_runtime_1.jsx)(TextColor_1.TextColor, __assign({}, args)); };
|
|
23
|
-
exports._TextColor = Template.bind({});
|
|
24
|
-
exports._TextColor.args = {
|
|
25
|
-
color: "lu-text-default", // Default color
|
|
26
|
-
};
|
|
27
|
-
exports._TextColor.argTypes = {
|
|
28
|
-
color: {
|
|
29
|
-
control: {
|
|
30
|
-
type: "select",
|
|
31
|
-
labels: Object.fromEntries(utils_1.textColorList.map(function (color) { return [color.key, color.label]; })),
|
|
32
|
-
},
|
|
33
|
-
options: utils_1.textColorList.map(function (color) { return color.key; }),
|
|
34
|
-
},
|
|
35
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "@testing-library/jest-dom";
|