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,67 @@
|
|
|
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 { render, screen } from "@testing-library/react";
|
|
14
|
+
import LUIcon from "./LUIcon";
|
|
15
|
+
import { iconList } from "../../utils/iconList";
|
|
16
|
+
import { iconSize } from ".";
|
|
17
|
+
describe("LUIcon Component", function () {
|
|
18
|
+
it("renders correctly when a valid icon is provided", function () {
|
|
19
|
+
var props = {
|
|
20
|
+
size: "xs",
|
|
21
|
+
icon: iconList[0].key,
|
|
22
|
+
};
|
|
23
|
+
render(_jsx(LUIcon, __assign({}, props)));
|
|
24
|
+
// Select the element
|
|
25
|
+
var singleIconElement = screen.getByTestId("lu-icon");
|
|
26
|
+
expect(singleIconElement).toHaveClass(iconSize[props.size]);
|
|
27
|
+
// Assert that the fill class is applied correctly on the <path>
|
|
28
|
+
var pathElement = screen.getByTestId("lu-path");
|
|
29
|
+
expect(pathElement).toBeInTheDocument();
|
|
30
|
+
var selectedIcon = iconList.find(function (icon) { return icon.key === props.icon; });
|
|
31
|
+
expect(pathElement).toHaveAttribute("d", (selectedIcon === null || selectedIcon === void 0 ? void 0 : selectedIcon.path) || "");
|
|
32
|
+
});
|
|
33
|
+
it("renders correctly when an invalid icon is provided", function () {
|
|
34
|
+
var props = {
|
|
35
|
+
size: "md",
|
|
36
|
+
icon: "non-existent-icon", // Invalid icon
|
|
37
|
+
};
|
|
38
|
+
render(_jsx(LUIcon, __assign({}, props)));
|
|
39
|
+
var svgElement = screen.getByTestId("lu-icon");
|
|
40
|
+
expect(svgElement).toBeInTheDocument();
|
|
41
|
+
var pathElement = screen.getByTestId("lu-path");
|
|
42
|
+
expect(pathElement).toBeInTheDocument();
|
|
43
|
+
// Since the icon does not exist, path should be an empty string
|
|
44
|
+
expect(pathElement).toHaveAttribute("d", "");
|
|
45
|
+
});
|
|
46
|
+
it("applies additional className correctly", function () {
|
|
47
|
+
var props = {
|
|
48
|
+
size: "lg",
|
|
49
|
+
icon: iconList[0].key,
|
|
50
|
+
className: "custom-class",
|
|
51
|
+
};
|
|
52
|
+
render(_jsx(LUIcon, __assign({}, props)));
|
|
53
|
+
var singleIconElement = screen.getByTestId("lu-icon");
|
|
54
|
+
expect(singleIconElement).toHaveClass(iconSize[props.size]);
|
|
55
|
+
expect(singleIconElement).toHaveClass("custom-class");
|
|
56
|
+
});
|
|
57
|
+
it("renders correctly when selectedIcon is undefined", function () {
|
|
58
|
+
var props = {
|
|
59
|
+
size: "md",
|
|
60
|
+
icon: "", // Pass an empty string to ensure find() returns undefined
|
|
61
|
+
};
|
|
62
|
+
render(_jsx(LUIcon, __assign({}, props)));
|
|
63
|
+
var pathElement = screen.getByTestId("lu-path");
|
|
64
|
+
expect(pathElement).toBeInTheDocument();
|
|
65
|
+
expect(pathElement).toHaveAttribute("d", ""); // Expect empty path when selectedIcon is undefined
|
|
66
|
+
});
|
|
67
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const iconSize: {
|
|
2
|
+
xxs: string;
|
|
3
|
+
xs: string;
|
|
4
|
+
sm: string;
|
|
5
|
+
md: string;
|
|
6
|
+
lg: string;
|
|
7
|
+
xl: string;
|
|
8
|
+
"2xl": string;
|
|
9
|
+
"3xl": string;
|
|
10
|
+
"4xl": string;
|
|
11
|
+
"5xl": string;
|
|
12
|
+
"6xl": string;
|
|
13
|
+
"7xl": string;
|
|
14
|
+
huge: string;
|
|
15
|
+
massive: string;
|
|
16
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export var iconSize = {
|
|
2
|
+
xxs: "w-2 h-2",
|
|
3
|
+
xs: "w-3 h-3",
|
|
4
|
+
sm: "w-3.5 h-3.5",
|
|
5
|
+
md: "w-4 h-4",
|
|
6
|
+
lg: "w-5 h-5",
|
|
7
|
+
xl: "w-6 h-6",
|
|
8
|
+
"2xl": "w-6 h-6",
|
|
9
|
+
"3xl": "w-7 h-7",
|
|
10
|
+
"4xl": "w-8 h-8",
|
|
11
|
+
"5xl": "w-9 h-9",
|
|
12
|
+
"6xl": "w-10 h-10",
|
|
13
|
+
"7xl": "w-12 h-12",
|
|
14
|
+
huge: "w-16 h-16",
|
|
15
|
+
massive: "w-20 h-20",
|
|
16
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import ImageUploader from "../ui/imageUploader";
|
|
2
|
+
var meta = {
|
|
3
|
+
title: "Components/ImageUploader",
|
|
4
|
+
component: ImageUploader,
|
|
5
|
+
tags: ["autodocs"],
|
|
6
|
+
argTypes: {
|
|
7
|
+
onChange: { action: "changed" }, // For logging in the Storybook actions panel
|
|
8
|
+
},
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
export var Default = {
|
|
12
|
+
args: {
|
|
13
|
+
value: null,
|
|
14
|
+
onChange: function (previewUrl, file) {
|
|
15
|
+
console.log("Selected file:", file);
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
};
|
|
@@ -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++) {
|
|
@@ -21,12 +20,12 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
20
|
}
|
|
22
21
|
return t;
|
|
23
22
|
};
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
var
|
|
28
|
-
var
|
|
29
|
-
|
|
30
|
-
return (
|
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
+
import Image from "next/image";
|
|
25
|
+
import { aspectRatio } from ".";
|
|
26
|
+
var LuImage = function (_a) {
|
|
27
|
+
var _b = _a.ratio, ratio = _b === void 0 ? "square" : _b, props = __rest(_a, ["ratio"]);
|
|
28
|
+
// eslint-disable-next-line jsx-a11y/alt-text
|
|
29
|
+
return _jsx(Image, __assign({ className: "".concat(aspectRatio[ratio]) }, props));
|
|
31
30
|
};
|
|
32
|
-
|
|
31
|
+
export default LuImage;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Meta } from "@storybook/react";
|
|
2
|
+
import LuImage from "./LuImage";
|
|
3
|
+
import { AspectRatioProps } from "./type";
|
|
4
|
+
declare const _default: Meta<typeof LuImage>;
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const _Image: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, AspectRatioProps>;
|
|
@@ -0,0 +1,166 @@
|
|
|
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 LuImage from "./LuImage";
|
|
14
|
+
import { aspectRatio } from ".";
|
|
15
|
+
export default {
|
|
16
|
+
title: "Components/Image",
|
|
17
|
+
component: LuImage,
|
|
18
|
+
argTypes: {
|
|
19
|
+
src: {
|
|
20
|
+
control: "text",
|
|
21
|
+
description: "Image source URL",
|
|
22
|
+
table: {
|
|
23
|
+
type: { summary: "string" },
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
width: {
|
|
27
|
+
control: "number",
|
|
28
|
+
description: "Image width",
|
|
29
|
+
table: {
|
|
30
|
+
type: { summary: "number" },
|
|
31
|
+
defaultValue: { summary: "240" },
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
height: {
|
|
35
|
+
control: "number",
|
|
36
|
+
description: "Image width",
|
|
37
|
+
table: {
|
|
38
|
+
type: { summary: "number" },
|
|
39
|
+
defaultValue: { summary: "240" },
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
alt: {
|
|
43
|
+
control: "text",
|
|
44
|
+
description: "Image alt text",
|
|
45
|
+
table: {
|
|
46
|
+
type: { summary: "string" },
|
|
47
|
+
defaultValue: { summary: "Demo Image" },
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
loader: {
|
|
51
|
+
control: false,
|
|
52
|
+
description: "loader={imageLoader}",
|
|
53
|
+
table: {
|
|
54
|
+
type: { summary: "function" },
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
fill: {
|
|
58
|
+
control: "boolean",
|
|
59
|
+
description: "fill={false}",
|
|
60
|
+
table: {
|
|
61
|
+
type: { summary: "boolean" },
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
sizes: {
|
|
65
|
+
control: "text",
|
|
66
|
+
description: "sizes=(max-width: 768px) 100vw, 33vw",
|
|
67
|
+
table: {
|
|
68
|
+
type: { summary: "string" },
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
quality: {
|
|
72
|
+
control: "number",
|
|
73
|
+
description: "Image quality",
|
|
74
|
+
table: {
|
|
75
|
+
type: { summary: "Integer (1-100)" },
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
priority: {
|
|
79
|
+
control: "boolean",
|
|
80
|
+
description: "priority={false}",
|
|
81
|
+
table: {
|
|
82
|
+
type: { summary: "boolean" },
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
placeholder: {
|
|
86
|
+
control: "select",
|
|
87
|
+
options: ["blur", "empty"],
|
|
88
|
+
description: "placeholder={blur}",
|
|
89
|
+
table: {
|
|
90
|
+
type: { summary: "string" },
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
style: {
|
|
94
|
+
control: "object",
|
|
95
|
+
description: "stye={{ objectFit: contain }}",
|
|
96
|
+
table: {
|
|
97
|
+
type: { summary: "object" },
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
className: { control: "text" },
|
|
101
|
+
onLoad: {
|
|
102
|
+
control: false,
|
|
103
|
+
description: "onLoad={event => done())}",
|
|
104
|
+
table: {
|
|
105
|
+
type: { summary: "function" },
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
onError: {
|
|
109
|
+
description: "onError={event => fail()}",
|
|
110
|
+
table: {
|
|
111
|
+
type: { summary: "function" },
|
|
112
|
+
},
|
|
113
|
+
control: false,
|
|
114
|
+
},
|
|
115
|
+
loading: {
|
|
116
|
+
control: "select",
|
|
117
|
+
options: ["lazy", "eager"],
|
|
118
|
+
description: "Image loading",
|
|
119
|
+
table: {
|
|
120
|
+
type: { summary: "string" },
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
blurDataURL: {
|
|
124
|
+
control: "text",
|
|
125
|
+
description: "blurDataURL=data:image/jpeg...",
|
|
126
|
+
table: {
|
|
127
|
+
type: { summary: "string" },
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
overrideSrc: {
|
|
131
|
+
control: "text",
|
|
132
|
+
description: "overrideSrc=/seo.png",
|
|
133
|
+
table: {
|
|
134
|
+
type: { summary: "string" },
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
ratio: {
|
|
138
|
+
control: "select",
|
|
139
|
+
options: Object.keys(aspectRatio),
|
|
140
|
+
description: "Aspect ratio of the image",
|
|
141
|
+
table: {
|
|
142
|
+
type: { summary: "string" },
|
|
143
|
+
defaultValue: { summary: "square" },
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
};
|
|
148
|
+
var Template = function (args) { return _jsx(LuImage, __assign({}, args)); };
|
|
149
|
+
export var _Image = Template.bind({});
|
|
150
|
+
_Image.args = {
|
|
151
|
+
src: "/images/demo-image.jpg",
|
|
152
|
+
ratio: "square",
|
|
153
|
+
width: 240,
|
|
154
|
+
height: 240,
|
|
155
|
+
alt: "Demo Image",
|
|
156
|
+
};
|
|
157
|
+
_Image.argTypes = {
|
|
158
|
+
ratio: {
|
|
159
|
+
control: {
|
|
160
|
+
type: "select",
|
|
161
|
+
labels: Object.keys(aspectRatio),
|
|
162
|
+
},
|
|
163
|
+
options: Object.keys(aspectRatio),
|
|
164
|
+
defaultValue: "square",
|
|
165
|
+
},
|
|
166
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,56 @@
|
|
|
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 { render, screen } from "@testing-library/react";
|
|
14
|
+
import LuImage from "./LuImage";
|
|
15
|
+
import { aspectRatio } from ".";
|
|
16
|
+
// Mock next/image to render a basic `img` element for testing
|
|
17
|
+
jest.mock("next/image", function () { return ({
|
|
18
|
+
__esModule: true,
|
|
19
|
+
default: function (props) {
|
|
20
|
+
// eslint-disable-next-line @next/next/no-img-element
|
|
21
|
+
return _jsx("img", __assign({ alt: "" }, props));
|
|
22
|
+
},
|
|
23
|
+
}); });
|
|
24
|
+
describe("LuImage component", function () {
|
|
25
|
+
it("renders with default props", function () {
|
|
26
|
+
render(_jsx(LuImage, { src: "/test.jpg", width: 100, height: 100, alt: "Demo Image" }));
|
|
27
|
+
var image = screen.getByAltText("Demo Image");
|
|
28
|
+
expect(image).toBeInTheDocument();
|
|
29
|
+
expect(image).toHaveAttribute("src", "/test.jpg");
|
|
30
|
+
expect(image).toHaveClass("aspect-square");
|
|
31
|
+
});
|
|
32
|
+
it("uses correct aspect ratio class", function () {
|
|
33
|
+
var ratio = "aspect-4/3";
|
|
34
|
+
render(_jsx(LuImage, { src: "/test.jpg", width: 100, height: 100, ratio: ratio, alt: "Demo Image" }));
|
|
35
|
+
var image = screen.getByAltText("Demo Image");
|
|
36
|
+
expect(image).toHaveClass(aspectRatio[ratio]);
|
|
37
|
+
});
|
|
38
|
+
it("accepts custom alt text", function () {
|
|
39
|
+
render(_jsx(LuImage, { src: "/test.jpg", width: 100, height: 100, alt: "Custom Alt" }));
|
|
40
|
+
var image = screen.getByAltText("Custom Alt");
|
|
41
|
+
expect(image).toBeInTheDocument();
|
|
42
|
+
});
|
|
43
|
+
it("accepts additional className", function () {
|
|
44
|
+
render(_jsx(LuImage, { src: "/test.jpg", width: 100, height: 100, className: "rounded-full", alt: "Demo Image" }));
|
|
45
|
+
var image = screen.getByAltText("Demo Image");
|
|
46
|
+
expect(image).toHaveClass("rounded-full");
|
|
47
|
+
});
|
|
48
|
+
it("renders with different aspect ratios", function () {
|
|
49
|
+
for (var ratio in aspectRatio) {
|
|
50
|
+
var typedRatio = ratio;
|
|
51
|
+
render(_jsx(LuImage, { src: "/test.jpg", width: 100, height: 100, ratio: typedRatio, alt: "Image with ratio ".concat(typedRatio) }, typedRatio));
|
|
52
|
+
var image = screen.getByAltText("Image with ratio ".concat(typedRatio));
|
|
53
|
+
expect(image).toHaveClass(aspectRatio[typedRatio]);
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const aspectRatio: {
|
|
2
|
+
square: string;
|
|
3
|
+
"aspect-5/4": string;
|
|
4
|
+
"aspect-4/5": string;
|
|
5
|
+
"aspect-4/3": string;
|
|
6
|
+
"aspect-3/4": string;
|
|
7
|
+
"aspect-7/5": string;
|
|
8
|
+
"aspect-5/7": string;
|
|
9
|
+
"aspect-3/2": string;
|
|
10
|
+
"aspect-2/3": string;
|
|
11
|
+
"aspect-16/10": string;
|
|
12
|
+
"aspect-10/16": string;
|
|
13
|
+
"aspect-5/3": string;
|
|
14
|
+
"aspect-3/5": string;
|
|
15
|
+
"aspect-16/9": string;
|
|
16
|
+
"aspect-9/16": string;
|
|
17
|
+
"aspect-2/1": string;
|
|
18
|
+
"aspect-1/2": string;
|
|
19
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export var aspectRatio = {
|
|
2
|
+
square: "aspect-square",
|
|
3
|
+
"aspect-5/4": "aspect-5/4",
|
|
4
|
+
"aspect-4/5": "aspect-4/5",
|
|
5
|
+
"aspect-4/3": "aspect-4/3",
|
|
6
|
+
"aspect-3/4": "aspect-3/4",
|
|
7
|
+
"aspect-7/5": "aspect-7/5",
|
|
8
|
+
"aspect-5/7": "aspect-5/7",
|
|
9
|
+
"aspect-3/2": "aspect-3/2",
|
|
10
|
+
"aspect-2/3": "aspect-2/3",
|
|
11
|
+
"aspect-16/10": "aspect-16/10",
|
|
12
|
+
"aspect-10/16": "aspect-10/16",
|
|
13
|
+
"aspect-5/3": "aspect-5/3",
|
|
14
|
+
"aspect-3/5": "aspect-3/5",
|
|
15
|
+
"aspect-16/9": "aspect-16/9",
|
|
16
|
+
"aspect-9/16": "aspect-9/16",
|
|
17
|
+
"aspect-2/1": "aspect-2/1",
|
|
18
|
+
"aspect-1/2": "aspect-1/2",
|
|
19
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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++) {
|
|
@@ -21,12 +20,10 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
20
|
}
|
|
22
21
|
return t;
|
|
23
22
|
};
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
var
|
|
27
|
-
var
|
|
28
|
-
|
|
29
|
-
var _b = _a.heading, heading = _b === void 0 ? _1.Heading_Classes["lu-heading-h1"] : _b, _c = _a.label, label = _c === void 0 ? constants_1.Dummy_Para : _c, _d = _a.className, className = _d === void 0 ? "" : _d, props = __rest(_a, ["heading", "label", "className"]);
|
|
30
|
-
return ((0, jsx_runtime_1.jsx)("h1", __assign({}, props, { className: "".concat(heading, " ").concat(className), children: label })));
|
|
23
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
24
|
+
import { Input as ShadInput } from "../../components/ui/input";
|
|
25
|
+
var Input = function (_a) {
|
|
26
|
+
var _b = _a.type, type = _b === void 0 ? "text" : _b, _c = _a.placeholder, placeholder = _c === void 0 ? "Type Placeholder here" : _c, className = _a.className, props = __rest(_a, ["type", "placeholder", "className"]);
|
|
27
|
+
return (_jsx(_Fragment, { children: _jsx(ShadInput, __assign({ type: type, placeholder: placeholder, className: className }, props)) }));
|
|
31
28
|
};
|
|
32
|
-
|
|
29
|
+
export default Input;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Meta } from "@storybook/react";
|
|
2
|
+
import { InputFieldProps } from "./type";
|
|
3
|
+
declare const _default: Meta<InputFieldProps>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const Default: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, InputFieldProps>;
|
|
@@ -0,0 +1,46 @@
|
|
|
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 { Input } from "../ui/input";
|
|
14
|
+
import { inputType } from "."; // Ensure this exports an object like { text: 'text', email: 'email', ... }
|
|
15
|
+
export default {
|
|
16
|
+
title: "Components/Input",
|
|
17
|
+
component: Input,
|
|
18
|
+
tags: ["autodocs"],
|
|
19
|
+
argTypes: {
|
|
20
|
+
type: {
|
|
21
|
+
control: {
|
|
22
|
+
type: "select",
|
|
23
|
+
labels: Object.keys(inputType),
|
|
24
|
+
},
|
|
25
|
+
options: Object.keys(inputType),
|
|
26
|
+
defaultValue: "text",
|
|
27
|
+
},
|
|
28
|
+
placeholder: {
|
|
29
|
+
control: "text",
|
|
30
|
+
defaultValue: "Enter text",
|
|
31
|
+
},
|
|
32
|
+
disabled: {
|
|
33
|
+
control: "boolean",
|
|
34
|
+
defaultValue: false,
|
|
35
|
+
},
|
|
36
|
+
className: {
|
|
37
|
+
control: "text",
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
var Template = function (args) { return _jsx(Input, __assign({}, args)); };
|
|
42
|
+
export var Default = Template.bind({});
|
|
43
|
+
Default.args = {
|
|
44
|
+
type: "text",
|
|
45
|
+
placeholder: "Enter your input",
|
|
46
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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++) {
|
|
@@ -21,12 +20,10 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
20
|
}
|
|
22
21
|
return t;
|
|
23
22
|
};
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
var
|
|
27
|
-
var
|
|
28
|
-
|
|
29
|
-
var _b = _a.display, display = _b === void 0 ? _1.Display_Classes["lu-display-1"] : _b, _c = _a.label, label = _c === void 0 ? constants_1.Dummy_Para : _c, _d = _a.className, className = _d === void 0 ? "" : _d, props = __rest(_a, ["display", "label", "className"]);
|
|
30
|
-
return ((0, jsx_runtime_1.jsx)("div", __assign({}, props, { className: "".concat(display, " ").concat(className, " "), children: label })));
|
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
+
import { Label as ShadLabel } from "../../components/ui/label";
|
|
25
|
+
var Label = function (_a) {
|
|
26
|
+
var _b = _a.htmlFor, htmlFor = _b === void 0 ? "text" : _b, _c = _a.children, children = _c === void 0 ? "Label" : _c, props = __rest(_a, ["htmlFor", "children"]);
|
|
27
|
+
return (_jsx(ShadLabel, __assign({ htmlFor: htmlFor }, props, { children: children })));
|
|
31
28
|
};
|
|
32
|
-
|
|
29
|
+
export default Label;
|