superdesk-ui-framework 3.1.4 → 3.1.6
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/app/styles/_helpers.scss +317 -151
- package/app/styles/_sd-tag-input.scss +1 -1
- package/app/styles/design-tokens/_design-tokens-general.scss +18 -7
- package/app/styles/design-tokens/_new-colors.scss +6 -1
- package/app/styles/grids/_grid-layout.scss +1 -0
- package/app/styles/interface-elements/_side-panel.scss +4 -0
- package/app-typescript/components/IconPicker.tsx +1 -1
- package/app-typescript/components/TreeSelect/TreeSelect.tsx +118 -38
- package/app-typescript/components/TreeSelect/TreeSelectPill.tsx +20 -9
- package/{examples/pages/react → dist/components}/Index.tsx +81 -63
- package/dist/{react → components}/TreeSelect.tsx +61 -3
- package/dist/components/utilities/SpacingUtilities.tsx +774 -0
- package/dist/components/utilities/TextUtilities.tsx +428 -0
- package/dist/components.html +6 -27
- package/dist/{components → components_deprecated}/text.html +7 -7
- package/dist/components_deprecated.html +38 -0
- package/dist/design/buttons.html +1 -11
- package/dist/design/checkbox-and-radio.html +3 -3
- package/dist/design/layout-principles.html +0 -1
- package/dist/design/switch.html +0 -10
- package/dist/design-patterns/Index.tsx +86 -0
- package/dist/design-patterns/ThreePaneLayoutPattern.tsx +362 -0
- package/{examples/pages/react.html → dist/design-patterns.html} +3 -4
- package/dist/design.html +4 -4
- package/dist/examples.bundle.css +106 -20
- package/dist/examples.bundle.js +81289 -79455
- package/dist/main.html +17 -15
- package/dist/playgrounds/boxed-list.html +7 -7
- package/dist/playgrounds/master-desk.html +4 -4
- package/dist/playgrounds/photo-snippets/edit-photo-metadata.html +1 -1
- package/dist/playgrounds/planning-snippets/edit-planning.html +1 -1
- package/dist/playgrounds/planning.html +1 -1
- package/dist/playgrounds/publisher-content-analytics.html +25 -25
- package/dist/playgrounds/react-playgrounds/TestGround.tsx +3 -3
- package/dist/playgrounds/video-editor.html +1 -1
- package/dist/playgrounds.html +3 -6
- package/dist/superdesk-ui.bundle.css +315 -120
- package/dist/superdesk-ui.bundle.js +78250 -78174
- package/examples/css/docs-page.css +106 -20
- package/examples/index.js +89 -89
- package/examples/js/doc.js +16 -2
- package/examples/js/react.js +122 -19
- package/{dist/react → examples/pages/components}/Index.tsx +81 -63
- package/examples/pages/{react → components}/TreeSelect.tsx +61 -3
- package/examples/pages/components/utilities/SpacingUtilities.tsx +774 -0
- package/examples/pages/components/utilities/TextUtilities.tsx +428 -0
- package/examples/pages/components.html +6 -27
- package/examples/pages/{components → components_deprecated}/text.html +7 -7
- package/examples/pages/components_deprecated.html +38 -0
- package/examples/pages/design/buttons.html +1 -11
- package/examples/pages/design/checkbox-and-radio.html +3 -3
- package/examples/pages/design/layout-principles.html +0 -1
- package/examples/pages/design/switch.html +0 -10
- package/examples/pages/design-patterns/Index.tsx +86 -0
- package/examples/pages/design-patterns/ThreePaneLayoutPattern.tsx +362 -0
- package/{dist/react.html → examples/pages/design-patterns.html} +3 -4
- package/examples/pages/design.html +4 -4
- package/examples/pages/main.html +17 -15
- package/examples/pages/playgrounds/boxed-list.html +7 -7
- package/examples/pages/playgrounds/master-desk.html +4 -4
- package/examples/pages/playgrounds/photo-snippets/edit-photo-metadata.html +1 -1
- package/examples/pages/playgrounds/planning-snippets/edit-planning.html +1 -1
- package/examples/pages/playgrounds/planning.html +1 -1
- package/examples/pages/playgrounds/publisher-content-analytics.html +25 -25
- package/examples/pages/playgrounds/react-playgrounds/TestGround.tsx +3 -3
- package/examples/pages/playgrounds/video-editor.html +1 -1
- package/examples/pages/playgrounds.html +3 -6
- package/package.json +1 -1
- package/react/components/IconPicker.js +1 -1
- package/react/components/TreeSelect/TreeSelect.d.ts +5 -0
- package/react/components/TreeSelect/TreeSelect.js +80 -17
- package/react/components/TreeSelect/TreeSelectPill.d.ts +1 -0
- package/react/components/TreeSelect/TreeSelectPill.js +13 -4
- /package/dist/{react → components}/Alerts.tsx +0 -0
- /package/dist/{react → components}/Autocomplete.tsx +0 -0
- /package/dist/{react → components}/Avatar.tsx +0 -0
- /package/dist/{react → components}/Badges.tsx +0 -0
- /package/dist/{react → components}/BigIconFont.tsx +0 -0
- /package/dist/{react → components}/BoxedList.tsx +0 -0
- /package/dist/{react → components}/ButtonGroups.tsx +0 -0
- /package/dist/{react → components}/Buttons.tsx +0 -0
- /package/dist/{react → components}/Carousel.tsx +0 -0
- /package/dist/{react → components}/Checkboxs.tsx +0 -0
- /package/dist/{react → components}/Container.tsx +0 -0
- /package/dist/{react → components}/ContentDivider.tsx +0 -0
- /package/dist/{react → components}/ContentList.tsx +0 -0
- /package/dist/{react → components}/CreateButton.tsx +0 -0
- /package/dist/{react → components}/DatePicker.tsx +0 -0
- /package/dist/{react → components}/DragHandleDocs.tsx +0 -0
- /package/dist/{react → components}/DropZone.tsx +0 -0
- /package/dist/{react → components}/Dropdowns.tsx +0 -0
- /package/dist/{react → components}/DurationInput.tsx +0 -0
- /package/dist/{react → components}/EmptyStates.tsx +0 -0
- /package/dist/{react → components}/GridItem.tsx +0 -0
- /package/dist/{react → components}/GridList.tsx +0 -0
- /package/dist/{react → components}/Heading.tsx +0 -0
- /package/dist/{react → components}/IconButtons.tsx +0 -0
- /package/dist/{react → components}/IconFont.tsx +0 -0
- /package/dist/{react → components}/IconLabels.tsx +0 -0
- /package/dist/{react → components}/IconPicker.tsx +0 -0
- /package/dist/{react → components}/IllustrationButton.tsx +0 -0
- /package/dist/{react → components}/Inputs.tsx +0 -0
- /package/dist/{react → components}/Labels.tsx +0 -0
- /package/dist/{react → components}/LeftNavigations.tsx +0 -0
- /package/dist/{react → components}/ListItems.tsx +0 -0
- /package/dist/{react → components}/Menu.tsx +0 -0
- /package/dist/{react → components}/Modal.tsx +0 -0
- /package/dist/{react → components}/MultiSelect.tsx +0 -0
- /package/dist/{react → components}/NavButtons.tsx +0 -0
- /package/dist/{react → components}/Panel.tsx +0 -0
- /package/dist/{react → components}/Popover.tsx +0 -0
- /package/dist/{react → components}/QuickNavigationBar.tsx +0 -0
- /package/dist/{react → components}/RadioGroup.tsx +0 -0
- /package/dist/{react → components}/ResizablePanels.tsx +0 -0
- /package/dist/{react → components}/SelectGrid.tsx +0 -0
- /package/dist/{react → components}/SelectWithTemplate.tsx +0 -0
- /package/dist/{react → components}/Selects.tsx +0 -0
- /package/dist/{react → components}/SimpleList.tsx +0 -0
- /package/dist/{react → components}/SubNav.tsx +0 -0
- /package/dist/{react → components}/Switch.tsx +0 -0
- /package/dist/{react → components}/TableList.tsx +0 -0
- /package/dist/{react → components}/Tabs.tsx +0 -0
- /package/dist/{react → components}/TagInputDocs.tsx +0 -0
- /package/dist/{react → components}/Tags.tsx +0 -0
- /package/dist/{react → components}/Text.tsx +0 -0
- /package/dist/{react → components}/TimePicker.tsx +0 -0
- /package/dist/{react → components}/Toasts.tsx +0 -0
- /package/dist/{react → components}/Togglebox.tsx +0 -0
- /package/dist/{react → components}/Tooltips.tsx +0 -0
- /package/dist/{react → components}/TreeMenu.tsx +0 -0
- /package/dist/{react → components}/WithPaginationDocs.tsx +0 -0
- /package/dist/{react → components}/WithSizeObserver.tsx +0 -0
- /package/dist/{react → components}/tree-select/TreeSelect.tsx +0 -0
- /package/dist/{react → components}/tree-select/example-1.tsx +0 -0
- /package/dist/{react → components}/tree-select/example-2.tsx +0 -0
- /package/dist/{components → components_deprecated}/alerts.html +0 -0
- /package/dist/{components → components_deprecated}/badge.html +0 -0
- /package/dist/{components → components_deprecated}/basic-grid.html +0 -0
- /package/dist/{components → components_deprecated}/big-icons.html +0 -0
- /package/dist/{components → components_deprecated}/buttons.html +0 -0
- /package/dist/{components → components_deprecated}/carousel.html +0 -0
- /package/dist/{components → components_deprecated}/checkbox.html +0 -0
- /package/dist/{components → components_deprecated}/colors.html +0 -0
- /package/dist/{components → components_deprecated}/dropdown.html +0 -0
- /package/dist/{components → components_deprecated}/form-layout.html +0 -0
- /package/dist/{components → components_deprecated}/icon-labels.html +0 -0
- /package/dist/{components → components_deprecated}/icons.html +0 -0
- /package/dist/{components → components_deprecated}/input.html +0 -0
- /package/dist/{components → components_deprecated}/labels.html +0 -0
- /package/dist/{components → components_deprecated}/layout-grid.html +0 -0
- /package/dist/{components → components_deprecated}/left-nav.html +0 -0
- /package/dist/{components → components_deprecated}/list-item.html +0 -0
- /package/dist/{components → components_deprecated}/loader.html +0 -0
- /package/dist/{components → components_deprecated}/modal-template.html +0 -0
- /package/dist/{components → components_deprecated}/modals.html +0 -0
- /package/dist/{components → components_deprecated}/other-elements.html +0 -0
- /package/dist/{components → components_deprecated}/panel-info.html +0 -0
- /package/dist/{components → components_deprecated}/radio.html +0 -0
- /package/dist/{components → components_deprecated}/select.html +0 -0
- /package/dist/{components → components_deprecated}/shadows.html +0 -0
- /package/dist/{components → components_deprecated}/sidebar-menu.html +0 -0
- /package/dist/{components → components_deprecated}/simple-list.html +0 -0
- /package/dist/{components → components_deprecated}/slider.html +0 -0
- /package/dist/{components → components_deprecated}/spacing.html +0 -0
- /package/dist/{components → components_deprecated}/switch.html +0 -0
- /package/dist/{components → components_deprecated}/tables.html +0 -0
- /package/dist/{components → components_deprecated}/tabs.html +0 -0
- /package/dist/{components → components_deprecated}/tag-input.html +0 -0
- /package/dist/{components → components_deprecated}/tag-labels.html +0 -0
- /package/dist/{components → components_deprecated}/toggle.html +0 -0
- /package/dist/{components → components_deprecated}/tooltips.html +0 -0
- /package/dist/{components → components_deprecated}/vertical-tabs.html +0 -0
- /package/dist/{components → components_deprecated}/wizard.html +0 -0
- /package/examples/pages/{react → components}/Alerts.tsx +0 -0
- /package/examples/pages/{react → components}/Autocomplete.tsx +0 -0
- /package/examples/pages/{react → components}/Avatar.tsx +0 -0
- /package/examples/pages/{react → components}/Badges.tsx +0 -0
- /package/examples/pages/{react → components}/BigIconFont.tsx +0 -0
- /package/examples/pages/{react → components}/BoxedList.tsx +0 -0
- /package/examples/pages/{react → components}/ButtonGroups.tsx +0 -0
- /package/examples/pages/{react → components}/Buttons.tsx +0 -0
- /package/examples/pages/{react → components}/Carousel.tsx +0 -0
- /package/examples/pages/{react → components}/Checkboxs.tsx +0 -0
- /package/examples/pages/{react → components}/Container.tsx +0 -0
- /package/examples/pages/{react → components}/ContentDivider.tsx +0 -0
- /package/examples/pages/{react → components}/ContentList.tsx +0 -0
- /package/examples/pages/{react → components}/CreateButton.tsx +0 -0
- /package/examples/pages/{react → components}/DatePicker.tsx +0 -0
- /package/examples/pages/{react → components}/DragHandleDocs.tsx +0 -0
- /package/examples/pages/{react → components}/DropZone.tsx +0 -0
- /package/examples/pages/{react → components}/Dropdowns.tsx +0 -0
- /package/examples/pages/{react → components}/DurationInput.tsx +0 -0
- /package/examples/pages/{react → components}/EmptyStates.tsx +0 -0
- /package/examples/pages/{react → components}/GridItem.tsx +0 -0
- /package/examples/pages/{react → components}/GridList.tsx +0 -0
- /package/examples/pages/{react → components}/Heading.tsx +0 -0
- /package/examples/pages/{react → components}/IconButtons.tsx +0 -0
- /package/examples/pages/{react → components}/IconFont.tsx +0 -0
- /package/examples/pages/{react → components}/IconLabels.tsx +0 -0
- /package/examples/pages/{react → components}/IconPicker.tsx +0 -0
- /package/examples/pages/{react → components}/IllustrationButton.tsx +0 -0
- /package/examples/pages/{react → components}/Inputs.tsx +0 -0
- /package/examples/pages/{react → components}/Labels.tsx +0 -0
- /package/examples/pages/{react → components}/LeftNavigations.tsx +0 -0
- /package/examples/pages/{react → components}/ListItems.tsx +0 -0
- /package/examples/pages/{react → components}/Menu.tsx +0 -0
- /package/examples/pages/{react → components}/Modal.tsx +0 -0
- /package/examples/pages/{react → components}/MultiSelect.tsx +0 -0
- /package/examples/pages/{react → components}/NavButtons.tsx +0 -0
- /package/examples/pages/{react → components}/Panel.tsx +0 -0
- /package/examples/pages/{react → components}/Popover.tsx +0 -0
- /package/examples/pages/{react → components}/QuickNavigationBar.tsx +0 -0
- /package/examples/pages/{react → components}/RadioGroup.tsx +0 -0
- /package/examples/pages/{react → components}/ResizablePanels.tsx +0 -0
- /package/examples/pages/{react → components}/SelectGrid.tsx +0 -0
- /package/examples/pages/{react → components}/SelectWithTemplate.tsx +0 -0
- /package/examples/pages/{react → components}/Selects.tsx +0 -0
- /package/examples/pages/{react → components}/SimpleList.tsx +0 -0
- /package/examples/pages/{react → components}/SubNav.tsx +0 -0
- /package/examples/pages/{react → components}/Switch.tsx +0 -0
- /package/examples/pages/{react → components}/TableList.tsx +0 -0
- /package/examples/pages/{react → components}/Tabs.tsx +0 -0
- /package/examples/pages/{react → components}/TagInputDocs.tsx +0 -0
- /package/examples/pages/{react → components}/Tags.tsx +0 -0
- /package/examples/pages/{react → components}/Text.tsx +0 -0
- /package/examples/pages/{react → components}/TimePicker.tsx +0 -0
- /package/examples/pages/{react → components}/Toasts.tsx +0 -0
- /package/examples/pages/{react → components}/Togglebox.tsx +0 -0
- /package/examples/pages/{react → components}/Tooltips.tsx +0 -0
- /package/examples/pages/{react → components}/TreeMenu.tsx +0 -0
- /package/examples/pages/{react → components}/WithPaginationDocs.tsx +0 -0
- /package/examples/pages/{react → components}/WithSizeObserver.tsx +0 -0
- /package/examples/pages/{react → components}/tree-select/TreeSelect.tsx +0 -0
- /package/examples/pages/{react → components}/tree-select/example-1.tsx +0 -0
- /package/examples/pages/{react → components}/tree-select/example-2.tsx +0 -0
- /package/examples/pages/{components → components_deprecated}/alerts.html +0 -0
- /package/examples/pages/{components → components_deprecated}/badge.html +0 -0
- /package/examples/pages/{components → components_deprecated}/basic-grid.html +0 -0
- /package/examples/pages/{components → components_deprecated}/big-icons.html +0 -0
- /package/examples/pages/{components → components_deprecated}/buttons.html +0 -0
- /package/examples/pages/{components → components_deprecated}/carousel.html +0 -0
- /package/examples/pages/{components → components_deprecated}/checkbox.html +0 -0
- /package/examples/pages/{components → components_deprecated}/colors.html +0 -0
- /package/examples/pages/{components → components_deprecated}/dropdown.html +0 -0
- /package/examples/pages/{components → components_deprecated}/form-layout.html +0 -0
- /package/examples/pages/{components → components_deprecated}/icon-labels.html +0 -0
- /package/examples/pages/{components → components_deprecated}/icons.html +0 -0
- /package/examples/pages/{components → components_deprecated}/input.html +0 -0
- /package/examples/pages/{components → components_deprecated}/labels.html +0 -0
- /package/examples/pages/{components → components_deprecated}/layout-grid.html +0 -0
- /package/examples/pages/{components → components_deprecated}/left-nav.html +0 -0
- /package/examples/pages/{components → components_deprecated}/list-item.html +0 -0
- /package/examples/pages/{components → components_deprecated}/loader.html +0 -0
- /package/examples/pages/{components → components_deprecated}/modal-template.html +0 -0
- /package/examples/pages/{components → components_deprecated}/modals.html +0 -0
- /package/examples/pages/{components → components_deprecated}/other-elements.html +0 -0
- /package/examples/pages/{components → components_deprecated}/panel-info.html +0 -0
- /package/examples/pages/{components → components_deprecated}/radio.html +0 -0
- /package/examples/pages/{components → components_deprecated}/select.html +0 -0
- /package/examples/pages/{components → components_deprecated}/shadows.html +0 -0
- /package/examples/pages/{components → components_deprecated}/sidebar-menu.html +0 -0
- /package/examples/pages/{components → components_deprecated}/simple-list.html +0 -0
- /package/examples/pages/{components → components_deprecated}/slider.html +0 -0
- /package/examples/pages/{components → components_deprecated}/spacing.html +0 -0
- /package/examples/pages/{components → components_deprecated}/switch.html +0 -0
- /package/examples/pages/{components → components_deprecated}/tables.html +0 -0
- /package/examples/pages/{components → components_deprecated}/tabs.html +0 -0
- /package/examples/pages/{components → components_deprecated}/tag-input.html +0 -0
- /package/examples/pages/{components → components_deprecated}/tag-labels.html +0 -0
- /package/examples/pages/{components → components_deprecated}/toggle.html +0 -0
- /package/examples/pages/{components → components_deprecated}/tooltips.html +0 -0
- /package/examples/pages/{components → components_deprecated}/vertical-tabs.html +0 -0
- /package/examples/pages/{components → components_deprecated}/wizard.html +0 -0
@@ -1587,7 +1587,7 @@
|
|
1587
1587
|
</div>
|
1588
1588
|
<div class="boxed-list__item-content">
|
1589
1589
|
<div class="boxed-list__item-content-row boxed-list__item-content-row--fixed">
|
1590
|
-
<span class="sd-
|
1590
|
+
<span class="sd-text--bold sd-overflow-ellipsis">Max Mustermann</span>
|
1591
1591
|
<time class="sd-text__date-time sd-text__date-time--small ml-auto">25.09.2020</time>
|
1592
1592
|
</div>
|
1593
1593
|
<div class="boxed-list__item-content-row">
|
@@ -1629,7 +1629,7 @@
|
|
1629
1629
|
</div>
|
1630
1630
|
<div class="boxed-list__item-content">
|
1631
1631
|
<div class="boxed-list__item-content-row boxed-list__item-content-row--fixed">
|
1632
|
-
<span class="sd-
|
1632
|
+
<span class="sd-text--bold sd-overflow-ellipsis">Walter Sobchak</span>
|
1633
1633
|
<time class="sd-text__date-time sd-text__date-time--small ml-auto">25.09.2020</time>
|
1634
1634
|
</div>
|
1635
1635
|
<div class="boxed-list__item-content-row">
|
@@ -1643,7 +1643,7 @@
|
|
1643
1643
|
</div>
|
1644
1644
|
<div class="boxed-list__item-content">
|
1645
1645
|
<div class="boxed-list__item-content-row boxed-list__item-content-row--fixed">
|
1646
|
-
<span class="sd-
|
1646
|
+
<span class="sd-text--bold sd-overflow-ellipsis">Jeff Lebowski</span>
|
1647
1647
|
<time class="sd-text__date-time sd-text__date-time--small ml-auto">25.09.2020</time>
|
1648
1648
|
</div>
|
1649
1649
|
<div class="boxed-list__item-content-row">
|
@@ -1657,7 +1657,7 @@
|
|
1657
1657
|
</div>
|
1658
1658
|
<div class="boxed-list__item-content">
|
1659
1659
|
<div class="boxed-list__item-content-row boxed-list__item-content-row--fixed">
|
1660
|
-
<span class="sd-
|
1660
|
+
<span class="sd-text--bold sd-overflow-ellipsis">Bunny Lebowski</span>
|
1661
1661
|
<time class="sd-text__date-time sd-text__date-time--small ml-auto">25.09.2020</time>
|
1662
1662
|
</div>
|
1663
1663
|
<div class="boxed-list__item-content-row">
|
@@ -152,7 +152,7 @@
|
|
152
152
|
</div>
|
153
153
|
<div class="form__row">
|
154
154
|
<label class="form-label form-label--light">Name</label>
|
155
|
-
<p class="sd-
|
155
|
+
<p class="sd-text--bold">Event name</p>
|
156
156
|
</div>
|
157
157
|
<div class="form__row">
|
158
158
|
<label class="form-label form-label--light">Date</label>
|
@@ -176,7 +176,7 @@
|
|
176
176
|
</div>
|
177
177
|
<div class="form__row">
|
178
178
|
<label class="form-label form-label--light">Name</label>
|
179
|
-
<p class="sd-
|
179
|
+
<p class="sd-text--bold">Event name</p>
|
180
180
|
</div>
|
181
181
|
<div class="form__row">
|
182
182
|
<label class="form-label form-label--light">Date</label>
|
@@ -870,7 +870,7 @@
|
|
870
870
|
</div>
|
871
871
|
<div class="form__row">
|
872
872
|
<label class="form-label form-label--light">Name</label>
|
873
|
-
<p class="sd-
|
873
|
+
<p class="sd-text--bold">Duis dolore</p>
|
874
874
|
</div>
|
875
875
|
<div class="form__row">
|
876
876
|
<label class="form-label form-label--light">Description</label>
|
@@ -230,16 +230,16 @@
|
|
230
230
|
</div>
|
231
231
|
<div class="sd-flex-table__row">
|
232
232
|
<div class="sd-flex-table__cell sd-flex-grow">
|
233
|
-
<div class="sd-
|
233
|
+
<div class="sd-text--bold">
|
234
234
|
<strong>Nisi quis eiusmod nostrud pariatur amet.</strong>
|
235
235
|
</div>
|
236
236
|
<div>
|
237
|
-
<span class="sd-text__date-time sd-
|
238
|
-
<span class="sd-text__date-time sd-
|
239
|
-
<span class="sd-text__date-time sd-
|
237
|
+
<span class="sd-text__date-time sd-text--italic">Category:</span><span class="sd-text--normal">Culture</span>
|
238
|
+
<span class="sd-text__date-time sd-text--italic sd-margin-l--1">Authors:</span><span class="sd-text--normal">Donald Duck</span>
|
239
|
+
<span class="sd-text__date-time sd-text--italic sd-margin-l--1">Published:</span><time>1 week ago</time>
|
240
240
|
</div>
|
241
241
|
</div>
|
242
|
-
<div class="sd-flex-table__cell sd-
|
242
|
+
<div class="sd-flex-table__cell sd-text-align--center">
|
243
243
|
<a class="icn-btn" target="_blank" href="#">
|
244
244
|
<i class="icon-external"></i>
|
245
245
|
</a>
|
@@ -256,16 +256,16 @@
|
|
256
256
|
</div>
|
257
257
|
<div class="sd-flex-table__row">
|
258
258
|
<div class="sd-flex-table__cell sd-flex-grow">
|
259
|
-
<div class="sd-
|
259
|
+
<div class="sd-text--bold">
|
260
260
|
<strong>Mollit sit ut mollit dolor laborum nisi adipisicing minim.</strong>
|
261
261
|
</div>
|
262
262
|
<div>
|
263
|
-
<span class="sd-text__date-time sd-
|
264
|
-
<span class="sd-text__date-time sd-
|
265
|
-
<span class="sd-text__date-time sd-
|
263
|
+
<span class="sd-text__date-time sd-text--italic">Category:</span><span class="sd-text--normal">Sport, News</span>
|
264
|
+
<span class="sd-text__date-time sd-text--italic sd-margin-l--1">Authors:</span><span class="sd-text--normal">Jack Daniels, Mickey Mouse</span>
|
265
|
+
<span class="sd-text__date-time sd-text--italic sd-margin-l--1">Published:</span><time>1 week ago</time>
|
266
266
|
</div>
|
267
267
|
</div>
|
268
|
-
<div class="sd-flex-table__cell sd-
|
268
|
+
<div class="sd-flex-table__cell sd-text-align--center">
|
269
269
|
<a class="icn-btn" target="_blank" href="#">
|
270
270
|
<i class="icon-external"></i>
|
271
271
|
</a>
|
@@ -282,16 +282,16 @@
|
|
282
282
|
</div>
|
283
283
|
<div class="sd-flex-table__row">
|
284
284
|
<div class="sd-flex-table__cell sd-flex-grow">
|
285
|
-
<div class="sd-
|
285
|
+
<div class="sd-text--bold">
|
286
286
|
<strong>Enim enim cupidatat duis eu deserunt.</strong>
|
287
287
|
</div>
|
288
288
|
<div>
|
289
|
-
<span class="sd-text__date-time sd-
|
290
|
-
<span class="sd-text__date-time sd-
|
291
|
-
<span class="sd-text__date-time sd-
|
289
|
+
<span class="sd-text__date-time sd-text--italic">Category:</span><span class="sd-text--normal">News, Business</span>
|
290
|
+
<span class="sd-text__date-time sd-text--italic sd-margin-l--1">Authors:</span><span class="sd-text--normal">Donald Trump</span>
|
291
|
+
<span class="sd-text__date-time sd-text--italic sd-margin-l--1">Published:</span><time>1 week ago</time>
|
292
292
|
</div>
|
293
293
|
</div>
|
294
|
-
<div class="sd-flex-table__cell sd-
|
294
|
+
<div class="sd-flex-table__cell sd-text-align--center">
|
295
295
|
<a class="icn-btn" target="_blank" href="#">
|
296
296
|
<i class="icon-external"></i>
|
297
297
|
</a>
|
@@ -308,16 +308,16 @@
|
|
308
308
|
</div>
|
309
309
|
<div class="sd-flex-table__row">
|
310
310
|
<div class="sd-flex-table__cell sd-flex-grow">
|
311
|
-
<div class="sd-
|
311
|
+
<div class="sd-text--bold">
|
312
312
|
<strong>Sit qui aliqua dolore dolor aliqua ut officia incididunt reprehenderit ad laboris qui proident.</strong>
|
313
313
|
</div>
|
314
314
|
<div>
|
315
|
-
<span class="sd-text__date-time sd-
|
316
|
-
<span class="sd-text__date-time sd-
|
317
|
-
<span class="sd-text__date-time sd-
|
315
|
+
<span class="sd-text__date-time sd-text--italic">Category:</span><span class="sd-text--normal">News, Business</span>
|
316
|
+
<span class="sd-text__date-time sd-text--italic sd-margin-l--1">Authors:</span><span class="sd-text--normal">Donald Trump</span>
|
317
|
+
<span class="sd-text__date-time sd-text--italic sd-margin-l--1">Published:</span><time>1 week ago</time>
|
318
318
|
</div>
|
319
319
|
</div>
|
320
|
-
<div class="sd-flex-table__cell sd-
|
320
|
+
<div class="sd-flex-table__cell sd-text-align--center">
|
321
321
|
<a class="icn-btn" target="_blank" href="#">
|
322
322
|
<i class="icon-external"></i>
|
323
323
|
</a>
|
@@ -334,16 +334,16 @@
|
|
334
334
|
</div>
|
335
335
|
<div class="sd-flex-table__row">
|
336
336
|
<div class="sd-flex-table__cell sd-flex-grow">
|
337
|
-
<div class="sd-
|
337
|
+
<div class="sd-text--bold">
|
338
338
|
<strong>Elit eu laboris nulla laborum irure dolor ut.</strong>
|
339
339
|
</div>
|
340
340
|
<div>
|
341
|
-
<span class="sd-text__date-time sd-
|
342
|
-
<span class="sd-text__date-time sd-
|
343
|
-
<span class="sd-text__date-time sd-
|
341
|
+
<span class="sd-text__date-time sd-text--italic">Category:</span><span class="sd-text--normal">Sport, News</span>
|
342
|
+
<span class="sd-text__date-time sd-text--italic sd-margin-l--1">Authors:</span><span class="sd-text--normal">Jack Daniels, Mickey Mouse</span>
|
343
|
+
<span class="sd-text__date-time sd-text--italic sd-margin-l--1">Published:</span><time>1 week ago</time>
|
344
344
|
</div>
|
345
345
|
</div>
|
346
|
-
<div class="sd-flex-table__cell sd-
|
346
|
+
<div class="sd-flex-table__cell sd-text-align--center">
|
347
347
|
<a class="icn-btn" target="_blank" href="#">
|
348
348
|
<i class="icon-external"></i>
|
349
349
|
</a>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import * as Components from './components/Index';
|
3
|
-
import { Checkbox, RadioGroup, CheckboxButton, RadioButtonGroup, Button, Dropdown, Input, Label, Icon, IconButton, Badge, ThemeSelector, Container, IconLabel, Tooltip, Spinner, Divider, InputWrapper, InputNew, InputBase, Text, FormRowNew, ButtonGroup, Heading, SearchBar, Modal, BoxedList, BoxedListItem, TimePicker,
|
3
|
+
import { Checkbox, RadioGroup, CheckboxButton, RadioButtonGroup, Button, Dropdown, Input, Label, Icon, IconButton, Badge, ThemeSelector, Container, IconLabel, Tooltip, Spinner, Divider, InputWrapper, InputNew, InputBase, Text, FormRowNew, ButtonGroup, Heading, SearchBar, Modal, BoxedList, BoxedListItem, TimePicker, TreeSelect, DatePicker, ContentDivider, Select, Option, AvatarGroup, SvgIconIllustration, IllustrationButton } from '../../../../app-typescript/index';
|
4
4
|
import { IAvatarInGroup } from '../../../../app-typescript/components/avatar/avatar-group';
|
5
5
|
import { FormLabel } from '../../../../app-typescript/components/Form/FormLabel';
|
6
6
|
|
@@ -337,7 +337,7 @@ export class TestGround extends React.Component<IProps, IState> {
|
|
337
337
|
<Option>All events</Option>
|
338
338
|
</Select>
|
339
339
|
<ContentDivider type="solid" margin="medium" />
|
340
|
-
<Heading type='h3' className='mb-1 sd-text--
|
340
|
+
<Heading type='h3' className='mb-1 sd-text--bold'>Related Planning(s)</Heading>
|
341
341
|
<Text size='small' className='mb-1'>
|
342
342
|
<strong>You made changes to a planning item that is a part of a recurring event</strong>.
|
343
343
|
Apply the changes to all recurring planning items or just this one?
|
@@ -397,7 +397,7 @@ export class TestGround extends React.Component<IProps, IState> {
|
|
397
397
|
footerTemplate={modalSaveEventFooterThree}
|
398
398
|
onHide={() => {this.setState({modalSaveEvent3: false})}}
|
399
399
|
>
|
400
|
-
<Heading type='h3' className='mb-1 sd-text--
|
400
|
+
<Heading type='h3' className='mb-1 sd-text--bold'>Related Planning(s)</Heading>
|
401
401
|
<Text size='small' className='mb-1'>
|
402
402
|
<strong>You made changes to a planning item that is a part of a recurring event</strong>.
|
403
403
|
Apply the changes to all recurring planning items or just this one?
|
@@ -598,7 +598,7 @@
|
|
598
598
|
</button>
|
599
599
|
<span class="sd-photo-preview__label mlr-auto">DJI_0270.mp4</span>
|
600
600
|
<div>
|
601
|
-
<span class="sd-
|
601
|
+
<span class="sd-text--bold-s">Quality:</span>
|
602
602
|
<div class="dropdown dropdown--align-right" dropdown>
|
603
603
|
<button class="dropdown__toggle dark-ui" dropdown__toggle>
|
604
604
|
Same<span class="dropdown__caret dropdown__caret--white"></span>
|
@@ -3,9 +3,9 @@
|
|
3
3
|
<h1 class="docs-page__h1">Superdesk UI</h1>
|
4
4
|
<ul class="docs-page__header-nav">
|
5
5
|
<li class="docs-page__header-nav-item"><a class="docs-page__header-nav-link" href="#/">Home</a></li>
|
6
|
-
<li class="docs-page__header-nav-item"><a class="docs-page__header-nav-link" href="#/design">Design guidelines</a></li>
|
7
6
|
<li class="docs-page__header-nav-item"><a class="docs-page__header-nav-link" href="#/components">Components</a></li>
|
8
|
-
<li class="docs-page__header-nav-item"><a class="docs-page__header-nav-link" href="#/
|
7
|
+
<li class="docs-page__header-nav-item"><a class="docs-page__header-nav-link" href="#/design-patterns">Design Patterns</a></li>
|
8
|
+
<li class="docs-page__header-nav-item"><a class="docs-page__header-nav-link" href="#/design">Design guidelines</a></li>
|
9
9
|
<li class="docs-page__header-nav-item docs-page__header-nav-item--active"><a class="docs-page__header-nav-link" href="#/playgrounds">Playground</a></li>
|
10
10
|
</ul>
|
11
11
|
</header>
|
@@ -15,12 +15,10 @@
|
|
15
15
|
<img src="/illustration--playground.svg" alt="React">
|
16
16
|
</figure>
|
17
17
|
<h2 class="docs-page__hero-h2 docs-page__color--primary">UI Playgrounds</h2>
|
18
|
-
<p class="docs-page__hero-text">Examples
|
19
|
-
and full-page layouts.</p>
|
18
|
+
<p class="docs-page__hero-text">Examples, full-page layouts and design drafts.</p>
|
20
19
|
</div>
|
21
20
|
<section class="docs-page__container sd-margin-t--0">
|
22
21
|
<div class="flex-grid flex-grid--boxed flex-grid--wrap-items flex-grid--small-3">
|
23
|
-
|
24
22
|
<div class="sd-card flex-grid__item" ng-repeat="(group, content) in playgrounds">
|
25
23
|
<div class="sd-card__header sd-card__header--with-thumb sd-card__header--gradient-1">
|
26
24
|
<div class="sd-card__thumbnail sd-card__thumbnail--size-xxs">
|
@@ -36,7 +34,6 @@
|
|
36
34
|
</ul>
|
37
35
|
</div>
|
38
36
|
</div>
|
39
|
-
|
40
37
|
</div>
|
41
38
|
</section>
|
42
39
|
</main>
|
package/package.json
CHANGED
@@ -77,7 +77,7 @@ var IconPicker = /** @class */ (function (_super) {
|
|
77
77
|
return item ?
|
78
78
|
(React.createElement(React.Fragment, null,
|
79
79
|
React.createElement(Icon_1.Icon, { name: item.value }),
|
80
|
-
React.createElement("span", { className: "sd-
|
80
|
+
React.createElement("span", { className: "sd-text--normal sd-padding-t--1" }, item.label))) : null;
|
81
81
|
};
|
82
82
|
_this.state = { icons: [] };
|
83
83
|
return _this;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import * as React from "react";
|
2
2
|
import { IInputWrapper } from '../Form/InputWrapper';
|
3
|
+
import { DropResult } from "react-beautiful-dnd";
|
3
4
|
interface IState<T> {
|
4
5
|
value: Array<T>;
|
5
6
|
options: Array<ITreeNode<T>>;
|
@@ -25,7 +26,10 @@ interface IPropsBase<T> extends IInputWrapper {
|
|
25
26
|
singleLevelSearch?: boolean;
|
26
27
|
placeholder?: string;
|
27
28
|
searchPlaceholder?: string;
|
29
|
+
noResultsFoundMessage?: string;
|
30
|
+
dropdownInitiallyOpen?: boolean;
|
28
31
|
zIndex?: number;
|
32
|
+
sortable?: boolean;
|
29
33
|
'data-test-id'?: string;
|
30
34
|
getLabel(item: T): string;
|
31
35
|
getId(item: T): string;
|
@@ -83,6 +87,7 @@ export declare class TreeSelect<T> extends React.Component<IProps<T>, IState<T>>
|
|
83
87
|
private debounceFn;
|
84
88
|
private ICancelFn;
|
85
89
|
handleDebounce(): void;
|
90
|
+
onDragEnd(result: DropResult): void;
|
86
91
|
render(): JSX.Element;
|
87
92
|
}
|
88
93
|
export {};
|
@@ -14,6 +14,17 @@ var __extends = (this && this.__extends) || (function () {
|
|
14
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
15
15
|
};
|
16
16
|
})();
|
17
|
+
var __assign = (this && this.__assign) || function () {
|
18
|
+
__assign = Object.assign || function(t) {
|
19
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
20
|
+
s = arguments[i];
|
21
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
22
|
+
t[p] = s[p];
|
23
|
+
}
|
24
|
+
return t;
|
25
|
+
};
|
26
|
+
return __assign.apply(this, arguments);
|
27
|
+
};
|
17
28
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
18
29
|
if (k2 === undefined) k2 = k;
|
19
30
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
@@ -65,6 +76,13 @@ var TreeSelectPill_1 = require("./TreeSelectPill");
|
|
65
76
|
var TreeSelectItem_1 = require("./TreeSelectItem");
|
66
77
|
var KeyboardNavigation_1 = require("./KeyboardNavigation");
|
67
78
|
var WithPortal_1 = require("../WithPortal");
|
79
|
+
var react_beautiful_dnd_1 = require("react-beautiful-dnd");
|
80
|
+
var reorder = function (list, startIndex, endIndex) {
|
81
|
+
var result = Array.from(list);
|
82
|
+
var removed = result.splice(startIndex, 1)[0];
|
83
|
+
result.splice(endIndex, 0, removed);
|
84
|
+
return result;
|
85
|
+
};
|
68
86
|
var TreeSelect = /** @class */ (function (_super) {
|
69
87
|
__extends(TreeSelect, _super);
|
70
88
|
function TreeSelect(props) {
|
@@ -120,6 +138,9 @@ var TreeSelect = /** @class */ (function (_super) {
|
|
120
138
|
document.addEventListener("mousedown", _this.onMouseDown);
|
121
139
|
document.addEventListener("keydown", _this.onKeyDown);
|
122
140
|
document.addEventListener("keydown", _this.onPressEsc);
|
141
|
+
if (_this.props.dropdownInitiallyOpen) {
|
142
|
+
_this.setState({ openDropdown: true });
|
143
|
+
}
|
123
144
|
};
|
124
145
|
_this.debounceFn = (0, debounce_1.default)(_this.handleDebounce, 500);
|
125
146
|
_this.state = {
|
@@ -155,6 +176,7 @@ var TreeSelect = /** @class */ (function (_super) {
|
|
155
176
|
_this.openDropdownRef = React.createRef();
|
156
177
|
_this.treeSelectRef = React.createRef();
|
157
178
|
_this.popperInstance = null;
|
179
|
+
_this.onDragEnd = _this.onDragEnd.bind(_this);
|
158
180
|
return _this;
|
159
181
|
}
|
160
182
|
TreeSelect.prototype.componentWillUnmount = function () {
|
@@ -398,6 +420,7 @@ var TreeSelect = /** @class */ (function (_super) {
|
|
398
420
|
};
|
399
421
|
TreeSelect.prototype.filteredItem = function (arr) {
|
400
422
|
var _this = this;
|
423
|
+
var _a;
|
401
424
|
if (this.props.kind === 'synchronous') {
|
402
425
|
var filteredArr = arr.filter(function (item) {
|
403
426
|
if (_this.state.searchFieldValue) {
|
@@ -429,17 +452,22 @@ var TreeSelect = /** @class */ (function (_super) {
|
|
429
452
|
}
|
430
453
|
}
|
431
454
|
else if (this.props.kind === 'asynchronous') {
|
432
|
-
|
433
|
-
|
434
|
-
|
455
|
+
if (this.state.options.length > 0) {
|
456
|
+
return this.state.options.map(function (item, i) {
|
457
|
+
var selectedItem = _this.state.value.some(function (obj) {
|
458
|
+
return _this.props.getId(obj) === _this.props.getId(item.value);
|
459
|
+
});
|
460
|
+
return (React.createElement("li", { key: i, className: 'suggestion-item suggestion-item--multi-select', onClick: function (event) {
|
461
|
+
_this.handleValue(event, item);
|
462
|
+
} },
|
463
|
+
React.createElement("button", { className: "suggestion-item--btn", "data-test-id": "option" }, _this.props.optionTemplate
|
464
|
+
? _this.props.optionTemplate(item.value)
|
465
|
+
: (React.createElement("span", { className: selectedItem ? 'suggestion-item--selected' : undefined }, _this.props.getLabel(item.value))))));
|
435
466
|
});
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
? _this.props.optionTemplate(item.value)
|
441
|
-
: (React.createElement("span", { className: selectedItem ? 'suggestion-item--selected' : undefined }, _this.props.getLabel(item.value))))));
|
442
|
-
});
|
467
|
+
}
|
468
|
+
else {
|
469
|
+
return React.createElement("li", { className: "suggestion-item--nothing-found" }, (_a = this.props.noResultsFoundMessage) !== null && _a !== void 0 ? _a : 'Nothing found');
|
470
|
+
}
|
443
471
|
}
|
444
472
|
else {
|
445
473
|
return;
|
@@ -481,17 +509,26 @@ var TreeSelect = /** @class */ (function (_super) {
|
|
481
509
|
this.setState({ options: [] });
|
482
510
|
if (this.props.kind === 'asynchronous') {
|
483
511
|
if (this.state.searchFieldValue) {
|
484
|
-
this.setState({
|
485
|
-
loading: true,
|
486
|
-
});
|
487
512
|
this.ICancelFn = this.props.searchOptions(this.state.searchFieldValue, function (items) {
|
488
513
|
var _a;
|
489
514
|
_this.setState({ options: items, loading: false });
|
490
515
|
(_a = _this.popperInstance) === null || _a === void 0 ? void 0 : _a.update();
|
491
516
|
});
|
492
517
|
}
|
518
|
+
else {
|
519
|
+
this.setState({ options: this.state.firstBranchOptions, loading: false });
|
520
|
+
}
|
493
521
|
}
|
494
522
|
};
|
523
|
+
TreeSelect.prototype.onDragEnd = function (result) {
|
524
|
+
if (!result.destination) {
|
525
|
+
return;
|
526
|
+
}
|
527
|
+
var value = reorder(this.state.value, result.source.index, result.destination.index);
|
528
|
+
this.setState({
|
529
|
+
value: value,
|
530
|
+
});
|
531
|
+
};
|
495
532
|
TreeSelect.prototype.render = function () {
|
496
533
|
var _this = this;
|
497
534
|
var _a, _b;
|
@@ -506,6 +543,27 @@ var TreeSelect = /** @class */ (function (_super) {
|
|
506
543
|
getBorderColor: this.props.getBorderColor,
|
507
544
|
}, items: this.state.value, valueTemplate: this.props.valueTemplate, getLabel: this.props.getLabel }));
|
508
545
|
}
|
546
|
+
var ListWrapper = this.props.sortable
|
547
|
+
? function (_a) {
|
548
|
+
var children = _a.children;
|
549
|
+
return (React.createElement(react_beautiful_dnd_1.DragDropContext, { onDragEnd: _this.onDragEnd },
|
550
|
+
React.createElement(react_beautiful_dnd_1.Droppable, { droppableId: "droppable", direction: "horizontal" }, function (provided, _snapshot) { return (React.createElement("ul", __assign({ className: "tags-input__tag-list", ref: provided.innerRef }, provided.droppableProps),
|
551
|
+
children,
|
552
|
+
provided.placeholder)); })));
|
553
|
+
}
|
554
|
+
: function (_a) {
|
555
|
+
var children = _a.children;
|
556
|
+
return React.createElement("ul", { className: "tags-input__tag-list" }, children);
|
557
|
+
};
|
558
|
+
var ItemWrapper = this.props.sortable
|
559
|
+
? function (_a) {
|
560
|
+
var children = _a.children, itemId = _a.itemId, i = _a.i;
|
561
|
+
return (React.createElement(react_beautiful_dnd_1.Draggable, { draggableId: itemId, index: i }, function (provided2) { return (React.createElement("div", __assign({ ref: provided2.innerRef }, provided2.draggableProps, provided2.dragHandleProps), children)); }));
|
562
|
+
}
|
563
|
+
: function (_a) {
|
564
|
+
var children = _a.children;
|
565
|
+
return React.createElement(React.Fragment, null, children);
|
566
|
+
};
|
509
567
|
return (React.createElement(Form_1.InputWrapper, { label: this.props.label, error: this.props.error, invalid: this.props.error != null, required: this.props.required, disabled: this.props.disabled, info: this.props.info, inlineLabel: this.props.inlineLabel, labelHidden: this.props.labelHidden, htmlId: this.htmlId, tabindex: this.props.tabindex, fullWidth: (_a = this.props.inputWidth === '100%') !== null && _a !== void 0 ? _a : false, "data-test-id": this.props['data-test-id'] },
|
510
568
|
React.createElement("div", { className: "\n tags-input sd-input__input\n tags-input--".concat(this.props.allowMultiple ? 'multi-select' : 'single-select'), ref: this.treeSelectRef, "data-test-id": this.props.allowMultiple ? undefined : 'open-popover' }, this.props.allowMultiple
|
511
569
|
? React.createElement("div", { className: "tags-input__tags" },
|
@@ -520,12 +578,13 @@ var TreeSelect = /** @class */ (function (_super) {
|
|
520
578
|
}
|
521
579
|
}, "data-test-id": "open-popover" },
|
522
580
|
React.createElement("i", { className: "icon-plus-large" })),
|
523
|
-
React.createElement(
|
581
|
+
React.createElement(ListWrapper, null, this.state.value.map(function (item, i) {
|
524
582
|
var Wrapper = function (_a) {
|
525
583
|
var backgroundColor = _a.backgroundColor, children = _a.children;
|
526
|
-
return (React.createElement(TreeSelectPill_1.TreeSelectPill, { item: item, readOnly: _this.props.readOnly, disabled: _this.props.disabled, valueTemplate: _this.props.valueTemplate, backgroundColor: backgroundColor, onRemove: function () { return _this.removeClick(i); }, getBackgroundColor: _this.props.getBackgroundColor }, children));
|
584
|
+
return (React.createElement(TreeSelectPill_1.TreeSelectPill, { item: item, readOnly: _this.props.readOnly, disabled: _this.props.disabled, valueTemplate: _this.props.valueTemplate, backgroundColor: backgroundColor, onRemove: function () { return _this.removeClick(i); }, getBackgroundColor: _this.props.getBackgroundColor, draggable: _this.props.sortable }, children));
|
527
585
|
};
|
528
|
-
|
586
|
+
var itemId = _this.props.getId(item);
|
587
|
+
return (React.createElement(ItemWrapper, { itemId: itemId, key: itemId, i: i }, _this.props.valueTemplate
|
529
588
|
? _this.props.valueTemplate(item, Wrapper)
|
530
589
|
: (React.createElement(Wrapper, null,
|
531
590
|
React.createElement("span", null, _this.props.getLabel(item))))));
|
@@ -588,7 +647,11 @@ var TreeSelect = /** @class */ (function (_super) {
|
|
588
647
|
if (_this.ICancelFn) {
|
589
648
|
_this.ICancelFn();
|
590
649
|
}
|
591
|
-
_this.setState({
|
650
|
+
_this.setState({
|
651
|
+
searchFieldValue: event.target.value,
|
652
|
+
options: [],
|
653
|
+
loading: true,
|
654
|
+
});
|
592
655
|
(_b = _this.popperInstance) === null || _b === void 0 ? void 0 : _b.update();
|
593
656
|
_this.debounceFn();
|
594
657
|
}
|
@@ -7,6 +7,7 @@ interface IProps<T> {
|
|
7
7
|
onRemove(): void;
|
8
8
|
valueTemplate?(item: T, Wrapper: React.ElementType): React.ComponentType<T> | JSX.Element;
|
9
9
|
getBackgroundColor?(item: T): string;
|
10
|
+
draggable?: boolean;
|
10
11
|
}
|
11
12
|
export declare class TreeSelectPill<T> extends React.Component<IProps<T>> {
|
12
13
|
render(): JSX.Element;
|
@@ -37,9 +37,14 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
37
37
|
__setModuleDefault(result, mod);
|
38
38
|
return result;
|
39
39
|
};
|
40
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
41
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
42
|
+
};
|
40
43
|
Object.defineProperty(exports, "__esModule", { value: true });
|
41
44
|
exports.TreeSelectPill = void 0;
|
45
|
+
var classnames_1 = __importDefault(require("classnames"));
|
42
46
|
var React = __importStar(require("react"));
|
47
|
+
var DragHandle_1 = require("../DragHandle");
|
43
48
|
var Icon_1 = require("../Icon");
|
44
49
|
var Label_1 = require("../Label");
|
45
50
|
var TreeSelectPill = /** @class */ (function (_super) {
|
@@ -49,12 +54,15 @@ var TreeSelectPill = /** @class */ (function (_super) {
|
|
49
54
|
}
|
50
55
|
TreeSelectPill.prototype.render = function () {
|
51
56
|
var _this = this;
|
52
|
-
|
53
|
-
|
54
|
-
|
57
|
+
var classes = (0, classnames_1.default)('tags-input__tag-item tags-input__tag-item--multi-select', {
|
58
|
+
'tags-input__tag-item--readonly': this.props.readOnly,
|
59
|
+
'tags-input__tag-item--draggable': this.props.draggable,
|
60
|
+
});
|
61
|
+
return (React.createElement("li", { className: classes, style: this.props.valueTemplate
|
55
62
|
? { backgroundColor: this.props.backgroundColor }
|
56
63
|
: this.props.getBackgroundColor
|
57
64
|
&& { backgroundColor: this.props.getBackgroundColor(this.props.item) }, "data-test-id": "item" },
|
65
|
+
this.props.draggable && (React.createElement(DragHandle_1.DragHandle, { blank: true, dotsInRow: '3', dotRows: '4' })),
|
58
66
|
React.createElement("span", { className: "tags-input__helper-box", style: {
|
59
67
|
color: this.props.backgroundColor
|
60
68
|
? (0, Label_1.getTextColor)(this.props.backgroundColor)
|
@@ -63,7 +71,8 @@ var TreeSelectPill = /** @class */ (function (_super) {
|
|
63
71
|
} },
|
64
72
|
this.props.children,
|
65
73
|
!this.props.readOnly
|
66
|
-
&& React.createElement("
|
74
|
+
&& React.createElement("button", { className: "tags-input__remove-button", "data-test-id": "remove", onClick: function () { return (!_this.props.readOnly && !_this.props.disabled)
|
75
|
+
&& _this.props.onRemove(); } },
|
67
76
|
React.createElement(Icon_1.Icon, { name: "close-small" })))));
|
68
77
|
};
|
69
78
|
return TreeSelectPill;
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|