@wix/site-ui 1.80.0 → 1.81.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/Field/index.css +47 -1
- package/dist/Field/index.d.ts +10 -0
- package/dist/Field/index.js +10 -4
- package/dist/index.d.ts +10 -0
- package/package.json +2 -2
package/dist/Field/index.css
CHANGED
|
@@ -24,7 +24,53 @@
|
|
|
24
24
|
color: var(--wst-shade-3-color, #767676);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
.control-fRhDZ8
|
|
27
|
+
.control-fRhDZ8 {
|
|
28
|
+
width: 100%;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.control-fRhDZ8.controlLine-cAw0CF {
|
|
32
|
+
border: 0;
|
|
33
|
+
border-block-end-width: var(--wst-system-line-1-width, 1px);
|
|
34
|
+
border-block-end-style: solid;
|
|
35
|
+
border-block-end-color: color-mix(in srgb,
|
|
36
|
+
var(--wst-system-line-1-color, #000) 60%,
|
|
37
|
+
transparent);
|
|
38
|
+
border-radius: 0;
|
|
39
|
+
padding-inline: 0;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.control-fRhDZ8.controlLine-cAw0CF:hover, .control-fRhDZ8.controlLine-cAw0CF:focus {
|
|
43
|
+
border-block-end-color: var(--wst-system-line-1-color, #000);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.root-ECdHfF:has(.labelFloating-io8BLN) {
|
|
47
|
+
position: relative;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.root-ECdHfF:has(.labelFloating-io8BLN) .control-fRhDZ8 {
|
|
51
|
+
block-size: 50px;
|
|
52
|
+
padding-block: 24px 6px;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.labelFloating-io8BLN {
|
|
56
|
+
z-index: 2;
|
|
57
|
+
color: var(--wst-shade-3-color, #767676);
|
|
58
|
+
pointer-events: none;
|
|
59
|
+
margin: 0;
|
|
60
|
+
transition: inset-block-start .12s, transform .12s, font-size .12s;
|
|
61
|
+
position: absolute;
|
|
62
|
+
inset-block-start: 50%;
|
|
63
|
+
inset-inline-start: 12px;
|
|
64
|
+
transform: translateY(-50%);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.labelFloating-io8BLN[data-filled], .labelFloating-io8BLN[data-focused] {
|
|
68
|
+
font-size: 12px;
|
|
69
|
+
inset-block-start: 8px;
|
|
70
|
+
transform: translateY(0);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.item-kQeHOQ {
|
|
28
74
|
width: 100%;
|
|
29
75
|
}
|
|
30
76
|
|
package/dist/Field/index.d.ts
CHANGED
|
@@ -106,6 +106,8 @@ declare const closeWatcher: "close-watcher";
|
|
|
106
106
|
*/
|
|
107
107
|
declare type ComponentRenderFn<Props, State> = (props: Props, state: State) => React_2.ReactElement<unknown>;
|
|
108
108
|
|
|
109
|
+
declare type ControlVariant = 'box' | 'line';
|
|
110
|
+
|
|
109
111
|
declare const decrementPress: "decrement-press";
|
|
110
112
|
|
|
111
113
|
declare const disabled: "disabled";
|
|
@@ -122,6 +124,9 @@ export declare const Field: {
|
|
|
122
124
|
} & React_2.RefAttributes<HTMLDivElement>>;
|
|
123
125
|
Label: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<FieldLabelProps_2, "ref"> & React_2.RefAttributes<HTMLElement>, "ref">, "className"> & {
|
|
124
126
|
className?: string | undefined;
|
|
127
|
+
} & {
|
|
128
|
+
/** `floating` lifts the label into the control until it is focused or filled. */
|
|
129
|
+
variant?: LabelVariant | undefined;
|
|
125
130
|
} & React_2.RefAttributes<HTMLElement>>;
|
|
126
131
|
Error: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<FieldErrorProps_2, "ref"> & React_2.RefAttributes<HTMLDivElement>, "ref">, "className"> & {
|
|
127
132
|
className?: string | undefined;
|
|
@@ -131,6 +136,9 @@ export declare const Field: {
|
|
|
131
136
|
} & React_2.RefAttributes<HTMLParagraphElement>>;
|
|
132
137
|
Control: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<FieldControlProps_2, "ref"> & React_2.RefAttributes<HTMLElement>, "ref">, "className"> & {
|
|
133
138
|
className?: string | undefined;
|
|
139
|
+
} & {
|
|
140
|
+
/** `line` swaps the boxed border for a single bottom border. */
|
|
141
|
+
variant?: ControlVariant | undefined;
|
|
134
142
|
} & React_2.RefAttributes<HTMLElement>>;
|
|
135
143
|
Item: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<FieldItemProps_2, "ref"> & React_2.RefAttributes<HTMLDivElement>, "ref">, "className"> & {
|
|
136
144
|
className?: string | undefined;
|
|
@@ -550,6 +558,8 @@ declare const itemPress: "item-press";
|
|
|
550
558
|
|
|
551
559
|
declare const keyboard: "keyboard";
|
|
552
560
|
|
|
561
|
+
declare type LabelVariant = 'default' | 'floating';
|
|
562
|
+
|
|
553
563
|
declare const linkPress: "link-press";
|
|
554
564
|
|
|
555
565
|
declare const listNavigation: "list-navigation";
|
package/dist/Field/index.js
CHANGED
|
@@ -675,6 +675,8 @@ const Field_module = {
|
|
|
675
675
|
error: "error-BUDKWp",
|
|
676
676
|
description: "description-IVviYU",
|
|
677
677
|
control: "control-fRhDZ8",
|
|
678
|
+
controlLine: "controlLine-cAw0CF",
|
|
679
|
+
labelFloating: "labelFloating-io8BLN",
|
|
678
680
|
item: "item-kQeHOQ"
|
|
679
681
|
};
|
|
680
682
|
const Root = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(FieldRoot_FieldRoot, {
|
|
@@ -682,9 +684,11 @@ const Root = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...p
|
|
|
682
684
|
className: clsx(Field_module.root, className),
|
|
683
685
|
...props
|
|
684
686
|
}));
|
|
685
|
-
const Label = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(FieldLabel_FieldLabel, {
|
|
687
|
+
const Label = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, variant = 'default', ...props }, ref)=>/*#__PURE__*/ jsx(FieldLabel_FieldLabel, {
|
|
686
688
|
ref: ref,
|
|
687
|
-
className: clsx(Field_module.label,
|
|
689
|
+
className: clsx(Field_module.label, {
|
|
690
|
+
[Field_module.labelFloating]: 'floating' === variant
|
|
691
|
+
}, className),
|
|
688
692
|
...props
|
|
689
693
|
}));
|
|
690
694
|
const Error = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(FieldError_FieldError, {
|
|
@@ -711,12 +715,14 @@ const TEXT_INPUT_TYPES = new Set([
|
|
|
711
715
|
'week',
|
|
712
716
|
'time'
|
|
713
717
|
]);
|
|
714
|
-
const Control = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, type = 'text', ...props }, ref)=>/*#__PURE__*/ jsx(FieldControl_FieldControl, {
|
|
718
|
+
const Control = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, type = 'text', variant = 'box', ...props }, ref)=>/*#__PURE__*/ jsx(FieldControl_FieldControl, {
|
|
715
719
|
ref: ref,
|
|
716
720
|
type: type,
|
|
717
721
|
className: clsx({
|
|
718
722
|
[Input_module.root]: TEXT_INPUT_TYPES.has(type)
|
|
719
|
-
}, Field_module.control,
|
|
723
|
+
}, Field_module.control, {
|
|
724
|
+
[Field_module.controlLine]: 'line' === variant
|
|
725
|
+
}, className),
|
|
720
726
|
...props
|
|
721
727
|
}));
|
|
722
728
|
const Item = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(FieldItem_FieldItem, {
|
package/dist/index.d.ts
CHANGED
|
@@ -3037,6 +3037,8 @@ export declare interface ContextMenuTriggerState {
|
|
|
3037
3037
|
open: boolean;
|
|
3038
3038
|
}
|
|
3039
3039
|
|
|
3040
|
+
declare type ControlVariant = 'box' | 'line';
|
|
3041
|
+
|
|
3040
3042
|
export declare type Coords = typeof DEFAULT_COORDS;
|
|
3041
3043
|
|
|
3042
3044
|
declare function createAlertDialogHandle<Payload>(): AlertDialogHandle<Payload>;
|
|
@@ -4178,6 +4180,9 @@ export declare const Field: {
|
|
|
4178
4180
|
} & React_2.RefAttributes<HTMLDivElement>>;
|
|
4179
4181
|
Label: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<FieldLabelProps_2, "ref"> & React_2.RefAttributes<HTMLElement>, "ref">, "className"> & {
|
|
4180
4182
|
className?: string | undefined;
|
|
4183
|
+
} & {
|
|
4184
|
+
/** `floating` lifts the label into the control until it is focused or filled. */
|
|
4185
|
+
variant?: LabelVariant | undefined;
|
|
4181
4186
|
} & React_2.RefAttributes<HTMLElement>>;
|
|
4182
4187
|
Error: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<FieldErrorProps_2, "ref"> & React_2.RefAttributes<HTMLDivElement>, "ref">, "className"> & {
|
|
4183
4188
|
className?: string | undefined;
|
|
@@ -4187,6 +4192,9 @@ export declare const Field: {
|
|
|
4187
4192
|
} & React_2.RefAttributes<HTMLParagraphElement>>;
|
|
4188
4193
|
Control: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<FieldControlProps_2, "ref"> & React_2.RefAttributes<HTMLElement>, "ref">, "className"> & {
|
|
4189
4194
|
className?: string | undefined;
|
|
4195
|
+
} & {
|
|
4196
|
+
/** `line` swaps the boxed border for a single bottom border. */
|
|
4197
|
+
variant?: ControlVariant | undefined;
|
|
4190
4198
|
} & React_2.RefAttributes<HTMLElement>>;
|
|
4191
4199
|
Item: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<FieldItemProps_2, "ref"> & React_2.RefAttributes<HTMLDivElement>, "ref">, "className"> & {
|
|
4192
4200
|
className?: string | undefined;
|
|
@@ -4914,6 +4922,8 @@ declare interface LabelableContext {
|
|
|
4914
4922
|
*/
|
|
4915
4923
|
declare const LabelableContext: React_2.Context<LabelableContext>;
|
|
4916
4924
|
|
|
4925
|
+
declare type LabelVariant = 'default' | 'floating';
|
|
4926
|
+
|
|
4917
4927
|
declare const linkPress: "link-press";
|
|
4918
4928
|
|
|
4919
4929
|
declare const listNavigation: "list-navigation";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/site-ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.81.0",
|
|
4
4
|
"description": "Pure UI components for the Wix site builder",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -94,5 +94,5 @@
|
|
|
94
94
|
"registry": "https://registry.npmjs.org/",
|
|
95
95
|
"access": "public"
|
|
96
96
|
},
|
|
97
|
-
"falconPackageHash": "
|
|
97
|
+
"falconPackageHash": "3a309112efa840c5f4adcf6ae31501fc60a3f71247490debd3b674eb"
|
|
98
98
|
}
|