@toptal/picasso-lab 9.3.1 → 13.0.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/{dist-package/Calendar → Calendar}/Calendar.d.ts +0 -0
- package/{dist-package/Calendar → Calendar}/Calendar.js +0 -0
- package/{dist-package/Calendar → Calendar}/Calendar.js.map +0 -0
- package/{dist-package/Calendar → Calendar}/index.d.ts +0 -0
- package/{dist-package/Calendar → Calendar}/index.js +0 -0
- package/{dist-package/Calendar → Calendar}/index.js.map +0 -0
- package/{dist-package/Calendar → Calendar}/styles.d.ts +0 -0
- package/{dist-package/Calendar → Calendar}/styles.js +0 -0
- package/{dist-package/Calendar → Calendar}/styles.js.map +0 -0
- package/{dist-package/Calendar → Calendar}/types.d.ts +0 -0
- package/{dist-package/Calendar → Calendar}/types.js +0 -0
- package/{dist-package/Calendar → Calendar}/types.js.map +0 -0
- package/{dist-package/DatePicker → DatePicker}/DatePicker.d.ts +0 -0
- package/{dist-package/DatePicker → DatePicker}/DatePicker.js +0 -0
- package/{dist-package/DatePicker → DatePicker}/DatePicker.js.map +0 -0
- package/{dist-package/DatePicker → DatePicker}/constants.d.ts +0 -0
- package/{dist-package/DatePicker → DatePicker}/constants.js +0 -0
- package/{dist-package/DatePicker → DatePicker}/constants.js.map +0 -0
- package/{dist-package/DatePicker → DatePicker}/index.d.ts +0 -0
- package/{dist-package/DatePicker → DatePicker}/index.js +0 -0
- package/{dist-package/DatePicker → DatePicker}/index.js.map +0 -0
- package/{dist-package/DatePicker → DatePicker}/styles.d.ts +0 -0
- package/{dist-package/DatePicker → DatePicker}/styles.js +0 -0
- package/{dist-package/DatePicker → DatePicker}/styles.js.map +0 -0
- package/{dist-package/DatePicker → DatePicker}/types.d.ts +0 -0
- package/{dist-package/DatePicker → DatePicker}/types.js +0 -0
- package/{dist-package/DatePicker → DatePicker}/types.js.map +0 -0
- package/{dist-package/DatePicker → DatePicker}/utils.d.ts +0 -0
- package/{dist-package/DatePicker → DatePicker}/utils.js +0 -0
- package/{dist-package/DatePicker → DatePicker}/utils.js.map +0 -0
- package/{dist-package/Drawer → Drawer}/Drawer.d.ts +0 -0
- package/{dist-package/Drawer → Drawer}/Drawer.js +0 -0
- package/{dist-package/Drawer → Drawer}/Drawer.js.map +0 -0
- package/{dist-package/Drawer → Drawer}/index.d.ts +0 -0
- package/{dist-package/Drawer → Drawer}/index.js +0 -0
- package/{dist-package/Drawer → Drawer}/index.js.map +0 -0
- package/{dist-package/Drawer → Drawer}/styles.d.ts +0 -0
- package/{dist-package/Drawer → Drawer}/styles.js +0 -0
- package/{dist-package/Drawer → Drawer}/styles.js.map +0 -0
- package/{dist-package/DrawerTitle → DrawerTitle}/DrawerTitle.d.ts +0 -0
- package/{dist-package/DrawerTitle → DrawerTitle}/DrawerTitle.js +0 -0
- package/{dist-package/DrawerTitle → DrawerTitle}/DrawerTitle.js.map +0 -0
- package/{dist-package/DrawerTitle → DrawerTitle}/index.d.ts +0 -0
- package/{dist-package/DrawerTitle → DrawerTitle}/index.js +0 -0
- package/{dist-package/DrawerTitle → DrawerTitle}/index.js.map +0 -0
- package/{dist-package/DrawerTitle → DrawerTitle}/styles.d.ts +0 -0
- package/{dist-package/DrawerTitle → DrawerTitle}/styles.js +0 -0
- package/{dist-package/DrawerTitle → DrawerTitle}/styles.js.map +0 -0
- package/{dist-package/Dropzone → Dropzone}/Dropzone.d.ts +0 -0
- package/{dist-package/Dropzone → Dropzone}/Dropzone.js +0 -0
- package/{dist-package/Dropzone → Dropzone}/Dropzone.js.map +0 -0
- package/{dist-package/Dropzone → Dropzone}/index.d.ts +0 -0
- package/{dist-package/Dropzone → Dropzone}/index.js +0 -0
- package/{dist-package/Dropzone → Dropzone}/index.js.map +0 -0
- package/{dist-package/Dropzone → Dropzone}/styles.d.ts +0 -0
- package/{dist-package/Dropzone → Dropzone}/styles.js +0 -0
- package/{dist-package/Dropzone → Dropzone}/styles.js.map +0 -0
- package/{dist-package/Dropzone → Dropzone}/types.d.ts +0 -0
- package/{dist-package/Dropzone → Dropzone}/types.js +0 -0
- package/{dist-package/Dropzone → Dropzone}/types.js.map +0 -0
- package/{dist-package/EmptyState → EmptyState}/EmptyState.d.ts +0 -0
- package/{dist-package/EmptyState → EmptyState}/EmptyState.js +0 -0
- package/{dist-package/EmptyState → EmptyState}/EmptyState.js.map +0 -0
- package/{dist-package/EmptyState → EmptyState}/index.d.ts +0 -0
- package/{dist-package/EmptyState → EmptyState}/index.js +0 -0
- package/{dist-package/EmptyState → EmptyState}/index.js.map +0 -0
- package/{dist-package/EmptyStateCollection → EmptyStateCollection}/EmptyStateCollection.d.ts +0 -0
- package/{dist-package/EmptyStateCollection → EmptyStateCollection}/EmptyStateCollection.js +0 -0
- package/{dist-package/EmptyStateCollection → EmptyStateCollection}/EmptyStateCollection.js.map +0 -0
- package/{dist-package/EmptyStateCollection → EmptyStateCollection}/index.d.ts +0 -0
- package/{dist-package/EmptyStateCollection → EmptyStateCollection}/index.js +0 -0
- package/{dist-package/EmptyStateCollection → EmptyStateCollection}/index.js.map +0 -0
- package/{dist-package/EmptyStateCollection → EmptyStateCollection}/styles.d.ts +0 -0
- package/{dist-package/EmptyStateCollection → EmptyStateCollection}/styles.js +0 -0
- package/{dist-package/EmptyStateCollection → EmptyStateCollection}/styles.js.map +0 -0
- package/{dist-package/EmptyStatePage → EmptyStatePage}/EmptyStatePage.d.ts +0 -0
- package/{dist-package/EmptyStatePage → EmptyStatePage}/EmptyStatePage.js +0 -0
- package/{dist-package/EmptyStatePage → EmptyStatePage}/EmptyStatePage.js.map +0 -0
- package/{dist-package/EmptyStatePage → EmptyStatePage}/index.d.ts +0 -0
- package/{dist-package/EmptyStatePage → EmptyStatePage}/index.js +0 -0
- package/{dist-package/EmptyStatePage → EmptyStatePage}/index.js.map +0 -0
- package/{dist-package/EmptyStatePage → EmptyStatePage}/styles.d.ts +0 -0
- package/{dist-package/EmptyStatePage → EmptyStatePage}/styles.js +0 -0
- package/{dist-package/EmptyStatePage → EmptyStatePage}/styles.js.map +0 -0
- package/{dist-package/Note → Note}/Note.d.ts +0 -0
- package/{dist-package/Note → Note}/Note.js +0 -0
- package/{dist-package/Note → Note}/Note.js.map +0 -0
- package/{dist-package/Note → Note}/index.d.ts +0 -0
- package/{dist-package/Note → Note}/index.js +0 -0
- package/{dist-package/Note → Note}/index.js.map +0 -0
- package/{dist-package/Note → Note}/styles.d.ts +0 -0
- package/{dist-package/Note → Note}/styles.js +0 -0
- package/{dist-package/Note → Note}/styles.js.map +0 -0
- package/{dist-package/NoteContent → NoteContent}/NoteContent.d.ts +0 -0
- package/{dist-package/NoteContent → NoteContent}/NoteContent.js +0 -0
- package/{dist-package/NoteContent → NoteContent}/NoteContent.js.map +0 -0
- package/{dist-package/NoteContent → NoteContent}/index.d.ts +0 -0
- package/{dist-package/NoteContent → NoteContent}/index.js +0 -0
- package/{dist-package/NoteContent → NoteContent}/index.js.map +0 -0
- package/{dist-package/NoteSubtitle → NoteSubtitle}/NoteSubtitle.d.ts +0 -0
- package/{dist-package/NoteSubtitle → NoteSubtitle}/NoteSubtitle.js +0 -0
- package/{dist-package/NoteSubtitle → NoteSubtitle}/NoteSubtitle.js.map +0 -0
- package/{dist-package/NoteSubtitle → NoteSubtitle}/index.d.ts +0 -0
- package/{dist-package/NoteSubtitle → NoteSubtitle}/index.js +0 -0
- package/{dist-package/NoteSubtitle → NoteSubtitle}/index.js.map +0 -0
- package/{dist-package/NoteTitle → NoteTitle}/NoteTitle.d.ts +0 -0
- package/{dist-package/NoteTitle → NoteTitle}/NoteTitle.js +0 -0
- package/{dist-package/NoteTitle → NoteTitle}/NoteTitle.js.map +0 -0
- package/{dist-package/NoteTitle → NoteTitle}/index.d.ts +0 -0
- package/{dist-package/NoteTitle → NoteTitle}/index.js +0 -0
- package/{dist-package/NoteTitle → NoteTitle}/index.js.map +0 -0
- package/{dist-package/NoteTitle → NoteTitle}/styles.d.ts +0 -0
- package/{dist-package/NoteTitle → NoteTitle}/styles.js +0 -0
- package/{dist-package/NoteTitle → NoteTitle}/styles.js.map +0 -0
- package/{dist-package/OverviewBlock → OverviewBlock}/OverviewBlock.d.ts +0 -0
- package/{dist-package/OverviewBlock → OverviewBlock}/OverviewBlock.js +0 -0
- package/{dist-package/OverviewBlock → OverviewBlock}/OverviewBlock.js.map +0 -0
- package/{dist-package/OverviewBlock → OverviewBlock}/index.d.ts +0 -0
- package/{dist-package/OverviewBlock → OverviewBlock}/index.js +0 -0
- package/{dist-package/OverviewBlock → OverviewBlock}/index.js.map +0 -0
- package/{dist-package/OverviewBlock → OverviewBlock}/styles.d.ts +0 -0
- package/{dist-package/OverviewBlock → OverviewBlock}/styles.js +0 -0
- package/{dist-package/OverviewBlock → OverviewBlock}/styles.js.map +0 -0
- package/{dist-package/OverviewBlockGroup → OverviewBlockGroup}/OverviewBlockGroup.d.ts +0 -0
- package/{dist-package/OverviewBlockGroup → OverviewBlockGroup}/OverviewBlockGroup.js +0 -0
- package/{dist-package/OverviewBlockGroup → OverviewBlockGroup}/OverviewBlockGroup.js.map +0 -0
- package/{dist-package/OverviewBlockGroup → OverviewBlockGroup}/OverviewBlockGroupContext.d.ts +0 -0
- package/{dist-package/OverviewBlockGroup → OverviewBlockGroup}/OverviewBlockGroupContext.js +0 -0
- package/{dist-package/OverviewBlockGroup → OverviewBlockGroup}/OverviewBlockGroupContext.js.map +0 -0
- package/{dist-package/OverviewBlockGroup → OverviewBlockGroup}/index.d.ts +0 -0
- package/{dist-package/OverviewBlockGroup → OverviewBlockGroup}/index.js +0 -0
- package/{dist-package/OverviewBlockGroup → OverviewBlockGroup}/index.js.map +0 -0
- package/{dist-package/OverviewBlockGroup → OverviewBlockGroup}/settings.d.ts +0 -0
- package/{dist-package/OverviewBlockGroup → OverviewBlockGroup}/settings.js +0 -0
- package/{dist-package/OverviewBlockGroup → OverviewBlockGroup}/settings.js.map +0 -0
- package/{dist-package/OverviewBlockRow → OverviewBlockRow}/OverviewBlockRow.d.ts +0 -0
- package/{dist-package/OverviewBlockRow → OverviewBlockRow}/OverviewBlockRow.js +0 -0
- package/{dist-package/OverviewBlockRow → OverviewBlockRow}/OverviewBlockRow.js.map +0 -0
- package/{dist-package/OverviewBlockRow → OverviewBlockRow}/index.d.ts +0 -0
- package/{dist-package/OverviewBlockRow → OverviewBlockRow}/index.js +0 -0
- package/{dist-package/OverviewBlockRow → OverviewBlockRow}/index.js.map +0 -0
- package/{dist-package/OverviewBlockRow → OverviewBlockRow}/styles.d.ts +0 -0
- package/{dist-package/OverviewBlockRow → OverviewBlockRow}/styles.js +0 -0
- package/{dist-package/OverviewBlockRow → OverviewBlockRow}/styles.js.map +0 -0
- package/{dist-package/Section → Section}/Section.d.ts +0 -0
- package/{dist-package/Section → Section}/Section.js +0 -0
- package/{dist-package/Section → Section}/Section.js.map +0 -0
- package/{dist-package/Section → Section}/index.d.ts +0 -0
- package/{dist-package/Section → Section}/index.js +0 -0
- package/{dist-package/Section → Section}/index.js.map +0 -0
- package/{dist-package/Section → Section}/styles.d.ts +0 -0
- package/{dist-package/Section → Section}/styles.js +0 -0
- package/{dist-package/Section → Section}/styles.js.map +0 -0
- package/{dist-package/Timeline → Timeline}/Timeline.d.ts +0 -0
- package/{dist-package/Timeline → Timeline}/Timeline.js +0 -0
- package/{dist-package/Timeline → Timeline}/Timeline.js.map +0 -0
- package/{dist-package/Timeline → Timeline}/index.d.ts +0 -0
- package/{dist-package/Timeline → Timeline}/index.js +0 -0
- package/{dist-package/Timeline → Timeline}/index.js.map +0 -0
- package/{dist-package/TimelineRow → TimelineRow}/TimelineRow.d.ts +0 -0
- package/{dist-package/TimelineRow → TimelineRow}/TimelineRow.js +0 -0
- package/{dist-package/TimelineRow → TimelineRow}/TimelineRow.js.map +0 -0
- package/{dist-package/TimelineRow → TimelineRow}/index.d.ts +0 -0
- package/{dist-package/TimelineRow → TimelineRow}/index.js +0 -0
- package/{dist-package/TimelineRow → TimelineRow}/index.js.map +0 -0
- package/{dist-package/TimelineRow → TimelineRow}/styles.d.ts +0 -0
- package/{dist-package/TimelineRow → TimelineRow}/styles.js +0 -0
- package/{dist-package/TimelineRow → TimelineRow}/styles.js.map +0 -0
- package/{dist-package/TypographyOverflow → TypographyOverflow}/TypographyOverflow.d.ts +0 -0
- package/{dist-package/TypographyOverflow → TypographyOverflow}/TypographyOverflow.js +0 -0
- package/{dist-package/TypographyOverflow → TypographyOverflow}/TypographyOverflow.js.map +0 -0
- package/{dist-package/TypographyOverflow → TypographyOverflow}/index.d.ts +0 -0
- package/{dist-package/TypographyOverflow → TypographyOverflow}/index.js +0 -0
- package/{dist-package/TypographyOverflow → TypographyOverflow}/index.js.map +0 -0
- package/{dist-package/TypographyOverflow → TypographyOverflow}/styles.d.ts +0 -0
- package/{dist-package/TypographyOverflow → TypographyOverflow}/styles.js +0 -0
- package/{dist-package/TypographyOverflow → TypographyOverflow}/styles.js.map +0 -0
- package/{dist-package/index.d.ts → index.d.ts} +0 -0
- package/{dist-package/index.js → index.js} +0 -0
- package/{dist-package/index.js.map → index.js.map} +0 -0
- package/package.json +7 -7
- package/CHANGELOG.md +0 -1385
- package/dist-package/README.md +0 -26
- package/dist-package/package.json +0 -53
- package/src/Calendar/Calendar.tsx +0 -215
- package/src/Calendar/__snapshots__/test.tsx.snap +0 -447
- package/src/Calendar/index.ts +0 -2
- package/src/Calendar/styles.ts +0 -104
- package/src/Calendar/test.tsx +0 -20
- package/src/Calendar/types.ts +0 -42
- package/src/DatePicker/DatePicker.tsx +0 -366
- 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 +0 -51
- package/src/DatePicker/constants.ts +0 -2
- package/src/DatePicker/index.ts +0 -5
- package/src/DatePicker/story/AllowCustomValue.example.tsx +0 -33
- package/src/DatePicker/story/Autocomplete.example.tsx +0 -47
- package/src/DatePicker/story/Default.example.tsx +0 -19
- package/src/DatePicker/story/Error.example.tsx +0 -26
- package/src/DatePicker/story/Range.example.tsx +0 -22
- package/src/DatePicker/story/WithCustomDayRendering.example.tsx +0 -47
- package/src/DatePicker/story/WithInitialValue.example.tsx +0 -19
- package/src/DatePicker/story/WithInputProps.example.tsx +0 -24
- package/src/DatePicker/story/WithNoHideOnSelect.example.tsx +0 -20
- package/src/DatePicker/story/WithOnBlurHandler.example.tsx +0 -22
- package/src/DatePicker/story/WithSelectionLimits.example.tsx +0 -32
- package/src/DatePicker/story/WithTimezone.example.tsx +0 -25
- package/src/DatePicker/story/index.jsx +0 -50
- package/src/DatePicker/styles.ts +0 -8
- package/src/DatePicker/test.tsx +0 -370
- package/src/DatePicker/types.ts +0 -13
- package/src/DatePicker/utils.ts +0 -123
- package/src/Drawer/Drawer.tsx +0 -105
- 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 +0 -6
- package/src/Drawer/story/CustomTitle.example.tsx +0 -32
- package/src/Drawer/story/Default.example.tsx +0 -29
- package/src/Drawer/story/DrawerAndNotification.example.tsx +0 -34
- package/src/Drawer/story/Widths.example.tsx +0 -46
- package/src/Drawer/story/WithoutTitle.example.tsx +0 -22
- package/src/Drawer/story/index.jsx +0 -80
- package/src/Drawer/styles.ts +0 -42
- package/src/DrawerTitle/DrawerTitle.tsx +0 -35
- package/src/DrawerTitle/index.ts +0 -1
- package/src/DrawerTitle/styles.ts +0 -12
- package/src/Dropzone/Dropzone.tsx +0 -146
- package/src/Dropzone/__snapshots__/test.tsx.snap +0 -40
- package/src/Dropzone/index.ts +0 -7
- package/src/Dropzone/story/Default.example.tsx +0 -8
- package/src/Dropzone/story/Disabled.example.tsx +0 -25
- package/src/Dropzone/story/Error.example.tsx +0 -16
- package/src/Dropzone/story/Multiple.example.tsx +0 -30
- package/src/Dropzone/story/Uploader.example.tsx +0 -116
- package/src/Dropzone/story/Uploading.example.tsx +0 -16
- package/src/Dropzone/story/index.jsx +0 -85
- package/src/Dropzone/styles.ts +0 -43
- package/src/Dropzone/test.tsx +0 -33
- package/src/Dropzone/types.ts +0 -56
- package/src/EmptyState/EmptyState.tsx +0 -7
- package/src/EmptyState/index.tsx +0 -1
- package/src/EmptyState/story/index.jsx +0 -13
- package/src/EmptyStateCollection/EmptyStateCollection.tsx +0 -56
- package/src/EmptyStateCollection/__image_snapshots__/emptystate-collection-emptystatecollection-snap.png +0 -0
- package/src/EmptyStateCollection/index.tsx +0 -1
- package/src/EmptyStateCollection/story/Default.example.tsx +0 -11
- package/src/EmptyStateCollection/story/index.jsx +0 -20
- package/src/EmptyStateCollection/styles.ts +0 -10
- package/src/EmptyStatePage/EmptyStatePage.tsx +0 -65
- package/src/EmptyStatePage/__image_snapshots__/emptystate-page-emptystatepage-snap.png +0 -0
- package/src/EmptyStatePage/index.tsx +0 -1
- package/src/EmptyStatePage/story/Default.example.tsx +0 -21
- package/src/EmptyStatePage/story/index.jsx +0 -21
- package/src/EmptyStatePage/styles.ts +0 -9
- package/src/Note/Note.tsx +0 -36
- package/src/Note/__snapshots__/test.tsx.snap +0 -37
- package/src/Note/index.ts +0 -6
- package/src/Note/story/Default.example.tsx +0 -14
- package/src/Note/story/index.jsx +0 -23
- package/src/Note/styles.ts +0 -27
- package/src/Note/test.tsx +0 -22
- package/src/NoteContent/NoteContent.tsx +0 -23
- package/src/NoteContent/index.ts +0 -1
- package/src/NoteContent/story/index.jsx +0 -12
- package/src/NoteSubtitle/NoteSubtitle.tsx +0 -25
- package/src/NoteSubtitle/index.ts +0 -1
- package/src/NoteSubtitle/story/index.jsx +0 -12
- package/src/NoteTitle/NoteTitle.tsx +0 -34
- package/src/NoteTitle/index.ts +0 -1
- package/src/NoteTitle/story/index.jsx +0 -12
- package/src/NoteTitle/styles.ts +0 -8
- package/src/OverviewBlock/OverviewBlock.tsx +0 -125
- 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 +0 -6
- package/src/OverviewBlock/story/Default.example.tsx +0 -35
- package/src/OverviewBlock/story/Multiline.example.tsx +0 -51
- package/src/OverviewBlock/story/Number.example.tsx +0 -20
- package/src/OverviewBlock/story/Routing.example.tsx +0 -40
- package/src/OverviewBlock/story/Text.example.tsx +0 -15
- package/src/OverviewBlock/story/index.jsx +0 -100
- package/src/OverviewBlock/styles.ts +0 -44
- package/src/OverviewBlock/test.tsx +0 -111
- package/src/OverviewBlockGroup/OverviewBlockGroup.tsx +0 -56
- package/src/OverviewBlockGroup/OverviewBlockGroupContext.tsx +0 -21
- 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 +0 -1
- package/src/OverviewBlockGroup/settings.ts +0 -2
- package/src/OverviewBlockGroup/story/BlockWidth.example.tsx +0 -38
- package/src/OverviewBlockGroup/story/CenterAligned.example.tsx +0 -17
- package/src/OverviewBlockGroup/story/index.jsx +0 -25
- package/src/OverviewBlockGroup/test.tsx +0 -17
- package/src/OverviewBlockRow/OverviewBlockRow.tsx +0 -22
- package/src/OverviewBlockRow/index.ts +0 -1
- package/src/OverviewBlockRow/story/index.jsx +0 -11
- package/src/OverviewBlockRow/styles.ts +0 -27
- package/src/Section/Section.tsx +0 -163
- package/src/Section/__snapshots__/test.tsx.snap +0 -186
- package/src/Section/index.ts +0 -6
- package/src/Section/story/Actions.example.tsx +0 -85
- package/src/Section/story/Collapsible.example.tsx +0 -113
- package/src/Section/story/Default.example.tsx +0 -77
- package/src/Section/story/TitleSize.example.tsx +0 -34
- package/src/Section/story/Variant.example.tsx +0 -108
- package/src/Section/story/index.jsx +0 -35
- package/src/Section/styles.ts +0 -65
- package/src/Section/test.tsx +0 -115
- package/src/Timeline/Timeline.tsx +0 -25
- package/src/Timeline/__snapshots__/test.tsx.snap +0 -332
- package/src/Timeline/index.ts +0 -6
- package/src/Timeline/story/Dates.example.tsx +0 -52
- package/src/Timeline/story/Default.example.tsx +0 -34
- package/src/Timeline/story/TrimLastConnector.example.tsx +0 -29
- package/src/Timeline/story/index.jsx +0 -27
- package/src/Timeline/test.tsx +0 -101
- package/src/TimelineRow/TimelineRow.tsx +0 -83
- package/src/TimelineRow/index.ts +0 -6
- package/src/TimelineRow/story/index.jsx +0 -11
- package/src/TimelineRow/styles.ts +0 -47
- package/src/TypographyOverflow/TypographyOverflow.tsx +0 -153
- 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 +0 -6
- package/src/TypographyOverflow/story/CheckboxLabel.example.tsx +0 -21
- package/src/TypographyOverflow/story/CustomTooltip.example.tsx +0 -22
- package/src/TypographyOverflow/story/Default.example.tsx +0 -32
- package/src/TypographyOverflow/story/Delay.example.tsx +0 -29
- package/src/TypographyOverflow/story/GridWithControls.example.tsx +0 -64
- package/src/TypographyOverflow/story/Multiline.example.tsx +0 -59
- package/src/TypographyOverflow/story/TooltipVariants.example.tsx +0 -23
- package/src/TypographyOverflow/story/index.jsx +0 -83
- package/src/TypographyOverflow/styles.ts +0 -29
- package/src/TypographyOverflow/test.tsx +0 -60
- package/src/index.ts +0 -35
- package/src/story/index.jsx +0 -10
- package/tsconfig.build.json +0 -7
@@ -1,100 +0,0 @@
|
|
1
|
-
import overviewBlockGroupStory from '../../OverviewBlockGroup/story'
|
2
|
-
import overviewBlockRowStory from '../../OverviewBlockRow/story'
|
3
|
-
import { OverviewBlock } from '../OverviewBlock'
|
4
|
-
import PicassoBook from '~/.storybook/components/PicassoBook'
|
5
|
-
|
6
|
-
const page = PicassoBook.section('Picasso Lab').createPage(
|
7
|
-
'OverviewBlock',
|
8
|
-
'Allows displaying counters.'
|
9
|
-
)
|
10
|
-
|
11
|
-
page
|
12
|
-
.createTabChapter('Props')
|
13
|
-
.addComponentDocs({
|
14
|
-
component: OverviewBlock,
|
15
|
-
name: 'OverviewBlock',
|
16
|
-
// react-docgen-typescript doesn't work with generics, so we have to generate this
|
17
|
-
// documentation manually
|
18
|
-
additionalDocs: {
|
19
|
-
children: {
|
20
|
-
name: 'children',
|
21
|
-
type: 'ReactNode',
|
22
|
-
description: 'Content of the component'
|
23
|
-
},
|
24
|
-
value: {
|
25
|
-
name: 'value',
|
26
|
-
type: 'string',
|
27
|
-
description: 'Counter value'
|
28
|
-
},
|
29
|
-
title: {
|
30
|
-
name: 'title',
|
31
|
-
type: 'string',
|
32
|
-
description: 'Counter title'
|
33
|
-
},
|
34
|
-
color: {
|
35
|
-
name: 'variant',
|
36
|
-
type: {
|
37
|
-
name: 'enum',
|
38
|
-
enums: [
|
39
|
-
"'value-red'",
|
40
|
-
"'value-green'",
|
41
|
-
"'value-blue'",
|
42
|
-
"'value-yellow'",
|
43
|
-
"'label-red'",
|
44
|
-
"'label-green'",
|
45
|
-
"'label-blue'",
|
46
|
-
"'label-yellow'"
|
47
|
-
]
|
48
|
-
},
|
49
|
-
description: 'The color variant'
|
50
|
-
},
|
51
|
-
align: {
|
52
|
-
name: 'align',
|
53
|
-
type: {
|
54
|
-
name: 'enum',
|
55
|
-
enums: ["'default'", "'center'"]
|
56
|
-
},
|
57
|
-
defaultValue: 'default',
|
58
|
-
description:
|
59
|
-
'Value and label alignment. By default content is aligned to the left.'
|
60
|
-
},
|
61
|
-
width: {
|
62
|
-
name: 'width',
|
63
|
-
type: {
|
64
|
-
name: 'enum',
|
65
|
-
enums: ["'narrow'", "'regular'", "'wide'"]
|
66
|
-
},
|
67
|
-
defaultValue: 'regular',
|
68
|
-
description: 'The width variant'
|
69
|
-
},
|
70
|
-
as: {
|
71
|
-
name: 'as',
|
72
|
-
type: {
|
73
|
-
name: 'enum'
|
74
|
-
},
|
75
|
-
defaultValue: 'button',
|
76
|
-
description:
|
77
|
-
'The component used for the root node.\nEither a string to use a DOM element or a component.'
|
78
|
-
},
|
79
|
-
onClick: {
|
80
|
-
name: 'onClick',
|
81
|
-
type: {
|
82
|
-
name: 'function',
|
83
|
-
description: '(event: MouseEvent) => void'
|
84
|
-
},
|
85
|
-
description: 'Callback invoked when component is clicked'
|
86
|
-
}
|
87
|
-
}
|
88
|
-
})
|
89
|
-
.addComponentDocs(overviewBlockGroupStory.componentDocs)
|
90
|
-
.addComponentDocs(overviewBlockRowStory.componentDocs)
|
91
|
-
|
92
|
-
page
|
93
|
-
.createChapter()
|
94
|
-
.addExample('OverviewBlock/story/Default.example.tsx', 'Default')
|
95
|
-
.addExample('OverviewBlock/story/Text.example.tsx', 'Text')
|
96
|
-
.addExample('OverviewBlock/story/Number.example.tsx', 'Number')
|
97
|
-
.addExample('OverviewBlock/story/Multiline.example.tsx', 'Multi-line')
|
98
|
-
.addExample('OverviewBlock/story/Routing.example.tsx', 'Routing')
|
99
|
-
|
100
|
-
page.connect(overviewBlockGroupStory.chapter)
|
@@ -1,44 +0,0 @@
|
|
1
|
-
import { createStyles, Theme } from '@material-ui/core/styles'
|
2
|
-
import { rem } from '@toptal/picasso-shared'
|
3
|
-
|
4
|
-
export default ({ palette, sizes }: Theme) =>
|
5
|
-
createStyles({
|
6
|
-
root: {
|
7
|
-
display: 'flex',
|
8
|
-
flexDirection: 'column',
|
9
|
-
backgroundColor: palette.common.white,
|
10
|
-
margin: 0,
|
11
|
-
minWidth: rem('150px'),
|
12
|
-
border: 'none',
|
13
|
-
textDecoration: 'none',
|
14
|
-
'&:not(:first-child)': {
|
15
|
-
borderLeft: `${sizes.borderWidth} solid ${palette.grey.light2}`
|
16
|
-
}
|
17
|
-
},
|
18
|
-
clickable: {
|
19
|
-
cursor: 'pointer',
|
20
|
-
outline: 'none',
|
21
|
-
'&:hover': {
|
22
|
-
backgroundColor: palette.blue.lighter
|
23
|
-
}
|
24
|
-
},
|
25
|
-
disableOutline: {
|
26
|
-
outline: 'none'
|
27
|
-
},
|
28
|
-
|
29
|
-
defaultAlign: {
|
30
|
-
alignItems: 'flex-start'
|
31
|
-
},
|
32
|
-
centerAlign: {
|
33
|
-
alignItems: 'center'
|
34
|
-
},
|
35
|
-
narrowWidth: {
|
36
|
-
padding: '0.75rem 1rem'
|
37
|
-
},
|
38
|
-
regularWidth: {
|
39
|
-
padding: '0.75rem 1.5rem'
|
40
|
-
},
|
41
|
-
wideWidth: {
|
42
|
-
padding: '0.75rem 2rem'
|
43
|
-
}
|
44
|
-
})
|
@@ -1,111 +0,0 @@
|
|
1
|
-
import React, { ComponentProps } from 'react'
|
2
|
-
import { render, PicassoConfig } from '@toptal/picasso/test-utils'
|
3
|
-
import * as titleCaseModule from 'ap-style-title-case'
|
4
|
-
import { Link, MemoryRouter as Router } from 'react-router-dom'
|
5
|
-
|
6
|
-
import OverviewBlock from './OverviewBlock'
|
7
|
-
|
8
|
-
jest.mock('ap-style-title-case')
|
9
|
-
|
10
|
-
const renderOverviewBlock = (
|
11
|
-
props: ComponentProps<typeof OverviewBlock>,
|
12
|
-
picassoConfig?: PicassoConfig
|
13
|
-
) => {
|
14
|
-
return render(
|
15
|
-
<Router>
|
16
|
-
<OverviewBlock {...props} />
|
17
|
-
</Router>,
|
18
|
-
undefined,
|
19
|
-
picassoConfig
|
20
|
-
)
|
21
|
-
}
|
22
|
-
|
23
|
-
let spiedOnTitleCase: jest.SpyInstance
|
24
|
-
|
25
|
-
describe('OverviewBlock', () => {
|
26
|
-
beforeEach(() => {
|
27
|
-
spiedOnTitleCase = jest.spyOn(titleCaseModule, 'default')
|
28
|
-
})
|
29
|
-
|
30
|
-
afterEach(() => {
|
31
|
-
spiedOnTitleCase.mockReset()
|
32
|
-
})
|
33
|
-
|
34
|
-
it('should transform text to title case when Picasso titleCase property is true', () => {
|
35
|
-
const LABEL_TEXT = 'abc dj4'
|
36
|
-
|
37
|
-
renderOverviewBlock(
|
38
|
-
{ value: 'abc co5', label: LABEL_TEXT },
|
39
|
-
{ titleCase: true }
|
40
|
-
)
|
41
|
-
|
42
|
-
expect(spiedOnTitleCase).toHaveBeenCalledWith(LABEL_TEXT)
|
43
|
-
})
|
44
|
-
|
45
|
-
it('should not transform text to title case when Picasso titleCase property is true but the component property overrides it', () => {
|
46
|
-
renderOverviewBlock(
|
47
|
-
{ value: 'abc dk9', label: 'abc ps0', titleCase: false },
|
48
|
-
{ titleCase: true }
|
49
|
-
)
|
50
|
-
|
51
|
-
expect(spiedOnTitleCase).toHaveBeenCalledTimes(0)
|
52
|
-
})
|
53
|
-
|
54
|
-
describe('when OnClick function is defined', () => {
|
55
|
-
describe('when `as` prop is defined', () => {
|
56
|
-
it('render the element as `Link`', () => {
|
57
|
-
const { getByTestId } = renderOverviewBlock({
|
58
|
-
value: 'abc dk9',
|
59
|
-
label: 'abc ps0',
|
60
|
-
as: Link,
|
61
|
-
onClick: jest.fn(),
|
62
|
-
to: '/',
|
63
|
-
'data-testid': 'OverviewBlock'
|
64
|
-
})
|
65
|
-
const block = getByTestId('OverviewBlock')
|
66
|
-
|
67
|
-
// By the Link component to -> href
|
68
|
-
expect(block).toHaveAttribute('href', '/')
|
69
|
-
expect(block.nodeName).toBe('A')
|
70
|
-
})
|
71
|
-
})
|
72
|
-
|
73
|
-
describe('when `as` prop is undefined', () => {
|
74
|
-
it('render the element as `button`', () => {
|
75
|
-
const { getByTestId } = renderOverviewBlock({
|
76
|
-
value: 'abc dk9',
|
77
|
-
label: 'abc ps0',
|
78
|
-
onClick: jest.fn(),
|
79
|
-
'data-testid': 'OverviewBlock'
|
80
|
-
})
|
81
|
-
|
82
|
-
expect(getByTestId('OverviewBlock').nodeName).toBe('BUTTON')
|
83
|
-
})
|
84
|
-
})
|
85
|
-
})
|
86
|
-
|
87
|
-
describe('when OnClick function is undefined', () => {
|
88
|
-
it('renders the element as `div`', () => {
|
89
|
-
const { getByTestId } = renderOverviewBlock({
|
90
|
-
value: 'abc dk9',
|
91
|
-
label: 'abc ps0',
|
92
|
-
'data-testid': 'OverviewBlock'
|
93
|
-
})
|
94
|
-
|
95
|
-
expect(getByTestId('OverviewBlock').nodeName).toBe('DIV')
|
96
|
-
})
|
97
|
-
|
98
|
-
it('renders the element as `Link`', () => {
|
99
|
-
const { getByTestId } = renderOverviewBlock({
|
100
|
-
as: Link,
|
101
|
-
to: '/',
|
102
|
-
'data-testid': 'OverviewBlock'
|
103
|
-
})
|
104
|
-
const block = getByTestId('OverviewBlock')
|
105
|
-
|
106
|
-
// By the Link component to -> href
|
107
|
-
expect(block).toHaveAttribute('href', '/')
|
108
|
-
expect(block.nodeName).toBe('A')
|
109
|
-
})
|
110
|
-
})
|
111
|
-
})
|
@@ -1,56 +0,0 @@
|
|
1
|
-
import React, {
|
2
|
-
FunctionComponent,
|
3
|
-
HTMLAttributes,
|
4
|
-
ReactNode,
|
5
|
-
ReactComponentElement
|
6
|
-
} from 'react'
|
7
|
-
|
8
|
-
import { Alignment, BlockWidth } from './settings'
|
9
|
-
import { OverviewBlockGroupContext } from './OverviewBlockGroupContext'
|
10
|
-
import OverviewBlockRow from '../OverviewBlockRow'
|
11
|
-
|
12
|
-
type Props = HTMLAttributes<HTMLDivElement> & {
|
13
|
-
/** Value and label alignment for blocks. By default content is aligned to the left. */
|
14
|
-
align?: Alignment
|
15
|
-
/** The block width variant */
|
16
|
-
blockWidth?: BlockWidth
|
17
|
-
}
|
18
|
-
|
19
|
-
// We need to inject a single row if there is none provided.
|
20
|
-
// It allows to skip `OverviewBlock.Row` component for a single-row groups.
|
21
|
-
const shouldInjectRow = (children?: ReactNode) => {
|
22
|
-
if (!children) {
|
23
|
-
return false
|
24
|
-
}
|
25
|
-
|
26
|
-
return !React.Children.toArray(children)
|
27
|
-
.filter((el): el is ReactComponentElement<typeof OverviewBlockRow> =>
|
28
|
-
React.isValidElement(el)
|
29
|
-
)
|
30
|
-
.some(el => el.type.displayName === OverviewBlockRow.displayName)
|
31
|
-
}
|
32
|
-
|
33
|
-
const OverviewBlockGroup: FunctionComponent<Props> = props => {
|
34
|
-
const { children, align = 'default', blockWidth = 'regular', ...rest } = props
|
35
|
-
|
36
|
-
return (
|
37
|
-
<section {...rest}>
|
38
|
-
<OverviewBlockGroupContext.Provider value={{ align, blockWidth }}>
|
39
|
-
{shouldInjectRow(children) ? (
|
40
|
-
<OverviewBlockRow>{children}</OverviewBlockRow>
|
41
|
-
) : (
|
42
|
-
children
|
43
|
-
)}
|
44
|
-
</OverviewBlockGroupContext.Provider>
|
45
|
-
</section>
|
46
|
-
)
|
47
|
-
}
|
48
|
-
|
49
|
-
OverviewBlockGroup.displayName = 'OverviewBlockGroup'
|
50
|
-
|
51
|
-
OverviewBlockGroup.defaultProps = {
|
52
|
-
align: 'default',
|
53
|
-
blockWidth: 'regular'
|
54
|
-
}
|
55
|
-
|
56
|
-
export default OverviewBlockGroup
|
@@ -1,21 +0,0 @@
|
|
1
|
-
import { createContext, useContext } from 'react'
|
2
|
-
|
3
|
-
import { Alignment, BlockWidth } from './settings'
|
4
|
-
|
5
|
-
interface OverviewBlockGroupSettings {
|
6
|
-
align: Alignment
|
7
|
-
blockWidth: BlockWidth
|
8
|
-
}
|
9
|
-
|
10
|
-
const defaultSettings = {
|
11
|
-
align: 'default' as const,
|
12
|
-
blockWidth: 'regular' as const
|
13
|
-
}
|
14
|
-
|
15
|
-
export const OverviewBlockGroupContext = createContext<
|
16
|
-
OverviewBlockGroupSettings
|
17
|
-
>(defaultSettings)
|
18
|
-
|
19
|
-
export const useOverviewBlockGroupContext = () => {
|
20
|
-
return useContext(OverviewBlockGroupContext)
|
21
|
-
}
|
Binary file
|
Binary file
|
@@ -1 +0,0 @@
|
|
1
|
-
export { default } from './OverviewBlockGroup'
|
@@ -1,38 +0,0 @@
|
|
1
|
-
import React from 'react'
|
2
|
-
import { OverviewBlock } from '@toptal/picasso-lab'
|
3
|
-
import { Container } from '@toptal/picasso'
|
4
|
-
|
5
|
-
const BlockWidthExample = () => {
|
6
|
-
return (
|
7
|
-
<Container>
|
8
|
-
<Container>
|
9
|
-
<OverviewBlock.Group blockWidth='narrow'>
|
10
|
-
<OverviewBlock value='Narrow' label='Width' />
|
11
|
-
<OverviewBlock value='Narrow' label='Width' />
|
12
|
-
<OverviewBlock value='Narrow' label='Width' />
|
13
|
-
<OverviewBlock value='Narrow' label='Width' />
|
14
|
-
<OverviewBlock value='Narrow' label='Width' />
|
15
|
-
</OverviewBlock.Group>
|
16
|
-
</Container>
|
17
|
-
|
18
|
-
<Container top='small'>
|
19
|
-
<OverviewBlock.Group blockWidth='regular'>
|
20
|
-
<OverviewBlock value='Regular' label='Width' />
|
21
|
-
<OverviewBlock value='Regular' label='Width' />
|
22
|
-
<OverviewBlock value='Regular' label='Width' />
|
23
|
-
<OverviewBlock value='Regular' label='Width' />
|
24
|
-
</OverviewBlock.Group>
|
25
|
-
</Container>
|
26
|
-
|
27
|
-
<Container top='small'>
|
28
|
-
<OverviewBlock.Group blockWidth='wide'>
|
29
|
-
<OverviewBlock value='Wide' label='Width' />
|
30
|
-
<OverviewBlock value='Wide' label='Width' />
|
31
|
-
<OverviewBlock value='Wide' label='Width' />
|
32
|
-
</OverviewBlock.Group>
|
33
|
-
</Container>
|
34
|
-
</Container>
|
35
|
-
)
|
36
|
-
}
|
37
|
-
|
38
|
-
export default BlockWidthExample
|
@@ -1,17 +0,0 @@
|
|
1
|
-
import React from 'react'
|
2
|
-
import { OverviewBlock } from '@toptal/picasso-lab'
|
3
|
-
|
4
|
-
const CenterAlignedExample = () => {
|
5
|
-
return (
|
6
|
-
<OverviewBlock.Group align='center'>
|
7
|
-
<OverviewBlock value='12345678' label='Label' variant='label-red' />
|
8
|
-
<OverviewBlock
|
9
|
-
value='$585,895,606.35'
|
10
|
-
label='Paid'
|
11
|
-
variant='label-green'
|
12
|
-
/>
|
13
|
-
</OverviewBlock.Group>
|
14
|
-
)
|
15
|
-
}
|
16
|
-
|
17
|
-
export default CenterAlignedExample
|
@@ -1,25 +0,0 @@
|
|
1
|
-
import OverviewBlockGroup from '../OverviewBlockGroup'
|
2
|
-
import PicassoBook from '~/.storybook/components/PicassoBook'
|
3
|
-
|
4
|
-
const componentDocs = PicassoBook.createComponentDocs(
|
5
|
-
OverviewBlockGroup,
|
6
|
-
'OverviewBlock.Group'
|
7
|
-
)
|
8
|
-
|
9
|
-
const chapter = PicassoBook.connectToPage(page =>
|
10
|
-
page
|
11
|
-
.createChapter('Visual variants of the groups', '')
|
12
|
-
.addExample(
|
13
|
-
'OverviewBlockGroup/story/CenterAligned.example.tsx',
|
14
|
-
'Center Aligned'
|
15
|
-
)
|
16
|
-
.addExample(
|
17
|
-
'OverviewBlockGroup/story/BlockWidth.example.tsx',
|
18
|
-
'Block Width'
|
19
|
-
)
|
20
|
-
)
|
21
|
-
|
22
|
-
export default {
|
23
|
-
chapter,
|
24
|
-
componentDocs
|
25
|
-
}
|
@@ -1,17 +0,0 @@
|
|
1
|
-
import React from 'react'
|
2
|
-
import { render } from '@toptal/picasso/test-utils'
|
3
|
-
|
4
|
-
import OverviewBlock from '../OverviewBlock'
|
5
|
-
import OverviewBlockGroup from './OverviewBlockGroup'
|
6
|
-
|
7
|
-
describe('OverlayBlockGroup', () => {
|
8
|
-
it('allows to render a single block', () => {
|
9
|
-
expect(() => {
|
10
|
-
render(
|
11
|
-
<OverviewBlockGroup>
|
12
|
-
<OverviewBlock value='Value' label='Label' />
|
13
|
-
</OverviewBlockGroup>
|
14
|
-
)
|
15
|
-
}).not.toThrow()
|
16
|
-
})
|
17
|
-
})
|
@@ -1,22 +0,0 @@
|
|
1
|
-
import React, { FunctionComponent, HTMLAttributes } from 'react'
|
2
|
-
import { Theme, makeStyles } from '@material-ui/core/styles'
|
3
|
-
import cx from 'classnames'
|
4
|
-
|
5
|
-
import styles from './styles'
|
6
|
-
|
7
|
-
type Props = HTMLAttributes<HTMLDivElement>
|
8
|
-
|
9
|
-
const useStyles = makeStyles<Theme>(styles, {
|
10
|
-
name: 'PicassoOverviewBlockRow'
|
11
|
-
})
|
12
|
-
|
13
|
-
const OverviewBlockRow: FunctionComponent<Props> = props => {
|
14
|
-
const { className, ...rest } = props
|
15
|
-
const classes = useStyles()
|
16
|
-
|
17
|
-
return <div {...rest} className={cx(classes.root, className)} />
|
18
|
-
}
|
19
|
-
|
20
|
-
OverviewBlockRow.displayName = 'OverviewBlockRow'
|
21
|
-
|
22
|
-
export default OverviewBlockRow
|
@@ -1 +0,0 @@
|
|
1
|
-
export { default } from './OverviewBlockRow'
|
@@ -1,11 +0,0 @@
|
|
1
|
-
import OverviewBlockRow from '../OverviewBlockRow'
|
2
|
-
import PicassoBook from '~/.storybook/components/PicassoBook'
|
3
|
-
|
4
|
-
const componentDocs = PicassoBook.createComponentDocs(
|
5
|
-
OverviewBlockRow,
|
6
|
-
'OverviewBlock.Row'
|
7
|
-
)
|
8
|
-
|
9
|
-
export default {
|
10
|
-
componentDocs
|
11
|
-
}
|
@@ -1,27 +0,0 @@
|
|
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
|
-
})
|
package/src/Section/Section.tsx
DELETED
@@ -1,163 +0,0 @@
|
|
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
|