@licklist/design 0.78.5-dev.46 → 0.78.5-dev.48
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/index.js +1 -0
- package/dist/v2/components/WYSIWYGEditor/Icons.d.ts +2 -0
- package/dist/v2/components/WYSIWYGEditor/Icons.d.ts.map +1 -1
- package/dist/v2/components/WYSIWYGEditor/Icons.js +28 -2
- package/dist/v2/components/WYSIWYGEditor/WYSIWYGEditor.d.ts +1 -0
- package/dist/v2/components/WYSIWYGEditor/WYSIWYGEditor.d.ts.map +1 -1
- package/dist/v2/components/WYSIWYGEditor/WYSIWYGEditor.js +156 -17
- package/dist/v2/components/WYSIWYGEditor/WYSIWYGEditor.scss.js +1 -1
- package/dist/v2/icons/index.js +6 -8
- package/dist/v2/navigation/DashboardLayout/index.d.ts +1 -0
- package/dist/v2/navigation/DashboardLayout/index.d.ts.map +1 -1
- package/dist/v2/navigation/index.d.ts +1 -1
- package/dist/v2/navigation/index.d.ts.map +1 -1
- package/dist/v2/pages/Settings/components/SidebarCustomisation.d.ts.map +1 -1
- package/dist/v2/pages/Settings/components/SidebarCustomisation.js +12 -5
- package/dist/v2/pages/Settings/components/SidebarCustomisation.scss.js +1 -1
- package/dist/v2/styles/form/NewInput.scss +2 -3
- package/dist/v2/styles/form/NewInput.scss.js +1 -1
- package/package.json +3 -3
- package/src/v2/components/WYSIWYGEditor/Icons.tsx +13 -1
- package/src/v2/components/WYSIWYGEditor/WYSIWYGEditor.scss +40 -58
- package/src/v2/components/WYSIWYGEditor/WYSIWYGEditor.tsx +166 -10
- package/src/v2/icons/index.tsx +2 -2
- package/src/v2/navigation/DashboardLayout/index.ts +3 -0
- package/src/v2/navigation/Navigation/Navigation.tsx +1 -1
- package/src/v2/navigation/NavigationItem/NavigationItem.stories.tsx +1 -1
- package/src/v2/navigation/index.ts +1 -1
- package/src/v2/pages/Settings/components/SidebarCustomisation.scss +72 -18
- package/src/v2/pages/Settings/components/SidebarCustomisation.tsx +10 -4
- package/src/v2/styles/form/NewInput.scss +2 -3
package/src/v2/icons/index.tsx
CHANGED
|
@@ -99,7 +99,7 @@ export const BookingTypesIcon = () => (
|
|
|
99
99
|
)
|
|
100
100
|
|
|
101
101
|
export const EditIcon = () => (
|
|
102
|
-
<svg width="
|
|
103
|
-
<path d="
|
|
102
|
+
<svg width="24" height="24" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
103
|
+
<path d="M9 22.89H10.4142L19.7279 13.5763L18.3137 12.1621L9 21.4758V22.89ZM25 24.89H7V20.6473L20.435 7.21232C20.8256 6.8218 21.4587 6.8218 21.8492 7.21232L24.6777 10.0408C25.0682 10.4313 25.0682 11.0644 24.6777 11.455L13.2426 22.89H25V24.89ZM19.7279 10.7479L21.1421 12.1621L22.5563 10.7479L21.1421 9.33364L19.7279 10.7479Z" fill="var(--fills-main-fill-primary, #14215A)"/>
|
|
104
104
|
</svg>
|
|
105
105
|
)
|
|
@@ -18,3 +18,6 @@ export { AdminSidebar, type AdminSidebarProps } from './AdminSidebar'
|
|
|
18
18
|
export { TopNavigation, type TopNavigationProps } from './TopNavigation'
|
|
19
19
|
export { DashboardFooter, type DashboardFooterProps } from './DashboardFooter'
|
|
20
20
|
export { default } from './DashboardLayout'
|
|
21
|
+
|
|
22
|
+
// Additional icons from v2/icons
|
|
23
|
+
export { CalendarIcon, BookingsIcon, BookingTypesIcon, EditIcon } from '../../icons'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Meta, StoryObj } from '@storybook/react'
|
|
2
2
|
import React from 'react'
|
|
3
3
|
import { NavigationItem } from './NavigationItem'
|
|
4
|
-
import { DashboardIcon, CompanyIcon, SettingsIcon } from '
|
|
4
|
+
import { DashboardIcon, CompanyIcon, SettingsIcon } from '../../icons'
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
7
|
title: 'v2/Navigation/NavigationItem',
|
|
@@ -19,5 +19,5 @@ export type { SidebarUserElementProps } from './SidebarUserElement'
|
|
|
19
19
|
export { SidebarWithAuth } from './SidebarWithAuth'
|
|
20
20
|
export type { SidebarWithAuthProps } from './SidebarWithAuth'
|
|
21
21
|
export { NAVIGATION_ITEMS } from './config'
|
|
22
|
-
export * from '
|
|
22
|
+
export * from '../icons'
|
|
23
23
|
|
|
@@ -15,57 +15,111 @@
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
&__title {
|
|
18
|
-
|
|
18
|
+
font-size: 1rem;
|
|
19
|
+
font-weight: 600;
|
|
20
|
+
line-height: 1.2;
|
|
21
|
+
color: var(--label-primary);
|
|
19
22
|
margin: 0;
|
|
20
23
|
}
|
|
21
24
|
|
|
22
25
|
&__cancel-btn {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
+
display: inline-flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
justify-content: center;
|
|
29
|
+
height: 36px;
|
|
30
|
+
padding: 0 12px;
|
|
31
|
+
border-radius: 6px;
|
|
26
32
|
border: none;
|
|
33
|
+
background: transparent;
|
|
34
|
+
color: var(--label-danger);
|
|
35
|
+
font-size: 14px;
|
|
36
|
+
font-weight: 500;
|
|
37
|
+
white-space: nowrap;
|
|
27
38
|
cursor: pointer;
|
|
28
|
-
|
|
39
|
+
transition: background-color 0.2s ease;
|
|
29
40
|
|
|
30
41
|
&:hover {
|
|
31
|
-
|
|
42
|
+
background-color: var(--surface-danger-soft, rgba(239, 68, 68, 0.1));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&:focus-visible {
|
|
46
|
+
outline: 2px solid var(--border-action);
|
|
47
|
+
outline-offset: 2px;
|
|
32
48
|
}
|
|
33
49
|
}
|
|
34
50
|
|
|
35
51
|
&__edit-btn {
|
|
36
|
-
display: flex;
|
|
52
|
+
display: inline-flex;
|
|
37
53
|
align-items: center;
|
|
54
|
+
justify-content: center;
|
|
38
55
|
gap: 6px;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
56
|
+
height: 36px;
|
|
57
|
+
padding: 0 12px 0 4px;
|
|
58
|
+
border-radius: 6px;
|
|
42
59
|
border: none;
|
|
60
|
+
background: transparent;
|
|
61
|
+
color: var(--label-primary);
|
|
62
|
+
font-size: 14px;
|
|
63
|
+
font-weight: 500;
|
|
64
|
+
white-space: nowrap;
|
|
43
65
|
cursor: pointer;
|
|
44
|
-
|
|
66
|
+
transition: background-color 0.2s ease;
|
|
45
67
|
|
|
46
68
|
svg {
|
|
47
|
-
|
|
69
|
+
width: 20px;
|
|
70
|
+
height: 20px;
|
|
71
|
+
flex-shrink: 0;
|
|
72
|
+
fill: var(--fill-primary);
|
|
48
73
|
}
|
|
49
74
|
|
|
50
75
|
&:hover {
|
|
51
|
-
|
|
76
|
+
background-color: var(--surface-tertiary);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
&:focus-visible {
|
|
80
|
+
outline: 2px solid var(--border-action);
|
|
81
|
+
outline-offset: 2px;
|
|
52
82
|
}
|
|
53
83
|
}
|
|
54
84
|
|
|
55
|
-
// Edit mode grid
|
|
85
|
+
// Edit mode grid - responsive columns
|
|
56
86
|
&__grid {
|
|
57
87
|
display: grid;
|
|
58
|
-
grid-template-columns:
|
|
88
|
+
grid-template-columns: 1fr;
|
|
59
89
|
gap: 16px;
|
|
60
90
|
width: 100%;
|
|
91
|
+
|
|
92
|
+
@media (min-width: 768px) {
|
|
93
|
+
grid-template-columns: repeat(2, 1fr);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
@media (min-width: 1024px) {
|
|
97
|
+
grid-template-columns: repeat(3, 1fr);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
@media (min-width: 1536px) {
|
|
101
|
+
grid-template-columns: repeat(4, 1fr);
|
|
102
|
+
}
|
|
61
103
|
}
|
|
62
104
|
|
|
63
|
-
// View mode grid
|
|
105
|
+
// View mode grid - responsive columns
|
|
64
106
|
&__view-grid {
|
|
65
107
|
display: grid;
|
|
66
|
-
grid-template-columns:
|
|
108
|
+
grid-template-columns: 1fr;
|
|
67
109
|
gap: 12px;
|
|
68
110
|
width: 100%;
|
|
111
|
+
|
|
112
|
+
@media (min-width: 768px) {
|
|
113
|
+
grid-template-columns: repeat(2, 1fr);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
@media (min-width: 1024px) {
|
|
117
|
+
grid-template-columns: repeat(3, 1fr);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
@media (min-width: 1536px) {
|
|
121
|
+
grid-template-columns: repeat(4, 1fr);
|
|
122
|
+
}
|
|
69
123
|
}
|
|
70
124
|
|
|
71
125
|
&__view-item {
|
|
@@ -108,7 +162,7 @@
|
|
|
108
162
|
&__actions {
|
|
109
163
|
display: flex;
|
|
110
164
|
align-items: center;
|
|
111
|
-
gap:
|
|
165
|
+
gap: 24px;
|
|
112
166
|
margin-top: 8px;
|
|
113
167
|
}
|
|
114
168
|
|
|
@@ -49,37 +49,43 @@ export const SidebarCustomisation: React.FC<SidebarCustomisationProps> = ({
|
|
|
49
49
|
onCancel,
|
|
50
50
|
}) => {
|
|
51
51
|
const [items, setItems] = useState<SidebarItem[]>(initialItems)
|
|
52
|
+
const [itemsBeforeEdit, setItemsBeforeEdit] = useState<SidebarItem[]>(initialItems)
|
|
52
53
|
const [isEditing, setIsEditing] = useState(false)
|
|
53
54
|
|
|
54
55
|
useEffect(() => {
|
|
55
56
|
setItems(initialItems)
|
|
56
|
-
|
|
57
|
+
if (!isEditing) {
|
|
58
|
+
setItemsBeforeEdit(initialItems)
|
|
59
|
+
}
|
|
60
|
+
}, [initialItems, isEditing])
|
|
57
61
|
|
|
58
62
|
const handleLabelChange = (id: string, newLabel: string) => {
|
|
59
63
|
const updatedItems = items.map((item) =>
|
|
60
64
|
item.id === id ? { ...item, label: newLabel } : item
|
|
61
65
|
)
|
|
62
66
|
setItems(updatedItems)
|
|
63
|
-
onItemsChange?.(updatedItems)
|
|
64
67
|
}
|
|
65
68
|
|
|
66
69
|
const handleSave = () => {
|
|
70
|
+
onItemsChange?.(items)
|
|
67
71
|
onSave?.(items)
|
|
72
|
+
setItemsBeforeEdit(items)
|
|
68
73
|
setIsEditing(false)
|
|
69
74
|
}
|
|
70
75
|
|
|
71
76
|
const handleReset = () => {
|
|
72
|
-
|
|
77
|
+
// Reset to defaults in UI - parent handles the actual default values
|
|
73
78
|
onReset?.()
|
|
74
79
|
}
|
|
75
80
|
|
|
76
81
|
const handleCancel = () => {
|
|
77
|
-
setItems(
|
|
82
|
+
setItems(itemsBeforeEdit)
|
|
78
83
|
onCancel?.()
|
|
79
84
|
setIsEditing(false)
|
|
80
85
|
}
|
|
81
86
|
|
|
82
87
|
const handleEdit = () => {
|
|
88
|
+
setItemsBeforeEdit(items)
|
|
83
89
|
setIsEditing(true)
|
|
84
90
|
}
|
|
85
91
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/* New Form Input Styles based on Figma design tokens */
|
|
2
|
+
@import '../../styles/tokens/typography';
|
|
2
3
|
|
|
3
4
|
.new-form-input {
|
|
4
5
|
display: flex;
|
|
@@ -36,9 +37,7 @@
|
|
|
36
37
|
}
|
|
37
38
|
|
|
38
39
|
&__input {
|
|
39
|
-
|
|
40
|
-
font-size: var(--text-regular-size, 15px);
|
|
41
|
-
line-height: var(--text-regular-line, 20px);
|
|
40
|
+
@include typography('text.regular');
|
|
42
41
|
flex: 1 0 0;
|
|
43
42
|
background-color: var(--surfaces-main-background-secondary);
|
|
44
43
|
border: 2px solid var(--border-primary);
|