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
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
+
import { buttonColors, buttonShapes, iconButtonSize } from ".";
|
|
25
|
+
import LUIcon from "../Icons/LUIcon";
|
|
26
|
+
var IconButton = function (_a) {
|
|
27
|
+
var _b = _a.color, color = _b === void 0 ? "primary" : _b, onClick = _a.onClick, _c = _a.shape, shape = _c === void 0 ? "rounded-none" : _c, _d = _a.size, size = _d === void 0 ? "sm" : _d, className = _a.className, _e = _a.icon, icon = _e === void 0 ? _jsx(LUIcon, { icon: "chart-simple", size: "xs" }) : _e, props = __rest(_a, ["color", "onClick", "shape", "size", "className", "icon"]);
|
|
28
|
+
return (_jsx("button", __assign({ className: "flex items-center ".concat(buttonShapes[shape], " ").concat(buttonColors[color], " ").concat(className, " ").concat(iconButtonSize[size]), onClick: onClick }, props, { children: icon && icon })));
|
|
29
|
+
};
|
|
30
|
+
export default IconButton;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { buttonColors, buttonShapes, iconButtonSize } from ".";
|
|
14
|
+
import LUIcon from "../Icons/LUIcon";
|
|
15
|
+
import IconButton from "./IconButton";
|
|
16
|
+
export default {
|
|
17
|
+
title: "Components/Button/IconButton",
|
|
18
|
+
component: IconButton,
|
|
19
|
+
tags: ["autodocs"],
|
|
20
|
+
};
|
|
21
|
+
var Template = function (args) { return (_jsx(IconButton, __assign({ icon: _jsx(LUIcon, { icon: "chart-simple", size: "xs" }) }, args))); };
|
|
22
|
+
export var _IconButton = Template.bind({});
|
|
23
|
+
_IconButton.args = {
|
|
24
|
+
icon: _jsx(LUIcon, { icon: "chart-simple", size: "xs" }),
|
|
25
|
+
};
|
|
26
|
+
_IconButton.argTypes = {
|
|
27
|
+
color: {
|
|
28
|
+
control: {
|
|
29
|
+
type: "select",
|
|
30
|
+
labels: Object.keys(buttonColors),
|
|
31
|
+
},
|
|
32
|
+
options: Object.keys(buttonColors),
|
|
33
|
+
},
|
|
34
|
+
shape: {
|
|
35
|
+
control: {
|
|
36
|
+
type: "select",
|
|
37
|
+
labels: Object.keys(buttonShapes),
|
|
38
|
+
},
|
|
39
|
+
options: Object.keys(buttonShapes),
|
|
40
|
+
},
|
|
41
|
+
size: {
|
|
42
|
+
control: {
|
|
43
|
+
type: "select",
|
|
44
|
+
labels: Object.keys(iconButtonSize),
|
|
45
|
+
},
|
|
46
|
+
options: Object.keys(iconButtonSize),
|
|
47
|
+
description: "Select the size of the button",
|
|
48
|
+
},
|
|
49
|
+
icon: {
|
|
50
|
+
control: false,
|
|
51
|
+
description: "Icon (React component)",
|
|
52
|
+
},
|
|
53
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { fireEvent, render, screen } from "@testing-library/react";
|
|
3
|
+
import { buttonColors, buttonShapes, iconButtonSize } from ".";
|
|
4
|
+
import LUIcon from "../Icons/LUIcon";
|
|
5
|
+
import IconButton from "./IconButton";
|
|
6
|
+
describe("Icon Button Component", function () {
|
|
7
|
+
it("renders icon button with required icon prop", function () {
|
|
8
|
+
render(_jsx(IconButton, { icon: _jsx(LUIcon, { icon: "chart-simple", size: "xs" }) }));
|
|
9
|
+
expect(screen.getByRole("button")).toBeInTheDocument();
|
|
10
|
+
});
|
|
11
|
+
it("calls onClick handler when clicked", function () {
|
|
12
|
+
var handleClick = jest.fn();
|
|
13
|
+
render(_jsx(IconButton, { onClick: handleClick, icon: _jsx(LUIcon, { icon: "chart-simple", size: "xs" }) }));
|
|
14
|
+
fireEvent.click(screen.getByRole("button"));
|
|
15
|
+
expect(handleClick).toHaveBeenCalledTimes(1);
|
|
16
|
+
});
|
|
17
|
+
it("applies correct color, shape, and size classes", function () {
|
|
18
|
+
render(_jsx(IconButton, { color: "primary", shape: "rounded-lg", size: "lg", icon: _jsx(LUIcon, { icon: "chart-simple", size: "xs" }) }));
|
|
19
|
+
var buttonElement = screen.getByRole("button");
|
|
20
|
+
expect(buttonElement).toHaveClass(buttonColors["primary"], buttonShapes["rounded-lg"], iconButtonSize["lg"]);
|
|
21
|
+
});
|
|
22
|
+
it("applies additional className when provided", function () {
|
|
23
|
+
render(_jsx(IconButton, { className: "custom-class", icon: _jsx(LUIcon, { icon: "chart-simple", size: "xs" }) }));
|
|
24
|
+
expect(screen.getByRole("button")).toHaveClass("custom-class");
|
|
25
|
+
});
|
|
26
|
+
it("renders without crashing when all required props are provided", function () {
|
|
27
|
+
render(_jsx(IconButton, { icon: _jsx(LUIcon, { icon: "chart-simple", size: "xs" }) }));
|
|
28
|
+
expect(screen.getByRole("button")).toBeInTheDocument();
|
|
29
|
+
});
|
|
30
|
+
});
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export declare const buttonColors: {
|
|
2
|
+
primary: string;
|
|
3
|
+
"primary-light": string;
|
|
4
|
+
success: string;
|
|
5
|
+
warning: string;
|
|
6
|
+
danger: string;
|
|
7
|
+
info: string;
|
|
8
|
+
gray: string;
|
|
9
|
+
"primary-outline": string;
|
|
10
|
+
"success-outline": string;
|
|
11
|
+
"warning-outline": string;
|
|
12
|
+
"danger-outline": string;
|
|
13
|
+
"info-outline": string;
|
|
14
|
+
"gray-outline": string;
|
|
15
|
+
};
|
|
16
|
+
export declare const buttonShapes: {
|
|
17
|
+
"rounded-none": string;
|
|
18
|
+
"rounded-xs": string;
|
|
19
|
+
"rounded-sm": string;
|
|
20
|
+
"rounded-md": string;
|
|
21
|
+
"rounded-lg": string;
|
|
22
|
+
"rounded-xl": string;
|
|
23
|
+
"rounded-2xl": string;
|
|
24
|
+
"rounded-3xl": string;
|
|
25
|
+
"rounded-full": string;
|
|
26
|
+
};
|
|
27
|
+
export declare const buttonSizes: {
|
|
28
|
+
sm: string;
|
|
29
|
+
md: string;
|
|
30
|
+
lg: string;
|
|
31
|
+
xl: string;
|
|
32
|
+
};
|
|
33
|
+
export declare const iconButtonSize: {
|
|
34
|
+
xs: string;
|
|
35
|
+
sm: string;
|
|
36
|
+
md: string;
|
|
37
|
+
lg: string;
|
|
38
|
+
xl: string;
|
|
39
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export var buttonColors = {
|
|
2
|
+
primary: "text-primary-0 bg-primary-600 hover:bg-primary-700 focus:bg-primary-600 active:bg-primary-800",
|
|
3
|
+
"primary-light": "text-primary-600 bg-primary-100 hover:bg-primary-600 hover:text-primary-100",
|
|
4
|
+
success: "text-success-0 bg-success-600 hover:bg-success-700 focus:bg-success-600 active:bg-success-800",
|
|
5
|
+
warning: "text-warning-1000 bg-warning-500 hover:bg-warning-600 focus:bg-warning-500 active:bg-warning-700",
|
|
6
|
+
danger: "text-danger-0 bg-danger-600 hover:bg-danger-700 focus:bg-danger-600 active:bg-danger-800",
|
|
7
|
+
info: "text-info-0 bg-info-600 hover:bg-info-700 focus:bg-info-600 active:bg-info-800",
|
|
8
|
+
gray: "text-neutral-1000 bg-neutral-0 hover:bg-neutral-100 focus:bg-neutral-0 active:bg-neutral-300",
|
|
9
|
+
"primary-outline": "text-primary-600 border-2 border-primary-600 bg-white hover:border-primary-700 hover:text-primary-700 focus:border-primary-600 focus:text-primary-600 active:border-primary-800 active:text-primary-800",
|
|
10
|
+
"success-outline": "text-success-600 border-2 border-success-600 bg-white hover:border-success-700 hover:text-success-700 focus:border-success-600 focus:text-success-600 active:border-success-800 active:text-success-800",
|
|
11
|
+
"warning-outline": "text-warning-500 border-2 border-warning-500 hover:border-warning-600 hover:text-warning-600 focus:border-warning-500 focus:text-warning-500 active:border-warning-700 active:text-warning-700",
|
|
12
|
+
"danger-outline": "text-danger-600 border-2 border-danger-600 bg-white hover:border-danger-700 hover:text-danger-700 focus:border-danger-600 focus:text-danger-600 active:border-danger-800 active:text-danger-800",
|
|
13
|
+
"info-outline": "text-info-600 border-2 border-info-600 bg-white hover:border-info-700 hover:text-info-700 focus:border-info-600 focus:text-info-600 active:border-info-800 active:text-info-800",
|
|
14
|
+
"gray-outline": "text-neutral-0 border-2 border-neutral-0 bg-white hover:border-neutral-100 hover:text-neutral-100 focus:border-neutral-0 focus:text-neutral-0 active:border-neutral-300 active:text-neutral-300",
|
|
15
|
+
};
|
|
16
|
+
export var buttonShapes = {
|
|
17
|
+
"rounded-none": "rounded-none",
|
|
18
|
+
"rounded-xs": "rounded-sm",
|
|
19
|
+
"rounded-sm": "rounded",
|
|
20
|
+
"rounded-md": "rounded-md",
|
|
21
|
+
"rounded-lg": "rounded-lg",
|
|
22
|
+
"rounded-xl": "rounded-xl",
|
|
23
|
+
"rounded-2xl": "rounded-2xl",
|
|
24
|
+
"rounded-3xl": "rounded-3xl",
|
|
25
|
+
"rounded-full": "!rounded-full",
|
|
26
|
+
};
|
|
27
|
+
export var buttonSizes = {
|
|
28
|
+
sm: "py-2 px-3 text-base font-normal",
|
|
29
|
+
md: "py-2 px-4 text-base font-normal",
|
|
30
|
+
lg: "py-3 px-5 text-lg font-normal",
|
|
31
|
+
xl: "py-4 px-6 text-xl font-normal",
|
|
32
|
+
};
|
|
33
|
+
export var iconButtonSize = {
|
|
34
|
+
xs: "!p-1",
|
|
35
|
+
sm: "p-2",
|
|
36
|
+
md: "p-2",
|
|
37
|
+
lg: "!p-3",
|
|
38
|
+
xl: "p-5",
|
|
39
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { buttonShapes, buttonSizes, buttonColors, iconButtonSize } from ".";
|
|
3
|
+
type colors = keyof typeof buttonColors;
|
|
4
|
+
type buttonShapes = keyof typeof buttonShapes;
|
|
5
|
+
type buttonSizes = keyof typeof buttonSizes;
|
|
6
|
+
type iconButtonSize = keyof typeof iconButtonSize;
|
|
7
|
+
export interface ButtonProps extends React.HTMLAttributes<HTMLButtonElement> {
|
|
8
|
+
color?: colors;
|
|
9
|
+
onClick?: () => void;
|
|
10
|
+
size?: buttonSizes;
|
|
11
|
+
startIcon?: React.ReactNode;
|
|
12
|
+
endIcon?: React.ReactNode;
|
|
13
|
+
shape?: buttonShapes;
|
|
14
|
+
className?: string;
|
|
15
|
+
children: React.ReactNode;
|
|
16
|
+
}
|
|
17
|
+
export interface IconButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
18
|
+
color?: colors;
|
|
19
|
+
size?: iconButtonSize;
|
|
20
|
+
shape?: buttonShapes;
|
|
21
|
+
icon: React.ReactNode;
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { Input } from "../ui/input";
|
|
4
|
+
var ColorPicker = function (_a) {
|
|
5
|
+
var onChange = _a.onChange, _b = _a.value, value = _b === void 0 ? "#000000" : _b;
|
|
6
|
+
var _c = useState(value), hexColor = _c[0], setHexColor = _c[1];
|
|
7
|
+
// Handle input changes (color picker or text field)
|
|
8
|
+
var handleColorChange = function (newColor) {
|
|
9
|
+
setHexColor(newColor);
|
|
10
|
+
onChange(newColor);
|
|
11
|
+
};
|
|
12
|
+
// Handle hex input change
|
|
13
|
+
var handleHexChange = function (e) {
|
|
14
|
+
var inputValue = e.target.value;
|
|
15
|
+
// Ensure it starts with #
|
|
16
|
+
var formattedValue = inputValue.startsWith("#")
|
|
17
|
+
? inputValue
|
|
18
|
+
: "#".concat(inputValue);
|
|
19
|
+
handleColorChange(formattedValue);
|
|
20
|
+
};
|
|
21
|
+
// Handle color input change (from native color picker)
|
|
22
|
+
var handleColorInputChange = function (e) {
|
|
23
|
+
handleColorChange(e.target.value);
|
|
24
|
+
};
|
|
25
|
+
return (_jsx(_Fragment, { children: _jsxs("div", { className: "flex", children: [_jsxs("div", { className: "relative", children: [_jsx("div", { className: "size-9 shrink-0 rounded-l-sm", style: { backgroundColor: hexColor } }), _jsx(Input, { type: "color", value: hexColor, onChange: handleColorInputChange, className: "absolute inset-0 opacity-0 cursor-pointer rounded-r-sm", "aria-label": "Select color" })] }), _jsx(Input, { id: "color-picker", type: "text", value: hexColor, onChange: handleHexChange, className: "rounded-r-sm border min-w-25" })] }) }));
|
|
26
|
+
};
|
|
27
|
+
export default ColorPicker;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Meta } from "@storybook/react";
|
|
2
|
+
import { ColorPickerInterface } from "./type";
|
|
3
|
+
declare const _default: Meta;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const _ColorPicker: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, ColorPickerInterface>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import ColorPicker from "./ColorPicker";
|
|
14
|
+
export default {
|
|
15
|
+
title: "Components/ColorPicker",
|
|
16
|
+
component: ColorPicker,
|
|
17
|
+
tags: ["autodocs"],
|
|
18
|
+
};
|
|
19
|
+
var Template = function (args) { return (_jsx(ColorPicker, __assign({}, args))); };
|
|
20
|
+
export var _ColorPicker = Template.bind({});
|
|
21
|
+
_ColorPicker.args = {
|
|
22
|
+
value: "#000000", // Default color
|
|
23
|
+
onChange: function () { },
|
|
24
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { colors } from "../../utils/colors";
|
|
3
|
+
export var Color = function (_a) {
|
|
4
|
+
var _b = _a.color, color = _b === void 0 ? "black" : _b;
|
|
5
|
+
return _jsx("div", { style: { color: colors[color] || colors.black }, children: color });
|
|
6
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Meta } from "@storybook/react";
|
|
2
|
+
import { colors } from "../../utils/colors";
|
|
3
|
+
declare const _default: Meta;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const _Color: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, {
|
|
6
|
+
color: keyof typeof colors;
|
|
7
|
+
}>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { colors } from "../../utils/colors";
|
|
14
|
+
import { Color } from "./color";
|
|
15
|
+
export default {
|
|
16
|
+
title: "Components/Color",
|
|
17
|
+
component: Color,
|
|
18
|
+
};
|
|
19
|
+
var Template = function (args) { return (_jsx(Color, __assign({}, args))); };
|
|
20
|
+
export var _Color = Template.bind({});
|
|
21
|
+
_Color.args = {
|
|
22
|
+
color: "black", // Default color
|
|
23
|
+
};
|
|
24
|
+
_Color.argTypes = {
|
|
25
|
+
color: {
|
|
26
|
+
control: {
|
|
27
|
+
type: "select",
|
|
28
|
+
labels: Object.keys(colors),
|
|
29
|
+
},
|
|
30
|
+
options: Object.keys(colors),
|
|
31
|
+
},
|
|
32
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { render, screen } from "@testing-library/react";
|
|
3
|
+
import { colors } from "../../utils/colors";
|
|
4
|
+
import { Color } from "./color";
|
|
5
|
+
describe("TextColor Component", function () {
|
|
6
|
+
it("renders with default color (black)", function () {
|
|
7
|
+
render(_jsx(Color, {}));
|
|
8
|
+
var textElement = screen.getByText("black");
|
|
9
|
+
expect(textElement).toBeInTheDocument();
|
|
10
|
+
expect(textElement).toHaveStyle({ color: colors.black });
|
|
11
|
+
});
|
|
12
|
+
it("renders with a specified color", function () {
|
|
13
|
+
render(_jsx(Color, { color: "primary-500" }));
|
|
14
|
+
var textElement = screen.getByText("primary-500");
|
|
15
|
+
expect(textElement).toBeInTheDocument();
|
|
16
|
+
expect(textElement).toHaveStyle({ color: colors["primary-500"] });
|
|
17
|
+
});
|
|
18
|
+
it("handles invalid color gracefully", function () {
|
|
19
|
+
render(_jsx(Color, { color: "invalid-color" }));
|
|
20
|
+
var textElement = screen.getByText("invalid-color");
|
|
21
|
+
expect(textElement).toBeInTheDocument();
|
|
22
|
+
expect(textElement).toHaveStyle({ color: colors.black }); // It should default to black
|
|
23
|
+
});
|
|
24
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from "../ui/tooltip";
|
|
3
|
+
import IconButton from "../Button/IconButton";
|
|
4
|
+
import LUIcon from "../Icons/LUIcon";
|
|
5
|
+
var EditorTooltip = function (_a) {
|
|
6
|
+
var title = _a.title, className = _a.className;
|
|
7
|
+
return (_jsx(TooltipProvider, { children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { className: className, children: _jsx(IconButton, { icon: _jsx(LUIcon, { icon: "question", size: "xs" }), size: "xs", shape: "rounded-full", color: "primary-light" }) }), _jsx(TooltipContent, { children: _jsx("div", { className: "text-base w-48 text-center font-medium", children: title }) })] }) }));
|
|
8
|
+
};
|
|
9
|
+
export default EditorTooltip;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import EditorTooltip from "./EditorTooltip";
|
|
14
|
+
import { Dummy_Para } from "../../utils/constants";
|
|
15
|
+
export default {
|
|
16
|
+
title: "Components/EditorTooltip",
|
|
17
|
+
component: EditorTooltip,
|
|
18
|
+
tags: ["autodocs"],
|
|
19
|
+
};
|
|
20
|
+
var Template = function (args) { return (_jsx(EditorTooltip, __assign({}, args))); };
|
|
21
|
+
export var _EditorTooltip = Template.bind({});
|
|
22
|
+
_EditorTooltip.args = {
|
|
23
|
+
title: Dummy_Para,
|
|
24
|
+
};
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var IconView_1 = require("./IconView");
|
|
6
|
-
var iconList_1 = require("../../utils/iconList");
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { render, screen } from "@testing-library/react";
|
|
3
|
+
import { IconView } from "./IconView";
|
|
4
|
+
import { iconList } from "../../utils/iconList";
|
|
7
5
|
// Mocking iconList for the tests
|
|
8
6
|
jest.mock("../../utils/iconList", function () { return ({
|
|
9
7
|
iconList: [
|
|
@@ -14,43 +12,43 @@ jest.mock("../../utils/iconList", function () { return ({
|
|
|
14
12
|
describe("IconView Component", function () {
|
|
15
13
|
// Test: Check if the correct number of icons are rendered
|
|
16
14
|
it("should render the correct number of icons", function () {
|
|
17
|
-
|
|
18
|
-
var iconContainers =
|
|
19
|
-
expect(iconContainers).toHaveLength(
|
|
15
|
+
render(_jsx(IconView, {}));
|
|
16
|
+
var iconContainers = screen.getAllByTestId("single-icon");
|
|
17
|
+
expect(iconContainers).toHaveLength(iconList.length); // Should match the length of iconList
|
|
20
18
|
});
|
|
21
19
|
// Test: Ensure each icon has a path with correct `d` attribute
|
|
22
20
|
it("should render each icon with the correct path", function () {
|
|
23
|
-
|
|
21
|
+
render(_jsx(IconView, {}));
|
|
24
22
|
// Ensure the correct number of icon containers are rendered
|
|
25
|
-
var iconContainers =
|
|
23
|
+
var iconContainers = screen.getAllByTestId("single-icon");
|
|
26
24
|
iconContainers.forEach(function (_, index) {
|
|
27
25
|
// const svgElement = screen.getByTestId(`single-icon-svg-${index}`);
|
|
28
|
-
var pathElement =
|
|
26
|
+
var pathElement = screen.getByTestId("icon-path-".concat(index));
|
|
29
27
|
// Find the corresponding icon object
|
|
30
|
-
var icon =
|
|
28
|
+
var icon = iconList[index];
|
|
31
29
|
// Check that the path matches the icon's path
|
|
32
30
|
expect(pathElement).toHaveAttribute("d", icon.path);
|
|
33
31
|
});
|
|
34
32
|
});
|
|
35
33
|
// Test: Ensure each icon has the correct label
|
|
36
34
|
it("should render each icon with the correct label", function () {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
var labelElement =
|
|
35
|
+
render(_jsx(IconView, {}));
|
|
36
|
+
iconList.forEach(function (icon, index) {
|
|
37
|
+
var labelElement = screen.getByTestId("icon-label-".concat(index));
|
|
40
38
|
expect(labelElement).toHaveTextContent(icon.label); // Check label text content
|
|
41
39
|
});
|
|
42
40
|
});
|
|
43
41
|
// Test: Ensure the grid structure is correct
|
|
44
42
|
it("should render icons inside a grid structure", function () {
|
|
45
|
-
|
|
46
|
-
var gridContainer =
|
|
43
|
+
render(_jsx(IconView, {}));
|
|
44
|
+
var gridContainer = screen.getByTestId("icons-list");
|
|
47
45
|
expect(gridContainer).toBeInTheDocument();
|
|
48
46
|
expect(gridContainer).toHaveClass("grid");
|
|
49
47
|
});
|
|
50
48
|
// Test: Check hover behavior for icons (optional)
|
|
51
49
|
it("should change background color on hover", function () {
|
|
52
|
-
|
|
53
|
-
var iconContainers =
|
|
50
|
+
render(_jsx(IconView, {}));
|
|
51
|
+
var iconContainers = screen.getAllByTestId("single-icon");
|
|
54
52
|
var icon = iconContainers[0];
|
|
55
53
|
// Simulate hover effect by adding the class for hover
|
|
56
54
|
icon.classList.add("hover:bg-gray-200");
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { colors } from "../../utils/colors";
|
|
3
|
+
import { iconList } from "../../utils/iconList";
|
|
4
|
+
export var IconView = function () {
|
|
5
|
+
return (_jsx(_Fragment, { children: _jsx("div", { className: "grid grid-cols-3 sm:grid-cols-4 md:grid-cols-6 lg:grid-cols-6 gap-6", "data-testid": "icons-list", children: iconList.map(function (icon, index) {
|
|
6
|
+
return (_jsxs("div", { className: "flex flex-col items-center justify-center bg-neutral-100 rounded-lg p-4 shadow-md hover:bg-neutral-200", "data-testid": "single-icon", children: [_jsxs("svg", { width: "25", height: "25", viewBox: "0 0 32 32", fill: "none", className: "mb-2", role: "img", children: [_jsx("g", { clipPath: "url(#clip0_9168_14965)", children: _jsx("path", { "data-testid": "icon-path-".concat(index), d: icon === null || icon === void 0 ? void 0 : icon.path, fill: colors["neutral-1000"] }) }), _jsx("defs", { children: _jsx("clipPath", { id: "clip0_9168_14965", children: _jsx("rect", { width: "32", height: "32", fill: "black" }) }) })] }), _jsx("p", { "data-testid": "icon-label-".concat(index), className: "text-xs font-normal ".concat(colors["neutral-600"], " text-center"), children: icon === null || icon === void 0 ? void 0 : icon.label })] }, index));
|
|
7
|
+
}) }) }));
|
|
8
|
+
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __assign = (this && this.__assign) || function () {
|
|
3
2
|
__assign = Object.assign || function(t) {
|
|
4
3
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -10,14 +9,12 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
9
|
};
|
|
11
10
|
return __assign.apply(this, arguments);
|
|
12
11
|
};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
var IconView_1 = require("./IconView");
|
|
17
|
-
exports.default = {
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { IconView } from "./IconView";
|
|
14
|
+
export default {
|
|
18
15
|
title: "Components/Icon",
|
|
19
|
-
component:
|
|
16
|
+
component: IconView,
|
|
20
17
|
tags: ["!autodocs"],
|
|
21
18
|
};
|
|
22
|
-
var Template = function (args) { return (
|
|
23
|
-
|
|
19
|
+
var Template = function (args) { return _jsx(IconView, __assign({}, args)); };
|
|
20
|
+
export var _IconView = Template.bind({});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
24
|
+
import { iconList } from "../../utils/iconList";
|
|
25
|
+
import { iconSize } from ".";
|
|
26
|
+
var LUIcon = function (_a) {
|
|
27
|
+
var _b;
|
|
28
|
+
var _c = _a.size, size = _c === void 0 ? "md" : _c, icon = _a.icon, className = _a.className, props = __rest(_a, ["size", "icon", "className"]);
|
|
29
|
+
var selectedIcon = iconList.find(function (item) { return item.key === icon; });
|
|
30
|
+
return (_jsx(_Fragment, { children: _jsxs("svg", __assign({ role: "img", "data-testid": "lu-icon", className: "".concat(iconSize[size], " ").concat(className), viewBox: "0 0 32 32", fill: "currentColor" }, props, { children: [_jsx("g", { clipPath: "url(#clip0_9168_14965)", children: _jsx("path", { "data-testid": "lu-path", d: (_b = selectedIcon === null || selectedIcon === void 0 ? void 0 : selectedIcon.path) !== null && _b !== void 0 ? _b : "", className: "icon" }) }), _jsx("defs", { children: _jsx("clipPath", { id: "clip0_9168_14965", children: _jsx("rect", { width: "32", height: "32", fill: "black" }) }) })] })) }));
|
|
31
|
+
};
|
|
32
|
+
export default LUIcon;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { iconList } from "../../utils/iconList";
|
|
14
|
+
import LUIcon from "./LUIcon";
|
|
15
|
+
import { iconSize } from ".";
|
|
16
|
+
export default {
|
|
17
|
+
title: "Components/Icon",
|
|
18
|
+
component: LUIcon,
|
|
19
|
+
tags: ["autodocs"],
|
|
20
|
+
};
|
|
21
|
+
var Template = function (args) { return (_jsx(LUIcon, __assign({ size: "xxs", className: "text-primary-500" }, args))); };
|
|
22
|
+
export var Icon = Template.bind({});
|
|
23
|
+
Icon.args = {
|
|
24
|
+
size: "xxs",
|
|
25
|
+
icon: iconList[0].key,
|
|
26
|
+
};
|
|
27
|
+
Icon.argTypes = {
|
|
28
|
+
size: {
|
|
29
|
+
control: {
|
|
30
|
+
type: "select",
|
|
31
|
+
labels: Object.keys(iconSize),
|
|
32
|
+
},
|
|
33
|
+
options: Object.keys(iconSize),
|
|
34
|
+
defaultValue: "xxs",
|
|
35
|
+
},
|
|
36
|
+
icon: {
|
|
37
|
+
control: {
|
|
38
|
+
type: "select",
|
|
39
|
+
labels: Object.fromEntries(iconList.map(function (icon) { return [icon.key, icon.label]; })),
|
|
40
|
+
},
|
|
41
|
+
options: iconList.map(function (icon) { return icon.key; }),
|
|
42
|
+
defaultValue: iconList[0].key,
|
|
43
|
+
},
|
|
44
|
+
};
|