@ultraviolet/ui 2.0.5 → 3.0.0-beta.0
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/README.md +10 -6
- package/dist/components/Button/constants.cjs +0 -17
- package/dist/components/Button/constants.js +1 -18
- package/dist/components/Button/index.cjs +18 -187
- package/dist/components/Button/index.d.ts +18 -60
- package/dist/components/Button/index.js +18 -185
- package/dist/components/Button/styles.css.cjs +8 -0
- package/dist/components/Button/styles.css.d.ts +82 -0
- package/dist/components/Button/styles.css.js +8 -0
- package/dist/components/Chip/index.d.ts +1 -1
- package/dist/components/Dialog/constants.d.ts +1 -1
- package/dist/components/Dialog/index.d.ts +8 -6
- package/dist/components/List/index.d.ts +1 -1
- package/dist/components/Menu/index.d.ts +1 -1
- package/dist/components/Slider/styles.d.ts +1 -1
- package/dist/components/Tabs/TabMenuItem.d.ts +1 -1
- package/dist/components/Tabs/index.d.ts +2 -2
- package/dist/components/Tooltip/index.d.ts +1 -1
- package/dist/index.cjs +3 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -0
- package/dist/theme/ThemeProvider.cjs +21 -0
- package/dist/theme/ThemeProvider.d.ts +737 -0
- package/dist/theme/ThemeProvider.js +21 -0
- package/dist/theme/index.d.ts +3 -2
- package/dist/themes/dist/vanilla/themes.css.js.vanilla.css.cjs +1 -0
- package/dist/themes/dist/vanilla/themes.css.js.vanilla.css.js +1 -0
- package/dist/themes/dist/vanilla/themes.css.ts.vanilla.css.js.vanilla.css.cjs +1 -0
- package/dist/themes/dist/vanilla/themes.css.ts.vanilla.css.js.vanilla.css.js +1 -0
- package/dist/ui.css +1 -1
- package/package.json +12 -4
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "@emotion/react/jsx-runtime";
|
|
3
|
+
import { consoleLightTheme, theme } from "@ultraviolet/themes";
|
|
4
|
+
import { assignInlineVars } from "@vanilla-extract/dynamic";
|
|
5
|
+
import { createContext, useContext } from "react";
|
|
6
|
+
const ThemeContext = createContext(consoleLightTheme);
|
|
7
|
+
const useTheme = () => {
|
|
8
|
+
const context = useContext(ThemeContext);
|
|
9
|
+
if (!context) {
|
|
10
|
+
throw new Error("useTheme must be used within a ThemeProvider imported from @ultraviolet/ui");
|
|
11
|
+
}
|
|
12
|
+
return context;
|
|
13
|
+
};
|
|
14
|
+
const ThemeProvider = ({
|
|
15
|
+
children,
|
|
16
|
+
theme: theme$1 = consoleLightTheme
|
|
17
|
+
}) => /* @__PURE__ */ jsx(ThemeContext.Provider, { value: theme$1, children: /* @__PURE__ */ jsx("div", { style: assignInlineVars(theme, theme$1), children }) });
|
|
18
|
+
export {
|
|
19
|
+
ThemeProvider,
|
|
20
|
+
useTheme
|
|
21
|
+
};
|
package/dist/theme/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { consoleDarkTheme, consoleLightTheme } from '@ultraviolet/themes';
|
|
2
|
+
import { ThemeProvider, useTheme } from './ThemeProvider';
|
|
2
3
|
export type ScreenSize = keyof typeof consoleLightTheme.breakpoints;
|
|
3
4
|
type UltravioletUITheme = typeof consoleLightTheme;
|
|
4
5
|
declare const colors: {
|
|
@@ -699,7 +700,7 @@ declare const extendTheme: (extendedTheme: RecursivePartial<UltravioletUITheme>)
|
|
|
699
700
|
type Color = Extract<keyof typeof consoleLightTheme.colors, 'primary' | 'secondary' | 'neutral' | 'success' | 'danger' | 'warning' | 'info'>;
|
|
700
701
|
type ExtendedColor = Color | 'white' | 'black';
|
|
701
702
|
declare const SENTIMENTS: readonly ["primary", "secondary", "neutral", "success", "danger", "warning", "info"];
|
|
702
|
-
declare const SENTIMENTS_WITHOUT_NEUTRAL: ("
|
|
703
|
+
declare const SENTIMENTS_WITHOUT_NEUTRAL: ("danger" | "info" | "success" | "primary" | "warning" | "secondary")[];
|
|
703
704
|
export type { UltravioletUITheme, Color, ExtendedColor };
|
|
704
|
-
export { colors, shadows, space, radii, breakpoints as screens, consoleDarkTheme as darkTheme, extendTheme, SENTIMENTS, SENTIMENTS_WITHOUT_NEUTRAL, typography, };
|
|
705
|
+
export { colors, shadows, space, radii, breakpoints as screens, consoleDarkTheme as darkTheme, extendTheme, SENTIMENTS, SENTIMENTS_WITHOUT_NEUTRAL, typography, ThemeProvider, useTheme, };
|
|
705
706
|
export default consoleLightTheme;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
package/dist/ui.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.backdrop-drawer{padding:0!important;transition:opacity .1s ease-in-out}
|
|
1
|
+
.uv_e1wcoe0{display:inline-flex;position:relative;flex-direction:row;box-sizing:border-box;align-items:center;justify-content:center;outline-offset:2px;white-space:nowrap;text-decoration:none;border-radius:var(--rwwhsl85)}.uv_e1wcoe0:hover{text-decoration:none}.uv_e1wcoe1{height:var(--rwwhsl9k);padding-left:var(--rwwhsl9v);padding-right:var(--rwwhsl9v);gap:var(--rwwhsl9u);font-size:var(--rwwhslb9);font-family:var(--rwwhslb8);font-weight:var(--rwwhslbg);letter-spacing:var(--rwwhslbb);line-height:var(--rwwhslbc)}.uv_e1wcoe2{height:var(--rwwhsl9j);padding-left:var(--rwwhsla6);padding-right:var(--rwwhsla6);gap:var(--rwwhsl9u);font-size:var(--rwwhslb9);font-family:var(--rwwhslb8);font-weight:var(--rwwhslbg);letter-spacing:var(--rwwhslbb);line-height:var(--rwwhslbc)}.uv_e1wcoe3{height:var(--rwwhsl9h);padding-left:var(--rwwhsl9u);padding-right:var(--rwwhsl9u);gap:var(--rwwhsl9u);font-size:var(--rwwhslb9);font-family:var(--rwwhslb8);font-weight:var(--rwwhslbg);letter-spacing:var(--rwwhslbb);line-height:var(--rwwhslbc)}.uv_e1wcoe4{height:var(--rwwhsl9f);padding-left:var(--rwwhsla4);padding-right:var(--rwwhsla4);gap:var(--rwwhsla4);font-size:var(--rwwhslb9);font-family:var(--rwwhslb8);font-weight:var(--rwwhslbg);letter-spacing:var(--rwwhslbb);line-height:var(--rwwhslbc)}.uv_e1wcoe5{width:100%}.uv_e1wcoe6{width:auto}.uv_e1wcoej{cursor:not-allowed}.uv_e1wcoek{cursor:pointer}.uv_e1wcoel{background:var(--rwwhsl5j);color:var(--rwwhsl61);border:none}.uv_e1wcoel:hover,.uv_e1wcoel:active{background:var(--rwwhsl5l);color:var(--rwwhsl63)}.uv_e1wcoel:disabled{background:var(--rwwhsl5k);color:var(--rwwhsl62)}.uv_e1wcoem{background:var(--rwwhsl67);color:var(--rwwhsl6p);border:none}.uv_e1wcoem:hover,.uv_e1wcoem:active{background:var(--rwwhsl69);color:var(--rwwhsl6r)}.uv_e1wcoem:disabled{background:var(--rwwhsl68);color:var(--rwwhsl6q)}.uv_e1wcoen{background:var(--rwwhsl9);color:var(--rwwhslr);border:none}.uv_e1wcoen:hover,.uv_e1wcoen:active{background:var(--rwwhslb);color:var(--rwwhslt)}.uv_e1wcoen:disabled{background:var(--rwwhsla);color:var(--rwwhsls)}.uv_e1wcoeo{background:var(--rwwhslx);color:var(--rwwhsl1f);border:none}.uv_e1wcoeo:hover,.uv_e1wcoeo:active{background:var(--rwwhslz);color:var(--rwwhsl1h)}.uv_e1wcoeo:disabled{background:var(--rwwhsly);color:var(--rwwhsl1g)}.uv_e1wcoep{background:var(--rwwhsl6v);color:var(--rwwhsl7d);border:none}.uv_e1wcoep:hover,.uv_e1wcoep:active{background:var(--rwwhsl6x);color:var(--rwwhsl7f)}.uv_e1wcoep:disabled{background:var(--rwwhsl6w);color:var(--rwwhsl7e)}.uv_e1wcoeq{background:var(--rwwhsl7j);color:var(--rwwhsl81);border:none}.uv_e1wcoeq:hover,.uv_e1wcoeq:active{background:var(--rwwhsl7l);color:var(--rwwhsl83)}.uv_e1wcoeq:disabled{background:var(--rwwhsl7k);color:var(--rwwhsl82)}.uv_e1wcoer{background:var(--rwwhsl1l);color:var(--rwwhsl2m);border:none}.uv_e1wcoer:hover,.uv_e1wcoer:active{background:var(--rwwhsl1q);color:var(--rwwhsl2r)}.uv_e1wcoer:disabled{background:var(--rwwhsl1m);color:var(--rwwhsl2n)}.uv_e1wcoes{background:var(--rwwhsl4r);color:var(--rwwhsl5c);border:none}.uv_e1wcoes:hover,.uv_e1wcoes:active{background:var(--rwwhsl4t);color:var(--rwwhsl5e)}.uv_e1wcoes:disabled{background:var(--rwwhsl4s);color:var(--rwwhsl51)}.uv_e1wcoet{background:var(--rwwhsl53);color:var(--rwwhsl50);border:none}.uv_e1wcoet:hover,.uv_e1wcoet:active{background:var(--rwwhsl55);color:var(--rwwhsl52)}.uv_e1wcoet:disabled{background:var(--rwwhsl54);color:var(--rwwhsl5d)}.uv_e1wcoeu{background:none;color:var(--rwwhsl5y);border:1px solid var(--rwwhsl5m)}.uv_e1wcoeu:hover,.uv_e1wcoeu:active{background:var(--rwwhsl5i);color:var(--rwwhsl60);border:1px solid var(--rwwhsl5o)}.uv_e1wcoeu:disabled{color:var(--rwwhsl5z);border:1px solid var(--rwwhsl5n)}.uv_e1wcoev{background:none;color:var(--rwwhsl6m);border:1px solid var(--rwwhsl6a)}.uv_e1wcoev:hover,.uv_e1wcoev:active{background:var(--rwwhsl66);color:var(--rwwhsl6o);border:1px solid var(--rwwhsl6c)}.uv_e1wcoev:disabled{color:var(--rwwhsl6n);border:1px solid var(--rwwhsl6b)}.uv_e1wcoew{background:none;color:var(--rwwhslo);border:1px solid var(--rwwhslc)}.uv_e1wcoew:hover,.uv_e1wcoew:active{background:var(--rwwhsl8);color:var(--rwwhslq);border:1px solid var(--rwwhsle)}.uv_e1wcoew:disabled{color:var(--rwwhslp);border:1px solid var(--rwwhsld)}.uv_e1wcoex{background:none;color:var(--rwwhsl1c);border:1px solid var(--rwwhsl10)}.uv_e1wcoex:hover,.uv_e1wcoex:active{background:var(--rwwhslw);color:var(--rwwhsl1e);border:1px solid var(--rwwhsl12)}.uv_e1wcoex:disabled{color:var(--rwwhsl1d);border:1px solid var(--rwwhsl11)}.uv_e1wcoey{background:none;color:var(--rwwhsl7a);border:1px solid var(--rwwhsl6y)}.uv_e1wcoey:hover,.uv_e1wcoey:active{background:var(--rwwhsl6u);color:var(--rwwhsl7c);border:1px solid var(--rwwhsl70)}.uv_e1wcoey:disabled{color:var(--rwwhsl7b);border:1px solid var(--rwwhsl6z)}.uv_e1wcoez{background:none;color:var(--rwwhsl7y);border:1px solid var(--rwwhsl7m)}.uv_e1wcoez:hover,.uv_e1wcoez:active{background:var(--rwwhsl7i);color:var(--rwwhsl80);border:1px solid var(--rwwhsl7o)}.uv_e1wcoez:disabled{color:var(--rwwhsl7z);border:1px solid var(--rwwhsl7n)}.uv_e1wcoe10{background:none;color:var(--rwwhsl2j);border:1px solid var(--rwwhsl1y)}.uv_e1wcoe10:hover,.uv_e1wcoe10:active{background:var(--rwwhsl1k);color:var(--rwwhsl2l);border:1px solid var(--rwwhsl23)}.uv_e1wcoe10:disabled{color:var(--rwwhsl2k);border:1px solid var(--rwwhsl1z)}.uv_e1wcoe11{background:none;color:var(--rwwhsl50);border:1px solid var(--rwwhsl4u)}.uv_e1wcoe11:hover,.uv_e1wcoe11:active{background:var(--rwwhsl4t);color:var(--rwwhsl5e);border:1px solid var(--rwwhsl4w)}.uv_e1wcoe11:disabled{color:var(--rwwhsl51);border:1px solid var(--rwwhsl4v)}.uv_e1wcoe12{background:none;color:var(--rwwhsl5c);border:1px solid var(--rwwhsl56)}.uv_e1wcoe12:hover,.uv_e1wcoe12:active{background:var(--rwwhsl55);color:var(--rwwhsl52);border:1px solid var(--rwwhsl58)}.uv_e1wcoe12:disabled{color:var(--rwwhsl5d);border:1px solid var(--rwwhsl57)}.uv_e1wcoe13{background:none;color:var(--rwwhsl5y);border:none}.uv_e1wcoe13:hover,.uv_e1wcoe13:active{background:var(--rwwhsl5i);color:var(--rwwhsl60)}.uv_e1wcoe13:disabled{color:var(--rwwhsl5z)}.uv_e1wcoe14{background:none;color:var(--rwwhsl6m);border:none}.uv_e1wcoe14:hover,.uv_e1wcoe14:active{background:var(--rwwhsl66);color:var(--rwwhsl6o)}.uv_e1wcoe14:disabled{color:var(--rwwhsl6n)}.uv_e1wcoe15{background:none;color:var(--rwwhslo);border:none}.uv_e1wcoe15:hover,.uv_e1wcoe15:active{background:var(--rwwhsl8);color:var(--rwwhslq)}.uv_e1wcoe15:disabled{color:var(--rwwhslp)}.uv_e1wcoe16{background:none;color:var(--rwwhsl1c);border:none}.uv_e1wcoe16:hover,.uv_e1wcoe16:active{background:var(--rwwhslw);color:var(--rwwhsl1e)}.uv_e1wcoe16:disabled{color:var(--rwwhsl1d)}.uv_e1wcoe17{background:none;color:var(--rwwhsl7a);border:none}.uv_e1wcoe17:hover,.uv_e1wcoe17:active{background:var(--rwwhsl6u);color:var(--rwwhsl7c)}.uv_e1wcoe17:disabled{color:var(--rwwhsl7b)}.uv_e1wcoe18{background:none;color:var(--rwwhsl7y);border:none}.uv_e1wcoe18:hover,.uv_e1wcoe18:active{background:var(--rwwhsl7i);color:var(--rwwhsl80)}.uv_e1wcoe18:disabled{color:var(--rwwhsl7z)}.uv_e1wcoe19{background:none;color:var(--rwwhsl2j);border:none}.uv_e1wcoe19:hover,.uv_e1wcoe19:active{background:var(--rwwhsl1k);color:var(--rwwhsl2l)}.uv_e1wcoe19:disabled{color:var(--rwwhsl2k)}.uv_e1wcoe1a{background:none;color:var(--rwwhsl50);border:none}.uv_e1wcoe1a:hover,.uv_e1wcoe1a:active{background:var(--rwwhsl4t);color:var(--rwwhsl5e)}.uv_e1wcoe1a:disabled{color:var(--rwwhsl51)}.uv_e1wcoe1b{background:none;color:var(--rwwhsl5c);border:none}.uv_e1wcoe1b:hover,.uv_e1wcoe1b:active{background:var(--rwwhsl55);color:var(--rwwhsl52)}.uv_e1wcoe1b:disabled{color:var(--rwwhsl5d)}.backdrop-drawer{padding:0!important;transition:opacity .1s ease-in-out}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ultraviolet/ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-beta.0",
|
|
4
4
|
"description": "Ultraviolet UI",
|
|
5
5
|
"homepage": "https://github.com/scaleway/ultraviolet#readme",
|
|
6
6
|
"repository": {
|
|
@@ -25,7 +25,10 @@
|
|
|
25
25
|
"darwin",
|
|
26
26
|
"linux"
|
|
27
27
|
],
|
|
28
|
-
"sideEffects":
|
|
28
|
+
"sideEffects": [
|
|
29
|
+
"**/*.css",
|
|
30
|
+
"**/*.css.ts"
|
|
31
|
+
],
|
|
29
32
|
"type": "module",
|
|
30
33
|
"files": [
|
|
31
34
|
"dist/"
|
|
@@ -38,7 +41,8 @@
|
|
|
38
41
|
"types": "./dist/index.d.ts",
|
|
39
42
|
"require": "./dist/index.cjs",
|
|
40
43
|
"default": "./dist/index.js"
|
|
41
|
-
}
|
|
44
|
+
},
|
|
45
|
+
"./styles": "./dist/ui.css"
|
|
42
46
|
},
|
|
43
47
|
"size-limit": [
|
|
44
48
|
{
|
|
@@ -65,6 +69,7 @@
|
|
|
65
69
|
"@emotion/styled": "11.14.1",
|
|
66
70
|
"@types/react": "19.1.9",
|
|
67
71
|
"@types/react-dom": "19.1.7",
|
|
72
|
+
"@vanilla-extract/vite-plugin": "5.1.1",
|
|
68
73
|
"react": "19.1.1",
|
|
69
74
|
"react-dom": "19.1.1",
|
|
70
75
|
"@utils/test": "0.0.1"
|
|
@@ -78,6 +83,9 @@
|
|
|
78
83
|
"@nivo/scales": "0.89.0",
|
|
79
84
|
"@scaleway/random-name": "5.1.2",
|
|
80
85
|
"@scaleway/use-media": "3.0.4",
|
|
86
|
+
"@vanilla-extract/css": "1.17.4",
|
|
87
|
+
"@vanilla-extract/dynamic": "2.1.5",
|
|
88
|
+
"@vanilla-extract/recipes": "0.5.7",
|
|
81
89
|
"deepmerge": "4.3.1",
|
|
82
90
|
"react-toastify": "11.0.5",
|
|
83
91
|
"react-use-clipboard": "1.0.9",
|
|
@@ -92,7 +100,7 @@
|
|
|
92
100
|
"build:profile": "npx vite-bundle-visualizer -c vite.config.ts",
|
|
93
101
|
"typecheck": "tsc --noEmit",
|
|
94
102
|
"size": "size-limit",
|
|
95
|
-
"test:unit": "LC_ALL=en_US.UTF-8 pnpm vitest --run --config
|
|
103
|
+
"test:unit": "LC_ALL=en_US.UTF-8 pnpm vitest --run --config vitest.config.ts",
|
|
96
104
|
"test:unit:coverage": "pnpm test:unit --coverage",
|
|
97
105
|
"lintpublish": "publint"
|
|
98
106
|
}
|