@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.
Files changed (30) hide show
  1. package/dist/index.js +1 -0
  2. package/dist/v2/components/WYSIWYGEditor/Icons.d.ts +2 -0
  3. package/dist/v2/components/WYSIWYGEditor/Icons.d.ts.map +1 -1
  4. package/dist/v2/components/WYSIWYGEditor/Icons.js +28 -2
  5. package/dist/v2/components/WYSIWYGEditor/WYSIWYGEditor.d.ts +1 -0
  6. package/dist/v2/components/WYSIWYGEditor/WYSIWYGEditor.d.ts.map +1 -1
  7. package/dist/v2/components/WYSIWYGEditor/WYSIWYGEditor.js +156 -17
  8. package/dist/v2/components/WYSIWYGEditor/WYSIWYGEditor.scss.js +1 -1
  9. package/dist/v2/icons/index.js +6 -8
  10. package/dist/v2/navigation/DashboardLayout/index.d.ts +1 -0
  11. package/dist/v2/navigation/DashboardLayout/index.d.ts.map +1 -1
  12. package/dist/v2/navigation/index.d.ts +1 -1
  13. package/dist/v2/navigation/index.d.ts.map +1 -1
  14. package/dist/v2/pages/Settings/components/SidebarCustomisation.d.ts.map +1 -1
  15. package/dist/v2/pages/Settings/components/SidebarCustomisation.js +12 -5
  16. package/dist/v2/pages/Settings/components/SidebarCustomisation.scss.js +1 -1
  17. package/dist/v2/styles/form/NewInput.scss +2 -3
  18. package/dist/v2/styles/form/NewInput.scss.js +1 -1
  19. package/package.json +3 -3
  20. package/src/v2/components/WYSIWYGEditor/Icons.tsx +13 -1
  21. package/src/v2/components/WYSIWYGEditor/WYSIWYGEditor.scss +40 -58
  22. package/src/v2/components/WYSIWYGEditor/WYSIWYGEditor.tsx +166 -10
  23. package/src/v2/icons/index.tsx +2 -2
  24. package/src/v2/navigation/DashboardLayout/index.ts +3 -0
  25. package/src/v2/navigation/Navigation/Navigation.tsx +1 -1
  26. package/src/v2/navigation/NavigationItem/NavigationItem.stories.tsx +1 -1
  27. package/src/v2/navigation/index.ts +1 -1
  28. package/src/v2/pages/Settings/components/SidebarCustomisation.scss +72 -18
  29. package/src/v2/pages/Settings/components/SidebarCustomisation.tsx +10 -4
  30. package/src/v2/styles/form/NewInput.scss +2 -3
@@ -99,7 +99,7 @@ export const BookingTypesIcon = () => (
99
99
  )
100
100
 
101
101
  export const EditIcon = () => (
102
- <svg width="16" height="16" viewBox="0 0 16 16" fill="none">
103
- <path d="M11.333 2.00004C11.5081 1.82494 11.7169 1.68605 11.9473 1.59129C12.1777 1.49653 12.4251 1.44775 12.675 1.44775C12.9249 1.44775 13.1723 1.49653 13.4027 1.59129C13.6331 1.68605 13.8419 1.82494 14.017 2.00004C14.1921 2.17513 14.331 2.38394 14.4257 2.61436C14.5205 2.84478 14.5693 3.09215 14.5693 3.34204C14.5693 3.59193 14.5205 3.8393 14.4257 4.06972C14.331 4.30014 14.1921 4.50895 14.017 4.68404L5.00033 13.7007L1.33366 14.6667L2.29966 11.0007L11.333 2.00004Z" stroke="currentColor" strokeWidth="1.33" strokeLinecap="round" strokeLinejoin="round"/>
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'
@@ -13,7 +13,7 @@ import {
13
13
  AnalyticsIcon,
14
14
  PaymentsIcon,
15
15
  SettingsIcon,
16
- } from '../icons'
16
+ } from '../../icons'
17
17
  import './Navigation.scss'
18
18
 
19
19
  export interface NavigationProps {
@@ -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 '../icons'
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 './icons'
22
+ export * from '../icons'
23
23
 
@@ -15,57 +15,111 @@
15
15
  }
16
16
 
17
17
  &__title {
18
- @include typography('text.small.bold');
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
- @include typography('text.regular');
24
- color: var(--label-danger);
25
- background: none;
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
- padding: 0;
39
+ transition: background-color 0.2s ease;
29
40
 
30
41
  &:hover {
31
- text-decoration: underline;
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
- @include typography('text.regular');
40
- color: var(--label-primary);
41
- background: none;
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
- padding: 0;
66
+ transition: background-color 0.2s ease;
45
67
 
46
68
  svg {
47
- color: var(--fill-primary);
69
+ width: 20px;
70
+ height: 20px;
71
+ flex-shrink: 0;
72
+ fill: var(--fill-primary);
48
73
  }
49
74
 
50
75
  &:hover {
51
- text-decoration: underline;
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: repeat(3, 1fr);
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: repeat(3, 1fr);
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: 12px;
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
- }, [initialItems])
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
- setItems(defaultSidebarItems)
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(initialItems)
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
- font-family: var(--font-family-sans, 'Geist', sans-serif);
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);