@webority/ui-react 0.170.0 → 0.171.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/dist/canvas-kit/kit.js +147 -147
- package/dist/canvas-kit/manifest.json +25 -4
- package/dist/canvas-kit/release.json +6 -6
- package/dist/components/AppCommentThread.js +1 -1
- package/dist/components/AppMetricStrip.js +1 -1
- package/dist/components/AppModal.js +1 -1
- package/dist/components/AppThemeToggle.js +1 -1
- package/dist/components/iconCatalogNames.g.js +1 -1
- package/dist/components/iconGlyphs.g.js +1 -1
- package/dist/components/iconVariants.g.js +1 -1
- package/dist/guidance.json +1 -1
- package/dist/types/components/AppMetricStrip.d.ts +6 -0
- package/dist/types/components/AppModal.d.ts +2 -2
- package/dist/types/components/AppThemeToggle.d.ts +8 -6
- package/dist/types/components/AppTimePicker.d.ts +1 -1
- package/package.json +9 -9
package/dist/guidance.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type * as React from "react";
|
|
2
2
|
import { type AppLinkComponent } from "../lib/linkTarget.ts";
|
|
3
3
|
declare const COLUMNS: readonly [3, 4, 5];
|
|
4
|
+
declare const PHONE_COLUMNS: readonly [1, 2];
|
|
4
5
|
declare const SIZES: readonly ["sm", "md"];
|
|
5
6
|
export interface MetricStripItem {
|
|
6
7
|
label: React.ReactNode;
|
|
@@ -20,6 +21,11 @@ export interface AppMetricStripProps extends Omit<React.ComponentPropsWithoutRef
|
|
|
20
21
|
* @default 4
|
|
21
22
|
*/
|
|
22
23
|
columns?: (typeof COLUMNS)[number] | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* How many values sit in a row on a phone.
|
|
26
|
+
* @default 2
|
|
27
|
+
*/
|
|
28
|
+
phoneColumns?: (typeof PHONE_COLUMNS)[number] | undefined;
|
|
23
29
|
/**
|
|
24
30
|
* The value and label scale.
|
|
25
31
|
* @default "md"
|
|
@@ -2,7 +2,7 @@ import type * as React from "react";
|
|
|
2
2
|
import type { ComponentPropsWithoutRef, ReactNode, Ref } from "react";
|
|
3
3
|
type AppModalTone = "neutral" | "danger" | "success" | "warning";
|
|
4
4
|
type AppModalPlacement = "center" | "top";
|
|
5
|
-
type AppModalSizePreset = "sm" | "md" | "lg" | "xl";
|
|
5
|
+
type AppModalSizePreset = "sm" | "md" | "lg" | "xl" | "wide";
|
|
6
6
|
type AppModalSize = AppModalSizePreset | "fullscreen" | number;
|
|
7
7
|
export interface AppModalProps extends Omit<ComponentPropsWithoutRef<"dialog">, "title"> {
|
|
8
8
|
/** Whether the dialog is shown. */
|
|
@@ -41,7 +41,7 @@ export interface AppModalProps extends Omit<ComponentPropsWithoutRef<"dialog">,
|
|
|
41
41
|
/** Content pinned at the bottom, usually the action buttons. */
|
|
42
42
|
footer?: ReactNode | undefined;
|
|
43
43
|
/**
|
|
44
|
-
* The card width: a preset, fullscreen for the whole viewport with header and footer pinned, or a number for an exact max width in pixels.
|
|
44
|
+
* The card width: a preset, wide for 1080px with fields in two columns (capped at 90vw), fullscreen for the whole viewport with header and footer pinned, or a number for an exact max width in pixels.
|
|
45
45
|
* @default "md"
|
|
46
46
|
*/
|
|
47
47
|
size?: AppModalSize | undefined;
|
|
@@ -12,7 +12,7 @@ export interface AppThemeToggleProps {
|
|
|
12
12
|
variant?: ToggleVariant | undefined;
|
|
13
13
|
/**
|
|
14
14
|
* The page-wide effect that plays when the theme changes.
|
|
15
|
-
* @default "
|
|
15
|
+
* @default "fade"
|
|
16
16
|
*/
|
|
17
17
|
effect?: ThemeEffect | undefined;
|
|
18
18
|
/**
|
|
@@ -67,8 +67,9 @@ export interface AppThemeToggleProps {
|
|
|
67
67
|
className?: string | undefined;
|
|
68
68
|
}
|
|
69
69
|
/**
|
|
70
|
-
* The light/dark switch: flips the whole page's theme with a page-wide effect
|
|
71
|
-
* from the bottom, a circle growing from the press, a wipe,
|
|
70
|
+
* The light/dark switch: flips the whole page's theme with a page-wide effect, a fade by default
|
|
71
|
+
* or a wave rising from the bottom, a circle growing from the press, a wipe, or blinds when
|
|
72
|
+
* `effect` names one. Two shapes:
|
|
72
73
|
* `variant="icon"` (default), one action disc that cycles through the modes, and
|
|
73
74
|
* `variant="segmented"`, one option per mode laid out like `AppSegmented`, so each mode is a
|
|
74
75
|
* button of its own. The modes are light, dark and auto (shown as "System", following the
|
|
@@ -85,10 +86,11 @@ export interface AppThemeToggleProps {
|
|
|
85
86
|
* The effect needs the View Transitions API; without it, under `prefers-reduced-motion`, or when
|
|
86
87
|
* the page already shows the requested theme (dark to auto on a dark system), the switch is
|
|
87
88
|
* instant. Dark always comes up from the bottom and light down from the top, for the effects
|
|
88
|
-
* that have a direction.
|
|
89
|
+
* that have a direction. The default fade repaints only at its start and end; the wave repaints
|
|
90
|
+
* every frame, so a product opts into it with `effect="wave"`.
|
|
89
91
|
*
|
|
90
92
|
* @param props.variant
|
|
91
|
-
* @param props.effect The page-wide effect that plays when the theme changes.
|
|
93
|
+
* @param props.effect The page-wide effect that plays when the theme changes (default fade).
|
|
92
94
|
* @param props.includeAuto
|
|
93
95
|
* @param props.storageKey
|
|
94
96
|
* @param props.duration
|
|
@@ -99,7 +101,7 @@ export interface AppThemeToggleProps {
|
|
|
99
101
|
* @param props.name
|
|
100
102
|
* @param props.size
|
|
101
103
|
* @param props.tooltipPlacement
|
|
102
|
-
* @param props.onChange Fires with the new mode once
|
|
104
|
+
* @param props.onChange Fires with the new mode once the effect has finished, or at once when no effect plays.
|
|
103
105
|
* @param props.className
|
|
104
106
|
*/
|
|
105
107
|
export default function AppThemeToggle(props: AppThemeToggleProps): ReactElement;
|
|
@@ -39,7 +39,7 @@ export interface AppTimePickerProps extends Omit<ComponentPropsWithoutRef<"div">
|
|
|
39
39
|
min?: string | undefined;
|
|
40
40
|
/** The latest time that can be picked, as "HH:mm". */
|
|
41
41
|
max?: string | undefined;
|
|
42
|
-
/** The minutes between choices. The control
|
|
42
|
+
/** The minutes between choices. The control accepts any minute (step 1) when this is unset. */
|
|
43
43
|
step?: number | undefined;
|
|
44
44
|
/**
|
|
45
45
|
* The display format, 12 or 24 hour. The wire value stays 24 hour.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webority/ui-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.171.0",
|
|
4
4
|
"description": "Webority shared React component library: App* primitives on react-bootstrap and the @webority/theme design system.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"type": "module",
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
},
|
|
34
34
|
"sideEffects": false,
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@webority/markdown-core": "0.
|
|
37
|
-
"@webority/theme": "0.
|
|
38
|
-
"@webority/ui-elements": "0.
|
|
39
|
-
"@webority/web-core": "0.
|
|
36
|
+
"@webority/markdown-core": "0.171.0",
|
|
37
|
+
"@webority/theme": "0.171.0",
|
|
38
|
+
"@webority/ui-elements": "0.171.0",
|
|
39
|
+
"@webority/web-core": "0.171.0"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"@webority/analytics": "^0.40.0",
|
|
@@ -61,10 +61,10 @@
|
|
|
61
61
|
"@types/react-dom": "^19.3.0",
|
|
62
62
|
"@vitejs/plugin-react": "^6.0.1",
|
|
63
63
|
"@vitest/coverage-v8": "5.1.0",
|
|
64
|
-
"@webority/analytics": "0.40.
|
|
65
|
-
"@webority/canvas-kit": "0.
|
|
66
|
-
"@webority/biome-config": "0.
|
|
67
|
-
"@webority/tokens": "0.
|
|
64
|
+
"@webority/analytics": "0.40.10",
|
|
65
|
+
"@webority/canvas-kit": "0.171.0",
|
|
66
|
+
"@webority/biome-config": "0.171.0",
|
|
67
|
+
"@webority/tokens": "0.171.0",
|
|
68
68
|
"bootstrap": "5.3.9",
|
|
69
69
|
"jsdom": "30.1.1",
|
|
70
70
|
"react": "^19.3.1",
|