@licklist/design 0.78.5-dev.59 → 0.78.5-dev.60

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 (77) hide show
  1. package/dist/index.d.ts +3 -1
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +8 -2
  4. package/dist/v2/components/Button/Button.scss.js +1 -1
  5. package/dist/v2/components/Checkbox/Checkbox.scss.js +1 -1
  6. package/dist/v2/components/IconButton/IconButton.d.ts +9 -0
  7. package/dist/v2/components/IconButton/IconButton.d.ts.map +1 -0
  8. package/dist/v2/components/IconButton/IconButton.js +137 -0
  9. package/dist/v2/components/IconButton/IconButton.scss.js +6 -0
  10. package/dist/v2/components/IconButton/index.d.ts +3 -0
  11. package/dist/v2/components/IconButton/index.d.ts.map +1 -0
  12. package/dist/v2/components/NewInput/NewInput.d.ts.map +1 -1
  13. package/dist/v2/components/NewInput/NewInput.js +4 -3
  14. package/dist/v2/components/ZoneCard/AddResourceButton.d.ts +8 -0
  15. package/dist/v2/components/ZoneCard/AddResourceButton.d.ts.map +1 -0
  16. package/dist/v2/components/ZoneCard/AddResourceButton.js +17 -0
  17. package/dist/v2/components/ZoneCard/ResourceRow.d.ts +17 -0
  18. package/dist/v2/components/ZoneCard/ResourceRow.d.ts.map +1 -0
  19. package/dist/v2/components/ZoneCard/ResourceRow.js +127 -0
  20. package/dist/v2/components/ZoneCard/ZoneCard.d.ts +26 -0
  21. package/dist/v2/components/ZoneCard/ZoneCard.d.ts.map +1 -0
  22. package/dist/v2/components/ZoneCard/ZoneCard.js +44 -0
  23. package/dist/v2/components/ZoneCard/ZoneCard.scss.js +6 -0
  24. package/dist/v2/components/ZoneCard/ZoneContainer.d.ts +12 -0
  25. package/dist/v2/components/ZoneCard/ZoneContainer.d.ts.map +1 -0
  26. package/dist/v2/components/ZoneCard/ZoneContainer.js +16 -0
  27. package/dist/v2/components/ZoneCard/ZoneHeader.d.ts +15 -0
  28. package/dist/v2/components/ZoneCard/ZoneHeader.d.ts.map +1 -0
  29. package/dist/v2/components/ZoneCard/ZoneHeader.js +102 -0
  30. package/dist/v2/components/ZoneCard/index.d.ts +11 -0
  31. package/dist/v2/components/ZoneCard/index.d.ts.map +1 -0
  32. package/dist/v2/components/index.d.ts +5 -1
  33. package/dist/v2/components/index.d.ts.map +1 -1
  34. package/dist/v2/icons/index.d.ts +16 -0
  35. package/dist/v2/icons/index.d.ts.map +1 -1
  36. package/dist/v2/icons/index.js +57 -1
  37. package/dist/v2/index.d.ts +10 -0
  38. package/dist/v2/index.d.ts.map +1 -1
  39. package/dist/v2/pages/Settings/components/SidebarCustomisation.js +5 -0
  40. package/dist/v2/pages/Settings/components/SidebarNavItem.js +5 -0
  41. package/dist/v2/pages/ZonesResources/ZonesResourcesPage.d.ts +12 -0
  42. package/dist/v2/pages/ZonesResources/ZonesResourcesPage.d.ts.map +1 -0
  43. package/dist/v2/pages/ZonesResources/ZonesResourcesPage.js +43 -0
  44. package/dist/v2/pages/ZonesResources/ZonesResourcesPage.scss.js +6 -0
  45. package/dist/v2/pages/ZonesResources/index.d.ts +3 -0
  46. package/dist/v2/pages/ZonesResources/index.d.ts.map +1 -0
  47. package/dist/v2/styles/components/Button.scss +1 -0
  48. package/dist/v2/styles/form/NewInput.scss +10 -6
  49. package/dist/v2/styles/form/NewInput.scss.js +1 -1
  50. package/package.json +1 -1
  51. package/src/index.ts +3 -1
  52. package/src/v2/components/ActionMenu/ActionMenu.stories.tsx +58 -0
  53. package/src/v2/components/ActionMenu/ActionMenu.tsx +1 -1
  54. package/src/v2/components/Checkbox/Checkbox.scss +1 -1
  55. package/src/v2/components/IconButton/IconButton.scss +75 -0
  56. package/src/v2/components/IconButton/IconButton.stories.tsx +51 -0
  57. package/src/v2/components/IconButton/IconButton.tsx +50 -0
  58. package/src/v2/components/IconButton/index.ts +2 -0
  59. package/src/v2/components/NewInput/NewInput.tsx +2 -1
  60. package/src/v2/components/NewPageHeader/NewPageHeader.stories.tsx +28 -0
  61. package/src/v2/components/ZoneCard/AddResourceButton.tsx +20 -0
  62. package/src/v2/components/ZoneCard/ResourceRow.tsx +64 -0
  63. package/src/v2/components/ZoneCard/ZoneCard.scss +142 -0
  64. package/src/v2/components/ZoneCard/ZoneCard.stories.tsx +140 -0
  65. package/src/v2/components/ZoneCard/ZoneCard.tsx +72 -0
  66. package/src/v2/components/ZoneCard/ZoneContainer.tsx +26 -0
  67. package/src/v2/components/ZoneCard/ZoneHeader.tsx +45 -0
  68. package/src/v2/components/ZoneCard/index.ts +14 -0
  69. package/src/v2/components/index.ts +11 -1
  70. package/src/v2/icons/index.tsx +24 -0
  71. package/src/v2/index.ts +21 -0
  72. package/src/v2/pages/ZonesResources/ZonesResourcesPage.scss +22 -0
  73. package/src/v2/pages/ZonesResources/ZonesResourcesPage.stories.tsx +46 -0
  74. package/src/v2/pages/ZonesResources/ZonesResourcesPage.tsx +45 -0
  75. package/src/v2/pages/ZonesResources/index.ts +2 -0
  76. package/src/v2/styles/components/Button.scss +1 -0
  77. package/src/v2/styles/form/NewInput.scss +10 -6
@@ -0,0 +1,72 @@
1
+ import React from 'react'
2
+ import { ActionMenuItem } from '../ActionMenu'
3
+ import { ZoneContainer } from './ZoneContainer'
4
+ import { ZoneHeader } from './ZoneHeader'
5
+ import { ResourceRow } from './ResourceRow'
6
+ import { AddResourceButton } from './AddResourceButton'
7
+ import { DragHandleProps } from './ZoneContainer'
8
+
9
+ export interface ZoneResource {
10
+ id: string
11
+ name: string
12
+ quantity: number
13
+ capacity: number
14
+ menuItems?: ActionMenuItem[]
15
+ dragHandleProps?: DragHandleProps
16
+ }
17
+
18
+ export interface ZoneCardProps {
19
+ name: string
20
+ status?: 'active' | 'disabled'
21
+ totalCapacity: number
22
+ resources?: ZoneResource[]
23
+ menuItems?: ActionMenuItem[]
24
+ onAddResource?: () => void
25
+ className?: string
26
+ draggable?: boolean
27
+ onResourceClick?: (resource: ZoneResource) => void
28
+ dragHandleProps?: DragHandleProps
29
+ style?: React.CSSProperties
30
+ }
31
+
32
+ export const ZoneCard = React.forwardRef<HTMLDivElement, ZoneCardProps>(({
33
+ name,
34
+ status = 'active',
35
+ totalCapacity,
36
+ resources = [],
37
+ menuItems = [],
38
+ onAddResource,
39
+ className = '',
40
+ draggable = true,
41
+ onResourceClick,
42
+ dragHandleProps,
43
+ style,
44
+ }, ref) => {
45
+ return (
46
+ <ZoneContainer ref={ref} className={className} style={style}>
47
+ <ZoneHeader
48
+ name={name}
49
+ status={status}
50
+ totalCapacity={totalCapacity}
51
+ menuItems={menuItems}
52
+ draggable={draggable}
53
+ dragHandleProps={dragHandleProps}
54
+ />
55
+ {resources.map((resource) => (
56
+ <ResourceRow
57
+ key={resource.id}
58
+ name={resource.name}
59
+ quantity={resource.quantity}
60
+ capacity={resource.capacity}
61
+ menuItems={resource.menuItems}
62
+ draggable={draggable}
63
+ dragHandleProps={resource.dragHandleProps}
64
+ onClick={onResourceClick ? () => onResourceClick(resource) : undefined}
65
+ />
66
+ ))}
67
+ {onAddResource && <AddResourceButton onClick={onAddResource} />}
68
+ </ZoneContainer>
69
+ )
70
+ })
71
+
72
+ ZoneCard.displayName = 'ZoneCard'
@@ -0,0 +1,26 @@
1
+ import React from 'react'
2
+ import './ZoneCard.scss'
3
+
4
+ export interface DragHandleProps {
5
+ [key: string]: unknown
6
+ }
7
+
8
+ export interface ZoneContainerProps {
9
+ children: React.ReactNode
10
+ className?: string
11
+ style?: React.CSSProperties
12
+ }
13
+
14
+ export const ZoneContainer = React.forwardRef<HTMLDivElement, ZoneContainerProps>(({
15
+ children,
16
+ className = '',
17
+ style,
18
+ }, ref) => {
19
+ return (
20
+ <div ref={ref} className={`zone-card ${className}`} style={style}>
21
+ {children}
22
+ </div>
23
+ )
24
+ })
25
+
26
+ ZoneContainer.displayName = 'ZoneContainer'
@@ -0,0 +1,45 @@
1
+ import React from 'react'
2
+ import { Badge } from '../Badge'
3
+ import { ActionMenu, ActionMenuItem } from '../ActionMenu'
4
+ import { GripVerticalIcon } from '../../icons'
5
+ import { DragHandleProps } from './ZoneContainer'
6
+ import './ZoneCard.scss'
7
+
8
+ export interface ZoneHeaderProps {
9
+ name: string
10
+ status?: 'active' | 'disabled'
11
+ totalCapacity: number
12
+ menuItems?: ActionMenuItem[]
13
+ draggable?: boolean
14
+ dragHandleProps?: DragHandleProps
15
+ className?: string
16
+ }
17
+
18
+ export const ZoneHeader: React.FC<ZoneHeaderProps> = ({
19
+ name,
20
+ status = 'active',
21
+ totalCapacity,
22
+ menuItems = [],
23
+ draggable = true,
24
+ dragHandleProps,
25
+ className = '',
26
+ }) => {
27
+ const statusVariant = status === 'active' ? 'success' : 'neutral'
28
+ const statusLabel = status.charAt(0).toUpperCase() + status.slice(1)
29
+
30
+ return (
31
+ <div className={`zone-card__header ${className}`}>
32
+ {draggable && (
33
+ <div className="zone-card__drag-handle" {...dragHandleProps}>
34
+ {GripVerticalIcon({ width: 16, height: 16 })}
35
+ </div>
36
+ )}
37
+ <span className="zone-card__name">{name}</span>
38
+ <div className="zone-card__header-right">
39
+ <Badge variant={statusVariant}>{statusLabel}</Badge>
40
+ <span className="zone-card__total">Total: {totalCapacity}</span>
41
+ {menuItems.length > 0 && <ActionMenu items={menuItems} />}
42
+ </div>
43
+ </div>
44
+ )
45
+ }
@@ -0,0 +1,14 @@
1
+ export { ZoneCard } from './ZoneCard'
2
+ export type { ZoneCardProps, ZoneResource } from './ZoneCard'
3
+
4
+ export { ZoneContainer } from './ZoneContainer'
5
+ export type { ZoneContainerProps, DragHandleProps } from './ZoneContainer'
6
+
7
+ export { ZoneHeader } from './ZoneHeader'
8
+ export type { ZoneHeaderProps } from './ZoneHeader'
9
+
10
+ export { ResourceRow } from './ResourceRow'
11
+ export type { ResourceRowProps } from './ResourceRow'
12
+
13
+ export { AddResourceButton } from './AddResourceButton'
14
+ export type { AddResourceButtonProps } from './AddResourceButton'
@@ -1,3 +1,6 @@
1
+ export { IconButton } from './IconButton'
2
+ export type { IconButtonProps } from './IconButton'
3
+
1
4
  export { Badge } from './Badge'
2
5
  export type { BadgeProps } from './Badge'
3
6
 
@@ -58,6 +61,9 @@ export { NPSScore } from './NPSScore'
58
61
  export { Pagination } from './Pagination'
59
62
  export type { PaginationProps } from './Pagination'
60
63
 
64
+ export { ZoneCard, ZoneContainer, ZoneHeader, ResourceRow, AddResourceButton } from './ZoneCard'
65
+ export type { ZoneCardProps, ZoneResource, ZoneContainerProps, DragHandleProps, ZoneHeaderProps, ResourceRowProps, AddResourceButtonProps } from './ZoneCard'
66
+
61
67
  // Icons
62
68
  export {
63
69
  InfoIcon,
@@ -74,6 +80,10 @@ export {
74
80
  ClearIcon,
75
81
  CloseIcon,
76
82
  EllipsisIcon,
77
- CircleIcon
83
+ CircleIcon,
84
+ GripVerticalIcon,
85
+ PlusIcon,
86
+ DeleteIcon,
87
+ ClockIcon
78
88
  } from '../icons'
79
89
 
@@ -193,6 +193,18 @@ export const ArrowDownIcon = () => (
193
193
  </svg>
194
194
  )
195
195
 
196
+ export const GripVerticalIcon = ({ width = 16, height = 16 }: { width?: number; height?: number } = {}) => (
197
+ <svg width={width} height={height} viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
198
+ <path d="M14 10C14 11.1046 13.1046 12 12 12C10.8954 12 10 11.1046 10 10C10 8.89543 10.8954 8 12 8C13.1046 8 14 8.89543 14 10ZM14 16C14 17.1046 13.1046 18 12 18C10.8954 18 10 17.1046 10 16C10 14.8954 10.8954 14 12 14C13.1046 14 14 14.8954 14 16ZM14 22C14 23.1046 13.1046 24 12 24C10.8954 24 10 23.1046 10 22C10 20.8954 10.8954 20 12 20C13.1046 20 14 20.8954 14 22ZM22 10C22 11.1046 21.1046 12 20 12C18.8954 12 18 11.1046 18 10C18 8.89543 18.8954 8 20 8C21.1046 8 22 8.89543 22 10ZM22 16C22 17.1046 21.1046 18 20 18C18.8954 18 18 17.1046 18 16C18 14.8954 18.8954 14 20 14C21.1046 14 22 14.8954 22 16ZM22 22C22 23.1046 21.1046 24 20 24C18.8954 24 18 23.1046 18 22C18 20.8954 18.8954 20 20 20C21.1046 20 22 20.8954 22 22Z" fill="currentColor"/>
199
+ </svg>
200
+ )
201
+
202
+ export const PlusIcon = ({ width = 16, height = 16 }: { width?: number; height?: number } = {}) => (
203
+ <svg width={width} height={height} viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
204
+ <path d="M17 14.5H24.5V17.5H17V25H14V17.5H6.5V14.5H14V7H17V14.5Z" fill="currentColor"/>
205
+ </svg>
206
+ )
207
+
196
208
  export const CloseIcon = ({width = 24, height = 24, ...props
197
209
  }: React.SVGProps<SVGSVGElement> & { width?: number; height?: number }) => (
198
210
  <svg
@@ -221,5 +233,17 @@ export const CircleIcon = ({ width = 32, height = 32, fill = 'var(--surface-acti
221
233
  </svg>
222
234
  )
223
235
 
236
+ export const DeleteIcon = ({ width = 24, height = 24 }: { width?: number; height?: number } = {}) => (
237
+ <svg width={width} height={height} viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
238
+ <path d="M21 10H26V12H24V25C24 25.5523 23.5523 26 23 26H9C8.44772 26 8 25.5523 8 25V12H6V10H11V7C11 6.44772 11.4477 6 12 6H20C20.5523 6 21 6.44772 21 7V10ZM22 12H10V24H22V12ZM13 15H15V21H13V15ZM17 15H19V21H17V15ZM13 8V10H19V8H13Z" fill="currentColor" />
239
+ </svg>
240
+ )
241
+
242
+ export const ClockIcon = ({ width = 20, height = 20 }: { width?: number; height?: number } = {}) => (
243
+ <svg width={width} height={height} viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
244
+ <path d="M16 28C9.37258 28 4 22.6274 4 16C4 9.37258 9.37258 4 16 4C22.6274 4 28 9.37258 28 16C28 22.6274 22.6274 28 16 28ZM16 26C21.5228 26 26 21.5228 26 16C26 10.4772 21.5228 6 16 6C10.4772 6 6 10.4772 6 16C6 21.5228 10.4772 26 16 26ZM17 9V15.5858L21.2426 19.8284L19.8284 21.2426L15 16.4142V9H17Z" fill="currentColor" />
245
+ </svg>
246
+ )
247
+
224
248
 
225
249
 
package/src/v2/index.ts CHANGED
@@ -21,6 +21,19 @@ export type { AlertProps, AlertVariant } from './components/Alert'
21
21
  export { Button } from './components/Button'
22
22
  export type { ButtonProps } from './components/Button'
23
23
 
24
+ // NewInput Component
25
+ export { NewInput } from './components/NewInput'
26
+ export type { NewInputProps } from './components/NewInput'
27
+
28
+ // Checkbox Component
29
+ export { Checkbox } from './components/Checkbox'
30
+ export type { CheckboxProps } from './components/Checkbox'
31
+
32
+ // NewPageHeader Component
33
+ export { NewPageHeader } from './components/NewPageHeader'
34
+ export type { NewPageHeaderProps } from './components/NewPageHeader'
35
+
36
+
24
37
  // EntityHeader Component
25
38
  export { EntityHeader } from './components/EntityHeader'
26
39
  export type { EntityHeaderProps } from './components/EntityHeader'
@@ -36,6 +49,14 @@ export type { NPSScoreProps, NPSSubmitData } from './components/NPSScore'
36
49
  export { UserPanel } from './components/UserPanel'
37
50
  export type { UserPanelProps } from './components/UserPanel'
38
51
 
52
+ // ZoneCard Components
53
+ export { ZoneCard, ZoneContainer, ZoneHeader, ResourceRow, AddResourceButton } from './components/ZoneCard'
54
+ export type { ZoneCardProps, ZoneResource, ZoneContainerProps, DragHandleProps, ZoneHeaderProps, ResourceRowProps, AddResourceButtonProps } from './components/ZoneCard'
55
+
56
+ // ZonesResources Page
57
+ export { ZonesResourcesPage } from './pages/ZonesResources'
58
+ export type { ZonesResourcesPageProps } from './pages/ZonesResources'
59
+
39
60
  // ============================================================================
40
61
  // Navigation Components
41
62
  // ============================================================================
@@ -0,0 +1,22 @@
1
+ .zones-resources-page {
2
+ display: flex;
3
+ flex-direction: column;
4
+ align-self: stretch;
5
+
6
+ &__back {
7
+ padding: 24px 32px 0 32px;
8
+ align-self: flex-start;
9
+
10
+ @media (max-width: 768px) {
11
+ padding: 16px 16px 0 16px;
12
+ }
13
+ }
14
+
15
+ &__content {
16
+ padding: 24px 32px;
17
+
18
+ @media (max-width: 768px) {
19
+ padding: 16px;
20
+ }
21
+ }
22
+ }
@@ -0,0 +1,46 @@
1
+ import React from 'react'
2
+ import { Meta, StoryObj } from '@storybook/react'
3
+ import { ZonesResourcesPage } from './ZonesResourcesPage'
4
+
5
+ export default {
6
+ title: 'v2/Pages/ZonesResourcesPage',
7
+ component: ZonesResourcesPage,
8
+ parameters: {
9
+ layout: 'fullscreen',
10
+ },
11
+ } as Meta<typeof ZonesResourcesPage>
12
+
13
+ type Story = StoryObj<typeof ZonesResourcesPage>
14
+
15
+ export const Default: Story = {
16
+ args: {
17
+ onBack: () => alert('Back to Settings'),
18
+ onAction: () => alert('Add Zone clicked'),
19
+ },
20
+ }
21
+
22
+ export const WithContent: Story = {
23
+ args: {
24
+ onBack: () => alert('Back to Settings'),
25
+ onAction: () => alert('Add Zone clicked'),
26
+ children: (
27
+ <div style={{ padding: '16px', border: '1px solid var(--border-primary)', borderRadius: '8px' }}>
28
+ <p style={{ color: 'var(--label-secondary)', fontFamily: 'var(--font-family-sans)' }}>
29
+ Zone and resource content goes here
30
+ </p>
31
+ </div>
32
+ ),
33
+ },
34
+ }
35
+
36
+ export const WithoutBackButton: Story = {
37
+ args: {
38
+ onAction: () => alert('Add Zone clicked'),
39
+ },
40
+ }
41
+
42
+ export const WithoutAction: Story = {
43
+ args: {
44
+ onBack: () => alert('Back to Settings'),
45
+ },
46
+ }
@@ -0,0 +1,45 @@
1
+ import React from 'react'
2
+ import { IconButton } from '../../components/IconButton'
3
+ import { NewPageHeader } from '../../components/NewPageHeader'
4
+ import { Button, ButtonText } from '../../components/Button'
5
+ import './ZonesResourcesPage.scss'
6
+
7
+ export interface ZonesResourcesPageProps {
8
+ title?: string
9
+ backLabel?: string
10
+ onBack?: () => void
11
+ actionLabel?: string
12
+ onAction?: () => void
13
+ children?: React.ReactNode
14
+ }
15
+
16
+ export const ZonesResourcesPage: React.FC<ZonesResourcesPageProps> = ({
17
+ title = 'Zones & Resources',
18
+ backLabel = 'Back to Settings',
19
+ onBack,
20
+ actionLabel = '+ Add Zone',
21
+ onAction,
22
+ children,
23
+ }) => {
24
+ return (
25
+ <div className="zones-resources-page">
26
+ {onBack && (
27
+ <div className="zones-resources-page__back">
28
+ <IconButton label={backLabel} onClick={onBack} />
29
+ </div>
30
+ )}
31
+ <NewPageHeader
32
+ title={title}
33
+ showDivider
34
+ renderRight={onAction ? () => (
35
+ <Button variant="primary" onClick={onAction}>
36
+ <ButtonText color="white">{actionLabel}</ButtonText>
37
+ </Button>
38
+ ) : undefined}
39
+ />
40
+ <div className="zones-resources-page__content">
41
+ {children}
42
+ </div>
43
+ </div>
44
+ )
45
+ }
@@ -0,0 +1,2 @@
1
+ export { ZonesResourcesPage } from './ZonesResourcesPage'
2
+ export type { ZonesResourcesPageProps } from './ZonesResourcesPage'
@@ -105,6 +105,7 @@
105
105
  &--destructive-soft {
106
106
  border-radius: var(--radius-reg, 8px);
107
107
  background: var(--surface-danger-soft, #fceceb);
108
+ color: var(--label-danger);
108
109
 
109
110
  &:hover {
110
111
  background-color: var(--surface-danger-soft-hover, #f5c4c2);
@@ -15,16 +15,20 @@
15
15
  font-style: normal;
16
16
  font-weight: 600;
17
17
  line-height: 20px;
18
- color: var(--label-primary, #121E52);
19
- display: block;
18
+ color: var(--label-primary);
19
+ display: flex;
20
+ align-items: center;
21
+ justify-content: space-between;
22
+ width: 100%;
20
23
  }
21
24
 
22
25
  &__label-optional {
23
26
  font-family: var(--font-family-sans, 'Geist', sans-serif);
24
- font-size: 15px;
25
- font-weight: 600;
26
- line-height: 20px;
27
- color: var(--label-primary, #121E52);
27
+ font-size: 13px;
28
+ font-weight: 400;
29
+ font-style: normal;
30
+ line-height: 16px;
31
+ color: var(--label-secondary);
28
32
  }
29
33
 
30
34