mirror of
https://github.com/filamentphp/filament.git
synced 2026-09-24 15:42:09 +08:00
Add Alpine Floating UI to support package script
This commit is contained in:
+18
-30
@@ -1,34 +1,22 @@
|
||||
const esbuild = require('esbuild')
|
||||
const shouldWatch = process.argv.includes('--watch')
|
||||
|
||||
esbuild
|
||||
.build({
|
||||
define: {
|
||||
'process.env.NODE_ENV': shouldWatch
|
||||
? `'production'`
|
||||
: `'development'`,
|
||||
},
|
||||
entryPoints: ['packages/forms/resources/js/index.js'],
|
||||
outfile: 'packages/forms/dist/module.esm.js',
|
||||
bundle: true,
|
||||
platform: 'neutral',
|
||||
mainFields: ['module', 'main'],
|
||||
watch: shouldWatch,
|
||||
})
|
||||
.catch(() => process.exit(1))
|
||||
const packages = ['forms', 'notifications', 'support', 'tables']
|
||||
|
||||
esbuild
|
||||
.build({
|
||||
define: {
|
||||
'process.env.NODE_ENV': shouldWatch
|
||||
? `'production'`
|
||||
: `'development'`,
|
||||
},
|
||||
entryPoints: ['packages/notifications/resources/js/index.js'],
|
||||
outfile: 'packages/notifications/dist/module.esm.js',
|
||||
bundle: true,
|
||||
platform: 'neutral',
|
||||
mainFields: ['module', 'main'],
|
||||
watch: shouldWatch,
|
||||
})
|
||||
.catch(() => process.exit(1))
|
||||
packages.forEach((package) => {
|
||||
esbuild
|
||||
.build({
|
||||
define: {
|
||||
'process.env.NODE_ENV': shouldWatch
|
||||
? `'production'`
|
||||
: `'development'`,
|
||||
},
|
||||
entryPoints: [`packages/${package}/resources/js/index.js`],
|
||||
outfile: `packages/${package}/dist/module.esm.js`,
|
||||
bundle: true,
|
||||
platform: 'neutral',
|
||||
mainFields: ['module', 'main'],
|
||||
watch: shouldWatch,
|
||||
})
|
||||
.catch(() => process.exit(1))
|
||||
})
|
||||
|
||||
Generated
+281
-264
File diff suppressed because it is too large
Load Diff
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+61
-53
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+2
-2
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"/app.js": "/app.js?id=d4fcae65685a7d983d5a4cf688b7c55d",
|
||||
"/app.css": "/app.css?id=e8dee01504a1d1c754d9a68baebb2a43"
|
||||
"/app.js": "/app.js?id=079af60cb04f4b8debf56b8630c547c9",
|
||||
"/app.css": "/app.css?id=33afaeb62b154c6b99bf392b434e99b6"
|
||||
}
|
||||
|
||||
@@ -2,13 +2,14 @@
|
||||
|
||||
import Alpine from 'alpinejs'
|
||||
import Chart from 'chart.js/auto'
|
||||
|
||||
import Collapse from '@alpinejs/collapse'
|
||||
import Focus from '@alpinejs/focus'
|
||||
import FormsAlpinePlugin from '../../../forms/dist/module.esm'
|
||||
import Mousetrap from '@danharrin/alpine-mousetrap'
|
||||
import NotificationsAlpinePlugin from '../../../notifications/dist/module.esm'
|
||||
import Persist from '@alpinejs/persist'
|
||||
import SupportAlpinePlugin from '../../../support/dist/module.esm'
|
||||
import TablesAlpinePlugin from '../../../tables/dist/module.esm'
|
||||
import Tooltip from '@ryangjchandler/alpine-tooltip'
|
||||
|
||||
Alpine.plugin(Collapse)
|
||||
@@ -17,6 +18,8 @@ Alpine.plugin(FormsAlpinePlugin)
|
||||
Alpine.plugin(Mousetrap)
|
||||
Alpine.plugin(NotificationsAlpinePlugin)
|
||||
Alpine.plugin(Persist)
|
||||
Alpine.plugin(SupportAlpinePlugin)
|
||||
Alpine.plugin(TablesAlpinePlugin)
|
||||
Alpine.plugin(Tooltip)
|
||||
|
||||
Alpine.store('sidebar', {
|
||||
@@ -37,9 +40,11 @@ Alpine.store('sidebar', {
|
||||
},
|
||||
|
||||
toggleCollapsedGroup: function (group) {
|
||||
this.collapsedGroups = this.collapsedGroups.includes(group) ?
|
||||
this.collapsedGroups.filter(collapsedGroup => collapsedGroup !== group) :
|
||||
this.collapsedGroups.concat(group)
|
||||
this.collapsedGroups = this.collapsedGroups.includes(group)
|
||||
? this.collapsedGroups.filter(
|
||||
(collapsedGroup) => collapsedGroup !== group
|
||||
)
|
||||
: this.collapsedGroups.concat(group)
|
||||
},
|
||||
|
||||
close: function () {
|
||||
@@ -53,7 +58,7 @@ Alpine.store('sidebar', {
|
||||
|
||||
Alpine.store(
|
||||
'theme',
|
||||
window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light',
|
||||
window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'
|
||||
)
|
||||
|
||||
window.addEventListener('dark-mode-toggled', (event) => {
|
||||
|
||||
Vendored
+5637
-5455
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1,4 @@
|
||||
import './sortable'
|
||||
import ColorPickerFormComponentAlpinePlugin from './components/color-picker'
|
||||
import DateTimePickerFormComponentAlpinePlugin from './components/date-time-picker'
|
||||
import FileUploadFormComponentAlpinePlugin from './components/file-upload'
|
||||
@@ -5,11 +6,10 @@ import KeyValueFormComponentAlpinePlugin from './components/key-value'
|
||||
import MarkdownEditorFormComponentAlpinePlugin from './components/markdown-editor'
|
||||
import RichEditorFormComponentAlpinePlugin from './components/rich-editor'
|
||||
import SelectFormComponentAlpinePlugin from './components/select'
|
||||
import SupportAlpinePlugin from '../../../support/dist/module.esm'
|
||||
import TagsInputFormComponentAlpinePlugin from './components/tags-input'
|
||||
import TextInputFormComponentAlpinePlugin from './components/text-input'
|
||||
import TextareaFormComponentAlpinePlugin from './components/textarea'
|
||||
import AlpineFloatingUI from '@awcodes/alpine-floating-ui'
|
||||
import './sortable'
|
||||
import TextInputFormComponentAlpinePlugin from './components/text-input'
|
||||
|
||||
export default (Alpine) => {
|
||||
Alpine.plugin(ColorPickerFormComponentAlpinePlugin)
|
||||
@@ -19,10 +19,10 @@ export default (Alpine) => {
|
||||
Alpine.plugin(MarkdownEditorFormComponentAlpinePlugin)
|
||||
Alpine.plugin(RichEditorFormComponentAlpinePlugin)
|
||||
Alpine.plugin(SelectFormComponentAlpinePlugin)
|
||||
Alpine.plugin(SupportAlpinePlugin)
|
||||
Alpine.plugin(TagsInputFormComponentAlpinePlugin)
|
||||
Alpine.plugin(TextInputFormComponentAlpinePlugin)
|
||||
Alpine.plugin(TextareaFormComponentAlpinePlugin)
|
||||
Alpine.plugin(AlpineFloatingUI)
|
||||
Alpine.plugin(TextInputFormComponentAlpinePlugin)
|
||||
}
|
||||
|
||||
export {
|
||||
@@ -33,8 +33,8 @@ export {
|
||||
MarkdownEditorFormComponentAlpinePlugin,
|
||||
RichEditorFormComponentAlpinePlugin,
|
||||
SelectFormComponentAlpinePlugin,
|
||||
SupportAlpinePlugin,
|
||||
TagsInputFormComponentAlpinePlugin,
|
||||
TextInputFormComponentAlpinePlugin,
|
||||
TextareaFormComponentAlpinePlugin,
|
||||
AlpineFloatingUI,
|
||||
TextInputFormComponentAlpinePlugin,
|
||||
}
|
||||
|
||||
+1702
-2
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,9 @@
|
||||
import NotificationComponentAlpinePlugin from './components/notification'
|
||||
import SupportAlpinePlugin from '../../../support/dist/module.esm'
|
||||
|
||||
export default (Alpine) => {
|
||||
Alpine.plugin(NotificationComponentAlpinePlugin)
|
||||
Alpine.plugin(SupportAlpinePlugin)
|
||||
}
|
||||
|
||||
export { NotificationComponentAlpinePlugin }
|
||||
export { NotificationComponentAlpinePlugin, SupportAlpinePlugin }
|
||||
|
||||
Vendored
+1703
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,7 @@
|
||||
import AlpineFloatingUI from '@awcodes/alpine-floating-ui'
|
||||
|
||||
export default (Alpine) => {
|
||||
Alpine.plugin(AlpineFloatingUI)
|
||||
}
|
||||
|
||||
export { AlpineFloatingUI }
|
||||
Vendored
+1706
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,7 @@
|
||||
import SupportAlpinePlugin from '../../../support/dist/module.esm'
|
||||
|
||||
export default (Alpine) => {
|
||||
Alpine.plugin(SupportAlpinePlugin)
|
||||
}
|
||||
|
||||
export { SupportAlpinePlugin }
|
||||
Reference in New Issue
Block a user