@licklist/design 0.78.30 → 0.78.32
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/dist/Maintenance/Maintenance.scss.js +1 -1
- package/dist/Maintenance/MaintenancePage.d.ts.map +1 -1
- package/dist/Maintenance/MaintenancePage.js +3 -2
- package/dist/PageNotFound/PageNotFound.js +1 -1
- package/dist/index.js +1 -0
- package/dist/styles/iframe-page/Page.scss +2 -2
- package/dist/v2/components/Alert/Alert.scss.js +1 -1
- package/dist/v2/components/Button/GhostButton.d.ts +8 -0
- package/dist/v2/components/Button/GhostButton.d.ts.map +1 -0
- package/dist/v2/components/Button/GhostButton.js +111 -0
- package/dist/v2/components/Button/GhostButton.scss.js +6 -0
- package/dist/v2/components/Checkbox/Checkbox.scss.js +1 -1
- package/dist/v2/components/FormField/FormField.scss.js +1 -1
- package/dist/v2/components/WYSIWYGEditor/WYSIWYGEditor.scss.js +1 -1
- package/dist/v2/components/index.d.ts +2 -0
- package/dist/v2/components/index.d.ts.map +1 -1
- package/dist/v2/navigation/DashboardLayout/DashboardLayout.scss.js +1 -1
- package/dist/v2/navigation/DashboardLayout/ProviderSidebar.js +2 -2
- package/dist/v2/navigation/DashboardLayout/ProviderSidebar.scss.js +1 -1
- package/dist/v2/pages/Settings/components/SidebarCustomisation.d.ts.map +1 -1
- package/dist/v2/pages/Settings/components/SidebarCustomisation.js +36 -13
- package/dist/v2/pages/Settings/components/SidebarCustomisation.scss.js +1 -1
- package/dist/v2/pages/Settings/components/SidebarNavItem.d.ts.map +1 -1
- package/dist/v2/pages/Settings/components/SidebarNavItem.js +16 -2
- package/package.json +1 -1
- package/src/Maintenance/Maintenance.scss +7 -7
- package/src/Maintenance/MaintenancePage.tsx +4 -3
- package/src/PageNotFound/PageNotFound.tsx +1 -1
- package/src/styles/iframe-page/Page.scss +2 -2
- package/src/v2/components/Button/GhostButton.scss +53 -0
- package/src/v2/components/Button/GhostButton.tsx +28 -0
- package/src/v2/components/FormField/FormField.scss +0 -4
- package/src/v2/components/index.ts +3 -0
- package/src/v2/navigation/DashboardLayout/DashboardLayout.scss +5 -0
- package/src/v2/navigation/DashboardLayout/ProviderSidebar.scss +41 -0
- package/src/v2/navigation/DashboardLayout/ProviderSidebar.tsx +4 -4
- package/src/v2/pages/Settings/components/SidebarCustomisation.scss +0 -34
- package/src/v2/pages/Settings/components/SidebarCustomisation.tsx +16 -11
- package/src/v2/pages/Settings/components/SidebarNavItem.tsx +2 -2
- package/src/v2/styles/tokens/_sizes.scss +3 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
.ghost-button {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
justify-content: center;
|
|
5
|
+
gap: 6px;
|
|
6
|
+
border-radius: 6px;
|
|
7
|
+
border: 1px solid var(--borders-main-border-primary, #E8E9EF);
|
|
8
|
+
background: transparent;
|
|
9
|
+
color: var(--labels-main-label-primary, #121E52);
|
|
10
|
+
font-family: var(--font-family-sans);
|
|
11
|
+
font-weight: 500;
|
|
12
|
+
white-space: nowrap;
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
transition: background-color 0.2s ease;
|
|
15
|
+
|
|
16
|
+
&:hover:not(:disabled) {
|
|
17
|
+
background-color: var(--surfaces-main-background-tertiary, #E8E9EF);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&:disabled {
|
|
21
|
+
cursor: default;
|
|
22
|
+
opacity: 0.5;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&:focus-visible {
|
|
26
|
+
outline: 2px solid var(--fills-main-fill-action, #6200EE);
|
|
27
|
+
outline-offset: 2px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&--sm {
|
|
31
|
+
height: 28px;
|
|
32
|
+
padding: 0 8px 0 8px;
|
|
33
|
+
font-size: 13px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&--md {
|
|
37
|
+
height: 36px;
|
|
38
|
+
padding: 0 12px 0 8px;
|
|
39
|
+
font-size: 14px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&__icon {
|
|
43
|
+
display: flex;
|
|
44
|
+
align-items: center;
|
|
45
|
+
justify-content: center;
|
|
46
|
+
flex-shrink: 0;
|
|
47
|
+
|
|
48
|
+
svg {
|
|
49
|
+
width: 20px;
|
|
50
|
+
height: 20px;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes } from 'react'
|
|
2
|
+
import './GhostButton.scss'
|
|
3
|
+
|
|
4
|
+
export interface GhostButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
5
|
+
icon?: React.ReactNode
|
|
6
|
+
size?: 'sm' | 'md'
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function GhostButton({
|
|
10
|
+
icon,
|
|
11
|
+
size = 'md',
|
|
12
|
+
className = '',
|
|
13
|
+
children,
|
|
14
|
+
...props
|
|
15
|
+
}: GhostButtonProps) {
|
|
16
|
+
const classes = [
|
|
17
|
+
'ghost-button',
|
|
18
|
+
`ghost-button--${size}`,
|
|
19
|
+
className
|
|
20
|
+
].filter(Boolean).join(' ')
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<button className={classes} {...props}>
|
|
24
|
+
{icon && <span className="ghost-button__icon">{icon}</span>}
|
|
25
|
+
{children && <span className="ghost-button__text">{children}</span>}
|
|
26
|
+
</button>
|
|
27
|
+
)
|
|
28
|
+
}
|
|
@@ -47,10 +47,6 @@
|
|
|
47
47
|
color: var(--label-secondary, #626a90);
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
&:hover:not(:disabled) {
|
|
51
|
-
border-color: var(--border-primary-hover, #d1d3de);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
50
|
&:focus {
|
|
55
51
|
border-color: var(--border-selected, #6200EE);
|
|
56
52
|
background-color: var(--surface-secondary, #f8f8fa);
|
|
@@ -21,6 +21,9 @@ export type { SectionHeaderProps } from './SectionHeader'
|
|
|
21
21
|
export { Button, ButtonText } from './Button'
|
|
22
22
|
export type { ButtonProps, ButtonTextProps } from './Button'
|
|
23
23
|
|
|
24
|
+
export { GhostButton } from './Button/GhostButton'
|
|
25
|
+
export type { GhostButtonProps } from './Button/GhostButton'
|
|
26
|
+
|
|
24
27
|
export { Select } from './Select'
|
|
25
28
|
|
|
26
29
|
export { Tooltip } from './Tooltip'
|
|
@@ -76,6 +76,47 @@
|
|
|
76
76
|
&--collapsed {
|
|
77
77
|
justify-content: center;
|
|
78
78
|
}
|
|
79
|
+
|
|
80
|
+
&.provider-sidebar__link--active {
|
|
81
|
+
border-radius: 8px;
|
|
82
|
+
|
|
83
|
+
.entity-header {
|
|
84
|
+
background: transparent;
|
|
85
|
+
|
|
86
|
+
&:hover {
|
|
87
|
+
background: transparent;
|
|
88
|
+
|
|
89
|
+
.entity-header__badge {
|
|
90
|
+
background: rgba(255, 255, 255, 0.2);
|
|
91
|
+
|
|
92
|
+
span {
|
|
93
|
+
color: white;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.entity-header__name {
|
|
100
|
+
color: white;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.entity-header__badge {
|
|
104
|
+
background: rgba(255, 255, 255, 0.2);
|
|
105
|
+
|
|
106
|
+
span {
|
|
107
|
+
color: white;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.entity-header__placeholder span {
|
|
112
|
+
color: white;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.entity-header__placeholder svg circle {
|
|
116
|
+
fill: rgba(255, 255, 255, 0.2);
|
|
117
|
+
stroke: rgba(255, 255, 255, 0.6);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
79
120
|
}
|
|
80
121
|
|
|
81
122
|
&__avatar {
|
|
@@ -189,8 +189,8 @@ export const ProviderSidebar: React.FC<ProviderSidebarProps> = ({
|
|
|
189
189
|
|
|
190
190
|
|
|
191
191
|
{expanded ? (
|
|
192
|
-
<div
|
|
193
|
-
className=
|
|
192
|
+
<div
|
|
193
|
+
className={`provider-sidebar__header ${activePath?.startsWith('/profile') ? 'provider-sidebar__link--active' : ''}`}
|
|
194
194
|
onClick={() => handleNavClick('/profile')}
|
|
195
195
|
role="button"
|
|
196
196
|
tabIndex={0}
|
|
@@ -208,8 +208,8 @@ export const ProviderSidebar: React.FC<ProviderSidebarProps> = ({
|
|
|
208
208
|
</div>
|
|
209
209
|
) : (
|
|
210
210
|
<Tooltip content={providerName} side="right" sideOffset={8} delayDuration={100}>
|
|
211
|
-
<div
|
|
212
|
-
className=
|
|
211
|
+
<div
|
|
212
|
+
className={`provider-sidebar__header provider-sidebar__header--collapsed ${activePath?.startsWith('/profile') ? 'provider-sidebar__link--active' : ''}`}
|
|
213
213
|
onClick={() => handleNavClick('/profile')}
|
|
214
214
|
role="button"
|
|
215
215
|
tabIndex={0}
|
|
@@ -48,40 +48,6 @@
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
&__edit-btn {
|
|
52
|
-
display: inline-flex;
|
|
53
|
-
align-items: center;
|
|
54
|
-
justify-content: center;
|
|
55
|
-
gap: 6px;
|
|
56
|
-
height: 36px;
|
|
57
|
-
padding: 0 12px 0 4px;
|
|
58
|
-
border-radius: 6px;
|
|
59
|
-
border: none;
|
|
60
|
-
background: transparent;
|
|
61
|
-
color: var(--label-primary);
|
|
62
|
-
font-size: 14px;
|
|
63
|
-
font-weight: 500;
|
|
64
|
-
white-space: nowrap;
|
|
65
|
-
cursor: pointer;
|
|
66
|
-
transition: background-color 0.2s ease;
|
|
67
|
-
|
|
68
|
-
svg {
|
|
69
|
-
width: 20px;
|
|
70
|
-
height: 20px;
|
|
71
|
-
flex-shrink: 0;
|
|
72
|
-
fill: var(--fill-primary);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
&:hover {
|
|
76
|
-
background-color: var(--surface-tertiary);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
&:focus-visible {
|
|
80
|
-
outline: 2px solid var(--border-action);
|
|
81
|
-
outline-offset: 2px;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
51
|
// Edit mode grid - responsive columns
|
|
86
52
|
&__grid {
|
|
87
53
|
display: grid;
|
|
@@ -12,6 +12,8 @@ import {
|
|
|
12
12
|
SettingsIcon,
|
|
13
13
|
EditIcon,
|
|
14
14
|
} from '../../../icons'
|
|
15
|
+
import { Button } from 'src/v2/components'
|
|
16
|
+
import { GhostButton } from 'src/v2/components/Button/GhostButton'
|
|
15
17
|
|
|
16
18
|
export interface SidebarItem {
|
|
17
19
|
id: string
|
|
@@ -31,6 +33,7 @@ export interface SidebarCustomisationProps {
|
|
|
31
33
|
|
|
32
34
|
// Default sidebar items - IDs must match useProviderNavigation.tsx
|
|
33
35
|
export const defaultSidebarItems: SidebarItem[] = [
|
|
36
|
+
{ id: 'home', label: 'Home', icon: null, visible: true },
|
|
34
37
|
{ id: 'events', label: 'Dates & Events', icon: <CalendarIcon />, visible: true },
|
|
35
38
|
{ id: 'sales', label: 'Bookings & Enquiries', icon: <BookingsIcon />, visible: true },
|
|
36
39
|
{ id: 'product-sets', label: 'Booking Types', icon: <BookingTypesIcon />, visible: true },
|
|
@@ -53,8 +56,8 @@ export const SidebarCustomisation: React.FC<SidebarCustomisationProps> = ({
|
|
|
53
56
|
const [isEditing, setIsEditing] = useState(false)
|
|
54
57
|
|
|
55
58
|
useEffect(() => {
|
|
56
|
-
setItems(initialItems)
|
|
57
59
|
if (!isEditing) {
|
|
60
|
+
setItems(initialItems)
|
|
58
61
|
setItemsBeforeEdit(initialItems)
|
|
59
62
|
}
|
|
60
63
|
}, [initialItems, isEditing])
|
|
@@ -74,12 +77,17 @@ export const SidebarCustomisation: React.FC<SidebarCustomisationProps> = ({
|
|
|
74
77
|
}
|
|
75
78
|
|
|
76
79
|
const handleReset = () => {
|
|
77
|
-
|
|
80
|
+
const resetItems = items.map((item) => {
|
|
81
|
+
const defaultItem = defaultSidebarItems.find((d) => d.id === item.id)
|
|
82
|
+
return defaultItem ? { ...item, label: defaultItem.label } : item
|
|
83
|
+
})
|
|
84
|
+
setItems(resetItems)
|
|
78
85
|
onReset?.()
|
|
79
86
|
}
|
|
80
87
|
|
|
81
88
|
const handleCancel = () => {
|
|
82
89
|
setItems(itemsBeforeEdit)
|
|
90
|
+
onItemsChange?.(itemsBeforeEdit)
|
|
83
91
|
onCancel?.()
|
|
84
92
|
setIsEditing(false)
|
|
85
93
|
}
|
|
@@ -102,14 +110,12 @@ export const SidebarCustomisation: React.FC<SidebarCustomisationProps> = ({
|
|
|
102
110
|
Cancel
|
|
103
111
|
</button>
|
|
104
112
|
) : (
|
|
105
|
-
<
|
|
106
|
-
|
|
107
|
-
className="sidebar-customisation__edit-btn"
|
|
113
|
+
<GhostButton
|
|
114
|
+
icon={<EditIcon />}
|
|
108
115
|
onClick={handleEdit}
|
|
109
116
|
>
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
</button>
|
|
117
|
+
Edit Side Bar
|
|
118
|
+
</GhostButton>
|
|
113
119
|
)}
|
|
114
120
|
</div>
|
|
115
121
|
|
|
@@ -132,13 +138,12 @@ export const SidebarCustomisation: React.FC<SidebarCustomisationProps> = ({
|
|
|
132
138
|
</div>
|
|
133
139
|
|
|
134
140
|
<div className="sidebar-customisation__actions">
|
|
135
|
-
<
|
|
141
|
+
<Button
|
|
136
142
|
type="button"
|
|
137
|
-
className="sidebar-customisation__save-btn"
|
|
138
143
|
onClick={handleSave}
|
|
139
144
|
>
|
|
140
145
|
Save Changes
|
|
141
|
-
</
|
|
146
|
+
</Button>
|
|
142
147
|
<button
|
|
143
148
|
type="button"
|
|
144
149
|
className="sidebar-customisation__reset-btn"
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
+
import { FormField } from 'src/v2/components'
|
|
2
3
|
import './SidebarNavItem.scss'
|
|
3
4
|
|
|
4
5
|
export interface SidebarNavItemProps {
|
|
@@ -36,10 +37,9 @@ export const SidebarNavItem: React.FC<SidebarNavItemProps> = ({
|
|
|
36
37
|
</span>
|
|
37
38
|
</div>
|
|
38
39
|
</div>
|
|
39
|
-
<
|
|
40
|
+
<FormField
|
|
40
41
|
type="text"
|
|
41
42
|
id={id}
|
|
42
|
-
className={`sidebar-nav-item__input ${disabled ? 'sidebar-nav-item__input--disabled' : ''}`}
|
|
43
43
|
value={label}
|
|
44
44
|
onChange={(e) => onLabelChange?.(id, e.target.value)}
|
|
45
45
|
disabled={disabled}
|