@janbox/storefront-ui 2.0.0 → 2.0.2
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/constants/index.d.ts +3 -0
- package/dist/constants/index.d.ts.map +1 -1
- package/dist/constants/index.js +5 -0
- package/dist/lib/accordion/accordion-summary/accordion-summary.d.ts.map +1 -1
- package/dist/lib/accordion/accordion-summary/accordion-summary.js +19 -18
- package/dist/lib/accordion/accordion-summary/types.d.ts +2 -2
- package/dist/lib/accordion/accordion-summary/types.d.ts.map +1 -1
- package/dist/lib/cascader/types.d.ts +1 -1
- package/dist/lib/cascader/types.d.ts.map +1 -1
- package/dist/lib/filter-panel/filter-panel.js +2 -2
- package/dist/lib/filter-panel/price-range-filter-panel.d.ts +3 -0
- package/dist/lib/filter-panel/price-range-filter-panel.d.ts.map +1 -0
- package/dist/lib/filter-panel/price-range-filter-panel.js +126 -0
- package/dist/lib/filter-panel/radio-filter-panel.js +1 -1
- package/dist/lib/filter-panel/types.d.ts +17 -7
- package/dist/lib/filter-panel/types.d.ts.map +1 -1
- package/dist/lib/floating/floating-content/floating-content.d.ts.map +1 -1
- package/dist/lib/floating/floating-content/floating-content.js +3 -1
- package/dist/lib/floating/floating-content/types.d.ts +2 -2
- package/dist/lib/floating/floating-content/types.d.ts.map +1 -1
- package/dist/lib/form-helper-text/form-helper-text.d.ts.map +1 -1
- package/dist/lib/form-helper-text/form-helper-text.js +7 -4
- package/dist/lib/form-helper-text/types.d.ts +2 -1
- package/dist/lib/form-helper-text/types.d.ts.map +1 -1
- package/dist/lib/input/input.d.ts.map +1 -1
- package/dist/lib/input/input.js +119 -122
- package/dist/lib/input/types.d.ts +3 -2
- package/dist/lib/input/types.d.ts.map +1 -1
- package/dist/lib/input-mask/index.d.ts +2 -0
- package/dist/lib/input-mask/index.d.ts.map +1 -1
- package/dist/lib/loading/loading-overlay/loading-overlay.d.ts +1 -1
- package/dist/lib/loading/loading-overlay/loading-overlay.d.ts.map +1 -1
- package/dist/lib/loading/loading-overlay/loading-overlay.js +10 -10
- package/dist/lib/loading/loading-overlay/types.d.ts +3 -2
- package/dist/lib/loading/loading-overlay/types.d.ts.map +1 -1
- package/dist/lib/menu/menu-list/menu-list.d.ts.map +1 -1
- package/dist/lib/menu/menu-list/menu-list.js +4 -3
- package/dist/lib/multiple-select/multiple-select.d.ts.map +1 -1
- package/dist/lib/multiple-select/multiple-select.js +8 -2
- package/dist/lib/multiple-select/types.d.ts +2 -4
- package/dist/lib/multiple-select/types.d.ts.map +1 -1
- package/dist/lib/phone-input/phone-input.d.ts.map +1 -1
- package/dist/lib/phone-input/phone-input.js +105 -92
- package/dist/lib/phone-input/types.d.ts +2 -3
- package/dist/lib/phone-input/types.d.ts.map +1 -1
- package/dist/lib/radio-button/radio-button.d.ts.map +1 -1
- package/dist/lib/radio-button/radio-button.js +7 -7
- package/dist/lib/radio-button/types.d.ts +2 -4
- package/dist/lib/radio-button/types.d.ts.map +1 -1
- package/dist/lib/textarea/textarea.d.ts.map +1 -1
- package/dist/lib/textarea/textarea.js +48 -44
- package/dist/lib/textarea/types.d.ts +3 -2
- package/dist/lib/textarea/types.d.ts.map +1 -1
- package/dist/lib/video/types.d.ts +2 -8
- package/dist/lib/video/types.d.ts.map +1 -1
- package/dist/lib/video/video.d.ts +1 -1
- package/dist/lib/video/video.d.ts.map +1 -1
- package/dist/lib/video/video.js +2 -4
- package/dist/locales/en/ui__translation.json +1 -1
- package/dist/locales/vi/ui__translation.json +3 -1
- package/dist/style.css +17 -17
- package/package.json +1 -1
- package/dist/lib/filter-panel/input-range-filter-panel.d.ts +0 -3
- package/dist/lib/filter-panel/input-range-filter-panel.d.ts.map +0 -1
- package/dist/lib/filter-panel/input-range-filter-panel.js +0 -77
|
@@ -9,6 +9,7 @@ import { getColorShadesByVariant } from "../../utils/index.js";
|
|
|
9
9
|
import { getColorVar } from "../../theme/palette.js";
|
|
10
10
|
import { Select } from "../select/select.js";
|
|
11
11
|
import { Flag } from "../flag/flag.js";
|
|
12
|
+
import { Primitive } from "../primitive/primitive.js";
|
|
12
13
|
import { InputMask as ForwardRefInputMask } from "../input-mask/input-mask.js";
|
|
13
14
|
import { Input } from "../input/input.js";
|
|
14
15
|
import { FormHelperText } from "../form-helper-text/form-helper-text.js";
|
|
@@ -107,104 +108,116 @@ const PhoneInput = ({
|
|
|
107
108
|
const originalValue = internalValue.nationalNumber ?? "";
|
|
108
109
|
return inputFocused ? originalValue : originalValue.replace(/^(\d{1,3})(\d{0,3})?(\d*)$/, "$1 $2 $3");
|
|
109
110
|
})();
|
|
110
|
-
return /* @__PURE__ */ jsxs(
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
],
|
|
129
|
-
ref: mergedRefs,
|
|
130
|
-
children: /* @__PURE__ */ jsxs("div", { css: { position: "absolute", inset: 0, display: "flex", alignItems: "center" }, children: [
|
|
131
|
-
/* @__PURE__ */ jsx(
|
|
132
|
-
Select,
|
|
133
|
-
{
|
|
134
|
-
containerProps: {
|
|
135
|
-
sx: {
|
|
136
|
-
width: "fit-content",
|
|
137
|
-
minWidth: 80
|
|
138
|
-
}
|
|
111
|
+
return /* @__PURE__ */ jsxs(
|
|
112
|
+
Primitive,
|
|
113
|
+
{
|
|
114
|
+
...containerProps,
|
|
115
|
+
sx: {
|
|
116
|
+
display: "flex",
|
|
117
|
+
flexDirection: "column",
|
|
118
|
+
width: "100%",
|
|
119
|
+
...containerProps == null ? void 0 : containerProps.sx
|
|
120
|
+
},
|
|
121
|
+
children: [
|
|
122
|
+
/* @__PURE__ */ jsx(
|
|
123
|
+
ForwardRefInputMask,
|
|
124
|
+
{
|
|
125
|
+
...props,
|
|
126
|
+
css: [
|
|
127
|
+
error && !selectOpen && {
|
|
128
|
+
"&::after": { borderColor: getColorVar("red.600") }
|
|
139
129
|
},
|
|
140
|
-
|
|
141
|
-
|
|
130
|
+
inputFocused && {
|
|
131
|
+
"&::after": { borderColor: getColorVar("primary.600") },
|
|
132
|
+
boxShadow: `0 0 0 3px ${getColorVar("primary.300")}`
|
|
142
133
|
},
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
bottom: 0,
|
|
147
|
-
left: 0
|
|
134
|
+
disabled && {
|
|
135
|
+
backgroundColor: getColorShadesByVariant("neutral").disabledSurface,
|
|
136
|
+
pointerEvents: "none"
|
|
148
137
|
},
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
138
|
+
props.css
|
|
139
|
+
],
|
|
140
|
+
ref: mergedRefs,
|
|
141
|
+
children: /* @__PURE__ */ jsxs("div", { css: { position: "absolute", inset: 0, display: "flex", alignItems: "center" }, children: [
|
|
142
|
+
/* @__PURE__ */ jsx(
|
|
143
|
+
Select,
|
|
144
|
+
{
|
|
145
|
+
containerProps: {
|
|
146
|
+
sx: {
|
|
147
|
+
width: "fit-content",
|
|
148
|
+
minWidth: 80
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
css: {
|
|
152
|
+
paddingRight: 0
|
|
153
|
+
},
|
|
154
|
+
outline: {
|
|
155
|
+
top: 0,
|
|
156
|
+
right: 0,
|
|
157
|
+
bottom: 0,
|
|
158
|
+
left: 0
|
|
159
|
+
},
|
|
160
|
+
listProps: {
|
|
161
|
+
style: {
|
|
162
|
+
width: wrapperWidth
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
value: internalValue.countryCode ?? null,
|
|
166
|
+
onChange: onDialCodeChange,
|
|
167
|
+
options: countries,
|
|
168
|
+
disabled,
|
|
169
|
+
selectedRenderer: SelectedRenderer,
|
|
170
|
+
optionLabel: CountryRowLabel,
|
|
171
|
+
optionValue: "code",
|
|
172
|
+
optionSearchLabel: ["name", "dial_code", "code"],
|
|
173
|
+
open: selectOpen,
|
|
174
|
+
onOpenChange: setSelectOpen
|
|
152
175
|
}
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
}
|
|
165
|
-
),
|
|
166
|
-
/* @__PURE__ */ jsx(
|
|
167
|
-
"div",
|
|
168
|
-
{
|
|
169
|
-
css: {
|
|
170
|
-
borderRight: "1px solid",
|
|
171
|
-
borderColor: getColorVar("border.default"),
|
|
172
|
-
height: "66.666667%",
|
|
173
|
-
marginLeft: 8,
|
|
174
|
-
marginRight: 8
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
),
|
|
178
|
-
/* @__PURE__ */ jsx(
|
|
179
|
-
Input,
|
|
180
|
-
{
|
|
181
|
-
value: inputDisplayValue,
|
|
182
|
-
disabled,
|
|
183
|
-
containerProps: {
|
|
184
|
-
sx: {
|
|
185
|
-
flex: 1
|
|
176
|
+
),
|
|
177
|
+
/* @__PURE__ */ jsx(
|
|
178
|
+
"div",
|
|
179
|
+
{
|
|
180
|
+
css: {
|
|
181
|
+
borderRight: "1px solid",
|
|
182
|
+
borderColor: getColorVar("border.default"),
|
|
183
|
+
height: "66.666667%",
|
|
184
|
+
marginLeft: 8,
|
|
185
|
+
marginRight: 8
|
|
186
|
+
}
|
|
186
187
|
}
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
188
|
+
),
|
|
189
|
+
/* @__PURE__ */ jsx(
|
|
190
|
+
Input,
|
|
191
|
+
{
|
|
192
|
+
value: inputDisplayValue,
|
|
193
|
+
disabled,
|
|
194
|
+
containerProps: {
|
|
195
|
+
sx: {
|
|
196
|
+
flex: 1
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
mainProps: {
|
|
200
|
+
style: {
|
|
201
|
+
paddingLeft: 0,
|
|
202
|
+
boxShadow: "none"
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
onChange: onNationalNumberChange,
|
|
206
|
+
sx: {
|
|
207
|
+
borderWidth: 0
|
|
208
|
+
},
|
|
209
|
+
onFocus: () => setInputFocused(true),
|
|
210
|
+
onBlur: () => setInputFocused(false),
|
|
211
|
+
ref: inputRef
|
|
192
212
|
}
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
}
|
|
202
|
-
)
|
|
203
|
-
] })
|
|
204
|
-
}
|
|
205
|
-
),
|
|
206
|
-
/* @__PURE__ */ jsx(FormHelperText, { error, children: helperText })
|
|
207
|
-
] });
|
|
213
|
+
)
|
|
214
|
+
] })
|
|
215
|
+
}
|
|
216
|
+
),
|
|
217
|
+
/* @__PURE__ */ jsx(FormHelperText, { error, children: helperText })
|
|
218
|
+
]
|
|
219
|
+
}
|
|
220
|
+
);
|
|
208
221
|
};
|
|
209
222
|
export {
|
|
210
223
|
PhoneInput
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { JSX } from 'react';
|
|
2
2
|
import { Interpolation } from '@emotion/react';
|
|
3
3
|
import { SizeVariant, ShallowMerge, ToResponsiveProps } from '../../types';
|
|
4
|
+
import { PrimitiveProps } from '../primitive';
|
|
4
5
|
export type PhoneInputResponsiveProps = {
|
|
5
6
|
size?: Exclude<SizeVariant, 'xs'>;
|
|
6
7
|
};
|
|
@@ -16,9 +17,7 @@ export type PhoneInputProps = ShallowMerge<JSX.IntrinsicElements['div'], {
|
|
|
16
17
|
onChange?: (value: PhoneInputValue) => void;
|
|
17
18
|
error?: boolean;
|
|
18
19
|
helperText?: string;
|
|
19
|
-
containerProps?: JSX.IntrinsicElements['div']
|
|
20
|
-
css?: Interpolation;
|
|
21
|
-
};
|
|
20
|
+
containerProps?: PrimitiveProps<JSX.IntrinsicElements['div']>;
|
|
22
21
|
disabled?: boolean;
|
|
23
22
|
} & ToResponsiveProps<PhoneInputResponsiveProps>>;
|
|
24
23
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/phone-input/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/phone-input/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,MAAM,MAAM,yBAAyB,GAAG;IACtC,IAAI,CAAC,EAAE,OAAO,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;CACnC,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,YAAY,CACxC,GAAG,CAAC,iBAAiB,CAAC,KAAK,CAAC,EAC5B;IACE,GAAG,CAAC,EAAE,aAAa,CAAC;IACpB,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;IAC5C,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,cAAc,CAAC,GAAG,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC,CAAC;IAC9D,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,GAAG,iBAAiB,CAAC,yBAAyB,CAAC,CACjD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-button.d.ts","sourceRoot":"","sources":["../../../src/lib/radio-button/radio-button.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"radio-button.d.ts","sourceRoot":"","sources":["../../../src/lib/radio-button/radio-button.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAM3C,eAAO,MAAM,WAAW,4HAsBtB,CAAC"}
|
|
@@ -4,20 +4,20 @@ import { getRadioButtonProps } from "./helpers.js";
|
|
|
4
4
|
import classes from "./radio-button.module.scss.js";
|
|
5
5
|
import { cn } from "../../utils/stylesheet.js";
|
|
6
6
|
import { getColorShadesByVariant } from "../../utils/index.js";
|
|
7
|
+
import { Primitive } from "../primitive/primitive.js";
|
|
7
8
|
const RadioButton = forwardRef((_props, ref) => {
|
|
8
9
|
const { children, color = "primary", className, containerProps, ...props } = getRadioButtonProps(_props);
|
|
9
10
|
const { main } = getColorShadesByVariant(color);
|
|
10
11
|
return /* @__PURE__ */ jsxs(
|
|
11
|
-
|
|
12
|
+
Primitive,
|
|
12
13
|
{
|
|
13
14
|
...containerProps,
|
|
14
|
-
css: [
|
|
15
|
-
{
|
|
16
|
-
"--radio-button-color": main
|
|
17
|
-
},
|
|
18
|
-
containerProps == null ? void 0 : containerProps.css
|
|
19
|
-
],
|
|
20
15
|
className: cn(classes.radio_button__container, containerProps == null ? void 0 : containerProps.className),
|
|
16
|
+
sx: {
|
|
17
|
+
"--radio-button-color": main,
|
|
18
|
+
...containerProps == null ? void 0 : containerProps.sx
|
|
19
|
+
},
|
|
20
|
+
as: "label",
|
|
21
21
|
children: [
|
|
22
22
|
/* @__PURE__ */ jsxs("span", { className: classes.radio_button__main, children: [
|
|
23
23
|
/* @__PURE__ */ jsx("input", { ...props, className: cn(classes.radio_button__input, className), type: "radio", ref }),
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { JSX } from 'react';
|
|
2
|
-
import { Interpolation } from '@emotion/react';
|
|
3
2
|
import { ColorVariant, ShallowMerge } from '../../types';
|
|
3
|
+
import { PrimitiveProps } from '../primitive';
|
|
4
4
|
interface RadioButtonExtendedProps {
|
|
5
5
|
color?: ColorVariant;
|
|
6
|
-
containerProps?: JSX.IntrinsicElements['label']
|
|
7
|
-
css?: Interpolation;
|
|
8
|
-
};
|
|
6
|
+
containerProps?: PrimitiveProps<JSX.IntrinsicElements['label']>;
|
|
9
7
|
}
|
|
10
8
|
export type RadioButtonProps = ShallowMerge<JSX.IntrinsicElements['input'], RadioButtonExtendedProps>;
|
|
11
9
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/radio-button/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/radio-button/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,UAAU,wBAAwB;IAChC,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,cAAc,CAAC,EAAE,cAAc,CAAC,GAAG,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC,CAAC;CACjE;AAED,MAAM,MAAM,gBAAgB,GAAG,YAAY,CAAC,GAAG,CAAC,iBAAiB,CAAC,OAAO,CAAC,EAAE,wBAAwB,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../../src/lib/textarea/textarea.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../../src/lib/textarea/textarea.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,aAAa,EAA2B,MAAM,SAAS,CAAC;AAUjE,eAAO,MAAM,QAAQ,uBAAwB,aAAa,qDAuHzD,CAAC"}
|
|
@@ -5,18 +5,20 @@ import { isString } from "lodash-es";
|
|
|
5
5
|
import { getTextareaProps } from "./helpers.js";
|
|
6
6
|
import classes from "./textarea.module.scss.js";
|
|
7
7
|
import { getSizeVariantState } from "../../utils/index.js";
|
|
8
|
-
import {
|
|
9
|
-
import { mediaQuery } from "../../theme/screens.js";
|
|
8
|
+
import { cn } from "../../utils/stylesheet.js";
|
|
10
9
|
import "../../theme/palette.js";
|
|
11
10
|
import { getTypographyVar } from "../../theme/typography.js";
|
|
11
|
+
import { Primitive } from "../primitive/primitive.js";
|
|
12
12
|
import { FormHelperText } from "../form-helper-text/form-helper-text.js";
|
|
13
13
|
const Textarea = ({ ref, ..._props }) => {
|
|
14
|
+
var _a, _b, _c;
|
|
14
15
|
const {
|
|
15
16
|
size,
|
|
16
17
|
sm,
|
|
17
18
|
md,
|
|
18
19
|
lg,
|
|
19
20
|
containerProps,
|
|
21
|
+
mainProps,
|
|
20
22
|
className,
|
|
21
23
|
helperText,
|
|
22
24
|
error,
|
|
@@ -24,7 +26,6 @@ const Textarea = ({ ref, ..._props }) => {
|
|
|
24
26
|
debounce = 0,
|
|
25
27
|
mode = "onChange",
|
|
26
28
|
value,
|
|
27
|
-
sx,
|
|
28
29
|
...rest
|
|
29
30
|
} = getTextareaProps(_props);
|
|
30
31
|
const textareaRef = useRef(null);
|
|
@@ -58,45 +59,49 @@ const Textarea = ({ ref, ..._props }) => {
|
|
|
58
59
|
onChangeProp == null ? void 0 : onChangeProp(e);
|
|
59
60
|
};
|
|
60
61
|
const onFocus = (e) => {
|
|
61
|
-
var
|
|
62
|
+
var _a2;
|
|
62
63
|
beforeChangeValue.current = e.target.value;
|
|
63
|
-
(
|
|
64
|
+
(_a2 = rest.onFocus) == null ? void 0 : _a2.call(rest, e);
|
|
64
65
|
};
|
|
65
66
|
const onBlur = (e) => {
|
|
66
|
-
var
|
|
67
|
+
var _a2;
|
|
67
68
|
if (beforeChangeValue.current !== e.target.value) {
|
|
68
69
|
if (mode === "onBlur" || debounce > 0) {
|
|
69
70
|
onChange(e, true);
|
|
70
71
|
}
|
|
71
72
|
}
|
|
72
|
-
(
|
|
73
|
+
(_a2 = rest.onBlur) == null ? void 0 : _a2.call(rest, e);
|
|
73
74
|
setTimeout(() => {
|
|
74
75
|
setTypingValue(void 0);
|
|
75
76
|
}, debounce);
|
|
76
77
|
};
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
78
|
+
return /* @__PURE__ */ jsxs(Primitive, { ...containerProps, className: cn(classes.textarea__container, containerProps == null ? void 0 : containerProps.className), children: [
|
|
79
|
+
/* @__PURE__ */ jsx(
|
|
80
|
+
Primitive,
|
|
81
|
+
{
|
|
82
|
+
...mainProps,
|
|
83
|
+
sx: {
|
|
84
|
+
display: "flex",
|
|
85
|
+
paddingTop: 4,
|
|
86
|
+
paddingBottom: 4,
|
|
87
|
+
...createStyle({ size }),
|
|
88
|
+
...mainProps == null ? void 0 : mainProps.sx,
|
|
89
|
+
sm: {
|
|
90
|
+
...createStyle(sm),
|
|
91
|
+
...(_a = mainProps == null ? void 0 : mainProps.sx) == null ? void 0 : _a.sm
|
|
92
|
+
},
|
|
93
|
+
md: {
|
|
94
|
+
...createStyle(md),
|
|
95
|
+
...(_b = mainProps == null ? void 0 : mainProps.sx) == null ? void 0 : _b.md
|
|
96
|
+
},
|
|
97
|
+
lg: {
|
|
98
|
+
...createStyle(lg),
|
|
99
|
+
...(_c = mainProps == null ? void 0 : mainProps.sx) == null ? void 0 : _c.lg
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
className: cn(classes.textarea__main, mainProps == null ? void 0 : mainProps.className),
|
|
103
|
+
children: /* @__PURE__ */ jsx(
|
|
104
|
+
Primitive,
|
|
100
105
|
{
|
|
101
106
|
"aria-invalid": error,
|
|
102
107
|
className: cn(
|
|
@@ -108,24 +113,23 @@ const Textarea = ({ ref, ..._props }) => {
|
|
|
108
113
|
ref: mergedRefs,
|
|
109
114
|
onChange,
|
|
110
115
|
onBlur,
|
|
111
|
-
onFocus
|
|
116
|
+
onFocus,
|
|
117
|
+
as: "textarea"
|
|
112
118
|
}
|
|
113
|
-
)
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}
|
|
117
|
-
);
|
|
119
|
+
)
|
|
120
|
+
}
|
|
121
|
+
),
|
|
122
|
+
/* @__PURE__ */ jsx(FormHelperText, { error, children: helperText })
|
|
123
|
+
] });
|
|
118
124
|
};
|
|
119
125
|
const createStyle = ({ size } = {}) => {
|
|
120
126
|
const { inputPaddingX, textVariant } = getSizeVariantState(size);
|
|
121
|
-
return
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
}
|
|
128
|
-
];
|
|
127
|
+
return {
|
|
128
|
+
paddingLeft: inputPaddingX,
|
|
129
|
+
paddingRight: inputPaddingX,
|
|
130
|
+
fontSize: textVariant ? getTypographyVar(textVariant).fontSize : void 0,
|
|
131
|
+
lineHeight: textVariant ? getTypographyVar(textVariant).lineHeight : void 0
|
|
132
|
+
};
|
|
129
133
|
};
|
|
130
134
|
export {
|
|
131
135
|
Textarea
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { JSX } from 'react';
|
|
2
2
|
import { SizeVariant, ShallowMerge, PropsWithSx, ToResponsiveProps } from '../../types';
|
|
3
|
+
import { PrimitiveProps } from '../primitive';
|
|
3
4
|
export interface TextareaResponsiveProps {
|
|
4
5
|
size?: SizeVariant;
|
|
5
6
|
}
|
|
6
7
|
type TextareaExtendedProps = PropsWithSx<ToResponsiveProps<TextareaResponsiveProps> & {
|
|
7
8
|
containerProps?: PropsWithSx<JSX.IntrinsicElements['div']>;
|
|
8
|
-
mainProps?: JSX.IntrinsicElements['div']
|
|
9
|
+
mainProps?: PrimitiveProps<JSX.IntrinsicElements['div']>;
|
|
9
10
|
helperText?: string;
|
|
10
11
|
error?: boolean;
|
|
11
12
|
value?: string;
|
|
@@ -13,6 +14,6 @@ type TextareaExtendedProps = PropsWithSx<ToResponsiveProps<TextareaResponsivePro
|
|
|
13
14
|
mode?: 'onChange' | 'onBlur';
|
|
14
15
|
debounce?: number;
|
|
15
16
|
}>;
|
|
16
|
-
export type TextareaProps = ShallowMerge<JSX.IntrinsicElements['textarea']
|
|
17
|
+
export type TextareaProps = ShallowMerge<PrimitiveProps<JSX.IntrinsicElements['textarea']>, TextareaExtendedProps>;
|
|
17
18
|
export {};
|
|
18
19
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/textarea/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/textarea/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,MAAM,WAAW,uBAAuB;IACtC,IAAI,CAAC,EAAE,WAAW,CAAC;CACpB;AAED,KAAK,qBAAqB,GAAG,WAAW,CACtC,iBAAiB,CAAC,uBAAuB,CAAC,GAAG;IAC3C,cAAc,CAAC,EAAE,WAAW,CAAC,GAAG,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC,CAAC;IAC3D,SAAS,CAAC,EAAE,cAAc,CAAC,GAAG,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC,CAAC;IACzD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,UAAU,GAAG,QAAQ,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CACF,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,YAAY,CAAC,cAAc,CAAC,GAAG,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC,EAAE,qBAAqB,CAAC,CAAC"}
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PropsWithSx } from '../../types';
|
|
2
2
|
import { ReactPlayerProps } from 'react-player/types';
|
|
3
|
-
|
|
4
|
-
type VideoExtendedProps = PropsWithSx<{
|
|
5
|
-
containerProps?: JSX.IntrinsicElements['div'];
|
|
6
|
-
PlayerComponent?: ComponentType<ReactPlayerProps>;
|
|
7
|
-
}>;
|
|
8
|
-
export type VideoProps = ShallowMerge<ReactPlayerProps, VideoExtendedProps>;
|
|
9
|
-
export {};
|
|
3
|
+
export type VideoProps = PropsWithSx<ReactPlayerProps>;
|
|
10
4
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/video/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/video/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,MAAM,MAAM,UAAU,GAAG,WAAW,CAAC,gBAAgB,CAAC,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { VideoProps } from './types';
|
|
2
|
-
export declare const Video: ({ ref,
|
|
2
|
+
export declare const Video: ({ ref, ..._props }: VideoProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=video.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"video.d.ts","sourceRoot":"","sources":["../../../src/lib/video/video.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"video.d.ts","sourceRoot":"","sources":["../../../src/lib/video/video.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAIrC,eAAO,MAAM,KAAK,uBAAwB,UAAU,qDAInD,CAAC"}
|
package/dist/lib/video/video.js
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { jsx } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import { createElement } from "react";
|
|
3
2
|
import ReactPlayer from "react-player";
|
|
4
3
|
import { getVideoProps } from "./helpers.js";
|
|
5
4
|
import { createSxInterpolation } from "../../utils/stylesheet.js";
|
|
6
|
-
const Video = ({ ref,
|
|
5
|
+
const Video = ({ ref, ..._props }) => {
|
|
7
6
|
const { sx, ...rest } = getVideoProps(_props);
|
|
8
|
-
|
|
9
|
-
return /* @__PURE__ */ jsx("div", { css, ...containerProps, children: PlayerComponent ? createElement(PlayerComponent, rest) : /* @__PURE__ */ jsx(ReactPlayer, { width: "", height: "", ref, ...rest }) });
|
|
7
|
+
return /* @__PURE__ */ jsx(ReactPlayer, { css: createSxInterpolation(sx), width: "", height: "", ref, ...rest });
|
|
10
8
|
};
|
|
11
9
|
export {
|
|
12
10
|
Video
|
package/dist/style.css
CHANGED
|
@@ -757,23 +757,6 @@
|
|
|
757
757
|
font-weight: 600;
|
|
758
758
|
color: #849095;
|
|
759
759
|
padding: 0.833em;
|
|
760
|
-
}._input_range_1yrkm_1 {
|
|
761
|
-
display: flex;
|
|
762
|
-
align-items: center;
|
|
763
|
-
border-width: 1px;
|
|
764
|
-
border-style: solid;
|
|
765
|
-
border-radius: 0.5rem;
|
|
766
|
-
gap: 0.5rem;
|
|
767
|
-
}
|
|
768
|
-
._input_range_1yrkm_1:has(input:focus) {
|
|
769
|
-
border-color: var(--color-primary-600);
|
|
770
|
-
box-shadow: 0 1px 3px 0 var(--color-primary-300), 0 1px 2px -1px var(--color-primary-300);
|
|
771
|
-
}
|
|
772
|
-
._input_range_1yrkm_1:hover {
|
|
773
|
-
border-color: var(--color-primary-300);
|
|
774
|
-
}._input_number__input_2xvhv_1::-webkit-outer-spin-button, ._input_number__input_2xvhv_1::-webkit-inner-spin-button {
|
|
775
|
-
-webkit-appearance: none;
|
|
776
|
-
margin: 0;
|
|
777
760
|
}._radio_button__container_10dls_1 {
|
|
778
761
|
display: flex;
|
|
779
762
|
width: fit-content;
|
|
@@ -850,6 +833,23 @@
|
|
|
850
833
|
|
|
851
834
|
._radio_button__input_10dls_10:disabled + ._radio_button__checkmark_10dls_21 {
|
|
852
835
|
color: var(--color-neutral-300);
|
|
836
|
+
}._input_range_1yrkm_1 {
|
|
837
|
+
display: flex;
|
|
838
|
+
align-items: center;
|
|
839
|
+
border-width: 1px;
|
|
840
|
+
border-style: solid;
|
|
841
|
+
border-radius: 0.5rem;
|
|
842
|
+
gap: 0.5rem;
|
|
843
|
+
}
|
|
844
|
+
._input_range_1yrkm_1:has(input:focus) {
|
|
845
|
+
border-color: var(--color-primary-600);
|
|
846
|
+
box-shadow: 0 1px 3px 0 var(--color-primary-300), 0 1px 2px -1px var(--color-primary-300);
|
|
847
|
+
}
|
|
848
|
+
._input_range_1yrkm_1:hover {
|
|
849
|
+
border-color: var(--color-primary-300);
|
|
850
|
+
}._input_number__input_2xvhv_1::-webkit-outer-spin-button, ._input_number__input_2xvhv_1::-webkit-inner-spin-button {
|
|
851
|
+
-webkit-appearance: none;
|
|
852
|
+
margin: 0;
|
|
853
853
|
}._switch__container_19zrg_1 {
|
|
854
854
|
display: flex;
|
|
855
855
|
align-items: center;
|
package/package.json
CHANGED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { InputRangeFilterPanelProps } from './types';
|
|
2
|
-
export declare const InputRangeFilterPanel: ({ value, queryParam, placeholder, onChange }: InputRangeFilterPanelProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
3
|
-
//# sourceMappingURL=input-range-filter-panel.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"input-range-filter-panel.d.ts","sourceRoot":"","sources":["../../../src/lib/filter-panel/input-range-filter-panel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AASrD,eAAO,MAAM,qBAAqB,iDAAkD,0BAA0B,qDAuE7G,CAAC"}
|