Skip to content

Commit

Permalink
Refactoring views and components
Browse files Browse the repository at this point in the history
  • Loading branch information
mckenziearts committed Apr 20, 2024
1 parent 52f48e9 commit a991073
Show file tree
Hide file tree
Showing 40 changed files with 403 additions and 1,401 deletions.
4 changes: 1 addition & 3 deletions packages/admin/config/components/setting.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
'inventory-create' => Pages\Settings\Inventories\Create::class,
'inventory-edit' => Pages\Settings\Inventories\Edit::class,
'legal' => Pages\Settings\LegalPage::class,
'analytics' => Pages\Settings\Analytics::class,
// 'analytics' => Pages\Settings\Analytics::class,
'payment' => Pages\Settings\Payment::class,
'team-index' => Pages\Settings\Team\Index::class,
'team-roles' => Pages\Settings\Team\RolePermission::class,
Expand All @@ -37,8 +37,6 @@
'modals.create-permission' => Livewire\Modals\CreatePermission::class,
'modals.create-role' => Livewire\Modals\CreateRole::class,
'modals.confirm-password' => Livewire\Modals\ConfirmPassword::class,
'modals.delete-inventory' => Livewire\Modals\DeleteInventory::class,
'modals.delete-role' => Livewire\Modals\DeleteRole::class,
'modals.logout-others-browser' => Livewire\Modals\LogoutOthersBrowser::class,
'modals.payment-method-form' => Livewire\Modals\PaymentMethodForm::class,

Expand Down
14 changes: 7 additions & 7 deletions packages/admin/config/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@
'route' => 'shopper.settings.inventories',
'permission' => null,
],
[
'name' => 'Analytics',
'description' => 'Get a better understanding of where your traffic is coming from.',
'icon' => svg('untitledui-pie-chart', 'h-6 w-6'),
'route' => 'shopper.settings.analytics',
'permission' => null,
],
// [
// 'name' => 'Analytics',
// 'description' => 'Get a better understanding of where your traffic is coming from.',
// 'icon' => svg('untitledui-pie-chart', 'h-6 w-6'),
// 'route' => 'shopper.settings.analytics',
// 'permission' => null,
// ],
[
'name' => 'Payment methods',
'description' => 'Add different payment methods for your customers.',
Expand Down
115 changes: 12 additions & 103 deletions packages/admin/public/shopper.css
Original file line number Diff line number Diff line change
Expand Up @@ -3553,10 +3553,6 @@ html {
bottom: 0px;
}

.-bottom-1 {
bottom: -0.25rem;
}

.-top-1 {
top: -0.25rem;
}
Expand Down Expand Up @@ -3605,10 +3601,6 @@ html {
right: 0px;
}

.right-12 {
right: 3rem;
}

.right-2 {
right: 0.5rem;
}
Expand Down Expand Up @@ -4061,10 +4053,6 @@ html {
display: table-cell;
}

.table-row {
display: table-row;
}

.grid {
display: grid;
}
Expand Down Expand Up @@ -5415,11 +5403,6 @@ html {
border-color: transparent;
}

.border-white {
--tw-border-opacity: 1;
border-color: rgb(255 255 255 / var(--tw-border-opacity));
}

.border-yellow-400 {
--tw-border-opacity: 1;
border-color: rgb(250 204 21 / var(--tw-border-opacity));
Expand Down Expand Up @@ -5469,9 +5452,9 @@ html {
background-color: rgb(254 242 242 / var(--tw-bg-opacity));
}

.bg-danger-500 {
.bg-danger-600 {
--tw-bg-opacity: 1;
background-color: rgb(239 68 68 / var(--tw-bg-opacity));
background-color: rgb(220 38 38 / var(--tw-bg-opacity));
}

.bg-gray-100 {
Expand Down Expand Up @@ -5567,11 +5550,6 @@ html {
background-color: rgb(37 99 235 / var(--tw-bg-opacity));
}

.bg-primary-900 {
--tw-bg-opacity: 1;
background-color: rgb(30 58 138 / var(--tw-bg-opacity));
}

.bg-red-100 {
--tw-bg-opacity: 1;
background-color: rgb(254 226 226 / var(--tw-bg-opacity));
Expand Down Expand Up @@ -5988,10 +5966,6 @@ html {
padding-right: 1rem;
}

.pr-6 {
padding-right: 1.5rem;
}

.ps-0 {
padding-inline-start: 0px;
}
Expand Down Expand Up @@ -6691,12 +6665,6 @@ html {
transition-duration: 150ms;
}

.transition-transform {
transition-property: transform;
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
transition-duration: 150ms;
}

.duration-100 {
transition-duration: 100ms;
}
Expand Down Expand Up @@ -9350,14 +9318,9 @@ dark .treeselect-list__item--checked,
background-color: rgba(var(--c-500), var(--tw-bg-opacity));
}

.hover\:bg-danger-100:hover {
--tw-bg-opacity: 1;
background-color: rgb(254 226 226 / var(--tw-bg-opacity));
}

.hover\:bg-danger-600:hover {
.hover\:bg-danger-500:hover {
--tw-bg-opacity: 1;
background-color: rgb(220 38 38 / var(--tw-bg-opacity));
background-color: rgb(239 68 68 / var(--tw-bg-opacity));
}

.hover\:bg-gray-100:hover {
Expand Down Expand Up @@ -9500,16 +9463,6 @@ dark .treeselect-list__item--checked,
background-color: rgba(var(--gray-500), var(--tw-bg-opacity));
}

.focus\:bg-primary-900:focus {
--tw-bg-opacity: 1;
background-color: rgb(30 58 138 / var(--tw-bg-opacity));
}

.focus\:text-gray-500:focus {
--tw-text-opacity: 1;
color: rgba(var(--gray-500), var(--tw-text-opacity));
}

.focus\:text-gray-600:focus {
--tw-text-opacity: 1;
color: rgba(var(--gray-600), var(--tw-text-opacity));
Expand All @@ -9520,11 +9473,6 @@ dark .treeselect-list__item--checked,
color: rgb(185 28 28 / var(--tw-text-opacity));
}

.focus\:text-white:focus {
--tw-text-opacity: 1;
color: rgb(255 255 255 / var(--tw-text-opacity));
}

.focus\:underline:focus {
text-decoration-line: underline;
}
Expand Down Expand Up @@ -9776,11 +9724,6 @@ dark .treeselect-list__item--checked,
text-decoration-line: underline;
}

.group:focus .group-focus\:border-primary-300 {
--tw-border-opacity: 1;
border-color: rgb(147 197 253 / var(--tw-border-opacity));
}

.group:focus-visible .group-focus-visible\:text-gray-500 {
--tw-text-opacity: 1;
color: rgba(var(--gray-500), var(--tw-text-opacity));
Expand Down Expand Up @@ -9831,11 +9774,6 @@ dark .treeselect-list__item--checked,
border-color: rgba(var(--gray-700), 0.5);
}

:is(.dark .dark\:border-gray-800) {
--tw-border-opacity: 1;
border-color: rgba(var(--gray-800), var(--tw-border-opacity));
}

:is(.dark .dark\:border-primary-500) {
--tw-border-opacity: 1;
border-color: rgb(59 130 246 / var(--tw-border-opacity));
Expand Down Expand Up @@ -9875,10 +9813,6 @@ dark .treeselect-list__item--checked,
background-color: rgba(var(--c-500), 0.2);
}

:is(.dark .dark\:bg-danger-400\/10) {
background-color: rgb(248 113 113 / 0.1);
}

:is(.dark .dark\:bg-gray-400\/10) {
background-color: rgba(var(--gray-400), 0.1);
}
Expand Down Expand Up @@ -10072,10 +10006,6 @@ dark .treeselect-list__item--checked,
color: rgb(59 130 246 / var(--tw-text-opacity));
}

:is(.dark .dark\:text-primary-500\/50) {
color: rgb(59 130 246 / 0.5);
}

:is(.dark .dark\:text-red-400) {
--tw-text-opacity: 1;
color: rgb(248 113 113 / var(--tw-text-opacity));
Expand Down Expand Up @@ -10212,10 +10142,6 @@ dark .treeselect-list__item--checked,
background-color: rgba(var(--c-400), 0.1);
}

:is(.dark .dark\:hover\:bg-danger-400\/20:hover) {
background-color: rgb(248 113 113 / 0.2);
}

:is(.dark .dark\:hover\:bg-gray-600:hover) {
--tw-bg-opacity: 1;
background-color: rgba(var(--gray-600), var(--tw-bg-opacity));
Expand All @@ -10235,6 +10161,10 @@ dark .treeselect-list__item--checked,
background-color: rgba(var(--gray-800), 0.75);
}

:is(.dark .dark\:hover\:bg-gray-900\/20:hover) {
background-color: rgba(var(--gray-900), 0.2);
}

:is(.dark .dark\:hover\:bg-white\/10:hover) {
background-color: rgb(255 255 255 / 0.1);
}
Expand All @@ -10243,23 +10173,6 @@ dark .treeselect-list__item--checked,
background-color: rgb(255 255 255 / 0.05);
}

:is(.dark .dark\:hover\:bg-gray-900:hover) {
--tw-bg-opacity: 1;
background-color: rgba(var(--gray-900), var(--tw-bg-opacity));
}

:is(.dark .dark\:hover\:bg-white\/20:hover) {
background-color: rgb(255 255 255 / 0.2);
}

:is(.dark .dark\:hover\:bg-gray-900\/20:hover) {
background-color: rgba(var(--gray-900), 0.2);
}

:is(.dark .dark\:hover\:bg-gray-900\/50:hover) {
background-color: rgba(var(--gray-900), 0.5);
}

:is(.dark .dark\:hover\:text-custom-300:hover) {
--tw-text-opacity: 1;
color: rgba(var(--c-300), var(--tw-text-opacity));
Expand Down Expand Up @@ -10628,10 +10541,6 @@ dark .treeselect-list__item--checked,
max-width: 20rem;
}

.sm\:flex-1 {
flex: 1 1 0%;
}

.sm\:translate-y-0 {
--tw-translate-y: 0px;
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
Expand Down Expand Up @@ -11331,6 +11240,10 @@ dark .treeselect-list__item--checked,
border-bottom-width: 1px;
}

.lg\:border-t {
border-top-width: 1px;
}

.lg\:border-t-0 {
border-top-width: 0px;
}
Expand Down Expand Up @@ -11387,10 +11300,6 @@ dark .treeselect-list__item--checked,
padding-bottom: 0.375rem;
}

.lg\:pl-2 {
padding-left: 0.5rem;
}

.lg\:pt-10 {
padding-top: 2.5rem;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<button
{{ $attributes->twMerge(['class' => 'inline-flex items-center justify-center rounded-lg px-4 py-2 bg-danger-500 text-base leading-6 font-medium text-white shadow-sm hover:bg-danger-600 focus:outline-none focus:border-danger-700 focus:shadow-outline-danger transition ease-in-out duration-150 sm:text-sm sm:leading-5']) }}
{{ $attributes->twMerge(['class' => 'inline-flex items-center justify-center rounded-lg px-4 py-2 bg-danger-600 text-base leading-6 font-medium text-white shadow-sm hover:bg-danger-500 focus:outline-none focus:border-danger-700 focus:shadow-outline-danger transition ease-in-out duration-150 sm:text-sm sm:leading-5']) }}
>
{{ $slot }}
</button>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<x-shopper::layouts.base :title="$title ?? null" class="overflow-hidden bg-gray-50">
<div
class="flex h-screen overflow-hidden"
x-data="{ sidebarOpen: false, modalDemo: false }"
x-data="{ sidebarOpen: false }"
@keydown.window.escape="sidebarOpen = false"
>
<x-shopper::layouts.app.sidebar />
Expand All @@ -11,7 +11,7 @@ class="flex h-screen overflow-hidden"
<div
class="flex w-0 flex-1 flex-col overflow-hidden bg-white ring-1 ring-gray-200 dark:bg-gray-900 dark:ring-gray-800 lg:my-2 lg:rounded-bl-2xl lg:rounded-tl-2xl lg:pb-1.5"
>
<div class="scrolling flex flex-1 flex-col justify-between overflow-hidden overflow-y-auto">
<div class="flex flex-1 flex-col justify-between overflow-hidden overflow-y-auto">
<x-shopper::layouts.app.header />

@isset($subHeading)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class="sticky top-0 z-20 flex h-16 shrink-0 border-b border-gray-200 bg-white da
class="border-r border-gray-200 px-4 text-gray-500 focus:bg-gray-100 focus:text-gray-600 focus:outline-none dark:border-gray-700 dark:focus:bg-gray-800 dark:focus:text-gray-500 lg:hidden"
aria-label="Open sidebar"
>
<x-untitledui-menu-03 class="h-6 w-6" />
<x-untitledui-menu-03 class="h-6 w-6" aria-hidden="true" />
</button>
<div class="flex flex-1 items-center justify-between px-4 lg:px-6">
<div class="flex flex-1">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class="relative flex items-start rounded-lg bg-white px-3 py-2.5 shadow-sm ring-
</div>
</div>
<div class="flex flex-1 flex-col justify-between overflow-hidden">
<div class="scrolling h-full flex-1 overflow-y-scroll">
<div class="h-full flex-1 overflow-y-scroll">
<x-shopper::layouts.app.sidebar.secondary />
</div>

Expand All @@ -34,13 +34,13 @@ class="relative flex items-start rounded-lg bg-white px-3 py-2.5 shadow-sm ring-
'sh-sidebar-item-inactive' => ! request()->routeIs('shopper.settings*'),
])
>
<x-untitledui-sliders class="mr-2 h-5 w-5" stroke-width="1.5" />
<x-untitledui-sliders class="mr-2 h-5 w-5" stroke-width="1.5" aria-hidden="true" />
{{ __('shopper::layout.account_dropdown.settings') }}
</x-shopper::link>
@endcan

<a href="https://laravelshopper.dev" target="_blank" class="sh-sidebar-item sh-sidebar-item-inactive">
<x-untitledui-code-browser class="mr-2 h-5 w-5" stroke-width="1.5" />
<x-untitledui-code-browser class="mr-2 h-5 w-5" stroke-width="1.5" aria-hidden="true" />
{{ __('shopper::messages.dashboard.cards.doc_title') }}
</a>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class="flex w-full max-w-xs flex-1 transform bg-white duration-200 ease-in-out d
@click="sidebarOpen = false"
class="flex h-12 w-12 items-center justify-center rounded-full focus:bg-gray-500 focus:outline-none"
>
<x-untitledui-x-close class="h-6 w-6 text-white" />
<x-untitledui-x-close class="h-6 w-6 text-white" aria-hidden="true" />
</button>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,7 @@
{{ $this->form }}

<div class="mt-10 border-t border-gray-200 pt-10 dark:border-gray-700">
<div class="flex items-center justify-end space-x-4">
@can('delete_inventories')
@isset($inventory->id)
<span class="w-full sm:w-auto">
<x-shopper::buttons.danger
wire:click="$emit('openModal', 'shopper-modals.delete-inventory', {{ json_encode([$inventory->id, $inventory->name]) }})"
type="button"
>
<x-untitledui-trash-03 class="mr-2 h-5 w-5" aria-hidden="true" />
{{ __('shopper::layout.status.delete') }}
</x-shopper::buttons.danger>
</span>
@endisset
@endcan

<div class="flex items-center justify-end">
<x-shopper::buttons.primary wire:click="store" type="submit" wire:loading.attr="disabled">
<x-shopper::loader wire:loading wire:target="store" class="text-white" />
{{ __('shopper::layout.forms.actions.save') }}
Expand Down
Loading

0 comments on commit a991073

Please sign in to comment.