@toptal/picasso-lab 9.3.0 → 9.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/CHANGELOG.md +1385 -0
- package/{Calendar → dist-package/Calendar}/Calendar.d.ts +0 -0
- package/{Calendar → dist-package/Calendar}/Calendar.js +0 -0
- package/{Calendar → dist-package/Calendar}/Calendar.js.map +0 -0
- package/{Calendar → dist-package/Calendar}/index.d.ts +0 -0
- package/{Calendar → dist-package/Calendar}/index.js +0 -0
- package/{Calendar → dist-package/Calendar}/index.js.map +0 -0
- package/{Calendar → dist-package/Calendar}/styles.d.ts +0 -0
- package/{Calendar → dist-package/Calendar}/styles.js +0 -0
- package/{Calendar → dist-package/Calendar}/styles.js.map +0 -0
- package/{Calendar → dist-package/Calendar}/types.d.ts +0 -0
- package/{Calendar → dist-package/Calendar}/types.js +0 -0
- package/{Calendar → dist-package/Calendar}/types.js.map +0 -0
- package/{DatePicker → dist-package/DatePicker}/DatePicker.d.ts +0 -0
- package/{DatePicker → dist-package/DatePicker}/DatePicker.js +0 -0
- package/{DatePicker → dist-package/DatePicker}/DatePicker.js.map +0 -0
- package/{DatePicker → dist-package/DatePicker}/constants.d.ts +0 -0
- package/{DatePicker → dist-package/DatePicker}/constants.js +0 -0
- package/{DatePicker → dist-package/DatePicker}/constants.js.map +0 -0
- package/{DatePicker → dist-package/DatePicker}/index.d.ts +0 -0
- package/{DatePicker → dist-package/DatePicker}/index.js +0 -0
- package/{DatePicker → dist-package/DatePicker}/index.js.map +0 -0
- package/{DatePicker → dist-package/DatePicker}/styles.d.ts +0 -0
- package/{DatePicker → dist-package/DatePicker}/styles.js +0 -0
- package/{DatePicker → dist-package/DatePicker}/styles.js.map +0 -0
- package/{DatePicker → dist-package/DatePicker}/types.d.ts +0 -0
- package/{DatePicker → dist-package/DatePicker}/types.js +0 -0
- package/{DatePicker → dist-package/DatePicker}/types.js.map +0 -0
- package/{DatePicker → dist-package/DatePicker}/utils.d.ts +0 -0
- package/{DatePicker → dist-package/DatePicker}/utils.js +0 -0
- package/{DatePicker → dist-package/DatePicker}/utils.js.map +0 -0
- package/{Drawer → dist-package/Drawer}/Drawer.d.ts +0 -0
- package/{Drawer → dist-package/Drawer}/Drawer.js +0 -0
- package/{Drawer → dist-package/Drawer}/Drawer.js.map +0 -0
- package/{Drawer → dist-package/Drawer}/index.d.ts +0 -0
- package/{Drawer → dist-package/Drawer}/index.js +0 -0
- package/{Drawer → dist-package/Drawer}/index.js.map +0 -0
- package/{Drawer → dist-package/Drawer}/styles.d.ts +0 -0
- package/{Drawer → dist-package/Drawer}/styles.js +0 -0
- package/{Drawer → dist-package/Drawer}/styles.js.map +0 -0
- package/{DrawerTitle → dist-package/DrawerTitle}/DrawerTitle.d.ts +0 -0
- package/{DrawerTitle → dist-package/DrawerTitle}/DrawerTitle.js +0 -0
- package/{DrawerTitle → dist-package/DrawerTitle}/DrawerTitle.js.map +0 -0
- package/{DrawerTitle → dist-package/DrawerTitle}/index.d.ts +0 -0
- package/{DrawerTitle → dist-package/DrawerTitle}/index.js +0 -0
- package/{DrawerTitle → dist-package/DrawerTitle}/index.js.map +0 -0
- package/{DrawerTitle → dist-package/DrawerTitle}/styles.d.ts +0 -0
- package/{DrawerTitle → dist-package/DrawerTitle}/styles.js +0 -0
- package/{DrawerTitle → dist-package/DrawerTitle}/styles.js.map +0 -0
- package/{Dropzone → dist-package/Dropzone}/Dropzone.d.ts +0 -0
- package/{Dropzone → dist-package/Dropzone}/Dropzone.js +1 -1
- package/{Dropzone → dist-package/Dropzone}/Dropzone.js.map +1 -1
- package/{Dropzone → dist-package/Dropzone}/index.d.ts +0 -0
- package/{Dropzone → dist-package/Dropzone}/index.js +0 -0
- package/{Dropzone → dist-package/Dropzone}/index.js.map +0 -0
- package/{Dropzone → dist-package/Dropzone}/styles.d.ts +0 -0
- package/{Dropzone → dist-package/Dropzone}/styles.js +0 -0
- package/{Dropzone → dist-package/Dropzone}/styles.js.map +0 -0
- package/{Dropzone → dist-package/Dropzone}/types.d.ts +0 -0
- package/{Dropzone → dist-package/Dropzone}/types.js +0 -0
- package/{Dropzone → dist-package/Dropzone}/types.js.map +0 -0
- package/{EmptyState → dist-package/EmptyState}/EmptyState.d.ts +0 -0
- package/{EmptyState → dist-package/EmptyState}/EmptyState.js +0 -0
- package/{EmptyState → dist-package/EmptyState}/EmptyState.js.map +0 -0
- package/{EmptyState → dist-package/EmptyState}/index.d.ts +0 -0
- package/{EmptyState → dist-package/EmptyState}/index.js +0 -0
- package/{EmptyState → dist-package/EmptyState}/index.js.map +0 -0
- package/{EmptyStateCollection → dist-package/EmptyStateCollection}/EmptyStateCollection.d.ts +0 -0
- package/{EmptyStateCollection → dist-package/EmptyStateCollection}/EmptyStateCollection.js +0 -0
- package/{EmptyStateCollection → dist-package/EmptyStateCollection}/EmptyStateCollection.js.map +0 -0
- package/{EmptyStateCollection → dist-package/EmptyStateCollection}/index.d.ts +0 -0
- package/{EmptyStateCollection → dist-package/EmptyStateCollection}/index.js +0 -0
- package/{EmptyStateCollection → dist-package/EmptyStateCollection}/index.js.map +0 -0
- package/{EmptyStateCollection → dist-package/EmptyStateCollection}/styles.d.ts +0 -0
- package/{EmptyStateCollection → dist-package/EmptyStateCollection}/styles.js +0 -0
- package/{EmptyStateCollection → dist-package/EmptyStateCollection}/styles.js.map +0 -0
- package/{EmptyStatePage → dist-package/EmptyStatePage}/EmptyStatePage.d.ts +0 -0
- package/{EmptyStatePage → dist-package/EmptyStatePage}/EmptyStatePage.js +0 -0
- package/{EmptyStatePage → dist-package/EmptyStatePage}/EmptyStatePage.js.map +0 -0
- package/{EmptyStatePage → dist-package/EmptyStatePage}/index.d.ts +0 -0
- package/{EmptyStatePage → dist-package/EmptyStatePage}/index.js +0 -0
- package/{EmptyStatePage → dist-package/EmptyStatePage}/index.js.map +0 -0
- package/{EmptyStatePage → dist-package/EmptyStatePage}/styles.d.ts +0 -0
- package/{EmptyStatePage → dist-package/EmptyStatePage}/styles.js +0 -0
- package/{EmptyStatePage → dist-package/EmptyStatePage}/styles.js.map +0 -0
- package/{Note → dist-package/Note}/Note.d.ts +0 -0
- package/{Note → dist-package/Note}/Note.js +0 -0
- package/{Note → dist-package/Note}/Note.js.map +0 -0
- package/{Note → dist-package/Note}/index.d.ts +0 -0
- package/{Note → dist-package/Note}/index.js +0 -0
- package/{Note → dist-package/Note}/index.js.map +0 -0
- package/{Note → dist-package/Note}/styles.d.ts +0 -0
- package/{Note → dist-package/Note}/styles.js +0 -0
- package/{Note → dist-package/Note}/styles.js.map +0 -0
- package/{NoteContent → dist-package/NoteContent}/NoteContent.d.ts +0 -0
- package/{NoteContent → dist-package/NoteContent}/NoteContent.js +0 -0
- package/{NoteContent → dist-package/NoteContent}/NoteContent.js.map +0 -0
- package/{NoteContent → dist-package/NoteContent}/index.d.ts +0 -0
- package/{NoteContent → dist-package/NoteContent}/index.js +0 -0
- package/{NoteContent → dist-package/NoteContent}/index.js.map +0 -0
- package/{NoteSubtitle → dist-package/NoteSubtitle}/NoteSubtitle.d.ts +0 -0
- package/{NoteSubtitle → dist-package/NoteSubtitle}/NoteSubtitle.js +0 -0
- package/{NoteSubtitle → dist-package/NoteSubtitle}/NoteSubtitle.js.map +0 -0
- package/{NoteSubtitle → dist-package/NoteSubtitle}/index.d.ts +0 -0
- package/{NoteSubtitle → dist-package/NoteSubtitle}/index.js +0 -0
- package/{NoteSubtitle → dist-package/NoteSubtitle}/index.js.map +0 -0
- package/{NoteTitle → dist-package/NoteTitle}/NoteTitle.d.ts +0 -0
- package/{NoteTitle → dist-package/NoteTitle}/NoteTitle.js +0 -0
- package/{NoteTitle → dist-package/NoteTitle}/NoteTitle.js.map +0 -0
- package/{NoteTitle → dist-package/NoteTitle}/index.d.ts +0 -0
- package/{NoteTitle → dist-package/NoteTitle}/index.js +0 -0
- package/{NoteTitle → dist-package/NoteTitle}/index.js.map +0 -0
- package/{NoteTitle → dist-package/NoteTitle}/styles.d.ts +0 -0
- package/{NoteTitle → dist-package/NoteTitle}/styles.js +0 -0
- package/{NoteTitle → dist-package/NoteTitle}/styles.js.map +0 -0
- package/{OverviewBlock → dist-package/OverviewBlock}/OverviewBlock.d.ts +0 -0
- package/{OverviewBlock → dist-package/OverviewBlock}/OverviewBlock.js +0 -0
- package/{OverviewBlock → dist-package/OverviewBlock}/OverviewBlock.js.map +0 -0
- package/{OverviewBlock → dist-package/OverviewBlock}/index.d.ts +0 -0
- package/{OverviewBlock → dist-package/OverviewBlock}/index.js +0 -0
- package/{OverviewBlock → dist-package/OverviewBlock}/index.js.map +0 -0
- package/{OverviewBlock → dist-package/OverviewBlock}/styles.d.ts +0 -0
- package/{OverviewBlock → dist-package/OverviewBlock}/styles.js +0 -0
- package/{OverviewBlock → dist-package/OverviewBlock}/styles.js.map +0 -0
- package/{OverviewBlockGroup → dist-package/OverviewBlockGroup}/OverviewBlockGroup.d.ts +0 -0
- package/{OverviewBlockGroup → dist-package/OverviewBlockGroup}/OverviewBlockGroup.js +0 -0
- package/{OverviewBlockGroup → dist-package/OverviewBlockGroup}/OverviewBlockGroup.js.map +0 -0
- package/{OverviewBlockGroup → dist-package/OverviewBlockGroup}/OverviewBlockGroupContext.d.ts +0 -0
- package/{OverviewBlockGroup → dist-package/OverviewBlockGroup}/OverviewBlockGroupContext.js +0 -0
- package/{OverviewBlockGroup → dist-package/OverviewBlockGroup}/OverviewBlockGroupContext.js.map +0 -0
- package/{OverviewBlockGroup → dist-package/OverviewBlockGroup}/index.d.ts +0 -0
- package/{OverviewBlockGroup → dist-package/OverviewBlockGroup}/index.js +0 -0
- package/{OverviewBlockGroup → dist-package/OverviewBlockGroup}/index.js.map +0 -0
- package/{OverviewBlockGroup → dist-package/OverviewBlockGroup}/settings.d.ts +0 -0
- package/{OverviewBlockGroup → dist-package/OverviewBlockGroup}/settings.js +0 -0
- package/{OverviewBlockGroup → dist-package/OverviewBlockGroup}/settings.js.map +0 -0
- package/{OverviewBlockRow → dist-package/OverviewBlockRow}/OverviewBlockRow.d.ts +0 -0
- package/{OverviewBlockRow → dist-package/OverviewBlockRow}/OverviewBlockRow.js +0 -0
- package/{OverviewBlockRow → dist-package/OverviewBlockRow}/OverviewBlockRow.js.map +0 -0
- package/{OverviewBlockRow → dist-package/OverviewBlockRow}/index.d.ts +0 -0
- package/{OverviewBlockRow → dist-package/OverviewBlockRow}/index.js +0 -0
- package/{OverviewBlockRow → dist-package/OverviewBlockRow}/index.js.map +0 -0
- package/{OverviewBlockRow → dist-package/OverviewBlockRow}/styles.d.ts +0 -0
- package/{OverviewBlockRow → dist-package/OverviewBlockRow}/styles.js +0 -0
- package/{OverviewBlockRow → dist-package/OverviewBlockRow}/styles.js.map +0 -0
- package/dist-package/README.md +26 -0
- package/{Section → dist-package/Section}/Section.d.ts +0 -0
- package/{Section → dist-package/Section}/Section.js +0 -0
- package/{Section → dist-package/Section}/Section.js.map +0 -0
- package/{Section → dist-package/Section}/index.d.ts +0 -0
- package/{Section → dist-package/Section}/index.js +0 -0
- package/{Section → dist-package/Section}/index.js.map +0 -0
- package/{Section → dist-package/Section}/styles.d.ts +0 -0
- package/{Section → dist-package/Section}/styles.js +0 -0
- package/{Section → dist-package/Section}/styles.js.map +0 -0
- package/{Timeline → dist-package/Timeline}/Timeline.d.ts +0 -0
- package/{Timeline → dist-package/Timeline}/Timeline.js +0 -0
- package/{Timeline → dist-package/Timeline}/Timeline.js.map +0 -0
- package/{Timeline → dist-package/Timeline}/index.d.ts +0 -0
- package/{Timeline → dist-package/Timeline}/index.js +0 -0
- package/{Timeline → dist-package/Timeline}/index.js.map +0 -0
- package/{TimelineRow → dist-package/TimelineRow}/TimelineRow.d.ts +0 -0
- package/{TimelineRow → dist-package/TimelineRow}/TimelineRow.js +0 -0
- package/{TimelineRow → dist-package/TimelineRow}/TimelineRow.js.map +0 -0
- package/{TimelineRow → dist-package/TimelineRow}/index.d.ts +0 -0
- package/{TimelineRow → dist-package/TimelineRow}/index.js +0 -0
- package/{TimelineRow → dist-package/TimelineRow}/index.js.map +0 -0
- package/{TimelineRow → dist-package/TimelineRow}/styles.d.ts +0 -0
- package/{TimelineRow → dist-package/TimelineRow}/styles.js +0 -0
- package/{TimelineRow → dist-package/TimelineRow}/styles.js.map +0 -0
- package/{TypographyOverflow → dist-package/TypographyOverflow}/TypographyOverflow.d.ts +0 -0
- package/{TypographyOverflow → dist-package/TypographyOverflow}/TypographyOverflow.js +0 -0
- package/{TypographyOverflow → dist-package/TypographyOverflow}/TypographyOverflow.js.map +0 -0
- package/{TypographyOverflow → dist-package/TypographyOverflow}/index.d.ts +0 -0
- package/{TypographyOverflow → dist-package/TypographyOverflow}/index.js +0 -0
- package/{TypographyOverflow → dist-package/TypographyOverflow}/index.js.map +0 -0
- package/{TypographyOverflow → dist-package/TypographyOverflow}/styles.d.ts +0 -0
- package/{TypographyOverflow → dist-package/TypographyOverflow}/styles.js +0 -0
- package/{TypographyOverflow → dist-package/TypographyOverflow}/styles.js.map +0 -0
- package/{index.d.ts → dist-package/index.d.ts} +0 -0
- package/{index.js → dist-package/index.js} +0 -0
- package/{index.js.map → dist-package/index.js.map} +0 -0
- package/dist-package/package.json +53 -0
- package/package.json +3 -4
- package/src/Calendar/Calendar.tsx +215 -0
- package/src/Calendar/__snapshots__/test.tsx.snap +447 -0
- package/src/Calendar/index.ts +2 -0
- package/src/Calendar/styles.ts +104 -0
- package/src/Calendar/test.tsx +20 -0
- package/src/Calendar/types.ts +42 -0
- package/src/DatePicker/DatePicker.tsx +366 -0
- package/src/DatePicker/__image_snapshots__/datepicker-full-width-snap.png +0 -0
- package/src/DatePicker/__image_snapshots__/datepicker-with-custom-day-rendering-snap.png +0 -0
- package/src/DatePicker/__snapshots__/test.tsx.snap +51 -0
- package/src/DatePicker/constants.ts +2 -0
- package/src/DatePicker/index.ts +5 -0
- package/src/DatePicker/story/AllowCustomValue.example.tsx +33 -0
- package/src/DatePicker/story/Autocomplete.example.tsx +47 -0
- package/src/DatePicker/story/Default.example.tsx +19 -0
- package/src/DatePicker/story/Error.example.tsx +26 -0
- package/src/DatePicker/story/Range.example.tsx +22 -0
- package/src/DatePicker/story/WithCustomDayRendering.example.tsx +47 -0
- package/src/DatePicker/story/WithInitialValue.example.tsx +19 -0
- package/src/DatePicker/story/WithInputProps.example.tsx +24 -0
- package/src/DatePicker/story/WithNoHideOnSelect.example.tsx +20 -0
- package/src/DatePicker/story/WithOnBlurHandler.example.tsx +22 -0
- package/src/DatePicker/story/WithSelectionLimits.example.tsx +32 -0
- package/src/DatePicker/story/WithTimezone.example.tsx +25 -0
- package/src/DatePicker/story/index.jsx +50 -0
- package/src/DatePicker/styles.ts +8 -0
- package/src/DatePicker/test.tsx +370 -0
- package/src/DatePicker/types.ts +13 -0
- package/src/DatePicker/utils.ts +123 -0
- package/src/Drawer/Drawer.tsx +105 -0
- package/src/Drawer/__image_snapshots__/drawer-custom-title-effect-1-snap.png +0 -0
- package/src/Drawer/__image_snapshots__/drawer-custom-title-snap.png +0 -0
- package/src/Drawer/__image_snapshots__/drawer-default-effect-1-snap.png +0 -0
- package/src/Drawer/__image_snapshots__/drawer-default-snap.png +0 -0
- package/src/Drawer/__image_snapshots__/drawer-width-effect-1-snap.png +0 -0
- package/src/Drawer/__image_snapshots__/drawer-width-effect-2-snap.png +0 -0
- package/src/Drawer/__image_snapshots__/drawer-width-effect-3-snap.png +0 -0
- package/src/Drawer/__image_snapshots__/drawer-width-effect-4-snap.png +0 -0
- package/src/Drawer/__image_snapshots__/drawer-width-effect-5-snap.png +0 -0
- package/src/Drawer/__image_snapshots__/drawer-width-snap.png +0 -0
- package/src/Drawer/__image_snapshots__/drawer-without-title-effect-1-snap.png +0 -0
- package/src/Drawer/__image_snapshots__/drawer-without-title-snap.png +0 -0
- package/src/Drawer/index.ts +6 -0
- package/src/Drawer/story/CustomTitle.example.tsx +32 -0
- package/src/Drawer/story/Default.example.tsx +29 -0
- package/src/Drawer/story/DrawerAndNotification.example.tsx +34 -0
- package/src/Drawer/story/Widths.example.tsx +46 -0
- package/src/Drawer/story/WithoutTitle.example.tsx +22 -0
- package/src/Drawer/story/index.jsx +80 -0
- package/src/Drawer/styles.ts +42 -0
- package/src/DrawerTitle/DrawerTitle.tsx +35 -0
- package/src/DrawerTitle/index.ts +1 -0
- package/src/DrawerTitle/styles.ts +12 -0
- package/src/Dropzone/Dropzone.tsx +146 -0
- package/src/Dropzone/__snapshots__/test.tsx.snap +40 -0
- package/src/Dropzone/index.ts +7 -0
- package/src/Dropzone/story/Default.example.tsx +8 -0
- package/src/Dropzone/story/Disabled.example.tsx +25 -0
- package/src/Dropzone/story/Error.example.tsx +16 -0
- package/src/Dropzone/story/Multiple.example.tsx +30 -0
- package/src/Dropzone/story/Uploader.example.tsx +116 -0
- package/src/Dropzone/story/Uploading.example.tsx +16 -0
- package/src/Dropzone/story/index.jsx +85 -0
- package/src/Dropzone/styles.ts +43 -0
- package/src/Dropzone/test.tsx +33 -0
- package/src/Dropzone/types.ts +56 -0
- package/src/EmptyState/EmptyState.tsx +7 -0
- package/src/EmptyState/index.tsx +1 -0
- package/src/EmptyState/story/index.jsx +13 -0
- package/src/EmptyStateCollection/EmptyStateCollection.tsx +56 -0
- package/src/EmptyStateCollection/__image_snapshots__/emptystate-collection-emptystatecollection-snap.png +0 -0
- package/src/EmptyStateCollection/index.tsx +1 -0
- package/src/EmptyStateCollection/story/Default.example.tsx +11 -0
- package/src/EmptyStateCollection/story/index.jsx +20 -0
- package/src/EmptyStateCollection/styles.ts +10 -0
- package/src/EmptyStatePage/EmptyStatePage.tsx +65 -0
- package/src/EmptyStatePage/__image_snapshots__/emptystate-page-emptystatepage-snap.png +0 -0
- package/src/EmptyStatePage/index.tsx +1 -0
- package/src/EmptyStatePage/story/Default.example.tsx +21 -0
- package/src/EmptyStatePage/story/index.jsx +21 -0
- package/src/EmptyStatePage/styles.ts +9 -0
- package/src/Note/Note.tsx +36 -0
- package/src/Note/__snapshots__/test.tsx.snap +37 -0
- package/src/Note/index.ts +6 -0
- package/src/Note/story/Default.example.tsx +14 -0
- package/src/Note/story/index.jsx +23 -0
- package/src/Note/styles.ts +27 -0
- package/src/Note/test.tsx +22 -0
- package/src/NoteContent/NoteContent.tsx +23 -0
- package/src/NoteContent/index.ts +1 -0
- package/src/NoteContent/story/index.jsx +12 -0
- package/src/NoteSubtitle/NoteSubtitle.tsx +25 -0
- package/src/NoteSubtitle/index.ts +1 -0
- package/src/NoteSubtitle/story/index.jsx +12 -0
- package/src/NoteTitle/NoteTitle.tsx +34 -0
- package/src/NoteTitle/index.ts +1 -0
- package/src/NoteTitle/story/index.jsx +12 -0
- package/src/NoteTitle/styles.ts +8 -0
- package/src/OverviewBlock/OverviewBlock.tsx +125 -0
- package/src/OverviewBlock/__image_snapshots__/overviewblock-default-snap.png +0 -0
- package/src/OverviewBlock/__image_snapshots__/overviewblock-multi-line-snap.png +0 -0
- package/src/OverviewBlock/__image_snapshots__/overviewblock-number-snap.png +0 -0
- package/src/OverviewBlock/__image_snapshots__/overviewblock-routing-snap.png +0 -0
- package/src/OverviewBlock/__image_snapshots__/overviewblock-text-snap.png +0 -0
- package/src/OverviewBlock/index.ts +6 -0
- package/src/OverviewBlock/story/Default.example.tsx +35 -0
- package/src/OverviewBlock/story/Multiline.example.tsx +51 -0
- package/src/OverviewBlock/story/Number.example.tsx +20 -0
- package/src/OverviewBlock/story/Routing.example.tsx +40 -0
- package/src/OverviewBlock/story/Text.example.tsx +15 -0
- package/src/OverviewBlock/story/index.jsx +100 -0
- package/src/OverviewBlock/styles.ts +44 -0
- package/src/OverviewBlock/test.tsx +111 -0
- package/src/OverviewBlockGroup/OverviewBlockGroup.tsx +56 -0
- package/src/OverviewBlockGroup/OverviewBlockGroupContext.tsx +21 -0
- package/src/OverviewBlockGroup/__image_snapshots__/visual-variants-of-the-groups-block-width-snap.png +0 -0
- package/src/OverviewBlockGroup/__image_snapshots__/visual-variants-of-the-groups-center-aligned-snap.png +0 -0
- package/src/OverviewBlockGroup/index.ts +1 -0
- package/src/OverviewBlockGroup/settings.ts +2 -0
- package/src/OverviewBlockGroup/story/BlockWidth.example.tsx +38 -0
- package/src/OverviewBlockGroup/story/CenterAligned.example.tsx +17 -0
- package/src/OverviewBlockGroup/story/index.jsx +25 -0
- package/src/OverviewBlockGroup/test.tsx +17 -0
- package/src/OverviewBlockRow/OverviewBlockRow.tsx +22 -0
- package/src/OverviewBlockRow/index.ts +1 -0
- package/src/OverviewBlockRow/story/index.jsx +11 -0
- package/src/OverviewBlockRow/styles.ts +27 -0
- package/src/Section/Section.tsx +163 -0
- package/src/Section/__snapshots__/test.tsx.snap +186 -0
- package/src/Section/index.ts +6 -0
- package/src/Section/story/Actions.example.tsx +85 -0
- package/src/Section/story/Collapsible.example.tsx +113 -0
- package/src/Section/story/Default.example.tsx +77 -0
- package/src/Section/story/TitleSize.example.tsx +34 -0
- package/src/Section/story/Variant.example.tsx +108 -0
- package/src/Section/story/index.jsx +35 -0
- package/src/Section/styles.ts +65 -0
- package/src/Section/test.tsx +115 -0
- package/src/Timeline/Timeline.tsx +25 -0
- package/src/Timeline/__snapshots__/test.tsx.snap +332 -0
- package/src/Timeline/index.ts +6 -0
- package/src/Timeline/story/Dates.example.tsx +52 -0
- package/src/Timeline/story/Default.example.tsx +34 -0
- package/src/Timeline/story/TrimLastConnector.example.tsx +29 -0
- package/src/Timeline/story/index.jsx +27 -0
- package/src/Timeline/test.tsx +101 -0
- package/src/TimelineRow/TimelineRow.tsx +83 -0
- package/src/TimelineRow/index.ts +6 -0
- package/src/TimelineRow/story/index.jsx +11 -0
- package/src/TimelineRow/styles.ts +47 -0
- package/src/TypographyOverflow/TypographyOverflow.tsx +153 -0
- package/src/TypographyOverflow/__image_snapshots__/typographyoverflow-checkbox-label-effect-1-snap.png +0 -0
- package/src/TypographyOverflow/__image_snapshots__/typographyoverflow-checkbox-label-snap.png +0 -0
- package/src/TypographyOverflow/__image_snapshots__/typographyoverflow-custom-tooltip-content-effect-1-snap.png +0 -0
- package/src/TypographyOverflow/__image_snapshots__/typographyoverflow-custom-tooltip-content-snap.png +0 -0
- package/src/TypographyOverflow/__image_snapshots__/typographyoverflow-default-effect-1-snap.png +0 -0
- package/src/TypographyOverflow/__image_snapshots__/typographyoverflow-default-effect-2-snap.png +0 -0
- package/src/TypographyOverflow/__image_snapshots__/typographyoverflow-default-snap.png +0 -0
- package/src/TypographyOverflow/__image_snapshots__/typographyoverflow-delay-effect-1-snap.png +0 -0
- package/src/TypographyOverflow/__image_snapshots__/typographyoverflow-delay-effect-2-snap.png +0 -0
- package/src/TypographyOverflow/__image_snapshots__/typographyoverflow-delay-snap.png +0 -0
- package/src/TypographyOverflow/__image_snapshots__/typographyoverflow-light-tooltip-background-effect-1-snap.png +0 -0
- package/src/TypographyOverflow/__image_snapshots__/typographyoverflow-light-tooltip-background-effect-2-snap.png +0 -0
- package/src/TypographyOverflow/__image_snapshots__/typographyoverflow-light-tooltip-background-snap.png +0 -0
- package/src/TypographyOverflow/__image_snapshots__/typographyoverflow-multiline-effect-1-snap.png +0 -0
- package/src/TypographyOverflow/__image_snapshots__/typographyoverflow-multiline-effect-2-snap.png +0 -0
- package/src/TypographyOverflow/__image_snapshots__/typographyoverflow-multiline-effect-3-snap.png +0 -0
- package/src/TypographyOverflow/__image_snapshots__/typographyoverflow-multiline-snap.png +0 -0
- package/src/TypographyOverflow/index.ts +6 -0
- package/src/TypographyOverflow/story/CheckboxLabel.example.tsx +21 -0
- package/src/TypographyOverflow/story/CustomTooltip.example.tsx +22 -0
- package/src/TypographyOverflow/story/Default.example.tsx +32 -0
- package/src/TypographyOverflow/story/Delay.example.tsx +29 -0
- package/src/TypographyOverflow/story/GridWithControls.example.tsx +64 -0
- package/src/TypographyOverflow/story/Multiline.example.tsx +59 -0
- package/src/TypographyOverflow/story/TooltipVariants.example.tsx +23 -0
- package/src/TypographyOverflow/story/index.jsx +83 -0
- package/src/TypographyOverflow/styles.ts +29 -0
- package/src/TypographyOverflow/test.tsx +60 -0
- package/src/index.ts +35 -0
- package/src/story/index.jsx +10 -0
- package/tsconfig.build.json +7 -0
@@ -0,0 +1,27 @@
|
|
1
|
+
import { createStyles, Theme } from '@material-ui/core/styles'
|
2
|
+
|
3
|
+
export default ({ palette, sizes }: Theme) =>
|
4
|
+
createStyles({
|
5
|
+
root: {
|
6
|
+
display: 'flex',
|
7
|
+
borderRadius: sizes.borderRadius.medium,
|
8
|
+
padding: '1rem 0',
|
9
|
+
border: `${sizes.borderWidth} solid ${palette.grey.lighter2}`,
|
10
|
+
backgroundColor: palette.common.white,
|
11
|
+
justifyContent: 'flex-start',
|
12
|
+
'& > *': {
|
13
|
+
flex: '1 0'
|
14
|
+
},
|
15
|
+
'&:not(:first-child)': {
|
16
|
+
borderTop: 0,
|
17
|
+
borderTopLeftRadius: 0,
|
18
|
+
borderTopRightRadius: 0
|
19
|
+
},
|
20
|
+
'&:not(:last-child)': {
|
21
|
+
borderBottom: 0,
|
22
|
+
borderBottomLeftRadius: 0,
|
23
|
+
borderBottomRightRadius: 0,
|
24
|
+
paddingBottom: 0
|
25
|
+
}
|
26
|
+
}
|
27
|
+
})
|
@@ -0,0 +1,163 @@
|
|
1
|
+
import cx from 'classnames'
|
2
|
+
import React, { forwardRef, ReactNode, useState } from 'react'
|
3
|
+
import { makeStyles, Theme } from '@material-ui/core/styles'
|
4
|
+
import { Collapse } from '@material-ui/core'
|
5
|
+
import {
|
6
|
+
ArrowDownMinor16,
|
7
|
+
BaseProps,
|
8
|
+
Button,
|
9
|
+
Container,
|
10
|
+
SizeType,
|
11
|
+
Typography
|
12
|
+
} from '@toptal/picasso'
|
13
|
+
import { Rotate180 } from '@toptal/picasso/utils/Transitions'
|
14
|
+
|
15
|
+
import styles from './styles'
|
16
|
+
|
17
|
+
type VariantType = 'bordered' | 'default' | 'withHeaderBar'
|
18
|
+
|
19
|
+
export interface Props extends BaseProps {
|
20
|
+
/** Title of the Section */
|
21
|
+
title?: ReactNode
|
22
|
+
/** Subtitle of the Section */
|
23
|
+
subtitle?: ReactNode
|
24
|
+
/** Additional actions of the Section */
|
25
|
+
actions?: ReactNode
|
26
|
+
/** Main content of the Section */
|
27
|
+
children?: ReactNode
|
28
|
+
/** Whether section can be collapsed */
|
29
|
+
collapsible?: boolean
|
30
|
+
/** Default collapsed value **(applied if `collapsible: true`)** */
|
31
|
+
defaultCollapsed?: boolean
|
32
|
+
testIds?: {
|
33
|
+
header?: string
|
34
|
+
title?: string
|
35
|
+
subtitle?: string
|
36
|
+
actions?: string
|
37
|
+
collapse?: string
|
38
|
+
}
|
39
|
+
variant?: VariantType
|
40
|
+
/** Title size of the inner text */
|
41
|
+
titleSize?: SizeType<'small' | 'medium'>
|
42
|
+
}
|
43
|
+
|
44
|
+
const useStyles = makeStyles<Theme>(styles, {
|
45
|
+
name: 'PicassoSection'
|
46
|
+
})
|
47
|
+
|
48
|
+
export const Section = forwardRef<HTMLDivElement, Props>(function Section(
|
49
|
+
props,
|
50
|
+
ref
|
51
|
+
) {
|
52
|
+
const {
|
53
|
+
className,
|
54
|
+
style,
|
55
|
+
title,
|
56
|
+
subtitle,
|
57
|
+
actions,
|
58
|
+
children,
|
59
|
+
testIds,
|
60
|
+
collapsible = false,
|
61
|
+
defaultCollapsed = true,
|
62
|
+
variant = 'default',
|
63
|
+
titleSize = 'medium',
|
64
|
+
...rest
|
65
|
+
} = props
|
66
|
+
const classes = useStyles()
|
67
|
+
const [collapsed, setCollapsed] = useState(
|
68
|
+
collapsible ? defaultCollapsed : false
|
69
|
+
)
|
70
|
+
|
71
|
+
const toggleCollapse = () => setCollapsed(!collapsed)
|
72
|
+
|
73
|
+
const renderTitle = () =>
|
74
|
+
title ? (
|
75
|
+
<Typography
|
76
|
+
className={classes.title}
|
77
|
+
data-testid={testIds?.title}
|
78
|
+
variant='heading'
|
79
|
+
size={titleSize}
|
80
|
+
>
|
81
|
+
{title}
|
82
|
+
</Typography>
|
83
|
+
) : null
|
84
|
+
|
85
|
+
const renderSubtitle = () =>
|
86
|
+
subtitle ? (
|
87
|
+
<Typography
|
88
|
+
className={classes.subtitle}
|
89
|
+
data-testid={testIds?.subtitle}
|
90
|
+
size='medium'
|
91
|
+
color='dark-grey'
|
92
|
+
>
|
93
|
+
{subtitle}
|
94
|
+
</Typography>
|
95
|
+
) : null
|
96
|
+
|
97
|
+
const renderCollapse = () =>
|
98
|
+
collapsible ? (
|
99
|
+
<Button.Circular
|
100
|
+
onClick={toggleCollapse}
|
101
|
+
data-testid={testIds?.collapse}
|
102
|
+
variant='flat'
|
103
|
+
icon={
|
104
|
+
<Rotate180 on={!collapsed}>
|
105
|
+
<ArrowDownMinor16 />
|
106
|
+
</Rotate180>
|
107
|
+
}
|
108
|
+
/>
|
109
|
+
) : null
|
110
|
+
|
111
|
+
const hasActions = actions || collapsible
|
112
|
+
const renderActions = () =>
|
113
|
+
hasActions ? (
|
114
|
+
<Container data-testid={testIds?.actions} className={classes.actions}>
|
115
|
+
{actions}
|
116
|
+
{renderCollapse()}
|
117
|
+
</Container>
|
118
|
+
) : null
|
119
|
+
|
120
|
+
const hasHeader = title || subtitle || hasActions
|
121
|
+
|
122
|
+
return (
|
123
|
+
<Container
|
124
|
+
ref={ref}
|
125
|
+
className={cx(
|
126
|
+
{
|
127
|
+
[classes[variant]]: true,
|
128
|
+
[classes.collapsed]: variant === 'default' && collapsed
|
129
|
+
},
|
130
|
+
classes.root,
|
131
|
+
className
|
132
|
+
)}
|
133
|
+
style={style}
|
134
|
+
{...rest}
|
135
|
+
>
|
136
|
+
{hasHeader && (
|
137
|
+
<Container
|
138
|
+
data-testid={testIds?.header}
|
139
|
+
className={cx({
|
140
|
+
[classes[`${variant}Header`]]: true,
|
141
|
+
[classes[`${variant}CollapsedHeader`]]: collapsed
|
142
|
+
})}
|
143
|
+
>
|
144
|
+
{renderTitle()}
|
145
|
+
{renderSubtitle()}
|
146
|
+
{renderActions()}
|
147
|
+
</Container>
|
148
|
+
)}
|
149
|
+
<Collapse in={!collapsed} unmountOnExit>
|
150
|
+
{children}
|
151
|
+
</Collapse>
|
152
|
+
</Container>
|
153
|
+
)
|
154
|
+
})
|
155
|
+
|
156
|
+
Section.displayName = 'Section'
|
157
|
+
Section.defaultProps = {
|
158
|
+
collapsible: false,
|
159
|
+
defaultCollapsed: true,
|
160
|
+
titleSize: 'medium'
|
161
|
+
}
|
162
|
+
|
163
|
+
export default Section
|
@@ -0,0 +1,186 @@
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
2
|
+
|
3
|
+
exports[`Section renders collapsible initially collapsed 1`] = `
|
4
|
+
<div>
|
5
|
+
<div
|
6
|
+
class="Picasso-root"
|
7
|
+
>
|
8
|
+
<div
|
9
|
+
class="PicassoSection-default PicassoSection-collapsed PicassoSection-root"
|
10
|
+
>
|
11
|
+
<div
|
12
|
+
class="PicassoSection-defaultHeader PicassoSection-defaultCollapsedHeader"
|
13
|
+
data-testid="header"
|
14
|
+
>
|
15
|
+
<div
|
16
|
+
class="PicassoSection-actions"
|
17
|
+
data-testid="actions"
|
18
|
+
>
|
19
|
+
<button
|
20
|
+
class="MuiButtonBase-root PicassoButton-small PicassoButton-primary PicassoButton-root PicassoButtonCircular-flat PicassoButtonCircular-root"
|
21
|
+
data-component-type="button"
|
22
|
+
data-testid="collapse"
|
23
|
+
tabindex="0"
|
24
|
+
type="button"
|
25
|
+
>
|
26
|
+
<span
|
27
|
+
class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline PicassoButton-content"
|
28
|
+
>
|
29
|
+
<svg
|
30
|
+
class="PicassoSvgArrowDownMinor16-root PicassoButton-icon Rotate180-transition"
|
31
|
+
style="min-width: 16px; min-height: 16px;"
|
32
|
+
viewBox="0 0 16 16"
|
33
|
+
>
|
34
|
+
<path
|
35
|
+
d="M11.997 5.29l.707.707-4 4-.707.707-.707-.707-4-4 .707-.707 4 4 4-4z"
|
36
|
+
/>
|
37
|
+
</svg>
|
38
|
+
</span>
|
39
|
+
</button>
|
40
|
+
</div>
|
41
|
+
</div>
|
42
|
+
</div>
|
43
|
+
</div>
|
44
|
+
</div>
|
45
|
+
`;
|
46
|
+
|
47
|
+
exports[`Section renders collapsible initially expanded 1`] = `
|
48
|
+
<div>
|
49
|
+
<div
|
50
|
+
class="Picasso-root"
|
51
|
+
>
|
52
|
+
<div
|
53
|
+
class="PicassoSection-default PicassoSection-root"
|
54
|
+
>
|
55
|
+
<div
|
56
|
+
class="PicassoSection-defaultHeader"
|
57
|
+
data-testid="header"
|
58
|
+
>
|
59
|
+
<div
|
60
|
+
class="PicassoSection-actions"
|
61
|
+
data-testid="actions"
|
62
|
+
>
|
63
|
+
<button
|
64
|
+
class="MuiButtonBase-root PicassoButton-small PicassoButton-primary PicassoButton-root PicassoButtonCircular-flat PicassoButtonCircular-root"
|
65
|
+
data-component-type="button"
|
66
|
+
data-testid="collapse"
|
67
|
+
tabindex="0"
|
68
|
+
type="button"
|
69
|
+
>
|
70
|
+
<span
|
71
|
+
class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline PicassoButton-content"
|
72
|
+
>
|
73
|
+
<svg
|
74
|
+
class="PicassoSvgArrowDownMinor16-root PicassoButton-icon Rotate180-transition Rotate180-rotate180"
|
75
|
+
style="min-width: 16px; min-height: 16px;"
|
76
|
+
viewBox="0 0 16 16"
|
77
|
+
>
|
78
|
+
<path
|
79
|
+
d="M11.997 5.29l.707.707-4 4-.707.707-.707-.707-4-4 .707-.707 4 4 4-4z"
|
80
|
+
/>
|
81
|
+
</svg>
|
82
|
+
</span>
|
83
|
+
</button>
|
84
|
+
</div>
|
85
|
+
</div>
|
86
|
+
<div
|
87
|
+
class="MuiCollapse-container MuiCollapse-entered"
|
88
|
+
style="min-height: 0px;"
|
89
|
+
>
|
90
|
+
<div
|
91
|
+
class="MuiCollapse-wrapper"
|
92
|
+
>
|
93
|
+
<div
|
94
|
+
class="MuiCollapse-wrapperInner"
|
95
|
+
>
|
96
|
+
<div
|
97
|
+
data-testid="content"
|
98
|
+
/>
|
99
|
+
</div>
|
100
|
+
</div>
|
101
|
+
</div>
|
102
|
+
</div>
|
103
|
+
</div>
|
104
|
+
</div>
|
105
|
+
`;
|
106
|
+
|
107
|
+
exports[`Section renders with title, subtitle, actions and content 1`] = `
|
108
|
+
<div>
|
109
|
+
<div
|
110
|
+
class="Picasso-root"
|
111
|
+
>
|
112
|
+
<div
|
113
|
+
class="PicassoSection-default PicassoSection-root"
|
114
|
+
>
|
115
|
+
<div
|
116
|
+
class="PicassoSection-defaultHeader"
|
117
|
+
data-testid="header"
|
118
|
+
>
|
119
|
+
<h3
|
120
|
+
class="MuiTypography-root PicassoSection-title MuiTypography-h3"
|
121
|
+
data-testid="title"
|
122
|
+
>
|
123
|
+
Title
|
124
|
+
</h3>
|
125
|
+
<p
|
126
|
+
class="MuiTypography-root PicassoTypography-bodyMedium PicassoTypography-darkGrey PicassoSection-subtitle MuiTypography-body1"
|
127
|
+
data-testid="subtitle"
|
128
|
+
>
|
129
|
+
Subtitle
|
130
|
+
</p>
|
131
|
+
<div
|
132
|
+
class="PicassoSection-actions"
|
133
|
+
data-testid="actions"
|
134
|
+
>
|
135
|
+
Actions
|
136
|
+
</div>
|
137
|
+
</div>
|
138
|
+
<div
|
139
|
+
class="MuiCollapse-container MuiCollapse-entered"
|
140
|
+
style="min-height: 0px;"
|
141
|
+
>
|
142
|
+
<div
|
143
|
+
class="MuiCollapse-wrapper"
|
144
|
+
>
|
145
|
+
<div
|
146
|
+
class="MuiCollapse-wrapperInner"
|
147
|
+
>
|
148
|
+
<div
|
149
|
+
data-testid="content"
|
150
|
+
/>
|
151
|
+
</div>
|
152
|
+
</div>
|
153
|
+
</div>
|
154
|
+
</div>
|
155
|
+
</div>
|
156
|
+
</div>
|
157
|
+
`;
|
158
|
+
|
159
|
+
exports[`Section renders without header 1`] = `
|
160
|
+
<div>
|
161
|
+
<div
|
162
|
+
class="Picasso-root"
|
163
|
+
>
|
164
|
+
<div
|
165
|
+
class="PicassoSection-default PicassoSection-root"
|
166
|
+
>
|
167
|
+
<div
|
168
|
+
class="MuiCollapse-container MuiCollapse-entered"
|
169
|
+
style="min-height: 0px;"
|
170
|
+
>
|
171
|
+
<div
|
172
|
+
class="MuiCollapse-wrapper"
|
173
|
+
>
|
174
|
+
<div
|
175
|
+
class="MuiCollapse-wrapperInner"
|
176
|
+
>
|
177
|
+
<div
|
178
|
+
data-testid="content"
|
179
|
+
/>
|
180
|
+
</div>
|
181
|
+
</div>
|
182
|
+
</div>
|
183
|
+
</div>
|
184
|
+
</div>
|
185
|
+
</div>
|
186
|
+
`;
|
@@ -0,0 +1,85 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import { Button, Table } from '@toptal/picasso'
|
3
|
+
import { Section } from '@toptal/picasso-lab'
|
4
|
+
|
5
|
+
const Example = () => {
|
6
|
+
return (
|
7
|
+
<Section
|
8
|
+
title='Talents'
|
9
|
+
subtitle={`${data.length} people`}
|
10
|
+
actions={
|
11
|
+
<Button size='small' variant='secondary'>
|
12
|
+
More
|
13
|
+
</Button>
|
14
|
+
}
|
15
|
+
>
|
16
|
+
<Table>
|
17
|
+
<Table.Head>
|
18
|
+
<Table.Row>
|
19
|
+
<Table.Cell>Name</Table.Cell>
|
20
|
+
<Table.Cell>Talent type</Table.Cell>
|
21
|
+
<Table.Cell>Company</Table.Cell>
|
22
|
+
<Table.Cell>Role</Table.Cell>
|
23
|
+
<Table.Cell>Country</Table.Cell>
|
24
|
+
</Table.Row>
|
25
|
+
</Table.Head>
|
26
|
+
<Table.Body>
|
27
|
+
{data.map(row => (
|
28
|
+
<Table.Row key={row.id}>
|
29
|
+
<Table.Cell>{row.name}</Table.Cell>
|
30
|
+
<Table.Cell>{row.talentType}</Table.Cell>
|
31
|
+
<Table.Cell>{row.company}</Table.Cell>
|
32
|
+
<Table.Cell>{row.role}</Table.Cell>
|
33
|
+
<Table.Cell>{row.country}</Table.Cell>
|
34
|
+
</Table.Row>
|
35
|
+
))}
|
36
|
+
</Table.Body>
|
37
|
+
</Table>
|
38
|
+
</Section>
|
39
|
+
)
|
40
|
+
}
|
41
|
+
|
42
|
+
const data = [
|
43
|
+
{
|
44
|
+
id: 0,
|
45
|
+
name: 'Delia Floyd',
|
46
|
+
talentType: 'Designer',
|
47
|
+
company: 'Airbnb',
|
48
|
+
role: 'UX lead',
|
49
|
+
country: 'United States'
|
50
|
+
},
|
51
|
+
{
|
52
|
+
id: 1,
|
53
|
+
name: 'Linnie Sims',
|
54
|
+
talentType: 'Designer',
|
55
|
+
company: 'Facebook',
|
56
|
+
role: 'Art director',
|
57
|
+
country: 'Spain'
|
58
|
+
},
|
59
|
+
{
|
60
|
+
id: 2,
|
61
|
+
name: 'Charles Watson',
|
62
|
+
talentType: 'Developer',
|
63
|
+
company: 'Amazon',
|
64
|
+
role: 'Ruby developer',
|
65
|
+
country: 'Germany'
|
66
|
+
},
|
67
|
+
{
|
68
|
+
id: 3,
|
69
|
+
name: 'Leila Pena',
|
70
|
+
talentType: 'Developer',
|
71
|
+
company: 'Invision',
|
72
|
+
role: 'Web developer',
|
73
|
+
country: 'Poland'
|
74
|
+
},
|
75
|
+
{
|
76
|
+
id: 4,
|
77
|
+
name: 'Logan Burton',
|
78
|
+
talentType: 'Developer',
|
79
|
+
company: 'Microsoft',
|
80
|
+
role: 'CTO',
|
81
|
+
country: 'United States'
|
82
|
+
}
|
83
|
+
]
|
84
|
+
|
85
|
+
export default Example
|
@@ -0,0 +1,113 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import { Table, Button, Grid, Typography } from '@toptal/picasso'
|
3
|
+
import { Section } from '@toptal/picasso-lab'
|
4
|
+
|
5
|
+
const Example = () => {
|
6
|
+
const content = (
|
7
|
+
<Table>
|
8
|
+
<Table.Head>
|
9
|
+
<Table.Row>
|
10
|
+
<Table.Cell>Name</Table.Cell>
|
11
|
+
<Table.Cell>Talent type</Table.Cell>
|
12
|
+
<Table.Cell>Company</Table.Cell>
|
13
|
+
<Table.Cell>Role</Table.Cell>
|
14
|
+
<Table.Cell>Country</Table.Cell>
|
15
|
+
</Table.Row>
|
16
|
+
</Table.Head>
|
17
|
+
<Table.Body>
|
18
|
+
{data.map(row => (
|
19
|
+
<Table.Row key={row.id}>
|
20
|
+
<Table.Cell>{row.name}</Table.Cell>
|
21
|
+
<Table.Cell>{row.talentType}</Table.Cell>
|
22
|
+
<Table.Cell>{row.company}</Table.Cell>
|
23
|
+
<Table.Cell>{row.role}</Table.Cell>
|
24
|
+
<Table.Cell>{row.country}</Table.Cell>
|
25
|
+
</Table.Row>
|
26
|
+
))}
|
27
|
+
</Table.Body>
|
28
|
+
</Table>
|
29
|
+
)
|
30
|
+
|
31
|
+
return (
|
32
|
+
<Grid>
|
33
|
+
<Grid.Item small={6}>
|
34
|
+
<Typography>Collapsible section is collapsed by default.</Typography>
|
35
|
+
<Section
|
36
|
+
title='Talents'
|
37
|
+
subtitle={`${data.length} people`}
|
38
|
+
actions={
|
39
|
+
<Button size='small' variant='secondary'>
|
40
|
+
More
|
41
|
+
</Button>
|
42
|
+
}
|
43
|
+
collapsible
|
44
|
+
>
|
45
|
+
{content}
|
46
|
+
</Section>
|
47
|
+
</Grid.Item>
|
48
|
+
<Grid.Item small={6}>
|
49
|
+
<Typography>
|
50
|
+
You can modify this behavior with `defaultCollapsed` property.
|
51
|
+
</Typography>
|
52
|
+
<Section
|
53
|
+
title='Talents'
|
54
|
+
subtitle={`${data.length} people`}
|
55
|
+
actions={
|
56
|
+
<Button size='small' variant='secondary'>
|
57
|
+
More
|
58
|
+
</Button>
|
59
|
+
}
|
60
|
+
collapsible
|
61
|
+
defaultCollapsed={false}
|
62
|
+
>
|
63
|
+
{content}
|
64
|
+
</Section>
|
65
|
+
</Grid.Item>
|
66
|
+
</Grid>
|
67
|
+
)
|
68
|
+
}
|
69
|
+
|
70
|
+
const data = [
|
71
|
+
{
|
72
|
+
id: 0,
|
73
|
+
name: 'Delia Floyd',
|
74
|
+
talentType: 'Designer',
|
75
|
+
company: 'Airbnb',
|
76
|
+
role: 'UX lead',
|
77
|
+
country: 'United States'
|
78
|
+
},
|
79
|
+
{
|
80
|
+
id: 1,
|
81
|
+
name: 'Linnie Sims',
|
82
|
+
talentType: 'Designer',
|
83
|
+
company: 'Facebook',
|
84
|
+
role: 'Art director',
|
85
|
+
country: 'Spain'
|
86
|
+
},
|
87
|
+
{
|
88
|
+
id: 2,
|
89
|
+
name: 'Charles Watson',
|
90
|
+
talentType: 'Developer',
|
91
|
+
company: 'Amazon',
|
92
|
+
role: 'Ruby developer',
|
93
|
+
country: 'Germany'
|
94
|
+
},
|
95
|
+
{
|
96
|
+
id: 3,
|
97
|
+
name: 'Leila Pena',
|
98
|
+
talentType: 'Developer',
|
99
|
+
company: 'Invision',
|
100
|
+
role: 'Web developer',
|
101
|
+
country: 'Poland'
|
102
|
+
},
|
103
|
+
{
|
104
|
+
id: 4,
|
105
|
+
name: 'Logan Burton',
|
106
|
+
talentType: 'Developer',
|
107
|
+
company: 'Microsoft',
|
108
|
+
role: 'CTO',
|
109
|
+
country: 'United States'
|
110
|
+
}
|
111
|
+
]
|
112
|
+
|
113
|
+
export default Example
|
@@ -0,0 +1,77 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import { Table } from '@toptal/picasso'
|
3
|
+
import { Section } from '@toptal/picasso-lab'
|
4
|
+
|
5
|
+
const Example = () => {
|
6
|
+
return (
|
7
|
+
<Section title='Talents' subtitle={`${data.length} people`}>
|
8
|
+
<Table>
|
9
|
+
<Table.Head>
|
10
|
+
<Table.Row>
|
11
|
+
<Table.Cell>Name</Table.Cell>
|
12
|
+
<Table.Cell>Talent type</Table.Cell>
|
13
|
+
<Table.Cell>Company</Table.Cell>
|
14
|
+
<Table.Cell>Role</Table.Cell>
|
15
|
+
<Table.Cell>Country</Table.Cell>
|
16
|
+
</Table.Row>
|
17
|
+
</Table.Head>
|
18
|
+
<Table.Body>
|
19
|
+
{data.map(row => (
|
20
|
+
<Table.Row key={row.id}>
|
21
|
+
<Table.Cell>{row.name}</Table.Cell>
|
22
|
+
<Table.Cell>{row.talentType}</Table.Cell>
|
23
|
+
<Table.Cell>{row.company}</Table.Cell>
|
24
|
+
<Table.Cell>{row.role}</Table.Cell>
|
25
|
+
<Table.Cell>{row.country}</Table.Cell>
|
26
|
+
</Table.Row>
|
27
|
+
))}
|
28
|
+
</Table.Body>
|
29
|
+
</Table>
|
30
|
+
</Section>
|
31
|
+
)
|
32
|
+
}
|
33
|
+
|
34
|
+
const data = [
|
35
|
+
{
|
36
|
+
id: 0,
|
37
|
+
name: 'Delia Floyd',
|
38
|
+
talentType: 'Designer',
|
39
|
+
company: 'Airbnb',
|
40
|
+
role: 'UX lead',
|
41
|
+
country: 'United States'
|
42
|
+
},
|
43
|
+
{
|
44
|
+
id: 1,
|
45
|
+
name: 'Linnie Sims',
|
46
|
+
talentType: 'Designer',
|
47
|
+
company: 'Facebook',
|
48
|
+
role: 'Art director',
|
49
|
+
country: 'Spain'
|
50
|
+
},
|
51
|
+
{
|
52
|
+
id: 2,
|
53
|
+
name: 'Charles Watson',
|
54
|
+
talentType: 'Developer',
|
55
|
+
company: 'Amazon',
|
56
|
+
role: 'Ruby developer',
|
57
|
+
country: 'Germany'
|
58
|
+
},
|
59
|
+
{
|
60
|
+
id: 3,
|
61
|
+
name: 'Leila Pena',
|
62
|
+
talentType: 'Developer',
|
63
|
+
company: 'Invision',
|
64
|
+
role: 'Web developer',
|
65
|
+
country: 'Poland'
|
66
|
+
},
|
67
|
+
{
|
68
|
+
id: 4,
|
69
|
+
name: 'Logan Burton',
|
70
|
+
talentType: 'Developer',
|
71
|
+
company: 'Microsoft',
|
72
|
+
role: 'CTO',
|
73
|
+
country: 'United States'
|
74
|
+
}
|
75
|
+
]
|
76
|
+
|
77
|
+
export default Example
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import { Grid, List, Typography } from '@toptal/picasso'
|
3
|
+
import { Section } from '@toptal/picasso-lab'
|
4
|
+
|
5
|
+
const Example = () => {
|
6
|
+
return (
|
7
|
+
<Grid>
|
8
|
+
<Grid.Item small={6}>
|
9
|
+
<Typography>Default title size</Typography>
|
10
|
+
<Section title='Quotes'>
|
11
|
+
<List variant='unordered'>
|
12
|
+
<List.Item>
|
13
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
14
|
+
</List.Item>
|
15
|
+
<List.Item>In nec cursus lectus, nec malesuada tellus.</List.Item>
|
16
|
+
</List>
|
17
|
+
</Section>
|
18
|
+
</Grid.Item>
|
19
|
+
<Grid.Item small={6}>
|
20
|
+
<Typography>Small title size</Typography>
|
21
|
+
<Section title='Quotes' titleSize='small'>
|
22
|
+
<List variant='unordered'>
|
23
|
+
<List.Item>
|
24
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
25
|
+
</List.Item>
|
26
|
+
<List.Item>In nec cursus lectus, nec malesuada tellus.</List.Item>
|
27
|
+
</List>
|
28
|
+
</Section>
|
29
|
+
</Grid.Item>
|
30
|
+
</Grid>
|
31
|
+
)
|
32
|
+
}
|
33
|
+
|
34
|
+
export default Example
|