linkedunion-design-kit 1.5.2 → 1.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/layout.d.ts +1 -1
- package/dist/app/layout.js +7 -11
- package/dist/app/layout.jsx +13 -0
- package/dist/app/page.js +4 -10
- package/dist/app/page.jsx +71 -0
- package/dist/build/types/app/layout.d.ts +12 -0
- package/dist/build/types/app/layout.js +22 -0
- package/dist/build/types/app/page.d.ts +12 -0
- package/dist/build/types/app/page.js +22 -0
- package/dist/index.d.ts +13 -12
- package/dist/index.js +13 -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/src/components/Accordion/Accordion.d.ts +5 -0
- package/dist/src/components/Accordion/Accordion.js +7 -0
- 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/src/components/Accordion/EditorAccordion.d.ts +5 -0
- package/dist/src/components/Accordion/EditorAccordion.js +7 -0
- package/dist/src/components/Accordion/EditorAccordion.stories.d.ts +6 -0
- package/dist/src/components/Accordion/EditorAccordion.stories.js +33 -0
- package/dist/src/components/Accordion/type.d.ts +5 -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.jsx +17 -0
- package/dist/src/components/Avatar/Avatar.stories.js +43 -0
- package/dist/src/components/Avatar/Avatar.stories.jsx +31 -0
- package/dist/src/components/Avatar/Avatar.test.js +50 -0
- package/dist/src/components/Avatar/Avatar.test.jsx +51 -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/src/components/Button/Button.jsx +10 -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.stories.jsx +44 -0
- package/dist/src/components/Button/Button.test.js +62 -0
- package/dist/src/components/Button/Button.test.jsx +65 -0
- package/dist/src/components/Button/IconButton.d.ts +3 -0
- package/dist/src/components/Button/IconButton.js +8 -0
- package/dist/src/components/Button/IconButton.jsx +9 -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.stories.jsx +41 -0
- package/dist/src/components/Button/IconButton.test.js +30 -0
- package/dist/src/components/Button/IconButton.test.jsx +29 -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 +25 -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.jsx +34 -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/ColorPicker.stories.jsx +12 -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.jsx +5 -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.stories.jsx +20 -0
- package/dist/src/components/Colors/color.test.js +24 -0
- package/dist/src/components/Colors/color.test.jsx +23 -0
- package/dist/src/components/EditorTooltip/EditorTooltip.d.ts +4 -0
- package/dist/src/components/EditorTooltip/EditorTooltip.js +9 -0
- package/dist/src/components/EditorTooltip/EditorTooltip.jsx +18 -0
- package/dist/src/components/EditorTooltip/EditorTooltip.stories.d.ts +6 -0
- package/dist/src/components/EditorTooltip/EditorTooltip.stories.js +24 -0
- package/dist/src/components/EditorTooltip/EditorTooltip.stories.jsx +12 -0
- package/dist/src/components/EditorTooltip/type.d.ts +3 -0
- package/dist/{components → src/components}/Icons/IconList.test.js +18 -20
- package/dist/src/components/Icons/IconList.test.jsx +57 -0
- package/dist/src/components/Icons/IconView.js +8 -0
- package/dist/src/components/Icons/IconView.jsx +25 -0
- package/dist/{components → src/components}/Icons/IconView.stories.js +6 -9
- package/dist/src/components/Icons/IconView.stories.jsx +8 -0
- 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.jsx +31 -0
- package/dist/src/components/Icons/LUIcon.stories.js +44 -0
- package/dist/src/components/Icons/LUIcon.stories.jsx +32 -0
- package/dist/src/components/Icons/SingleIcon.test.js +67 -0
- package/dist/src/components/Icons/SingleIcon.test.jsx +55 -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/Icons/type.js +1 -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/ImageUploader/type.js +1 -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.jsx +19 -0
- 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.stories.jsx +154 -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/LuImage.test.jsx +44 -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.jsx +19 -0
- package/dist/src/components/Input/Input.stories.d.ts +5 -0
- package/dist/src/components/Input/Input.stories.js +30 -0
- package/dist/src/components/Input/Input.stories.jsx +18 -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.jsx +19 -0
- 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/Label.stories.jsx +24 -0
- package/dist/src/components/Label/index.d.ts +4 -0
- package/dist/src/components/Label/index.js +5 -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.jsx +36 -0
- package/dist/src/components/MediaCard/Card.stories.js +57 -0
- package/dist/src/components/MediaCard/Card.stories.jsx +56 -0
- package/dist/src/components/MediaCard/Card.test.js +28 -0
- package/dist/src/components/MediaCard/Card.test.jsx +27 -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.jsx +22 -0
- package/dist/src/components/MediaCard/ContactProfile/ContactProfile.test.d.ts +1 -0
- package/dist/src/components/MediaCard/ContactProfile/ContactProfile.test.js +61 -0
- package/dist/{components/MediaCard/ContactProfile/ContactProfile.test.js → src/components/MediaCard/ContactProfile/ContactProfile.test.jsx} +16 -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/src/components/MediaCard/ContactProfile/ContactProfileTheme1.jsx +28 -0
- package/dist/{components → src/components}/MediaCard/ContactProfile/ContactProfileTheme1.test.js +15 -38
- package/dist/src/components/MediaCard/ContactProfile/ContactProfileTheme1.test.jsx +87 -0
- package/dist/{components → src/components}/MediaCard/ContactProfile/ContactProfileTheme2.d.ts +1 -1
- package/dist/src/components/MediaCard/ContactProfile/ContactProfileTheme2.js +8 -0
- package/dist/src/components/MediaCard/ContactProfile/ContactProfileTheme2.jsx +24 -0
- package/dist/{components → src/components}/MediaCard/ContactProfile/ContactProfileTheme2.test.js +15 -38
- package/dist/src/components/MediaCard/ContactProfile/ContactProfileTheme2.test.jsx +87 -0
- 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.jsx +24 -0
- package/dist/src/components/MediaCard/PostByCategory/PostByCategory.test.d.ts +1 -0
- package/dist/src/components/MediaCard/PostByCategory/PostByCategory.test.js +62 -0
- package/dist/{components/MediaCard/PostByCategory/PostByCategory.test.js → src/components/MediaCard/PostByCategory/PostByCategory.test.jsx} +17 -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/src/components/MediaCard/PostByCategory/PostByCategoryTheme1.jsx +26 -0
- package/dist/{components → src/components}/MediaCard/PostByCategory/PostByCategoryTheme1.test.js +15 -38
- package/dist/src/components/MediaCard/PostByCategory/PostByCategoryTheme1.test.jsx +87 -0
- package/dist/{components → src/components}/MediaCard/PostByCategory/PostByCategoryTheme2.d.ts +1 -1
- package/dist/src/components/MediaCard/PostByCategory/PostByCategoryTheme2.js +8 -0
- package/dist/src/components/MediaCard/PostByCategory/PostByCategoryTheme2.jsx +24 -0
- package/dist/{components → src/components}/MediaCard/PostByCategory/PostByCategoryTheme2.test.js +16 -39
- package/dist/src/components/MediaCard/PostByCategory/PostByCategoryTheme2.test.jsx +87 -0
- 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/src/components/Switch/Switch.jsx +6 -0
- package/dist/src/components/Switch/Switch.stories.d.ts +5 -0
- package/dist/src/components/Switch/Switch.stories.js +44 -0
- package/dist/src/components/Switch/Switch.stories.jsx +32 -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.jsx +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.stories.jsx +37 -0
- 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/Title/Title.test.jsx +24 -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.jsx +19 -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/Typography.stories.jsx +25 -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/button.jsx +43 -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/input.jsx +18 -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/label.jsx +30 -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/switch.jsx +61 -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/tooltip.jsx +38 -0
- package/dist/src/components/ui/typography.d.ts +26 -0
- package/dist/src/components/ui/typography.js +65 -0
- package/dist/src/components/ui/typography.jsx +56 -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 +1 -4
- package/dist/src/utils/index.d.ts +18 -0
- package/dist/src/utils/index.js +20 -0
- package/dist/styles/global.css +2719 -4132
- 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.d.ts +0 -4
- 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/Avatar/Avatar.test.d.ts → src/components/Accordion/type.js} +0 -0
- /package/dist/{components → src/components}/Avatar/Avatar.stories.d.ts +0 -0
- /package/dist/{components/Border/BorderRadius/BorderRadius.test.d.ts → src/components/Avatar/Avatar.test.d.ts} +0 -0
- /package/dist/{components/Border/BorderWidth/BorderWidth.test.d.ts → src/components/Avatar/type.js} +0 -0
- /package/dist/{components/Color/BackgroundColor/BackgroundColor.test.d.ts → src/components/Button/Button.test.d.ts} +0 -0
- /package/dist/{components/Icons/IconList.test.d.ts → src/components/Button/IconButton.test.d.ts} +0 -0
- /package/dist/{components/Icons/SingleIcon.test.d.ts → src/components/Button/type.js} +0 -0
- /package/dist/{components/MediaCard/ContactProfile/ContactProfile.test.d.ts → src/components/ColorPicker/type.js} +0 -0
- /package/dist/{components/MediaCard/PostByCategory/PostByCategory.test.d.ts → src/components/Colors/color.test.d.ts} +0 -0
- /package/dist/{components/Spacing/Margin/MarginToken.test.d.ts → src/components/EditorTooltip/type.js} +0 -0
- /package/dist/{components/Spacing/Padding/PaddingToken.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/Title/Title.test.d.ts → src/components/Icons/SingleIcon.test.d.ts} +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,29 @@
|
|
|
1
|
+
import { fireEvent, render, screen } from "@testing-library/react";
|
|
2
|
+
import { buttonColors, buttonShapes, iconButtonSize } from ".";
|
|
3
|
+
import LUIcon from "../Icons/LUIcon";
|
|
4
|
+
import IconButton from "./IconButton";
|
|
5
|
+
describe("Icon Button Component", function () {
|
|
6
|
+
it("renders icon button with required icon prop", function () {
|
|
7
|
+
render(<IconButton icon={<LUIcon icon="chart-simple" size="xs"/>}/>);
|
|
8
|
+
expect(screen.getByRole("button")).toBeInTheDocument();
|
|
9
|
+
});
|
|
10
|
+
it("calls onClick handler when clicked", function () {
|
|
11
|
+
var handleClick = jest.fn();
|
|
12
|
+
render(<IconButton onClick={handleClick} icon={<LUIcon icon="chart-simple" size="xs"/>}/>);
|
|
13
|
+
fireEvent.click(screen.getByRole("button"));
|
|
14
|
+
expect(handleClick).toHaveBeenCalledTimes(1);
|
|
15
|
+
});
|
|
16
|
+
it("applies correct color, shape, and size classes", function () {
|
|
17
|
+
render(<IconButton color="primary" shape="rounded-lg" size="lg" icon={<LUIcon icon="chart-simple" size="xs"/>}/>);
|
|
18
|
+
var buttonElement = screen.getByRole("button");
|
|
19
|
+
expect(buttonElement).toHaveClass(buttonColors["primary"], buttonShapes["rounded-lg"], iconButtonSize["lg"]);
|
|
20
|
+
});
|
|
21
|
+
it("applies additional className when provided", function () {
|
|
22
|
+
render(<IconButton className="custom-class" icon={<LUIcon icon="chart-simple" size="xs"/>}/>);
|
|
23
|
+
expect(screen.getByRole("button")).toHaveClass("custom-class");
|
|
24
|
+
});
|
|
25
|
+
it("renders without crashing when all required props are provided", function () {
|
|
26
|
+
render(<IconButton icon={<LUIcon icon="chart-simple" size="xs"/>}/>);
|
|
27
|
+
expect(screen.getByRole("button")).toBeInTheDocument();
|
|
28
|
+
});
|
|
29
|
+
});
|
|
@@ -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,25 @@
|
|
|
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.HTMLAttributes<HTMLButtonElement> {
|
|
18
|
+
color?: colors;
|
|
19
|
+
onClick?: () => void;
|
|
20
|
+
size?: iconButtonSize;
|
|
21
|
+
shape?: buttonShapes;
|
|
22
|
+
className?: string;
|
|
23
|
+
icon: React.ReactNode;
|
|
24
|
+
}
|
|
25
|
+
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,34 @@
|
|
|
1
|
+
import { useState } from "react";
|
|
2
|
+
import { Input } from "../ui/input";
|
|
3
|
+
var ColorPicker = function (_a) {
|
|
4
|
+
var onChange = _a.onChange, _b = _a.value, value = _b === void 0 ? "#000000" : _b;
|
|
5
|
+
var _c = useState(value), hexColor = _c[0], setHexColor = _c[1];
|
|
6
|
+
// Handle input changes (color picker or text field)
|
|
7
|
+
var handleColorChange = function (newColor) {
|
|
8
|
+
setHexColor(newColor);
|
|
9
|
+
onChange(newColor);
|
|
10
|
+
};
|
|
11
|
+
// Handle hex input change
|
|
12
|
+
var handleHexChange = function (e) {
|
|
13
|
+
var inputValue = e.target.value;
|
|
14
|
+
// Ensure it starts with #
|
|
15
|
+
var formattedValue = inputValue.startsWith("#")
|
|
16
|
+
? inputValue
|
|
17
|
+
: "#".concat(inputValue);
|
|
18
|
+
handleColorChange(formattedValue);
|
|
19
|
+
};
|
|
20
|
+
// Handle color input change (from native color picker)
|
|
21
|
+
var handleColorInputChange = function (e) {
|
|
22
|
+
handleColorChange(e.target.value);
|
|
23
|
+
};
|
|
24
|
+
return (<>
|
|
25
|
+
<div className="flex">
|
|
26
|
+
<div className="relative">
|
|
27
|
+
<div className="size-9 shrink-0 rounded-l-sm" style={{ backgroundColor: hexColor }}/>
|
|
28
|
+
<Input type="color" value={hexColor} onChange={handleColorInputChange} className="absolute inset-0 opacity-0 cursor-pointer rounded-r-sm" aria-label="Select color"/>
|
|
29
|
+
</div>
|
|
30
|
+
<Input id="color-picker" type="text" value={hexColor} onChange={handleHexChange} className="rounded-r-sm border min-w-25"/>
|
|
31
|
+
</div>
|
|
32
|
+
</>);
|
|
33
|
+
};
|
|
34
|
+
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,12 @@
|
|
|
1
|
+
import ColorPicker from "./ColorPicker";
|
|
2
|
+
export default {
|
|
3
|
+
title: "Components/ColorPicker",
|
|
4
|
+
component: ColorPicker,
|
|
5
|
+
tags: ["autodocs"],
|
|
6
|
+
};
|
|
7
|
+
var Template = function (args) { return (<ColorPicker {...args}/>); };
|
|
8
|
+
export var _ColorPicker = Template.bind({});
|
|
9
|
+
_ColorPicker.args = {
|
|
10
|
+
value: "#000000", // Default color
|
|
11
|
+
onChange: function () { },
|
|
12
|
+
};
|
|
@@ -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,20 @@
|
|
|
1
|
+
import { colors } from "../../utils/colors";
|
|
2
|
+
import { Color } from "./color";
|
|
3
|
+
export default {
|
|
4
|
+
title: "Components/Color",
|
|
5
|
+
component: Color,
|
|
6
|
+
};
|
|
7
|
+
var Template = function (args) { return (<Color {...args}/>); };
|
|
8
|
+
export var _Color = Template.bind({});
|
|
9
|
+
_Color.args = {
|
|
10
|
+
color: "black", // Default color
|
|
11
|
+
};
|
|
12
|
+
_Color.argTypes = {
|
|
13
|
+
color: {
|
|
14
|
+
control: {
|
|
15
|
+
type: "select",
|
|
16
|
+
labels: Object.keys(colors),
|
|
17
|
+
},
|
|
18
|
+
options: Object.keys(colors),
|
|
19
|
+
},
|
|
20
|
+
};
|
|
@@ -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,23 @@
|
|
|
1
|
+
import { render, screen } from "@testing-library/react";
|
|
2
|
+
import { colors } from "../../utils/colors";
|
|
3
|
+
import { Color } from "./color";
|
|
4
|
+
describe("TextColor Component", function () {
|
|
5
|
+
it("renders with default color (black)", function () {
|
|
6
|
+
render(<Color />);
|
|
7
|
+
var textElement = screen.getByText("black");
|
|
8
|
+
expect(textElement).toBeInTheDocument();
|
|
9
|
+
expect(textElement).toHaveStyle({ color: colors.black });
|
|
10
|
+
});
|
|
11
|
+
it("renders with a specified color", function () {
|
|
12
|
+
render(<Color color="primary-500"/>);
|
|
13
|
+
var textElement = screen.getByText("primary-500");
|
|
14
|
+
expect(textElement).toBeInTheDocument();
|
|
15
|
+
expect(textElement).toHaveStyle({ color: colors["primary-500"] });
|
|
16
|
+
});
|
|
17
|
+
it("handles invalid color gracefully", function () {
|
|
18
|
+
render(<Color color={"invalid-color"}/>);
|
|
19
|
+
var textElement = screen.getByText("invalid-color");
|
|
20
|
+
expect(textElement).toBeInTheDocument();
|
|
21
|
+
expect(textElement).toHaveStyle({ color: colors.black }); // It should default to black
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -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;
|
|
7
|
+
return (_jsx(TooltipProvider, { children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { children: _jsx(IconButton, { icon: _jsx(LUIcon, { icon: "question", size: "xxs" }), size: "xs", shape: "rounded-full", color: "primary-light" }) }), _jsx(TooltipContent, { children: _jsx("p", { children: title }) })] }) }));
|
|
8
|
+
};
|
|
9
|
+
export default EditorTooltip;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from "../ui/tooltip";
|
|
2
|
+
import IconButton from "../Button/IconButton";
|
|
3
|
+
import LUIcon from "../Icons/LUIcon";
|
|
4
|
+
import { Dummy_Para } from "../../utils/constants";
|
|
5
|
+
var EditorTooltip = function (_a) {
|
|
6
|
+
var _b = _a.title, title = _b === void 0 ? Dummy_Para : _b;
|
|
7
|
+
return (<TooltipProvider>
|
|
8
|
+
<Tooltip>
|
|
9
|
+
<TooltipTrigger>
|
|
10
|
+
<IconButton icon={<LUIcon icon="question" size="xxs"/>} size="xs" shape="rounded-full" color="primary-light"/>
|
|
11
|
+
</TooltipTrigger>
|
|
12
|
+
<TooltipContent>
|
|
13
|
+
<p>{title}</p>
|
|
14
|
+
</TooltipContent>
|
|
15
|
+
</Tooltip>
|
|
16
|
+
</TooltipProvider>);
|
|
17
|
+
};
|
|
18
|
+
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
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import EditorTooltip from "./EditorTooltip";
|
|
2
|
+
import { Dummy_Para } from "../../utils/constants";
|
|
3
|
+
export default {
|
|
4
|
+
title: "Components/EditorTooltip",
|
|
5
|
+
component: EditorTooltip,
|
|
6
|
+
tags: ["autodocs"],
|
|
7
|
+
};
|
|
8
|
+
var Template = function (args) { return (<EditorTooltip {...args}/>); };
|
|
9
|
+
export var _EditorTooltip = Template.bind({});
|
|
10
|
+
_EditorTooltip.args = {
|
|
11
|
+
title: Dummy_Para,
|
|
12
|
+
};
|
|
@@ -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,57 @@
|
|
|
1
|
+
import { render, screen } from "@testing-library/react";
|
|
2
|
+
import { IconView } from "./IconView";
|
|
3
|
+
import { iconList } from "../../utils/iconList";
|
|
4
|
+
// Mocking iconList for the tests
|
|
5
|
+
jest.mock("../../utils/iconList", function () { return ({
|
|
6
|
+
iconList: [
|
|
7
|
+
{ label: "Home", path: "M10 10 L20 20 L30 10 Z" },
|
|
8
|
+
{ label: "Search", path: "M15 15 L25 25 L35 15 Z" },
|
|
9
|
+
],
|
|
10
|
+
}); });
|
|
11
|
+
describe("IconView Component", function () {
|
|
12
|
+
// Test: Check if the correct number of icons are rendered
|
|
13
|
+
it("should render the correct number of icons", function () {
|
|
14
|
+
render(<IconView />);
|
|
15
|
+
var iconContainers = screen.getAllByTestId("single-icon");
|
|
16
|
+
expect(iconContainers).toHaveLength(iconList.length); // Should match the length of iconList
|
|
17
|
+
});
|
|
18
|
+
// Test: Ensure each icon has a path with correct `d` attribute
|
|
19
|
+
it("should render each icon with the correct path", function () {
|
|
20
|
+
render(<IconView />);
|
|
21
|
+
// Ensure the correct number of icon containers are rendered
|
|
22
|
+
var iconContainers = screen.getAllByTestId("single-icon");
|
|
23
|
+
iconContainers.forEach(function (_, index) {
|
|
24
|
+
// const svgElement = screen.getByTestId(`single-icon-svg-${index}`);
|
|
25
|
+
var pathElement = screen.getByTestId("icon-path-".concat(index));
|
|
26
|
+
// Find the corresponding icon object
|
|
27
|
+
var icon = iconList[index];
|
|
28
|
+
// Check that the path matches the icon's path
|
|
29
|
+
expect(pathElement).toHaveAttribute("d", icon.path);
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
// Test: Ensure each icon has the correct label
|
|
33
|
+
it("should render each icon with the correct label", function () {
|
|
34
|
+
render(<IconView />);
|
|
35
|
+
iconList.forEach(function (icon, index) {
|
|
36
|
+
var labelElement = screen.getByTestId("icon-label-".concat(index));
|
|
37
|
+
expect(labelElement).toHaveTextContent(icon.label); // Check label text content
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
// Test: Ensure the grid structure is correct
|
|
41
|
+
it("should render icons inside a grid structure", function () {
|
|
42
|
+
render(<IconView />);
|
|
43
|
+
var gridContainer = screen.getByTestId("icons-list");
|
|
44
|
+
expect(gridContainer).toBeInTheDocument();
|
|
45
|
+
expect(gridContainer).toHaveClass("grid");
|
|
46
|
+
});
|
|
47
|
+
// Test: Check hover behavior for icons (optional)
|
|
48
|
+
it("should change background color on hover", function () {
|
|
49
|
+
render(<IconView />);
|
|
50
|
+
var iconContainers = screen.getAllByTestId("single-icon");
|
|
51
|
+
var icon = iconContainers[0];
|
|
52
|
+
// Simulate hover effect by adding the class for hover
|
|
53
|
+
icon.classList.add("hover:bg-gray-200");
|
|
54
|
+
// Check that the hover class is applied
|
|
55
|
+
expect(icon).toHaveClass("hover:bg-gray-200");
|
|
56
|
+
});
|
|
57
|
+
});
|
|
@@ -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
|
+
};
|