@a-type/ui 3.0.11 → 3.0.13
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/cjs/__tests__/setup.d.ts +1 -0
- package/dist/cjs/__tests__/setup.js +5 -0
- package/dist/cjs/__tests__/setup.js.map +1 -0
- package/dist/cjs/colors.stories.d.ts +1 -8
- package/dist/cjs/colors.stories.js +36 -26
- package/dist/cjs/colors.stories.js.map +1 -1
- package/dist/cjs/components/box/Box.d.ts +1 -1
- package/dist/cjs/components/box/Box.stories.js +2 -2
- package/dist/cjs/components/box/Box.stories.js.map +1 -1
- package/dist/cjs/components/button/Button.d.ts +1 -1
- package/dist/cjs/components/button/Button.stories.js +9 -9
- package/dist/cjs/components/button/Button.stories.js.map +1 -1
- package/dist/cjs/components/button/classes.d.ts +1 -1
- package/dist/cjs/components/card/Card.d.ts +1 -1
- package/dist/cjs/components/chip/Chip.d.ts +1 -1
- package/dist/cjs/components/colorPicker/ColorPicker.d.ts +1 -1
- package/dist/cjs/components/colorPicker/ColorPicker.js +2 -2
- package/dist/cjs/components/colorPicker/ColorPicker.js.map +1 -1
- package/dist/cjs/components/datePicker/DatePicker.d.ts +1 -1
- package/dist/cjs/components/dropdownMenu/DropdownMenu.d.ts +1 -1
- package/dist/cjs/components/layouts/PageNowPlaying.js +1 -1
- package/dist/cjs/components/layouts/PageNowPlaying.js.map +1 -1
- package/dist/cjs/components/note/Note.d.ts +1 -1
- package/dist/cjs/components/progress/Progress.d.ts +1 -1
- package/dist/cjs/components/slider/Slider.d.ts +1 -1
- package/dist/cjs/hooks/useOverrideTheme.d.ts +1 -1
- package/dist/cjs/hooks/useTitleBarColor.d.ts +5 -0
- package/dist/cjs/hooks/useTitleBarColor.js +37 -3
- package/dist/cjs/hooks/useTitleBarColor.js.map +1 -1
- package/dist/cjs/hooks/useTitleBarColor.stories.js +1 -1
- package/dist/cjs/hooks/useTitleBarColor.stories.js.map +1 -1
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/index.js +2 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/uno/index.d.ts +1 -0
- package/dist/cjs/uno/index.js +8 -0
- package/dist/cjs/uno/index.js.map +1 -0
- package/dist/cjs/uno/logic/color.d.ts +100 -27
- package/dist/cjs/uno/logic/color.js +250 -42
- package/dist/cjs/uno/logic/color.js.map +1 -1
- package/dist/cjs/uno/logic/color.test.d.ts +1 -0
- package/dist/cjs/uno/logic/color.test.js +83 -0
- package/dist/cjs/uno/logic/color.test.js.map +1 -0
- package/dist/cjs/uno/logic/oklch.d.ts +3 -0
- package/dist/cjs/uno/logic/oklch.js +96 -0
- package/dist/cjs/uno/logic/oklch.js.map +1 -0
- package/dist/cjs/uno/logic/palettes.d.ts +63 -0
- package/dist/cjs/uno/logic/palettes.js +99 -0
- package/dist/cjs/uno/logic/palettes.js.map +1 -0
- package/dist/cjs/uno/preflights/colors.js +18 -42
- package/dist/cjs/uno/preflights/colors.js.map +1 -1
- package/dist/cjs/uno/preflights/fonts.d.ts +4 -0
- package/dist/cjs/uno/preflights/fonts.js +20 -0
- package/dist/cjs/uno/preflights/fonts.js.map +1 -0
- package/dist/cjs/uno/preflights/index.d.ts +2 -1
- package/dist/cjs/uno/preflights/index.js +2 -0
- package/dist/cjs/uno/preflights/index.js.map +1 -1
- package/dist/cjs/uno/theme/colors.d.ts +17 -53
- package/dist/cjs/uno/theme/colors.js +11 -13
- package/dist/cjs/uno/theme/colors.js.map +1 -1
- package/dist/cjs/uno/uno.preset.d.ts +2 -1
- package/dist/cjs/uno/uno.preset.js +3 -1
- package/dist/cjs/uno/uno.preset.js.map +1 -1
- package/dist/css/main.css +9 -8
- package/dist/esm/__tests__/setup.d.ts +1 -0
- package/dist/esm/__tests__/setup.js +3 -0
- package/dist/esm/__tests__/setup.js.map +1 -0
- package/dist/esm/colors.stories.d.ts +1 -8
- package/dist/esm/colors.stories.js +33 -26
- package/dist/esm/colors.stories.js.map +1 -1
- package/dist/esm/components/box/Box.d.ts +1 -1
- package/dist/esm/components/box/Box.stories.js +1 -1
- package/dist/esm/components/box/Box.stories.js.map +1 -1
- package/dist/esm/components/button/Button.d.ts +1 -1
- package/dist/esm/components/button/Button.stories.js +1 -1
- package/dist/esm/components/button/Button.stories.js.map +1 -1
- package/dist/esm/components/button/classes.d.ts +1 -1
- package/dist/esm/components/card/Card.d.ts +1 -1
- package/dist/esm/components/chip/Chip.d.ts +1 -1
- package/dist/esm/components/colorPicker/ColorPicker.d.ts +1 -1
- package/dist/esm/components/colorPicker/ColorPicker.js +1 -1
- package/dist/esm/components/colorPicker/ColorPicker.js.map +1 -1
- package/dist/esm/components/datePicker/DatePicker.d.ts +1 -1
- package/dist/esm/components/dropdownMenu/DropdownMenu.d.ts +1 -1
- package/dist/esm/components/layouts/PageNowPlaying.js +1 -1
- package/dist/esm/components/layouts/PageNowPlaying.js.map +1 -1
- package/dist/esm/components/note/Note.d.ts +1 -1
- package/dist/esm/components/progress/Progress.d.ts +1 -1
- package/dist/esm/components/slider/Slider.d.ts +1 -1
- package/dist/esm/hooks/useOverrideTheme.d.ts +1 -1
- package/dist/esm/hooks/useTitleBarColor.d.ts +5 -0
- package/dist/esm/hooks/useTitleBarColor.js +36 -3
- package/dist/esm/hooks/useTitleBarColor.js.map +1 -1
- package/dist/esm/hooks/useTitleBarColor.stories.js +2 -2
- package/dist/esm/hooks/useTitleBarColor.stories.js.map +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/uno/index.d.ts +1 -0
- package/dist/esm/uno/index.js +3 -0
- package/dist/esm/uno/index.js.map +1 -0
- package/dist/esm/uno/logic/color.d.ts +100 -27
- package/dist/esm/uno/logic/color.js +247 -38
- package/dist/esm/uno/logic/color.js.map +1 -1
- package/dist/esm/uno/logic/color.test.d.ts +1 -0
- package/dist/esm/uno/logic/color.test.js +81 -0
- package/dist/esm/uno/logic/color.test.js.map +1 -0
- package/dist/esm/uno/logic/oklch.d.ts +3 -0
- package/dist/esm/uno/logic/oklch.js +90 -0
- package/dist/esm/uno/logic/oklch.js.map +1 -0
- package/dist/esm/uno/logic/palettes.d.ts +63 -0
- package/dist/esm/uno/logic/palettes.js +95 -0
- package/dist/esm/uno/logic/palettes.js.map +1 -0
- package/dist/esm/uno/preflights/colors.js +17 -41
- package/dist/esm/uno/preflights/colors.js.map +1 -1
- package/dist/esm/uno/preflights/fonts.d.ts +4 -0
- package/dist/esm/uno/preflights/fonts.js +16 -0
- package/dist/esm/uno/preflights/fonts.js.map +1 -0
- package/dist/esm/uno/preflights/index.d.ts +2 -1
- package/dist/esm/uno/preflights/index.js +2 -0
- package/dist/esm/uno/preflights/index.js.map +1 -1
- package/dist/esm/uno/theme/colors.d.ts +17 -53
- package/dist/esm/uno/theme/colors.js +11 -13
- package/dist/esm/uno/theme/colors.js.map +1 -1
- package/dist/esm/uno/uno.preset.d.ts +2 -1
- package/dist/esm/uno/uno.preset.js +3 -1
- package/dist/esm/uno/uno.preset.js.map +1 -1
- package/package.json +132 -125
- package/src/__tests__/setup.ts +1 -0
- package/src/colors.stories.tsx +94 -71
- package/src/components/box/Box.stories.tsx +1 -1
- package/src/components/box/Box.tsx +1 -1
- package/src/components/button/Button.stories.tsx +1 -1
- package/src/components/button/Button.tsx +1 -1
- package/src/components/button/classes.tsx +1 -1
- package/src/components/chip/Chip.tsx +1 -1
- package/src/components/colorPicker/ColorPicker.tsx +1 -1
- package/src/components/datePicker/DatePicker.tsx +1 -1
- package/src/components/dropdownMenu/DropdownMenu.tsx +1 -1
- package/src/components/layouts/PageNowPlaying.tsx +1 -1
- package/src/components/note/Note.tsx +1 -1
- package/src/components/progress/Progress.tsx +1 -1
- package/src/components/slider/Slider.tsx +1 -1
- package/src/hooks/useOverrideTheme.ts +1 -1
- package/src/hooks/useTitleBarColor.stories.tsx +2 -2
- package/src/hooks/useTitleBarColor.ts +52 -4
- package/src/index.ts +1 -5
- package/src/themes.stories.tsx +1 -1
- package/src/uno/index.ts +5 -0
- package/src/uno/logic/color.test.ts +119 -0
- package/src/uno/logic/color.ts +420 -80
- package/src/uno/logic/oklch.ts +120 -0
- package/src/uno/logic/palettes.ts +266 -0
- package/src/uno/preflights/colors.ts +22 -41
- package/src/uno/preflights/fonts.ts +23 -0
- package/src/uno/preflights/index.ts +3 -1
- package/src/uno/theme/colors.ts +13 -18
- package/src/uno/uno.preset.ts +8 -3
package/package.json
CHANGED
|
@@ -1,127 +1,134 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
2
|
+
"name": "@a-type/ui",
|
|
3
|
+
"version": "3.0.13",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"files": [
|
|
6
|
+
"/dist",
|
|
7
|
+
"/src"
|
|
8
|
+
],
|
|
9
|
+
"sideEffects": [
|
|
10
|
+
".*\\.css$"
|
|
11
|
+
],
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"import": "./dist/esm/index.js",
|
|
15
|
+
"node": "./dist/esm/index.js",
|
|
16
|
+
"require": "./dist/cjs/index.js",
|
|
17
|
+
"default": "./dist/cjs/index.js"
|
|
18
|
+
},
|
|
19
|
+
"./uno-preset": {
|
|
20
|
+
"types": "./dist/esm/uno/uno.preset.d.ts",
|
|
21
|
+
"import": "./dist/esm/uno/uno.preset.js",
|
|
22
|
+
"node": "./dist/esm/uno/uno.preset.js",
|
|
23
|
+
"require": "./dist/cjs/uno/uno.preset.js",
|
|
24
|
+
"default": "./dist/cjs/uno/uno.preset.js"
|
|
25
|
+
},
|
|
26
|
+
"./main.css": {
|
|
27
|
+
"import": "./dist/css/main.css",
|
|
28
|
+
"node": "./dist/css/main.css",
|
|
29
|
+
"require": "./dist/css/main.css",
|
|
30
|
+
"default": "./dist/css/main.css"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"scripts": {
|
|
34
|
+
"build:transpile": "tsc && tsc -P tsconfig-cjs.json",
|
|
35
|
+
"build:prefix": "node ./scripts/addUnoInclude.js",
|
|
36
|
+
"build:process": "unocss --write-transformed -o ./dist/css/main.css -m -c uno.config.js \"./dist/**/*.js\"",
|
|
37
|
+
"build": "pnpm run build:transpile && pnpm run build:prefix && pnpm run build:process",
|
|
38
|
+
"prepublish": "pnpm run build",
|
|
39
|
+
"icons": "node ./scripts/generateIcons.js",
|
|
40
|
+
"storybook": "storybook dev -p 6006",
|
|
41
|
+
"build-storybook": "storybook build",
|
|
42
|
+
"up-radix": "pnpm update \"@radix-ui/*\" --latest",
|
|
43
|
+
"bump": "pnpx bumpp",
|
|
44
|
+
"test": "vitest",
|
|
45
|
+
"test:browser": "vitest --config=vitest.browser.config.ts"
|
|
46
|
+
},
|
|
47
|
+
"peerDependencies": {
|
|
48
|
+
"react": "^19",
|
|
49
|
+
"react-dom": "^19",
|
|
50
|
+
"unocss": "^66"
|
|
51
|
+
},
|
|
52
|
+
"dependencies": {
|
|
53
|
+
"@a-type/utils": "^1.1.4",
|
|
54
|
+
"@radix-ui/react-accordion": "^1.2.2",
|
|
55
|
+
"@radix-ui/react-checkbox": "^1.1.3",
|
|
56
|
+
"@radix-ui/react-collapsible": "^1.1.2",
|
|
57
|
+
"@radix-ui/react-context-menu": "^2.2.3",
|
|
58
|
+
"@radix-ui/react-dialog": "^1.1.3",
|
|
59
|
+
"@radix-ui/react-dropdown-menu": "^2.1.3",
|
|
60
|
+
"@radix-ui/react-icons": "^1.3.2",
|
|
61
|
+
"@radix-ui/react-menu": "^2.1.3",
|
|
62
|
+
"@radix-ui/react-popover": "^1.1.3",
|
|
63
|
+
"@radix-ui/react-progress": "^1.1.1",
|
|
64
|
+
"@radix-ui/react-radio-group": "^1.2.2",
|
|
65
|
+
"@radix-ui/react-scroll-area": "^1.2.2",
|
|
66
|
+
"@radix-ui/react-select": "^2.1.3",
|
|
67
|
+
"@radix-ui/react-slider": "^1.2.2",
|
|
68
|
+
"@radix-ui/react-slot": "^1.1.1",
|
|
69
|
+
"@radix-ui/react-switch": "^1.1.2",
|
|
70
|
+
"@radix-ui/react-tabs": "^1.1.2",
|
|
71
|
+
"@radix-ui/react-toast": "^1.2.3",
|
|
72
|
+
"@radix-ui/react-toggle-group": "^1.1.1",
|
|
73
|
+
"@radix-ui/react-tooltip": "^1.1.5",
|
|
74
|
+
"@unocss/preset-mini": "66.5.4",
|
|
75
|
+
"@unocss/preset-wind3": "66.5.4",
|
|
76
|
+
"@use-gesture/react": "^10.3.1",
|
|
77
|
+
"browser-image-resizer": "^2.4.1",
|
|
78
|
+
"calendar-blocks": "^0.4.0",
|
|
79
|
+
"clsx": "^2.1.1",
|
|
80
|
+
"color-interpolate": "^1.0.5",
|
|
81
|
+
"color-parse": "^2.0.2",
|
|
82
|
+
"color-space": "^2.0.1",
|
|
83
|
+
"colorjs.io": "^0.5.2",
|
|
84
|
+
"csstype": "^3.1.3",
|
|
85
|
+
"date-fns": "^4.1.0",
|
|
86
|
+
"formik": "^2.4.6",
|
|
87
|
+
"frimousse": "^0.2.0",
|
|
88
|
+
"motion": "^12.23.6",
|
|
89
|
+
"pluralize": "^8.0.0",
|
|
90
|
+
"react-hot-toast": "^2.4.1",
|
|
91
|
+
"react-is": "^19.1.0",
|
|
92
|
+
"valtio": "^2.1.4"
|
|
93
|
+
},
|
|
94
|
+
"devDependencies": {
|
|
95
|
+
"@storybook/addon-essentials": "8.4.7",
|
|
96
|
+
"@storybook/addon-interactions": "8.4.7",
|
|
97
|
+
"@storybook/addon-links": "8.4.7",
|
|
98
|
+
"@storybook/blocks": "8.4.7",
|
|
99
|
+
"@storybook/react": "8.4.7",
|
|
100
|
+
"@storybook/react-vite": "8.4.7",
|
|
101
|
+
"@storybook/test": "8.4.7",
|
|
102
|
+
"@types/pluralize": "^0.0.33",
|
|
103
|
+
"@types/react": "^19.0.1",
|
|
104
|
+
"@types/react-dom": "^19.0.2",
|
|
105
|
+
"@types/react-is": "^19.0.0",
|
|
106
|
+
"@types/w3c-image-capture": "^1.0.10",
|
|
107
|
+
"@unocss/cli": "66.5.4",
|
|
108
|
+
"@unocss/core": "66.5.4",
|
|
109
|
+
"@unocss/transformer-variant-group": "66.5.4",
|
|
110
|
+
"@vitejs/plugin-react": "^5.1.0",
|
|
111
|
+
"@vitest/browser-playwright": "^4.0.6",
|
|
112
|
+
"axios": "^1.5.0",
|
|
113
|
+
"bumpp": "^10.3.1",
|
|
114
|
+
"change-case": "^4.1.2",
|
|
115
|
+
"dotenv": "^16.3.1",
|
|
116
|
+
"fs-extra": "^11.1.1",
|
|
117
|
+
"prettier": "^3.0.3",
|
|
118
|
+
"react": "19.0.0",
|
|
119
|
+
"react-dom": "19.0.0",
|
|
120
|
+
"storybook": "8.4.7",
|
|
121
|
+
"typescript": "^5.7.2",
|
|
122
|
+
"unocss": "^66.5.4",
|
|
123
|
+
"vitest": "^4.0.6",
|
|
124
|
+
"vitest-browser-react": "^2.0.2"
|
|
125
|
+
},
|
|
126
|
+
"pnpm": {
|
|
127
|
+
"ignoredBuiltDependencies": [
|
|
128
|
+
"esbuild"
|
|
129
|
+
],
|
|
130
|
+
"onlyBuiltDependencies": [
|
|
131
|
+
"esbuild"
|
|
132
|
+
]
|
|
133
|
+
}
|
|
127
134
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import 'virtual:uno.css';
|
package/src/colors.stories.tsx
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { CSSProperties } from 'react';
|
|
2
4
|
import { Box } from './components/index.js';
|
|
5
|
+
import { snapshotColorContext } from './uno/logic/color.js';
|
|
6
|
+
import { palettes } from './uno/logic/palettes.js';
|
|
3
7
|
|
|
4
8
|
const meta = {
|
|
5
9
|
title: 'System/Colors',
|
|
@@ -11,17 +15,9 @@ const meta = {
|
|
|
11
15
|
max: 360,
|
|
12
16
|
},
|
|
13
17
|
},
|
|
14
|
-
customRotate: {
|
|
15
|
-
control: {
|
|
16
|
-
type: 'number',
|
|
17
|
-
min: -20,
|
|
18
|
-
max: 20,
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
18
|
},
|
|
22
19
|
args: {
|
|
23
20
|
customHue: 0,
|
|
24
|
-
customRotate: 0,
|
|
25
21
|
},
|
|
26
22
|
parameters: {
|
|
27
23
|
controls: { expanded: true },
|
|
@@ -36,55 +32,45 @@ export const Default: Story = {
|
|
|
36
32
|
render(args: any) {
|
|
37
33
|
const style: any = args.customHue
|
|
38
34
|
? {
|
|
39
|
-
'--
|
|
40
|
-
'--dyn-primary-hue-rotate': args.customRotate,
|
|
35
|
+
'--p-primary-hue': args.customHue,
|
|
41
36
|
}
|
|
42
37
|
: {};
|
|
38
|
+
|
|
39
|
+
const ranges = (
|
|
40
|
+
<>
|
|
41
|
+
<Range className="theme" style={style} />
|
|
42
|
+
<Range className="theme-lemon" />
|
|
43
|
+
<Range className="theme-leek" />
|
|
44
|
+
<Range className="theme-tomato" />
|
|
45
|
+
<Range className="theme-eggplant" />
|
|
46
|
+
<Range className="theme-blueberry" />
|
|
47
|
+
<Range className="palette-attention" />
|
|
48
|
+
<Range className="palette-success" />
|
|
49
|
+
<Box className="h-100px">
|
|
50
|
+
<Box grow className="bg-gray-wash" />
|
|
51
|
+
<Box grow className="bg-gray-light" />
|
|
52
|
+
<Box grow className="bg-gray" />
|
|
53
|
+
<Box grow className="bg-gray-dark" />
|
|
54
|
+
<Box grow className="bg-gray-ink" />
|
|
55
|
+
</Box>
|
|
56
|
+
<Range className="palette-high-contrast" />
|
|
57
|
+
<Box className="h-100px">
|
|
58
|
+
<Box grow className="bg-black" />
|
|
59
|
+
<Box grow className="bg-wash" />
|
|
60
|
+
<Box grow className="bg-white" />
|
|
61
|
+
</Box>
|
|
62
|
+
</>
|
|
63
|
+
);
|
|
64
|
+
|
|
43
65
|
return (
|
|
44
66
|
<Box col>
|
|
45
67
|
<input type="color" className="sticky top-0 z-1" />
|
|
46
68
|
<Box full>
|
|
47
69
|
<Box d="col" grow p surface>
|
|
48
|
-
|
|
49
|
-
<Range className="theme-lemon" />
|
|
50
|
-
<Range className="theme-leek" />
|
|
51
|
-
<Range className="theme-tomato" />
|
|
52
|
-
<Range className="theme-eggplant" />
|
|
53
|
-
<Range className="theme-blueberry" />
|
|
54
|
-
<Box className="h-100px">
|
|
55
|
-
<Box grow className="bg-gray-wash" />
|
|
56
|
-
<Box grow className="bg-gray-light" />
|
|
57
|
-
<Box grow className="bg-gray" />
|
|
58
|
-
<Box grow className="bg-gray-dark" />
|
|
59
|
-
<Box grow className="bg-gray-ink" />
|
|
60
|
-
</Box>
|
|
61
|
-
<Range className="palette-high-contrast" />
|
|
62
|
-
<Box className="h-100px">
|
|
63
|
-
<Box grow className="bg-black" />
|
|
64
|
-
<Box grow className="bg-wash" />
|
|
65
|
-
<Box grow className="bg-white" />
|
|
66
|
-
</Box>
|
|
70
|
+
{ranges}
|
|
67
71
|
</Box>
|
|
68
72
|
<Box d="col" className="override-dark theme" grow p>
|
|
69
|
-
|
|
70
|
-
<Range className="theme-lemon" />
|
|
71
|
-
<Range className="theme-leek" />
|
|
72
|
-
<Range className="theme-tomato" />
|
|
73
|
-
<Range className="theme-eggplant" />
|
|
74
|
-
<Range className="theme-blueberry" />
|
|
75
|
-
<Box className="h-100px">
|
|
76
|
-
<Box grow className="bg-gray-wash" />
|
|
77
|
-
<Box grow className="bg-gray-light" />
|
|
78
|
-
<Box grow className="bg-gray" />
|
|
79
|
-
<Box grow className="bg-gray-dark" />
|
|
80
|
-
<Box grow className="bg-gray-ink" />
|
|
81
|
-
</Box>
|
|
82
|
-
<Range className="palette-high-contrast" />
|
|
83
|
-
<Box className="h-100px">
|
|
84
|
-
<Box grow className="bg-black" />
|
|
85
|
-
<Box grow className="bg-wash" />
|
|
86
|
-
<Box grow className="bg-white" />
|
|
87
|
-
</Box>
|
|
73
|
+
{ranges}
|
|
88
74
|
</Box>
|
|
89
75
|
</Box>
|
|
90
76
|
</Box>
|
|
@@ -95,19 +81,22 @@ export const Default: Story = {
|
|
|
95
81
|
function Swatch({
|
|
96
82
|
className,
|
|
97
83
|
children,
|
|
84
|
+
style,
|
|
98
85
|
}: {
|
|
99
86
|
className?: string;
|
|
100
87
|
children?: React.ReactNode;
|
|
88
|
+
style?: CSSProperties;
|
|
101
89
|
}) {
|
|
102
90
|
return (
|
|
103
91
|
<div
|
|
104
|
-
className={className}
|
|
92
|
+
className={clsx(className, 'color-contrast')}
|
|
105
93
|
style={{
|
|
106
94
|
height: '100px',
|
|
107
95
|
display: 'flex',
|
|
108
96
|
justifyContent: 'center',
|
|
109
97
|
alignItems: 'center',
|
|
110
98
|
flex: '1',
|
|
99
|
+
...style,
|
|
111
100
|
}}
|
|
112
101
|
>
|
|
113
102
|
{children}
|
|
@@ -118,11 +107,11 @@ function Swatch({
|
|
|
118
107
|
function Range({ className, style }: { className?: string; style?: any }) {
|
|
119
108
|
return (
|
|
120
109
|
<Box className={className} style={style}>
|
|
121
|
-
<Swatch className="bg-
|
|
122
|
-
<Swatch className="bg-
|
|
123
|
-
<Swatch className="bg-
|
|
124
|
-
<Swatch className="bg-
|
|
125
|
-
<Swatch className="bg-
|
|
110
|
+
<Swatch className="bg-main-wash" />
|
|
111
|
+
<Swatch className="bg-main-light" />
|
|
112
|
+
<Swatch className="bg-main" />
|
|
113
|
+
<Swatch className="bg-main-dark" />
|
|
114
|
+
<Swatch className="bg-main-ink" />
|
|
126
115
|
</Box>
|
|
127
116
|
);
|
|
128
117
|
}
|
|
@@ -131,8 +120,7 @@ export const Modifiers: Story = {
|
|
|
131
120
|
render(args: any) {
|
|
132
121
|
const style: any = args.customHue
|
|
133
122
|
? {
|
|
134
|
-
'--
|
|
135
|
-
'--dyn-primary-hue-rotate': args.customRotate,
|
|
123
|
+
'--p-primary-hue': args.customHue,
|
|
136
124
|
}
|
|
137
125
|
: {};
|
|
138
126
|
return (
|
|
@@ -158,19 +146,19 @@ function ModifierRange({
|
|
|
158
146
|
}) {
|
|
159
147
|
return (
|
|
160
148
|
<Box className={className} style={style}>
|
|
161
|
-
<Swatch className="bg-
|
|
162
|
-
<Swatch className="bg-
|
|
163
|
-
<Swatch className="bg-
|
|
164
|
-
{/* <Swatch className="bg-
|
|
165
|
-
<Swatch className="bg-
|
|
166
|
-
<Swatch className="bg-
|
|
167
|
-
<Swatch className="bg-
|
|
168
|
-
<Swatch className="bg-
|
|
169
|
-
<Swatch className="bg-
|
|
170
|
-
{/* <Swatch className="bg-
|
|
171
|
-
<Swatch className="bg-
|
|
172
|
-
<Swatch className="bg-
|
|
173
|
-
<Swatch className="bg-
|
|
149
|
+
<Swatch className="bg-main-wash">W</Swatch>
|
|
150
|
+
<Swatch className="bg-main-light bg-lighten-2">L+2</Swatch>
|
|
151
|
+
<Swatch className="bg-main-light">L</Swatch>
|
|
152
|
+
{/* <Swatch className="bg-main bg-lighten-5">P+5</Swatch> */}
|
|
153
|
+
<Swatch className="bg-main bg-lighten-2">P+2</Swatch>
|
|
154
|
+
<Swatch className="bg-main bg-lighten-1">P+1</Swatch>
|
|
155
|
+
<Swatch className="bg-main">P</Swatch>
|
|
156
|
+
<Swatch className="bg-main bg-darken-1">P-1</Swatch>
|
|
157
|
+
<Swatch className="bg-main bg-darken-2">P-2</Swatch>
|
|
158
|
+
{/* <Swatch className="bg-main bg-darken-5">P-5</Swatch> */}
|
|
159
|
+
<Swatch className="bg-main-dark">D</Swatch>
|
|
160
|
+
<Swatch className="bg-main-dark bg-darken-2">D-2</Swatch>
|
|
161
|
+
<Swatch className="bg-main-ink">I</Swatch>
|
|
174
162
|
</Box>
|
|
175
163
|
);
|
|
176
164
|
}
|
|
@@ -179,8 +167,7 @@ export const Inheritance: Story = {
|
|
|
179
167
|
render(args: any) {
|
|
180
168
|
const style: any = args.customHue
|
|
181
169
|
? {
|
|
182
|
-
'--
|
|
183
|
-
'--dyn-primary-hue-rotate': args.customRotate,
|
|
170
|
+
'--p-primary-hue': args.customHue,
|
|
184
171
|
}
|
|
185
172
|
: {};
|
|
186
173
|
return (
|
|
@@ -266,3 +253,39 @@ export const TweakOpacity: Story = {
|
|
|
266
253
|
);
|
|
267
254
|
},
|
|
268
255
|
};
|
|
256
|
+
|
|
257
|
+
export const ComputedColors: Story = {
|
|
258
|
+
render() {
|
|
259
|
+
const ctx = snapshotColorContext(undefined, 'primary');
|
|
260
|
+
const hexValues = [
|
|
261
|
+
palettes.primary.definitions.wash.computeHex(ctx),
|
|
262
|
+
palettes.primary.definitions.light.computeHex(ctx),
|
|
263
|
+
palettes.primary.definitions.default.computeHex(ctx),
|
|
264
|
+
palettes.primary.definitions.dark.computeHex(ctx),
|
|
265
|
+
palettes.primary.definitions.ink.computeHex(ctx),
|
|
266
|
+
];
|
|
267
|
+
const oklchValues = [
|
|
268
|
+
palettes.primary.definitions.wash.computeOklch(ctx),
|
|
269
|
+
palettes.primary.definitions.light.computeOklch(ctx),
|
|
270
|
+
palettes.primary.definitions.default.computeOklch(ctx),
|
|
271
|
+
palettes.primary.definitions.dark.computeOklch(ctx),
|
|
272
|
+
palettes.primary.definitions.ink.computeOklch(ctx),
|
|
273
|
+
];
|
|
274
|
+
|
|
275
|
+
return (
|
|
276
|
+
<Box col>
|
|
277
|
+
<Range className="theme" />
|
|
278
|
+
<Box className="h-100px">
|
|
279
|
+
{oklchValues.map((oklch) => (
|
|
280
|
+
<Swatch style={{ backgroundColor: oklch }}>OK</Swatch>
|
|
281
|
+
))}
|
|
282
|
+
</Box>
|
|
283
|
+
<Box className="h-100px">
|
|
284
|
+
{hexValues.map((hex) => (
|
|
285
|
+
<Swatch style={{ backgroundColor: hex }}>Hex</Swatch>
|
|
286
|
+
))}
|
|
287
|
+
</Box>
|
|
288
|
+
</Box>
|
|
289
|
+
);
|
|
290
|
+
},
|
|
291
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { paletteNames } from '../../uno/
|
|
2
|
+
import { paletteNames } from '../../uno/index.js';
|
|
3
3
|
import { Button } from '../button/Button.js';
|
|
4
4
|
import { Checkbox } from '../checkbox/Checkbox.js';
|
|
5
5
|
import { Progress } from '../progress/Progress.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import clsx from 'clsx';
|
|
2
2
|
import { createContext, Ref, useContext, useMemo } from 'react';
|
|
3
|
-
import { PaletteName } from '../../uno/
|
|
3
|
+
import { PaletteName } from '../../uno/index.js';
|
|
4
4
|
import { SlotDiv, SlotDivProps } from '../utility/SlotDiv.js';
|
|
5
5
|
|
|
6
6
|
export type BoxAlignment = 'center' | 'stretch' | 'start' | 'end';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
2
|
import { useState } from 'react';
|
|
3
|
-
import { paletteNames } from '../../uno/
|
|
3
|
+
import { paletteNames } from '../../uno/index.js';
|
|
4
4
|
import { Box } from '../box/Box.js';
|
|
5
5
|
import { Icon } from '../icon/index.js';
|
|
6
6
|
import { Button } from './Button.js';
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from 'react';
|
|
13
13
|
import { withClassName } from '../../hooks.js';
|
|
14
14
|
import useMergedRef from '../../hooks/useMergedRef.js';
|
|
15
|
-
import { PaletteName } from '../../uno/
|
|
15
|
+
import { PaletteName } from '../../uno/index.js';
|
|
16
16
|
import { DropdownMenuTriggerIcon } from '../dropdownMenu/DropdownMenu.js';
|
|
17
17
|
import { useIsDropdownTrigger } from '../dropdownMenu/DropdownTriggerContext.js';
|
|
18
18
|
import { IconLoadingProvider } from '../icon/IconLoadingContext.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Slot } from '@radix-ui/react-slot';
|
|
2
2
|
import classNames from 'clsx';
|
|
3
3
|
import { HTMLAttributes, Ref } from 'react';
|
|
4
|
-
import { PaletteName } from '../../uno/
|
|
4
|
+
import { PaletteName } from '../../uno/index.js';
|
|
5
5
|
|
|
6
6
|
export interface ChipProps extends HTMLAttributes<HTMLElement> {
|
|
7
7
|
color?: PaletteName;
|
|
@@ -2,7 +2,7 @@ import { SelectTriggerProps } from '@radix-ui/react-select';
|
|
|
2
2
|
import classNames, { clsx } from 'clsx';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
4
|
import { withClassName } from '../../hooks/withClassName.js';
|
|
5
|
-
import { PaletteName, paletteNames } from '../../uno/
|
|
5
|
+
import { PaletteName, paletteNames } from '../../uno/index.js';
|
|
6
6
|
import {
|
|
7
7
|
Select,
|
|
8
8
|
SelectContent,
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
import classNames from 'clsx';
|
|
7
7
|
import { useCallback, useState } from 'react';
|
|
8
8
|
import { withClassName } from '../../hooks.js';
|
|
9
|
-
import { PaletteName } from '../../uno/
|
|
9
|
+
import { PaletteName } from '../../uno/index.js';
|
|
10
10
|
import { Button } from '../button/index.js';
|
|
11
11
|
import { Icon } from '../icon/index.js';
|
|
12
12
|
|
|
@@ -3,7 +3,7 @@ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
|
3
3
|
import classNames, { clsx } from 'clsx';
|
|
4
4
|
import { Ref } from 'react';
|
|
5
5
|
import { withClassName } from '../../hooks/withClassName.js';
|
|
6
|
-
import { PaletteName } from '../../uno/
|
|
6
|
+
import { PaletteName } from '../../uno/index.js';
|
|
7
7
|
import { BoxContext } from '../box/Box.js';
|
|
8
8
|
import { SlotDiv } from '../utility/SlotDiv.js';
|
|
9
9
|
import { DropdownTriggerProvider } from './DropdownTriggerContext.js';
|
|
@@ -21,7 +21,7 @@ export function PageNowPlaying({
|
|
|
21
21
|
<div
|
|
22
22
|
{...props}
|
|
23
23
|
className={classNames(
|
|
24
|
-
'layer-components:(fixed left-0 right-0 z-[var(--z-
|
|
24
|
+
'layer-components:(fixed left-0 right-0 z-[var(--z-now-playing)] flex flex-col gap-2 items-end)',
|
|
25
25
|
// on mobile, this must be positioned above any nav bar that's present,
|
|
26
26
|
// or at minimum in the safe area
|
|
27
27
|
'layer-components:bottom-[var(--nav-height,env(safe-area-inset-bottom,0px))]',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import classNames from 'clsx';
|
|
2
2
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
3
|
-
import { PaletteName } from '../../uno/
|
|
3
|
+
import { PaletteName } from '../../uno/index.js';
|
|
4
4
|
|
|
5
5
|
export interface NoteProps extends HTMLAttributes<HTMLDivElement> {
|
|
6
6
|
children?: ReactNode;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as ProgressPrimitive from '@radix-ui/react-progress';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import { withClassName } from '../../hooks.js';
|
|
4
|
-
import { PaletteName } from '../../uno/
|
|
4
|
+
import { PaletteName } from '../../uno/index.js';
|
|
5
5
|
|
|
6
6
|
export const ProgressRoot = withClassName(
|
|
7
7
|
ProgressPrimitive.Root,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as SliderPrimitive from '@radix-ui/react-slider';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import { withClassName } from '../../hooks.js';
|
|
4
|
-
import { PaletteName } from '../../uno/
|
|
4
|
+
import { PaletteName } from '../../uno/index.js';
|
|
5
5
|
|
|
6
6
|
export const SliderRoot = withClassName(
|
|
7
7
|
SliderPrimitive.Root,
|