@lateralus-ai/shipping-ui 2.0.0-dev.19 → 2.0.0-dev.21

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 (72) hide show
  1. package/dist/components/Tabs.d.ts +1 -1
  2. package/dist/domain/Filters/FilterDropdown.d.ts +93 -0
  3. package/dist/domain/Filters/FilterPill.d.ts +12 -5
  4. package/dist/domain/Filters/FilterPills.d.ts +21 -0
  5. package/dist/domain/Filters/FilteredPill.d.ts +15 -5
  6. package/dist/domain/Filters/formatActiveFilterChipLabel.d.ts +11 -0
  7. package/dist/domain/Filters/index.d.ts +8 -3
  8. package/dist/index.cjs +33 -33
  9. package/dist/index.esm.js +7301 -5991
  10. package/package.json +2 -1
  11. package/src/components/EmptyState.tsx +44 -44
  12. package/src/components/Modal.tsx +141 -141
  13. package/src/components/PageHeader.tsx +132 -132
  14. package/src/components/ScrollableList.tsx +61 -61
  15. package/src/components/Tabs.tsx +146 -146
  16. package/src/components/index.ts +56 -56
  17. package/src/domain/Filters/FilterDropdown.tsx +438 -0
  18. package/src/domain/Filters/FilterPill.tsx +54 -18
  19. package/src/domain/Filters/FilterPills.tsx +41 -0
  20. package/src/domain/Filters/FilteredPill.tsx +40 -23
  21. package/src/domain/Filters/FiltersBar.tsx +15 -19
  22. package/src/domain/Filters/formatActiveFilterChipLabel.ts +23 -0
  23. package/src/domain/Filters/index.ts +35 -3
  24. package/src/icons/arrow-paths.ts +8 -8
  25. package/src/icons/chevron-paths.ts +17 -17
  26. package/src/icons/icons-data.ts +656 -656
  27. package/src/index.ts +85 -85
  28. package/src/patterns/Search/ResultRow.tsx +44 -44
  29. package/src/patterns/Search/SearchModal.tsx +310 -310
  30. package/src/patterns/Search/index.ts +31 -31
  31. package/src/patterns/Sidebar/assets/logo-compliance-mark.png +5 -5
  32. package/src/patterns/Sidebar/assets/logo-compliance-mask.png +13 -13
  33. package/src/patterns/Sidebar/assets/logo-compliance.svg +17 -17
  34. package/src/patterns/Sidebar/assets/logo-technical-avatar.svg +17 -17
  35. package/src/patterns/Sidebar/assets/logo-technical-mark.png +5 -5
  36. package/src/patterns/Sidebar/assets/logo-technical.svg +16 -16
  37. package/src/patterns/Skeleton/Skeleton.tsx +56 -56
  38. package/src/primitives/button-styles.ts +92 -92
  39. package/src/stories/canvases/ButtonsCanvas.tsx +107 -107
  40. package/src/stories/canvases/ButtonsMatrixCanvas.tsx +65 -65
  41. package/src/stories/canvases/ContentCanvas.tsx +353 -353
  42. package/src/stories/canvases/FiltersCanvas.tsx +156 -30
  43. package/src/stories/canvases/SearchCanvas.tsx +150 -150
  44. package/src/stories/canvases/figma-buttons-layout.ts +83 -83
  45. package/src/stories/canvases/figma-widths.ts +28 -28
  46. package/src/stories/canvases/helpers.tsx +146 -146
  47. package/src/stories/components/Buttons.stories.tsx +11 -11
  48. package/src/stories/components/Chat.stories.tsx +11 -11
  49. package/src/stories/components/Content.stories.tsx +11 -11
  50. package/src/stories/components/Core.stories.tsx +11 -11
  51. package/src/stories/components/DomainForms.stories.tsx +11 -11
  52. package/src/stories/components/Filters.stories.tsx +11 -11
  53. package/src/stories/components/Forms.stories.tsx +11 -11
  54. package/src/stories/components/Icons.stories.tsx +11 -11
  55. package/src/stories/components/Illustrations.stories.tsx +11 -11
  56. package/src/stories/components/Library.stories.tsx +11 -11
  57. package/src/stories/components/Modals.stories.tsx +11 -11
  58. package/src/stories/components/Report.stories.tsx +11 -11
  59. package/src/stories/components/ReportLayout.stories.tsx +11 -11
  60. package/src/stories/components/Search.stories.tsx +11 -11
  61. package/src/stories/components/Settings.stories.tsx +11 -11
  62. package/src/stories/components/Ships.stories.tsx +11 -11
  63. package/src/stories/components/SidebarLayouts.stories.tsx +11 -11
  64. package/src/stories/components/Skeletons.stories.tsx +11 -11
  65. package/src/stories/components/Workflows.stories.tsx +11 -11
  66. package/src/stories/style-guide/Buttons.stories.tsx +11 -11
  67. package/src/stories/style-guide/ColorTokens.stories.tsx +11 -11
  68. package/src/stories/style-guide/Colors.stories.tsx +11 -11
  69. package/src/stories/style-guide/RaiseLevels.stories.tsx +11 -11
  70. package/src/stories/style-guide/Typography.stories.tsx +11 -11
  71. package/src/tailwind-theme.ts +186 -186
  72. package/src/theme-entry.ts +2 -2
@@ -1,107 +1,107 @@
1
- import { AttachmentIcon } from "../../icons";
2
- import { Button } from "../../primitives";
3
- import { FigmaContent, FigmaPage, FigmaSection } from "../_layout";
4
- import { FIGMA_WIDTHS } from "./figma-widths";
5
- import {
6
- BUTTON_VARIANT_SLOTS,
7
- FIGMA_BUTTON_SLOTS,
8
- FIGMA_BUTTONS_CANVAS,
9
- FIGMA_BUTTONS_GRID,
10
- type ButtonVisualState,
11
- } from "./figma-buttons-layout";
12
- import { IconButtonSnapshot } from "./helpers";
13
-
14
- const demoDropdownOptions = [
15
- { label: "Option A", onSelect: () => undefined },
16
- { label: "Option B", onSelect: () => undefined },
17
- ];
18
-
19
- const slotProps = (visualState: ButtonVisualState) => ({
20
- forcedState: visualState === "idle" ? undefined : visualState,
21
- disabled: visualState === "disabled",
22
- });
23
-
24
- export const ButtonsCanvas = () => (
25
- <FigmaPage title="Buttons" width={FIGMA_WIDTHS.buttons}>
26
- <FigmaContent padding={0}>
27
- <div className="px-8 pb-8 pt-6">
28
- <FigmaSection label="Button">
29
- <div
30
- className="relative"
31
- style={{
32
- width: FIGMA_BUTTONS_CANVAS.width,
33
- height: FIGMA_BUTTONS_CANVAS.height,
34
- }}
35
- >
36
- <div
37
- data-figma-buttons-grid
38
- className="absolute left-0 top-0"
39
- style={{
40
- width: FIGMA_BUTTONS_GRID.width,
41
- height: FIGMA_BUTTONS_GRID.height,
42
- }}
43
- >
44
- {FIGMA_BUTTON_SLOTS.map((slot) => (
45
- <div
46
- key={`${slot.hierarchy}-${slot.visualState}`}
47
- className="absolute"
48
- style={{ left: slot.x, top: slot.y }}
49
- >
50
- <Button
51
- hierarchy={slot.hierarchy}
52
- icon={AttachmentIcon}
53
- dropdownOptions={demoDropdownOptions}
54
- {...slotProps(slot.visualState)}
55
- >
56
- Button
57
- </Button>
58
- </div>
59
- ))}
60
- </div>
61
-
62
- {BUTTON_VARIANT_SLOTS.map((slot) => (
63
- <div
64
- key={`${slot.hierarchy}-${slot.variant}`}
65
- data-visual-test-only
66
- className="absolute"
67
- style={{ left: slot.x, top: slot.y }}
68
- >
69
- {slot.variant === "noIcon" ? (
70
- <Button
71
- hierarchy={slot.hierarchy}
72
- dropdownOptions={demoDropdownOptions}
73
- >
74
- Button
75
- </Button>
76
- ) : (
77
- <Button hierarchy={slot.hierarchy} icon={AttachmentIcon}>
78
- Button
79
- </Button>
80
- )}
81
- </div>
82
- ))}
83
- </div>
84
- </FigmaSection>
85
-
86
- <FigmaSection label="Icon Button" className="mt-8">
87
- <div className="flex flex-wrap items-center gap-6">
88
- <IconButtonSnapshot hierarchy="tertiary" visualState="idle" />
89
- <IconButtonSnapshot hierarchy="tertiary" visualState="hover" />
90
- <IconButtonSnapshot hierarchy="quaternary" visualState="idle" />
91
- <IconButtonSnapshot hierarchy="quaternary" visualState="hover" />
92
- <IconButtonSnapshot
93
- hierarchy="quaternary"
94
- visualState="idle"
95
- size="small"
96
- />
97
- <IconButtonSnapshot
98
- hierarchy="quaternary"
99
- visualState="hover"
100
- size="small"
101
- />
102
- </div>
103
- </FigmaSection>
104
- </div>
105
- </FigmaContent>
106
- </FigmaPage>
107
- );
1
+ import { AttachmentIcon } from "../../icons";
2
+ import { Button } from "../../primitives";
3
+ import { FigmaContent, FigmaPage, FigmaSection } from "../_layout";
4
+ import { FIGMA_WIDTHS } from "./figma-widths";
5
+ import {
6
+ BUTTON_VARIANT_SLOTS,
7
+ FIGMA_BUTTON_SLOTS,
8
+ FIGMA_BUTTONS_CANVAS,
9
+ FIGMA_BUTTONS_GRID,
10
+ type ButtonVisualState,
11
+ } from "./figma-buttons-layout";
12
+ import { IconButtonSnapshot } from "./helpers";
13
+
14
+ const demoDropdownOptions = [
15
+ { label: "Option A", onSelect: () => undefined },
16
+ { label: "Option B", onSelect: () => undefined },
17
+ ];
18
+
19
+ const slotProps = (visualState: ButtonVisualState) => ({
20
+ forcedState: visualState === "idle" ? undefined : visualState,
21
+ disabled: visualState === "disabled",
22
+ });
23
+
24
+ export const ButtonsCanvas = () => (
25
+ <FigmaPage title="Buttons" width={FIGMA_WIDTHS.buttons}>
26
+ <FigmaContent padding={0}>
27
+ <div className="px-8 pb-8 pt-6">
28
+ <FigmaSection label="Button">
29
+ <div
30
+ className="relative"
31
+ style={{
32
+ width: FIGMA_BUTTONS_CANVAS.width,
33
+ height: FIGMA_BUTTONS_CANVAS.height,
34
+ }}
35
+ >
36
+ <div
37
+ data-figma-buttons-grid
38
+ className="absolute left-0 top-0"
39
+ style={{
40
+ width: FIGMA_BUTTONS_GRID.width,
41
+ height: FIGMA_BUTTONS_GRID.height,
42
+ }}
43
+ >
44
+ {FIGMA_BUTTON_SLOTS.map((slot) => (
45
+ <div
46
+ key={`${slot.hierarchy}-${slot.visualState}`}
47
+ className="absolute"
48
+ style={{ left: slot.x, top: slot.y }}
49
+ >
50
+ <Button
51
+ hierarchy={slot.hierarchy}
52
+ icon={AttachmentIcon}
53
+ dropdownOptions={demoDropdownOptions}
54
+ {...slotProps(slot.visualState)}
55
+ >
56
+ Button
57
+ </Button>
58
+ </div>
59
+ ))}
60
+ </div>
61
+
62
+ {BUTTON_VARIANT_SLOTS.map((slot) => (
63
+ <div
64
+ key={`${slot.hierarchy}-${slot.variant}`}
65
+ data-visual-test-only
66
+ className="absolute"
67
+ style={{ left: slot.x, top: slot.y }}
68
+ >
69
+ {slot.variant === "noIcon" ? (
70
+ <Button
71
+ hierarchy={slot.hierarchy}
72
+ dropdownOptions={demoDropdownOptions}
73
+ >
74
+ Button
75
+ </Button>
76
+ ) : (
77
+ <Button hierarchy={slot.hierarchy} icon={AttachmentIcon}>
78
+ Button
79
+ </Button>
80
+ )}
81
+ </div>
82
+ ))}
83
+ </div>
84
+ </FigmaSection>
85
+
86
+ <FigmaSection label="Icon Button" className="mt-8">
87
+ <div className="flex flex-wrap items-center gap-6">
88
+ <IconButtonSnapshot hierarchy="tertiary" visualState="idle" />
89
+ <IconButtonSnapshot hierarchy="tertiary" visualState="hover" />
90
+ <IconButtonSnapshot hierarchy="quaternary" visualState="idle" />
91
+ <IconButtonSnapshot hierarchy="quaternary" visualState="hover" />
92
+ <IconButtonSnapshot
93
+ hierarchy="quaternary"
94
+ visualState="idle"
95
+ size="small"
96
+ />
97
+ <IconButtonSnapshot
98
+ hierarchy="quaternary"
99
+ visualState="hover"
100
+ size="small"
101
+ />
102
+ </div>
103
+ </FigmaSection>
104
+ </div>
105
+ </FigmaContent>
106
+ </FigmaPage>
107
+ );
@@ -1,65 +1,65 @@
1
- import { AddIcon } from "../../icons";
2
- import { Button } from "../../primitives";
3
- import {
4
- FigmaContent,
5
- FigmaPage,
6
- FigmaRow,
7
- FigmaSection,
8
- } from "../_layout";
9
- import { ButtonSnapshot } from "./helpers";
10
- import { FIGMA_WIDTHS } from "./figma-widths";
11
-
12
- const hierarchies = [
13
- "primary",
14
- "secondary",
15
- "tertiary",
16
- "quaternary",
17
- "destructive",
18
- ] as const;
19
- const columnLabels = ["Primary", "Secondary", "Tertiary", "Quaternary", "Destructive"];
20
- const rowLabels = ["Idle", "Hover", "Disabled"];
21
-
22
- export const ButtonsMatrixCanvas = () => (
23
- <FigmaPage title="Buttons" width={FIGMA_WIDTHS.buttonsMatrix}>
24
- <FigmaContent>
25
- <FigmaSection>
26
- <div className="mb-4 grid grid-cols-[104px_repeat(5,1fr)] gap-4">
27
- <div />
28
- {columnLabels.map((label) => (
29
- <p key={label} className="text-center text-caption-1 text-display-on-light-secondary">
30
- {label}
31
- </p>
32
- ))}
33
- </div>
34
-
35
- {rowLabels.map((rowLabel) => (
36
- <FigmaRow key={rowLabel} label={rowLabel} gap={24}>
37
- <div className="w-24" />
38
- {hierarchies.map((hierarchy) => (
39
- <ButtonSnapshot
40
- key={hierarchy}
41
- hierarchy={hierarchy}
42
- visualState={rowLabel.toLowerCase() as "idle" | "hover" | "disabled"}
43
- />
44
- ))}
45
- </FigmaRow>
46
- ))}
47
-
48
- <FigmaRow label="Idle" gap={24}>
49
- <div className="w-24" />
50
- <Button icon={<AddIcon size="small" />} className="min-w-[304px]">
51
- New chat
52
- </Button>
53
- </FigmaRow>
54
-
55
- <FigmaRow label="Hover" gap={24}>
56
- <div className="w-24" />
57
- <span className="inline-flex min-h-10 min-w-[304px] items-center justify-center gap-2 rounded-control bg-action-primary-hover px-2 text-caption-1 text-action-primary-on-hover">
58
- <AddIcon />
59
- New chat
60
- </span>
61
- </FigmaRow>
62
- </FigmaSection>
63
- </FigmaContent>
64
- </FigmaPage>
65
- );
1
+ import { AddIcon } from "../../icons";
2
+ import { Button } from "../../primitives";
3
+ import {
4
+ FigmaContent,
5
+ FigmaPage,
6
+ FigmaRow,
7
+ FigmaSection,
8
+ } from "../_layout";
9
+ import { ButtonSnapshot } from "./helpers";
10
+ import { FIGMA_WIDTHS } from "./figma-widths";
11
+
12
+ const hierarchies = [
13
+ "primary",
14
+ "secondary",
15
+ "tertiary",
16
+ "quaternary",
17
+ "destructive",
18
+ ] as const;
19
+ const columnLabels = ["Primary", "Secondary", "Tertiary", "Quaternary", "Destructive"];
20
+ const rowLabels = ["Idle", "Hover", "Disabled"];
21
+
22
+ export const ButtonsMatrixCanvas = () => (
23
+ <FigmaPage title="Buttons" width={FIGMA_WIDTHS.buttonsMatrix}>
24
+ <FigmaContent>
25
+ <FigmaSection>
26
+ <div className="mb-4 grid grid-cols-[104px_repeat(5,1fr)] gap-4">
27
+ <div />
28
+ {columnLabels.map((label) => (
29
+ <p key={label} className="text-center text-caption-1 text-display-on-light-secondary">
30
+ {label}
31
+ </p>
32
+ ))}
33
+ </div>
34
+
35
+ {rowLabels.map((rowLabel) => (
36
+ <FigmaRow key={rowLabel} label={rowLabel} gap={24}>
37
+ <div className="w-24" />
38
+ {hierarchies.map((hierarchy) => (
39
+ <ButtonSnapshot
40
+ key={hierarchy}
41
+ hierarchy={hierarchy}
42
+ visualState={rowLabel.toLowerCase() as "idle" | "hover" | "disabled"}
43
+ />
44
+ ))}
45
+ </FigmaRow>
46
+ ))}
47
+
48
+ <FigmaRow label="Idle" gap={24}>
49
+ <div className="w-24" />
50
+ <Button icon={<AddIcon size="small" />} className="min-w-[304px]">
51
+ New chat
52
+ </Button>
53
+ </FigmaRow>
54
+
55
+ <FigmaRow label="Hover" gap={24}>
56
+ <div className="w-24" />
57
+ <span className="inline-flex min-h-10 min-w-[304px] items-center justify-center gap-2 rounded-control bg-action-primary-hover px-2 text-caption-1 text-action-primary-on-hover">
58
+ <AddIcon />
59
+ New chat
60
+ </span>
61
+ </FigmaRow>
62
+ </FigmaSection>
63
+ </FigmaContent>
64
+ </FigmaPage>
65
+ );