@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
|
@@ -17,31 +17,31 @@ header {
|
|
|
17
17
|
height: 64px;
|
|
18
18
|
padding: 0 24px;
|
|
19
19
|
}
|
|
20
|
-
.header-aside {
|
|
20
|
+
.ts-header-aside {
|
|
21
21
|
display: flex;
|
|
22
22
|
align-items: center;
|
|
23
23
|
flex: 1;
|
|
24
24
|
height: 100%;
|
|
25
25
|
}
|
|
26
|
-
.header-right-side {
|
|
26
|
+
.ts-header-right-side {
|
|
27
27
|
justify-content: flex-end;
|
|
28
28
|
}
|
|
29
|
-
.header-search-bar {
|
|
29
|
+
.ts-header-search-bar {
|
|
30
30
|
display: flex;
|
|
31
31
|
align-items: center;
|
|
32
32
|
width: 400px;
|
|
33
33
|
height: 100%;
|
|
34
34
|
}
|
|
35
|
-
.header-actions {
|
|
35
|
+
.ts-header-actions {
|
|
36
36
|
display: flex;
|
|
37
37
|
}
|
|
38
|
-
.header-actions > * {
|
|
38
|
+
.ts-header-actions > * {
|
|
39
39
|
margin-left: 12px;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
/* ################ */
|
|
43
43
|
/* HEADER TECHOFF */
|
|
44
|
-
.header-techoff {
|
|
44
|
+
.ts-header-techoff {
|
|
45
45
|
display: flex;
|
|
46
46
|
height: 18px;
|
|
47
47
|
margin-left: 4px;
|
|
@@ -49,10 +49,10 @@ header {
|
|
|
49
49
|
|
|
50
50
|
/* ################ */
|
|
51
51
|
/* HEADER PROFILE */
|
|
52
|
-
.header-profile-container {
|
|
52
|
+
.ts-header-profile-container {
|
|
53
53
|
position: relative;
|
|
54
54
|
}
|
|
55
|
-
.header-profile-dropdown {
|
|
55
|
+
.ts-header-profile-dropdown {
|
|
56
56
|
display: flex;
|
|
57
57
|
height: 40px;
|
|
58
58
|
border-radius: 9999px;
|
|
@@ -61,13 +61,13 @@ header {
|
|
|
61
61
|
background-color: #ffffff;
|
|
62
62
|
cursor: pointer;
|
|
63
63
|
}
|
|
64
|
-
.header-profile-img-container {
|
|
64
|
+
.ts-header-profile-img-container {
|
|
65
65
|
width: 40px;
|
|
66
66
|
height: 40px;
|
|
67
67
|
padding: 4px;
|
|
68
68
|
border-radius: 9999px;
|
|
69
69
|
}
|
|
70
|
-
.header-profile-img-icon {
|
|
70
|
+
.ts-header-profile-img-icon {
|
|
71
71
|
display: flex;
|
|
72
72
|
align-items: center;
|
|
73
73
|
justify-content: center;
|
|
@@ -76,14 +76,14 @@ header {
|
|
|
76
76
|
border-radius: 9999px;
|
|
77
77
|
background-color: rgb(229, 229, 229);
|
|
78
78
|
}
|
|
79
|
-
.header-profile-name {
|
|
79
|
+
.ts-header-profile-name {
|
|
80
80
|
display: flex;
|
|
81
81
|
flex: 1;
|
|
82
82
|
align-items: center;
|
|
83
83
|
padding-left: 4px;
|
|
84
84
|
padding-right: 16px;
|
|
85
85
|
}
|
|
86
|
-
.header-profile-chevron {
|
|
86
|
+
.ts-header-profile-chevron {
|
|
87
87
|
display: flex;
|
|
88
88
|
align-items: center;
|
|
89
89
|
justify-content: center;
|
|
@@ -91,7 +91,7 @@ header {
|
|
|
91
91
|
padding-right: 14px;
|
|
92
92
|
border-radius: 9999px;
|
|
93
93
|
}
|
|
94
|
-
.header-profile-menu {
|
|
94
|
+
.ts-header-profile-menu {
|
|
95
95
|
position: absolute;
|
|
96
96
|
right: 0;
|
|
97
97
|
top: 48px;
|
|
@@ -102,35 +102,35 @@ header {
|
|
|
102
102
|
background-color: #ffffff;
|
|
103
103
|
z-index: 10;
|
|
104
104
|
}
|
|
105
|
-
.header-profile-menu-item {
|
|
105
|
+
.ts-header-profile-menu-item {
|
|
106
106
|
display: flex;
|
|
107
107
|
align-items: center;
|
|
108
108
|
height: 36px;
|
|
109
109
|
border-radius: 6px;
|
|
110
110
|
cursor: pointer;
|
|
111
111
|
}
|
|
112
|
-
.header-profile-menu-item:hover {
|
|
112
|
+
.ts-header-profile-menu-item:hover {
|
|
113
113
|
background-color: #e7f3f9;
|
|
114
114
|
}
|
|
115
|
-
.header-profile-menu-item-icon {
|
|
115
|
+
.ts-header-profile-menu-item-icon {
|
|
116
116
|
display: flex;
|
|
117
117
|
align-items: center;
|
|
118
118
|
justify-content: center;
|
|
119
119
|
width: 36px;
|
|
120
120
|
height: 36px;
|
|
121
121
|
}
|
|
122
|
-
.header-profile-menu-item-label {
|
|
122
|
+
.ts-header-profile-menu-item-label {
|
|
123
123
|
flex: 1;
|
|
124
124
|
padding: 0 2px;
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
/* ############### */
|
|
128
128
|
/* HEADER SEARCH */
|
|
129
|
-
.header-search {
|
|
129
|
+
.ts-header-search {
|
|
130
130
|
position: relative;
|
|
131
131
|
width: 100%;
|
|
132
132
|
}
|
|
133
|
-
.header-search-items-container {
|
|
133
|
+
.ts-header-search-items-container {
|
|
134
134
|
position: absolute;
|
|
135
135
|
top: calc(100% + 4px);
|
|
136
136
|
width: 100%;
|
|
@@ -141,13 +141,13 @@ header {
|
|
|
141
141
|
overflow-y: auto;
|
|
142
142
|
z-index: 100;
|
|
143
143
|
}
|
|
144
|
-
.header-search-loading {
|
|
144
|
+
.ts-header-search-loading {
|
|
145
145
|
display: flex;
|
|
146
146
|
align-items: center;
|
|
147
147
|
justify-content: center;
|
|
148
148
|
height: 40px;
|
|
149
149
|
}
|
|
150
|
-
.header-search-no-items {
|
|
150
|
+
.ts-header-search-no-items {
|
|
151
151
|
display: flex;
|
|
152
152
|
align-items: center;
|
|
153
153
|
justify-content: center;
|
|
@@ -155,10 +155,10 @@ header {
|
|
|
155
155
|
color: #8c96a2;
|
|
156
156
|
font-style: italic;
|
|
157
157
|
}
|
|
158
|
-
.header-search-items {
|
|
158
|
+
.ts-header-search-items {
|
|
159
159
|
padding: 8px;
|
|
160
160
|
}
|
|
161
|
-
.header-search-item {
|
|
161
|
+
.ts-header-search-item {
|
|
162
162
|
display: flex;
|
|
163
163
|
align-items: center;
|
|
164
164
|
height: 32px;
|
|
@@ -166,10 +166,10 @@ header {
|
|
|
166
166
|
border-radius: 4px;
|
|
167
167
|
cursor: pointer;
|
|
168
168
|
}
|
|
169
|
-
.header-search-item:hover {
|
|
169
|
+
.ts-header-search-item:hover {
|
|
170
170
|
background: #e7f3f9;
|
|
171
171
|
}
|
|
172
|
-
.header-search-item--match {
|
|
172
|
+
.ts-header-search-item--match {
|
|
173
173
|
background: #cce5f2;
|
|
174
174
|
color: #007dbc;
|
|
175
175
|
font-weight: 700;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { icons } from '../../components/TsIcon/icons';
|
|
3
|
+
import './TsHeader.css';
|
|
4
|
+
export const TsHeader = ({ actions, appName }) => {
|
|
5
|
+
// #########
|
|
6
|
+
// Rendering
|
|
7
|
+
return (React.createElement("header", null,
|
|
8
|
+
React.createElement("div", { className: "ts-header-aside" },
|
|
9
|
+
React.createElement("div", { className: "ts-header-techoff", dangerouslySetInnerHTML: { __html: icons[`header-${appName}`] } })),
|
|
10
|
+
React.createElement("div", { className: "ts-header-aside ts-header-right-side" },
|
|
11
|
+
React.createElement("div", { className: "ts-header-actions" }, actions))));
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=TsHeader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TsHeader.js","sourceRoot":"","sources":["../../../src/layouts/TsHeader/TsHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAEtD,OAAO,gBAAgB,CAAC;AAExB,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,EAAE,OAAO,EAAE,OAAO,EAAiB,EAAE,EAAE;IAC9D,YAAY;IACZ,YAAY;IACZ,OAAO,CACL;QACE,6BAAK,SAAS,EAAC,iBAAiB;YAC9B,6BAAK,SAAS,EAAC,mBAAmB,EAAC,uBAAuB,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,UAAU,OAAO,EAAE,CAAC,EAAE,GAAI,CAClG;QAEN,6BAAK,SAAS,EAAC,sCAAsC;YACnD,6BAAK,SAAS,EAAC,mBAAmB,IAAE,OAAO,CAAO,CAC9C,CACC,CACV,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
export type TsHeaderProps = {
|
|
3
|
+
actions: ReactElement;
|
|
4
|
+
appName: 'bikestudio' | 'nsc-helmet' | 'opticost' | 'repairability';
|
|
5
|
+
search?: ReactElement;
|
|
6
|
+
};
|
|
7
|
+
export type TsHeaderProfileItemProps = {
|
|
8
|
+
icon: string;
|
|
9
|
+
label: string;
|
|
10
|
+
link: string;
|
|
11
|
+
};
|
|
12
|
+
export type TsHeaderProfileProps = {
|
|
13
|
+
firstname: string;
|
|
14
|
+
lastname: string;
|
|
15
|
+
};
|
|
16
|
+
export type TsHeaderSearchProps = {
|
|
17
|
+
getItemLabel: (e: any) => string;
|
|
18
|
+
getItemValue: (e: any) => string;
|
|
19
|
+
loadItems: (search?: string) => Promise<any[]>;
|
|
20
|
+
noDataLabel?: string;
|
|
21
|
+
placeholder?: string;
|
|
22
|
+
onChange: (value: string) => void;
|
|
23
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TsHeader.types.js","sourceRoot":"","sources":["../../../src/layouts/TsHeader/TsHeader.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { PropsWithChildren } from 'react';
|
|
3
|
+
import { TsHeaderProfileItemProps, TsHeaderProfileProps } from './TsHeader.types';
|
|
4
|
+
export declare const TsHeaderProfileItem: ({ icon, label, link }: TsHeaderProfileItemProps) => React.JSX.Element;
|
|
5
|
+
export declare const TsHeaderProfile: ({ children, firstname, lastname }: TsHeaderProfileProps & PropsWithChildren) => React.JSX.Element;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { TsIcon } from '../../components/TsIcon/TsIcon';
|
|
4
|
+
import { useClickOutside } from '../../hooks/use-click-outside';
|
|
5
|
+
import { capitalize } from '../../utils/string.utils';
|
|
6
|
+
export const TsHeaderProfileItem = ({ icon, label, link }) => {
|
|
7
|
+
// ########
|
|
8
|
+
// Handlers
|
|
9
|
+
const handleNavigate = () => window.open(link, '_blank', 'noreferrer');
|
|
10
|
+
// #########
|
|
11
|
+
// Rendering
|
|
12
|
+
return (React.createElement("div", { className: "ts-header-profile-menu-item", onClick: handleNavigate },
|
|
13
|
+
React.createElement("div", { className: "ts-header-profile-menu-item-icon" },
|
|
14
|
+
React.createElement(TsIcon, { name: icon, size: "16" })),
|
|
15
|
+
React.createElement("div", { className: "ts-header-profile-menu-item-label" }, label),
|
|
16
|
+
React.createElement("div", { className: "ts-header-profile-menu-item-icon" },
|
|
17
|
+
React.createElement(TsIcon, { name: "external-link", size: "16" }))));
|
|
18
|
+
};
|
|
19
|
+
export const TsHeaderProfile = ({ children, firstname, lastname }) => {
|
|
20
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
21
|
+
const ref = useClickOutside(() => setIsOpen(false));
|
|
22
|
+
// #########
|
|
23
|
+
// Rendering
|
|
24
|
+
return (React.createElement("div", { className: "ts-header-profile-container", ref: ref },
|
|
25
|
+
React.createElement("div", { className: "ts-header-profile-dropdown", onClick: () => children && setIsOpen(prev => !prev) },
|
|
26
|
+
React.createElement("div", { className: "ts-header-profile-img-container" },
|
|
27
|
+
React.createElement("div", { className: "ts-header-profile-img-icon" },
|
|
28
|
+
React.createElement(TsIcon, { name: "user", size: "16" }))),
|
|
29
|
+
React.createElement("div", { className: "ts-header-profile-name" },
|
|
30
|
+
capitalize(firstname),
|
|
31
|
+
" ",
|
|
32
|
+
lastname.charAt(0).toUpperCase(),
|
|
33
|
+
"."),
|
|
34
|
+
children && (React.createElement("div", { className: "ts-header-profile-chevron" },
|
|
35
|
+
React.createElement(TsIcon, { name: isOpen ? 'chevron-up' : 'chevron-down', size: "16" })))),
|
|
36
|
+
isOpen && React.createElement("div", { className: "ts-header-profile-menu" }, children)));
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=TsHeaderProfile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TsHeaderProfile.js","sourceRoot":"","sources":["../../../src/layouts/TsHeader/TsHeaderProfile.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAqB,QAAQ,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAGtD,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAA4B,EAAE,EAAE;IACrF,WAAW;IACX,WAAW;IACX,MAAM,cAAc,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,YAAY,CAAC,C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BAAK,SAAS,EAAC,2BAA2B;gBACxC,oBAAC,MAAM,IAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,cAAc,EAAE,IAAI,EAAC,IAAI,GAAG,CAC9D,CACP,CACG;QAEL,MAAM,IAAI,6BAAK,SAAS,EAAC,wBAAwB,IAAE,QAAQ,CAAO,CAC/D,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { useEffect, useState } from 'react';
|
|
3
|
+
// import { Input } from '../../components/Inputs/Input/Input';
|
|
4
|
+
import { TsLoader } from '../../components/TsLoader/TsLoader';
|
|
5
|
+
import { useClickOutside } from '../../hooks/use-click-outside';
|
|
6
|
+
export const TsHeaderSearch = ({ getItemLabel, getItemValue, loadItems, noDataLabel, onChange, }) => {
|
|
7
|
+
const [searchValue] = useState('');
|
|
8
|
+
const [items, setItems] = useState([]);
|
|
9
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
10
|
+
const [showItems, setShowItems] = useState(false);
|
|
11
|
+
const ref = useClickOutside(() => setShowItems(false));
|
|
12
|
+
// #######
|
|
13
|
+
// Helpers
|
|
14
|
+
const getBeforeMatch = (item) => {
|
|
15
|
+
const label = getItemLabel(item);
|
|
16
|
+
const matchStartIndex = label.toLowerCase().indexOf(searchValue.toLowerCase());
|
|
17
|
+
return label.substring(0, matchStartIndex);
|
|
18
|
+
};
|
|
19
|
+
const getMatch = (item) => {
|
|
20
|
+
const label = getItemLabel(item);
|
|
21
|
+
const matchStartIndex = label.toLowerCase().indexOf(searchValue.toLowerCase());
|
|
22
|
+
const matchEndIndex = matchStartIndex + searchValue.length;
|
|
23
|
+
return label.substring(matchStartIndex, matchEndIndex);
|
|
24
|
+
};
|
|
25
|
+
const getAfterMatch = (item) => {
|
|
26
|
+
const label = getItemLabel(item);
|
|
27
|
+
const matchStartIndex = label.toLowerCase().indexOf(searchValue.toLowerCase());
|
|
28
|
+
const matchEndIndex = matchStartIndex + searchValue.length;
|
|
29
|
+
return label.substring(matchEndIndex);
|
|
30
|
+
};
|
|
31
|
+
// ########
|
|
32
|
+
// Watchers
|
|
33
|
+
useEffect(() => {
|
|
34
|
+
if (searchValue === '') {
|
|
35
|
+
setShowItems(false);
|
|
36
|
+
setItems([]);
|
|
37
|
+
setIsLoading(false);
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
setShowItems(true);
|
|
41
|
+
setIsLoading(true);
|
|
42
|
+
loadItems(searchValue)
|
|
43
|
+
.then(setItems)
|
|
44
|
+
.finally(() => setIsLoading(false));
|
|
45
|
+
}
|
|
46
|
+
}, [searchValue]);
|
|
47
|
+
// #########
|
|
48
|
+
// Rendering
|
|
49
|
+
return (React.createElement("div", { className: "ts-header-search", ref: ref }, showItems && searchValue !== '' && (React.createElement("div", { className: "ts-header-search-items-container" },
|
|
50
|
+
isLoading && (React.createElement("div", { className: "ts-header-search-loading" },
|
|
51
|
+
React.createElement(TsLoader, { size: "sm" }))),
|
|
52
|
+
!isLoading && items.length === 0 && React.createElement("div", { className: "ts-header-search-no-items" }, noDataLabel),
|
|
53
|
+
!isLoading && items.length > 0 && (React.createElement("div", { className: "ts-header-search-items" }, items.map(item => (React.createElement("div", { className: "ts-header-search-item", onClick: () => onChange(getItemValue(item)) },
|
|
54
|
+
getBeforeMatch(item),
|
|
55
|
+
React.createElement("span", { className: "ts-header-search-item--match" }, getMatch(item)),
|
|
56
|
+
getAfterMatch(item))))))))));
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=TsHeaderSearch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TsHeaderSearch.js","sourceRoot":"","sources":["../../../src/layouts/TsHeader/TsHeaderSearch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAA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,SAAS,EAAC,2BAA2B,IAAE,WAAW,CAAO;QAClG,CAAC,SAAS,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,CACjC,6BAAK,SAAS,EAAC,wBAAwB,IACpC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CACjB,6BAAK,SAAS,EAAC,uBAAuB,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;YAC/E,cAAc,CAAC,IAAI,CAAC;YACrB,8BAAM,SAAS,EAAC,8BAA8B,IAAE,QAAQ,CAAC,IAAI,CAAC,CAAQ;YACrE,aAAa,CAAC,IAAI,CAAC,CAChB,CACP,CAAC,CACE,CACP,CACG,CACP,CACG,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ArgsTable, Canvas, Meta, Story } from '@storybook/blocks';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
3
|
+
import { TsHeader } from '../TsHeader';
|
|
4
|
+
import { TsHeaderProfile, TsHeaderProfileItem } from '../TsHeaderProfile';
|
|
5
|
+
import { TsHeaderSearch } from '../TsHeaderSearch';
|
|
6
|
+
import { TsButton } from '../../../components/TsButton/TsButton';
|
|
7
7
|
|
|
8
8
|
<Meta title="Layouts/Header" />
|
|
9
9
|
|
|
@@ -41,16 +41,16 @@ The header will allow users to quickly find the information they need at a glanc
|
|
|
41
41
|
args={{
|
|
42
42
|
actions: (
|
|
43
43
|
<>
|
|
44
|
-
<
|
|
45
|
-
<
|
|
46
|
-
<
|
|
47
|
-
<
|
|
48
|
-
</
|
|
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
49
|
</>
|
|
50
50
|
),
|
|
51
51
|
appName: 'repairability',
|
|
52
52
|
search: (
|
|
53
|
-
<
|
|
53
|
+
<TsHeaderSearch
|
|
54
54
|
getItemLabel={item => item.label}
|
|
55
55
|
getItemValue={item => item.id}
|
|
56
56
|
loadItems={loadItems}
|
|
@@ -62,10 +62,10 @@ The header will allow users to quickly find the information they need at a glanc
|
|
|
62
62
|
}}
|
|
63
63
|
argTypes={headerArgTypes}
|
|
64
64
|
>
|
|
65
|
-
{args => <
|
|
65
|
+
{args => <TsHeader {...args} />}
|
|
66
66
|
</Story>
|
|
67
67
|
</Canvas>
|
|
68
68
|
|
|
69
69
|
## Props
|
|
70
70
|
|
|
71
|
-
<ArgsTable story="Overview" of={
|
|
71
|
+
<ArgsTable story="Overview" of={TsHeader} />
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.navigation {
|
|
1
|
+
.ts-navigation {
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
height: 32px;
|
|
@@ -7,45 +7,45 @@
|
|
|
7
7
|
|
|
8
8
|
/* ############ */
|
|
9
9
|
/* BREADCRUMB */
|
|
10
|
-
.breadcrumb {
|
|
10
|
+
.ts-breadcrumb {
|
|
11
11
|
display: flex;
|
|
12
12
|
align-items: center;
|
|
13
13
|
padding-right: 20px;
|
|
14
14
|
}
|
|
15
|
-
.breadcrumb-container {
|
|
15
|
+
.ts-breadcrumb-container {
|
|
16
16
|
display: flex;
|
|
17
17
|
align-items: center;
|
|
18
18
|
}
|
|
19
|
-
.breadcrumb-chevron {
|
|
19
|
+
.ts-breadcrumb-chevron {
|
|
20
20
|
padding: 0 8px;
|
|
21
21
|
color: #3643ba;
|
|
22
22
|
}
|
|
23
|
-
.breadcrumb-item {
|
|
23
|
+
.ts-breadcrumb-item {
|
|
24
24
|
display: flex;
|
|
25
25
|
align-items: center;
|
|
26
26
|
height: 32px;
|
|
27
27
|
border-radius: 9999px;
|
|
28
28
|
color: #3643ba;
|
|
29
29
|
}
|
|
30
|
-
.breadcrumb-item--highlight {
|
|
30
|
+
.ts-breadcrumb-item--highlight {
|
|
31
31
|
padding: 0 20px;
|
|
32
32
|
box-shadow: 0px 6px 6px 0px #00537d1a;
|
|
33
33
|
background: linear-gradient(270deg, #3643ba 0%, rgba(54, 67, 186, 0.6) 100%);
|
|
34
34
|
color: #ffffff;
|
|
35
35
|
}
|
|
36
|
-
.breadcrumb-item--link {
|
|
36
|
+
.ts-breadcrumb-item--link {
|
|
37
37
|
cursor: pointer;
|
|
38
38
|
}
|
|
39
|
-
.breadcrumb-item--link:hover {
|
|
39
|
+
.ts-breadcrumb-item--link:hover {
|
|
40
40
|
text-decoration: underline;
|
|
41
41
|
}
|
|
42
|
-
.breadcrumb-item--icon {
|
|
42
|
+
.ts-breadcrumb-item--icon {
|
|
43
43
|
padding-right: 8px;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
/* ######### */
|
|
47
47
|
/* DIVIDER */
|
|
48
|
-
.navigation-divider {
|
|
48
|
+
.ts-navigation-divider {
|
|
49
49
|
flex: 1;
|
|
50
50
|
height: 1px;
|
|
51
51
|
margin: 4px 0;
|
|
@@ -54,12 +54,12 @@
|
|
|
54
54
|
|
|
55
55
|
/* ######### */
|
|
56
56
|
/* ACTIONS */
|
|
57
|
-
.navigation-actions {
|
|
57
|
+
.ts-navigation-actions {
|
|
58
58
|
/* flex items-center [&>*]:ml-4 */
|
|
59
59
|
display: flex;
|
|
60
60
|
align-items: center;
|
|
61
61
|
}
|
|
62
|
-
.navigation-actions > * {
|
|
62
|
+
.ts-navigation-actions > * {
|
|
63
63
|
margin-left: 16px;
|
|
64
64
|
}
|
|
65
65
|
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { PropsWithChildren } from 'react';
|
|
3
|
+
import { TsNavigationBreadcrumbItemProps, TsNavigationProps } from './TsNavigation.types';
|
|
4
|
+
import './TsNavigation.css';
|
|
5
|
+
export declare const TsNavigationBreadcrumbDivider: () => React.JSX.Element;
|
|
6
|
+
export declare const TsNavigationBreadcrumbItem: ({ children, icon, highlight, onClick, }: PropsWithChildren<TsNavigationBreadcrumbItemProps>) => React.JSX.Element;
|
|
7
|
+
export declare const TsNavigation: ({ actions, breadcrumbs }: TsNavigationProps) => React.JSX.Element;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { TsIcon } from '../../components/TsIcon/TsIcon';
|
|
3
|
+
import './TsNavigation.css';
|
|
4
|
+
export const TsNavigationBreadcrumbDivider = () => {
|
|
5
|
+
// #########
|
|
6
|
+
// Rendering
|
|
7
|
+
return (React.createElement("div", { className: "ts-breadcrumb-chevron" },
|
|
8
|
+
React.createElement(TsIcon, { name: "chevron-right" })));
|
|
9
|
+
};
|
|
10
|
+
export const TsNavigationBreadcrumbItem = ({ children, icon, highlight, onClick, }) => {
|
|
11
|
+
// #########
|
|
12
|
+
// Rendering
|
|
13
|
+
return (React.createElement("div", { className: `
|
|
14
|
+
ts-breadcrumb-item
|
|
15
|
+
${highlight ? 'ts-breadcrumb-item--highlight' : ''} ${onClick ? 'ts-breadcrumb-item--link' : ''}
|
|
16
|
+
`, onClick: onClick },
|
|
17
|
+
icon && (React.createElement("div", { className: "ts-breadcrumb-item--icon" },
|
|
18
|
+
React.createElement(TsIcon, { name: icon, size: "16" }))),
|
|
19
|
+
children));
|
|
20
|
+
};
|
|
21
|
+
export const TsNavigation = ({ actions, breadcrumbs }) => {
|
|
22
|
+
// #########
|
|
23
|
+
// Rendering
|
|
24
|
+
return (React.createElement("div", { className: "ts-navigation" },
|
|
25
|
+
React.createElement("div", { className: "ts-breadcrumb" }, breadcrumbs),
|
|
26
|
+
React.createElement("div", { className: "ts-navigation-divider" }),
|
|
27
|
+
React.createElement("div", { className: "ts-navigation-actions" }, actions)));
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=TsNavigation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TsNavigation.js","sourceRoot":"","sources":["../../../src/layouts/TsNavigation/TsNavigation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAExD,OAAO,oBAAoB,CAAC;AAE5B,MAAM,CAAC,MAAM,6BAA6B,GAAG,GAAG,EAAE;IAChD,YAAY;IACZ,YAAY;IACZ,OAAO,CACL,6BAAK,SAAS,EAAC,uBAAuB;QACpC,oBAAC,MAAM,IAAC,IAAI,EAAC,eAAe,GAAG,CAC3B,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,EACzC,QAAQ,EACR,IAAI,EACJ,SAAS,EACT,OAAO,GAC4C,EAAE,EAAE;IACvD,YAAY;IACZ,YAAY;IACZ,OAAO,CACL,6BACE,SAAS,EAAE;;UAEP,SAAS,CAAC,CAAC,CAAC,+BAA+B,CAAC,CAAC,CAAC,EAAE,IAAI,OAAO,CAAC,CAAC,CAAC,0BAA0B,CAAC,CAAC,CAAC,EAAE;OAChG,EACD,OAAO,EAAE,OAAO;QAEf,IAAI,IAAI,CACP,6BAAK,SAAS,EAAC,0BAA0B;YACvC,oBAAC,MAAM,IAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAC,IAAI,GAAG,CAC5B,CACP;QAEA,QAAQ,CACL,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAAE,OAAO,EAAE,WAAW,EAAqB,EAAE,EAAE;IAC1E,YAAY;IACZ,YAAY;IACZ,OAAO,CACL,6BAAK,SAAS,EAAC,eAAe;QAC5B,6BAAK,SAAS,EAAC,eAAe,IAAE,WAAW,CAAO;QAClD,6BAAK,SAAS,EAAC,uBAAuB,GAAG;QACzC,6BAAK,SAAS,EAAC,uBAAuB,IAAE,OAAO,CAAO,CAClD,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TsNavigation.types.js","sourceRoot":"","sources":["../../../src/layouts/TsNavigation/TsNavigation.types.ts"],"names":[],"mappings":""}
|
|
@@ -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} />
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const capitalize: (str: string) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"string.utils.js","sourceRoot":"","sources":["../../src/utils/string.utils.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC"}
|
|
Binary file
|
|
Binary file
|