frappe-ui 1.0.0-beta.70 → 1.0.0-beta.71
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/experimental/FloatingWindow/FloatingWindow.vue +6 -7
- package/experimental/TextEditor/classIcon.ts +21 -0
- package/experimental/TextEditor/commands.js +32 -32
- package/experimental/TextEditor/components/ImageViewerModal.vue +9 -9
- package/experimental/TextEditor/components/LinkPopup.vue +5 -10
- package/experimental/TextEditor/components/MediaNodeView.vue +11 -11
- package/experimental/TextEditor/extensions/iframe/IframeNodeView.vue +5 -5
- package/experimental/TextEditor/extensions/image-group/ImageGroupNodeView.vue +3 -2
- package/experimental/TextEditor/extensions/image-group/ImageGroupUploadDialog.vue +3 -3
- package/experimental/TextEditor/extensions/slash-commands/slash-commands-extension.ts +15 -15
- package/package.json +75 -21
- package/readme.md +30 -27
- package/scripts/migrate-packaging-v1.js +497 -0
- package/src/components/Rating/Rating.api.md +2 -2
- package/src/components/Rating/Rating.md +7 -3
- package/src/components/Rating/Rating.vue +2 -2
- package/src/components/Rating/RatingStar.vue +27 -0
- package/src/components/Rating/types.ts +7 -4
- package/src/components/shared/picker/PickerShell.vue +7 -4
- package/src/molecules/editor/Editor.vue +12 -5
- package/src/molecules/editor/EditorBubbleMenu.vue +19 -11
- package/src/molecules/editor/EditorFloatingMenu.vue +19 -11
- package/src/molecules/editor/extensions/mention/mention-extension.ts +14 -9
- package/src/molecules/editor/extensions/shared/media-upload-types.ts +8 -1
- package/src/molecules/editor/extensions/shared/suggestion-types.ts +2 -0
- package/src/molecules/editor/extensions/slash-commands/slash-commands-extension.ts +24 -2
- package/src/molecules/editor/extensions/suggestion/SuggestionList.vue +4 -1
- package/src/molecules/editor/extensions/suggestion/SuggestionListItem.vue +1 -1
- package/src/molecules/editor/extensions/tag/tag-extension.ts +21 -12
- package/src/molecules/editor/extensions.ts +13 -4
- package/src/molecules/editor/index.ts +7 -0
- package/src/molecules/editor/kits.ts +94 -37
- package/src/molecules/editor/menu-placement.ts +30 -0
- package/src/molecules/editor/menu.ts +55 -0
- package/src/molecules/editor/useEditor.ts +24 -8
- package/tailwind/colorPalette.js +17 -7
- package/tailwind/content.js +25 -22
- package/tailwind/figma-tokens-to-theme.js +52 -13
- package/tailwind/generated/radius.json +1 -1
- package/tailwind/index.d.ts +17 -0
- package/tailwind/plugin.js +14 -33
- package/tailwind/preset.js +18 -7
- package/vite/README.md +19 -4
- package/vite/index.d.ts +13 -1
- package/vite/index.js +8 -2
- package/vite/lucideIconsPlugin.d.ts +14 -0
- package/vitepress/components/Docs/PrevNextBtns.vue +2 -4
- package/vitepress/components/Docs/PropsTable.vue +2 -2
- package/experimental/Accordion/Accordion.cy.ts +0 -199
- package/experimental/Accordion/stories/Controlled.vue +0 -48
- package/experimental/Accordion/stories/Default.vue +0 -30
- package/experimental/Accordion/stories/Icons.vue +0 -35
- package/experimental/Accordion/stories/Multiple.vue +0 -30
- package/experimental/Accordion/stories/Suffix.vue +0 -39
- package/experimental/Calendar/Calendar.cy.ts +0 -390
- package/experimental/Calendar/composables/useNow.spec.ts +0 -81
- package/experimental/Calendar/eventSpan.spec.ts +0 -337
- package/experimental/Calendar/monthStrip.spec.ts +0 -111
- package/experimental/Calendar/stories/CustomHeader.vue +0 -155
- package/experimental/Calendar/stories/Examples.vue +0 -137
- package/experimental/CodeEditor/CodeEditor.cy.ts +0 -160
- package/experimental/CodeEditor/CodeEditor.playground.vue +0 -102
- package/experimental/CodeEditor/CodePreview.test.ts +0 -49
- package/experimental/CodeEditor/stories/Default.vue +0 -16
- package/experimental/CodeEditor/stories/Labeling.vue +0 -25
- package/experimental/CodeEditor/stories/MaxHeight.vue +0 -24
- package/experimental/CodeEditor/stories/Preview.vue +0 -36
- package/experimental/CodeEditor/stories/Sizes.vue +0 -15
- package/experimental/CodeEditor/stories/Variants.vue +0 -13
- package/experimental/CommandPalette/CommandPalette.cy.ts +0 -164
- package/experimental/CommandPalette/CommandPalette.test.ts +0 -686
- package/experimental/CommandPalette/stories/Default.vue +0 -107
- package/experimental/CommandPalette/stories/Links.vue +0 -65
- package/experimental/CommandPalette/stories/ServerSearch.vue +0 -91
- package/experimental/FloatingWindow/FloatingWindow.cy.ts +0 -406
- package/experimental/ListView/stories/CellSlot.vue +0 -66
- package/experimental/ListView/stories/CustomList.vue +0 -110
- package/experimental/ListView/stories/Disabled.vue +0 -55
- package/experimental/ListView/stories/Empty.vue +0 -41
- package/experimental/ListView/stories/Examples.vue +0 -54
- package/experimental/ListView/stories/GroupedRows.vue +0 -149
- package/experimental/MultiEmailInput/MultiEmailInput.cy.ts +0 -182
- package/experimental/MultiEmailInput/stories/AsyncSuggestions.vue +0 -54
- package/experimental/MultiEmailInput/stories/Basic.vue +0 -18
- package/experimental/MultiEmailInput/stories/CustomChip.vue +0 -39
- package/experimental/MultiEmailInput/stories/Labeling.vue +0 -28
- package/experimental/TextEditor/TextEditor.cy.ts +0 -181
- package/experimental/ThemeSwitcher/ThemeSwitcher.cy.ts +0 -101
- package/experimental/ThemeSwitcher/stories/Branded.vue +0 -12
- package/experimental/ThemeSwitcher/stories/Default.vue +0 -7
- package/experimental/ThemeSwitcher/stories/Menu.vue +0 -58
- package/experimental/ThemeSwitcher/stories/Toggle.vue +0 -25
- package/src/charts/AreaChart.cy.ts +0 -242
- package/src/charts/BarChart.cy.ts +0 -840
- package/src/charts/DonutChart.cy.ts +0 -325
- package/src/charts/FunnelChart.cy.ts +0 -237
- package/src/charts/HeatmapChart.cy.ts +0 -343
- package/src/charts/LineChart.cy.ts +0 -390
- package/src/charts/NumberCard.cy.ts +0 -241
- package/src/charts/SankeyChart.cy.ts +0 -295
- package/src/charts/ScatterChart.cy.ts +0 -405
- package/src/charts/areaChartOptions.test.ts +0 -188
- package/src/charts/axisFormat.test.ts +0 -95
- package/src/charts/barChartOptions.test.ts +0 -699
- package/src/charts/categoryAxisFit.test.ts +0 -309
- package/src/charts/colorMath.test.ts +0 -196
- package/src/charts/comboChartOptions.test.ts +0 -426
- package/src/charts/components/ChartCard.cy.ts +0 -98
- package/src/charts/components/ChartContainer.cy.ts +0 -288
- package/src/charts/components/ChartLegend.cy.ts +0 -178
- package/src/charts/components/ChartTooltip.cy.ts +0 -199
- package/src/charts/core/useAxisChart.test.ts +0 -127
- package/src/charts/core/useChart.test.ts +0 -32
- package/src/charts/core/usePlotKeyboard.test.ts +0 -347
- package/src/charts/donutChartOptions.test.ts +0 -325
- package/src/charts/format.test.ts +0 -258
- package/src/charts/funnelGeometry.test.ts +0 -219
- package/src/charts/heatmapOptions.test.ts +0 -493
- package/src/charts/hiddenSeries.test.ts +0 -47
- package/src/charts/lineChartOptions.test.ts +0 -348
- package/src/charts/measureText.test.ts +0 -79
- package/src/charts/normalizedStackOptions.test.ts +0 -500
- package/src/charts/numberCardFormat.test.ts +0 -96
- package/src/charts/paletteColors.test.ts +0 -123
- package/src/charts/referenceLines.test.ts +0 -367
- package/src/charts/sankeyOptions.test.ts +0 -350
- package/src/charts/scatterOptions.test.ts +0 -677
- package/src/charts/seriesData.test.ts +0 -484
- package/src/charts/sparkline.test.ts +0 -139
- package/src/charts/stories/AreaLatency.vue +0 -33
- package/src/charts/stories/AreaStacked.vue +0 -39
- package/src/charts/stories/BarCombo.vue +0 -37
- package/src/charts/stories/BarGrouped.vue +0 -40
- package/src/charts/stories/BarHorizontal.vue +0 -30
- package/src/charts/stories/BarSelect.vue +0 -38
- package/src/charts/stories/BarShares.vue +0 -62
- package/src/charts/stories/BarStackedLong.vue +0 -34
- package/src/charts/stories/BarTarget.vue +0 -32
- package/src/charts/stories/CustomRadar.vue +0 -101
- package/src/charts/stories/Dashboard.vue +0 -418
- package/src/charts/stories/DonutHalf.vue +0 -25
- package/src/charts/stories/DonutOthers.vue +0 -44
- package/src/charts/stories/DonutShare.vue +0 -28
- package/src/charts/stories/FunnelDeals.vue +0 -36
- package/src/charts/stories/FunnelStages.vue +0 -27
- package/src/charts/stories/HeatmapDemand.vue +0 -45
- package/src/charts/stories/HeatmapSignups.vue +0 -37
- package/src/charts/stories/HeatmapTickets.vue +0 -37
- package/src/charts/stories/LineDualAxis.vue +0 -38
- package/src/charts/stories/LineFilledSeries.vue +0 -33
- package/src/charts/stories/LineGaps.vue +0 -49
- package/src/charts/stories/LineNumericAxis.vue +0 -44
- package/src/charts/stories/LineThresholds.vue +0 -36
- package/src/charts/stories/LineTooltipColumns.vue +0 -44
- package/src/charts/stories/LineTrend.vue +0 -37
- package/src/charts/stories/NumberKpis.vue +0 -77
- package/src/charts/stories/NumberSparklines.vue +0 -58
- package/src/charts/stories/SankeySignups.vue +0 -28
- package/src/charts/stories/SankeySpend.vue +0 -30
- package/src/charts/stories/ScatterMarkets.vue +0 -60
- package/src/charts/stories/ScatterQuadrants.vue +0 -37
- package/src/charts/stories/ScatterSpend.vue +0 -36
- package/src/charts/stories/States.vue +0 -124
- package/src/charts/stories/StatesRecovery.vue +0 -76
- package/src/charts/stories/TooltipCustom.vue +0 -108
- package/src/charts/tokens.test.ts +0 -56
- package/src/charts/tooltipItems.test.ts +0 -261
- package/src/charts/utils.test.ts +0 -50
- package/src/charts/valueAxisOptions.test.ts +0 -281
- package/src/components/Alert/Alert.cy.ts +0 -205
- package/src/components/Alert/Alert.playground.vue +0 -92
- package/src/components/Alert/stories/Banners.vue +0 -71
- package/src/components/Alert/stories/DismissibleBanner.vue +0 -34
- package/src/components/Alert/stories/DismissibleRows.vue +0 -41
- package/src/components/Alert/stories/ImportProgress.vue +0 -42
- package/src/components/Alert/stories/ThemedRows.vue +0 -38
- package/src/components/Avatar/Avatar.cy.ts +0 -84
- package/src/components/Avatar/Avatar.playground.vue +0 -68
- package/src/components/Avatar/stories/Shapes.vue +0 -12
- package/src/components/Avatar/stories/Sizes.vue +0 -10
- package/src/components/Avatar/stories/Themes.vue +0 -23
- package/src/components/Badge/Badge.cy.ts +0 -373
- package/src/components/Badge/Badge.playground.vue +0 -89
- package/src/components/Badge/stories/CallMeta.vue +0 -35
- package/src/components/Badge/stories/EventStatus.vue +0 -16
- package/src/components/Badge/stories/ListStatus.vue +0 -91
- package/src/components/Badge/stories/Reactions.vue +0 -33
- package/src/components/Badge/stories/RowTags.vue +0 -39
- package/src/components/BottomSheet/BottomSheet.cy.ts +0 -153
- package/src/components/BottomSheet/BottomSheet.test.ts +0 -721
- package/src/components/BottomSheet/stories/Example.vue +0 -17
- package/src/components/BottomSheet/stories/NonDismissible.vue +0 -29
- package/src/components/BottomSheet/stories/Title.vue +0 -24
- package/src/components/Breadcrumbs/Breadcrumbs.cy.ts +0 -95
- package/src/components/Breadcrumbs/Breadcrumbs.playground.vue +0 -46
- package/src/components/Breadcrumbs/stories/Example.vue +0 -13
- package/src/components/Breadcrumbs/stories/Slots.vue +0 -21
- package/src/components/Button/Button.cy.ts +0 -259
- package/src/components/Button/Button.playground.vue +0 -93
- package/src/components/Button/Button.test.ts +0 -49
- package/src/components/Button/stories/InlineActions.vue +0 -10
- package/src/components/Button/stories/LiveClassCard.vue +0 -34
- package/src/components/Button/stories/SectionAction.vue +0 -17
- package/src/components/Button/stories/SectionControls.vue +0 -28
- package/src/components/Button/stories/SelectionToolbar.vue +0 -20
- package/src/components/Button/stories/StackedActions.vue +0 -10
- package/src/components/Checkbox/Checkbox.cy.ts +0 -290
- package/src/components/Checkbox/Checkbox.playground.vue +0 -61
- package/src/components/Checkbox/Checkbox.test.ts +0 -29
- package/src/components/Checkbox/stories/HorizontalGroup.vue +0 -24
- package/src/components/Checkbox/stories/Indeterminate.vue +0 -51
- package/src/components/Checkbox/stories/MemberList.vue +0 -27
- package/src/components/Checkbox/stories/SettingRow.vue +0 -23
- package/src/components/Checkbox/stories/SettingsList.vue +0 -24
- package/src/components/Checkbox/stories/States.vue +0 -12
- package/src/components/Checkbox/stories/WithDescription.vue +0 -27
- package/src/components/Combobox/Combobox.cy.ts +0 -1405
- package/src/components/Combobox/Combobox.playground.vue +0 -91
- package/src/components/Combobox/stories/Clearable.vue +0 -151
- package/src/components/Combobox/stories/CreateNew.vue +0 -92
- package/src/components/Combobox/stories/EmojiPicker.vue +0 -52
- package/src/components/Combobox/stories/Footer.vue +0 -75
- package/src/components/Combobox/stories/Grouped.vue +0 -55
- package/src/components/Combobox/stories/InDialog.vue +0 -92
- package/src/components/Combobox/stories/Labeling.vue +0 -38
- package/src/components/Combobox/stories/MemberPicker.vue +0 -129
- package/src/components/Combobox/stories/SearchSlots.vue +0 -53
- package/src/components/Combobox/stories/ServerSearch.vue +0 -169
- package/src/components/Combobox/stories/Simple.vue +0 -32
- package/src/components/Combobox/stories/StatusPicker.vue +0 -98
- package/src/components/ContextMenu/ContextMenu.cy.ts +0 -380
- package/src/components/ContextMenu/stories/FileList.vue +0 -105
- package/src/components/ContextMenu/stories/Groups.vue +0 -95
- package/src/components/ContextMenu/stories/Simple.vue +0 -72
- package/src/components/DatePicker/DateCalendar.cy.ts +0 -149
- package/src/components/DatePicker/DatePicker.cy.ts +0 -488
- package/src/components/DatePicker/DateRangeCalendar.cy.ts +0 -186
- package/src/components/DatePicker/DateRangePicker.cy.ts +0 -430
- package/src/components/DatePicker/DateTimePicker.cy.ts +0 -273
- package/src/components/DatePicker/stories/DateCalendar.vue +0 -18
- package/src/components/DatePicker/stories/DateRangeCalendar.vue +0 -27
- package/src/components/DatePicker/stories/DateTime.vue +0 -119
- package/src/components/DatePicker/stories/Examples.vue +0 -152
- package/src/components/DatePicker/stories/Range.vue +0 -278
- package/src/components/DesktopShell/DesktopShell.cy.ts +0 -110
- package/src/components/DesktopShell/stories/Default.vue +0 -143
- package/src/components/Dialog/Dialog.cy.ts +0 -679
- package/src/components/Dialog/Dialog.playground.vue +0 -89
- package/src/components/Dialog/stories/CommandPalette.vue +0 -152
- package/src/components/Dialog/stories/Imperative.vue +0 -242
- package/src/components/Dialog/stories/Prompt.vue +0 -195
- package/src/components/Dialog/stories/Share.vue +0 -134
- package/src/components/Dialog/stories/Wizard.vue +0 -129
- package/src/components/Divider/Divider.cy.ts +0 -101
- package/src/components/Divider/Divider.playground.vue +0 -67
- package/src/components/Divider/stories/Action.vue +0 -34
- package/src/components/Divider/stories/Examples.vue +0 -25
- package/src/components/Dropdown/Dropdown.cy.ts +0 -382
- package/src/components/Dropdown/Dropdown.playground.vue +0 -62
- package/src/components/Dropdown/stories/KebabMenu.vue +0 -80
- package/src/components/Dropdown/stories/Shortcuts.vue +0 -42
- package/src/components/Dropdown/stories/Simple.vue +0 -38
- package/src/components/Dropdown/stories/Submenus.vue +0 -69
- package/src/components/Dropdown/stories/Switches.vue +0 -44
- package/src/components/Dropdown/stories/UserMenu.vue +0 -145
- package/src/components/Duration/Duration.cy.ts +0 -251
- package/src/components/Duration/Duration.playground.vue +0 -96
- package/src/components/Duration/stories/Default.vue +0 -10
- package/src/components/Duration/stories/Formats.vue +0 -16
- package/src/components/Duration/stories/RealWorld.vue +0 -50
- package/src/components/Duration/stories/Sizes.vue +0 -15
- package/src/components/Duration/stories/States.vue +0 -21
- package/src/components/ErrorMessage/ErrorMessage.cy.ts +0 -15
- package/src/components/ErrorMessage/ErrorMessage.playground.vue +0 -25
- package/src/components/ErrorMessage/ErrorMessage.test.ts +0 -101
- package/src/components/ErrorMessage/stories/ErrorObject.vue +0 -15
- package/src/components/ErrorMessage/stories/Examples.vue +0 -10
- package/src/components/ErrorMessage/stories/SeveralMessages.vue +0 -12
- package/src/components/FileUploader/FileUploader.cy.ts +0 -146
- package/src/components/FileUploader/stories/Examples.vue +0 -29
- package/src/components/FormControl/FormControl.cy.ts +0 -324
- package/src/components/FormControl/FormControl.playground.vue +0 -90
- package/src/components/FormControl/stories/RealForm.vue +0 -202
- package/src/components/FormLabel/FormLabel.cy.ts +0 -77
- package/src/components/FormLabel/FormLabel.playground.vue +0 -32
- package/src/components/FormLabel/stories/Default.vue +0 -7
- package/src/components/FormLabel/stories/Required.vue +0 -7
- package/src/components/FrappeUIProvider/FrappeUIProvider.cy.ts +0 -85
- package/src/components/FrappeUIProvider/stories/Default.vue +0 -20
- package/src/components/HoverCard/HoverCard.cy.ts +0 -229
- package/src/components/HoverCard/stories/Arrow.vue +0 -28
- package/src/components/HoverCard/stories/Delays.vue +0 -16
- package/src/components/HoverCard/stories/Example.vue +0 -28
- package/src/components/Icon/Icon.cy.ts +0 -110
- package/src/components/Icon/stories/ComponentIcon.vue +0 -24
- package/src/components/Icon/stories/Lucide.vue +0 -12
- package/src/components/ItemListRow/ItemListRow.cy.ts +0 -78
- package/src/components/ItemListRow/stories/RowStates.vue +0 -35
- package/src/components/KeyboardShortcut/KeyboardShortcut.cy.ts +0 -120
- package/src/components/KeyboardShortcut/KeyboardShortcut.playground.vue +0 -33
- package/src/components/KeyboardShortcut/KeyboardShortcut.spec.ts +0 -252
- package/src/components/KeyboardShortcut/stories/Default.vue +0 -11
- package/src/components/KeyboardShortcutsDialog/KeyboardShortcutsDialog.cy.ts +0 -138
- package/src/components/KeyboardShortcutsDialog/KeyboardShortcutsDialog.spec.ts +0 -152
- package/src/components/KeyboardShortcutsDialog/stories/CustomLayout.vue +0 -60
- package/src/components/KeyboardShortcutsDialog/stories/Default.vue +0 -82
- package/src/components/LoadingIndicator/LoadingIndicator.cy.ts +0 -27
- package/src/components/LoadingIndicator/stories/Scale.vue +0 -11
- package/src/components/LoadingText/LoadingText.cy.ts +0 -21
- package/src/components/LoadingText/stories/Default.vue +0 -10
- package/src/components/Menu/types.test.ts +0 -49
- package/src/components/MobileNav/MobileNav.cy.ts +0 -102
- package/src/components/MobileNav/stories/Default.vue +0 -42
- package/src/components/MobileShell/MobileShell.cy.ts +0 -87
- package/src/components/MobileShell/stories/Default.vue +0 -107
- package/src/components/MultiSelect/MultiSelect.cy.ts +0 -589
- package/src/components/MultiSelect/MultiSelect.playground.vue +0 -80
- package/src/components/MultiSelect/stories/AsyncOptions.vue +0 -217
- package/src/components/MultiSelect/stories/Example.vue +0 -25
- package/src/components/MultiSelect/stories/Footer.vue +0 -40
- package/src/components/MultiSelect/stories/Grouped.vue +0 -42
- package/src/components/MultiSelect/stories/Labeling.vue +0 -40
- package/src/components/MultiSelect/stories/Members.vue +0 -114
- package/src/components/MultiSelect/stories/Options.vue +0 -32
- package/src/components/MultiSelect/stories/SearchSlots.vue +0 -52
- package/src/components/MultiSelect/stories/Summary.vue +0 -35
- package/src/components/MultiSelect/stories/TagsTrigger.vue +0 -82
- package/src/components/MultiSelect/stories/TriggerSlot.vue +0 -36
- package/src/components/PageHeader/PageHeader.cy.ts +0 -175
- package/src/components/PageHeader/stories/Default.vue +0 -19
- package/src/components/PageHeader/stories/Mobile.vue +0 -24
- package/src/components/PageHeader/useHeaderBack.test.ts +0 -105
- package/src/components/Password/Password.cy.ts +0 -125
- package/src/components/Password/Password.playground.vue +0 -68
- package/src/components/Password/stories/Default.vue +0 -10
- package/src/components/Password/stories/Labeling.vue +0 -30
- package/src/components/Password/stories/Sizes.vue +0 -12
- package/src/components/Password/stories/States.vue +0 -16
- package/src/components/Password/stories/Variants.vue +0 -11
- package/src/components/Popover/Popover.cy.ts +0 -446
- package/src/components/Popover/stories/Arrow.vue +0 -16
- package/src/components/Popover/stories/Bare.vue +0 -20
- package/src/components/Popover/stories/Click.vue +0 -17
- package/src/components/Popover/stories/Controlled.vue +0 -22
- package/src/components/Popover/stories/Dismissible.vue +0 -19
- package/src/components/Popover/stories/MatchTriggerWidth.vue +0 -16
- package/src/components/Popover/stories/SideAlign.vue +0 -17
- package/src/components/Popover/stories/Typeahead.vue +0 -66
- package/src/components/Progress/Progress.cy.ts +0 -150
- package/src/components/Progress/Progress.playground.vue +0 -48
- package/src/components/Progress/stories/Animated.vue +0 -38
- package/src/components/Progress/stories/MultiStepForm.vue +0 -65
- package/src/components/Progress/stories/Onboarding.vue +0 -108
- package/src/components/Progress/stories/Sizes.vue +0 -12
- package/src/components/Progress/stories/Storage.vue +0 -33
- package/src/components/Radio/Radio.cy.ts +0 -388
- package/src/components/Radio/Radio.playground.vue +0 -78
- package/src/components/Radio/stories/Required.vue +0 -14
- package/src/components/Radio/stories/SettingsList.vue +0 -18
- package/src/components/Radio/stories/States.vue +0 -28
- package/src/components/Rating/Rating.cy.ts +0 -373
- package/src/components/Rating/Rating.playground.vue +0 -57
- package/src/components/Rating/stories/CustomIcon.vue +0 -31
- package/src/components/Rating/stories/CustomSlot.vue +0 -39
- package/src/components/Rating/stories/Default.vue +0 -10
- package/src/components/Rating/stories/HalfStep.vue +0 -10
- package/src/components/Rating/stories/Labeling.vue +0 -30
- package/src/components/Rating/stories/Sizes.vue +0 -12
- package/src/components/Rating/stories/States.vue +0 -16
- package/src/components/ScrollArea/ScrollArea.cy.ts +0 -73
- package/src/components/ScrollArea/stories/Default.vue +0 -19
- package/src/components/Select/Select.cy.ts +0 -698
- package/src/components/Select/Select.playground.vue +0 -79
- package/src/components/Select/stories/CustomTrigger.vue +0 -43
- package/src/components/Select/stories/Example.vue +0 -25
- package/src/components/Select/stories/Footer.vue +0 -68
- package/src/components/Select/stories/Labeling.vue +0 -29
- package/src/components/Select/stories/OptionSlot.vue +0 -77
- package/src/components/Select/types.test.ts +0 -25
- package/src/components/SettingsDialog/SettingsDialog.cy.ts +0 -209
- package/src/components/SettingsDialog/SettingsPanel.cy.ts +0 -77
- package/src/components/SettingsDialog/stories/Default.vue +0 -99
- package/src/components/SettingsDialog/stories/PanelBasic.vue +0 -52
- package/src/components/SettingsDialog/stories/panels/NotificationsPanel.vue +0 -57
- package/src/components/SettingsDialog/stories/panels/PreferencesPanel.vue +0 -57
- package/src/components/SettingsDialog/stories/panels/ProfilePanel.vue +0 -38
- package/src/components/SettingsDialog/stories/panels/UsersPanel.vue +0 -83
- package/src/components/Sidebar/Sidebar.cy.ts +0 -392
- package/src/components/Sidebar/stories/Card.vue +0 -81
- package/src/components/Sidebar/stories/Collapsed.vue +0 -40
- package/src/components/Sidebar/stories/Default.vue +0 -153
- package/src/components/Sidebar/stories/Section.vue +0 -52
- package/src/components/SidebarRail/SidebarRail.cy.ts +0 -193
- package/src/components/SidebarRail/stories/Default.vue +0 -44
- package/src/components/Skeleton/Skeleton.cy.ts +0 -21
- package/src/components/Skeleton/stories/Card.vue +0 -12
- package/src/components/Skeleton/stories/List.vue +0 -15
- package/src/components/Skeleton/stories/Text.vue +0 -11
- package/src/components/Slider/Slider.cy.ts +0 -577
- package/src/components/Slider/Slider.playground.vue +0 -65
- package/src/components/Slider/stories/Default.vue +0 -12
- package/src/components/Slider/stories/Labeling.vue +0 -31
- package/src/components/Slider/stories/NegativeValues.vue +0 -12
- package/src/components/Slider/stories/Range.vue +0 -13
- package/src/components/Slider/stories/Sizes.vue +0 -14
- package/src/components/Slider/stories/States.vue +0 -18
- package/src/components/Slider/stories/ValueCommit.vue +0 -29
- package/src/components/Spinner/Spinner.cy.ts +0 -87
- package/src/components/Spinner/stories/InContext.vue +0 -49
- package/src/components/Spinner/stories/Sizes.vue +0 -12
- package/src/components/Spinner/stories/Themes.vue +0 -10
- package/src/components/Spinner/stories/Track.vue +0 -12
- package/src/components/Switch/Switch.cy.ts +0 -277
- package/src/components/Switch/Switch.playground.vue +0 -78
- package/src/components/Switch/stories/Icons.vue +0 -15
- package/src/components/Switch/stories/SettingsRows.vue +0 -33
- package/src/components/Switch/stories/States.vue +0 -12
- package/src/components/Switch/stories/Toolbar.vue +0 -14
- package/src/components/TabButtons/TabButtons.cy.ts +0 -296
- package/src/components/TabButtons/TabButtons.playground.vue +0 -113
- package/src/components/TabButtons/stories/Filter.vue +0 -16
- package/src/components/TabButtons/stories/Fluid.vue +0 -19
- package/src/components/TabButtons/stories/InspectorRows.vue +0 -87
- package/src/components/TabButtons/stories/PrefixSuffix.vue +0 -65
- package/src/components/TabButtons/stories/SettingsRows.vue +0 -43
- package/src/components/TabButtons/stories/Sizes.vue +0 -26
- package/src/components/TabButtons/stories/Toolbar.vue +0 -35
- package/src/components/TabButtons/stories/Variants.vue +0 -40
- package/src/components/TabButtons/stories/Vertical.vue +0 -64
- package/src/components/TabButtons/stories/ViewToggle.vue +0 -23
- package/src/components/Tabs/Tabs.cy.ts +0 -1315
- package/src/components/Tabs/Tabs.playground.vue +0 -92
- package/src/components/Tabs/Tabs.resizeobserver.cy.ts +0 -216
- package/src/components/Tabs/Tabs.test.ts +0 -26
- package/src/components/Tabs/stories/BrowserTabCounts.vue +0 -29
- package/src/components/Tabs/stories/BrowserTabTable.vue +0 -107
- package/src/components/Tabs/stories/Disabled.vue +0 -27
- package/src/components/Tabs/stories/IconRail.vue +0 -32
- package/src/components/Tabs/stories/Prefix.vue +0 -36
- package/src/components/Tabs/stories/RouteMode.vue +0 -27
- package/src/components/Tabs/stories/Shorthand.vue +0 -42
- package/src/components/Tabs/stories/Sizes.vue +0 -44
- package/src/components/Tabs/stories/Underline.vue +0 -36
- package/src/components/Tabs/stories/VerticalBrowserTab.vue +0 -51
- package/src/components/TextInput/TextInput.cy.ts +0 -451
- package/src/components/TextInput/TextInput.playground.vue +0 -116
- package/src/components/TextInput/stories/Default.vue +0 -10
- package/src/components/TextInput/stories/Labeling.vue +0 -30
- package/src/components/TextInput/stories/PrefixSuffix.vue +0 -28
- package/src/components/TextInput/stories/Sizes.vue +0 -12
- package/src/components/TextInput/stories/Slots.vue +0 -15
- package/src/components/TextInput/stories/States.vue +0 -16
- package/src/components/TextInput/stories/Types.vue +0 -17
- package/src/components/TextInput/stories/Variants.vue +0 -11
- package/src/components/Textarea/Textarea.cy.ts +0 -278
- package/src/components/Textarea/Textarea.playground.vue +0 -77
- package/src/components/Textarea/stories/Default.vue +0 -10
- package/src/components/Textarea/stories/Labeling.vue +0 -30
- package/src/components/Textarea/stories/Sizes.vue +0 -12
- package/src/components/Textarea/stories/States.vue +0 -16
- package/src/components/Textarea/stories/Variants.vue +0 -11
- package/src/components/TimePicker/TimePicker.cy.ts +0 -423
- package/src/components/TimePicker/stories/Basic.vue +0 -26
- package/src/components/TimePicker/stories/CustomOptions.vue +0 -27
- package/src/components/TimePicker/stories/Labeling.vue +0 -21
- package/src/components/TimePicker/stories/Range.vue +0 -45
- package/src/components/TimePicker/stories/SizesAndVariants.vue +0 -23
- package/src/components/TimePicker/stories/TwentyFour.vue +0 -23
- package/src/components/Toast/Toast.cy.ts +0 -99
- package/src/components/Toast/Toast.sanitize.test.ts +0 -108
- package/src/components/Toast/Toast.test.ts +0 -109
- package/src/components/Toast/stories/Actions.vue +0 -39
- package/src/components/Toast/stories/Async.vue +0 -70
- package/src/components/Toast/stories/CustomIcon.vue +0 -29
- package/src/components/Toast/stories/Examples.vue +0 -40
- package/src/components/Toast/stories/Quickstart.vue +0 -7
- package/src/components/Tooltip/Tooltip.cy.ts +0 -130
- package/src/components/Tooltip/Tooltip.playground.vue +0 -51
- package/src/components/Tooltip/stories/Examples.vue +0 -9
- package/src/components/Tooltip/stories/Group.vue +0 -22
- package/src/components/Tooltip/stories/Slots.vue +0 -28
- package/src/components/Tree/stories/DragDrop.vue +0 -94
- package/src/components/Tree/stories/Example.vue +0 -40
- package/src/components/Tree/stories/ExpandAll.vue +0 -48
- package/src/components/Tree/stories/Guides.vue +0 -49
- package/src/components/Tree/stories/ListView.vue +0 -74
- package/src/components/Tree/tree.cy.ts +0 -309
- package/src/components/shared/selection/utils.test.ts +0 -93
- package/src/components/shared/slotReactivity.cy.ts +0 -398
- package/src/composables/useColorScheme.spec.ts +0 -406
- package/src/composables/useKeyboardShortcut.spec.ts +0 -1202
- package/src/composables/usePortalTarget.spec.ts +0 -225
- package/src/composables/useShellScrolled.spec.ts +0 -310
- package/src/data-fetching/docStore.test.ts +0 -222
- package/src/data-fetching/staleWrites.test.ts +0 -628
- package/src/data-fetching/useAction.test.ts +0 -122
- package/src/data-fetching/useCall/useCall.test.ts +0 -709
- package/src/data-fetching/useDoc/useDoc.test.ts +0 -468
- package/src/data-fetching/useDoctype/useDoctype.test.ts +0 -443
- package/src/data-fetching/useList/useList.test.ts +0 -407
- package/src/data-fetching/useNewDoc/useNewDoc.test.ts +0 -172
- package/src/data-fetching/writeGate.test.ts +0 -96
- package/src/exports.test.ts +0 -191
- package/src/mocks/handlers.ts +0 -255
- package/src/mocks/node.ts +0 -4
- package/src/mocks/utils.ts +0 -26
- package/src/molecules/editor/Editor.cy.ts +0 -146
- package/src/molecules/editor/Editor.test.ts +0 -265
- package/src/molecules/editor/components/EditorDropZone.test.ts +0 -106
- package/src/molecules/editor/components/MediaNodeView.test.ts +0 -213
- package/src/molecules/editor/components/MediaResizeHandle.test.ts +0 -81
- package/src/molecules/editor/components/VideoControls.test.ts +0 -235
- package/src/molecules/editor/components/media-node-view-utils.test.ts +0 -57
- package/src/molecules/editor/composables/useNodeViewResize.test.ts +0 -296
- package/src/molecules/editor/exports.test.ts +0 -43
- package/src/molecules/editor/extensions/attachment/attachment.flow.test.ts +0 -56
- package/src/molecules/editor/extensions/attachment/attachment.roundtrip.test.ts +0 -50
- package/src/molecules/editor/extensions/code-block/code-block-indent.test.ts +0 -44
- package/src/molecules/editor/extensions/content-paste/paste-image-controller.test.ts +0 -86
- package/src/molecules/editor/extensions/iframe/IframeNodeView.test.ts +0 -115
- package/src/molecules/editor/extensions/iframe/iframe-extension.test.ts +0 -72
- package/src/molecules/editor/extensions/image/image-caption.test.ts +0 -166
- package/src/molecules/editor/extensions/image-group/image-group-utils.test.ts +0 -99
- package/src/molecules/editor/extensions/link/exit-link-on-space-plugin.test.ts +0 -237
- package/src/molecules/editor/extensions/link/link-popup-controller.test.ts +0 -49
- package/src/molecules/editor/extensions/list/list-join.test.ts +0 -446
- package/src/molecules/editor/extensions/media-drop/media-drop-extension.test.ts +0 -114
- package/src/molecules/editor/extensions/mention/mention-extension.test.ts +0 -150
- package/src/molecules/editor/extensions/shared/color-palette.test.ts +0 -173
- package/src/molecules/editor/extensions/shared/media-plugin.test.ts +0 -60
- package/src/molecules/editor/extensions/shared/media-upload-engine.test.ts +0 -209
- package/src/molecules/editor/extensions/shared/node-view.test.ts +0 -43
- package/src/molecules/editor/extensions/shared/suggestion-open.test.ts +0 -361
- package/src/molecules/editor/extensions/shared/suggestion-renderer.test.ts +0 -156
- package/src/molecules/editor/extensions/slash-commands/slash-commands-extension.test.ts +0 -38
- package/src/molecules/editor/kits.test.ts +0 -168
- package/src/molecules/editor/menu.test.ts +0 -308
- package/src/molecules/editor/stories/Comment.vue +0 -105
- package/src/molecules/editor/stories/Inline.vue +0 -28
- package/src/molecules/editor/stories/Primitives.vue +0 -73
- package/src/molecules/editor/stories/RichText.vue +0 -129
- package/src/molecules/editor/test-helpers.ts +0 -103
- package/src/molecules/editor/useEditor.test.ts +0 -472
- package/src/molecules/list/List.cy.ts +0 -1189
- package/src/molecules/list/List.ssr.test.ts +0 -59
- package/src/molecules/list/stories/Columns.vue +0 -109
- package/src/molecules/list/stories/Feed.vue +0 -108
- package/src/molecules/list/stories/Responsive.vue +0 -56
- package/src/molecules/list/stories/RowActions.vue +0 -123
- package/src/molecules/list/stories/Virtual.vue +0 -31
- package/src/resources/documentResource.test.ts +0 -111
- package/src/resources/listResource.test.ts +0 -197
- package/src/resources/resources.test.ts +0 -45
- package/src/utils/call.test.ts +0 -181
- package/src/utils/dialog.cy.ts +0 -596
- package/src/utils/errorLines.test.ts +0 -50
- package/src/utils/fileUploadHandler.test.ts +0 -97
- package/src/utils/frappeRequest.test.ts +0 -246
- package/src/utils/iconString.test.ts +0 -71
- package/src/utils/moduleSingleton.test.ts +0 -45
- package/src/utils/plugin.test.ts +0 -203
- package/src/utils/resolvePropValue.test.ts +0 -117
- package/src/utils/tailwind.config.js +0 -6
- package/src/utils/useFileUpload.test.ts +0 -223
- package/src/utils/vnode.test.ts +0 -86
- package/tailwind/figma-tokens-to-theme.test.js +0 -22
- package/tailwind/listColumns.test.js +0 -358
- package/tailwind/migrate-tokens-v2.test.js +0 -528
- package/vitepress/components/Docs/OnThisPage.test.ts +0 -90
|
@@ -59,7 +59,9 @@
|
|
|
59
59
|
tooltip="Expand"
|
|
60
60
|
@click="expandFromTray"
|
|
61
61
|
>
|
|
62
|
-
<template #icon
|
|
62
|
+
<template #icon
|
|
63
|
+
><span class="lucide-maximize-2 h-4 w-4"
|
|
64
|
+
/></template>
|
|
63
65
|
</Button>
|
|
64
66
|
<Button
|
|
65
67
|
v-else
|
|
@@ -68,7 +70,7 @@
|
|
|
68
70
|
tooltip="Minimize"
|
|
69
71
|
@click="minimize"
|
|
70
72
|
>
|
|
71
|
-
<template #icon><
|
|
73
|
+
<template #icon><span class="lucide-minus h-4 w-4" /></template>
|
|
72
74
|
</Button>
|
|
73
75
|
</template>
|
|
74
76
|
<!-- Expand to a floating window when docked; close (dock back) once
|
|
@@ -80,9 +82,9 @@
|
|
|
80
82
|
@click="isDocked ? float() : dock()"
|
|
81
83
|
>
|
|
82
84
|
<template #icon>
|
|
83
|
-
<
|
|
84
|
-
:is="isDocked ? LucideMaximize2 : LucideX"
|
|
85
|
+
<span
|
|
85
86
|
class="h-4 w-4"
|
|
87
|
+
:class="isDocked ? 'lucide-maximize-2' : 'lucide-x'"
|
|
86
88
|
/>
|
|
87
89
|
</template>
|
|
88
90
|
</Button>
|
|
@@ -129,9 +131,6 @@
|
|
|
129
131
|
|
|
130
132
|
<script setup lang="ts">
|
|
131
133
|
import { computed, ref, watch } from 'vue'
|
|
132
|
-
import LucideX from '~icons/lucide/x'
|
|
133
|
-
import LucideMinus from '~icons/lucide/minus'
|
|
134
|
-
import LucideMaximize2 from '~icons/lucide/maximize-2'
|
|
135
134
|
import { Button } from '#components/Button'
|
|
136
135
|
import { usePortalTarget } from '#composables/usePortalTarget'
|
|
137
136
|
import { useFloatingWindow } from './useFloatingWindow'
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { h, type FunctionalComponent } from 'vue'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Wrap a `lucide-<name>` class icon in the component shape this family expects.
|
|
5
|
+
*
|
|
6
|
+
* The v0 toolbars and slash-command lists store an icon COMPONENT on each
|
|
7
|
+
* command object and render it with `<component :is>`. frappe-ui draws icons
|
|
8
|
+
* from class names instead: the Tailwind plugin generates a `lucide-<name>`
|
|
9
|
+
* class for every lucide icon and paints it as a CSS mask in `currentColor`.
|
|
10
|
+
* This adapter keeps those call sites unchanged while removing the last
|
|
11
|
+
* `~icons/lucide/*` imports, which needed the `lucideIcons` Vite plugin.
|
|
12
|
+
*
|
|
13
|
+
* Every caller passes the class name as a literal, which is what Tailwind's
|
|
14
|
+
* scanner needs in order to emit the class. `experimental/TextEditor` is in
|
|
15
|
+
* the `content` globs exported from `frappe-ui/tailwind`.
|
|
16
|
+
*/
|
|
17
|
+
export function classIcon(name: string): FunctionalComponent {
|
|
18
|
+
// Vue merges a `class` passed at the call site onto this span, so
|
|
19
|
+
// `<component :is="icon" class="h-4 w-4" />` still works.
|
|
20
|
+
return () => h('span', { class: name })
|
|
21
|
+
}
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
import { defineAsyncComponent } from 'vue'
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
2
|
+
import { classIcon } from './classIcon'
|
|
3
|
+
const H1 = classIcon('lucide-heading-1')
|
|
4
|
+
const H2 = classIcon('lucide-heading-2')
|
|
5
|
+
const H3 = classIcon('lucide-heading-3')
|
|
6
|
+
const H4 = classIcon('lucide-heading-4')
|
|
7
|
+
const H5 = classIcon('lucide-heading-5')
|
|
8
|
+
const H6 = classIcon('lucide-heading-6')
|
|
9
|
+
const Text = classIcon('lucide-type')
|
|
10
|
+
const Underline = classIcon('lucide-underline')
|
|
11
|
+
const Italic = classIcon('lucide-italic')
|
|
12
|
+
const Bold = classIcon('lucide-bold')
|
|
13
|
+
const Strikethrough = classIcon('lucide-strikethrough')
|
|
14
|
+
const AlignLeft = classIcon('lucide-text-align-start')
|
|
15
|
+
const AlignRight = classIcon('lucide-text-align-end')
|
|
16
|
+
const AlignCenter = classIcon('lucide-text-align-center')
|
|
17
|
+
const FontColor = classIcon('lucide-paint-bucket')
|
|
18
|
+
const ListUnordered = classIcon('lucide-list')
|
|
19
|
+
const ListOrdered = classIcon('lucide-list-ordered')
|
|
20
|
+
const ListTask = classIcon('lucide-list-check')
|
|
21
|
+
const IndentList = classIcon('lucide-list-indent-increase')
|
|
22
|
+
const DedentList = classIcon('lucide-list-indent-decrease')
|
|
23
|
+
const DoubleQuotes = classIcon('lucide-quote')
|
|
24
|
+
const CodeView = classIcon('lucide-code')
|
|
25
|
+
const Link = classIcon('lucide-link-2')
|
|
26
|
+
const Image = classIcon('lucide-image-plus')
|
|
27
|
+
const GalleryVertical = classIcon('lucide-gallery-vertical')
|
|
28
|
+
const Video = classIcon('lucide-video')
|
|
29
|
+
const Undo = classIcon('lucide-undo-2')
|
|
30
|
+
const Redo = classIcon('lucide-redo-2')
|
|
31
|
+
const Separator = classIcon('lucide-separator-horizontal')
|
|
32
|
+
const Table = classIcon('lucide-table-properties')
|
|
33
|
+
const TableOfContentsIcon = classIcon('lucide-square-menu')
|
|
34
34
|
export default {
|
|
35
35
|
Paragraph: {
|
|
36
36
|
label: 'Paragraph',
|
|
@@ -178,15 +178,15 @@ import { useTouchHandler } from '#composables/useTouchHandler'
|
|
|
178
178
|
import { useImageNavigation } from '#composables/useImageNavigation'
|
|
179
179
|
import { useZoomPan } from '#composables/useZoomPan'
|
|
180
180
|
|
|
181
|
-
import
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
181
|
+
import { classIcon } from '../classIcon'
|
|
182
|
+
const LucideDownload = classIcon('lucide-download')
|
|
183
|
+
const LucideMaximize = classIcon('lucide-maximize')
|
|
184
|
+
const LucideMinimize = classIcon('lucide-minimize')
|
|
185
|
+
const LucideChevronLeft = classIcon('lucide-chevron-left')
|
|
186
|
+
const LucideChevronRight = classIcon('lucide-chevron-right')
|
|
187
|
+
const LucidePlus = classIcon('lucide-plus')
|
|
188
|
+
const LucideMinus = classIcon('lucide-minus')
|
|
189
|
+
const LucideX = classIcon('lucide-x')
|
|
190
190
|
interface ImageInfo {
|
|
191
191
|
src: string
|
|
192
192
|
alt: string | null
|
|
@@ -26,13 +26,13 @@
|
|
|
26
26
|
<Button
|
|
27
27
|
@click="submitLink"
|
|
28
28
|
tooltip="Submit"
|
|
29
|
-
|
|
29
|
+
icon="lucide-check"
|
|
30
30
|
variant="subtle"
|
|
31
31
|
/>
|
|
32
32
|
<Button
|
|
33
33
|
@click="props.href ? (edit = false) : $emit('updateHref', '')"
|
|
34
34
|
tooltip="Exit"
|
|
35
|
-
|
|
35
|
+
icon="lucide-x"
|
|
36
36
|
variant="subtle"
|
|
37
37
|
/>
|
|
38
38
|
</template>
|
|
@@ -40,20 +40,20 @@
|
|
|
40
40
|
<Button
|
|
41
41
|
@click="copyLink"
|
|
42
42
|
tooltip="Copy"
|
|
43
|
-
|
|
43
|
+
icon="lucide-copy"
|
|
44
44
|
variant="subtle"
|
|
45
45
|
/>
|
|
46
46
|
<Button
|
|
47
47
|
@click="edit = true"
|
|
48
48
|
tooltip="Edit"
|
|
49
|
-
|
|
49
|
+
icon="lucide-pencil"
|
|
50
50
|
variant="subtle"
|
|
51
51
|
/>
|
|
52
52
|
<Button
|
|
53
53
|
tooltip="Remove"
|
|
54
54
|
variant="subtle"
|
|
55
55
|
@click="$emit('updateHref', '')"
|
|
56
|
-
|
|
56
|
+
icon="lucide-link-2-off"
|
|
57
57
|
/>
|
|
58
58
|
</template>
|
|
59
59
|
</div>
|
|
@@ -64,11 +64,6 @@
|
|
|
64
64
|
import { onMounted, ref, useTemplateRef, nextTick } from 'vue'
|
|
65
65
|
import Button from '#components/Button/Button.vue'
|
|
66
66
|
import TextInput from '#components/TextInput/TextInput.vue'
|
|
67
|
-
import LucideCopy from '~icons/lucide/copy'
|
|
68
|
-
import LucideCheck from '~icons/lucide/check'
|
|
69
|
-
import LucidePencil from '~icons/lucide/pencil'
|
|
70
|
-
import LucideX from '~icons/lucide/x'
|
|
71
|
-
import Link2Off from '~icons/lucide/link-2-off'
|
|
72
67
|
import { isValidUrl } from '#utils/url-validation'
|
|
73
68
|
|
|
74
69
|
const props = defineProps<{
|
|
@@ -7,17 +7,17 @@ import { LoadingIndicator } from '#components/LoadingIndicator'
|
|
|
7
7
|
import Tooltip from '#components/Tooltip/Tooltip.vue'
|
|
8
8
|
import { localFileMap } from '../extensions/image/image-extension'
|
|
9
9
|
import { ErrorMessage } from '#components/ErrorMessage'
|
|
10
|
-
import
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
10
|
+
import { classIcon } from '../classIcon'
|
|
11
|
+
const LucideAlignLeft = classIcon('lucide-align-left')
|
|
12
|
+
const LucideAlignCenter = classIcon('lucide-align-center')
|
|
13
|
+
const LucideAlignRight = classIcon('lucide-align-right')
|
|
14
|
+
const LucideWrapText = classIcon('lucide-wrap-text')
|
|
15
|
+
const LucideFloatLeft = classIcon('lucide-align-horizontal-justify-start')
|
|
16
|
+
const LucideFloatRight = classIcon('lucide-align-horizontal-justify-end')
|
|
17
|
+
const LucideNoFloat = classIcon('lucide-align-vertical-space-around')
|
|
18
|
+
const LucideCaptions = classIcon('lucide-captions')
|
|
19
|
+
const LucideMoveDiagonal2 = classIcon('lucide-move-diagonal-2')
|
|
20
|
+
const LucideRotateCw = classIcon('lucide-rotate-cw')
|
|
21
21
|
const props = defineProps(nodeViewProps)
|
|
22
22
|
|
|
23
23
|
const mediaRef = ref<HTMLImageElement | HTMLVideoElement | null>(null)
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
import { ref, onMounted, computed, nextTick } from 'vue'
|
|
4
4
|
import { NodeViewWrapper, nodeViewProps } from '@tiptap/vue-3'
|
|
5
5
|
import { detectPlatform, calculateAspectRatio } from './utils'
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
import { classIcon } from '../../classIcon'
|
|
7
|
+
const LucideMoveDiagonal2 = classIcon('lucide-move-diagonal-2')
|
|
8
|
+
const LucideAlignLeft = classIcon('lucide-align-left')
|
|
9
|
+
const LucideAlignCenter = classIcon('lucide-align-center')
|
|
10
|
+
const LucideAlignRight = classIcon('lucide-align-right')
|
|
11
11
|
const props = defineProps(nodeViewProps)
|
|
12
12
|
|
|
13
13
|
const iframeRef = ref<HTMLIFrameElement | null>(null)
|
|
@@ -49,8 +49,9 @@
|
|
|
49
49
|
import { computed, ref, onMounted, onUnmounted } from 'vue'
|
|
50
50
|
import { NodeViewWrapper, type Editor } from '@tiptap/vue-3'
|
|
51
51
|
import type { NodeViewProps } from '@tiptap/vue-3'
|
|
52
|
-
import
|
|
53
|
-
|
|
52
|
+
import { classIcon } from '../../classIcon'
|
|
53
|
+
const LucideX = classIcon('lucide-x')
|
|
54
|
+
const LucideEdit = classIcon('lucide-edit')
|
|
54
55
|
import Button from '#components/Button/Button.vue'
|
|
55
56
|
import Select from '#components/Select/Select.vue'
|
|
56
57
|
import ImageViewerModal from '../../components/ImageViewerModal.vue'
|
|
@@ -267,9 +267,9 @@ import Button from '#components/Button/Button.vue'
|
|
|
267
267
|
import Select from '#components/Select/Select.vue'
|
|
268
268
|
import type { Editor } from '@tiptap/vue-3'
|
|
269
269
|
import type { UploadedFile } from '#utils/useFileUpload'
|
|
270
|
-
import
|
|
271
|
-
|
|
272
|
-
|
|
270
|
+
import { classIcon } from '../../classIcon'
|
|
271
|
+
const LucideX = classIcon('lucide-x')
|
|
272
|
+
const LucideImagePlus = classIcon('lucide-image-plus')
|
|
273
273
|
interface UploadResult {
|
|
274
274
|
success: boolean
|
|
275
275
|
file?: UploadedFile
|
|
@@ -7,21 +7,21 @@ import {
|
|
|
7
7
|
import SlashCommandsList from './SlashCommandsList.vue'
|
|
8
8
|
import { Component as VueComponent } from 'vue'
|
|
9
9
|
|
|
10
|
-
import
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
10
|
+
import { classIcon } from '../../classIcon'
|
|
11
|
+
const Heading2 = classIcon('lucide-heading-2')
|
|
12
|
+
const Heading3 = classIcon('lucide-heading-3')
|
|
13
|
+
const List = classIcon('lucide-list')
|
|
14
|
+
const ListOrdered = classIcon('lucide-list-ordered')
|
|
15
|
+
const ListTask = classIcon('lucide-list-checks')
|
|
16
|
+
const Code = classIcon('lucide-code')
|
|
17
|
+
const Quote = classIcon('lucide-quote')
|
|
18
|
+
const Image = classIcon('lucide-image')
|
|
19
|
+
const Video = classIcon('lucide-video')
|
|
20
|
+
const GalleryVertical = classIcon('lucide-gallery-vertical')
|
|
21
|
+
const Link = classIcon('lucide-link')
|
|
22
|
+
const Minus = classIcon('lucide-minus')
|
|
23
|
+
const Table = classIcon('lucide-table-2')
|
|
24
|
+
const TableOfContents = classIcon('lucide-table-of-contents')
|
|
25
25
|
export const SlashCommandSuggestionKey = new PluginKey<any>(
|
|
26
26
|
'slashCommandSuggestion',
|
|
27
27
|
)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "frappe-ui",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.71",
|
|
4
4
|
"description": "A set of components and utilities for rapid UI development",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=20.19.0"
|
|
@@ -13,10 +13,26 @@
|
|
|
13
13
|
"src/charts/index.ts"
|
|
14
14
|
],
|
|
15
15
|
"imports": {
|
|
16
|
-
"#components/*":
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
"#components/*": [
|
|
17
|
+
"./src/components/*",
|
|
18
|
+
"./src/components/*.ts",
|
|
19
|
+
"./src/components/*/index.ts"
|
|
20
|
+
],
|
|
21
|
+
"#molecules/*": [
|
|
22
|
+
"./src/molecules/*",
|
|
23
|
+
"./src/molecules/*.ts",
|
|
24
|
+
"./src/molecules/*/index.ts"
|
|
25
|
+
],
|
|
26
|
+
"#composables/*": [
|
|
27
|
+
"./src/composables/*",
|
|
28
|
+
"./src/composables/*.ts",
|
|
29
|
+
"./src/composables/*/index.ts"
|
|
30
|
+
],
|
|
31
|
+
"#utils/*": [
|
|
32
|
+
"./src/utils/*",
|
|
33
|
+
"./src/utils/*.ts",
|
|
34
|
+
"./src/utils/*/index.ts"
|
|
35
|
+
]
|
|
20
36
|
},
|
|
21
37
|
"bin": {
|
|
22
38
|
"base-props-v1": "./scripts/migrate-base-props-v1.js",
|
|
@@ -27,7 +43,8 @@
|
|
|
27
43
|
"shortcuts-v1": "./scripts/migrate-shortcuts-v1.js",
|
|
28
44
|
"editor-v1": "./scripts/migrate-editor-v1.js",
|
|
29
45
|
"destinations-v1": "./scripts/migrate-destinations-v1.js",
|
|
30
|
-
"data-v1": "./scripts/migrate-data-v1.js"
|
|
46
|
+
"data-v1": "./scripts/migrate-data-v1.js",
|
|
47
|
+
"packaging-v1": "./scripts/migrate-packaging-v1.js"
|
|
31
48
|
},
|
|
32
49
|
"scripts": {
|
|
33
50
|
"test": "vitest --run",
|
|
@@ -76,9 +93,11 @@
|
|
|
76
93
|
"types": "./src/charts/index.ts"
|
|
77
94
|
},
|
|
78
95
|
"./icons": {
|
|
96
|
+
"types": "./icons/index.ts",
|
|
79
97
|
"import": "./icons/index.ts"
|
|
80
98
|
},
|
|
81
99
|
"./tailwind": {
|
|
100
|
+
"types": "./tailwind/index.d.ts",
|
|
82
101
|
"import": "./tailwind/index.js",
|
|
83
102
|
"default": "./tailwind/index.js"
|
|
84
103
|
},
|
|
@@ -87,6 +106,7 @@
|
|
|
87
106
|
"import": "./vite/index.js"
|
|
88
107
|
},
|
|
89
108
|
"./vite/lucideIconsPlugin": {
|
|
109
|
+
"types": "./vite/lucideIconsPlugin.d.ts",
|
|
90
110
|
"import": "./vite/lucideIconsPlugin.js"
|
|
91
111
|
},
|
|
92
112
|
"./vitepress": {
|
|
@@ -95,6 +115,7 @@
|
|
|
95
115
|
"default": "./vitepress/index.ts"
|
|
96
116
|
},
|
|
97
117
|
"./style.css": {
|
|
118
|
+
"style": "./src/style.css",
|
|
98
119
|
"import": "./src/style.css"
|
|
99
120
|
},
|
|
100
121
|
"./tsconfig.base.json": {
|
|
@@ -108,6 +129,8 @@
|
|
|
108
129
|
"icons",
|
|
109
130
|
"tailwind",
|
|
110
131
|
"vitepress",
|
|
132
|
+
"experimental",
|
|
133
|
+
"experimental.ts",
|
|
111
134
|
"scripts/migrate-shortcuts-v1.js",
|
|
112
135
|
"scripts/migrate-base-props-v1.js",
|
|
113
136
|
"scripts/migrate-editor-v1.js",
|
|
@@ -116,9 +139,17 @@
|
|
|
116
139
|
"scripts/migrate-overlays-v1.js",
|
|
117
140
|
"scripts/migrate-destinations-v1.js",
|
|
118
141
|
"scripts/migrate-data-v1.js",
|
|
119
|
-
"
|
|
120
|
-
"
|
|
121
|
-
"
|
|
142
|
+
"scripts/migrate-packaging-v1.js",
|
|
143
|
+
"tsconfig.base.json",
|
|
144
|
+
"!**/*.test.ts",
|
|
145
|
+
"!**/*.test.js",
|
|
146
|
+
"!**/*.spec.ts",
|
|
147
|
+
"!**/*.cy.ts",
|
|
148
|
+
"!**/*.story.vue",
|
|
149
|
+
"!**/*.playground.vue",
|
|
150
|
+
"!**/stories",
|
|
151
|
+
"!**/test-helpers.ts",
|
|
152
|
+
"!src/mocks"
|
|
122
153
|
],
|
|
123
154
|
"repository": {
|
|
124
155
|
"type": "git",
|
|
@@ -138,29 +169,29 @@
|
|
|
138
169
|
"@codemirror/lang-sql": "^6.8.0",
|
|
139
170
|
"@codemirror/lang-xml": "^6.1.0",
|
|
140
171
|
"@codemirror/lang-yaml": "^6.1.3",
|
|
172
|
+
"@codemirror/language": "^6.0.0",
|
|
173
|
+
"@codemirror/lint": "^6.0.0",
|
|
174
|
+
"@codemirror/commands": "^6.0.0",
|
|
175
|
+
"@codemirror/state": "^6.0.0",
|
|
176
|
+
"@codemirror/view": "^6.0.0",
|
|
177
|
+
"@lezer/highlight": "^1.0.0",
|
|
141
178
|
"@floating-ui/dom": "^1.7.4",
|
|
179
|
+
"@floating-ui/vue": "^1.1.9",
|
|
142
180
|
"@tailwindcss/forms": "^0.5.3",
|
|
143
|
-
"@tailwindcss/line-clamp": "^0.4.4",
|
|
144
181
|
"@tailwindcss/typography": "^0.5.16",
|
|
145
182
|
"@tiptap/core": "^3.26.0",
|
|
146
183
|
"@tiptap/extension-blockquote": "^3.26.0",
|
|
147
184
|
"@tiptap/extension-bold": "^3.26.0",
|
|
148
|
-
"@tiptap/extension-bubble-menu": "^3.26.0",
|
|
149
185
|
"@tiptap/extension-code": "^3.26.0",
|
|
150
186
|
"@tiptap/extension-code-block": "^3.26.0",
|
|
151
187
|
"@tiptap/extension-code-block-lowlight": "^3.26.0",
|
|
152
|
-
"@tiptap/extension-color": "^3.26.0",
|
|
153
188
|
"@tiptap/extension-document": "^3.26.0",
|
|
154
189
|
"@tiptap/extension-hard-break": "^3.26.0",
|
|
155
190
|
"@tiptap/extension-heading": "^3.26.0",
|
|
156
|
-
"@tiptap/extension-highlight": "^3.26.0",
|
|
157
191
|
"@tiptap/extension-horizontal-rule": "^3.26.0",
|
|
158
|
-
"@tiptap/extension-image": "^3.26.0",
|
|
159
192
|
"@tiptap/extension-italic": "^3.26.0",
|
|
160
193
|
"@tiptap/extension-link": "^3.26.0",
|
|
161
194
|
"@tiptap/extension-list": "^3.26.0",
|
|
162
|
-
"@tiptap/extension-mention": "^3.26.0",
|
|
163
|
-
"@tiptap/extension-node-range": "^3.26.0",
|
|
164
195
|
"@tiptap/extension-paragraph": "^3.26.0",
|
|
165
196
|
"@tiptap/extension-placeholder": "^3.26.0",
|
|
166
197
|
"@tiptap/extension-strike": "^3.26.0",
|
|
@@ -191,11 +222,7 @@
|
|
|
191
222
|
"lucide-static": "^1.31.0",
|
|
192
223
|
"magic-string": "^0.30.21",
|
|
193
224
|
"marked": "^15.0.12",
|
|
194
|
-
"ora": "5.4.1",
|
|
195
|
-
"prettier": "^3.3.2",
|
|
196
|
-
"prosemirror-tables": "^1.8.1",
|
|
197
225
|
"reka-ui": "^2.9.9",
|
|
198
|
-
"slugify": "^1.6.6",
|
|
199
226
|
"socket.io-client": "^4.5.1",
|
|
200
227
|
"tippy.js": "^6.3.7",
|
|
201
228
|
"typescript": "^5.0.2",
|
|
@@ -205,13 +232,38 @@
|
|
|
205
232
|
"vue-sonner": "^2.0.9"
|
|
206
233
|
},
|
|
207
234
|
"peerDependencies": {
|
|
235
|
+
"@shikijs/transformers": ">=3.15.0",
|
|
236
|
+
"@vue/compiler-dom": ">=3.5.0",
|
|
237
|
+
"shiki": ">=3.15.0",
|
|
238
|
+
"tailwindcss": ">=3.4.0 <4",
|
|
239
|
+
"vite": ">=5",
|
|
240
|
+
"vitepress": ">=2.0.0-alpha.15",
|
|
208
241
|
"vue": ">=3.5.0",
|
|
209
242
|
"vue-router": "^4.1.6"
|
|
210
243
|
},
|
|
244
|
+
"peerDependenciesMeta": {
|
|
245
|
+
"@shikijs/transformers": {
|
|
246
|
+
"optional": true
|
|
247
|
+
},
|
|
248
|
+
"@vue/compiler-dom": {
|
|
249
|
+
"optional": true
|
|
250
|
+
},
|
|
251
|
+
"shiki": {
|
|
252
|
+
"optional": true
|
|
253
|
+
},
|
|
254
|
+
"vite": {
|
|
255
|
+
"optional": true
|
|
256
|
+
},
|
|
257
|
+
"vitepress": {
|
|
258
|
+
"optional": true
|
|
259
|
+
}
|
|
260
|
+
},
|
|
211
261
|
"devDependencies": {
|
|
212
262
|
"@cypress/code-coverage": "^3.13.10",
|
|
263
|
+
"@shikijs/transformers": "^3.15.0",
|
|
213
264
|
"@vitejs/plugin-vue": "^6.0.7",
|
|
214
265
|
"@vitest/coverage-v8": "^3.2.4",
|
|
266
|
+
"@vue/compiler-dom": "^3.5.0",
|
|
215
267
|
"autoprefixer": "^10.4.13",
|
|
216
268
|
"cross-env": "^7.0.3",
|
|
217
269
|
"cypress": "^15.8.2",
|
|
@@ -221,8 +273,10 @@
|
|
|
221
273
|
"msw": "^2.7.0",
|
|
222
274
|
"nyc": "^17.1.0",
|
|
223
275
|
"postcss": "^8.5.10",
|
|
276
|
+
"prettier": "^3.3.2",
|
|
224
277
|
"prettier-plugin-tailwindcss": "^0.1.13",
|
|
225
|
-
"
|
|
278
|
+
"shiki": "^3.15.0",
|
|
279
|
+
"tailwindcss": "^3.4.0",
|
|
226
280
|
"tsx": "^4.20.6",
|
|
227
281
|
"vite": "^7.3.2",
|
|
228
282
|
"vite-plugin-istanbul": "^9.0.0",
|
package/readme.md
CHANGED
|
@@ -37,7 +37,7 @@ In 2019, I began building [Frappe Books](https://github.com/frappe/books) which
|
|
|
37
37
|
|
|
38
38
|
## Usage
|
|
39
39
|
|
|
40
|
-
Requires **Node `>=20.19.0
|
|
40
|
+
Requires **Node `>=20.19.0`**, Vite, Vue 3 and Tailwind CSS v3.4.
|
|
41
41
|
|
|
42
42
|
```sh
|
|
43
43
|
npm install frappe-ui
|
|
@@ -45,46 +45,49 @@ npm install frappe-ui
|
|
|
45
45
|
yarn add frappe-ui
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
Add the frappe-ui Vite plugin in `vite.config.js`:
|
|
49
49
|
|
|
50
50
|
```js
|
|
51
|
-
import
|
|
52
|
-
import
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
app.use(FrappeUI)
|
|
58
|
-
app.mount('#app')
|
|
51
|
+
import vue from '@vitejs/plugin-vue'
|
|
52
|
+
import frappeui from 'frappe-ui/vite'
|
|
53
|
+
|
|
54
|
+
export default {
|
|
55
|
+
plugins: [frappeui(), vue()],
|
|
56
|
+
}
|
|
59
57
|
```
|
|
60
58
|
|
|
61
|
-
|
|
59
|
+
Add the preset and frappe-ui's source globs in `tailwind.config.js`:
|
|
62
60
|
|
|
63
61
|
```js
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
],
|
|
68
|
-
...
|
|
62
|
+
import frappeUIPreset, { content } from 'frappe-ui/tailwind'
|
|
63
|
+
|
|
64
|
+
export default {
|
|
65
|
+
presets: [frappeUIPreset],
|
|
66
|
+
content: ['./index.html', './src/**/*.{vue,js,ts}', ...content],
|
|
69
67
|
}
|
|
70
68
|
```
|
|
71
69
|
|
|
72
|
-
|
|
70
|
+
Import the stylesheet once, from your CSS entry:
|
|
71
|
+
|
|
72
|
+
```css
|
|
73
|
+
@import 'frappe-ui/style.css';
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Now use the components:
|
|
77
|
+
|
|
78
|
+
```vue
|
|
79
|
+
<script setup>
|
|
80
|
+
import { Button } from 'frappe-ui'
|
|
81
|
+
</script>
|
|
73
82
|
|
|
74
|
-
```html
|
|
75
83
|
<template>
|
|
76
|
-
<
|
|
84
|
+
<Button variant="solid" icon-left="lucide-plus">Click me</Button>
|
|
77
85
|
</template>
|
|
78
|
-
<script>
|
|
79
|
-
import { Button } from 'frappe-ui'
|
|
80
|
-
export default {
|
|
81
|
-
components: {
|
|
82
|
-
Button,
|
|
83
|
-
},
|
|
84
|
-
}
|
|
85
|
-
</script>
|
|
86
86
|
```
|
|
87
87
|
|
|
88
|
+
The full setup, including TypeScript and the Frappe dev-server proxy, is on the
|
|
89
|
+
[Getting Started](https://ui.frappe.io/docs/getting-started) page.
|
|
90
|
+
|
|
88
91
|
## Claude Code skill
|
|
89
92
|
|
|
90
93
|
For AI coding agents (Claude Code, Cursor, Codex, etc.), Frappe UI ships an agent skill that teaches the agent the library's conventions — semantic Tailwind tokens, the `variant` + `theme` color axes, the `useCall` data-fetching composable, common UI recipes, and anti-patterns to avoid.
|