@dktunited-techoff/techoff-suite-ui 1.7.10 → 1.8.0
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/package.json +1 -1
- package/src/components/{TsDropdown → TsDropdowns/TsDropdown}/TsDropdown.tsx +5 -5
- package/{lib/components → src/components/TsDropdowns}/TsDropdown/__stories__/TsDropdown.stories.mdx +1 -1
- package/{lib/components/TsDropdown/TsDropdown.css → src/components/TsDropdowns/TsDropdownFilter/TsDropdownFilter.css} +24 -55
- package/src/components/TsDropdowns/TsDropdownFilter/TsDropdownFilter.tsx +104 -0
- package/src/components/TsDropdowns/TsDropdownFilter/TsDropdownFilter.types.ts +8 -0
- package/{esm/components/TsDropdown → src/components/TsDropdowns/TsDropdownFilter}/__stories__/TsDropdown.stories.mdx +13 -29
- package/src/components/TsInput/TsInput/TsInput.css +19 -0
- package/src/components/TsInput/TsInput/TsInput.tsx +5 -2
- package/src/components/TsInput/TsInput/TsInput.types.tsx +1 -0
- package/src/components/TsInput/TsInput/__stories__/TsInput.stories.mdx +5 -0
- package/src/index.ts +2 -1
- package/esm/assets/fonts/Montserrat-Medium.ttf +0 -0
- package/esm/assets/fonts/Roboto-Light.ttf +0 -0
- package/esm/components/TsButton/TsButton.css +0 -121
- package/esm/components/TsButton/TsButton.d.ts +0 -5
- package/esm/components/TsButton/TsButton.js +0 -17
- package/esm/components/TsButton/TsButton.js.map +0 -1
- package/esm/components/TsButton/TsButton.types.d.ts +0 -9
- package/esm/components/TsButton/TsButton.types.js +0 -2
- package/esm/components/TsButton/TsButton.types.js.map +0 -1
- package/esm/components/TsButton/__stories__/TsButton.stories.mdx +0 -84
- package/esm/components/TsCheckbox/TsCheckbox.css +0 -64
- package/esm/components/TsCheckbox/TsCheckbox.d.ts +0 -4
- package/esm/components/TsCheckbox/TsCheckbox.js +0 -17
- package/esm/components/TsCheckbox/TsCheckbox.js.map +0 -1
- package/esm/components/TsCheckbox/TsCheckbox.types.d.ts +0 -7
- package/esm/components/TsCheckbox/TsCheckbox.types.js +0 -2
- package/esm/components/TsCheckbox/TsCheckbox.types.js.map +0 -1
- package/esm/components/TsCheckbox/__stories__/TsCheckbox.stories.mdx +0 -56
- package/esm/components/TsDropdown/TsDropdown.d.ts +0 -4
- package/esm/components/TsDropdown/TsDropdown.js +0 -100
- package/esm/components/TsDropdown/TsDropdown.js.map +0 -1
- package/esm/components/TsDropdown/TsDropdown.types.d.ts +0 -17
- package/esm/components/TsDropdown/TsDropdown.types.js +0 -2
- package/esm/components/TsDropdown/TsDropdown.types.js.map +0 -1
- package/esm/components/TsDropdown/__stories__/fruits.d.ts +0 -4
- package/esm/components/TsDropdown/__stories__/fruits.js +0 -48
- package/esm/components/TsDropdown/__stories__/fruits.js.map +0 -1
- package/esm/components/TsIcon/TsIcon.css +0 -26
- package/esm/components/TsIcon/TsIcon.d.ts +0 -4
- package/esm/components/TsIcon/TsIcon.js +0 -12
- package/esm/components/TsIcon/TsIcon.js.map +0 -1
- package/esm/components/TsIcon/TsIcon.types.d.ts +0 -4
- package/esm/components/TsIcon/TsIcon.types.js +0 -2
- package/esm/components/TsIcon/TsIcon.types.js.map +0 -1
- package/esm/components/TsIcon/__stories__/TsIcon.stories.mdx +0 -89
- package/esm/components/TsIcon/icons/add-circle.svg +0 -1
- package/esm/components/TsIcon/icons/add.svg +0 -1
- package/esm/components/TsIcon/icons/alert-circle-filled.svg +0 -1
- package/esm/components/TsIcon/icons/alert-circle.svg +0 -1
- package/esm/components/TsIcon/icons/alert-triangle-filled.svg +0 -1
- package/esm/components/TsIcon/icons/alert-triangle.svg +0 -1
- package/esm/components/TsIcon/icons/arrow-diagonal-collapse.svg +0 -1
- package/esm/components/TsIcon/icons/arrow-diagonal-expand.svg +0 -1
- package/esm/components/TsIcon/icons/arrow-down.svg +0 -1
- package/esm/components/TsIcon/icons/arrow-go-back.svg +0 -1
- package/esm/components/TsIcon/icons/arrow-left-right.svg +0 -1
- package/esm/components/TsIcon/icons/arrow-left.svg +0 -1
- package/esm/components/TsIcon/icons/arrow-right.svg +0 -1
- package/esm/components/TsIcon/icons/arrow-up-down.svg +0 -1
- package/esm/components/TsIcon/icons/arrow-up.svg +0 -1
- package/esm/components/TsIcon/icons/award.svg +0 -1
- package/esm/components/TsIcon/icons/check-circle-filled.svg +0 -1
- package/esm/components/TsIcon/icons/check-circle-timer.svg +0 -7
- package/esm/components/TsIcon/icons/check-circle.svg +0 -1
- package/esm/components/TsIcon/icons/check-square-filled.svg +0 -1
- package/esm/components/TsIcon/icons/check-square.svg +0 -1
- package/esm/components/TsIcon/icons/check.svg +0 -1
- package/esm/components/TsIcon/icons/chevron-down.svg +0 -1
- package/esm/components/TsIcon/icons/chevron-left.svg +0 -1
- package/esm/components/TsIcon/icons/chevron-right.svg +0 -1
- package/esm/components/TsIcon/icons/chevron-up.svg +0 -1
- package/esm/components/TsIcon/icons/circle.svg +0 -1
- package/esm/components/TsIcon/icons/close-circle.svg +0 -1
- package/esm/components/TsIcon/icons/close.svg +0 -1
- package/esm/components/TsIcon/icons/currency-euro.svg +0 -1
- package/esm/components/TsIcon/icons/download.svg +0 -1
- package/esm/components/TsIcon/icons/edit.svg +0 -1
- package/esm/components/TsIcon/icons/external-link.svg +0 -1
- package/esm/components/TsIcon/icons/filter-off.svg +0 -1
- package/esm/components/TsIcon/icons/filter.svg +0 -1
- package/esm/components/TsIcon/icons/flashlight-off.svg +0 -1
- package/esm/components/TsIcon/icons/flashlight.svg +0 -1
- package/esm/components/TsIcon/icons/header-bikestudio.svg +0 -32
- package/esm/components/TsIcon/icons/header-nsc-helmet.svg +0 -32
- package/esm/components/TsIcon/icons/header-opticost.svg +0 -32
- package/esm/components/TsIcon/icons/header-repairability.svg +0 -32
- package/esm/components/TsIcon/icons/heart-filled.svg +0 -1
- package/esm/components/TsIcon/icons/heart.svg +0 -1
- package/esm/components/TsIcon/icons/history.svg +0 -1
- package/esm/components/TsIcon/icons/home.svg +0 -1
- package/esm/components/TsIcon/icons/index.d.ts +0 -3
- package/esm/components/TsIcon/icons/index.js +0 -61
- package/esm/components/TsIcon/icons/index.js.map +0 -1
- package/esm/components/TsIcon/icons/index.ts +0 -60
- package/esm/components/TsIcon/icons/link.svg +0 -1
- package/esm/components/TsIcon/icons/list-settings.svg +0 -1
- package/esm/components/TsIcon/icons/lock.svg +0 -1
- package/esm/components/TsIcon/icons/loop-right.svg +0 -1
- package/esm/components/TsIcon/icons/percent.svg +0 -1
- package/esm/components/TsIcon/icons/question-circle.svg +0 -1
- package/esm/components/TsIcon/icons/save.svg +0 -1
- package/esm/components/TsIcon/icons/search.svg +0 -1
- package/esm/components/TsIcon/icons/seedling-circle.svg +0 -12
- package/esm/components/TsIcon/icons/square.svg +0 -1
- package/esm/components/TsIcon/icons/timer.svg +0 -1
- package/esm/components/TsIcon/icons/tools.svg +0 -1
- package/esm/components/TsIcon/icons/user.svg +0 -1
- package/esm/components/TsInput/TsInput/TsInput.css +0 -73
- package/esm/components/TsInput/TsInput/TsInput.d.ts +0 -4
- package/esm/components/TsInput/TsInput/TsInput.js +0 -18
- package/esm/components/TsInput/TsInput/TsInput.js.map +0 -1
- package/esm/components/TsInput/TsInput/TsInput.tsx +0 -31
- package/esm/components/TsInput/TsInput/TsInput.types.d.ts +0 -7
- package/esm/components/TsInput/TsInput/TsInput.types.js +0 -2
- package/esm/components/TsInput/TsInput/TsInput.types.js.map +0 -1
- package/esm/components/TsInput/TsInput/TsInput.types.tsx +0 -8
- package/esm/components/TsInput/TsInput/__stories__/TsInput.stories.mdx +0 -72
- package/esm/components/TsLoader/TsLoader.css +0 -42
- package/esm/components/TsLoader/TsLoader.d.ts +0 -4
- package/esm/components/TsLoader/TsLoader.js +0 -6
- package/esm/components/TsLoader/TsLoader.js.map +0 -1
- package/esm/components/TsLoader/TsLoader.types.d.ts +0 -3
- package/esm/components/TsLoader/TsLoader.types.js +0 -2
- package/esm/components/TsLoader/TsLoader.types.js.map +0 -1
- package/esm/components/TsLoader/__stories__/TsLoader.stories.mdx +0 -30
- package/esm/components/TsTabs/TsTabs.css +0 -69
- package/esm/components/TsTabs/TsTabs.d.ts +0 -4
- package/esm/components/TsTabs/TsTabs.js +0 -30
- package/esm/components/TsTabs/TsTabs.js.map +0 -1
- package/esm/components/TsTabs/TsTabs.types.d.ts +0 -14
- package/esm/components/TsTabs/TsTabs.types.js +0 -2
- package/esm/components/TsTabs/TsTabs.types.js.map +0 -1
- package/esm/components/TsTabs/__stories__/TsTabs.stories.mdx +0 -50
- package/esm/hooks/use-click-outside.d.ts +0 -2
- package/esm/hooks/use-click-outside.js +0 -14
- package/esm/hooks/use-click-outside.js.map +0 -1
- package/esm/index.d.ts +0 -10
- package/esm/index.js +0 -11
- package/esm/index.js.map +0 -1
- package/esm/layouts/TsHeader/TsHeader.css +0 -186
- package/esm/layouts/TsHeader/TsHeader.d.ts +0 -4
- package/esm/layouts/TsHeader/TsHeader.js +0 -13
- package/esm/layouts/TsHeader/TsHeader.js.map +0 -1
- package/esm/layouts/TsHeader/TsHeader.types.d.ts +0 -23
- package/esm/layouts/TsHeader/TsHeader.types.js +0 -2
- package/esm/layouts/TsHeader/TsHeader.types.js.map +0 -1
- package/esm/layouts/TsHeader/TsHeaderProfile.d.ts +0 -5
- package/esm/layouts/TsHeader/TsHeaderProfile.js +0 -38
- package/esm/layouts/TsHeader/TsHeaderProfile.js.map +0 -1
- package/esm/layouts/TsHeader/TsHeaderSearch.d.ts +0 -3
- package/esm/layouts/TsHeader/TsHeaderSearch.js +0 -58
- package/esm/layouts/TsHeader/TsHeaderSearch.js.map +0 -1
- package/esm/layouts/TsHeader/__stories__/TsHeader.stories.mdx +0 -71
- package/esm/layouts/TsNavigation/TsNavigation.css +0 -72
- package/esm/layouts/TsNavigation/TsNavigation.d.ts +0 -7
- package/esm/layouts/TsNavigation/TsNavigation.js +0 -29
- package/esm/layouts/TsNavigation/TsNavigation.js.map +0 -1
- package/esm/layouts/TsNavigation/TsNavigation.types.d.ts +0 -10
- package/esm/layouts/TsNavigation/TsNavigation.types.js +0 -2
- package/esm/layouts/TsNavigation/TsNavigation.types.js.map +0 -1
- package/esm/layouts/TsNavigation/__stories__/TsNavigation.stories.mdx +0 -51
- package/esm/utils/string.utils.d.ts +0 -1
- package/esm/utils/string.utils.js +0 -2
- package/esm/utils/string.utils.js.map +0 -1
- package/lib/assets/fonts/Montserrat-Medium.ttf +0 -0
- package/lib/assets/fonts/Roboto-Light.ttf +0 -0
- package/lib/components/TsButton/TsButton.css +0 -121
- package/lib/components/TsButton/TsButton.d.ts +0 -5
- package/lib/components/TsButton/TsButton.js +0 -21
- package/lib/components/TsButton/TsButton.js.map +0 -1
- package/lib/components/TsButton/TsButton.types.d.ts +0 -9
- package/lib/components/TsButton/TsButton.types.js +0 -3
- package/lib/components/TsButton/TsButton.types.js.map +0 -1
- package/lib/components/TsButton/__stories__/TsButton.stories.mdx +0 -84
- package/lib/components/TsCheckbox/TsCheckbox.css +0 -64
- package/lib/components/TsCheckbox/TsCheckbox.d.ts +0 -4
- package/lib/components/TsCheckbox/TsCheckbox.js +0 -21
- package/lib/components/TsCheckbox/TsCheckbox.js.map +0 -1
- package/lib/components/TsCheckbox/TsCheckbox.types.d.ts +0 -7
- package/lib/components/TsCheckbox/TsCheckbox.types.js +0 -3
- package/lib/components/TsCheckbox/TsCheckbox.types.js.map +0 -1
- package/lib/components/TsCheckbox/__stories__/TsCheckbox.stories.mdx +0 -56
- package/lib/components/TsDropdown/TsDropdown.d.ts +0 -4
- package/lib/components/TsDropdown/TsDropdown.js +0 -104
- package/lib/components/TsDropdown/TsDropdown.js.map +0 -1
- package/lib/components/TsDropdown/TsDropdown.types.d.ts +0 -17
- package/lib/components/TsDropdown/TsDropdown.types.js +0 -3
- package/lib/components/TsDropdown/TsDropdown.types.js.map +0 -1
- package/lib/components/TsDropdown/__stories__/fruits.d.ts +0 -4
- package/lib/components/TsDropdown/__stories__/fruits.js +0 -51
- package/lib/components/TsDropdown/__stories__/fruits.js.map +0 -1
- package/lib/components/TsIcon/TsIcon.css +0 -26
- package/lib/components/TsIcon/TsIcon.d.ts +0 -4
- package/lib/components/TsIcon/TsIcon.js +0 -16
- package/lib/components/TsIcon/TsIcon.js.map +0 -1
- package/lib/components/TsIcon/TsIcon.types.d.ts +0 -4
- package/lib/components/TsIcon/TsIcon.types.js +0 -3
- package/lib/components/TsIcon/TsIcon.types.js.map +0 -1
- package/lib/components/TsIcon/__stories__/TsIcon.stories.mdx +0 -89
- package/lib/components/TsIcon/icons/add-circle.svg +0 -1
- package/lib/components/TsIcon/icons/add.svg +0 -1
- package/lib/components/TsIcon/icons/alert-circle-filled.svg +0 -1
- package/lib/components/TsIcon/icons/alert-circle.svg +0 -1
- package/lib/components/TsIcon/icons/alert-triangle-filled.svg +0 -1
- package/lib/components/TsIcon/icons/alert-triangle.svg +0 -1
- package/lib/components/TsIcon/icons/arrow-diagonal-collapse.svg +0 -1
- package/lib/components/TsIcon/icons/arrow-diagonal-expand.svg +0 -1
- package/lib/components/TsIcon/icons/arrow-down.svg +0 -1
- package/lib/components/TsIcon/icons/arrow-go-back.svg +0 -1
- package/lib/components/TsIcon/icons/arrow-left-right.svg +0 -1
- package/lib/components/TsIcon/icons/arrow-left.svg +0 -1
- package/lib/components/TsIcon/icons/arrow-right.svg +0 -1
- package/lib/components/TsIcon/icons/arrow-up-down.svg +0 -1
- package/lib/components/TsIcon/icons/arrow-up.svg +0 -1
- package/lib/components/TsIcon/icons/award.svg +0 -1
- package/lib/components/TsIcon/icons/check-circle-filled.svg +0 -1
- package/lib/components/TsIcon/icons/check-circle-timer.svg +0 -7
- package/lib/components/TsIcon/icons/check-circle.svg +0 -1
- package/lib/components/TsIcon/icons/check-square-filled.svg +0 -1
- package/lib/components/TsIcon/icons/check-square.svg +0 -1
- package/lib/components/TsIcon/icons/check.svg +0 -1
- package/lib/components/TsIcon/icons/chevron-down.svg +0 -1
- package/lib/components/TsIcon/icons/chevron-left.svg +0 -1
- package/lib/components/TsIcon/icons/chevron-right.svg +0 -1
- package/lib/components/TsIcon/icons/chevron-up.svg +0 -1
- package/lib/components/TsIcon/icons/circle.svg +0 -1
- package/lib/components/TsIcon/icons/close-circle.svg +0 -1
- package/lib/components/TsIcon/icons/close.svg +0 -1
- package/lib/components/TsIcon/icons/currency-euro.svg +0 -1
- package/lib/components/TsIcon/icons/download.svg +0 -1
- package/lib/components/TsIcon/icons/edit.svg +0 -1
- package/lib/components/TsIcon/icons/external-link.svg +0 -1
- package/lib/components/TsIcon/icons/filter-off.svg +0 -1
- package/lib/components/TsIcon/icons/filter.svg +0 -1
- package/lib/components/TsIcon/icons/flashlight-off.svg +0 -1
- package/lib/components/TsIcon/icons/flashlight.svg +0 -1
- package/lib/components/TsIcon/icons/header-bikestudio.svg +0 -32
- package/lib/components/TsIcon/icons/header-nsc-helmet.svg +0 -32
- package/lib/components/TsIcon/icons/header-opticost.svg +0 -32
- package/lib/components/TsIcon/icons/header-repairability.svg +0 -32
- package/lib/components/TsIcon/icons/heart-filled.svg +0 -1
- package/lib/components/TsIcon/icons/heart.svg +0 -1
- package/lib/components/TsIcon/icons/history.svg +0 -1
- package/lib/components/TsIcon/icons/home.svg +0 -1
- package/lib/components/TsIcon/icons/index.d.ts +0 -3
- package/lib/components/TsIcon/icons/index.js +0 -64
- package/lib/components/TsIcon/icons/index.js.map +0 -1
- package/lib/components/TsIcon/icons/index.ts +0 -60
- package/lib/components/TsIcon/icons/link.svg +0 -1
- package/lib/components/TsIcon/icons/list-settings.svg +0 -1
- package/lib/components/TsIcon/icons/lock.svg +0 -1
- package/lib/components/TsIcon/icons/loop-right.svg +0 -1
- package/lib/components/TsIcon/icons/percent.svg +0 -1
- package/lib/components/TsIcon/icons/question-circle.svg +0 -1
- package/lib/components/TsIcon/icons/save.svg +0 -1
- package/lib/components/TsIcon/icons/search.svg +0 -1
- package/lib/components/TsIcon/icons/seedling-circle.svg +0 -12
- package/lib/components/TsIcon/icons/square.svg +0 -1
- package/lib/components/TsIcon/icons/timer.svg +0 -1
- package/lib/components/TsIcon/icons/tools.svg +0 -1
- package/lib/components/TsIcon/icons/user.svg +0 -1
- package/lib/components/TsInput/TsInput/TsInput.css +0 -73
- package/lib/components/TsInput/TsInput/TsInput.d.ts +0 -4
- package/lib/components/TsInput/TsInput/TsInput.js +0 -22
- package/lib/components/TsInput/TsInput/TsInput.js.map +0 -1
- package/lib/components/TsInput/TsInput/TsInput.tsx +0 -31
- package/lib/components/TsInput/TsInput/TsInput.types.d.ts +0 -7
- package/lib/components/TsInput/TsInput/TsInput.types.js +0 -3
- package/lib/components/TsInput/TsInput/TsInput.types.js.map +0 -1
- package/lib/components/TsInput/TsInput/TsInput.types.tsx +0 -8
- package/lib/components/TsInput/TsInput/__stories__/TsInput.stories.mdx +0 -72
- package/lib/components/TsLoader/TsLoader.css +0 -42
- package/lib/components/TsLoader/TsLoader.d.ts +0 -4
- package/lib/components/TsLoader/TsLoader.js +0 -10
- package/lib/components/TsLoader/TsLoader.js.map +0 -1
- package/lib/components/TsLoader/TsLoader.types.d.ts +0 -3
- package/lib/components/TsLoader/TsLoader.types.js +0 -3
- package/lib/components/TsLoader/TsLoader.types.js.map +0 -1
- package/lib/components/TsLoader/__stories__/TsLoader.stories.mdx +0 -30
- package/lib/components/TsTabs/TsTabs.css +0 -69
- package/lib/components/TsTabs/TsTabs.d.ts +0 -4
- package/lib/components/TsTabs/TsTabs.js +0 -34
- package/lib/components/TsTabs/TsTabs.js.map +0 -1
- package/lib/components/TsTabs/TsTabs.types.d.ts +0 -14
- package/lib/components/TsTabs/TsTabs.types.js +0 -3
- package/lib/components/TsTabs/TsTabs.types.js.map +0 -1
- package/lib/components/TsTabs/__stories__/TsTabs.stories.mdx +0 -50
- package/lib/hooks/use-click-outside.d.ts +0 -2
- package/lib/hooks/use-click-outside.js +0 -18
- package/lib/hooks/use-click-outside.js.map +0 -1
- package/lib/index.d.ts +0 -10
- package/lib/index.js +0 -27
- package/lib/index.js.map +0 -1
- package/lib/layouts/TsHeader/TsHeader.css +0 -186
- package/lib/layouts/TsHeader/TsHeader.d.ts +0 -4
- package/lib/layouts/TsHeader/TsHeader.js +0 -17
- package/lib/layouts/TsHeader/TsHeader.js.map +0 -1
- package/lib/layouts/TsHeader/TsHeader.types.d.ts +0 -23
- package/lib/layouts/TsHeader/TsHeader.types.js +0 -3
- package/lib/layouts/TsHeader/TsHeader.types.js.map +0 -1
- package/lib/layouts/TsHeader/TsHeaderProfile.d.ts +0 -5
- package/lib/layouts/TsHeader/TsHeaderProfile.js +0 -43
- package/lib/layouts/TsHeader/TsHeaderProfile.js.map +0 -1
- package/lib/layouts/TsHeader/TsHeaderSearch.d.ts +0 -3
- package/lib/layouts/TsHeader/TsHeaderSearch.js +0 -62
- package/lib/layouts/TsHeader/TsHeaderSearch.js.map +0 -1
- package/lib/layouts/TsHeader/__stories__/TsHeader.stories.mdx +0 -71
- package/lib/layouts/TsNavigation/TsNavigation.css +0 -72
- package/lib/layouts/TsNavigation/TsNavigation.d.ts +0 -7
- package/lib/layouts/TsNavigation/TsNavigation.js +0 -35
- package/lib/layouts/TsNavigation/TsNavigation.js.map +0 -1
- package/lib/layouts/TsNavigation/TsNavigation.types.d.ts +0 -10
- package/lib/layouts/TsNavigation/TsNavigation.types.js +0 -3
- package/lib/layouts/TsNavigation/TsNavigation.types.js.map +0 -1
- package/lib/layouts/TsNavigation/__stories__/TsNavigation.stories.mdx +0 -51
- package/lib/utils/string.utils.d.ts +0 -1
- package/lib/utils/string.utils.js +0 -6
- package/lib/utils/string.utils.js.map +0 -1
- package/src/components/TsDropdown/TsDropdown.css +0 -114
- package/src/components/TsDropdown/__stories__/TsDropdown.stories.mdx +0 -85
- package/src/components/TsDropdown/__stories__/fruits.ts +0 -47
- /package/{esm/components → src/components/TsDropdowns}/TsDropdown/TsDropdown.css +0 -0
- /package/src/components/{TsDropdown → TsDropdowns/TsDropdown}/TsDropdown.types.ts +0 -0
- /package/{esm/components → src/components/TsDropdowns}/TsDropdown/__stories__/fruits.ts +0 -0
- /package/{lib/components/TsDropdown → src/components/TsDropdowns/TsDropdownFilter}/__stories__/fruits.ts +0 -0
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useEffect, useRef, useState } from 'react';
|
|
3
3
|
import { TsDropdownProps } from './TsDropdown.types';
|
|
4
|
-
import { TsIcon } from '
|
|
5
|
-
import { TsInput } from '
|
|
6
|
-
import { useClickOutside } from '
|
|
7
|
-
import { TsLoader } from '
|
|
4
|
+
import { TsIcon } from '../../TsIcon/TsIcon';
|
|
5
|
+
import { TsInput } from '../../TsInput/TsInput/TsInput';
|
|
6
|
+
import { useClickOutside } from '../../../hooks/use-click-outside';
|
|
7
|
+
import { TsLoader } from '../../TsLoader/TsLoader';
|
|
8
8
|
import './TsDropdown.css';
|
|
9
9
|
|
|
10
|
-
export const TsDropdown = <T
|
|
10
|
+
export const TsDropdown = <T,>({
|
|
11
11
|
containerRef,
|
|
12
12
|
error,
|
|
13
13
|
label,
|
package/{lib/components → src/components/TsDropdowns}/TsDropdown/__stories__/TsDropdown.stories.mdx
RENAMED
|
@@ -3,7 +3,7 @@ import { ArgsTable, Canvas, Meta, Story } from '@storybook/blocks';
|
|
|
3
3
|
import { TsDropdown } from '../TsDropdown';
|
|
4
4
|
import { fruits } from './fruits';
|
|
5
5
|
|
|
6
|
-
<Meta title="Components/Dropdown" />
|
|
6
|
+
<Meta title="Components/Dropdowns/Dropdown" />
|
|
7
7
|
|
|
8
8
|
export const dropdownArgTypes = {
|
|
9
9
|
error: {
|
|
@@ -1,72 +1,37 @@
|
|
|
1
1
|
.ts-dropdown-container {
|
|
2
2
|
position: relative;
|
|
3
|
-
width: 100%;
|
|
4
3
|
}
|
|
5
4
|
.ts-dropdown-input {
|
|
6
5
|
display: flex;
|
|
7
|
-
align-items: center;
|
|
8
|
-
width: 100%;
|
|
9
6
|
height: 32px;
|
|
10
|
-
padding-left:
|
|
11
|
-
|
|
7
|
+
padding-left: 16px;
|
|
8
|
+
padding-right: 12px;
|
|
9
|
+
background: #e1e3f5;
|
|
10
|
+
color: #3643ba;
|
|
12
11
|
cursor: pointer;
|
|
13
12
|
}
|
|
14
|
-
.ts-dropdown-input
|
|
15
|
-
background: #
|
|
16
|
-
cursor: not-allowed;
|
|
13
|
+
.ts-dropdown-input:hover {
|
|
14
|
+
background: #d7daf1;
|
|
17
15
|
}
|
|
18
|
-
.ts-dropdown-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
text-overflow: ellipsis;
|
|
24
|
-
white-space: nowrap;
|
|
25
|
-
}
|
|
26
|
-
.ts-dropdown-input--value {
|
|
27
|
-
flex: 1;
|
|
28
|
-
font-weight: 600;
|
|
29
|
-
overflow: hidden;
|
|
30
|
-
text-overflow: ellipsis;
|
|
31
|
-
white-space: nowrap;
|
|
16
|
+
.ts-dropdown-label {
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
height: 32px;
|
|
20
|
+
margin-right: 2px;
|
|
32
21
|
}
|
|
33
22
|
.ts-dropdown-input--chevron {
|
|
34
23
|
display: flex;
|
|
35
24
|
align-items: center;
|
|
36
25
|
justify-content: center;
|
|
37
|
-
width: 32px;
|
|
38
26
|
height: 32px;
|
|
39
27
|
}
|
|
40
|
-
.ts-dropdown-input.ts-dropdown-container--error {
|
|
41
|
-
border: 1px solid #e3262f;
|
|
42
|
-
}
|
|
43
|
-
.ts-dropdown-error {
|
|
44
|
-
display: flex;
|
|
45
|
-
margin-top: 4px;
|
|
46
|
-
color: #e3262f;
|
|
47
|
-
}
|
|
48
|
-
.ts-dropdown-error--icon {
|
|
49
|
-
margin-right: 4px;
|
|
50
|
-
}
|
|
51
|
-
.ts-dropdown-error--label {
|
|
52
|
-
font-size: 12px;
|
|
53
|
-
font-weight: 500;
|
|
54
|
-
}
|
|
55
|
-
/* ####### */
|
|
56
|
-
/* LABEL */
|
|
57
|
-
.ts-dropdown-label {
|
|
58
|
-
padding-bottom: 6px;
|
|
59
|
-
}
|
|
60
|
-
/* ###### */
|
|
61
|
-
/* MENU */
|
|
62
28
|
.ts-dropdown-menu-container {
|
|
63
29
|
position: absolute;
|
|
64
|
-
top:
|
|
30
|
+
top: calc(100% + 8px);
|
|
65
31
|
display: flex;
|
|
66
32
|
flex-direction: column;
|
|
67
|
-
width:
|
|
68
|
-
|
|
69
|
-
max-height: 250px;
|
|
33
|
+
width: 320px;
|
|
34
|
+
max-height: 200px;
|
|
70
35
|
padding: 12px;
|
|
71
36
|
box-shadow: 0px 8px 9px 0px #1010101a;
|
|
72
37
|
background: #ffffff;
|
|
@@ -75,26 +40,30 @@
|
|
|
75
40
|
}
|
|
76
41
|
.ts-dropdown-search {
|
|
77
42
|
padding-bottom: 12px;
|
|
78
|
-
margin-bottom: 12px;
|
|
79
43
|
border-bottom: 1px solid #d9dde1;
|
|
80
44
|
}
|
|
81
|
-
.ts-dropdown-menu {
|
|
82
|
-
overflow: auto;
|
|
83
|
-
}
|
|
84
45
|
.ts-dropdown-menu-loader {
|
|
85
46
|
display: flex;
|
|
47
|
+
align-items: center;
|
|
86
48
|
justify-content: center;
|
|
49
|
+
padding-top: 12px;
|
|
87
50
|
}
|
|
88
51
|
.ts-dropdown-menu-error-text {
|
|
89
52
|
display: flex;
|
|
53
|
+
align-items: center;
|
|
90
54
|
justify-content: center;
|
|
91
|
-
|
|
55
|
+
padding-top: 12px;
|
|
56
|
+
color: #687787;
|
|
92
57
|
font-style: italic;
|
|
93
58
|
}
|
|
59
|
+
.ts-dropdown-menu {
|
|
60
|
+
padding-top: 12px;
|
|
61
|
+
overflow: auto;
|
|
62
|
+
}
|
|
94
63
|
.ts-dropdown-menu-item {
|
|
95
64
|
display: flex;
|
|
96
65
|
align-items: center;
|
|
97
|
-
height:
|
|
66
|
+
height: 32px;
|
|
98
67
|
padding: 0 12px;
|
|
99
68
|
cursor: pointer;
|
|
100
69
|
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { useEffect, useState } from 'react';
|
|
3
|
+
import { useClickOutside } from '../../../hooks/use-click-outside';
|
|
4
|
+
import { capitalize } from '../../../utils/string.utils';
|
|
5
|
+
import { TsIcon } from '../../TsIcon/TsIcon';
|
|
6
|
+
import { TsInput } from '../../TsInput/TsInput/TsInput';
|
|
7
|
+
import { TsLoader } from '../../TsLoader/TsLoader';
|
|
8
|
+
import { TsDropdownFilterProps } from './TsDropdownFilter.types';
|
|
9
|
+
import './TsDropdownFilter.css';
|
|
10
|
+
|
|
11
|
+
export const TsDropdownFilter = <T,>({
|
|
12
|
+
label,
|
|
13
|
+
searchPlaceholder,
|
|
14
|
+
loadOptions,
|
|
15
|
+
getOptionLabel,
|
|
16
|
+
getOptionValue,
|
|
17
|
+
onChange,
|
|
18
|
+
}: TsDropdownFilterProps<T>) => {
|
|
19
|
+
const [searchValue, setSearchValue] = useState<string>('');
|
|
20
|
+
const [showDropdown, setShowDropdown] = useState<boolean>(false);
|
|
21
|
+
const [items, setItems] = useState<T[]>([]);
|
|
22
|
+
const [loading, setLoading] = useState<boolean>(true);
|
|
23
|
+
const ref = useClickOutside(() => setShowDropdown(false));
|
|
24
|
+
|
|
25
|
+
// ########
|
|
26
|
+
// Fetchers
|
|
27
|
+
const fetchAllItems = () => {
|
|
28
|
+
return loadOptions(searchValue)
|
|
29
|
+
.then(setItems)
|
|
30
|
+
.catch(() => {}); // TODO: Manage fetch ERRORS (Show an error message : 'An error occured, please retry later' or something else)
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
// ########
|
|
34
|
+
// Handlers
|
|
35
|
+
const handleSelectItem = (value: T) => {
|
|
36
|
+
onChange(value);
|
|
37
|
+
setShowDropdown(false);
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
// ########
|
|
41
|
+
// Watchers
|
|
42
|
+
useEffect(() => {
|
|
43
|
+
if (!showDropdown) setSearchValue('');
|
|
44
|
+
}, [showDropdown]);
|
|
45
|
+
useEffect(() => {
|
|
46
|
+
setLoading(true);
|
|
47
|
+
|
|
48
|
+
if (!searchValue) {
|
|
49
|
+
fetchAllItems().finally(() => setLoading(false));
|
|
50
|
+
} else {
|
|
51
|
+
const timeOutId = setTimeout(() => {
|
|
52
|
+
fetchAllItems().finally(() => setLoading(false));
|
|
53
|
+
}, 500);
|
|
54
|
+
return () => clearTimeout(timeOutId);
|
|
55
|
+
}
|
|
56
|
+
}, [searchValue]);
|
|
57
|
+
|
|
58
|
+
// #########
|
|
59
|
+
// Rendering
|
|
60
|
+
return (
|
|
61
|
+
<div className="ts-dropdown-container" ref={ref}>
|
|
62
|
+
<div className="ts-dropdown-input" onClick={() => setShowDropdown(!showDropdown)}>
|
|
63
|
+
<div className="ts-dropdown-label">{label}</div>
|
|
64
|
+
<div className="ts-dropdown-input--chevron">
|
|
65
|
+
<TsIcon name={showDropdown ? 'chevron-up' : 'chevron-down'} />
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
|
|
69
|
+
{showDropdown && (
|
|
70
|
+
<div className="ts-dropdown-menu-container">
|
|
71
|
+
<div className="ts-dropdown-search">
|
|
72
|
+
<TsInput
|
|
73
|
+
icon="search"
|
|
74
|
+
placeholder={searchPlaceholder}
|
|
75
|
+
value={searchValue}
|
|
76
|
+
autoFocus
|
|
77
|
+
onChange={setSearchValue}
|
|
78
|
+
/>
|
|
79
|
+
</div>
|
|
80
|
+
|
|
81
|
+
{loading && (
|
|
82
|
+
<div className="ts-dropdown-menu-loader">
|
|
83
|
+
<TsLoader size="sm" />
|
|
84
|
+
</div>
|
|
85
|
+
)}
|
|
86
|
+
{!loading && items.length === 0 && <div className="ts-dropdown-menu-error-text">Nothing found.</div>}
|
|
87
|
+
{!loading && items.length > 0 && (
|
|
88
|
+
<div className="ts-dropdown-menu">
|
|
89
|
+
{items.map(item => (
|
|
90
|
+
<div
|
|
91
|
+
key={getOptionValue(item)}
|
|
92
|
+
className="ts-dropdown-menu-item"
|
|
93
|
+
onClick={() => handleSelectItem(item)}
|
|
94
|
+
>
|
|
95
|
+
{capitalize(getOptionLabel(item))}
|
|
96
|
+
</div>
|
|
97
|
+
))}
|
|
98
|
+
</div>
|
|
99
|
+
)}
|
|
100
|
+
</div>
|
|
101
|
+
)}
|
|
102
|
+
</div>
|
|
103
|
+
);
|
|
104
|
+
};
|
|
@@ -1,37 +1,19 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ArgsTable, Canvas, Meta, Story } from '@storybook/blocks';
|
|
3
|
-
import {
|
|
3
|
+
import { TsDropdownFilter } from '../TsDropdownFilter';
|
|
4
4
|
import { fruits } from './fruits';
|
|
5
5
|
|
|
6
|
-
<Meta title="Components/Dropdown" />
|
|
6
|
+
<Meta title="Components/Dropdowns/Dropdown filter" />
|
|
7
7
|
|
|
8
8
|
export const dropdownArgTypes = {
|
|
9
|
-
error: {
|
|
10
|
-
control: 'text',
|
|
11
|
-
description: 'Error of the dropdown.',
|
|
12
|
-
},
|
|
13
9
|
label: {
|
|
14
10
|
control: 'text',
|
|
15
11
|
description: 'Label of the dropdown.',
|
|
16
12
|
},
|
|
17
|
-
placeholder: {
|
|
18
|
-
control: 'text',
|
|
19
|
-
description: 'Placeholder of the dropdown.',
|
|
20
|
-
},
|
|
21
13
|
searchPlaceholder: {
|
|
22
14
|
control: 'text',
|
|
23
15
|
description: 'Placeholder of the option search (only for searchable dropdowns).',
|
|
24
16
|
},
|
|
25
|
-
searchable: {
|
|
26
|
-
control: 'boolean',
|
|
27
|
-
description: 'Enable search on dropdown items.',
|
|
28
|
-
table: { defaultValue: { summary: 'false' } },
|
|
29
|
-
},
|
|
30
|
-
disabled: {
|
|
31
|
-
control: 'boolean',
|
|
32
|
-
description: 'Enable state of the dropdown.',
|
|
33
|
-
table: { defaultValue: { summary: 'false' } },
|
|
34
|
-
},
|
|
35
17
|
getOptionLabel: {
|
|
36
18
|
control: 'function',
|
|
37
19
|
description: 'The handler called to get the option label',
|
|
@@ -50,9 +32,9 @@ export const dropdownArgTypes = {
|
|
|
50
32
|
},
|
|
51
33
|
};
|
|
52
34
|
|
|
53
|
-
# Dropdown
|
|
35
|
+
# Dropdown filter
|
|
54
36
|
|
|
55
|
-
Dropdowns
|
|
37
|
+
Dropdowns specific to filter a search on page contents.
|
|
56
38
|
|
|
57
39
|
## Overview
|
|
58
40
|
|
|
@@ -60,13 +42,15 @@ Dropdowns show a list of options that can be used to select, filter or sort cont
|
|
|
60
42
|
<Story
|
|
61
43
|
name="Overview"
|
|
62
44
|
args={{
|
|
63
|
-
error: '',
|
|
64
45
|
label: 'Label',
|
|
65
|
-
options: fruits,
|
|
66
46
|
searchPlaceholder: '',
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
47
|
+
loadOptions: function ol(search) {
|
|
48
|
+
return Promise.resolve(
|
|
49
|
+
fruits.filter(function om(fruit) {
|
|
50
|
+
return fruit.name.includes(search);
|
|
51
|
+
}),
|
|
52
|
+
);
|
|
53
|
+
},
|
|
70
54
|
getOptionLabel: function ol(fruit) {
|
|
71
55
|
return fruit.name;
|
|
72
56
|
},
|
|
@@ -76,10 +60,10 @@ Dropdowns show a list of options that can be used to select, filter or sort cont
|
|
|
76
60
|
}}
|
|
77
61
|
argTypes={dropdownArgTypes}
|
|
78
62
|
>
|
|
79
|
-
{args => <
|
|
63
|
+
{args => <TsDropdownFilter {...args}>{args.children}</TsDropdownFilter>}
|
|
80
64
|
</Story>
|
|
81
65
|
</Canvas>
|
|
82
66
|
|
|
83
67
|
## Props
|
|
84
68
|
|
|
85
|
-
<ArgsTable story="Overview" of={
|
|
69
|
+
<ArgsTable story="Overview" of={TsDropdownFilter} />
|
|
@@ -42,6 +42,9 @@ input:focus {
|
|
|
42
42
|
.ts-input--padding-1 input {
|
|
43
43
|
padding: 0 30px 0 10px;
|
|
44
44
|
}
|
|
45
|
+
.ts-input--padding-2 input {
|
|
46
|
+
padding: 0 100px 0 10px;
|
|
47
|
+
}
|
|
45
48
|
/* ####### */
|
|
46
49
|
/* LABEL */
|
|
47
50
|
.ts-input-label {
|
|
@@ -61,6 +64,22 @@ input:focus {
|
|
|
61
64
|
height: 32px;
|
|
62
65
|
color: #949494;
|
|
63
66
|
}
|
|
67
|
+
/* ################ */
|
|
68
|
+
/* BY DEFAULT TAG */
|
|
69
|
+
.ts-input-tag {
|
|
70
|
+
position: absolute;
|
|
71
|
+
top: 4px;
|
|
72
|
+
right: 4px;
|
|
73
|
+
display: flex;
|
|
74
|
+
align-items: center;
|
|
75
|
+
justify-content: center;
|
|
76
|
+
height: 24px;
|
|
77
|
+
padding: 0 8px;
|
|
78
|
+
background: #ebecf7;
|
|
79
|
+
color: #3643ba;
|
|
80
|
+
font-weight: 400;
|
|
81
|
+
font-size: 12px;
|
|
82
|
+
}
|
|
64
83
|
|
|
65
84
|
/* ######### */
|
|
66
85
|
/* GLOBALS */
|
|
@@ -3,14 +3,17 @@ import { TsIcon } from '../../TsIcon/TsIcon';
|
|
|
3
3
|
import { TsInputProps } from './TsInput.types';
|
|
4
4
|
import './TsInput.css';
|
|
5
5
|
|
|
6
|
-
export const TsInput = ({ error, icon, label, value, onChange, ...props }: TsInputProps) => {
|
|
6
|
+
export const TsInput = ({ byDefault, error, icon, label, value, onChange, ...props }: TsInputProps) => {
|
|
7
7
|
// #########
|
|
8
8
|
// Rendering
|
|
9
9
|
return (
|
|
10
|
-
<div
|
|
10
|
+
<div
|
|
11
|
+
className={`ts-input ${byDefault ? 'ts-input--padding-2' : icon ? 'ts-input--padding-1' : 'ts-input--padding-0'}`}
|
|
12
|
+
>
|
|
11
13
|
{label && <div className="ts-input-label">{label}</div>}
|
|
12
14
|
<div className={`ts-input-container ${error && error !== '' ? 'ts-input-container--error' : ''}`}>
|
|
13
15
|
<input type="text" value={value} onChange={e => onChange(e.target.value)} {...props} />
|
|
16
|
+
{byDefault && <div className="ts-input-tag">{byDefault} by default</div>}
|
|
14
17
|
{icon && (
|
|
15
18
|
<div className="ts-input-icon">
|
|
16
19
|
<TsIcon name={icon} size="16" />
|
|
@@ -6,6 +6,10 @@ import { icons } from '../../../TsIcon/icons';
|
|
|
6
6
|
<Meta title="Components/Input" />
|
|
7
7
|
|
|
8
8
|
export const inputArgTypes = {
|
|
9
|
+
byDefault: {
|
|
10
|
+
control: 'text',
|
|
11
|
+
description: 'Add "by default" tag.',
|
|
12
|
+
},
|
|
9
13
|
error: {
|
|
10
14
|
control: 'text',
|
|
11
15
|
description: 'Error of the input.',
|
|
@@ -52,6 +56,7 @@ Input allows the user to enter content and data when the expected user input is
|
|
|
52
56
|
<Story
|
|
53
57
|
name="Overview"
|
|
54
58
|
args={{
|
|
59
|
+
byDefault: '',
|
|
55
60
|
error: '',
|
|
56
61
|
icon: '',
|
|
57
62
|
label: 'Label',
|
package/src/index.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './components/TsButton/TsButton';
|
|
2
2
|
export * from './components/TsCheckbox/TsCheckbox';
|
|
3
|
-
export * from './components/TsDropdown/TsDropdown';
|
|
3
|
+
export * from './components/TsDropdowns/TsDropdown/TsDropdown';
|
|
4
|
+
export * from './components/TsDropdowns/TsDropdownFilter/TsDropdownFilter';
|
|
4
5
|
export * from './components/TsIcon/TsIcon';
|
|
5
6
|
export * from './components/TsInput/TsInput/TsInput';
|
|
6
7
|
export * from './components/TsLoader/TsLoader';
|
|
Binary file
|
|
Binary file
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
.ts-button {
|
|
2
|
-
display: flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
justify-content: center;
|
|
5
|
-
border: none;
|
|
6
|
-
font-size: 14px;
|
|
7
|
-
font-weight: 600;
|
|
8
|
-
line-height: 16px;
|
|
9
|
-
cursor: pointer;
|
|
10
|
-
transition: all ease 0.3s;
|
|
11
|
-
}
|
|
12
|
-
.ts-button > div {
|
|
13
|
-
margin-right: 8px;
|
|
14
|
-
}
|
|
15
|
-
.ts-button > div:last-child {
|
|
16
|
-
margin-right: 0px;
|
|
17
|
-
}
|
|
18
|
-
button:disabled {
|
|
19
|
-
cursor: not-allowed;
|
|
20
|
-
}
|
|
21
|
-
/* ####### */
|
|
22
|
-
/* BLOCK */
|
|
23
|
-
.ts-button--block {
|
|
24
|
-
width: 100%;
|
|
25
|
-
}
|
|
26
|
-
/* ####### */
|
|
27
|
-
/* SIZES */
|
|
28
|
-
.ts-button--md {
|
|
29
|
-
height: 32px;
|
|
30
|
-
padding: 0 14px;
|
|
31
|
-
}
|
|
32
|
-
.ts-button--md.ts-button--icon-only {
|
|
33
|
-
width: 32px;
|
|
34
|
-
padding: 0;
|
|
35
|
-
}
|
|
36
|
-
.ts-button--lg {
|
|
37
|
-
height: 40px;
|
|
38
|
-
padding: 0 16px;
|
|
39
|
-
}
|
|
40
|
-
.ts-button--lg.ts-button--icon-only {
|
|
41
|
-
width: 40px;
|
|
42
|
-
padding: 0;
|
|
43
|
-
}
|
|
44
|
-
/* ########## */
|
|
45
|
-
/* VARIANTS */
|
|
46
|
-
.ts-button--primary:not(:disabled) {
|
|
47
|
-
background: #3643ba;
|
|
48
|
-
color: #ffffff;
|
|
49
|
-
}
|
|
50
|
-
.ts-button--primary:not(:disabled):hover {
|
|
51
|
-
background: #2e3998;
|
|
52
|
-
}
|
|
53
|
-
.ts-button--primary:not(:disabled):active {
|
|
54
|
-
background: #272f76;
|
|
55
|
-
}
|
|
56
|
-
.ts-button--primary:disabled {
|
|
57
|
-
background: #3643ba61;
|
|
58
|
-
color: #ffffff;
|
|
59
|
-
}
|
|
60
|
-
.ts-button--secondary:not(:disabled) {
|
|
61
|
-
background: #ebecf7;
|
|
62
|
-
color: #3643ba;
|
|
63
|
-
}
|
|
64
|
-
.ts-button--secondary:not(:disabled):hover {
|
|
65
|
-
background: #e3e3f4;
|
|
66
|
-
}
|
|
67
|
-
.ts-button--secondary:not(:disabled):active {
|
|
68
|
-
background: #d7daf1;
|
|
69
|
-
}
|
|
70
|
-
.ts-button--secondary:disabled {
|
|
71
|
-
background: #3643ba0d;
|
|
72
|
-
color: #3643ba80;
|
|
73
|
-
}
|
|
74
|
-
.ts-button--success:not(:disabled) {
|
|
75
|
-
background: #02be8a;
|
|
76
|
-
color: #ffffff;
|
|
77
|
-
}
|
|
78
|
-
.ts-button--success:not(:disabled):hover {
|
|
79
|
-
background: #029e73;
|
|
80
|
-
}
|
|
81
|
-
.ts-button--success:not(:disabled):active {
|
|
82
|
-
background: #017f5c;
|
|
83
|
-
}
|
|
84
|
-
.ts-button--success:disabled {
|
|
85
|
-
background: #02be8a61;
|
|
86
|
-
color: #ffffff;
|
|
87
|
-
}
|
|
88
|
-
.ts-button--ghost:not(:disabled) {
|
|
89
|
-
background: #ffffff;
|
|
90
|
-
color: #3643ba;
|
|
91
|
-
}
|
|
92
|
-
.ts-button--ghost:not(:disabled):hover {
|
|
93
|
-
background: #ebecf7;
|
|
94
|
-
}
|
|
95
|
-
.ts-button--ghost:not(:disabled):active {
|
|
96
|
-
background: #e3e3f4;
|
|
97
|
-
}
|
|
98
|
-
.ts-button--ghost:disabled {
|
|
99
|
-
background: #ffffff61;
|
|
100
|
-
color: #1d1d1b61;
|
|
101
|
-
}
|
|
102
|
-
.ts-button--shadow {
|
|
103
|
-
box-shadow: 0px 12px 12px 0px #00537d1a;
|
|
104
|
-
background: #ffffff;
|
|
105
|
-
color: #4e5d6b;
|
|
106
|
-
}
|
|
107
|
-
/* ######### */
|
|
108
|
-
/* ROUNDED */
|
|
109
|
-
.ts-button--rounded {
|
|
110
|
-
border-radius: 9999px;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
/* ######### */
|
|
114
|
-
/* GLOBALS */
|
|
115
|
-
* {
|
|
116
|
-
font-size: 14px;
|
|
117
|
-
outline: none;
|
|
118
|
-
box-sizing: border-box;
|
|
119
|
-
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans',
|
|
120
|
-
'Helvetica Neue', sans-serif;
|
|
121
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { PropsWithChildren } from 'react';
|
|
3
|
-
import { TsButtonProps } from './TsButton.types';
|
|
4
|
-
import './TsButton.css';
|
|
5
|
-
export declare const TsButton: ({ children, icon, iconDirection, size, variant, block, rounded, ...props }: PropsWithChildren<TsButtonProps>) => React.JSX.Element;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { TsIcon } from '../TsIcon/TsIcon';
|
|
3
|
-
import './TsButton.css';
|
|
4
|
-
export const TsButton = ({ children, icon, iconDirection = 'left', size = 'md', variant = 'primary', block, rounded, ...props }) => {
|
|
5
|
-
// #########
|
|
6
|
-
// Rendering
|
|
7
|
-
return (React.createElement("button", { className: `
|
|
8
|
-
ts-button ts-button--${size} ts-button--${variant}
|
|
9
|
-
${block ? 'ts-button--block' : ''}
|
|
10
|
-
${rounded ? 'ts-button--rounded' : ''}
|
|
11
|
-
${icon && !children ? 'ts-button--icon-only' : ''}
|
|
12
|
-
`, ...props },
|
|
13
|
-
icon && iconDirection === 'left' && React.createElement(TsIcon, { name: icon, size: "16" }),
|
|
14
|
-
children && React.createElement("div", null, children),
|
|
15
|
-
icon && iconDirection === 'right' && React.createElement(TsIcon, { name: icon, size: "16" })));
|
|
16
|
-
};
|
|
17
|
-
//# sourceMappingURL=TsButton.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TsButton.js","sourceRoot":"","sources":["../../../src/components/TsButton/TsButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,OAAO,gBAAgB,CAAC;AAExB,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,EACvB,QAAQ,EACR,IAAI,EACJ,aAAa,GAAG,MAAM,EACtB,IAAI,GAAG,IAAI,EACX,OAAO,GAAG,SAAS,EACnB,KAAK,EACL,OAAO,EACP,GAAG,KAAK,EACyB,EAAE,EAAE;IACrC,YAAY;IACZ,YAAY;IACZ,OAAO,CACL,gCACE,SAAS,EAAE;+BACc,IAAI,eAAe,OAAO;UAC/C,KAAK,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE;UAC/B,OAAO,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,EAAE;UACnC,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,EAAE;OAClD,KACG,KAAK;QAER,IAAI,IAAI,aAAa,KAAK,MAAM,IAAI,oBAAC,MAAM,IAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAC,IAAI,GAAG;QACpE,QAAQ,IAAI,iCAAM,QAAQ,CAAO;QACjC,IAAI,IAAI,aAAa,KAAK,OAAO,IAAI,oBAAC,MAAM,IAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAC,IAAI,GAAG,CAC/D,CACV,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ButtonHTMLAttributes } from 'react';
|
|
2
|
-
export type TsButtonProps = {
|
|
3
|
-
icon?: string;
|
|
4
|
-
iconDirection?: 'left' | 'right';
|
|
5
|
-
size?: 'md' | 'lg';
|
|
6
|
-
variant?: 'primary' | 'secondary' | 'success' | 'ghost' | 'shadow';
|
|
7
|
-
block?: boolean;
|
|
8
|
-
rounded?: boolean;
|
|
9
|
-
} & ButtonHTMLAttributes<HTMLButtonElement>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TsButton.types.js","sourceRoot":"","sources":["../../../src/components/TsButton/TsButton.types.ts"],"names":[],"mappings":""}
|