@fibery/ui-kit 5.0.0 → 7.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/CHANGELOG.md +33 -0
- package/package.json +26 -17
- package/scripts/generate-icons.ts +210 -0
- package/src/antd/input-number.tsx +1 -1
- package/src/badge.tsx +6 -1
- package/src/design-system/colors.ts +6 -0
- package/src/icons/ast/abort.ts +27 -2
- package/src/icons/ast/access-template.ts +29 -2
- package/src/icons/ast/activity-filled.ts +27 -2
- package/src/icons/ast/activity-log.ts +29 -2
- package/src/icons/ast/activity.ts +29 -2
- package/src/icons/ast/add-after.ts +37 -2
- package/src/icons/ast/add-before.ts +37 -2
- package/src/icons/ast/add-compact.ts +27 -2
- package/src/icons/ast/add.ts +27 -2
- package/src/icons/ast/ai-assistant-filled.ts +29 -2
- package/src/icons/ast/ai-assistant.ts +29 -2
- package/src/icons/ast/ai-fibery-build.ts +28 -2
- package/src/icons/ast/alert-triangle.ts +29 -2
- package/src/icons/ast/app.ts +27 -2
- package/src/icons/ast/appearance-auto.ts +27 -2
- package/src/icons/ast/appearance-dark.ts +29 -2
- package/src/icons/ast/appearance-light.ts +29 -2
- package/src/icons/ast/architect.ts +29 -2
- package/src/icons/ast/arrow-back.ts +27 -2
- package/src/icons/ast/arrow-bar-down.ts +27 -2
- package/src/icons/ast/arrow-bar-left.ts +27 -2
- package/src/icons/ast/arrow-bar-right.ts +27 -2
- package/src/icons/ast/arrow-bar-up.ts +27 -2
- package/src/icons/ast/arrow-collapse-vertical.ts +29 -2
- package/src/icons/ast/arrow-collapse.ts +29 -2
- package/src/icons/ast/arrow-down.ts +29 -2
- package/src/icons/ast/arrow-forward.ts +27 -2
- package/src/icons/ast/arrow-left.ts +29 -2
- package/src/icons/ast/arrow-right.ts +29 -2
- package/src/icons/ast/arrow-send.ts +27 -2
- package/src/icons/ast/arrow-up-circle.ts +35 -2
- package/src/icons/ast/arrow-up.ts +29 -2
- package/src/icons/ast/arrows-right-left.ts +29 -2
- package/src/icons/ast/ask-for-input.ts +35 -2
- package/src/icons/ast/asterisk.ts +31 -2
- package/src/icons/ast/atom.ts +39 -2
- package/src/icons/ast/avatar.ts +45 -2
- package/src/icons/ast/backlog.ts +29 -2
- package/src/icons/ast/bell-circle.ts +37 -2
- package/src/icons/ast/bell-off.ts +37 -2
- package/src/icons/ast/bell-ringing.ts +37 -2
- package/src/icons/ast/bell-x.ts +37 -2
- package/src/icons/ast/bring-forward.ts +27 -2
- package/src/icons/ast/bring-to-front.ts +29 -2
- package/src/icons/ast/cards.ts +29 -2
- package/src/icons/ast/chat-bubble.ts +37 -2
- package/src/icons/ast/chat-float.ts +37 -2
- package/src/icons/ast/chat-sidebar.ts +37 -2
- package/src/icons/ast/checked.ts +27 -2
- package/src/icons/ast/circle-check-filled.ts +29 -2
- package/src/icons/ast/circle-check.ts +39 -2
- package/src/icons/ast/circle-cross-filled.ts +29 -2
- package/src/icons/ast/circle-cross.ts +30 -2
- package/src/icons/ast/circle-info-filled.ts +29 -2
- package/src/icons/ast/circle-info.ts +35 -2
- package/src/icons/ast/circle-pause.ts +30 -2
- package/src/icons/ast/circle-play.ts +30 -2
- package/src/icons/ast/clear-input-filled.ts +29 -2
- package/src/icons/ast/clear.ts +37 -2
- package/src/icons/ast/clock-alarm.ts +37 -2
- package/src/icons/ast/clock-forward.ts +29 -2
- package/src/icons/ast/clock.ts +37 -2
- package/src/icons/ast/close.ts +27 -2
- package/src/icons/ast/collapse-all-horizontal.ts +31 -2
- package/src/icons/ast/collapse-all.ts +31 -2
- package/src/icons/ast/color-coding.ts +29 -2
- package/src/icons/ast/columns-2.ts +29 -2
- package/src/icons/ast/columns-4.ts +29 -2
- package/src/icons/ast/columns.ts +29 -2
- package/src/icons/ast/comment-bubble.ts +29 -2
- package/src/icons/ast/comments.ts +37 -2
- package/src/icons/ast/copy.ts +37 -2
- package/src/icons/ast/credits-filled.ts +30 -2
- package/src/icons/ast/crosshair.ts +29 -2
- package/src/icons/ast/database-add.ts +29 -2
- package/src/icons/ast/database-outline.ts +31 -2
- package/src/icons/ast/database.ts +29 -2
- package/src/icons/ast/date-range.ts +37 -2
- package/src/icons/ast/delete.ts +37 -2
- package/src/icons/ast/drag-block-handle.ts +29 -2
- package/src/icons/ast/drag-handle.ts +27 -2
- package/src/icons/ast/duplicate.ts +45 -2
- package/src/icons/ast/dynamic-filter-value.ts +29 -2
- package/src/icons/ast/email.ts +29 -2
- package/src/icons/ast/emoji-delete.ts +47 -2
- package/src/icons/ast/entity-create-filled.ts +35 -2
- package/src/icons/ast/entity-create.ts +29 -2
- package/src/icons/ast/entity-merge.ts +33 -2
- package/src/icons/ast/equation.ts +35 -2
- package/src/icons/ast/expand-all-horizontal.ts +31 -2
- package/src/icons/ast/expand-all.ts +29 -2
- package/src/icons/ast/export.ts +35 -2
- package/src/icons/ast/eye-off.ts +27 -2
- package/src/icons/ast/eye.ts +29 -2
- package/src/icons/ast/favorites-filled.ts +29 -2
- package/src/icons/ast/favorites-off.ts +37 -2
- package/src/icons/ast/favorites.ts +29 -2
- package/src/icons/ast/fibery-mono.ts +27 -2
- package/src/icons/ast/field-units-large.ts +29 -2
- package/src/icons/ast/fields.ts +39 -2
- package/src/icons/ast/file-archive.ts +27 -2
- package/src/icons/ast/file-counter.ts +27 -2
- package/src/icons/ast/file-document.ts +27 -2
- package/src/icons/ast/file-download.ts +39 -2
- package/src/icons/ast/file-image.ts +27 -2
- package/src/icons/ast/file-multiple.ts +27 -2
- package/src/icons/ast/file-other.ts +27 -2
- package/src/icons/ast/file-presentation.ts +27 -2
- package/src/icons/ast/file-table.ts +27 -2
- package/src/icons/ast/file-upload.ts +37 -2
- package/src/icons/ast/file-video.ts +27 -2
- package/src/icons/ast/files.ts +27 -2
- package/src/icons/ast/filter.ts +29 -2
- package/src/icons/ast/fit-to-screen.ts +27 -2
- package/src/icons/ast/focus-mode-off.ts +27 -2
- package/src/icons/ast/focus-mode.ts +27 -2
- package/src/icons/ast/folder-favorite.ts +27 -2
- package/src/icons/ast/folder-smart.ts +37 -2
- package/src/icons/ast/folder.ts +29 -2
- package/src/icons/ast/form-with-cover.ts +88 -2
- package/src/icons/ast/form-without-cover.ts +75 -2
- package/src/icons/ast/fullscreen-mode-off.ts +29 -2
- package/src/icons/ast/fullscreen-mode-on.ts +29 -2
- package/src/icons/ast/gift.ts +29 -2
- package/src/icons/ast/globe-simple.ts +29 -2
- package/src/icons/ast/globe-unpublish.ts +27 -2
- package/src/icons/ast/go-to.ts +29 -2
- package/src/icons/ast/graduation-cap-filled.ts +37 -2
- package/src/icons/ast/group-add.ts +39 -2
- package/src/icons/ast/headphones-ai.ts +37 -2
- package/src/icons/ast/headphones.ts +29 -2
- package/src/icons/ast/highlights.ts +29 -2
- package/src/icons/ast/hint.ts +37 -2
- package/src/icons/ast/home-filled.ts +29 -2
- package/src/icons/ast/home.ts +35 -2
- package/src/icons/ast/image-error.ts +39 -2
- package/src/icons/ast/import-filled.ts +37 -2
- package/src/icons/ast/import.ts +35 -2
- package/src/icons/ast/index.tsx +1 -1
- package/src/icons/ast/integration-add.ts +29 -2
- package/src/icons/ast/integration-discourse.ts +76 -2
- package/src/icons/ast/integration-fibery.ts +802 -2
- package/src/icons/ast/integration-figma.ts +67 -2
- package/src/icons/ast/integration-github.ts +29 -2
- package/src/icons/ast/integration-gitlab.ts +27 -2
- package/src/icons/ast/integration-google-drive.ts +76 -2
- package/src/icons/ast/integration-google-map.ts +67 -2
- package/src/icons/ast/integration-intercom.ts +31 -2
- package/src/icons/ast/integration-jira.ts +29 -2
- package/src/icons/ast/integration-loom.ts +31 -2
- package/src/icons/ast/integration-miro.ts +42 -2
- package/src/icons/ast/integration-mixpanel.ts +31 -2
- package/src/icons/ast/integration-slack.ts +56 -2
- package/src/icons/ast/integration-suggest.ts +29 -2
- package/src/icons/ast/integration-twitter.ts +44 -2
- package/src/icons/ast/integration-unsplash.ts +27 -2
- package/src/icons/ast/integration-youtube.ts +40 -2
- package/src/icons/ast/integration-zendesk.ts +33 -2
- package/src/icons/ast/integration.ts +37 -2
- package/src/icons/ast/integrations-filled.ts +37 -2
- package/src/icons/ast/items-timeline.ts +29 -2
- package/src/icons/ast/items.ts +29 -2
- package/src/icons/ast/key.ts +29 -2
- package/src/icons/ast/keyboard-hide-down.ts +37 -2
- package/src/icons/ast/lab.ts +37 -2
- package/src/icons/ast/layout-double.ts +29 -2
- package/src/icons/ast/layout-multiple.ts +27 -2
- package/src/icons/ast/layout-single.ts +29 -2
- package/src/icons/ast/levels.ts +29 -2
- package/src/icons/ast/limits.ts +30 -2
- package/src/icons/ast/line-divider.ts +29 -2
- package/src/icons/ast/line-jump.ts +35 -2
- package/src/icons/ast/link.ts +43 -2
- package/src/icons/ast/location-edit.ts +37 -2
- package/src/icons/ast/lock-filled.ts +29 -2
- package/src/icons/ast/lock.ts +33 -2
- package/src/icons/ast/logout.ts +35 -2
- package/src/icons/ast/loupe-zoom-in.ts +29 -2
- package/src/icons/ast/loupe-zoom-out.ts +37 -2
- package/src/icons/ast/map-mode.ts +29 -2
- package/src/icons/ast/markdown.ts +30 -2
- package/src/icons/ast/menu-collapser.ts +27 -2
- package/src/icons/ast/mermaid.ts +29 -2
- package/src/icons/ast/message-plus.ts +35 -2
- package/src/icons/ast/milestones.ts +29 -2
- package/src/icons/ast/minus.ts +29 -2
- package/src/icons/ast/mirror-off.ts +39 -2
- package/src/icons/ast/mirror-on.ts +29 -2
- package/src/icons/ast/monitor.ts +29 -2
- package/src/icons/ast/more-compact.ts +27 -2
- package/src/icons/ast/more.ts +27 -2
- package/src/icons/ast/move-down.ts +29 -2
- package/src/icons/ast/move-left.ts +29 -2
- package/src/icons/ast/move-right.ts +29 -2
- package/src/icons/ast/move-up.ts +29 -2
- package/src/icons/ast/no-border.ts +27 -2
- package/src/icons/ast/no-fill.ts +39 -2
- package/src/icons/ast/obj-child.ts +27 -2
- package/src/icons/ast/obj-m2m.ts +27 -2
- package/src/icons/ast/obj-o2o.ts +27 -2
- package/src/icons/ast/obj-parent.ts +27 -2
- package/src/icons/ast/obj-self.ts +27 -2
- package/src/icons/ast/on-schedule.ts +27 -2
- package/src/icons/ast/open-in-panel.ts +35 -2
- package/src/icons/ast/open-link.ts +35 -2
- package/src/icons/ast/page-regular-mode.ts +35 -2
- package/src/icons/ast/page-wide-mode.ts +35 -2
- package/src/icons/ast/panel-add.ts +29 -2
- package/src/icons/ast/pencil.ts +29 -2
- package/src/icons/ast/people-all.ts +29 -2
- package/src/icons/ast/people-check.ts +29 -2
- package/src/icons/ast/people-edit.ts +27 -2
- package/src/icons/ast/people-group-remove.ts +39 -2
- package/src/icons/ast/people-group.ts +29 -2
- package/src/icons/ast/people-invite.ts +37 -2
- package/src/icons/ast/people-remove.ts +37 -2
- package/src/icons/ast/people-role.ts +29 -2
- package/src/icons/ast/people-x.ts +39 -2
- package/src/icons/ast/people.ts +37 -2
- package/src/icons/ast/photo.ts +27 -2
- package/src/icons/ast/pin-filled.ts +33 -2
- package/src/icons/ast/pin.ts +29 -2
- package/src/icons/ast/plus.ts +29 -2
- package/src/icons/ast/preferences.ts +55 -2
- package/src/icons/ast/present-play.ts +39 -2
- package/src/icons/ast/present-stop.ts +27 -2
- package/src/icons/ast/print.ts +27 -2
- package/src/icons/ast/private-items.ts +33 -2
- package/src/icons/ast/propagate.ts +29 -2
- package/src/icons/ast/question.ts +29 -2
- package/src/icons/ast/reactions-add.ts +43 -2
- package/src/icons/ast/read-only.ts +29 -2
- package/src/icons/ast/redo.ts +27 -2
- package/src/icons/ast/references.ts +29 -2
- package/src/icons/ast/refresh.ts +27 -2
- package/src/icons/ast/remove.ts +27 -2
- package/src/icons/ast/reset-password.ts +37 -2
- package/src/icons/ast/richeditor-block-callout.ts +29 -2
- package/src/icons/ast/richeditor-block-code.ts +43 -2
- package/src/icons/ast/richeditor-block-embed.ts +29 -2
- package/src/icons/ast/richeditor-block-entity.ts +27 -2
- package/src/icons/ast/richeditor-block-file.ts +38 -2
- package/src/icons/ast/richeditor-block-h1.ts +29 -2
- package/src/icons/ast/richeditor-block-h2.ts +29 -2
- package/src/icons/ast/richeditor-block-h3.ts +29 -2
- package/src/icons/ast/richeditor-block-h4.ts +37 -2
- package/src/icons/ast/richeditor-block-mention.ts +27 -2
- package/src/icons/ast/richeditor-block-paragraph.ts +34 -2
- package/src/icons/ast/richeditor-block-quote.ts +34 -2
- package/src/icons/ast/richeditor-checklist-create.ts +44 -2
- package/src/icons/ast/richeditor-image-align-center.ts +37 -2
- package/src/icons/ast/richeditor-image-align-left.ts +37 -2
- package/src/icons/ast/richeditor-image-align-right.ts +37 -2
- package/src/icons/ast/richeditor-image.ts +29 -2
- package/src/icons/ast/richeditor-linkedhighlight-create.ts +34 -2
- package/src/icons/ast/richeditor-list-bullet.ts +29 -2
- package/src/icons/ast/richeditor-list-indent.ts +27 -2
- package/src/icons/ast/richeditor-list-ordered.ts +29 -2
- package/src/icons/ast/richeditor-list-unindent.ts +27 -2
- package/src/icons/ast/richeditor-mark-code.ts +27 -2
- package/src/icons/ast/richeditor-mark-em.ts +27 -2
- package/src/icons/ast/richeditor-mark-highlight.ts +27 -2
- package/src/icons/ast/richeditor-mark-strike.ts +27 -2
- package/src/icons/ast/richeditor-mark-strong.ts +27 -2
- package/src/icons/ast/richeditor-mark-text-background-color.ts +34 -2
- package/src/icons/ast/richeditor-mark-underline.ts +27 -2
- package/src/icons/ast/richeditor-table-create.ts +27 -2
- package/src/icons/ast/richeditor-video-upload.ts +36 -2
- package/src/icons/ast/rows.ts +29 -2
- package/src/icons/ast/rule.ts +29 -2
- package/src/icons/ast/search-add.ts +29 -2
- package/src/icons/ast/search-filled.ts +27 -2
- package/src/icons/ast/search-remove.ts +29 -2
- package/src/icons/ast/search.ts +29 -2
- package/src/icons/ast/self-reference-off.ts +27 -2
- package/src/icons/ast/self-reference-on.ts +27 -2
- package/src/icons/ast/send-backward.ts +27 -2
- package/src/icons/ast/send-to-back.ts +29 -2
- package/src/icons/ast/settings-filled.ts +29 -2
- package/src/icons/ast/settings.ts +29 -2
- package/src/icons/ast/share.ts +35 -2
- package/src/icons/ast/shield-keyhole.ts +39 -2
- package/src/icons/ast/show-author.ts +47 -2
- package/src/icons/ast/simple-compass.ts +28 -2
- package/src/icons/ast/slide-menu-filled.ts +29 -2
- package/src/icons/ast/slide-menu.ts +37 -2
- package/src/icons/ast/sort.ts +29 -2
- package/src/icons/ast/space-add.ts +47 -2
- package/src/icons/ast/space-app.ts +29 -2
- package/src/icons/ast/space-generate.ts +29 -2
- package/src/icons/ast/space-move.ts +29 -2
- package/src/icons/ast/space-scratch.ts +29 -2
- package/src/icons/ast/space-template.ts +29 -2
- package/src/icons/ast/spinner.ts +42 -2
- package/src/icons/ast/switch-to-text.ts +37 -2
- package/src/icons/ast/switch-to-widget.ts +35 -2
- package/src/icons/ast/table-layout.ts +31 -2
- package/src/icons/ast/templates-filled.ts +29 -2
- package/src/icons/ast/templates.ts +39 -2
- package/src/icons/ast/terminal.ts +37 -2
- package/src/icons/ast/text-no-wrap.ts +27 -2
- package/src/icons/ast/text-tool-align-bottom.ts +29 -2
- package/src/icons/ast/text-tool-align-middle.ts +29 -2
- package/src/icons/ast/text-tool-align-top.ts +29 -2
- package/src/icons/ast/text-wrap.ts +29 -2
- package/src/icons/ast/toc.ts +27 -2
- package/src/icons/ast/type-button.ts +29 -2
- package/src/icons/ast/type-checkbox.ts +44 -2
- package/src/icons/ast/type-date.ts +30 -2
- package/src/icons/ast/type-email.ts +27 -2
- package/src/icons/ast/type-emoji.ts +45 -2
- package/src/icons/ast/type-formula.ts +27 -2
- package/src/icons/ast/type-location.ts +29 -2
- package/src/icons/ast/type-lookup.ts +44 -2
- package/src/icons/ast/type-money.ts +27 -2
- package/src/icons/ast/type-multi-select.ts +27 -2
- package/src/icons/ast/type-number.ts +29 -2
- package/src/icons/ast/type-percent.ts +27 -2
- package/src/icons/ast/type-phone.ts +27 -2
- package/src/icons/ast/type-relation.ts +44 -2
- package/src/icons/ast/type-rich-text.ts +34 -2
- package/src/icons/ast/type-single-select.ts +27 -2
- package/src/icons/ast/type-text.ts +27 -2
- package/src/icons/ast/undo.ts +27 -2
- package/src/icons/ast/units-avatar.ts +33 -2
- package/src/icons/ast/units-collection.ts +33 -2
- package/src/icons/ast/units-counter.ts +33 -2
- package/src/icons/ast/units-date.ts +33 -2
- package/src/icons/ast/units-field-icon-button.ts +33 -2
- package/src/icons/ast/units-field.ts +31 -2
- package/src/icons/ast/units-input.ts +33 -2
- package/src/icons/ast/units-normal.ts +29 -2
- package/src/icons/ast/units-progress-bar.ts +33 -2
- package/src/icons/ast/units-rich-text.ts +31 -2
- package/src/icons/ast/units-snippet.ts +33 -2
- package/src/icons/ast/unlink.ts +43 -2
- package/src/icons/ast/unlock-filled.ts +33 -2
- package/src/icons/ast/unlock.ts +33 -2
- package/src/icons/ast/usb-flash-drive.ts +37 -2
- package/src/icons/ast/value-clear.ts +35 -2
- package/src/icons/ast/value-edit.ts +31 -2
- package/src/icons/ast/view-ai.ts +31 -2
- package/src/icons/ast/view-app.ts +27 -2
- package/src/icons/ast/view-board.ts +34 -2
- package/src/icons/ast/view-calendar.ts +34 -2
- package/src/icons/ast/view-canvas.ts +34 -2
- package/src/icons/ast/view-chart.ts +34 -2
- package/src/icons/ast/view-dashboard.ts +27 -2
- package/src/icons/ast/view-details.ts +34 -2
- package/src/icons/ast/view-document.ts +34 -2
- package/src/icons/ast/view-embed.ts +27 -2
- package/src/icons/ast/view-feed.ts +27 -2
- package/src/icons/ast/view-form.ts +27 -2
- package/src/icons/ast/view-gallery.ts +27 -2
- package/src/icons/ast/view-gantt.ts +27 -2
- package/src/icons/ast/view-list.ts +34 -2
- package/src/icons/ast/view-map.ts +29 -2
- package/src/icons/ast/view-page.ts +29 -2
- package/src/icons/ast/view-table.ts +34 -2
- package/src/icons/ast/view-timeline.ts +34 -2
- package/src/icons/ast/views.ts +27 -2
- package/src/icons/ast/warning-triangle-filled.ts +29 -2
- package/src/icons/ast/warning-triangle.ts +27 -2
- package/src/icons/ast/warning.ts +27 -2
- package/src/icons/ast/webhooks.ts +44 -2
- package/src/icons/ast/workflow.ts +27 -2
- package/src/icons/icons-integrity.test.ts +36 -4
- package/src/icons/react/abort.tsx +1 -1
- package/src/icons/react/access-template.tsx +1 -1
- package/src/icons/react/activity-filled.tsx +1 -1
- package/src/icons/react/activity-log.tsx +1 -1
- package/src/icons/react/activity.tsx +1 -1
- package/src/icons/react/add-after.tsx +1 -1
- package/src/icons/react/add-before.tsx +1 -1
- package/src/icons/react/add-compact.tsx +1 -1
- package/src/icons/react/add.tsx +1 -1
- package/src/icons/react/ai-assistant-filled.tsx +1 -1
- package/src/icons/react/ai-assistant.tsx +1 -1
- package/src/icons/react/ai-fibery-build.tsx +1 -1
- package/src/icons/react/alert-triangle.tsx +1 -1
- package/src/icons/react/app.tsx +1 -1
- package/src/icons/react/appearance-auto.tsx +1 -1
- package/src/icons/react/appearance-dark.tsx +1 -1
- package/src/icons/react/appearance-light.tsx +1 -1
- package/src/icons/react/architect.tsx +1 -1
- package/src/icons/react/arrow-back.tsx +1 -1
- package/src/icons/react/arrow-bar-down.tsx +1 -1
- package/src/icons/react/arrow-bar-left.tsx +1 -1
- package/src/icons/react/arrow-bar-right.tsx +1 -1
- package/src/icons/react/arrow-bar-up.tsx +1 -1
- package/src/icons/react/arrow-collapse-vertical.tsx +1 -1
- package/src/icons/react/arrow-collapse.tsx +1 -1
- package/src/icons/react/arrow-down.tsx +1 -1
- package/src/icons/react/arrow-forward.tsx +1 -1
- package/src/icons/react/arrow-left.tsx +1 -1
- package/src/icons/react/arrow-right.tsx +1 -1
- package/src/icons/react/arrow-send.tsx +1 -1
- package/src/icons/react/arrow-up-circle.tsx +1 -1
- package/src/icons/react/arrow-up.tsx +1 -1
- package/src/icons/react/arrows-right-left.tsx +1 -1
- package/src/icons/react/ask-for-input.tsx +1 -1
- package/src/icons/react/asterisk.tsx +1 -1
- package/src/icons/react/atom.tsx +1 -1
- package/src/icons/react/avatar.tsx +1 -1
- package/src/icons/react/backlog.tsx +1 -1
- package/src/icons/react/bell-circle.tsx +1 -1
- package/src/icons/react/bell-off.tsx +1 -1
- package/src/icons/react/bell-ringing.tsx +1 -1
- package/src/icons/react/bell-x.tsx +1 -1
- package/src/icons/react/bring-forward.tsx +1 -1
- package/src/icons/react/bring-to-front.tsx +1 -1
- package/src/icons/react/cards.tsx +1 -1
- package/src/icons/react/chat-bubble.tsx +1 -1
- package/src/icons/react/chat-float.tsx +1 -1
- package/src/icons/react/chat-sidebar.tsx +1 -1
- package/src/icons/react/checked.tsx +1 -1
- package/src/icons/react/circle-check-filled.tsx +1 -1
- package/src/icons/react/circle-check.tsx +1 -1
- package/src/icons/react/circle-cross-filled.tsx +1 -1
- package/src/icons/react/circle-cross.tsx +1 -1
- package/src/icons/react/circle-info-filled.tsx +1 -1
- package/src/icons/react/circle-info.tsx +1 -1
- package/src/icons/react/circle-pause.tsx +1 -1
- package/src/icons/react/circle-play.tsx +1 -1
- package/src/icons/react/clear-input-filled.tsx +1 -1
- package/src/icons/react/clear.tsx +1 -1
- package/src/icons/react/clock-alarm.tsx +1 -1
- package/src/icons/react/clock-forward.tsx +1 -1
- package/src/icons/react/clock.tsx +1 -1
- package/src/icons/react/close.tsx +1 -1
- package/src/icons/react/collapse-all-horizontal.tsx +1 -1
- package/src/icons/react/collapse-all.tsx +1 -1
- package/src/icons/react/color-coding.tsx +1 -1
- package/src/icons/react/columns-2.tsx +1 -1
- package/src/icons/react/columns-4.tsx +1 -1
- package/src/icons/react/columns.tsx +1 -1
- package/src/icons/react/comment-bubble.tsx +1 -1
- package/src/icons/react/comments.tsx +1 -1
- package/src/icons/react/copy.tsx +1 -1
- package/src/icons/react/credits-filled.tsx +1 -1
- package/src/icons/react/crosshair.tsx +1 -1
- package/src/icons/react/database-add.tsx +1 -1
- package/src/icons/react/database-outline.tsx +1 -1
- package/src/icons/react/database.tsx +1 -1
- package/src/icons/react/date-range.tsx +1 -1
- package/src/icons/react/delete.tsx +1 -1
- package/src/icons/react/drag-block-handle.tsx +1 -1
- package/src/icons/react/drag-handle.tsx +1 -1
- package/src/icons/react/duplicate.tsx +1 -1
- package/src/icons/react/dynamic-filter-value.tsx +1 -1
- package/src/icons/react/email.tsx +1 -1
- package/src/icons/react/emoji-delete.tsx +1 -1
- package/src/icons/react/entity-create-filled.tsx +1 -1
- package/src/icons/react/entity-create.tsx +1 -1
- package/src/icons/react/entity-merge.tsx +1 -1
- package/src/icons/react/equation.tsx +1 -1
- package/src/icons/react/expand-all-horizontal.tsx +1 -1
- package/src/icons/react/expand-all.tsx +1 -1
- package/src/icons/react/export.tsx +1 -1
- package/src/icons/react/eye-off.tsx +1 -1
- package/src/icons/react/eye.tsx +1 -1
- package/src/icons/react/favorites-filled.tsx +1 -1
- package/src/icons/react/favorites-off.tsx +1 -1
- package/src/icons/react/favorites.tsx +1 -1
- package/src/icons/react/fibery-mono.tsx +1 -1
- package/src/icons/react/field-units-large.tsx +1 -1
- package/src/icons/react/fields.tsx +1 -1
- package/src/icons/react/file-archive.tsx +1 -1
- package/src/icons/react/file-counter.tsx +1 -1
- package/src/icons/react/file-document.tsx +1 -1
- package/src/icons/react/file-download.tsx +1 -1
- package/src/icons/react/file-image.tsx +1 -1
- package/src/icons/react/file-multiple.tsx +1 -1
- package/src/icons/react/file-other.tsx +1 -1
- package/src/icons/react/file-presentation.tsx +1 -1
- package/src/icons/react/file-table.tsx +1 -1
- package/src/icons/react/file-upload.tsx +1 -1
- package/src/icons/react/file-video.tsx +1 -1
- package/src/icons/react/files.tsx +1 -1
- package/src/icons/react/filter.tsx +1 -1
- package/src/icons/react/fit-to-screen.tsx +1 -1
- package/src/icons/react/focus-mode-off.tsx +1 -1
- package/src/icons/react/focus-mode.tsx +1 -1
- package/src/icons/react/folder-favorite.tsx +1 -1
- package/src/icons/react/folder-smart.tsx +1 -1
- package/src/icons/react/folder.tsx +1 -1
- package/src/icons/react/form-with-cover.tsx +1 -1
- package/src/icons/react/form-without-cover.tsx +1 -1
- package/src/icons/react/fullscreen-mode-off.tsx +1 -1
- package/src/icons/react/fullscreen-mode-on.tsx +1 -1
- package/src/icons/react/gift.tsx +1 -1
- package/src/icons/react/globe-simple.tsx +1 -1
- package/src/icons/react/globe-unpublish.tsx +1 -1
- package/src/icons/react/go-to.tsx +1 -1
- package/src/icons/react/graduation-cap-filled.tsx +1 -1
- package/src/icons/react/group-add.tsx +1 -1
- package/src/icons/react/headphones-ai.tsx +1 -1
- package/src/icons/react/headphones.tsx +1 -1
- package/src/icons/react/highlights.tsx +1 -1
- package/src/icons/react/hint.tsx +1 -1
- package/src/icons/react/home-filled.tsx +1 -1
- package/src/icons/react/home.tsx +1 -1
- package/src/icons/react/image-error.tsx +1 -1
- package/src/icons/react/import-filled.tsx +1 -1
- package/src/icons/react/import.tsx +1 -1
- package/src/icons/react/index.tsx +1 -1
- package/src/icons/react/integration-add.tsx +1 -1
- package/src/icons/react/integration-discourse.tsx +1 -1
- package/src/icons/react/integration-fibery.tsx +1 -1
- package/src/icons/react/integration-figma.tsx +1 -1
- package/src/icons/react/integration-github.tsx +1 -1
- package/src/icons/react/integration-gitlab.tsx +1 -1
- package/src/icons/react/integration-google-drive.tsx +1 -1
- package/src/icons/react/integration-google-map.tsx +1 -1
- package/src/icons/react/integration-intercom.tsx +1 -1
- package/src/icons/react/integration-jira.tsx +1 -1
- package/src/icons/react/integration-loom.tsx +1 -1
- package/src/icons/react/integration-miro.tsx +1 -1
- package/src/icons/react/integration-mixpanel.tsx +1 -1
- package/src/icons/react/integration-slack.tsx +1 -1
- package/src/icons/react/integration-suggest.tsx +1 -1
- package/src/icons/react/integration-twitter.tsx +1 -1
- package/src/icons/react/integration-unsplash.tsx +1 -1
- package/src/icons/react/integration-youtube.tsx +1 -1
- package/src/icons/react/integration-zendesk.tsx +1 -1
- package/src/icons/react/integration.tsx +1 -1
- package/src/icons/react/integrations-filled.tsx +1 -1
- package/src/icons/react/items-timeline.tsx +1 -1
- package/src/icons/react/items.tsx +1 -1
- package/src/icons/react/key.tsx +1 -1
- package/src/icons/react/keyboard-hide-down.tsx +1 -1
- package/src/icons/react/lab.tsx +1 -1
- package/src/icons/react/layout-double.tsx +1 -1
- package/src/icons/react/layout-multiple.tsx +1 -1
- package/src/icons/react/layout-single.tsx +1 -1
- package/src/icons/react/levels.tsx +1 -1
- package/src/icons/react/limits.tsx +1 -1
- package/src/icons/react/line-divider.tsx +1 -1
- package/src/icons/react/line-jump.tsx +1 -1
- package/src/icons/react/link.tsx +1 -1
- package/src/icons/react/location-edit.tsx +1 -1
- package/src/icons/react/lock-filled.tsx +1 -1
- package/src/icons/react/lock.tsx +1 -1
- package/src/icons/react/logout.tsx +1 -1
- package/src/icons/react/loupe-zoom-in.tsx +1 -1
- package/src/icons/react/loupe-zoom-out.tsx +1 -1
- package/src/icons/react/map-mode.tsx +1 -1
- package/src/icons/react/markdown.tsx +1 -1
- package/src/icons/react/menu-collapser.tsx +1 -1
- package/src/icons/react/mermaid.tsx +1 -1
- package/src/icons/react/message-plus.tsx +1 -1
- package/src/icons/react/milestones.tsx +1 -1
- package/src/icons/react/minus.tsx +1 -1
- package/src/icons/react/mirror-off.tsx +1 -1
- package/src/icons/react/mirror-on.tsx +1 -1
- package/src/icons/react/monitor.tsx +1 -1
- package/src/icons/react/more-compact.tsx +1 -1
- package/src/icons/react/more.tsx +1 -1
- package/src/icons/react/move-down.tsx +1 -1
- package/src/icons/react/move-left.tsx +1 -1
- package/src/icons/react/move-right.tsx +1 -1
- package/src/icons/react/move-up.tsx +1 -1
- package/src/icons/react/no-border.tsx +1 -1
- package/src/icons/react/no-fill.tsx +1 -1
- package/src/icons/react/obj-child.tsx +1 -1
- package/src/icons/react/obj-m2m.tsx +1 -1
- package/src/icons/react/obj-o2o.tsx +1 -1
- package/src/icons/react/obj-parent.tsx +1 -1
- package/src/icons/react/obj-self.tsx +1 -1
- package/src/icons/react/on-schedule.tsx +1 -1
- package/src/icons/react/open-in-panel.tsx +1 -1
- package/src/icons/react/open-link.tsx +1 -1
- package/src/icons/react/page-regular-mode.tsx +1 -1
- package/src/icons/react/page-wide-mode.tsx +1 -1
- package/src/icons/react/panel-add.tsx +1 -1
- package/src/icons/react/pencil.tsx +1 -1
- package/src/icons/react/people-all.tsx +1 -1
- package/src/icons/react/people-check.tsx +1 -1
- package/src/icons/react/people-edit.tsx +1 -1
- package/src/icons/react/people-group-remove.tsx +1 -1
- package/src/icons/react/people-group.tsx +1 -1
- package/src/icons/react/people-invite.tsx +1 -1
- package/src/icons/react/people-remove.tsx +1 -1
- package/src/icons/react/people-role.tsx +1 -1
- package/src/icons/react/people-x.tsx +1 -1
- package/src/icons/react/people.tsx +1 -1
- package/src/icons/react/photo.tsx +1 -1
- package/src/icons/react/pin-filled.tsx +1 -1
- package/src/icons/react/pin.tsx +1 -1
- package/src/icons/react/plus.tsx +1 -1
- package/src/icons/react/preferences.tsx +1 -1
- package/src/icons/react/present-play.tsx +1 -1
- package/src/icons/react/present-stop.tsx +1 -1
- package/src/icons/react/print.tsx +1 -1
- package/src/icons/react/private-items.tsx +1 -1
- package/src/icons/react/propagate.tsx +1 -1
- package/src/icons/react/question.tsx +1 -1
- package/src/icons/react/reactions-add.tsx +1 -1
- package/src/icons/react/read-only.tsx +1 -1
- package/src/icons/react/redo.tsx +1 -1
- package/src/icons/react/references.tsx +1 -1
- package/src/icons/react/refresh.tsx +1 -1
- package/src/icons/react/remove.tsx +1 -1
- package/src/icons/react/reset-password.tsx +1 -1
- package/src/icons/react/richeditor-block-callout.tsx +1 -1
- package/src/icons/react/richeditor-block-code.tsx +1 -1
- package/src/icons/react/richeditor-block-embed.tsx +1 -1
- package/src/icons/react/richeditor-block-entity.tsx +1 -1
- package/src/icons/react/richeditor-block-file.tsx +1 -1
- package/src/icons/react/richeditor-block-h1.tsx +1 -1
- package/src/icons/react/richeditor-block-h2.tsx +1 -1
- package/src/icons/react/richeditor-block-h3.tsx +1 -1
- package/src/icons/react/richeditor-block-h4.tsx +1 -1
- package/src/icons/react/richeditor-block-mention.tsx +1 -1
- package/src/icons/react/richeditor-block-paragraph.tsx +1 -1
- package/src/icons/react/richeditor-block-quote.tsx +1 -1
- package/src/icons/react/richeditor-checklist-create.tsx +1 -1
- package/src/icons/react/richeditor-image-align-center.tsx +1 -1
- package/src/icons/react/richeditor-image-align-left.tsx +1 -1
- package/src/icons/react/richeditor-image-align-right.tsx +1 -1
- package/src/icons/react/richeditor-image.tsx +1 -1
- package/src/icons/react/richeditor-linkedhighlight-create.tsx +1 -1
- package/src/icons/react/richeditor-list-bullet.tsx +1 -1
- package/src/icons/react/richeditor-list-indent.tsx +1 -1
- package/src/icons/react/richeditor-list-ordered.tsx +1 -1
- package/src/icons/react/richeditor-list-unindent.tsx +1 -1
- package/src/icons/react/richeditor-mark-code.tsx +1 -1
- package/src/icons/react/richeditor-mark-em.tsx +1 -1
- package/src/icons/react/richeditor-mark-highlight.tsx +1 -1
- package/src/icons/react/richeditor-mark-strike.tsx +1 -1
- package/src/icons/react/richeditor-mark-strong.tsx +1 -1
- package/src/icons/react/richeditor-mark-text-background-color.tsx +1 -1
- package/src/icons/react/richeditor-mark-underline.tsx +1 -1
- package/src/icons/react/richeditor-table-create.tsx +1 -1
- package/src/icons/react/richeditor-video-upload.tsx +1 -1
- package/src/icons/react/rows.tsx +1 -1
- package/src/icons/react/rule.tsx +1 -1
- package/src/icons/react/search-add.tsx +1 -1
- package/src/icons/react/search-filled.tsx +1 -1
- package/src/icons/react/search-remove.tsx +1 -1
- package/src/icons/react/search.tsx +1 -1
- package/src/icons/react/self-reference-off.tsx +1 -1
- package/src/icons/react/self-reference-on.tsx +1 -1
- package/src/icons/react/send-backward.tsx +1 -1
- package/src/icons/react/send-to-back.tsx +1 -1
- package/src/icons/react/settings-filled.tsx +1 -1
- package/src/icons/react/settings.tsx +1 -1
- package/src/icons/react/share.tsx +1 -1
- package/src/icons/react/shield-keyhole.tsx +1 -1
- package/src/icons/react/show-author.tsx +1 -1
- package/src/icons/react/simple-compass.tsx +1 -1
- package/src/icons/react/slide-menu-filled.tsx +1 -1
- package/src/icons/react/slide-menu.tsx +1 -1
- package/src/icons/react/sort.tsx +1 -1
- package/src/icons/react/space-add.tsx +1 -1
- package/src/icons/react/space-app.tsx +1 -1
- package/src/icons/react/space-generate.tsx +1 -1
- package/src/icons/react/space-move.tsx +1 -1
- package/src/icons/react/space-scratch.tsx +1 -1
- package/src/icons/react/space-template.tsx +1 -1
- package/src/icons/react/spinner.tsx +1 -1
- package/src/icons/react/switch-to-text.tsx +1 -1
- package/src/icons/react/switch-to-widget.tsx +1 -1
- package/src/icons/react/table-layout.tsx +1 -1
- package/src/icons/react/templates-filled.tsx +1 -1
- package/src/icons/react/templates.tsx +1 -1
- package/src/icons/react/terminal.tsx +1 -1
- package/src/icons/react/text-no-wrap.tsx +1 -1
- package/src/icons/react/text-tool-align-bottom.tsx +1 -1
- package/src/icons/react/text-tool-align-middle.tsx +1 -1
- package/src/icons/react/text-tool-align-top.tsx +1 -1
- package/src/icons/react/text-wrap.tsx +1 -1
- package/src/icons/react/toc.tsx +1 -1
- package/src/icons/react/type-button.tsx +1 -1
- package/src/icons/react/type-checkbox.tsx +1 -1
- package/src/icons/react/type-date.tsx +1 -1
- package/src/icons/react/type-email.tsx +1 -1
- package/src/icons/react/type-emoji.tsx +1 -1
- package/src/icons/react/type-formula.tsx +1 -1
- package/src/icons/react/type-location.tsx +1 -1
- package/src/icons/react/type-lookup.tsx +1 -1
- package/src/icons/react/type-money.tsx +1 -1
- package/src/icons/react/type-multi-select.tsx +1 -1
- package/src/icons/react/type-number.tsx +1 -1
- package/src/icons/react/type-percent.tsx +1 -1
- package/src/icons/react/type-phone.tsx +1 -1
- package/src/icons/react/type-relation.tsx +1 -1
- package/src/icons/react/type-rich-text.tsx +1 -1
- package/src/icons/react/type-single-select.tsx +1 -1
- package/src/icons/react/type-text.tsx +1 -1
- package/src/icons/react/undo.tsx +1 -1
- package/src/icons/react/units-avatar.tsx +1 -1
- package/src/icons/react/units-collection.tsx +1 -1
- package/src/icons/react/units-counter.tsx +1 -1
- package/src/icons/react/units-date.tsx +1 -1
- package/src/icons/react/units-field-icon-button.tsx +1 -1
- package/src/icons/react/units-field.tsx +1 -1
- package/src/icons/react/units-input.tsx +1 -1
- package/src/icons/react/units-normal.tsx +1 -1
- package/src/icons/react/units-progress-bar.tsx +1 -1
- package/src/icons/react/units-rich-text.tsx +1 -1
- package/src/icons/react/units-snippet.tsx +1 -1
- package/src/icons/react/unlink.tsx +1 -1
- package/src/icons/react/unlock-filled.tsx +1 -1
- package/src/icons/react/unlock.tsx +1 -1
- package/src/icons/react/usb-flash-drive.tsx +1 -1
- package/src/icons/react/value-clear.tsx +1 -1
- package/src/icons/react/value-edit.tsx +1 -1
- package/src/icons/react/view-ai.tsx +1 -1
- package/src/icons/react/view-app.tsx +1 -1
- package/src/icons/react/view-board.tsx +1 -1
- package/src/icons/react/view-calendar.tsx +1 -1
- package/src/icons/react/view-canvas.tsx +1 -1
- package/src/icons/react/view-chart.tsx +1 -1
- package/src/icons/react/view-dashboard.tsx +1 -1
- package/src/icons/react/view-details.tsx +1 -1
- package/src/icons/react/view-document.tsx +1 -1
- package/src/icons/react/view-embed.tsx +1 -1
- package/src/icons/react/view-feed.tsx +1 -1
- package/src/icons/react/view-form.tsx +1 -1
- package/src/icons/react/view-gallery.tsx +1 -1
- package/src/icons/react/view-gantt.tsx +1 -1
- package/src/icons/react/view-list.tsx +1 -1
- package/src/icons/react/view-map.tsx +1 -1
- package/src/icons/react/view-page.tsx +1 -1
- package/src/icons/react/view-table.tsx +1 -1
- package/src/icons/react/view-timeline.tsx +1 -1
- package/src/icons/react/views.tsx +1 -1
- package/src/icons/react/warning-triangle-filled.tsx +1 -1
- package/src/icons/react/warning-triangle.tsx +1 -1
- package/src/icons/react/warning.tsx +1 -1
- package/src/icons/react/webhooks.tsx +1 -1
- package/src/icons/react/workflow.tsx +1 -1
- package/src/number-input/number-input-inline-with-autosize.tsx +10 -2
- package/src/number-input/styles.ts +13 -0
- package/src/number-input/text-area-auto-sized.tsx +4 -3
- package/src/number-input/text-input-auto-sized.tsx +4 -3
- package/src/palettes/inspect.defs.colors.neutral-arch.test.ts +12 -0
- package/src/palettes/inspect.defs.colors.neutral-user.test.ts +12 -0
- package/src/palettes/inspect.defs.colors.warm-arch.test.ts +12 -0
- package/src/palettes/inspect.defs.colors.warm-user.test.ts +12 -0
- package/src/theming.generated.css +12 -0
- package/src/theming.generated.ts +15 -0
- package/src/tooltip.tsx +6 -3
- package/src/unit/index.tsx +2 -63
- package/src/unit/labeled-unit.tsx +28 -0
- package/src/unit/primitive.tsx +16 -18
- package/src/unit/styles.ts +17 -29
- package/src/unit/types.ts +4 -2
- package/src/unit/unit-content.tsx +15 -10
- package/src/unit/unit.tsx +88 -0
- package/vite.config.ts +85 -0
- package/babel.config.js +0 -3
- package/scripts/generate-icons.mjs +0 -142
- package/src/__mocks__/style-mock.js +0 -1
- package/src/unit/unit-with-title.tsx +0 -13
- package/src/unit/unit-with-tooltip.tsx +0 -77
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import {css, cx} from "@linaria/core";
|
|
2
|
+
|
|
3
|
+
import {space, textClasses} from "../design-system";
|
|
4
|
+
|
|
5
|
+
const labelCss = css`
|
|
6
|
+
padding-bottom: ${space.s2}px;
|
|
7
|
+
padding-top: ${space.s6}px;
|
|
8
|
+
`;
|
|
9
|
+
|
|
10
|
+
const labeledUnitCss = css`
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
align-items: flex-start;
|
|
14
|
+
justify-content: flex-start;
|
|
15
|
+
line-height: 1.2;
|
|
16
|
+
width: 100%;
|
|
17
|
+
`;
|
|
18
|
+
|
|
19
|
+
export const UnitLabel = ({children}: {children: React.ReactNode}) => (
|
|
20
|
+
<div className={cx(textClasses.heading7, labelCss)}>{children}</div>
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
export const LabeledUnit = ({label, children}: {label: React.ReactNode; children: React.ReactElement}) => (
|
|
24
|
+
<div className={labeledUnitCss}>
|
|
25
|
+
<UnitLabel>{label}</UnitLabel>
|
|
26
|
+
{children}
|
|
27
|
+
</div>
|
|
28
|
+
);
|
package/src/unit/primitive.tsx
CHANGED
|
@@ -5,7 +5,9 @@ import type {ComponentProps} from "react";
|
|
|
5
5
|
import {inputOverrides} from "../antd/styles";
|
|
6
6
|
import {border, space, themeVars} from "../design-system";
|
|
7
7
|
import {FieldIcon} from "../field-icon";
|
|
8
|
+
import {Tooltip} from "../tooltip";
|
|
8
9
|
import {useTruncated} from "../tooltip-if-overflown";
|
|
10
|
+
import {LabeledUnit} from "./labeled-unit";
|
|
9
11
|
import {
|
|
10
12
|
basicUnitClassName,
|
|
11
13
|
bigSizeUnitClassName,
|
|
@@ -14,18 +16,19 @@ import {
|
|
|
14
16
|
clickableClassName,
|
|
15
17
|
fullUnitWrapperClassName,
|
|
16
18
|
invalidUnitClassName,
|
|
19
|
+
pillRadiusClassName,
|
|
17
20
|
positionUnitClass,
|
|
18
21
|
regularSizeUnitClassName,
|
|
19
22
|
regularSizeUnitMinWidthClassName,
|
|
20
|
-
unitDescriptionClassName,
|
|
21
23
|
unitMinHeightClassName,
|
|
22
|
-
unitTitleClassName,
|
|
23
|
-
unitWithTitleClassName,
|
|
24
24
|
} from "./styles";
|
|
25
25
|
import type {UnitPrimitiveProps} from "./types";
|
|
26
26
|
import {UnitButtonGroup} from "./unit-button-group";
|
|
27
27
|
import {UnitContent} from "./unit-content";
|
|
28
|
-
|
|
28
|
+
|
|
29
|
+
const unitDescriptionClassName = css`
|
|
30
|
+
margin-bottom: ${space.s1}px;
|
|
31
|
+
`;
|
|
29
32
|
|
|
30
33
|
const resetButtonStylesClassName = css`
|
|
31
34
|
all: unset;
|
|
@@ -71,14 +74,15 @@ export const UnitPrimitive = ({
|
|
|
71
74
|
navButton,
|
|
72
75
|
// Appearance
|
|
73
76
|
big = false,
|
|
77
|
+
pill = false,
|
|
74
78
|
tooltip = true,
|
|
75
|
-
|
|
79
|
+
withLabel = false,
|
|
76
80
|
border = true,
|
|
77
81
|
color = themeVars.textColor,
|
|
78
82
|
bgColor = themeVars.transparent,
|
|
79
83
|
fontWeight,
|
|
80
84
|
shrinkable = true,
|
|
81
|
-
clickable =
|
|
85
|
+
clickable = false,
|
|
82
86
|
setMinWidth = true,
|
|
83
87
|
setMinHeight = true,
|
|
84
88
|
// Callback
|
|
@@ -101,6 +105,7 @@ export const UnitPrimitive = ({
|
|
|
101
105
|
setMinWidth && (big ? bigSizeUnitMinWidthClassName : regularSizeUnitMinWidthClassName),
|
|
102
106
|
setMinHeight && unitMinHeightClassName,
|
|
103
107
|
border && borderClassName,
|
|
108
|
+
pill && pillRadiusClassName,
|
|
104
109
|
invalid && invalidUnitClassName,
|
|
105
110
|
clickable && clickableClassName
|
|
106
111
|
);
|
|
@@ -124,17 +129,10 @@ export const UnitPrimitive = ({
|
|
|
124
129
|
/>
|
|
125
130
|
);
|
|
126
131
|
|
|
127
|
-
const
|
|
128
|
-
<div className={unitWithTitleClassName}>
|
|
129
|
-
<div className={unitTitleClassName}>{title}</div>
|
|
130
|
-
{content}
|
|
131
|
-
</div>
|
|
132
|
-
) : (
|
|
133
|
-
content
|
|
134
|
-
);
|
|
132
|
+
const labeledContent = withLabel ? <LabeledUnit label={title}>{content}</LabeledUnit> : content;
|
|
135
133
|
|
|
136
134
|
if (!tooltip) {
|
|
137
|
-
return <div className={positionUnitClass}>{
|
|
135
|
+
return <div className={positionUnitClass}>{labeledContent}</div>;
|
|
138
136
|
}
|
|
139
137
|
|
|
140
138
|
const tooltipTitle = (
|
|
@@ -179,9 +177,9 @@ export const UnitPrimitive = ({
|
|
|
179
177
|
|
|
180
178
|
return (
|
|
181
179
|
<div className={positionUnitClass}>
|
|
182
|
-
<
|
|
183
|
-
{
|
|
184
|
-
</
|
|
180
|
+
<Tooltip side="bottom" align="start" openOnFocus={false} title={tooltipTitle} description={tooltipDescription}>
|
|
181
|
+
<div>{labeledContent}</div>
|
|
182
|
+
</Tooltip>
|
|
185
183
|
</div>
|
|
186
184
|
);
|
|
187
185
|
};
|
package/src/unit/styles.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {css} from "@linaria/core";
|
|
2
2
|
|
|
3
|
-
import {fontSize, space, textStyles, themeVars} from "../../src/design-system";
|
|
3
|
+
import {border, fontSize, space, textStyles, themeVars} from "../../src/design-system";
|
|
4
4
|
|
|
5
5
|
export const textEllipsisClassName = css`
|
|
6
6
|
white-space: nowrap;
|
|
@@ -9,7 +9,7 @@ export const textEllipsisClassName = css`
|
|
|
9
9
|
`;
|
|
10
10
|
|
|
11
11
|
export const basicUnitClassName = css`
|
|
12
|
-
border-radius: ${
|
|
12
|
+
border-radius: ${border.radius6}px;
|
|
13
13
|
border: none;
|
|
14
14
|
`;
|
|
15
15
|
|
|
@@ -49,22 +49,6 @@ export const unitMinHeightClassName = css`
|
|
|
49
49
|
min-height: ${space.s24}px;
|
|
50
50
|
`;
|
|
51
51
|
|
|
52
|
-
// TODO(textClasses migration): consumers in packages/ui-kit/src/unit/primitive.tsx, packages/ui-kit/src/unit/unit-with-title.tsx, fibery-ui/src/components/units/* need cx(textClasses.heading7, ...)
|
|
53
|
-
export const unitTitleClassName = css`
|
|
54
|
-
${textStyles.heading7}
|
|
55
|
-
padding-bottom: ${space.s2}px;
|
|
56
|
-
padding-top: ${space.s6}px;
|
|
57
|
-
`;
|
|
58
|
-
|
|
59
|
-
export const unitWithTitleClassName = css`
|
|
60
|
-
display: flex;
|
|
61
|
-
flex-direction: column;
|
|
62
|
-
align-items: flex-start;
|
|
63
|
-
justify-content: flex-start;
|
|
64
|
-
line-height: 1.2;
|
|
65
|
-
width: 100%;
|
|
66
|
-
`;
|
|
67
|
-
|
|
68
52
|
export const invalidUnitClassName = css``;
|
|
69
53
|
|
|
70
54
|
export const clickableClassName = css`
|
|
@@ -87,7 +71,7 @@ export const borderClassName = css`
|
|
|
87
71
|
bottom: 0;
|
|
88
72
|
box-shadow: ${themeVars.inputBorderColor} inset;
|
|
89
73
|
mix-blend-mode: ${themeVars.inputBorderBlendMode};
|
|
90
|
-
border-radius: ${
|
|
74
|
+
border-radius: ${border.radius6}px;
|
|
91
75
|
pointer-events: none;
|
|
92
76
|
}
|
|
93
77
|
|
|
@@ -117,24 +101,28 @@ export const borderClassName = css`
|
|
|
117
101
|
}
|
|
118
102
|
`;
|
|
119
103
|
|
|
120
|
-
export const
|
|
121
|
-
|
|
122
|
-
padding-right: ${space.s4}px;
|
|
123
|
-
`;
|
|
104
|
+
export const pillRadiusClassName = css`
|
|
105
|
+
border-radius: ${border.radius16}px;
|
|
124
106
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
107
|
+
&::before {
|
|
108
|
+
border-radius: ${border.radius16}px;
|
|
109
|
+
box-shadow: ${themeVars.inputBorderColorThin} inset;
|
|
110
|
+
}
|
|
128
111
|
|
|
129
|
-
|
|
130
|
-
|
|
112
|
+
&.${clickableClassName}:hover::before {
|
|
113
|
+
box-shadow: ${themeVars.inputBorderHoverColorThin} inset;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
&.${clickableClassName}:focus::before {
|
|
117
|
+
box-shadow: ${themeVars.inputBorderFocusColorThin} inset;
|
|
118
|
+
}
|
|
131
119
|
`;
|
|
132
120
|
|
|
133
121
|
export const fullUnitWrapperClassName = css`
|
|
134
122
|
display: flex;
|
|
135
123
|
align-items: center;
|
|
136
124
|
padding: ${space.s6}px;
|
|
137
|
-
border-radius: ${
|
|
125
|
+
border-radius: ${border.radius6}px;
|
|
138
126
|
background-color: ${themeVars.cardBg};
|
|
139
127
|
margin-bottom: ${space.s4}px;
|
|
140
128
|
`;
|
package/src/unit/types.ts
CHANGED
|
@@ -12,13 +12,15 @@ export type UnitPrimitiveProps = {
|
|
|
12
12
|
title?: ReactNode;
|
|
13
13
|
fieldIcon?: string;
|
|
14
14
|
description?: ReactNode;
|
|
15
|
-
icons?: React.
|
|
15
|
+
icons?: React.ReactNode[];
|
|
16
16
|
hint?: ReactNode;
|
|
17
17
|
navButton?: ReactNode;
|
|
18
18
|
// Appearance
|
|
19
19
|
big?: boolean;
|
|
20
|
+
/** Round corners to half the height (pill/stadium shape). */
|
|
21
|
+
pill?: boolean;
|
|
20
22
|
tooltip?: boolean;
|
|
21
|
-
|
|
23
|
+
withLabel?: boolean;
|
|
22
24
|
border?: boolean;
|
|
23
25
|
color?: string;
|
|
24
26
|
bgColor?: string | null;
|
|
@@ -1,17 +1,22 @@
|
|
|
1
|
-
import {cx} from "@linaria/core";
|
|
1
|
+
import {css, cx} from "@linaria/core";
|
|
2
2
|
import type {ReactNode} from "react";
|
|
3
3
|
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
basicUnitContentClassName,
|
|
7
|
-
textEllipsisClassName,
|
|
8
|
-
unitContentContainerClassName,
|
|
9
|
-
} from "./styles";
|
|
4
|
+
import {space} from "../design-system";
|
|
5
|
+
import {alignCenterClassName, textEllipsisClassName} from "./styles";
|
|
10
6
|
import {UnitContentLayout} from "./unit-content-layout";
|
|
11
7
|
|
|
8
|
+
const contentContainerCss = css`
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
`;
|
|
11
|
+
|
|
12
|
+
const contentCss = css`
|
|
13
|
+
padding-left: ${space.s4}px;
|
|
14
|
+
padding-right: ${space.s4}px;
|
|
15
|
+
`;
|
|
16
|
+
|
|
12
17
|
type Props = {
|
|
13
18
|
big: boolean;
|
|
14
|
-
icons?: React.
|
|
19
|
+
icons?: React.ReactNode[];
|
|
15
20
|
shrinkable?: boolean;
|
|
16
21
|
truncate?: boolean;
|
|
17
22
|
setNode?: (element: HTMLElement | null) => void;
|
|
@@ -35,8 +40,8 @@ export const UnitContent = ({big, icons, shrinkable, truncate, setNode, children
|
|
|
35
40
|
: null}
|
|
36
41
|
|
|
37
42
|
{children && (
|
|
38
|
-
<div className={
|
|
39
|
-
<div ref={setNode} className={cx(
|
|
43
|
+
<div className={contentContainerCss}>
|
|
44
|
+
<div ref={setNode} className={cx(contentCss, truncate && textEllipsisClassName)}>
|
|
40
45
|
{children}
|
|
41
46
|
</div>
|
|
42
47
|
</div>
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import type {KeyboardEvent, ReactNode} from "react";
|
|
2
|
+
|
|
3
|
+
import {themeVars} from "../design-system";
|
|
4
|
+
import {UnitPrimitive} from "./primitive";
|
|
5
|
+
|
|
6
|
+
export type UnitVariant = "outlined" | "plain" | "filled";
|
|
7
|
+
|
|
8
|
+
export type UnitSize = "small" | "medium";
|
|
9
|
+
|
|
10
|
+
export type UnitProps = {
|
|
11
|
+
variant?: UnitVariant;
|
|
12
|
+
size?: UnitSize;
|
|
13
|
+
readOnly?: boolean;
|
|
14
|
+
/** Render the field label above the value (full-size presentation). */
|
|
15
|
+
withLabel?: boolean;
|
|
16
|
+
invalid?: boolean;
|
|
17
|
+
tooltip?: boolean;
|
|
18
|
+
// Content
|
|
19
|
+
children?: ReactNode;
|
|
20
|
+
title?: ReactNode;
|
|
21
|
+
fieldIcon?: string;
|
|
22
|
+
description?: ReactNode;
|
|
23
|
+
hint?: ReactNode;
|
|
24
|
+
icons?: ReactNode[];
|
|
25
|
+
navButton?: ReactNode;
|
|
26
|
+
// Data-driven appearance (overrides the variant's default fill/color)
|
|
27
|
+
color?: string;
|
|
28
|
+
bgColor?: string | null;
|
|
29
|
+
fontWeight?: number;
|
|
30
|
+
shrinkable?: boolean;
|
|
31
|
+
/** Round corners to half the height (pill/stadium shape). */
|
|
32
|
+
pill?: boolean;
|
|
33
|
+
// Interaction escape hatches — override the variant-derived defaults.
|
|
34
|
+
border?: boolean;
|
|
35
|
+
button?: boolean;
|
|
36
|
+
clickable?: boolean;
|
|
37
|
+
// Layout escape hatches — orthogonal to variant (markup, not appearance).
|
|
38
|
+
setMinWidth?: boolean;
|
|
39
|
+
setMinHeight?: boolean;
|
|
40
|
+
overflow?: boolean;
|
|
41
|
+
renderAsDiv?: boolean;
|
|
42
|
+
inline?: boolean;
|
|
43
|
+
multiline?: boolean;
|
|
44
|
+
// Callbacks
|
|
45
|
+
onClick?: (e: React.MouseEvent<HTMLElement>) => void;
|
|
46
|
+
onKeyDown?: (e: KeyboardEvent<HTMLButtonElement | HTMLDivElement>) => void;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const getVariantBgColor = (variant: UnitVariant, readOnly: boolean) => {
|
|
50
|
+
if (variant === "filled") {
|
|
51
|
+
return themeVars.unitBg;
|
|
52
|
+
}
|
|
53
|
+
if (variant === "outlined" && readOnly) {
|
|
54
|
+
return themeVars.inputDisabledBgColor;
|
|
55
|
+
}
|
|
56
|
+
return themeVars.transparent;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export const Unit = ({
|
|
60
|
+
variant = "outlined",
|
|
61
|
+
size = "small",
|
|
62
|
+
readOnly = false,
|
|
63
|
+
withLabel = false,
|
|
64
|
+
invalid,
|
|
65
|
+
color,
|
|
66
|
+
bgColor,
|
|
67
|
+
border,
|
|
68
|
+
button,
|
|
69
|
+
clickable,
|
|
70
|
+
onClick,
|
|
71
|
+
...rest
|
|
72
|
+
}: UnitProps) => {
|
|
73
|
+
const interactive = variant === "outlined" && !readOnly;
|
|
74
|
+
return (
|
|
75
|
+
<UnitPrimitive
|
|
76
|
+
{...rest}
|
|
77
|
+
big={size === "medium"}
|
|
78
|
+
border={border ?? (variant === "outlined" && !readOnly)}
|
|
79
|
+
bgColor={bgColor ?? getVariantBgColor(variant, readOnly)}
|
|
80
|
+
button={button ?? (interactive || Boolean(onClick))}
|
|
81
|
+
clickable={clickable ?? interactive}
|
|
82
|
+
withLabel={withLabel}
|
|
83
|
+
invalid={invalid}
|
|
84
|
+
color={color}
|
|
85
|
+
onClick={onClick}
|
|
86
|
+
/>
|
|
87
|
+
);
|
|
88
|
+
};
|
package/vite.config.ts
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import {readFileSync} from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
|
|
4
|
+
import wyw from "@wyw-in-js/vite";
|
|
5
|
+
import {globSync} from "glob";
|
|
6
|
+
import {defineConfig} from "vite";
|
|
7
|
+
|
|
8
|
+
const root = import.meta.dirname;
|
|
9
|
+
const sourcePattern = path.join(root, "src/**/*.{ts,tsx}");
|
|
10
|
+
const linariaEntries = globSync(sourcePattern, {
|
|
11
|
+
absolute: true,
|
|
12
|
+
ignore: ["**/*.test.{ts,tsx}", "**/__tests__/**"],
|
|
13
|
+
}).filter((file) => readFileSync(file, "utf8").includes("@linaria/"));
|
|
14
|
+
|
|
15
|
+
if (linariaEntries.length === 0) {
|
|
16
|
+
throw new Error("No UI-kit Linaria modules found to evaluate.");
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const droppedClassNameTitles = new Set([
|
|
20
|
+
"div",
|
|
21
|
+
"span",
|
|
22
|
+
"img",
|
|
23
|
+
"a",
|
|
24
|
+
"className",
|
|
25
|
+
"ul",
|
|
26
|
+
"li",
|
|
27
|
+
"p",
|
|
28
|
+
"b",
|
|
29
|
+
"style",
|
|
30
|
+
"h4",
|
|
31
|
+
"blockquote",
|
|
32
|
+
"pre",
|
|
33
|
+
"abbr",
|
|
34
|
+
]);
|
|
35
|
+
const classNameSuffixNoise = /(Styles?|Css|Class|ClassName)$/u;
|
|
36
|
+
const wywViteConfig = {
|
|
37
|
+
conditionNames: ["@fibery/source", "..."],
|
|
38
|
+
configFile: false,
|
|
39
|
+
evalConsole: "pipe",
|
|
40
|
+
eval: {
|
|
41
|
+
resolver: "native",
|
|
42
|
+
require: "off",
|
|
43
|
+
strategy: "static",
|
|
44
|
+
},
|
|
45
|
+
prefixer: false,
|
|
46
|
+
evaluate: true,
|
|
47
|
+
classNameSlug(hash: string, title: string) {
|
|
48
|
+
if (droppedClassNameTitles.has(title)) {
|
|
49
|
+
return hash;
|
|
50
|
+
}
|
|
51
|
+
return `${hash}-${title.replace(classNameSuffixNoise, "")}`;
|
|
52
|
+
},
|
|
53
|
+
displayName: true,
|
|
54
|
+
sourceMap: false,
|
|
55
|
+
features: {
|
|
56
|
+
dangerousCodeRemover: true,
|
|
57
|
+
globalCache: true,
|
|
58
|
+
happyDOM: false,
|
|
59
|
+
softErrors: false,
|
|
60
|
+
useWeakRefInEval: true,
|
|
61
|
+
},
|
|
62
|
+
include: [sourcePattern],
|
|
63
|
+
exclude: ["**/node_modules/**"],
|
|
64
|
+
transformLibraries: false,
|
|
65
|
+
} as Parameters<typeof wyw>[0];
|
|
66
|
+
|
|
67
|
+
export default defineConfig({
|
|
68
|
+
resolve: {
|
|
69
|
+
conditions: ["@fibery/source", "browser"],
|
|
70
|
+
},
|
|
71
|
+
define: {
|
|
72
|
+
"process.env.NODE_ENV": JSON.stringify("production"),
|
|
73
|
+
"process.env.NODE_DEBUG": "undefined",
|
|
74
|
+
},
|
|
75
|
+
plugins: [wyw(wywViteConfig)],
|
|
76
|
+
build: {
|
|
77
|
+
target: "esnext",
|
|
78
|
+
write: false,
|
|
79
|
+
minify: false,
|
|
80
|
+
reportCompressedSize: false,
|
|
81
|
+
rollupOptions: {
|
|
82
|
+
input: linariaEntries,
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
});
|
package/babel.config.js
DELETED
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
import {readFile} from "fs/promises";
|
|
2
|
-
import path from "node:path";
|
|
3
|
-
import {fileURLToPath} from "node:url";
|
|
4
|
-
|
|
5
|
-
import fs from "fs-extra";
|
|
6
|
-
import {glob} from "glob";
|
|
7
|
-
import {parse} from "svg-parser";
|
|
8
|
-
import svgo from "svgo";
|
|
9
|
-
import {recursiveReduce} from "unist-util-reduce";
|
|
10
|
-
|
|
11
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
12
|
-
const __dirname = path.dirname(__filename);
|
|
13
|
-
|
|
14
|
-
const WORD_RE = /[A-Z]+(?![a-z])|[A-Z]?[a-z]+|\d+/g;
|
|
15
|
-
const words = (s) => String(s).match(WORD_RE) ?? [];
|
|
16
|
-
const cap = (w) => w[0].toUpperCase() + w.slice(1).toLowerCase();
|
|
17
|
-
const pascalCase = (s) => words(s).map(cap).join("");
|
|
18
|
-
const camelCase = (s) =>
|
|
19
|
-
words(s)
|
|
20
|
-
.map((w, i) => (i ? cap(w) : w.toLowerCase()))
|
|
21
|
-
.join("");
|
|
22
|
-
const kebabCase = (s) =>
|
|
23
|
-
words(s)
|
|
24
|
-
.map((w) => w.toLowerCase())
|
|
25
|
-
.join("-");
|
|
26
|
-
|
|
27
|
-
const svgoConfig = (prefix) => ({
|
|
28
|
-
plugins: [
|
|
29
|
-
{
|
|
30
|
-
name: "preset-default",
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
name: "prefixIds",
|
|
34
|
-
params: {
|
|
35
|
-
prefix,
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
],
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
const preludeTemplate = ({source, generator}) => `/**
|
|
42
|
-
* This file was automatically generated. Do not edit manually.
|
|
43
|
-
* ${
|
|
44
|
-
source
|
|
45
|
-
? `
|
|
46
|
-
* @see import("${source}")`
|
|
47
|
-
: ""
|
|
48
|
-
}
|
|
49
|
-
* @see import("${generator}")
|
|
50
|
-
*/
|
|
51
|
-
`;
|
|
52
|
-
|
|
53
|
-
const render = ({source, generator, svgIdentifier, svgIdentifierPath}) =>
|
|
54
|
-
`${preludeTemplate({source, generator})}
|
|
55
|
-
import {forwardRef} from "react";
|
|
56
|
-
import ${svgIdentifier}Svg from "../ast/${svgIdentifierPath}";
|
|
57
|
-
import {Icon} from "../icon";
|
|
58
|
-
import type {IconBaseProps} from "../types";
|
|
59
|
-
|
|
60
|
-
const ${svgIdentifier} = forwardRef<SVGSVGElement, IconBaseProps>(function ${svgIdentifier}(
|
|
61
|
-
props: IconBaseProps,
|
|
62
|
-
ref: React.Ref<SVGSVGElement>
|
|
63
|
-
) {return <Icon {...props} className={props.className} ref={ref} icon={${svgIdentifier}Svg} />});
|
|
64
|
-
|
|
65
|
-
export default ${svgIdentifier};
|
|
66
|
-
`.trim();
|
|
67
|
-
|
|
68
|
-
const defTemplate = ({source, generator, identifier, content}) => `${preludeTemplate({source, generator})}
|
|
69
|
-
import type {IconDefinition} from "../types";
|
|
70
|
-
|
|
71
|
-
const ${identifier}: IconDefinition = ${content};
|
|
72
|
-
|
|
73
|
-
export default ${identifier};
|
|
74
|
-
`;
|
|
75
|
-
|
|
76
|
-
const iconsDir = path.join(__dirname, "../src/icons");
|
|
77
|
-
const iconsSvgPathDir = path.join(iconsDir, "./svg");
|
|
78
|
-
const iconsReactPathDir = path.join(iconsDir, "./react");
|
|
79
|
-
const iconsAstPathDir = path.join(iconsDir, "./ast");
|
|
80
|
-
const pattern = "**/*.svg";
|
|
81
|
-
const icons = await glob(pattern, {cwd: iconsSvgPathDir});
|
|
82
|
-
|
|
83
|
-
await fs.remove(iconsReactPathDir);
|
|
84
|
-
await fs.remove(iconsAstPathDir);
|
|
85
|
-
|
|
86
|
-
const generator = path.relative(iconsReactPathDir, __filename);
|
|
87
|
-
let barrelExportContent = preludeTemplate({source: null, generator: generator}) + "\n";
|
|
88
|
-
for (const icon of icons) {
|
|
89
|
-
const name = pascalCase(icon.replace("/", "-").replace(".svg", ""));
|
|
90
|
-
const resultFileName = icon.replaceAll("/", "-").replace(".svg", "");
|
|
91
|
-
const iconPath = path.join(iconsSvgPathDir, icon);
|
|
92
|
-
const source = path.relative(iconsReactPathDir, iconPath);
|
|
93
|
-
|
|
94
|
-
const ast = parse(svgo.optimize((await readFile(iconPath)).toString(), svgoConfig(name)).data);
|
|
95
|
-
|
|
96
|
-
await fs.outputFile(
|
|
97
|
-
path.join(iconsAstPathDir, `./${resultFileName}.ts`),
|
|
98
|
-
defTemplate({
|
|
99
|
-
source,
|
|
100
|
-
generator,
|
|
101
|
-
identifier: name,
|
|
102
|
-
content: JSON.stringify({
|
|
103
|
-
icon: recursiveReduce(ast, (node) => {
|
|
104
|
-
const {class: className, xmlns, ...rest} = node.properties ?? {};
|
|
105
|
-
return {
|
|
106
|
-
...node,
|
|
107
|
-
properties: Object.fromEntries(
|
|
108
|
-
Object.entries(rest).map(([key, value]) => {
|
|
109
|
-
if (key === "style") {
|
|
110
|
-
const style = {};
|
|
111
|
-
value.split(";").forEach((styleItem) => {
|
|
112
|
-
const [styleKey, styleValue] = styleItem.split(":").map((s) => s.trim());
|
|
113
|
-
if (styleKey && styleValue) {
|
|
114
|
-
style[camelCase(styleKey)] = styleValue;
|
|
115
|
-
}
|
|
116
|
-
});
|
|
117
|
-
return [camelCase(key), style];
|
|
118
|
-
}
|
|
119
|
-
return [camelCase(key), value];
|
|
120
|
-
})
|
|
121
|
-
),
|
|
122
|
-
};
|
|
123
|
-
}),
|
|
124
|
-
name: kebabCase(name),
|
|
125
|
-
}),
|
|
126
|
-
})
|
|
127
|
-
);
|
|
128
|
-
|
|
129
|
-
await fs.outputFile(
|
|
130
|
-
path.join(iconsReactPathDir, `${resultFileName}.tsx`),
|
|
131
|
-
render({
|
|
132
|
-
source,
|
|
133
|
-
generator,
|
|
134
|
-
svgIdentifier: name,
|
|
135
|
-
svgIdentifierPath: resultFileName,
|
|
136
|
-
})
|
|
137
|
-
);
|
|
138
|
-
|
|
139
|
-
barrelExportContent += `export {default as ${name}} from "./${resultFileName}";\n`;
|
|
140
|
-
}
|
|
141
|
-
await fs.outputFile(path.join(iconsReactPathDir, `./index.tsx`), barrelExportContent);
|
|
142
|
-
await fs.outputFile(path.join(iconsAstPathDir, `./index.tsx`), barrelExportContent);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import {unitTitleClassName, unitWithTitleClassName} from "./styles";
|
|
2
|
-
|
|
3
|
-
type Props = {
|
|
4
|
-
title: React.ReactNode;
|
|
5
|
-
children: React.ReactElement;
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
export const UnitWithTitle = ({children, title}: Props) => (
|
|
9
|
-
<div className={unitWithTitleClassName}>
|
|
10
|
-
<div className={unitTitleClassName}>{title}</div>
|
|
11
|
-
{children}
|
|
12
|
-
</div>
|
|
13
|
-
);
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import {css} from "@linaria/core";
|
|
2
|
-
import {useRef, useState} from "react";
|
|
3
|
-
|
|
4
|
-
import {space, tooltipDelay} from "../../src/design-system";
|
|
5
|
-
import {Tooltip, TooltipDescription, TooltipTitle} from "../tooltip";
|
|
6
|
-
|
|
7
|
-
const contentCss = css`
|
|
8
|
-
display: flex;
|
|
9
|
-
flex-direction: column;
|
|
10
|
-
gap: ${space.s4}px;
|
|
11
|
-
`;
|
|
12
|
-
|
|
13
|
-
type Props = {
|
|
14
|
-
children: React.ReactElement;
|
|
15
|
-
title: React.ReactNode;
|
|
16
|
-
description: React.ReactNode;
|
|
17
|
-
hidden?: boolean;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export const UnitWithTooltip = ({children, title, description, hidden}: Props) => {
|
|
21
|
-
const [shouldDisplayTooltip, setShouldDisplayTooltip] = useState(false);
|
|
22
|
-
const unitElementRef = useRef<HTMLDivElement>(null);
|
|
23
|
-
const isHoveredRef = useRef(false);
|
|
24
|
-
const checkHoveredStateTimeoutId = useRef<ReturnType<typeof setTimeout> | null>();
|
|
25
|
-
|
|
26
|
-
const onMouseEnter = () => {
|
|
27
|
-
isHoveredRef.current = true;
|
|
28
|
-
|
|
29
|
-
checkHoveredStateTimeoutId.current = setTimeout(() => {
|
|
30
|
-
checkHoveredStateTimeoutId.current = null;
|
|
31
|
-
// onMouseLeave works unreliably in Safari, IE on scroll
|
|
32
|
-
// Sometimes it was not fired leaving tooltip displayed
|
|
33
|
-
// Had to use additional way to validate if we are still over unit
|
|
34
|
-
if (isHoveredRef.current && unitElementRef.current && unitElementRef.current.matches(":hover")) {
|
|
35
|
-
setShouldDisplayTooltip(true);
|
|
36
|
-
const intervalId = window.setInterval(() => {
|
|
37
|
-
if (isHoveredRef.current && unitElementRef.current) {
|
|
38
|
-
if (!unitElementRef.current.matches(":hover")) {
|
|
39
|
-
isHoveredRef.current = false;
|
|
40
|
-
setShouldDisplayTooltip(false);
|
|
41
|
-
clearInterval(intervalId);
|
|
42
|
-
}
|
|
43
|
-
} else {
|
|
44
|
-
clearInterval(intervalId);
|
|
45
|
-
}
|
|
46
|
-
}, 250);
|
|
47
|
-
}
|
|
48
|
-
}, tooltipDelay.enter);
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
const onMouseLeave = () => {
|
|
52
|
-
isHoveredRef.current = false;
|
|
53
|
-
if (checkHoveredStateTimeoutId.current) {
|
|
54
|
-
clearTimeout(checkHoveredStateTimeoutId.current);
|
|
55
|
-
checkHoveredStateTimeoutId.current = null;
|
|
56
|
-
}
|
|
57
|
-
setShouldDisplayTooltip(false);
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
return (
|
|
61
|
-
<Tooltip
|
|
62
|
-
visible={!hidden && shouldDisplayTooltip}
|
|
63
|
-
content={
|
|
64
|
-
<div className={contentCss}>
|
|
65
|
-
<TooltipTitle>{title}</TooltipTitle>
|
|
66
|
-
{description && <TooltipDescription>{description}</TooltipDescription>}
|
|
67
|
-
</div>
|
|
68
|
-
}
|
|
69
|
-
side="bottom"
|
|
70
|
-
align="start"
|
|
71
|
-
>
|
|
72
|
-
<div ref={unitElementRef} onMouseDown={onMouseLeave} onMouseEnter={onMouseEnter} onMouseLeave={onMouseLeave}>
|
|
73
|
-
{children}
|
|
74
|
-
</div>
|
|
75
|
-
</Tooltip>
|
|
76
|
-
);
|
|
77
|
-
};
|