@lateralus-ai/shipping-ui 2.0.0-dev.3 → 2.0.0-dev.4
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.cjs +3 -3
- package/dist/index.esm.js +2264 -2245
- package/dist/tailwind-theme.d.ts +4 -4
- package/dist/{theme-entry-CxDa1D0_.mjs → theme-entry-BUK3MJUJ.mjs} +4 -4
- package/dist/{theme-entry-D2X3Ptjf.js → theme-entry-ygTpGaNC.js} +1 -1
- package/dist/theme.cjs +1 -1
- package/dist/theme.esm.js +1 -1
- package/package.json +128 -128
- package/src/components/Tabs.tsx +140 -139
- package/src/components/index.ts +42 -42
- package/src/index.ts +74 -74
- package/src/patterns/Search/ResultRow.tsx +58 -58
- package/src/patterns/Search/SearchModal.tsx +304 -292
- package/src/patterns/Search/index.ts +31 -31
- package/src/patterns/Skeleton/Skeleton.tsx +56 -56
- package/src/stories/canvases/ContentCanvas.tsx +114 -114
- package/src/stories/canvases/SearchCanvas.tsx +150 -150
- package/src/tailwind-theme.ts +4 -4
package/dist/tailwind-theme.d.ts
CHANGED
|
@@ -233,10 +233,10 @@ export declare const theme: {
|
|
|
233
233
|
};
|
|
234
234
|
};
|
|
235
235
|
accent: {
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
236
|
+
"on-light": string;
|
|
237
|
+
"on-dark": string;
|
|
238
|
+
"bg-light": string;
|
|
239
|
+
"bg-lighter": string;
|
|
240
240
|
};
|
|
241
241
|
divider: {
|
|
242
242
|
primary: string;
|
|
@@ -214,10 +214,10 @@ const o = {
|
|
|
214
214
|
}
|
|
215
215
|
},
|
|
216
216
|
accent: {
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
217
|
+
"on-light": "var(--accent-on-light)",
|
|
218
|
+
"on-dark": "var(--accent-on-dark)",
|
|
219
|
+
"bg-light": "var(--accent-bg-light)",
|
|
220
|
+
"bg-lighter": "var(--accent-bg-lighter)"
|
|
221
221
|
},
|
|
222
222
|
divider: {
|
|
223
223
|
primary: "var(--divider-primary)",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const n={50:"#fdfdfc",100:"#f4f2ea",200:"#e1ddce",300:"#bfb9a5",400:"#969080",500:"#6e6960",600:"#524e47",700:"#3a3733",800:"#312e2a",900:"#262420"},o={50:"#f5f8f2",100:"#dde6d2",200:"#c5d4b3",300:"#a8bf8f",400:"#7a9a5e",500:"#5a7a42",600:"#456332",700:"#304624",800:"#223018",900:"#141c0e"},d={50:"#eef1f8",100:"#dae0ef",200:"#b8c4e0",300:"#8fa3cc",400:"#5274ae",500:"#3a5d96",600:"#154199",700:"#103480",800:"#0c2860",900:"#081c42"},c={50:"#faf3f1",100:"#f0d3cc",200:"#e4b0a5",300:"#c97a6b",400:"#b85a48",500:"#a0392a",600:"#802c20",700:"#621f16",800:"#45150f",900:"#2a0c08"},l={50:"#faf1de",100:"#f5e4c0",200:"#efd49a",300:"#e4bc6a",400:"#d9a03e",500:"#c48820",600:"#8f6318",700:"#5a3d0d",800:"#3d2a09",900:"#261a05"},s={50:"#f6f2f8",100:"#e2d9e8",200:"#cbbad6",300:"#b09bc3",400:"#957cb0",500:"#7a5d9d",600:"#5e4680",700:"#3d2e4a",800:"#2a2033",900:"#18121c"},p="#ffffff",a={grey:n,green:o,blue:d,red:c,orange:l,purple:s},t={raise1:"0 1px 2px rgba(38, 36, 32, 0.06), 0 1px 3px rgba(38, 36, 32, 0.04)",raise2:"0 2px 8px rgba(38, 36, 32, 0.08), 0 1px 2px rgba(38, 36, 32, 0.04)",raise3:"0 8px 24px rgba(38, 36, 32, 0.12), 0 2px 8px rgba(38, 36, 32, 0.06)"},r={control:"8px",lg:"8px",md:"6px",sm:"4px"},e=(v,i)=>[v,{lineHeight:i.lineHeight,letterSpacing:i.letterSpacing,...i.fontWeight?{fontWeight:String(i.fontWeight)}:{}}],g={fontFamily:{heading:['"TRY Vesterbro"',"Libre Baskerville","Georgia","serif"],sans:['"Matter-TRIAL"',"DM Sans","system-ui","sans-serif"],mono:["Roboto Mono","monospace"]},fontSize:{title:e("28px",{lineHeight:"34px",letterSpacing:"-0.02em"}),"title-em":e("28px",{lineHeight:"34px",letterSpacing:"-0.02em",fontWeight:500}),heading:e("22px",{lineHeight:"28px",letterSpacing:"0",fontWeight:500}),subheader:e("18px",{lineHeight:"28px",letterSpacing:"-0.01em"}),"subheader-em":e("18px",{lineHeight:"28px",letterSpacing:"-0.01em",fontWeight:500}),body:e("16px",{lineHeight:"24px",letterSpacing:"-0.01em"}),"body-em":e("16px",{lineHeight:"24px",letterSpacing:"-0.01em",fontWeight:500}),"caption-1":e("16px",{lineHeight:"22px",letterSpacing:"0.02em"}),"caption-1-em":e("16px",{lineHeight:"22px",letterSpacing:"0.02em",fontWeight:500}),"caption-2":e("14px",{lineHeight:"20px",letterSpacing:"0.01em"}),"caption-2-em":e("14px",{lineHeight:"20px",letterSpacing:"0.01em",fontWeight:500}),footnote:e("13px",{lineHeight:"17px",letterSpacing:"0"}),"footnote-em":e("13px",{lineHeight:"17px",letterSpacing:"0",fontWeight:500})},boxShadow:{raise1:t.raise1,raise2:t.raise2,raise3:t.raise3},borderRadius:{control:r.control,lg:r.lg,md:r.md,sm:r.sm},colors:{grey:a.grey,gray:a.grey,green:a.green,blue:a.blue,red:a.red,orange:a.orange,purple:a.purple,white:"#ffffff",action:{primary:{idle:"var(--action-primary-idle)","on-idle":"var(--action-primary-on-idle)",hover:"var(--action-primary-hover)","on-hover":"var(--action-primary-on-hover)",disabled:"var(--action-primary-disabled)","on-disabled":"var(--action-primary-on-disabled)"},secondary:{idle:"var(--action-secondary-idle)","on-idle":"var(--action-secondary-on-idle)",hover:"var(--action-secondary-hover)","on-hover":"var(--action-secondary-on-hover)",disabled:"var(--action-secondary-disabled)","on-disabled":"var(--action-secondary-on-disabled)"},tertiary:{idle:"var(--action-tertiary-idle)","on-idle":"var(--action-tertiary-on-idle)",hover:"var(--action-tertiary-hover)","on-hover":"var(--action-tertiary-on-hover)",disabled:"var(--action-tertiary-disabled)","on-disabled":"var(--action-tertiary-on-disabled)"},quaternary:{idle:"var(--action-quaternary-idle)","on-idle":"var(--action-quaternary-on-idle)",hover:"var(--action-quaternary-hover)","on-hover":"var(--action-quaternary-on-hover)",disabled:"var(--action-quaternary-disabled)","on-disabled":"var(--action-quaternary-on-disabled)"},destructive:{idle:"var(--action-destructive-idle)","on-idle":"var(--action-destructive-on-idle)",hover:"var(--action-destructive-hover)","on-hover":"var(--action-destructive-on-hover)",disabled:"var(--action-destructive-disabled)","on-disabled":"var(--action-destructive-on-disabled)"}},background:{primary:"var(--background-primary)",secondary:"var(--background-secondary)",tertiary:"var(--background-tertiary)",hover:"var(--background-hover)",selected:"var(--background-selected)",overlay:"var(--background-overlay)"},display:{"on-light":{primary:"var(--display-on-light-primary)",secondary:"var(--display-on-light-secondary)",tertiary:"var(--display-on-light-tertiary)",quaternary:"var(--display-on-light-quaternary)"},"on-dark":{primary:"var(--display-on-dark-primary)",secondary:"var(--display-on-dark-secondary)",tertiary:"var(--display-on-dark-tertiary)",quaternary:"var(--display-on-dark-quaternary)"}},accent:{
|
|
1
|
+
"use strict";const n={50:"#fdfdfc",100:"#f4f2ea",200:"#e1ddce",300:"#bfb9a5",400:"#969080",500:"#6e6960",600:"#524e47",700:"#3a3733",800:"#312e2a",900:"#262420"},o={50:"#f5f8f2",100:"#dde6d2",200:"#c5d4b3",300:"#a8bf8f",400:"#7a9a5e",500:"#5a7a42",600:"#456332",700:"#304624",800:"#223018",900:"#141c0e"},d={50:"#eef1f8",100:"#dae0ef",200:"#b8c4e0",300:"#8fa3cc",400:"#5274ae",500:"#3a5d96",600:"#154199",700:"#103480",800:"#0c2860",900:"#081c42"},c={50:"#faf3f1",100:"#f0d3cc",200:"#e4b0a5",300:"#c97a6b",400:"#b85a48",500:"#a0392a",600:"#802c20",700:"#621f16",800:"#45150f",900:"#2a0c08"},l={50:"#faf1de",100:"#f5e4c0",200:"#efd49a",300:"#e4bc6a",400:"#d9a03e",500:"#c48820",600:"#8f6318",700:"#5a3d0d",800:"#3d2a09",900:"#261a05"},s={50:"#f6f2f8",100:"#e2d9e8",200:"#cbbad6",300:"#b09bc3",400:"#957cb0",500:"#7a5d9d",600:"#5e4680",700:"#3d2e4a",800:"#2a2033",900:"#18121c"},p="#ffffff",a={grey:n,green:o,blue:d,red:c,orange:l,purple:s},t={raise1:"0 1px 2px rgba(38, 36, 32, 0.06), 0 1px 3px rgba(38, 36, 32, 0.04)",raise2:"0 2px 8px rgba(38, 36, 32, 0.08), 0 1px 2px rgba(38, 36, 32, 0.04)",raise3:"0 8px 24px rgba(38, 36, 32, 0.12), 0 2px 8px rgba(38, 36, 32, 0.06)"},r={control:"8px",lg:"8px",md:"6px",sm:"4px"},e=(v,i)=>[v,{lineHeight:i.lineHeight,letterSpacing:i.letterSpacing,...i.fontWeight?{fontWeight:String(i.fontWeight)}:{}}],g={fontFamily:{heading:['"TRY Vesterbro"',"Libre Baskerville","Georgia","serif"],sans:['"Matter-TRIAL"',"DM Sans","system-ui","sans-serif"],mono:["Roboto Mono","monospace"]},fontSize:{title:e("28px",{lineHeight:"34px",letterSpacing:"-0.02em"}),"title-em":e("28px",{lineHeight:"34px",letterSpacing:"-0.02em",fontWeight:500}),heading:e("22px",{lineHeight:"28px",letterSpacing:"0",fontWeight:500}),subheader:e("18px",{lineHeight:"28px",letterSpacing:"-0.01em"}),"subheader-em":e("18px",{lineHeight:"28px",letterSpacing:"-0.01em",fontWeight:500}),body:e("16px",{lineHeight:"24px",letterSpacing:"-0.01em"}),"body-em":e("16px",{lineHeight:"24px",letterSpacing:"-0.01em",fontWeight:500}),"caption-1":e("16px",{lineHeight:"22px",letterSpacing:"0.02em"}),"caption-1-em":e("16px",{lineHeight:"22px",letterSpacing:"0.02em",fontWeight:500}),"caption-2":e("14px",{lineHeight:"20px",letterSpacing:"0.01em"}),"caption-2-em":e("14px",{lineHeight:"20px",letterSpacing:"0.01em",fontWeight:500}),footnote:e("13px",{lineHeight:"17px",letterSpacing:"0"}),"footnote-em":e("13px",{lineHeight:"17px",letterSpacing:"0",fontWeight:500})},boxShadow:{raise1:t.raise1,raise2:t.raise2,raise3:t.raise3},borderRadius:{control:r.control,lg:r.lg,md:r.md,sm:r.sm},colors:{grey:a.grey,gray:a.grey,green:a.green,blue:a.blue,red:a.red,orange:a.orange,purple:a.purple,white:"#ffffff",action:{primary:{idle:"var(--action-primary-idle)","on-idle":"var(--action-primary-on-idle)",hover:"var(--action-primary-hover)","on-hover":"var(--action-primary-on-hover)",disabled:"var(--action-primary-disabled)","on-disabled":"var(--action-primary-on-disabled)"},secondary:{idle:"var(--action-secondary-idle)","on-idle":"var(--action-secondary-on-idle)",hover:"var(--action-secondary-hover)","on-hover":"var(--action-secondary-on-hover)",disabled:"var(--action-secondary-disabled)","on-disabled":"var(--action-secondary-on-disabled)"},tertiary:{idle:"var(--action-tertiary-idle)","on-idle":"var(--action-tertiary-on-idle)",hover:"var(--action-tertiary-hover)","on-hover":"var(--action-tertiary-on-hover)",disabled:"var(--action-tertiary-disabled)","on-disabled":"var(--action-tertiary-on-disabled)"},quaternary:{idle:"var(--action-quaternary-idle)","on-idle":"var(--action-quaternary-on-idle)",hover:"var(--action-quaternary-hover)","on-hover":"var(--action-quaternary-on-hover)",disabled:"var(--action-quaternary-disabled)","on-disabled":"var(--action-quaternary-on-disabled)"},destructive:{idle:"var(--action-destructive-idle)","on-idle":"var(--action-destructive-on-idle)",hover:"var(--action-destructive-hover)","on-hover":"var(--action-destructive-on-hover)",disabled:"var(--action-destructive-disabled)","on-disabled":"var(--action-destructive-on-disabled)"}},background:{primary:"var(--background-primary)",secondary:"var(--background-secondary)",tertiary:"var(--background-tertiary)",hover:"var(--background-hover)",selected:"var(--background-selected)",overlay:"var(--background-overlay)"},display:{"on-light":{primary:"var(--display-on-light-primary)",secondary:"var(--display-on-light-secondary)",tertiary:"var(--display-on-light-tertiary)",quaternary:"var(--display-on-light-quaternary)"},"on-dark":{primary:"var(--display-on-dark-primary)",secondary:"var(--display-on-dark-secondary)",tertiary:"var(--display-on-dark-tertiary)",quaternary:"var(--display-on-dark-quaternary)"}},accent:{"on-light":"var(--accent-on-light)","on-dark":"var(--accent-on-dark)","bg-light":"var(--accent-bg-light)","bg-lighter":"var(--accent-bg-lighter)"},divider:{primary:"var(--divider-primary)",secondary:"var(--divider-secondary)"},meta:{green:"var(--meta-green)",onGreen:"var(--meta-on-green)",orange:"var(--meta-orange)",onOrange:"var(--meta-on-orange)",red:"var(--meta-red)",onRed:"var(--meta-on-red)",blue:"var(--meta-blue)",onBlue:"var(--meta-on-blue)",purple:"var(--meta-purple)",onPurple:"var(--meta-on-purple)"},"text-primary":"var(--display-on-light-primary)","text-secondary":"var(--display-on-light-secondary)","text-tertiary":"var(--display-on-light-tertiary)","surface-primary":"var(--background-primary)","surface-secondary":"var(--background-secondary)","surface-hover":"var(--background-secondary)","border-light":"var(--divider-primary)","border-medium":"var(--divider-secondary)"}};exports.blue=d;exports.borderRadius=r;exports.colorScales=a;exports.elevation=t;exports.green=o;exports.grey=n;exports.orange=l;exports.purple=s;exports.red=c;exports.theme=g;exports.white=p;
|
package/dist/theme.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./theme-entry-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./theme-entry-ygTpGaNC.js");exports.tailwindTheme=e.theme;exports.theme=e.theme;
|
package/dist/theme.esm.js
CHANGED
package/package.json
CHANGED
|
@@ -1,128 +1,128 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@lateralus-ai/shipping-ui",
|
|
3
|
-
"version": "2.0.0-dev.
|
|
4
|
-
"description": "Shared UI theme and components for Lateralus shipping applications",
|
|
5
|
-
"main": "dist/index.cjs",
|
|
6
|
-
"module": "dist/index.esm.js",
|
|
7
|
-
"types": "dist/index.d.ts",
|
|
8
|
-
"publishConfig": {
|
|
9
|
-
"access": "public"
|
|
10
|
-
},
|
|
11
|
-
"exports": {
|
|
12
|
-
".": {
|
|
13
|
-
"import": "./dist/index.esm.js",
|
|
14
|
-
"require": "./dist/index.cjs",
|
|
15
|
-
"types": "./dist/index.d.ts"
|
|
16
|
-
},
|
|
17
|
-
"./theme": {
|
|
18
|
-
"import": "./dist/theme.esm.js",
|
|
19
|
-
"require": "./dist/theme.cjs",
|
|
20
|
-
"types": "./dist/theme-entry.d.ts"
|
|
21
|
-
},
|
|
22
|
-
"./style.css": "./dist/style.css",
|
|
23
|
-
"./css": "./dist/style.css",
|
|
24
|
-
"./dist/style.css": "./dist/style.css",
|
|
25
|
-
"./tailwind": "./dist/theme.cjs"
|
|
26
|
-
},
|
|
27
|
-
"files": [
|
|
28
|
-
"dist",
|
|
29
|
-
"lib",
|
|
30
|
-
"src",
|
|
31
|
-
"tailwind.config.ts"
|
|
32
|
-
],
|
|
33
|
-
"scripts": {
|
|
34
|
-
"dev": "storybook dev -p 6006",
|
|
35
|
-
"build": "npx rimraf ./dist && vite build",
|
|
36
|
-
"storybook": "storybook dev -p 6006",
|
|
37
|
-
"build-storybook": "storybook build",
|
|
38
|
-
"test:visual": "playwright test",
|
|
39
|
-
"test:visual:ci": "npm run build-storybook && playwright test",
|
|
40
|
-
"test:visual:update": "playwright test --update-snapshots",
|
|
41
|
-
"test:visual:icons": "node scripts/figma-icons-baseline.mjs --check && playwright test tests/visual/icons-figma.spec.ts",
|
|
42
|
-
"test:visual:sidebar": "node scripts/figma-sidebar-baseline.mjs --target subcomponents --check && node scripts/figma-sidebar-baseline.mjs --target layouts --check && playwright test tests/visual/sidebar-figma.spec.ts tests/visual/sidebar-layouts-figma.spec.ts",
|
|
43
|
-
"figma:baseline:icons": "node scripts/figma-icons-baseline.mjs",
|
|
44
|
-
"figma:baseline:icons:check": "node scripts/figma-icons-baseline.mjs --check",
|
|
45
|
-
"figma:baseline:sidebar": "node scripts/figma-sidebar-baseline.mjs --target subcomponents",
|
|
46
|
-
"figma:baseline:sidebar:layouts": "node scripts/figma-sidebar-baseline.mjs --target layouts",
|
|
47
|
-
"figma:baseline:sidebar:check": "node scripts/figma-sidebar-baseline.mjs --check",
|
|
48
|
-
"postinstall": "playwright install chromium",
|
|
49
|
-
"release": "npx release-it",
|
|
50
|
-
"release:dev:init": "npx release-it --config .release-it.dev.json major --preRelease=dev",
|
|
51
|
-
"release:dev:init:publish": "npx release-it --config .release-it.dev.json --no-hooks.before:init major --preRelease=dev",
|
|
52
|
-
"release:dev": "npx release-it --config .release-it.dev.json --preRelease=dev",
|
|
53
|
-
"release:dev:publish": "npx release-it --config .release-it.dev.json --no-hooks.before:init --preRelease=dev"
|
|
54
|
-
},
|
|
55
|
-
"repository": {
|
|
56
|
-
"type": "git",
|
|
57
|
-
"url": "git+https://github.com/lateralus-ai/shipping-ui.git"
|
|
58
|
-
},
|
|
59
|
-
"keywords": [
|
|
60
|
-
"tailwind",
|
|
61
|
-
"askchief",
|
|
62
|
-
"design-system",
|
|
63
|
-
"theme",
|
|
64
|
-
"shipping",
|
|
65
|
-
"storybook"
|
|
66
|
-
],
|
|
67
|
-
"author": "Lateralus AI",
|
|
68
|
-
"license": "UNLICENSED",
|
|
69
|
-
"bugs": {
|
|
70
|
-
"url": "https://github.com/lateralus-ai/shipping-ui/issues"
|
|
71
|
-
},
|
|
72
|
-
"homepage": "https://github.com/lateralus-ai/shipping-ui#readme",
|
|
73
|
-
"devDependencies": {
|
|
74
|
-
"@chromatic-com/storybook": "^1.6.1",
|
|
75
|
-
"@playwright/test": "^1.49.0",
|
|
76
|
-
"@storybook/addon-essentials": "^8.2.9",
|
|
77
|
-
"@storybook/addon-interactions": "^8.2.9",
|
|
78
|
-
"@storybook/addon-links": "^8.2.9",
|
|
79
|
-
"@storybook/blocks": "^8.2.9",
|
|
80
|
-
"@storybook/react": "^8.2.9",
|
|
81
|
-
"@storybook/react-vite": "^8.2.9",
|
|
82
|
-
"@types/pngjs": "^6.0.5",
|
|
83
|
-
"@types/react": "^18.2.0",
|
|
84
|
-
"@types/react-dom": "^18.2.0",
|
|
85
|
-
"@uidotdev/usehooks": "^2.4.1",
|
|
86
|
-
"@vitejs/plugin-react": "^4.2.1",
|
|
87
|
-
"ai": "^5.0.59",
|
|
88
|
-
"autoprefixer": "^10.4.16",
|
|
89
|
-
"clsx": "^1.2.0",
|
|
90
|
-
"pixelmatch": "^5.3.0",
|
|
91
|
-
"pngjs": "^7.0.0",
|
|
92
|
-
"postcss": "^8.4.32",
|
|
93
|
-
"react": "^18.2.0",
|
|
94
|
-
"react-dom": "^18.2.0",
|
|
95
|
-
"release-it": "^19.0.5",
|
|
96
|
-
"serve": "^14.2.4",
|
|
97
|
-
"sharp": "^0.33.5",
|
|
98
|
-
"storybook": "^8.2.9",
|
|
99
|
-
"tailwind-merge": "^1.9.0",
|
|
100
|
-
"tailwindcss": "^3.4.0",
|
|
101
|
-
"tailwindcss-animate": "^1.0.7",
|
|
102
|
-
"tailwindcss-radix": "^3.0.3",
|
|
103
|
-
"typescript": "^5.3.3",
|
|
104
|
-
"vite": "^5.0.10",
|
|
105
|
-
"vite-plugin-dts": "^4.5.4"
|
|
106
|
-
},
|
|
107
|
-
"peerDependencies": {
|
|
108
|
-
"react": "^18.2.0",
|
|
109
|
-
"react-dom": "^18.2.0",
|
|
110
|
-
"react-textarea-autosize": "^8.5.9"
|
|
111
|
-
},
|
|
112
|
-
"dependencies": {
|
|
113
|
-
"@radix-ui/react-dialog": "^1.1.19",
|
|
114
|
-
"@radix-ui/react-dropdown-menu": "^2.1.20",
|
|
115
|
-
"@radix-ui/react-tabs": "^1.1.17",
|
|
116
|
-
"@radix-ui/react-tooltip": "^1.2.8",
|
|
117
|
-
"@react-hooks-library/core": "^0.6.2",
|
|
118
|
-
"docx-preview": "^0.3.7",
|
|
119
|
-
"docxtemplater": "^3.66.6",
|
|
120
|
-
"pizzip": "^3.2.0",
|
|
121
|
-
"react-hotkeys-hook": "^5.1.0",
|
|
122
|
-
"react-pdf": "^10.1.0",
|
|
123
|
-
"react-router": "^7.9.3"
|
|
124
|
-
},
|
|
125
|
-
"sideEffects": [
|
|
126
|
-
"dist/style.css"
|
|
127
|
-
]
|
|
128
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@lateralus-ai/shipping-ui",
|
|
3
|
+
"version": "2.0.0-dev.4",
|
|
4
|
+
"description": "Shared UI theme and components for Lateralus shipping applications",
|
|
5
|
+
"main": "dist/index.cjs",
|
|
6
|
+
"module": "dist/index.esm.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"publishConfig": {
|
|
9
|
+
"access": "public"
|
|
10
|
+
},
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"import": "./dist/index.esm.js",
|
|
14
|
+
"require": "./dist/index.cjs",
|
|
15
|
+
"types": "./dist/index.d.ts"
|
|
16
|
+
},
|
|
17
|
+
"./theme": {
|
|
18
|
+
"import": "./dist/theme.esm.js",
|
|
19
|
+
"require": "./dist/theme.cjs",
|
|
20
|
+
"types": "./dist/theme-entry.d.ts"
|
|
21
|
+
},
|
|
22
|
+
"./style.css": "./dist/style.css",
|
|
23
|
+
"./css": "./dist/style.css",
|
|
24
|
+
"./dist/style.css": "./dist/style.css",
|
|
25
|
+
"./tailwind": "./dist/theme.cjs"
|
|
26
|
+
},
|
|
27
|
+
"files": [
|
|
28
|
+
"dist",
|
|
29
|
+
"lib",
|
|
30
|
+
"src",
|
|
31
|
+
"tailwind.config.ts"
|
|
32
|
+
],
|
|
33
|
+
"scripts": {
|
|
34
|
+
"dev": "storybook dev -p 6006",
|
|
35
|
+
"build": "npx rimraf ./dist && vite build",
|
|
36
|
+
"storybook": "storybook dev -p 6006",
|
|
37
|
+
"build-storybook": "storybook build",
|
|
38
|
+
"test:visual": "playwright test",
|
|
39
|
+
"test:visual:ci": "npm run build-storybook && playwright test",
|
|
40
|
+
"test:visual:update": "playwright test --update-snapshots",
|
|
41
|
+
"test:visual:icons": "node scripts/figma-icons-baseline.mjs --check && playwright test tests/visual/icons-figma.spec.ts",
|
|
42
|
+
"test:visual:sidebar": "node scripts/figma-sidebar-baseline.mjs --target subcomponents --check && node scripts/figma-sidebar-baseline.mjs --target layouts --check && playwright test tests/visual/sidebar-figma.spec.ts tests/visual/sidebar-layouts-figma.spec.ts",
|
|
43
|
+
"figma:baseline:icons": "node scripts/figma-icons-baseline.mjs",
|
|
44
|
+
"figma:baseline:icons:check": "node scripts/figma-icons-baseline.mjs --check",
|
|
45
|
+
"figma:baseline:sidebar": "node scripts/figma-sidebar-baseline.mjs --target subcomponents",
|
|
46
|
+
"figma:baseline:sidebar:layouts": "node scripts/figma-sidebar-baseline.mjs --target layouts",
|
|
47
|
+
"figma:baseline:sidebar:check": "node scripts/figma-sidebar-baseline.mjs --check",
|
|
48
|
+
"postinstall": "playwright install chromium",
|
|
49
|
+
"release": "npx release-it",
|
|
50
|
+
"release:dev:init": "npx release-it --config .release-it.dev.json major --preRelease=dev",
|
|
51
|
+
"release:dev:init:publish": "npx release-it --config .release-it.dev.json --no-hooks.before:init major --preRelease=dev",
|
|
52
|
+
"release:dev": "npx release-it --config .release-it.dev.json --preRelease=dev",
|
|
53
|
+
"release:dev:publish": "npx release-it --config .release-it.dev.json --no-hooks.before:init --preRelease=dev"
|
|
54
|
+
},
|
|
55
|
+
"repository": {
|
|
56
|
+
"type": "git",
|
|
57
|
+
"url": "git+https://github.com/lateralus-ai/shipping-ui.git"
|
|
58
|
+
},
|
|
59
|
+
"keywords": [
|
|
60
|
+
"tailwind",
|
|
61
|
+
"askchief",
|
|
62
|
+
"design-system",
|
|
63
|
+
"theme",
|
|
64
|
+
"shipping",
|
|
65
|
+
"storybook"
|
|
66
|
+
],
|
|
67
|
+
"author": "Lateralus AI",
|
|
68
|
+
"license": "UNLICENSED",
|
|
69
|
+
"bugs": {
|
|
70
|
+
"url": "https://github.com/lateralus-ai/shipping-ui/issues"
|
|
71
|
+
},
|
|
72
|
+
"homepage": "https://github.com/lateralus-ai/shipping-ui#readme",
|
|
73
|
+
"devDependencies": {
|
|
74
|
+
"@chromatic-com/storybook": "^1.6.1",
|
|
75
|
+
"@playwright/test": "^1.49.0",
|
|
76
|
+
"@storybook/addon-essentials": "^8.2.9",
|
|
77
|
+
"@storybook/addon-interactions": "^8.2.9",
|
|
78
|
+
"@storybook/addon-links": "^8.2.9",
|
|
79
|
+
"@storybook/blocks": "^8.2.9",
|
|
80
|
+
"@storybook/react": "^8.2.9",
|
|
81
|
+
"@storybook/react-vite": "^8.2.9",
|
|
82
|
+
"@types/pngjs": "^6.0.5",
|
|
83
|
+
"@types/react": "^18.2.0",
|
|
84
|
+
"@types/react-dom": "^18.2.0",
|
|
85
|
+
"@uidotdev/usehooks": "^2.4.1",
|
|
86
|
+
"@vitejs/plugin-react": "^4.2.1",
|
|
87
|
+
"ai": "^5.0.59",
|
|
88
|
+
"autoprefixer": "^10.4.16",
|
|
89
|
+
"clsx": "^1.2.0",
|
|
90
|
+
"pixelmatch": "^5.3.0",
|
|
91
|
+
"pngjs": "^7.0.0",
|
|
92
|
+
"postcss": "^8.4.32",
|
|
93
|
+
"react": "^18.2.0",
|
|
94
|
+
"react-dom": "^18.2.0",
|
|
95
|
+
"release-it": "^19.0.5",
|
|
96
|
+
"serve": "^14.2.4",
|
|
97
|
+
"sharp": "^0.33.5",
|
|
98
|
+
"storybook": "^8.2.9",
|
|
99
|
+
"tailwind-merge": "^1.9.0",
|
|
100
|
+
"tailwindcss": "^3.4.0",
|
|
101
|
+
"tailwindcss-animate": "^1.0.7",
|
|
102
|
+
"tailwindcss-radix": "^3.0.3",
|
|
103
|
+
"typescript": "^5.3.3",
|
|
104
|
+
"vite": "^5.0.10",
|
|
105
|
+
"vite-plugin-dts": "^4.5.4"
|
|
106
|
+
},
|
|
107
|
+
"peerDependencies": {
|
|
108
|
+
"react": "^18.2.0",
|
|
109
|
+
"react-dom": "^18.2.0",
|
|
110
|
+
"react-textarea-autosize": "^8.5.9"
|
|
111
|
+
},
|
|
112
|
+
"dependencies": {
|
|
113
|
+
"@radix-ui/react-dialog": "^1.1.19",
|
|
114
|
+
"@radix-ui/react-dropdown-menu": "^2.1.20",
|
|
115
|
+
"@radix-ui/react-tabs": "^1.1.17",
|
|
116
|
+
"@radix-ui/react-tooltip": "^1.2.8",
|
|
117
|
+
"@react-hooks-library/core": "^0.6.2",
|
|
118
|
+
"docx-preview": "^0.3.7",
|
|
119
|
+
"docxtemplater": "^3.66.6",
|
|
120
|
+
"pizzip": "^3.2.0",
|
|
121
|
+
"react-hotkeys-hook": "^5.1.0",
|
|
122
|
+
"react-pdf": "^10.1.0",
|
|
123
|
+
"react-router": "^7.9.3"
|
|
124
|
+
},
|
|
125
|
+
"sideEffects": [
|
|
126
|
+
"dist/style.css"
|
|
127
|
+
]
|
|
128
|
+
}
|
package/src/components/Tabs.tsx
CHANGED
|
@@ -1,139 +1,140 @@
|
|
|
1
|
-
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
2
|
-
import {
|
|
3
|
-
createContext,
|
|
4
|
-
forwardRef,
|
|
5
|
-
useContext,
|
|
6
|
-
type ComponentPropsWithoutRef,
|
|
7
|
-
type ElementRef,
|
|
8
|
-
type ReactNode,
|
|
9
|
-
} from "react";
|
|
10
|
-
import { cn } from "../utils/cn";
|
|
11
|
-
|
|
12
|
-
export type TabsType = "tabs" | "pills";
|
|
13
|
-
|
|
14
|
-
type TabsContextValue = {
|
|
15
|
-
type: TabsType;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
const TabsContext = createContext<TabsContextValue>({ type: "tabs" });
|
|
19
|
-
|
|
20
|
-
export type TabsProps = ComponentPropsWithoutRef<typeof TabsPrimitive.Root> & {
|
|
21
|
-
type?: TabsType;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export const Tabs = ({
|
|
25
|
-
type = "tabs",
|
|
26
|
-
className,
|
|
27
|
-
children,
|
|
28
|
-
...props
|
|
29
|
-
}: TabsProps) => (
|
|
30
|
-
<TabsContext.Provider value={{ type }}>
|
|
31
|
-
<TabsPrimitive.Root
|
|
32
|
-
className={cn("flex flex-col", className)}
|
|
33
|
-
data-type={type}
|
|
34
|
-
{...props}
|
|
35
|
-
>
|
|
36
|
-
{children}
|
|
37
|
-
</TabsPrimitive.Root>
|
|
38
|
-
</TabsContext.Provider>
|
|
39
|
-
);
|
|
40
|
-
|
|
41
|
-
export type TabsListProps = ComponentPropsWithoutRef<typeof TabsPrimitive.List>;
|
|
42
|
-
|
|
43
|
-
export const TabsList = forwardRef<
|
|
44
|
-
ElementRef<typeof TabsPrimitive.List>,
|
|
45
|
-
TabsListProps
|
|
46
|
-
>(({ className, ...props }, ref) => {
|
|
47
|
-
const { type } = useContext(TabsContext);
|
|
48
|
-
|
|
49
|
-
return (
|
|
50
|
-
<TabsPrimitive.List
|
|
51
|
-
ref={ref}
|
|
52
|
-
className={cn(
|
|
53
|
-
"flex items-center",
|
|
54
|
-
type === "tabs" && "gap-1 border-b border-divider-primary",
|
|
55
|
-
type === "pills" && "gap-2",
|
|
56
|
-
className,
|
|
57
|
-
)}
|
|
58
|
-
{...props}
|
|
59
|
-
/>
|
|
60
|
-
);
|
|
61
|
-
});
|
|
62
|
-
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
63
|
-
|
|
64
|
-
export type TabsTriggerProps = ComponentPropsWithoutRef<
|
|
65
|
-
typeof TabsPrimitive.Trigger
|
|
66
|
-
> & {
|
|
67
|
-
/** Optional count badge (pill variant / search filters). */
|
|
68
|
-
count?: number;
|
|
69
|
-
children: ReactNode;
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
export const TabsTrigger = forwardRef<
|
|
73
|
-
ElementRef<typeof TabsPrimitive.Trigger>,
|
|
74
|
-
TabsTriggerProps
|
|
75
|
-
>(({ className, count, children, ...props }, ref) => {
|
|
76
|
-
const { type } = useContext(TabsContext);
|
|
77
|
-
|
|
78
|
-
return (
|
|
79
|
-
<TabsPrimitive.Trigger
|
|
80
|
-
ref={ref}
|
|
81
|
-
className={cn(
|
|
82
|
-
"inline-flex items-center justify-center transition-colors outline-none",
|
|
83
|
-
"disabled:pointer-events-none disabled:opacity-50",
|
|
84
|
-
type === "tabs" && [
|
|
85
|
-
"relative px-3 py-2 text-caption-2 text-display-on-light-secondary",
|
|
86
|
-
"hover:text-display-on-light-primary",
|
|
87
|
-
"data-[state=active]:text-caption-2-em data-[state=active]:text-display-on-light-primary",
|
|
88
|
-
"data-[state=active]:after:absolute data-[state=active]:after:inset-x-0 data-[state=active]:after:-bottom-px",
|
|
89
|
-
"data-[state=active]:after:h-0.5 data-[state=active]:after:rounded-full data-[state=active]:after:bg-grey-900",
|
|
90
|
-
],
|
|
91
|
-
type === "pills" && [
|
|
92
|
-
"min-h-9 gap-2.5 rounded-full px-3 py-1 text-caption-2-em",
|
|
93
|
-
"bg-grey-100 text-display-on-light-secondary",
|
|
94
|
-
"hover:bg-grey-200",
|
|
95
|
-
"data-[state=active]:bg-accent-bg-light data-[state=active]:text-display-on-light-primary",
|
|
96
|
-
],
|
|
97
|
-
className,
|
|
98
|
-
)}
|
|
99
|
-
{...props}
|
|
100
|
-
>
|
|
101
|
-
{children}
|
|
102
|
-
{typeof count === "number" && (
|
|
103
|
-
<span
|
|
104
|
-
className={cn(
|
|
105
|
-
"inline-flex size-6 shrink-0 items-center justify-center rounded-full text-footnote-em",
|
|
106
|
-
"bg-accent-bg-light text-display-on-light-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
{
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
1
|
+
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
2
|
+
import {
|
|
3
|
+
createContext,
|
|
4
|
+
forwardRef,
|
|
5
|
+
useContext,
|
|
6
|
+
type ComponentPropsWithoutRef,
|
|
7
|
+
type ElementRef,
|
|
8
|
+
type ReactNode,
|
|
9
|
+
} from "react";
|
|
10
|
+
import { cn } from "../utils/cn";
|
|
11
|
+
|
|
12
|
+
export type TabsType = "tabs" | "pills";
|
|
13
|
+
|
|
14
|
+
type TabsContextValue = {
|
|
15
|
+
type: TabsType;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const TabsContext = createContext<TabsContextValue>({ type: "tabs" });
|
|
19
|
+
|
|
20
|
+
export type TabsProps = ComponentPropsWithoutRef<typeof TabsPrimitive.Root> & {
|
|
21
|
+
type?: TabsType;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export const Tabs = ({
|
|
25
|
+
type = "tabs",
|
|
26
|
+
className,
|
|
27
|
+
children,
|
|
28
|
+
...props
|
|
29
|
+
}: TabsProps) => (
|
|
30
|
+
<TabsContext.Provider value={{ type }}>
|
|
31
|
+
<TabsPrimitive.Root
|
|
32
|
+
className={cn("flex flex-col", className)}
|
|
33
|
+
data-type={type}
|
|
34
|
+
{...props}
|
|
35
|
+
>
|
|
36
|
+
{children}
|
|
37
|
+
</TabsPrimitive.Root>
|
|
38
|
+
</TabsContext.Provider>
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
export type TabsListProps = ComponentPropsWithoutRef<typeof TabsPrimitive.List>;
|
|
42
|
+
|
|
43
|
+
export const TabsList = forwardRef<
|
|
44
|
+
ElementRef<typeof TabsPrimitive.List>,
|
|
45
|
+
TabsListProps
|
|
46
|
+
>(({ className, ...props }, ref) => {
|
|
47
|
+
const { type } = useContext(TabsContext);
|
|
48
|
+
|
|
49
|
+
return (
|
|
50
|
+
<TabsPrimitive.List
|
|
51
|
+
ref={ref}
|
|
52
|
+
className={cn(
|
|
53
|
+
"flex items-center",
|
|
54
|
+
type === "tabs" && "gap-1 border-b border-divider-primary",
|
|
55
|
+
type === "pills" && "gap-2",
|
|
56
|
+
className,
|
|
57
|
+
)}
|
|
58
|
+
{...props}
|
|
59
|
+
/>
|
|
60
|
+
);
|
|
61
|
+
});
|
|
62
|
+
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
63
|
+
|
|
64
|
+
export type TabsTriggerProps = ComponentPropsWithoutRef<
|
|
65
|
+
typeof TabsPrimitive.Trigger
|
|
66
|
+
> & {
|
|
67
|
+
/** Optional count badge (pill variant / search filters). */
|
|
68
|
+
count?: number;
|
|
69
|
+
children: ReactNode;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export const TabsTrigger = forwardRef<
|
|
73
|
+
ElementRef<typeof TabsPrimitive.Trigger>,
|
|
74
|
+
TabsTriggerProps
|
|
75
|
+
>(({ className, count, children, ...props }, ref) => {
|
|
76
|
+
const { type } = useContext(TabsContext);
|
|
77
|
+
|
|
78
|
+
return (
|
|
79
|
+
<TabsPrimitive.Trigger
|
|
80
|
+
ref={ref}
|
|
81
|
+
className={cn(
|
|
82
|
+
"inline-flex items-center justify-center transition-colors outline-none",
|
|
83
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
84
|
+
type === "tabs" && [
|
|
85
|
+
"relative px-3 py-2 text-caption-2 text-display-on-light-secondary",
|
|
86
|
+
"hover:text-display-on-light-primary",
|
|
87
|
+
"data-[state=active]:text-caption-2-em data-[state=active]:text-display-on-light-primary",
|
|
88
|
+
"data-[state=active]:after:absolute data-[state=active]:after:inset-x-0 data-[state=active]:after:-bottom-px",
|
|
89
|
+
"data-[state=active]:after:h-0.5 data-[state=active]:after:rounded-full data-[state=active]:after:bg-grey-900",
|
|
90
|
+
],
|
|
91
|
+
type === "pills" && [
|
|
92
|
+
"group min-h-9 gap-2.5 rounded-full px-3 py-1 text-caption-2-em",
|
|
93
|
+
"bg-grey-100 text-display-on-light-secondary",
|
|
94
|
+
"hover:bg-grey-200",
|
|
95
|
+
"data-[state=active]:bg-accent-bg-light data-[state=active]:text-display-on-light-primary",
|
|
96
|
+
],
|
|
97
|
+
className,
|
|
98
|
+
)}
|
|
99
|
+
{...props}
|
|
100
|
+
>
|
|
101
|
+
{children}
|
|
102
|
+
{typeof count === "number" && (
|
|
103
|
+
<span
|
|
104
|
+
className={cn(
|
|
105
|
+
"inline-flex size-6 shrink-0 items-center justify-center rounded-full text-footnote-em",
|
|
106
|
+
"bg-accent-bg-light text-display-on-light-secondary",
|
|
107
|
+
"group-data-[state=active]:text-display-on-light-tertiary",
|
|
108
|
+
)}
|
|
109
|
+
aria-label={`Count: ${count}`}
|
|
110
|
+
>
|
|
111
|
+
{count > 99 ? "99+" : count}
|
|
112
|
+
</span>
|
|
113
|
+
)}
|
|
114
|
+
</TabsPrimitive.Trigger>
|
|
115
|
+
);
|
|
116
|
+
});
|
|
117
|
+
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
118
|
+
|
|
119
|
+
export type TabsContentProps = ComponentPropsWithoutRef<
|
|
120
|
+
typeof TabsPrimitive.Content
|
|
121
|
+
>;
|
|
122
|
+
|
|
123
|
+
export const TabsContent = forwardRef<
|
|
124
|
+
ElementRef<typeof TabsPrimitive.Content>,
|
|
125
|
+
TabsContentProps
|
|
126
|
+
>(({ className, ...props }, ref) => (
|
|
127
|
+
<TabsPrimitive.Content
|
|
128
|
+
ref={ref}
|
|
129
|
+
className={cn("outline-none", className)}
|
|
130
|
+
{...props}
|
|
131
|
+
/>
|
|
132
|
+
));
|
|
133
|
+
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
134
|
+
|
|
135
|
+
/** @deprecated Prefer Tabs + TabsTrigger. Kept for Storybook atom demos. */
|
|
136
|
+
export type TabsItem = {
|
|
137
|
+
label: string;
|
|
138
|
+
value?: string;
|
|
139
|
+
count?: number;
|
|
140
|
+
};
|