@fibery/ui-kit 9.2.1 → 9.3.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.
Files changed (54) hide show
  1. package/lib/antd/styles.wyw-in-js.css +1 -1
  2. package/lib/color-filter.js +2 -2
  3. package/lib/design-system/colors-js.d.ts +1 -1
  4. package/lib/design-system/colors.d.ts +2 -2
  5. package/lib/design-system/colors.js +2 -2
  6. package/lib/design-system/theme.d.ts +1 -1
  7. package/lib/embed.d.ts +1 -1
  8. package/lib/file-item/file-icon.d.ts +3 -2
  9. package/lib/file-item/file-icon.js +2 -2
  10. package/lib/html-styles.wyw-in-js.css +4 -4
  11. package/lib/icons/ast/index.d.ts +3 -1
  12. package/lib/icons/ast/index.js +3 -1
  13. package/lib/icons/ast/suggestions-comments.d.ts +5 -0
  14. package/lib/icons/ast/suggestions-comments.js +39 -0
  15. package/lib/icons/ast/suggestions.d.ts +5 -0
  16. package/lib/icons/ast/suggestions.js +30 -0
  17. package/lib/icons/react/index.d.ts +3 -1
  18. package/lib/icons/react/index.js +3 -1
  19. package/lib/icons/react/suggestions-comments.d.ts +15 -0
  20. package/lib/icons/react/suggestions-comments.js +21 -0
  21. package/lib/icons/react/suggestions.d.ts +15 -0
  22. package/lib/icons/react/suggestions.js +21 -0
  23. package/lib/images-gallery/images-gallery.d.ts +1 -1
  24. package/lib/images-gallery/slide-buttons.d.ts +1 -1
  25. package/lib/mobile-drawer.js +31 -34
  26. package/lib/palettes/warm.js +14 -0
  27. package/lib/phone-media-query.d.ts +9 -0
  28. package/lib/phone-media-query.js +10 -0
  29. package/lib/phone.d.ts +3 -5
  30. package/lib/phone.js +5 -8
  31. package/lib/root-theme-provider.d.ts +1 -1
  32. package/lib/root-theme-provider.wyw-in-js.css +1 -1
  33. package/lib/sidebar/sidebar-handle.d.ts +1 -0
  34. package/lib/sidebar/sidebar-handle.js +2 -2
  35. package/lib/spinner.wyw-in-js.css +1 -1
  36. package/lib/thematic-constants.d.ts +1 -1
  37. package/lib/thematic-state.d.ts +1 -1
  38. package/lib/thematic-state.js +2 -1
  39. package/lib/theme-bootstrap.d.ts +12 -0
  40. package/lib/theme-bootstrap.js +37 -0
  41. package/lib/theme-provider.d.ts +1 -1
  42. package/lib/theme-settings-core.d.ts +2 -5
  43. package/lib/theme-settings-core.js +3 -26
  44. package/lib/theme-settings.d.ts +3 -2
  45. package/lib/theme-settings.js +2 -1
  46. package/lib/theme-styles.d.ts +1 -1
  47. package/lib/theming.generated.d.ts +10 -10
  48. package/lib/theming.generated.js +10 -10
  49. package/lib/toast/utils/toastify-item-name.d.ts +1 -1
  50. package/lib/unit/unit-content.js +7 -11
  51. package/lib/unit/unit-content.wyw-in-js.css +4 -5
  52. package/lib/use-is-phone.d.ts +2 -1
  53. package/lib/use-is-phone.js +2 -1
  54. package/package.json +6 -6
@@ -0,0 +1,21 @@
1
+ import { Icon } from "../icon.js";
2
+ import Suggestions$1 from "../ast/suggestions.js";
3
+ import { jsx } from "react/jsx-runtime";
4
+ import { forwardRef } from "react";
5
+ //#region src/icons/react/suggestions.tsx
6
+ /**
7
+ * This file was automatically generated. Do not edit manually.
8
+ *
9
+ * @see import("../svg/suggestions.svg")
10
+ * @see import("../../scripts/generate-icons.ts")
11
+ */
12
+ var Suggestions = forwardRef(function Suggestions(props, ref) {
13
+ return /* @__PURE__ */ jsx(Icon, {
14
+ ...props,
15
+ className: props.className,
16
+ ref,
17
+ icon: Suggestions$1
18
+ });
19
+ });
20
+ //#endregion
21
+ export { Suggestions as default };
@@ -1,4 +1,4 @@
1
- import { ThemeMode } from "../theme-settings-core.js";
1
+ import { ThemeMode } from "../theme-bootstrap.js";
2
2
  import { ToastQueue } from "../toast/toast-queue.js";
3
3
  import { PropsWithChildren } from "react";
4
4
  import "photoswipe/style.css";
@@ -1,4 +1,4 @@
1
- import { ThemeMode } from "../theme-settings-core.js";
1
+ import { ThemeMode } from "../theme-bootstrap.js";
2
2
  import { ToastQueue } from "../toast/toast-queue.js";
3
3
  import { PhotoSwipe } from "photoswipe/lightbox";
4
4
  //#region src/images-gallery/slide-buttons.d.ts
@@ -1,6 +1,6 @@
1
1
  import "./mobile-drawer.wyw-in-js.css";
2
2
  import { textClasses } from "./design-system/typography.js";
3
- import { ThemeProvider } from "./theme-provider.js";
3
+ import { RadixPortalThemeProvider } from "./theme-provider.js";
4
4
  import { IconButton } from "./button/icon-button.js";
5
5
  import Close from "./icons/react/close.js";
6
6
  import ArrowLeft from "./icons/react/arrow-left.js";
@@ -26,41 +26,38 @@ function MobileDrawer({ open, onOpenChange, title, trigger, triggerRef, onNaviga
26
26
  asChild: true,
27
27
  ref: triggerRef,
28
28
  children: trigger
29
- }) : null, /* @__PURE__ */ jsxs(Drawer.Portal, { children: [/* @__PURE__ */ jsx(Drawer.Overlay, { className: overlayClassName }), /* @__PURE__ */ jsx(Drawer.Content, {
29
+ }) : null, /* @__PURE__ */ jsx(Drawer.Portal, { children: /* @__PURE__ */ jsxs(RadixPortalThemeProvider, { children: [/* @__PURE__ */ jsx(Drawer.Overlay, { className: overlayClassName }), /* @__PURE__ */ jsxs(Drawer.Content, {
30
30
  className: contentClassName,
31
31
  onClick: stopPropagation,
32
- children: /* @__PURE__ */ jsxs(ThemeProvider, {
33
- portal: true,
34
- children: [
35
- /* @__PURE__ */ jsx(Drawer.Handle, { className: handleClassName }),
36
- /* @__PURE__ */ jsxs("div", {
37
- className: cx(headerClassName, onNavigateBack && headerWithBackClassName),
38
- children: [
39
- onNavigateBack ? /* @__PURE__ */ jsx(IconButton, {
40
- onClick: onNavigateBack,
41
- size: "xLarge",
42
- "aria-label": "Back",
43
- children: /* @__PURE__ */ jsx(ArrowLeft, {})
44
- }) : null,
45
- /* @__PURE__ */ jsx(Drawer.Title, {
46
- className: cx(textClasses.heading3, titleClassName),
47
- children: title
48
- }),
49
- /* @__PURE__ */ jsx(IconButton, {
50
- onClick: () => onOpenChange(false),
51
- size: "xLarge",
52
- "aria-label": "Close",
53
- children: /* @__PURE__ */ jsx(Close, {})
54
- })
55
- ]
56
- }),
57
- /* @__PURE__ */ jsx("div", {
58
- className: bodyClassName,
59
- children
60
- })
61
- ]
62
- })
63
- })] })]
32
+ children: [
33
+ /* @__PURE__ */ jsx(Drawer.Handle, { className: handleClassName }),
34
+ /* @__PURE__ */ jsxs("div", {
35
+ className: cx(headerClassName, onNavigateBack && headerWithBackClassName),
36
+ children: [
37
+ onNavigateBack ? /* @__PURE__ */ jsx(IconButton, {
38
+ onClick: onNavigateBack,
39
+ size: "xLarge",
40
+ "aria-label": "Back",
41
+ children: /* @__PURE__ */ jsx(ArrowLeft, {})
42
+ }) : null,
43
+ /* @__PURE__ */ jsx(Drawer.Title, {
44
+ className: cx(textClasses.heading3, titleClassName),
45
+ children: title
46
+ }),
47
+ /* @__PURE__ */ jsx(IconButton, {
48
+ onClick: () => onOpenChange(false),
49
+ size: "xLarge",
50
+ "aria-label": "Close",
51
+ children: /* @__PURE__ */ jsx(Close, {})
52
+ })
53
+ ]
54
+ }),
55
+ /* @__PURE__ */ jsx("div", {
56
+ className: bodyClassName,
57
+ children
58
+ })
59
+ ]
60
+ })] }) })]
64
61
  });
65
62
  }
66
63
  //#endregion
@@ -124,6 +124,20 @@ var deneutralize = isFlagPresent("warm-swatches") ? { swatches: DEFAULTS_TO_WARM
124
124
  };
125
125
  var warmCore = {
126
126
  ...common,
127
+ highlight: {
128
+ ...common.highlight,
129
+ hues: {
130
+ ...common.highlight.hues,
131
+ grey: 75
132
+ },
133
+ overrides: { grey: {
134
+ bg: [{
135
+ c: .012,
136
+ Lc: 2.5
137
+ }, { c: .008 }],
138
+ fg: [{ c: .012 }, { c: .008 }]
139
+ } }
140
+ },
127
141
  deneutralize: deneutralize && [deneutralize, deneutralize],
128
142
  whiteA: [
129
143
  null,
@@ -0,0 +1,9 @@
1
+ //#region src/phone-media-query.d.ts
2
+ declare global {
3
+ const __DISABLE_VERTICAL_MOBILE_BREAKPOINT__: boolean | undefined;
4
+ }
5
+ declare const verticalMobileBreakpointSpec: import("@fibery/helpers/src/mode").ModeSpec<"vertical-mobile-breakpoint">;
6
+ declare const phoneMediaQuery: string;
7
+ declare const getPhoneMediaQuery: () => "(max-width: 450px)" | "(max-width: 450px), (max-height: 450px)";
8
+ //#endregion
9
+ export { getPhoneMediaQuery, phoneMediaQuery, verticalMobileBreakpointSpec };
@@ -0,0 +1,10 @@
1
+ import { isModeEnabled, modeSpec } from "@fibery/helpers/src/mode";
2
+ //#region src/phone-media-query.ts
3
+ var phoneWidthMediaQuery = "(max-width: 450px)";
4
+ var phoneWidthOrHeightMediaQuery = "(max-width: 450px), (max-height: 450px)";
5
+ var disableStatic = typeof __DISABLE_VERTICAL_MOBILE_BREAKPOINT__ !== "undefined" && __DISABLE_VERTICAL_MOBILE_BREAKPOINT__;
6
+ var verticalMobileBreakpointSpec = modeSpec("vertical-mobile-breakpoint", () => !disableStatic);
7
+ var phoneMediaQuery = disableStatic ? phoneWidthMediaQuery : phoneWidthOrHeightMediaQuery;
8
+ var getPhoneMediaQuery = () => isModeEnabled(verticalMobileBreakpointSpec) ? phoneWidthOrHeightMediaQuery : phoneWidthMediaQuery;
9
+ //#endregion
10
+ export { getPhoneMediaQuery, phoneMediaQuery, verticalMobileBreakpointSpec };
package/lib/phone.d.ts CHANGED
@@ -1,10 +1,8 @@
1
+ import { phoneMediaQuery } from "./phone-media-query.js";
1
2
  //#region src/phone.d.ts
2
- declare global {
3
- const __DISABLE_VERTICAL_MOBILE_BREAKPOINT__: boolean | undefined;
4
- }
3
+ declare const verticalMobileBreakpoint: import("@fibery/helpers/src/mode").Mode<"vertical-mobile-breakpoint">;
5
4
  declare const isPhoneApp: () => boolean;
6
- declare const phoneMediaQuery: string;
7
5
  declare const phoneMediaQueryDynamic: string;
8
6
  declare function isPhoneMode(): boolean;
9
7
  //#endregion
10
- export { isPhoneApp, isPhoneMode, phoneMediaQuery, phoneMediaQueryDynamic };
8
+ export { isPhoneApp, isPhoneMode, phoneMediaQuery, phoneMediaQueryDynamic, verticalMobileBreakpoint };
package/lib/phone.js CHANGED
@@ -1,15 +1,12 @@
1
1
  import { getMediaQueryList } from "./media-query-utils.js";
2
- import { isFlagPresent } from "@fibery/helpers/src/flags";
2
+ import { getPhoneMediaQuery, phoneMediaQuery, verticalMobileBreakpointSpec } from "./phone-media-query.js";
3
+ import { modeOf } from "@fibery/helpers/src/mode";
3
4
  //#region src/phone.ts
5
+ var verticalMobileBreakpoint = modeOf(verticalMobileBreakpointSpec);
4
6
  var isPhoneApp = () => Boolean(window.__FIBERY_MOBILE_APP_API);
5
- var disableStatic = typeof __DISABLE_VERTICAL_MOBILE_BREAKPOINT__ !== "undefined" && __DISABLE_VERTICAL_MOBILE_BREAKPOINT__;
6
- var disableDynamic = disableStatic || isFlagPresent("no-vertical-mobile-breakpoint");
7
- var heightIgnored = "(max-width: 450px)";
8
- var heightPresent = "(max-width: 450px), (max-height: 450px)";
9
- var phoneMediaQuery = disableStatic ? heightIgnored : heightPresent;
10
- var phoneMediaQueryDynamic = disableDynamic ? heightIgnored : heightPresent;
7
+ var phoneMediaQueryDynamic = getPhoneMediaQuery();
11
8
  function isPhoneMode() {
12
9
  return isPhoneApp() || getMediaQueryList(phoneMediaQueryDynamic).matches;
13
10
  }
14
11
  //#endregion
15
- export { isPhoneApp, isPhoneMode, phoneMediaQuery, phoneMediaQueryDynamic };
12
+ export { isPhoneApp, isPhoneMode, phoneMediaQuery, phoneMediaQueryDynamic, verticalMobileBreakpoint };
@@ -1,4 +1,4 @@
1
- import { ThemeMode, ThemePreference } from "./theme-settings-core.js";
1
+ import { ThemeMode, ThemePreference } from "./theme-bootstrap.js";
2
2
  import { ReactNode } from "react";
3
3
  //#region src/root-theme-provider.d.ts
4
4
  declare function RootThemeProvider({ initialThemeMode, initialPreference, isArchitect, children }: {