@dktunited-techoff/techoff-suite-ui 1.2.0 → 1.3.1
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/esm/assets/fonts/Montserrat-Medium.ttf +0 -0
- package/esm/assets/fonts/Roboto-Light.ttf +0 -0
- package/{src/components/Button/Button.css → esm/components/TsButton/TsButton.css} +18 -18
- package/esm/components/TsButton/TsButton.d.ts +5 -0
- package/esm/components/TsButton/TsButton.js +17 -0
- package/esm/components/TsButton/TsButton.js.map +1 -0
- package/esm/components/TsButton/TsButton.types.d.ts +9 -0
- package/esm/components/TsButton/TsButton.types.js +2 -0
- package/esm/components/TsButton/TsButton.types.js.map +1 -0
- package/{src/components/Button/__stories__/Button.stories.mdx → esm/components/TsButton/__stories__/TsButton.stories.mdx} +4 -4
- package/{src/components/Icon/Icon.css → esm/components/TsIcon/TsIcon.css} +4 -4
- package/esm/components/TsIcon/TsIcon.d.ts +4 -0
- package/esm/components/TsIcon/TsIcon.js +12 -0
- package/esm/components/TsIcon/TsIcon.js.map +1 -0
- package/esm/components/TsIcon/TsIcon.types.d.ts +4 -0
- package/esm/components/TsIcon/TsIcon.types.js +2 -0
- package/esm/components/TsIcon/TsIcon.types.js.map +1 -0
- package/{src/components/Icon/__stories__/Icon.stories.mdx → esm/components/TsIcon/__stories__/TsIcon.stories.mdx} +4 -4
- package/esm/components/TsIcon/icons/index.d.ts +3 -0
- package/esm/components/TsIcon/icons/index.js +59 -0
- package/esm/components/TsIcon/icons/index.js.map +1 -0
- package/{src/components/Loader/Loader.css → esm/components/TsLoader/TsLoader.css} +4 -4
- package/esm/components/TsLoader/TsLoader.d.ts +4 -0
- package/esm/components/TsLoader/TsLoader.js +6 -0
- package/esm/components/TsLoader/TsLoader.js.map +1 -0
- package/esm/components/TsLoader/TsLoader.types.d.ts +3 -0
- package/esm/components/TsLoader/TsLoader.types.js +2 -0
- package/esm/components/TsLoader/TsLoader.types.js.map +1 -0
- package/{src/components/Loader/__stories__/Loader.stories.mdx → esm/components/TsLoader/__stories__/TsLoader.stories.mdx} +3 -3
- package/esm/hooks/use-click-outside.d.ts +2 -0
- package/esm/hooks/use-click-outside.js +14 -0
- package/esm/hooks/use-click-outside.js.map +1 -0
- package/esm/index.d.ts +6 -0
- package/esm/index.js +7 -0
- package/esm/index.js.map +1 -0
- package/{src/layouts/Header/Header.css → esm/layouts/TsHeader/TsHeader.css} +25 -25
- package/esm/layouts/TsHeader/TsHeader.d.ts +4 -0
- package/esm/layouts/TsHeader/TsHeader.js +13 -0
- package/esm/layouts/TsHeader/TsHeader.js.map +1 -0
- package/esm/layouts/TsHeader/TsHeader.types.d.ts +23 -0
- package/esm/layouts/TsHeader/TsHeader.types.js +2 -0
- package/esm/layouts/TsHeader/TsHeader.types.js.map +1 -0
- package/esm/layouts/TsHeader/TsHeaderProfile.d.ts +5 -0
- package/esm/layouts/TsHeader/TsHeaderProfile.js +38 -0
- package/esm/layouts/TsHeader/TsHeaderProfile.js.map +1 -0
- package/esm/layouts/TsHeader/TsHeaderSearch.d.ts +3 -0
- package/esm/layouts/TsHeader/TsHeaderSearch.js +58 -0
- package/esm/layouts/TsHeader/TsHeaderSearch.js.map +1 -0
- package/{src/layouts/Header/__stories__/Header.stories.mdx → esm/layouts/TsHeader/__stories__/TsHeader.stories.mdx} +12 -12
- package/{src/layouts/Navigation/Navigation.css → esm/layouts/TsNavigation/TsNavigation.css} +12 -12
- package/esm/layouts/TsNavigation/TsNavigation.d.ts +7 -0
- package/esm/layouts/TsNavigation/TsNavigation.js +29 -0
- package/esm/layouts/TsNavigation/TsNavigation.js.map +1 -0
- package/esm/layouts/TsNavigation/TsNavigation.types.d.ts +10 -0
- package/esm/layouts/TsNavigation/TsNavigation.types.js +2 -0
- package/esm/layouts/TsNavigation/TsNavigation.types.js.map +1 -0
- package/esm/layouts/TsNavigation/__stories__/TsNavigation.stories.mdx +51 -0
- package/esm/utils/string.utils.d.ts +1 -0
- package/esm/utils/string.utils.js +2 -0
- package/esm/utils/string.utils.js.map +1 -0
- package/lib/assets/fonts/Montserrat-Medium.ttf +0 -0
- package/lib/assets/fonts/Roboto-Light.ttf +0 -0
- package/lib/components/TsButton/TsButton.css +91 -0
- package/lib/components/TsButton/TsButton.d.ts +5 -0
- package/lib/components/TsButton/TsButton.js +21 -0
- package/lib/components/TsButton/TsButton.js.map +1 -0
- package/lib/components/TsButton/TsButton.types.d.ts +9 -0
- package/lib/components/TsButton/TsButton.types.js +3 -0
- package/lib/components/TsButton/TsButton.types.js.map +1 -0
- package/lib/components/TsButton/__stories__/TsButton.stories.mdx +74 -0
- package/lib/components/TsIcon/TsIcon.css +26 -0
- package/lib/components/TsIcon/TsIcon.d.ts +4 -0
- package/lib/components/TsIcon/TsIcon.js +16 -0
- package/lib/components/TsIcon/TsIcon.js.map +1 -0
- package/lib/components/TsIcon/TsIcon.types.d.ts +4 -0
- package/lib/components/TsIcon/TsIcon.types.js +3 -0
- package/lib/components/TsIcon/TsIcon.types.js.map +1 -0
- package/lib/components/TsIcon/__stories__/TsIcon.stories.mdx +89 -0
- package/lib/components/TsIcon/icons/add-circle.svg +1 -0
- package/lib/components/TsIcon/icons/add.svg +1 -0
- package/lib/components/TsIcon/icons/alert-circle-filled.svg +1 -0
- package/lib/components/TsIcon/icons/alert-circle.svg +1 -0
- package/lib/components/TsIcon/icons/alert-triangle-filled.svg +1 -0
- package/lib/components/TsIcon/icons/alert-triangle.svg +1 -0
- package/lib/components/TsIcon/icons/arrow-diagonal-collapse.svg +1 -0
- package/lib/components/TsIcon/icons/arrow-diagonal-expand.svg +1 -0
- package/lib/components/TsIcon/icons/arrow-down.svg +1 -0
- package/lib/components/TsIcon/icons/arrow-go-back.svg +1 -0
- package/lib/components/TsIcon/icons/arrow-left-right.svg +1 -0
- package/lib/components/TsIcon/icons/arrow-left.svg +1 -0
- package/lib/components/TsIcon/icons/arrow-right.svg +1 -0
- package/lib/components/TsIcon/icons/arrow-up-down.svg +1 -0
- package/lib/components/TsIcon/icons/arrow-up.svg +1 -0
- package/lib/components/TsIcon/icons/award.svg +1 -0
- package/lib/components/TsIcon/icons/check-circle-filled.svg +1 -0
- package/lib/components/TsIcon/icons/check-circle-timer.svg +7 -0
- package/lib/components/TsIcon/icons/check-circle.svg +1 -0
- package/lib/components/TsIcon/icons/check-square-filled.svg +1 -0
- package/lib/components/TsIcon/icons/check-square.svg +1 -0
- package/lib/components/TsIcon/icons/check.svg +1 -0
- package/lib/components/TsIcon/icons/chevron-down.svg +1 -0
- package/lib/components/TsIcon/icons/chevron-left.svg +1 -0
- package/lib/components/TsIcon/icons/chevron-right.svg +1 -0
- package/lib/components/TsIcon/icons/chevron-up.svg +1 -0
- package/lib/components/TsIcon/icons/circle.svg +1 -0
- package/lib/components/TsIcon/icons/close-circle.svg +1 -0
- package/lib/components/TsIcon/icons/close.svg +1 -0
- package/lib/components/TsIcon/icons/currency-euro.svg +1 -0
- package/lib/components/TsIcon/icons/download.svg +1 -0
- package/lib/components/TsIcon/icons/edit.svg +1 -0
- package/lib/components/TsIcon/icons/external-link.svg +1 -0
- package/lib/components/TsIcon/icons/filter-off.svg +1 -0
- package/lib/components/TsIcon/icons/filter.svg +1 -0
- package/lib/components/TsIcon/icons/flashlight-off.svg +1 -0
- package/lib/components/TsIcon/icons/flashlight.svg +1 -0
- package/lib/components/TsIcon/icons/header-bikestudio.svg +32 -0
- package/lib/components/TsIcon/icons/header-nsc-helmet.svg +32 -0
- package/lib/components/TsIcon/icons/header-opticost.svg +32 -0
- package/lib/components/TsIcon/icons/header-repairability.svg +32 -0
- package/lib/components/TsIcon/icons/heart-filled.svg +1 -0
- package/lib/components/TsIcon/icons/heart.svg +1 -0
- package/lib/components/TsIcon/icons/history.svg +1 -0
- package/lib/components/TsIcon/icons/home.svg +1 -0
- package/lib/components/TsIcon/icons/index.d.ts +3 -0
- package/lib/components/TsIcon/icons/index.js +62 -0
- package/lib/components/TsIcon/icons/index.js.map +1 -0
- package/lib/components/TsIcon/icons/index.ts +58 -0
- package/lib/components/TsIcon/icons/link.svg +1 -0
- package/lib/components/TsIcon/icons/list-settings.svg +1 -0
- package/lib/components/TsIcon/icons/lock.svg +1 -0
- package/lib/components/TsIcon/icons/loop-right.svg +1 -0
- package/lib/components/TsIcon/icons/question-circle.svg +1 -0
- package/lib/components/TsIcon/icons/save.svg +1 -0
- package/lib/components/TsIcon/icons/search.svg +1 -0
- package/lib/components/TsIcon/icons/seedling-circle.svg +12 -0
- package/lib/components/TsIcon/icons/square.svg +1 -0
- package/lib/components/TsIcon/icons/tools.svg +1 -0
- package/lib/components/TsIcon/icons/user.svg +1 -0
- package/lib/components/TsLoader/TsLoader.css +42 -0
- package/lib/components/TsLoader/TsLoader.d.ts +4 -0
- package/lib/components/TsLoader/TsLoader.js +10 -0
- package/lib/components/TsLoader/TsLoader.js.map +1 -0
- package/lib/components/TsLoader/TsLoader.types.d.ts +3 -0
- package/lib/components/TsLoader/TsLoader.types.js +3 -0
- package/lib/components/TsLoader/TsLoader.types.js.map +1 -0
- package/lib/components/TsLoader/__stories__/TsLoader.stories.mdx +30 -0
- package/lib/hooks/use-click-outside.d.ts +2 -0
- package/lib/hooks/use-click-outside.js +18 -0
- package/lib/hooks/use-click-outside.js.map +1 -0
- package/lib/index.d.ts +6 -0
- package/lib/index.js +23 -0
- package/lib/index.js.map +1 -0
- package/lib/layouts/TsHeader/TsHeader.css +186 -0
- package/lib/layouts/TsHeader/TsHeader.d.ts +4 -0
- package/lib/layouts/TsHeader/TsHeader.js +17 -0
- package/lib/layouts/TsHeader/TsHeader.js.map +1 -0
- package/lib/layouts/TsHeader/TsHeader.types.d.ts +23 -0
- package/lib/layouts/TsHeader/TsHeader.types.js +3 -0
- package/lib/layouts/TsHeader/TsHeader.types.js.map +1 -0
- package/lib/layouts/TsHeader/TsHeaderProfile.d.ts +5 -0
- package/lib/layouts/TsHeader/TsHeaderProfile.js +43 -0
- package/lib/layouts/TsHeader/TsHeaderProfile.js.map +1 -0
- package/lib/layouts/TsHeader/TsHeaderSearch.d.ts +3 -0
- package/lib/layouts/TsHeader/TsHeaderSearch.js +62 -0
- package/lib/layouts/TsHeader/TsHeaderSearch.js.map +1 -0
- package/lib/layouts/TsHeader/__stories__/TsHeader.stories.mdx +71 -0
- package/lib/layouts/TsNavigation/TsNavigation.css +74 -0
- package/lib/layouts/TsNavigation/TsNavigation.d.ts +7 -0
- package/lib/layouts/TsNavigation/TsNavigation.js +35 -0
- package/lib/layouts/TsNavigation/TsNavigation.js.map +1 -0
- package/lib/layouts/TsNavigation/TsNavigation.types.d.ts +10 -0
- package/lib/layouts/TsNavigation/TsNavigation.types.js +3 -0
- package/lib/layouts/TsNavigation/TsNavigation.types.js.map +1 -0
- package/lib/layouts/TsNavigation/__stories__/TsNavigation.stories.mdx +51 -0
- package/lib/utils/string.utils.d.ts +1 -0
- package/lib/utils/string.utils.js +6 -0
- package/lib/utils/string.utils.js.map +1 -0
- package/package.json +1 -1
- package/src/components/TsButton/TsButton.css +91 -0
- package/src/components/TsButton/TsButton.tsx +34 -0
- package/src/components/{Button/Button.types.ts → TsButton/TsButton.types.ts} +1 -1
- package/src/components/TsButton/__stories__/TsButton.stories.mdx +74 -0
- package/src/components/TsIcon/TsIcon.css +26 -0
- package/src/components/TsIcon/TsIcon.tsx +13 -0
- package/src/components/TsIcon/TsIcon.types.ts +1 -0
- package/src/components/TsIcon/__stories__/TsIcon.stories.mdx +89 -0
- package/src/components/TsIcon/icons/add-circle.svg +1 -0
- package/src/components/TsIcon/icons/add.svg +1 -0
- package/src/components/TsIcon/icons/alert-circle-filled.svg +1 -0
- package/src/components/TsIcon/icons/alert-circle.svg +1 -0
- package/src/components/TsIcon/icons/alert-triangle-filled.svg +1 -0
- package/src/components/TsIcon/icons/alert-triangle.svg +1 -0
- package/src/components/TsIcon/icons/arrow-diagonal-collapse.svg +1 -0
- package/src/components/TsIcon/icons/arrow-diagonal-expand.svg +1 -0
- package/src/components/TsIcon/icons/arrow-down.svg +1 -0
- package/src/components/TsIcon/icons/arrow-go-back.svg +1 -0
- package/src/components/TsIcon/icons/arrow-left-right.svg +1 -0
- package/src/components/TsIcon/icons/arrow-left.svg +1 -0
- package/src/components/TsIcon/icons/arrow-right.svg +1 -0
- package/src/components/TsIcon/icons/arrow-up-down.svg +1 -0
- package/src/components/TsIcon/icons/arrow-up.svg +1 -0
- package/src/components/TsIcon/icons/award.svg +1 -0
- package/src/components/TsIcon/icons/check-circle-filled.svg +1 -0
- package/src/components/TsIcon/icons/check-circle-timer.svg +7 -0
- package/src/components/TsIcon/icons/check-circle.svg +1 -0
- package/src/components/TsIcon/icons/check-square-filled.svg +1 -0
- package/src/components/TsIcon/icons/check-square.svg +1 -0
- package/src/components/TsIcon/icons/check.svg +1 -0
- package/src/components/TsIcon/icons/chevron-down.svg +1 -0
- package/src/components/TsIcon/icons/chevron-left.svg +1 -0
- package/src/components/TsIcon/icons/chevron-right.svg +1 -0
- package/src/components/TsIcon/icons/chevron-up.svg +1 -0
- package/src/components/TsIcon/icons/circle.svg +1 -0
- package/src/components/TsIcon/icons/close-circle.svg +1 -0
- package/src/components/TsIcon/icons/close.svg +1 -0
- package/src/components/TsIcon/icons/currency-euro.svg +1 -0
- package/src/components/TsIcon/icons/download.svg +1 -0
- package/src/components/TsIcon/icons/edit.svg +1 -0
- package/src/components/TsIcon/icons/external-link.svg +1 -0
- package/src/components/TsIcon/icons/filter-off.svg +1 -0
- package/src/components/TsIcon/icons/filter.svg +1 -0
- package/src/components/TsIcon/icons/flashlight-off.svg +1 -0
- package/src/components/TsIcon/icons/flashlight.svg +1 -0
- package/src/components/TsIcon/icons/header-bikestudio.svg +32 -0
- package/src/components/TsIcon/icons/header-nsc-helmet.svg +32 -0
- package/src/components/TsIcon/icons/header-opticost.svg +32 -0
- package/src/components/TsIcon/icons/header-repairability.svg +32 -0
- package/src/components/TsIcon/icons/heart-filled.svg +1 -0
- package/src/components/TsIcon/icons/heart.svg +1 -0
- package/src/components/TsIcon/icons/history.svg +1 -0
- package/src/components/TsIcon/icons/home.svg +1 -0
- package/src/components/TsIcon/icons/index.ts +58 -0
- package/src/components/TsIcon/icons/link.svg +1 -0
- package/src/components/TsIcon/icons/list-settings.svg +1 -0
- package/src/components/TsIcon/icons/lock.svg +1 -0
- package/src/components/TsIcon/icons/loop-right.svg +1 -0
- package/src/components/TsIcon/icons/question-circle.svg +1 -0
- package/src/components/TsIcon/icons/save.svg +1 -0
- package/src/components/TsIcon/icons/search.svg +1 -0
- package/src/components/TsIcon/icons/seedling-circle.svg +12 -0
- package/src/components/TsIcon/icons/square.svg +1 -0
- package/src/components/TsIcon/icons/tools.svg +1 -0
- package/src/components/TsIcon/icons/user.svg +1 -0
- package/src/components/TsLoader/TsLoader.css +42 -0
- package/src/components/TsLoader/TsLoader.tsx +7 -0
- package/src/components/TsLoader/TsLoader.types.ts +1 -0
- package/src/components/TsLoader/__stories__/TsLoader.stories.mdx +30 -0
- package/src/index.ts +6 -11
- package/src/layouts/TsHeader/TsHeader.css +186 -0
- package/src/layouts/TsHeader/TsHeader.tsx +20 -0
- package/src/layouts/{Header/Header.types.ts → TsHeader/TsHeader.types.ts} +4 -4
- package/src/layouts/TsHeader/TsHeaderProfile.tsx +56 -0
- package/src/layouts/{Header/HeaderSearch.tsx → TsHeader/TsHeaderSearch.tsx} +13 -14
- package/src/layouts/TsHeader/__stories__/TsHeader.stories.mdx +71 -0
- package/src/layouts/TsNavigation/TsNavigation.css +74 -0
- package/src/layouts/TsNavigation/TsNavigation.tsx +54 -0
- package/src/layouts/TsNavigation/TsNavigation.types.ts +4 -0
- package/src/layouts/TsNavigation/__stories__/TsNavigation.stories.mdx +51 -0
- package/src/components/Button/Button.tsx +0 -34
- package/src/components/Icon/Icon.tsx +0 -13
- package/src/components/Icon/Icon.types.ts +0 -1
- package/src/components/Loader/Loader.tsx +0 -7
- package/src/components/Loader/Loader.types.ts +0 -1
- package/src/layouts/Header/Header.tsx +0 -20
- package/src/layouts/Header/HeaderProfile.tsx +0 -56
- package/src/layouts/Navigation/Navigation.tsx +0 -54
- package/src/layouts/Navigation/Navigation.types.ts +0 -4
- package/src/layouts/Navigation/__stories__/Navigation.stories.mdx +0 -51
- /package/{src/components/Icon → esm/components/TsIcon}/icons/add-circle.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/add.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/alert-circle-filled.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/alert-circle.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/alert-triangle-filled.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/alert-triangle.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/arrow-diagonal-collapse.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/arrow-diagonal-expand.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/arrow-down.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/arrow-go-back.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/arrow-left-right.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/arrow-left.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/arrow-right.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/arrow-up-down.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/arrow-up.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/award.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/check-circle-filled.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/check-circle-timer.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/check-circle.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/check-square-filled.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/check-square.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/check.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/chevron-down.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/chevron-left.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/chevron-right.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/chevron-up.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/circle.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/close-circle.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/close.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/currency-euro.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/download.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/edit.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/external-link.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/filter-off.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/filter.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/flashlight-off.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/flashlight.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/header-bikestudio.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/header-nsc-helmet.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/header-opticost.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/header-repairability.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/heart-filled.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/heart.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/history.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/home.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/index.ts +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/link.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/list-settings.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/lock.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/loop-right.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/question-circle.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/save.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/search.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/seedling-circle.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/square.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/tools.svg +0 -0
- /package/{src/components/Icon → esm/components/TsIcon}/icons/user.svg +0 -0
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useEffect, useState } from 'react';
|
|
3
3
|
// import { Input } from '../../components/Inputs/Input/Input';
|
|
4
|
-
import {
|
|
4
|
+
import { TsLoader } from '../../components/TsLoader/TsLoader';
|
|
5
5
|
import { useClickOutside } from '../../hooks/use-click-outside';
|
|
6
|
-
import {
|
|
6
|
+
import { TsHeaderSearchProps } from './TsHeader.types';
|
|
7
7
|
|
|
8
|
-
export const
|
|
8
|
+
export const TsHeaderSearch = ({
|
|
9
9
|
getItemLabel,
|
|
10
10
|
getItemValue,
|
|
11
11
|
loadItems,
|
|
12
12
|
noDataLabel,
|
|
13
|
-
placeholder,
|
|
14
13
|
onChange,
|
|
15
|
-
}:
|
|
16
|
-
const [searchValue
|
|
14
|
+
}: TsHeaderSearchProps) => {
|
|
15
|
+
const [searchValue] = useState<string>('');
|
|
17
16
|
const [items, setItems] = useState<any[]>([]);
|
|
18
17
|
const [isLoading, setIsLoading] = useState<boolean>(false);
|
|
19
18
|
const [showItems, setShowItems] = useState<boolean>(false);
|
|
@@ -58,7 +57,7 @@ export const HeaderSearch = ({
|
|
|
58
57
|
// #########
|
|
59
58
|
// Rendering
|
|
60
59
|
return (
|
|
61
|
-
<div className="header-search" ref={ref}>
|
|
60
|
+
<div className="ts-header-search" ref={ref}>
|
|
62
61
|
{/* <Input
|
|
63
62
|
placeholder={placeholder}
|
|
64
63
|
icon="search"
|
|
@@ -72,19 +71,19 @@ export const HeaderSearch = ({
|
|
|
72
71
|
/> */}
|
|
73
72
|
|
|
74
73
|
{showItems && searchValue !== '' && (
|
|
75
|
-
<div className="header-search-items-container">
|
|
74
|
+
<div className="ts-header-search-items-container">
|
|
76
75
|
{isLoading && (
|
|
77
|
-
<div className="header-search-loading">
|
|
78
|
-
<
|
|
76
|
+
<div className="ts-header-search-loading">
|
|
77
|
+
<TsLoader size="sm" />
|
|
79
78
|
</div>
|
|
80
79
|
)}
|
|
81
|
-
{!isLoading && items.length === 0 && <div className="header-search-no-items">{noDataLabel}</div>}
|
|
80
|
+
{!isLoading && items.length === 0 && <div className="ts-header-search-no-items">{noDataLabel}</div>}
|
|
82
81
|
{!isLoading && items.length > 0 && (
|
|
83
|
-
<div className="header-search-items">
|
|
82
|
+
<div className="ts-header-search-items">
|
|
84
83
|
{items.map(item => (
|
|
85
|
-
<div className="header-search-item" onClick={() => onChange(getItemValue(item))}>
|
|
84
|
+
<div className="ts-header-search-item" onClick={() => onChange(getItemValue(item))}>
|
|
86
85
|
{getBeforeMatch(item)}
|
|
87
|
-
<span className="header-search-item--match">{getMatch(item)}</span>
|
|
86
|
+
<span className="ts-header-search-item--match">{getMatch(item)}</span>
|
|
88
87
|
{getAfterMatch(item)}
|
|
89
88
|
</div>
|
|
90
89
|
))}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ArgsTable, Canvas, Meta, Story } from '@storybook/blocks';
|
|
3
|
+
import { TsHeader } from '../TsHeader';
|
|
4
|
+
import { TsHeaderProfile, TsHeaderProfileItem } from '../TsHeaderProfile';
|
|
5
|
+
import { TsHeaderSearch } from '../TsHeaderSearch';
|
|
6
|
+
import { TsButton } from '../../../components/TsButton/TsButton';
|
|
7
|
+
|
|
8
|
+
<Meta title="Layouts/Header" />
|
|
9
|
+
|
|
10
|
+
export const headerArgTypes = {
|
|
11
|
+
appName: {
|
|
12
|
+
control: 'select',
|
|
13
|
+
options: ['bikestudio', 'nsc-helmet', 'opticost', 'repairability'],
|
|
14
|
+
description: 'Icon of the button.',
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const loadItems = () => {
|
|
19
|
+
return Promise.resolve([
|
|
20
|
+
{ id: 1, label: 'Item 1' },
|
|
21
|
+
{ id: 2, label: 'Item 2' },
|
|
22
|
+
{ id: 3, label: 'Item 3' },
|
|
23
|
+
{ id: 4, label: 'Item 4' },
|
|
24
|
+
{ id: 5, label: 'Item 5' },
|
|
25
|
+
{ id: 6, label: 'Item 6' },
|
|
26
|
+
{ id: 7, label: 'Item 7' },
|
|
27
|
+
{ id: 8, label: 'Item 8' },
|
|
28
|
+
{ id: 9, label: 'Item 9' },
|
|
29
|
+
]);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
# Header
|
|
33
|
+
|
|
34
|
+
The header will allow users to quickly find the information they need at a glance but also make some actions. The header is therefore central in the design of each application: it contains all the essential information, obvious shortcuts, which will help boost Deacthlon Techoff brand image.
|
|
35
|
+
|
|
36
|
+
## Overview
|
|
37
|
+
|
|
38
|
+
<Canvas>
|
|
39
|
+
<Story
|
|
40
|
+
name="Overview"
|
|
41
|
+
args={{
|
|
42
|
+
actions: (
|
|
43
|
+
<>
|
|
44
|
+
<TsButton icon="add" size="lg" variant="shadow" rounded />
|
|
45
|
+
<TsHeaderProfile firstname="John" lastname="Doe">
|
|
46
|
+
<TsHeaderProfileItem icon="alert-triangle" label="Contact support" link="" />
|
|
47
|
+
<TsHeaderProfileItem icon="award" label="Trainings" link="" />
|
|
48
|
+
</TsHeaderProfile>
|
|
49
|
+
</>
|
|
50
|
+
),
|
|
51
|
+
appName: 'repairability',
|
|
52
|
+
search: (
|
|
53
|
+
<TsHeaderSearch
|
|
54
|
+
getItemLabel={item => item.label}
|
|
55
|
+
getItemValue={item => item.id}
|
|
56
|
+
loadItems={loadItems}
|
|
57
|
+
noDataLabel="No item found."
|
|
58
|
+
placeholder="Search something in the application"
|
|
59
|
+
onChange={() => {}}
|
|
60
|
+
/>
|
|
61
|
+
),
|
|
62
|
+
}}
|
|
63
|
+
argTypes={headerArgTypes}
|
|
64
|
+
>
|
|
65
|
+
{args => <TsHeader {...args} />}
|
|
66
|
+
</Story>
|
|
67
|
+
</Canvas>
|
|
68
|
+
|
|
69
|
+
## Props
|
|
70
|
+
|
|
71
|
+
<ArgsTable story="Overview" of={TsHeader} />
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
.ts-navigation {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
height: 32px;
|
|
5
|
+
padding: 0 24px;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/* ############ */
|
|
9
|
+
/* BREADCRUMB */
|
|
10
|
+
.ts-breadcrumb {
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
padding-right: 20px;
|
|
14
|
+
}
|
|
15
|
+
.ts-breadcrumb-container {
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
}
|
|
19
|
+
.ts-breadcrumb-chevron {
|
|
20
|
+
padding: 0 8px;
|
|
21
|
+
color: #3643ba;
|
|
22
|
+
}
|
|
23
|
+
.ts-breadcrumb-item {
|
|
24
|
+
display: flex;
|
|
25
|
+
align-items: center;
|
|
26
|
+
height: 32px;
|
|
27
|
+
border-radius: 9999px;
|
|
28
|
+
color: #3643ba;
|
|
29
|
+
}
|
|
30
|
+
.ts-breadcrumb-item--highlight {
|
|
31
|
+
padding: 0 20px;
|
|
32
|
+
box-shadow: 0px 6px 6px 0px #00537d1a;
|
|
33
|
+
background: linear-gradient(270deg, #3643ba 0%, rgba(54, 67, 186, 0.6) 100%);
|
|
34
|
+
color: #ffffff;
|
|
35
|
+
}
|
|
36
|
+
.ts-breadcrumb-item--link {
|
|
37
|
+
cursor: pointer;
|
|
38
|
+
}
|
|
39
|
+
.ts-breadcrumb-item--link:hover {
|
|
40
|
+
text-decoration: underline;
|
|
41
|
+
}
|
|
42
|
+
.ts-breadcrumb-item--icon {
|
|
43
|
+
padding-right: 8px;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* ######### */
|
|
47
|
+
/* DIVIDER */
|
|
48
|
+
.ts-navigation-divider {
|
|
49
|
+
flex: 1;
|
|
50
|
+
height: 1px;
|
|
51
|
+
margin: 4px 0;
|
|
52
|
+
background: #ebecf7;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* ######### */
|
|
56
|
+
/* ACTIONS */
|
|
57
|
+
.ts-navigation-actions {
|
|
58
|
+
/* flex items-center [&>*]:ml-4 */
|
|
59
|
+
display: flex;
|
|
60
|
+
align-items: center;
|
|
61
|
+
}
|
|
62
|
+
.ts-navigation-actions > * {
|
|
63
|
+
margin-left: 16px;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/* ######### */
|
|
67
|
+
/* GLOBALS */
|
|
68
|
+
* {
|
|
69
|
+
font-size: 14px;
|
|
70
|
+
outline: none;
|
|
71
|
+
box-sizing: border-box;
|
|
72
|
+
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans',
|
|
73
|
+
'Helvetica Neue', sans-serif;
|
|
74
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { PropsWithChildren } from 'react';
|
|
3
|
+
import { TsIcon } from '../../components/TsIcon/TsIcon';
|
|
4
|
+
import { TsNavigationBreadcrumbItemProps, TsNavigationProps } from './TsNavigation.types';
|
|
5
|
+
import './TsNavigation.css';
|
|
6
|
+
|
|
7
|
+
export const TsNavigationBreadcrumbDivider = () => {
|
|
8
|
+
// #########
|
|
9
|
+
// Rendering
|
|
10
|
+
return (
|
|
11
|
+
<div className="ts-breadcrumb-chevron">
|
|
12
|
+
<TsIcon name="chevron-right" />
|
|
13
|
+
</div>
|
|
14
|
+
);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const TsNavigationBreadcrumbItem = ({
|
|
18
|
+
children,
|
|
19
|
+
icon,
|
|
20
|
+
highlight,
|
|
21
|
+
onClick,
|
|
22
|
+
}: PropsWithChildren<TsNavigationBreadcrumbItemProps>) => {
|
|
23
|
+
// #########
|
|
24
|
+
// Rendering
|
|
25
|
+
return (
|
|
26
|
+
<div
|
|
27
|
+
className={`
|
|
28
|
+
ts-breadcrumb-item
|
|
29
|
+
${highlight ? 'ts-breadcrumb-item--highlight' : ''} ${onClick ? 'ts-breadcrumb-item--link' : ''}
|
|
30
|
+
`}
|
|
31
|
+
onClick={onClick}
|
|
32
|
+
>
|
|
33
|
+
{icon && (
|
|
34
|
+
<div className="ts-breadcrumb-item--icon">
|
|
35
|
+
<TsIcon name={icon} size="16" />
|
|
36
|
+
</div>
|
|
37
|
+
)}
|
|
38
|
+
|
|
39
|
+
{children}
|
|
40
|
+
</div>
|
|
41
|
+
);
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export const TsNavigation = ({ actions, breadcrumbs }: TsNavigationProps) => {
|
|
45
|
+
// #########
|
|
46
|
+
// Rendering
|
|
47
|
+
return (
|
|
48
|
+
<div className="ts-navigation">
|
|
49
|
+
<div className="ts-breadcrumb">{breadcrumbs}</div>
|
|
50
|
+
<div className="ts-navigation-divider" />
|
|
51
|
+
<div className="ts-navigation-actions">{actions}</div>
|
|
52
|
+
</div>
|
|
53
|
+
);
|
|
54
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ArgsTable, Canvas, Meta, Story } from '@storybook/blocks';
|
|
3
|
+
import { TsNavigation, TsNavigationBreadcrumbItem, TsNavigationBreadcrumbDivider } from '../TsNavigation';
|
|
4
|
+
import { TsButton } from '../../../components/TsButton/TsButton';
|
|
5
|
+
import { icons } from '../../../components/TsIcon/icons';
|
|
6
|
+
|
|
7
|
+
<Meta title="Layouts/Navigation" />
|
|
8
|
+
|
|
9
|
+
# Navigation
|
|
10
|
+
|
|
11
|
+
Breadcrumbs are an important navigation component that shows content hierarchy. They allow users to be aware of their current location in the hierarchical structure of the application. Breadcrumbs enable users to quickly move up to a parent level. Moreover this navigation component allows user to make some actions.
|
|
12
|
+
|
|
13
|
+
## Overview
|
|
14
|
+
|
|
15
|
+
<Canvas>
|
|
16
|
+
<Story
|
|
17
|
+
name="Overview"
|
|
18
|
+
args={{
|
|
19
|
+
actions: (
|
|
20
|
+
<>
|
|
21
|
+
<TsButton icon="check" onClick={() => {}}>
|
|
22
|
+
Action 1
|
|
23
|
+
</TsButton>
|
|
24
|
+
<TsButton icon="add" onClick={() => {}}>
|
|
25
|
+
Action 2
|
|
26
|
+
</TsButton>
|
|
27
|
+
</>
|
|
28
|
+
),
|
|
29
|
+
breadcrumbs: (
|
|
30
|
+
<>
|
|
31
|
+
<TsNavigationBreadcrumbItem icon="home" onClick={() => {}}>
|
|
32
|
+
Home
|
|
33
|
+
</TsNavigationBreadcrumbItem>
|
|
34
|
+
<TsNavigationBreadcrumbDivider />
|
|
35
|
+
<TsNavigationBreadcrumbItem onClick={() => {}}>Menu Item 1</TsNavigationBreadcrumbItem>
|
|
36
|
+
<TsNavigationBreadcrumbDivider />
|
|
37
|
+
<TsNavigationBreadcrumbItem highlight>Menu Item 2</TsNavigationBreadcrumbItem>
|
|
38
|
+
</>
|
|
39
|
+
)
|
|
40
|
+
}}
|
|
41
|
+
|
|
42
|
+
>
|
|
43
|
+
|
|
44
|
+
{args => <TsNavigation {...args} />}
|
|
45
|
+
|
|
46
|
+
</Story>
|
|
47
|
+
</Canvas>
|
|
48
|
+
|
|
49
|
+
## Props
|
|
50
|
+
|
|
51
|
+
<ArgsTable story="Overview" of={TsNavigation} />
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { PropsWithChildren } from 'react';
|
|
3
|
-
import { Icon } from '../Icon/Icon';
|
|
4
|
-
import { ButtonProps } from './Button.types';
|
|
5
|
-
import './Button.css';
|
|
6
|
-
|
|
7
|
-
export const Button = ({
|
|
8
|
-
children,
|
|
9
|
-
icon,
|
|
10
|
-
iconDirection = 'left',
|
|
11
|
-
size = 'md',
|
|
12
|
-
variant = 'primary',
|
|
13
|
-
block,
|
|
14
|
-
rounded,
|
|
15
|
-
onClick,
|
|
16
|
-
}: PropsWithChildren<ButtonProps>) => {
|
|
17
|
-
// #########
|
|
18
|
-
// Rendering
|
|
19
|
-
return (
|
|
20
|
-
<button
|
|
21
|
-
className={`
|
|
22
|
-
button button--${size} button--${variant}
|
|
23
|
-
${block ? 'button--block' : ''}
|
|
24
|
-
${rounded ? 'button--rounded' : ''}
|
|
25
|
-
${icon && !children ? 'button--icon-only' : ''}
|
|
26
|
-
`}
|
|
27
|
-
onClick={onClick}
|
|
28
|
-
>
|
|
29
|
-
{icon && iconDirection === 'left' && <Icon name={icon} size="16" />}
|
|
30
|
-
{children && <div>{children}</div>}
|
|
31
|
-
{icon && iconDirection === 'right' && <Icon name={icon} size="16" />}
|
|
32
|
-
</button>
|
|
33
|
-
);
|
|
34
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { IconProps } from './Icon.types';
|
|
3
|
-
import { icons } from './icons';
|
|
4
|
-
import './Icon.css';
|
|
5
|
-
|
|
6
|
-
export const Icon = ({ name, size = '20' }: IconProps) => {
|
|
7
|
-
const icon = icons[name];
|
|
8
|
-
|
|
9
|
-
// #########
|
|
10
|
-
// Rendering
|
|
11
|
-
if (!icon) return <></>;
|
|
12
|
-
return <div className={`icon icon--${size}`} dangerouslySetInnerHTML={{ __html: icon }} />;
|
|
13
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type IconProps = { name: string; size?: '16' | '20' | '24' };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type LoaderProps = { size?: 'sm' | 'md' | 'lg' };
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { icons } from '../../components/Icon/icons';
|
|
3
|
-
import { HeaderProps } from './Header.types';
|
|
4
|
-
import './Header.css';
|
|
5
|
-
|
|
6
|
-
export const Header = ({ actions, appName, search }: HeaderProps) => {
|
|
7
|
-
// #########
|
|
8
|
-
// Rendering
|
|
9
|
-
return (
|
|
10
|
-
<header>
|
|
11
|
-
<div className="header-aside">
|
|
12
|
-
<div className="header-techoff" dangerouslySetInnerHTML={{ __html: icons[`header-${appName}`] }} />
|
|
13
|
-
</div>
|
|
14
|
-
{/* {search && <div className="header-search-bar">{search}</div>} */}
|
|
15
|
-
<div className="header-aside header-right-side">
|
|
16
|
-
<div className="header-actions">{actions}</div>
|
|
17
|
-
</div>
|
|
18
|
-
</header>
|
|
19
|
-
);
|
|
20
|
-
};
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { PropsWithChildren, useState } from 'react';
|
|
3
|
-
import { Icon } from '../../components/Icon/Icon';
|
|
4
|
-
import { useClickOutside } from '../../hooks/use-click-outside';
|
|
5
|
-
import { capitalize } from '../../utils/string.utils';
|
|
6
|
-
import { HeaderProfileItemProps, HeaderProfileProps } from './Header.types';
|
|
7
|
-
|
|
8
|
-
export const HeaderProfileItem = ({ icon, label, link }: HeaderProfileItemProps) => {
|
|
9
|
-
// ########
|
|
10
|
-
// Handlers
|
|
11
|
-
const handleNavigate = () => window.open(link, '_blank', 'noreferrer');
|
|
12
|
-
|
|
13
|
-
// #########
|
|
14
|
-
// Rendering
|
|
15
|
-
return (
|
|
16
|
-
<div className="header-profile-menu-item" onClick={handleNavigate}>
|
|
17
|
-
<div className="header-profile-menu-item-icon">
|
|
18
|
-
<Icon name={icon} size="16" />
|
|
19
|
-
</div>
|
|
20
|
-
<div className="header-profile-menu-item-label">{label}</div>
|
|
21
|
-
<div className="header-profile-menu-item-icon">
|
|
22
|
-
<Icon name="external-link" size="16" />
|
|
23
|
-
</div>
|
|
24
|
-
</div>
|
|
25
|
-
);
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export const HeaderProfile = ({ children, firstname, lastname }: HeaderProfileProps & PropsWithChildren) => {
|
|
29
|
-
const [isOpen, setIsOpen] = useState<boolean>(false);
|
|
30
|
-
const ref = useClickOutside(() => setIsOpen(false));
|
|
31
|
-
|
|
32
|
-
// #########
|
|
33
|
-
// Rendering
|
|
34
|
-
return (
|
|
35
|
-
<div className="header-profile-container" ref={ref}>
|
|
36
|
-
<div className="header-profile-dropdown" onClick={() => children && setIsOpen(prev => !prev)}>
|
|
37
|
-
<div className="header-profile-img-container">
|
|
38
|
-
<div className="header-profile-img-icon">
|
|
39
|
-
<Icon name="user" size="16" />
|
|
40
|
-
</div>
|
|
41
|
-
</div>
|
|
42
|
-
<div className="header-profile-name">
|
|
43
|
-
{capitalize(firstname)} {lastname.charAt(0).toUpperCase()}.
|
|
44
|
-
</div>
|
|
45
|
-
|
|
46
|
-
{children && (
|
|
47
|
-
<div className="header-profile-chevron">
|
|
48
|
-
<Icon name={isOpen ? 'chevron-up' : 'chevron-down'} size="16" />
|
|
49
|
-
</div>
|
|
50
|
-
)}
|
|
51
|
-
</div>
|
|
52
|
-
|
|
53
|
-
{isOpen && <div className="header-profile-menu">{children}</div>}
|
|
54
|
-
</div>
|
|
55
|
-
);
|
|
56
|
-
};
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { PropsWithChildren } from 'react';
|
|
3
|
-
import { Icon } from '../../components/Icon/Icon';
|
|
4
|
-
import { NavigationBreadcrumbItemProps, NavigationProps } from './Navigation.types';
|
|
5
|
-
import './Navigation.css';
|
|
6
|
-
|
|
7
|
-
export const NavigationBreadcrumbDivider = () => {
|
|
8
|
-
// #########
|
|
9
|
-
// Rendering
|
|
10
|
-
return (
|
|
11
|
-
<div className="breadcrumb-chevron">
|
|
12
|
-
<Icon name="chevron-right" />
|
|
13
|
-
</div>
|
|
14
|
-
);
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export const NavigationBreadcrumbItem = ({
|
|
18
|
-
children,
|
|
19
|
-
icon,
|
|
20
|
-
highlight,
|
|
21
|
-
onClick,
|
|
22
|
-
}: PropsWithChildren<NavigationBreadcrumbItemProps>) => {
|
|
23
|
-
// #########
|
|
24
|
-
// Rendering
|
|
25
|
-
return (
|
|
26
|
-
<div
|
|
27
|
-
className={`
|
|
28
|
-
breadcrumb-item
|
|
29
|
-
${highlight ? 'breadcrumb-item--highlight' : ''} ${onClick ? 'breadcrumb-item--link' : ''}
|
|
30
|
-
`}
|
|
31
|
-
onClick={onClick}
|
|
32
|
-
>
|
|
33
|
-
{icon && (
|
|
34
|
-
<div className="breadcrumb-item--icon">
|
|
35
|
-
<Icon name={icon} size="16" />
|
|
36
|
-
</div>
|
|
37
|
-
)}
|
|
38
|
-
|
|
39
|
-
{children}
|
|
40
|
-
</div>
|
|
41
|
-
);
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
export const Navigation = ({ actions, breadcrumbs }: NavigationProps) => {
|
|
45
|
-
// #########
|
|
46
|
-
// Rendering
|
|
47
|
-
return (
|
|
48
|
-
<div className="navigation">
|
|
49
|
-
<div className="breadcrumb">{breadcrumbs}</div>
|
|
50
|
-
<div className="navigation-divider" />
|
|
51
|
-
<div className="navigation-actions">{actions}</div>
|
|
52
|
-
</div>
|
|
53
|
-
);
|
|
54
|
-
};
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ArgsTable, Canvas, Meta, Story } from '@storybook/blocks';
|
|
3
|
-
import { Navigation, NavigationBreadcrumbItem, NavigationBreadcrumbDivider } from '../Navigation';
|
|
4
|
-
import { Button } from '../../../components/Button/Button';
|
|
5
|
-
import { icons } from '../../../components/Icon/icons';
|
|
6
|
-
|
|
7
|
-
<Meta title="Layouts/Navigation" />
|
|
8
|
-
|
|
9
|
-
# Navigation
|
|
10
|
-
|
|
11
|
-
Breadcrumbs are an important navigation component that shows content hierarchy. They allow users to be aware of their current location in the hierarchical structure of the application. Breadcrumbs enable users to quickly move up to a parent level. Moreover this navigation component allows user to make some actions.
|
|
12
|
-
|
|
13
|
-
## Overview
|
|
14
|
-
|
|
15
|
-
<Canvas>
|
|
16
|
-
<Story
|
|
17
|
-
name="Overview"
|
|
18
|
-
args={{
|
|
19
|
-
actions: (
|
|
20
|
-
<>
|
|
21
|
-
<Button icon="check" onClick={() => {}}>
|
|
22
|
-
Action 1
|
|
23
|
-
</Button>
|
|
24
|
-
<Button icon="add" onClick={() => {}}>
|
|
25
|
-
Action 2
|
|
26
|
-
</Button>
|
|
27
|
-
</>
|
|
28
|
-
),
|
|
29
|
-
breadcrumbs: (
|
|
30
|
-
<>
|
|
31
|
-
<NavigationBreadcrumbItem icon="home" onClick={() => {}}>
|
|
32
|
-
Home
|
|
33
|
-
</NavigationBreadcrumbItem>
|
|
34
|
-
<NavigationBreadcrumbDivider />
|
|
35
|
-
<NavigationBreadcrumbItem onClick={() => {}}>Menu Item 1</NavigationBreadcrumbItem>
|
|
36
|
-
<NavigationBreadcrumbDivider />
|
|
37
|
-
<NavigationBreadcrumbItem highlight>Menu Item 2</NavigationBreadcrumbItem>
|
|
38
|
-
</>
|
|
39
|
-
)
|
|
40
|
-
}}
|
|
41
|
-
|
|
42
|
-
>
|
|
43
|
-
|
|
44
|
-
{args => <Navigation {...args} />}
|
|
45
|
-
|
|
46
|
-
</Story>
|
|
47
|
-
</Canvas>
|
|
48
|
-
|
|
49
|
-
## Props
|
|
50
|
-
|
|
51
|
-
<ArgsTable story="Overview" of={Navigation} />
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|