@ultraviolet/ui 2.0.0-beta.15 → 2.0.0-beta.16

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.
@@ -14,7 +14,7 @@ type ChipType = {
14
14
  export declare const Chip: {
15
15
  ({ children, size, disabled, active, className, "data-testid": dataTestId, onClick, }: ChipType): import("@emotion/react/jsx-runtime").JSX.Element;
16
16
  Icon: ({ name, onClick, "data-testid": dataTestId, }: {
17
- name: "address" | "search" | "filter" | "stop" | "view" | "id" | "anchor" | "bold" | "sort" | "arrowLeft" | "cancel" | "close" | "drag" | "play" | "download" | "italic" | "underline" | "upload" | "email" | "addressPlay" | "arrowDown" | "arrowLeftBottom" | "arrowLeftDouble" | "arrowRightBottom" | "arrowRightDouble" | "arrowRight" | "arrowUp" | "attach" | "burger" | "check" | "clickhouse" | "closeCircleOutline" | "copyContent" | "detach" | "dotsHorizontal" | "dotsVertical" | "eastShort" | "east" | "equal" | "escape" | "expandMore" | "expand" | "github" | "instagram" | "leftRightArrow" | "linkedin" | "listBullet" | "listNumber" | "logout" | "minus" | "northShort" | "north" | "openInNew" | "organization" | "partnerSpace" | "plus" | "progressCheck" | "rayEndArrow" | "rayStartArrow" | "rayStartEnd" | "rayTopArrow" | "reboot" | "restore" | "revoke" | "rss" | "slack" | "southShort" | "south" | "switchOrga" | "twitter" | "westShort" | "west" | "youtube" | "addressOutline" | "adjustmentsHorizontalOutline" | "alertCircleOutline" | "autoFixOutline" | "bookOpenOutlineOutline" | "bullhornOutline" | "calculatorOutline" | "calendarRangeOutline" | "chatOutline" | "checkCircleOutline" | "clockOutlineOutline" | "consoleOutline" | "credentialOutline" | "creditCardOutline" | "databaseOutline" | "deleteOutline" | "docOutline" | "earthOutline" | "emailRemoveOutline" | "emailOutline" | "eyeOffOutline" | "eyeOutline" | "filterOutline" | "folderOutline" | "helpCircleOutline" | "idOutline" | "informationOutline" | "leafOutline" | "lightBulbOutline" | "lockOutline" | "membersOutline" | "moonOutline" | "mosaicOutline" | "notificationOutline" | "penOutline" | "pen2Outline" | "pencilOutline" | "phoneOutline" | "pinOutline" | "playOutline" | "privacyOutline" | "profileOutline" | "rocketOutline" | "sendOutline" | "settingsOutline" | "sidebarOutline" | "sparklesOutline" | "starOutline" | "stopOutline" | "sunOutline" | "supportOutline" | "thumbsDownOutline" | "thumbsUpOutline" | "unlockOutline" | "unpinOutline" | "weatherNightOutline" | "adjustmentsHorizontal" | "alertCircle" | "autoFix" | "bookOpenOutline" | "bullhorn" | "calculator" | "calendarRange" | "chat" | "checkCircle" | "clockOutline" | "console" | "credential" | "creditCard" | "database" | "delete" | "doc" | "earth" | "emailRemove" | "eyeOff" | "eye" | "folder" | "helpCircle" | "information" | "leaf" | "lightBulb" | "lock" | "members" | "moon" | "mosaic" | "notification" | "pen" | "pen2" | "pencil" | "phone" | "pin" | "privacy" | "profile" | "rocket" | "send" | "settings" | "sidebar" | "sparkles" | "star" | "sun" | "support" | "thumbsDown" | "thumbsUp" | "unlock" | "unpin" | "weatherNight";
17
+ name: "address" | "search" | "filter" | "stop" | "view" | "sort" | "id" | "anchor" | "bold" | "arrowLeft" | "cancel" | "close" | "drag" | "play" | "download" | "italic" | "underline" | "upload" | "email" | "addressPlay" | "arrowDown" | "arrowLeftBottom" | "arrowLeftDouble" | "arrowRightBottom" | "arrowRightDouble" | "arrowRight" | "arrowUp" | "attach" | "burger" | "check" | "clickhouse" | "closeCircleOutline" | "copyContent" | "detach" | "dotsHorizontal" | "dotsVertical" | "eastShort" | "east" | "equal" | "escape" | "expandMore" | "expand" | "github" | "instagram" | "leftRightArrow" | "linkedin" | "listBullet" | "listNumber" | "logout" | "minus" | "northShort" | "north" | "openInNew" | "organization" | "partnerSpace" | "plus" | "progressCheck" | "rayEndArrow" | "rayStartArrow" | "rayStartEnd" | "rayTopArrow" | "reboot" | "restore" | "revoke" | "rss" | "slack" | "southShort" | "south" | "switchOrga" | "twitter" | "westShort" | "west" | "youtube" | "addressOutline" | "adjustmentsHorizontalOutline" | "alertCircleOutline" | "autoFixOutline" | "bookOpenOutlineOutline" | "bullhornOutline" | "calculatorOutline" | "calendarRangeOutline" | "chatOutline" | "checkCircleOutline" | "clockOutlineOutline" | "consoleOutline" | "credentialOutline" | "creditCardOutline" | "databaseOutline" | "deleteOutline" | "docOutline" | "earthOutline" | "emailRemoveOutline" | "emailOutline" | "eyeOffOutline" | "eyeOutline" | "filterOutline" | "folderOutline" | "helpCircleOutline" | "idOutline" | "informationOutline" | "leafOutline" | "lightBulbOutline" | "lockOutline" | "membersOutline" | "moonOutline" | "mosaicOutline" | "notificationOutline" | "penOutline" | "pen2Outline" | "pencilOutline" | "phoneOutline" | "pinOutline" | "playOutline" | "privacyOutline" | "profileOutline" | "rocketOutline" | "sendOutline" | "settingsOutline" | "sidebarOutline" | "sparklesOutline" | "starOutline" | "stopOutline" | "sunOutline" | "supportOutline" | "thumbsDownOutline" | "thumbsUpOutline" | "unlockOutline" | "unpinOutline" | "weatherNightOutline" | "adjustmentsHorizontal" | "alertCircle" | "autoFix" | "bookOpenOutline" | "bullhorn" | "calculator" | "calendarRange" | "chat" | "checkCircle" | "clockOutline" | "console" | "credential" | "creditCard" | "database" | "delete" | "doc" | "earth" | "emailRemove" | "eyeOff" | "eye" | "folder" | "helpCircle" | "information" | "leaf" | "lightBulb" | "lock" | "members" | "moon" | "mosaic" | "notification" | "pen" | "pen2" | "pencil" | "phone" | "pin" | "privacy" | "profile" | "rocket" | "send" | "settings" | "sidebar" | "sparkles" | "star" | "sun" | "support" | "thumbsDown" | "thumbsUp" | "unlock" | "unpin" | "weatherNight";
18
18
  onClick?: () => void;
19
19
  'data-testid'?: string;
20
20
  }) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -22,7 +22,7 @@ export declare const Dialog: (({ ariaLabel, className, children, "data-testid":
22
22
  autoFocus?: import("react").ButtonHTMLAttributes<HTMLButtonElement>["autoFocus"];
23
23
  variant?: "filled" | "outlined" | "ghost";
24
24
  role?: import("react").AriaRole;
25
- size?: "small" | "large" | "medium" | "xsmall";
25
+ size?: "large" | "medium" | "small" | "xsmall";
26
26
  className?: string;
27
27
  'data-testid'?: string;
28
28
  sentiment?: import("../../theme").ExtendedColor;
@@ -54,7 +54,7 @@ export declare const Dialog: (({ ariaLabel, className, children, "data-testid":
54
54
  href?: string;
55
55
  target?: string;
56
56
  download?: string;
57
- } & import("react").RefAttributes<Element>, "onClick" | "tooltip" | "disabled">) => import("@emotion/react/jsx-runtime").JSX.Element;
57
+ } & import("react").RefAttributes<Element>, "tooltip" | "onClick" | "disabled">) => import("@emotion/react/jsx-runtime").JSX.Element;
58
58
  CancelButton: ({ children, onClick, disabled, }: {
59
59
  children: import("react").ReactNode;
60
60
  onClick: ComponentProps<typeof import("..").Button>["onClick"];
@@ -53,7 +53,7 @@ export declare const StyledTooltip: import("@emotion/styled").StyledComponent<Pi
53
53
  disableAnimation?: boolean;
54
54
  portalTarget?: HTMLElement;
55
55
  dynamicDomRendering?: boolean;
56
- } & import("react").RefAttributes<HTMLDivElement>, "text" | "children" | "className" | "id" | "tabIndex" | "role" | "maxWidth" | "data-testid" | "containerFullHeight" | "containerFullWidth" | "visible" | "debounceDelay" | "portalTarget" | "innerRef"> & {
56
+ } & import("react").RefAttributes<HTMLDivElement>, "text" | "maxWidth" | "className" | "id" | "tabIndex" | "role" | "children" | "data-testid" | "containerFullHeight" | "containerFullWidth" | "visible" | "debounceDelay" | "portalTarget" | "innerRef"> & {
57
57
  placement?: Exclude<import("react").ComponentProps<typeof import("..").Popup>["placement"], "nested-menu">;
58
58
  } & import("react").RefAttributes<HTMLDivElement> & {
59
59
  theme?: Theme;
@@ -23,7 +23,7 @@ export declare const Tabs: {
23
23
  subtitle?: string;
24
24
  tooltip?: string;
25
25
  value?: string | number;
26
- } & Omit<any, "children" | "className" | "role" | "value" | "tooltip" | "as" | "disabled" | "badge" | "counter">, "ref"> & import("react").RefAttributes<HTMLElement>>;
26
+ } & Omit<any, "tooltip" | "className" | "role" | "children" | "as" | "disabled" | "value" | "badge" | "counter">, "ref"> & import("react").RefAttributes<HTMLElement>>;
27
27
  Menu: import("react").ForwardRefExoticComponent<{
28
28
  children: ReactNode;
29
29
  disclosure: ReactNode;
@@ -36,6 +36,6 @@ export declare const Tooltip: import("react").ForwardRefExoticComponent<Pick<{
36
36
  disableAnimation?: boolean;
37
37
  portalTarget?: HTMLElement;
38
38
  dynamicDomRendering?: boolean;
39
- } & import("react").RefAttributes<HTMLDivElement>, "text" | "children" | "className" | "id" | "tabIndex" | "role" | "maxWidth" | "data-testid" | "containerFullHeight" | "containerFullWidth" | "visible" | "debounceDelay" | "portalTarget" | "innerRef"> & {
39
+ } & import("react").RefAttributes<HTMLDivElement>, "text" | "maxWidth" | "className" | "id" | "tabIndex" | "role" | "children" | "data-testid" | "containerFullHeight" | "containerFullWidth" | "visible" | "debounceDelay" | "portalTarget" | "innerRef"> & {
40
40
  placement?: Exclude<ComponentProps<typeof Popup>["placement"], "nested-menu">;
41
41
  } & import("react").RefAttributes<HTMLDivElement>>;
package/dist/index.cjs CHANGED
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const index = require("./theme/index.cjs");
4
- const ThemeRegistry = require("./theme/ThemeRegistry.cjs");
5
4
  const Breakpoint = require("./utils/responsive/Breakpoint.cjs");
6
5
  const normalize = require("./utils/normalize.cjs");
7
6
  const themes = require("@ultraviolet/themes");
@@ -82,7 +81,6 @@ const index$17 = require("./components/VerificationCode/index.cjs");
82
81
  const index$18 = require("./components/Drawer/index.cjs");
83
82
  const index$19 = require("./components/InfiniteScroll/index.cjs");
84
83
  exports.extendTheme = index.extendTheme;
85
- exports.ThemeRegistry = ThemeRegistry;
86
84
  exports.Breakpoint = Breakpoint;
87
85
  exports.normalize = normalize;
88
86
  Object.defineProperty(exports, "darkTheme", {
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export * from './components';
2
- export { darkTheme, default as theme, extendTheme, ThemeRegistry, } from './theme';
2
+ export { darkTheme, default as theme, extendTheme, } from './theme';
3
3
  export type { SCWUITheme, UltravioletUITheme } from './theme';
4
4
  export { bounce, Breakpoint, down, fadeIn, fadeOut, flash, getUUID, normalize, ping, pulse, quickScaleDown, scaleBack, scaleDown, scaleForward, scaleUp, sketchIn, sketchOut, slideDownLarge, slideFromBottom, slideFromLeft, slideFromRight, slideFromTop, slideToBottom, slideToLeft, slideToRight, slideToTop, slideUpLarge, unfoldIn, unfoldOut, up, zoomIn, zoomOut, } from './utils';
package/dist/index.js CHANGED
@@ -1,7 +1,6 @@
1
1
  import { extendTheme } from "./theme/index.js";
2
- import { default as default2 } from "./theme/ThemeRegistry.js";
3
- import { default as default3 } from "./utils/responsive/Breakpoint.js";
4
- import { default as default4 } from "./utils/normalize.js";
2
+ import { default as default2 } from "./utils/responsive/Breakpoint.js";
3
+ import { default as default3 } from "./utils/normalize.js";
5
4
  import { consoleDarkTheme, consoleLightTheme } from "@ultraviolet/themes";
6
5
  import { bounce, fadeIn, fadeOut, flash, ping, pulse, quickScaleDown, scaleBack, scaleDown, scaleForward, scaleUp, sketchIn, sketchOut, slideDownLarge, slideFromBottom, slideFromLeft, slideFromRight, slideFromTop, slideToBottom, slideToLeft, slideToRight, slideToTop, slideUpLarge, unfoldIn, unfoldOut, zoomIn, zoomOut } from "./utils/animations.js";
7
6
  import { down, up } from "./utils/responsive/utilities.js";
@@ -88,7 +87,7 @@ export {
88
87
  BarChart,
89
88
  BarStack,
90
89
  Breadcrumbs,
91
- default3 as Breakpoint,
90
+ default2 as Breakpoint,
92
91
  Bullet,
93
92
  Button,
94
93
  Card,
@@ -148,7 +147,6 @@ export {
148
147
  Text,
149
148
  TextArea,
150
149
  TextInput,
151
- default2 as ThemeRegistry,
152
150
  TimeInput,
153
151
  ToastContainer,
154
152
  Toggle,
@@ -164,7 +162,7 @@ export {
164
162
  fadeOut,
165
163
  flash,
166
164
  getUUID,
167
- default4 as normalize,
165
+ default3 as normalize,
168
166
  notification,
169
167
  ping,
170
168
  pulse,
@@ -1,5 +1,4 @@
1
1
  import { consoleDarkTheme, consoleLightTheme } from '@ultraviolet/themes';
2
- import ThemeRegistry from './ThemeRegistry';
3
2
  export type ScreenSize = keyof typeof consoleLightTheme.breakpoints;
4
3
  /**
5
4
  * @deprecated use UltravioletUITheme instead
@@ -706,5 +705,5 @@ type ExtendedColor = Color | 'white' | 'black';
706
705
  declare const SENTIMENTS: readonly ["primary", "secondary", "neutral", "success", "danger", "warning", "info"];
707
706
  declare const SENTIMENTS_WITHOUT_NEUTRAL: ("primary" | "secondary" | "success" | "danger" | "warning" | "info")[];
708
707
  export type { SCWUITheme, UltravioletUITheme, Color, ExtendedColor };
709
- export { colors, shadows, space, radii, breakpoints as screens, consoleDarkTheme as darkTheme, extendTheme, SENTIMENTS, SENTIMENTS_WITHOUT_NEUTRAL, typography, ThemeRegistry, };
708
+ export { colors, shadows, space, radii, breakpoints as screens, consoleDarkTheme as darkTheme, extendTheme, SENTIMENTS, SENTIMENTS_WITHOUT_NEUTRAL, typography, };
710
709
  export default consoleLightTheme;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ultraviolet/ui",
3
- "version": "2.0.0-beta.15",
3
+ "version": "2.0.0-beta.16",
4
4
  "description": "Ultraviolet UI",
5
5
  "homepage": "https://github.com/scaleway/ultraviolet#readme",
6
6
  "repository": {
@@ -70,7 +70,6 @@
70
70
  "@utils/test": "0.0.1"
71
71
  },
72
72
  "dependencies": {
73
- "@emotion/cache": "11.14.0",
74
73
  "@emotion/serialize": "1.3.3",
75
74
  "@nivo/bar": "0.89.1",
76
75
  "@nivo/core": "0.89.1",
@@ -80,7 +79,6 @@
80
79
  "@scaleway/random-name": "5.1.2",
81
80
  "@scaleway/use-media": "3.0.3",
82
81
  "deepmerge": "4.3.1",
83
- "next": "15.3.4",
84
82
  "react-toastify": "11.0.5",
85
83
  "react-use-clipboard": "1.0.9",
86
84
  "@ultraviolet/icons": "4.0.0-beta.7",
@@ -1,56 +0,0 @@
1
- "use client";
2
- "use strict";
3
- const jsxRuntime = require("@emotion/react/jsx-runtime");
4
- const createCache = require("@emotion/cache");
5
- const react$1 = require("@emotion/react");
6
- const navigation = require("next/navigation");
7
- const react = require("react");
8
- const _interopDefaultCompat = (e) => e && typeof e === "object" && "default" in e ? e : { default: e };
9
- const createCache__default = /* @__PURE__ */ _interopDefaultCompat(createCache);
10
- function ThemeRegistry({
11
- children,
12
- theme
13
- }) {
14
- const [{
15
- cache,
16
- flush
17
- }] = react.useState(() => {
18
- const localCache = createCache__default.default({
19
- key: "uv"
20
- });
21
- localCache.compat = true;
22
- const prevInsert = localCache.insert;
23
- let inserted = [];
24
- localCache.insert = (...args) => {
25
- const serialized = args[1];
26
- if (localCache.inserted[serialized.name] === void 0) {
27
- inserted.push(serialized.name);
28
- }
29
- return prevInsert(...args);
30
- };
31
- const localFlush = () => {
32
- const prevInserted = inserted;
33
- inserted = [];
34
- return prevInserted;
35
- };
36
- return {
37
- cache: localCache,
38
- flush: localFlush
39
- };
40
- });
41
- navigation.useServerInsertedHTML(() => {
42
- const names = flush();
43
- if (names.length === 0) {
44
- return null;
45
- }
46
- let styles = "";
47
- for (const name of names) {
48
- styles += cache.inserted[name];
49
- }
50
- return /* @__PURE__ */ jsxRuntime.jsx("style", { "data-emotion": `${cache.key} ${names.join(" ")}`, dangerouslySetInnerHTML: {
51
- __html: styles
52
- } }, cache.key);
53
- });
54
- return /* @__PURE__ */ jsxRuntime.jsx(react$1.CacheProvider, { value: cache, children: /* @__PURE__ */ jsxRuntime.jsx(react$1.ThemeProvider, { theme, children }) });
55
- }
56
- module.exports = ThemeRegistry;
@@ -1,12 +0,0 @@
1
- import { ThemeProvider } from '@emotion/react';
2
- import type { ComponentProps, ReactNode } from 'react';
3
- type ThemeRegistryProps = {
4
- children: ReactNode;
5
- theme: ComponentProps<typeof ThemeProvider>['theme'];
6
- };
7
- /**
8
- * ThemeRegistry is a component that provides a theme to its children.
9
- * This solution is provided to work with Next.js app router.
10
- */
11
- export default function ThemeRegistry({ children, theme }: ThemeRegistryProps): import("@emotion/react/jsx-runtime").JSX.Element;
12
- export {};
@@ -1,55 +0,0 @@
1
- "use client";
2
- import { jsx } from "@emotion/react/jsx-runtime";
3
- import createCache from "@emotion/cache";
4
- import { CacheProvider, ThemeProvider } from "@emotion/react";
5
- import { useServerInsertedHTML } from "next/navigation";
6
- import { useState } from "react";
7
- function ThemeRegistry({
8
- children,
9
- theme
10
- }) {
11
- const [{
12
- cache,
13
- flush
14
- }] = useState(() => {
15
- const localCache = createCache({
16
- key: "uv"
17
- });
18
- localCache.compat = true;
19
- const prevInsert = localCache.insert;
20
- let inserted = [];
21
- localCache.insert = (...args) => {
22
- const serialized = args[1];
23
- if (localCache.inserted[serialized.name] === void 0) {
24
- inserted.push(serialized.name);
25
- }
26
- return prevInsert(...args);
27
- };
28
- const localFlush = () => {
29
- const prevInserted = inserted;
30
- inserted = [];
31
- return prevInserted;
32
- };
33
- return {
34
- cache: localCache,
35
- flush: localFlush
36
- };
37
- });
38
- useServerInsertedHTML(() => {
39
- const names = flush();
40
- if (names.length === 0) {
41
- return null;
42
- }
43
- let styles = "";
44
- for (const name of names) {
45
- styles += cache.inserted[name];
46
- }
47
- return /* @__PURE__ */ jsx("style", { "data-emotion": `${cache.key} ${names.join(" ")}`, dangerouslySetInnerHTML: {
48
- __html: styles
49
- } }, cache.key);
50
- });
51
- return /* @__PURE__ */ jsx(CacheProvider, { value: cache, children: /* @__PURE__ */ jsx(ThemeProvider, { theme, children }) });
52
- }
53
- export {
54
- ThemeRegistry as default
55
- };