@neo-ui-kit/react 1.3.18 → 1.4.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 +22 -1
- package/dist/chunks/{chunk-NTNL3ELP.js → chunk-KAVSRD45.js} +6 -6
- package/dist/components/controls/Slider/styles.css +2 -0
- package/dist/components/controls/shared.css +24 -0
- package/dist/components/feedback/Badge/styles.css +2 -0
- package/dist/components/foundation/Loader/Loader.d.ts +1 -1
- package/dist/components/foundation/LoaderGenerator/LoaderGenerator.d.ts +1 -0
- package/dist/components/layout/Avatar/styles.css +3 -0
- package/dist/components/layout/Card/Card.d.ts +1 -1
- package/dist/components/layout/Card/styles.css +3 -0
- package/dist/components/layout/Grid/styles.css +12 -12
- package/dist/components/layout/Stack/styles.css +9 -9
- package/dist/components/layout/shared.d.ts +1 -1
- package/dist/core/base.d.ts +1 -1
- package/dist/core/responsive.d.ts +1 -1
- package/dist/forms.js +1 -1
- package/dist/index.js +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -65,7 +65,7 @@ import "@neo-ui-kit/react/styles.css";
|
|
|
65
65
|
To test repository changes before publishing, run `npm run package` from the repository root and install the resulting archive in a separate application:
|
|
66
66
|
|
|
67
67
|
```bash
|
|
68
|
-
npm install /path/to/adui/release/neo-ui-kit-react-1.
|
|
68
|
+
npm install /path/to/adui/release/neo-ui-kit-react-1.4.0.tgz
|
|
69
69
|
```
|
|
70
70
|
|
|
71
71
|
Maintainers publish new versions from `Pro100Dimka/adui` using the `release.yml` GitHub Actions workflow, a matching `v<version>` tag, and the `npm-publication` environment. npm trusts its OIDC identity; no `NPM_TOKEN` is required. The workflow checks the project and packed consumer before publishing the tested archive. Published `1.0.0` cannot be overwritten: code and README changes in npm require a new package version. See the [repository release instructions](https://github.com/Pro100Dimka/adui#npm-пакет).
|
|
@@ -404,3 +404,24 @@ const [transport, setTransport] = useState<QuantumBackgroundTransport>();
|
|
|
404
404
|
```
|
|
405
405
|
|
|
406
406
|
The documentation page builds exactly such a panel (song, player, microphone, snapshot, fullscreen, field and sensitivity, plus a closed “Тонкая настройка” section) outside the component. `QuantumFieldExperience`, `QuantumFieldExperienceProps` and `quantumFieldExperienceControls` remain compatible aliases; note that `QuantumFieldExperience` no longer renders its own control panel. The separate lightweight `QuantumField` primitive documented above keeps its original props and rendering; it is not an alias of the full background.
|
|
407
|
+
|
|
408
|
+
|
|
409
|
+
### Viewport sizes
|
|
410
|
+
|
|
411
|
+
Responsive Grid, Stack and FormFields layout uses the available window width in CSS pixels:
|
|
412
|
+
|
|
413
|
+
| Name | Window width |
|
|
414
|
+
| --- | --- |
|
|
415
|
+
| xs | Below 768 px |
|
|
416
|
+
| sm | 768 to 1023 px |
|
|
417
|
+
| md | 1024 to 1919 px |
|
|
418
|
+
| lg | 1920 to 2559 px |
|
|
419
|
+
| xlg | 2560 px and above |
|
|
420
|
+
|
|
421
|
+
Values carry forward until the next specified breakpoint. `base` remains an alias for `xs`, and `xl` for `xlg`; explicit canonical keys take priority. Nested layouts resolve their own values independently.
|
|
422
|
+
|
|
423
|
+
```tsx
|
|
424
|
+
<Grid columns={{ xs: 1, sm: 2, md: 3, lg: 4, xlg: 5 }} gap={3} />
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
Control `size` selects physical geometry (`xs`, `sm`, `md`, `lg`, `xlg`); it does not limit a component to a particular screen. Explicit compact controls remain compact on large displays. Numeric and CSS-length dimensions remain supported by Icon and Loader. Card padding also includes `xs` and `xlg`.
|
|
@@ -69,7 +69,7 @@ var illustrations = illustrations_default;
|
|
|
69
69
|
|
|
70
70
|
// src/components/layout/Icon/Icon.tsx
|
|
71
71
|
import { jsx } from "react/jsx-runtime";
|
|
72
|
-
var iconSizes = { xs: "1rem", sm: "1.25rem", md: "1.5rem", lg: "2rem" };
|
|
72
|
+
var iconSizes = { xs: "1rem", sm: "1.25rem", md: "1.5rem", lg: "2rem", xlg: "2.5rem" };
|
|
73
73
|
var Icon = ({
|
|
74
74
|
name = "music",
|
|
75
75
|
size,
|
|
@@ -1128,7 +1128,7 @@ import { jsx as jsx14 } from "react/jsx-runtime";
|
|
|
1128
1128
|
var Switch = (p) => /* @__PURE__ */ jsx14(BooleanControl, { kind: "Switch", ...p });
|
|
1129
1129
|
|
|
1130
1130
|
// src/core/responsive.ts
|
|
1131
|
-
var BREAKPOINTS = ["
|
|
1131
|
+
var BREAKPOINTS = ["xs", "sm", "md", "lg", "xlg"];
|
|
1132
1132
|
function spacing(value) {
|
|
1133
1133
|
if (typeof value !== "number") return value;
|
|
1134
1134
|
if (value === 0) return "0";
|
|
@@ -1137,11 +1137,11 @@ function spacing(value) {
|
|
|
1137
1137
|
function responsiveVars(name, value, format = String, fallback) {
|
|
1138
1138
|
const values = value != null && typeof value === "object" && !Array.isArray(value) ? value : { base: value ?? fallback };
|
|
1139
1139
|
const result = {};
|
|
1140
|
-
let current = values.base ?? fallback;
|
|
1140
|
+
let current = values.xs ?? values.base ?? fallback;
|
|
1141
1141
|
for (const bp of BREAKPOINTS) {
|
|
1142
|
-
current = values[bp] ?? current;
|
|
1142
|
+
current = values[bp] ?? (bp === "xlg" ? values.xl : void 0) ?? current;
|
|
1143
1143
|
if (current != null)
|
|
1144
|
-
result[`--ad-${name}${bp === "
|
|
1144
|
+
result[`--ad-${name}${bp === "xs" ? "" : `-${bp}`}`] = format(current);
|
|
1145
1145
|
}
|
|
1146
1146
|
return result;
|
|
1147
1147
|
}
|
|
@@ -2624,7 +2624,7 @@ var RotaryKnob = (p) => {
|
|
|
2624
2624
|
const initialRef = useRef14(initial);
|
|
2625
2625
|
const resetRef = useRef14(void 0);
|
|
2626
2626
|
resetRef.current = p.resetValue === void 0 ? void 0 : toPosition(p.resetValue);
|
|
2627
|
-
const diameter = p.diameter ?? { xs: 84, sm: 124, md: 220, lg: 320 }[normalizeSize(p.size) ?? "md"];
|
|
2627
|
+
const diameter = p.diameter ?? { xs: 84, sm: 124, md: 220, lg: 320, xlg: 400 }[normalizeSize(p.size) ?? "md"];
|
|
2628
2628
|
useLayoutEffect4(() => {
|
|
2629
2629
|
const root = rootRef.current;
|
|
2630
2630
|
const canvas = baseRef.current;
|
|
@@ -120,6 +120,30 @@
|
|
|
120
120
|
--ad-size-pad-x: 0.95rem;
|
|
121
121
|
--ad-size-gap: 0.72rem;
|
|
122
122
|
}
|
|
123
|
+
:is(
|
|
124
|
+
.ad-button,
|
|
125
|
+
.ad-icon-button,
|
|
126
|
+
.ad-toggle-button,
|
|
127
|
+
.ad-split-button,
|
|
128
|
+
.ad-input-base,
|
|
129
|
+
.ad-text-field-shell,
|
|
130
|
+
.ad-text-area,
|
|
131
|
+
.ad-number-field,
|
|
132
|
+
.ad-select,
|
|
133
|
+
.ad-switch,
|
|
134
|
+
.ad-checkbox,
|
|
135
|
+
.ad-slider,
|
|
136
|
+
.ad-file-picker,
|
|
137
|
+
.ad-tabs,
|
|
138
|
+
.ad-tab,
|
|
139
|
+
.ad-segmented-control
|
|
140
|
+
)[data-ad-size="xlg"] {
|
|
141
|
+
--ad-size-h: 3.5rem;
|
|
142
|
+
--ad-size-font: 1.0625rem;
|
|
143
|
+
--ad-size-radius: 1rem;
|
|
144
|
+
--ad-size-pad-x: 1.125rem;
|
|
145
|
+
--ad-size-gap: 0.85rem;
|
|
146
|
+
}
|
|
123
147
|
|
|
124
148
|
@keyframes ad-btn-breathe {
|
|
125
149
|
50% {
|
|
@@ -8,7 +8,7 @@ export interface LoaderProps extends Omit<CommonProps, "size"> {
|
|
|
8
8
|
/** The picture that moves: a logo, an icon, any image (transparent PNG/SVG/WebP look best). */
|
|
9
9
|
src?: string;
|
|
10
10
|
animation?: LoaderAnimation;
|
|
11
|
-
/** xs/sm/md/lg, a CSS length, or pixels converted to rem at the 16px design baseline. */
|
|
11
|
+
/** xs/sm/md/lg/xlg, a CSS length, or pixels converted to rem at the 16px design baseline. */
|
|
12
12
|
size?: number | string;
|
|
13
13
|
/** Speed multiplier: 2 is twice as fast. */
|
|
14
14
|
speed?: number;
|
|
@@ -21,6 +21,7 @@ export declare const loaderSizes: {
|
|
|
21
21
|
readonly sm: 6.5;
|
|
22
22
|
readonly md: 9;
|
|
23
23
|
readonly lg: 12;
|
|
24
|
+
readonly xlg: 16;
|
|
24
25
|
};
|
|
25
26
|
export declare const loaderRenderKey: ({ animation }: Pick<LoaderSettings, "animation">) => "flip" | "fill" | "wave" | "palette" | "glow" | "pulse" | "spin" | "breathe" | "bounce" | "orbit" | "shine" | "wobble" | "radar";
|
|
26
27
|
/** Removes large, smoothly connected background regions while preserving enclosed logo details. */
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import type { CardProps } from "../shared";
|
|
3
3
|
export declare const Card: ({ as, border, shell, padding, title, description, eyebrow, icon, actions, level, children, ...p }: CardProps) => React.DetailedReactHTMLElement<{
|
|
4
4
|
ref: React.RefObject<HTMLElement | null>;
|
|
5
|
-
"data-ad-padding": "sm" | "md" | "lg" | "none";
|
|
5
|
+
"data-ad-padding": "xs" | "sm" | "md" | "lg" | "xlg" | "none";
|
|
6
6
|
onPointerMove: (event: React.PointerEvent<HTMLElement>) => void;
|
|
7
7
|
id: string | undefined;
|
|
8
8
|
className: string;
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
grid-column: var(--ad-grid-column-start) / var(--ad-grid-column-end);
|
|
25
25
|
grid-row: var(--ad-grid-row-start) / var(--ad-grid-row-end);
|
|
26
26
|
}
|
|
27
|
-
@media (min-width:
|
|
27
|
+
@media (min-width: 768px) {
|
|
28
28
|
.ad-grid:not(.ad-grid--auto-fit) {
|
|
29
29
|
grid-template-columns: var(--ad-grid-columns-sm);
|
|
30
30
|
}
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
grid-row: var(--ad-grid-row-start-sm) / var(--ad-grid-row-end-sm);
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
@media (min-width:
|
|
43
|
+
@media (min-width: 1024px) {
|
|
44
44
|
.ad-grid:not(.ad-grid--auto-fit) {
|
|
45
45
|
grid-template-columns: var(--ad-grid-columns-md);
|
|
46
46
|
}
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
grid-row: var(--ad-grid-row-start-md) / var(--ad-grid-row-end-md);
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
@media (min-width:
|
|
59
|
+
@media (min-width: 1920px) {
|
|
60
60
|
.ad-grid:not(.ad-grid--auto-fit) {
|
|
61
61
|
grid-template-columns: var(--ad-grid-columns-lg);
|
|
62
62
|
}
|
|
@@ -72,19 +72,19 @@
|
|
|
72
72
|
grid-row: var(--ad-grid-row-start-lg) / var(--ad-grid-row-end-lg);
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
@media (min-width:
|
|
75
|
+
@media (min-width: 2560px) {
|
|
76
76
|
.ad-grid:not(.ad-grid--auto-fit) {
|
|
77
|
-
grid-template-columns: var(--ad-grid-columns-
|
|
77
|
+
grid-template-columns: var(--ad-grid-columns-xlg);
|
|
78
78
|
}
|
|
79
79
|
.ad-grid {
|
|
80
|
-
row-gap: var(--ad-grid-row-gap-
|
|
81
|
-
column-gap: var(--ad-grid-column-gap-
|
|
82
|
-
align-items: var(--ad-grid-align-
|
|
83
|
-
justify-items: var(--ad-grid-justify-
|
|
84
|
-
justify-content: var(--ad-grid-distribution-
|
|
80
|
+
row-gap: var(--ad-grid-row-gap-xlg);
|
|
81
|
+
column-gap: var(--ad-grid-column-gap-xlg);
|
|
82
|
+
align-items: var(--ad-grid-align-xlg);
|
|
83
|
+
justify-items: var(--ad-grid-justify-xlg);
|
|
84
|
+
justify-content: var(--ad-grid-distribution-xlg);
|
|
85
85
|
}
|
|
86
86
|
.ad-grid-item {
|
|
87
|
-
grid-column: var(--ad-grid-column-start-
|
|
88
|
-
grid-row: var(--ad-grid-row-start-
|
|
87
|
+
grid-column: var(--ad-grid-column-start-xlg) / var(--ad-grid-column-end-xlg);
|
|
88
|
+
grid-row: var(--ad-grid-row-start-xlg) / var(--ad-grid-row-end-xlg);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
.ad-stack__divider {
|
|
16
16
|
display: contents;
|
|
17
17
|
}
|
|
18
|
-
@media (min-width:
|
|
18
|
+
@media (min-width: 768px) {
|
|
19
19
|
.ad-stack {
|
|
20
20
|
flex-direction: var(--ad-stack-direction-sm);
|
|
21
21
|
gap: var(--ad-stack-gap-sm);
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
flex-wrap: var(--ad-stack-wrap-sm);
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
@media (min-width:
|
|
27
|
+
@media (min-width: 1024px) {
|
|
28
28
|
.ad-stack {
|
|
29
29
|
flex-direction: var(--ad-stack-direction-md);
|
|
30
30
|
gap: var(--ad-stack-gap-md);
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
flex-wrap: var(--ad-stack-wrap-md);
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
@media (min-width:
|
|
36
|
+
@media (min-width: 1920px) {
|
|
37
37
|
.ad-stack {
|
|
38
38
|
flex-direction: var(--ad-stack-direction-lg);
|
|
39
39
|
gap: var(--ad-stack-gap-lg);
|
|
@@ -42,12 +42,12 @@
|
|
|
42
42
|
flex-wrap: var(--ad-stack-wrap-lg);
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
-
@media (min-width:
|
|
45
|
+
@media (min-width: 2560px) {
|
|
46
46
|
.ad-stack {
|
|
47
|
-
flex-direction: var(--ad-stack-direction-
|
|
48
|
-
gap: var(--ad-stack-gap-
|
|
49
|
-
align-items: var(--ad-stack-align-
|
|
50
|
-
justify-content: var(--ad-stack-justify-
|
|
51
|
-
flex-wrap: var(--ad-stack-wrap-
|
|
47
|
+
flex-direction: var(--ad-stack-direction-xlg);
|
|
48
|
+
gap: var(--ad-stack-gap-xlg);
|
|
49
|
+
align-items: var(--ad-stack-align-xlg);
|
|
50
|
+
justify-content: var(--ad-stack-justify-xlg);
|
|
51
|
+
flex-wrap: var(--ad-stack-wrap-xlg);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
@@ -31,7 +31,7 @@ export interface CardProps extends CommonProps, Omit<HeaderProps, "as"> {
|
|
|
31
31
|
as?: "section" | "div" | "article";
|
|
32
32
|
border?: boolean;
|
|
33
33
|
shell?: boolean;
|
|
34
|
-
padding?: "none" | "sm" | "md" | "lg";
|
|
34
|
+
padding?: "none" | "xs" | "sm" | "md" | "lg" | "xlg";
|
|
35
35
|
material?: Material;
|
|
36
36
|
}
|
|
37
37
|
export interface AvatarProps extends CommonProps {
|
package/dist/core/base.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { AriaRole, CSSProperties, ReactNode, Ref } from "react";
|
|
2
2
|
export type Material = "shell" | "card" | "glass" | "ruby" | "tile" | "input" | "dialog" | "ghost" | "danger";
|
|
3
3
|
export type Variant = "primary" | "secondary" | "ghost" | "danger";
|
|
4
|
-
export type ControlSize = "xs" | "sm" | "md" | "lg";
|
|
4
|
+
export type ControlSize = "xs" | "sm" | "md" | "lg" | "xlg";
|
|
5
5
|
export type LegacySize = "small" | "medium" | "large";
|
|
6
6
|
export type Size = ControlSize | LegacySize;
|
|
7
7
|
export type Tone = "success" | "warning" | "error" | "processing" | "pending" | "offline" | "info";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CSSProperties } from "react";
|
|
2
|
-
export type Breakpoint = "
|
|
2
|
+
export type Breakpoint = "xs" | "sm" | "md" | "lg" | "xlg" | "base" | "xl";
|
|
3
3
|
export type Responsive<T> = T | Partial<Record<Breakpoint, T>>;
|
|
4
4
|
export type Spacing = number | string;
|
|
5
5
|
/** Numbers are steps of the spacing scale; strings are raw CSS lengths. */
|
package/dist/forms.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -62,7 +62,7 @@ import {
|
|
|
62
62
|
useSvgId,
|
|
63
63
|
variantMaterial,
|
|
64
64
|
vectorElement
|
|
65
|
-
} from "./chunks/chunk-
|
|
65
|
+
} from "./chunks/chunk-KAVSRD45.js";
|
|
66
66
|
import {
|
|
67
67
|
ThemeProvider,
|
|
68
68
|
createNeonRenderer,
|
|
@@ -369,7 +369,7 @@ var Card = ({
|
|
|
369
369
|
import { useInsertionEffect, useRef as useRef2 } from "react";
|
|
370
370
|
import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
371
371
|
var loaderAnimations = ["spin", "pulse", "breathe", "bounce", "flip", "orbit", "wave", "glow", "fill", "shine", "wobble", "radar", "palette"];
|
|
372
|
-
var loaderSizes = { xs: "2rem", sm: "3rem", md: "4rem", lg: "6rem" };
|
|
372
|
+
var loaderSizes = { xs: "2rem", sm: "3rem", md: "4rem", lg: "6rem", xlg: "8rem" };
|
|
373
373
|
var loaderAnimationLabel = (animation, translate2 = tr) => translate2(
|
|
374
374
|
{
|
|
375
375
|
spin: "\u0412\u0440\u0430\u0449\u0435\u043D\u0438\u0435",
|
|
@@ -520,7 +520,7 @@ import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
|
520
520
|
var loaderGeneratorAnimations = loaderAnimations.filter(
|
|
521
521
|
(animation) => animation !== "orbit" && animation !== "radar"
|
|
522
522
|
);
|
|
523
|
-
var loaderSizes2 = { xs: 4.5, sm: 6.5, md: 9, lg: 12 };
|
|
523
|
+
var loaderSizes2 = { xs: 4.5, sm: 6.5, md: 9, lg: 12, xlg: 16 };
|
|
524
524
|
var loaderRenderKey = ({ animation }) => animation;
|
|
525
525
|
var loaderSizeItems = Object.keys(loaderSizes2).map((value) => ({
|
|
526
526
|
value,
|