@shiflo/ui 0.1.6 → 0.1.7
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/components/BottomSheet/BottomSheet.mjs +1 -1
- package/dist/components/Dialog/Dialog.mjs +1 -1
- package/dist/components/TextField/TextField.d.ts +1 -1
- package/dist/components/TextField/TextField.mjs +18 -16
- package/dist/components/TextField/TextField.typing.d.ts +2 -1
- package/package.json +1 -1
|
@@ -10,7 +10,7 @@ const O = n(I.div)`
|
|
|
10
10
|
overflow-y: auto;
|
|
11
11
|
margin: ${({ theme: { spacing: t } }) => t[400]};
|
|
12
12
|
margin-bottom: ${({ theme: { spacing: t } }) => `calc(${t[400]} + var(--safe-area-inset-bottom, 0px))`};
|
|
13
|
-
border-radius: ${({ theme: { radius: t } }) => t[
|
|
13
|
+
border-radius: ${({ theme: { radius: t } }) => t[350]};
|
|
14
14
|
background-color: ${({
|
|
15
15
|
theme: {
|
|
16
16
|
palette: { common: t }
|
|
@@ -10,7 +10,7 @@ const y = u(h.div)`
|
|
|
10
10
|
overflow-y: auto;
|
|
11
11
|
margin: ${({ theme: { spacing: e } }) => e[400]};
|
|
12
12
|
margin-bottom: ${({ theme: { spacing: e } }) => `calc(${e[400]} + var(--safe-area-inset-bottom, 0px))`};
|
|
13
|
-
border-radius: ${({ theme: { radius: e } }) => e[
|
|
13
|
+
border-radius: ${({ theme: { radius: e } }) => e[350]};
|
|
14
14
|
background-color: ${({
|
|
15
15
|
theme: {
|
|
16
16
|
palette: { common: e }
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { TextFieldProps } from './TextField.typing';
|
|
2
|
-
declare function TextField({ variant, size, fullWidth, disabled, startIcon, endIcon, onFocus, onBlur, ...props }: TextFieldProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare function TextField({ variant, size, fullWidth, disabled, startIcon, endIcon, onFocus, onBlur, css, ...props }: TextFieldProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default TextField;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
1
|
+
import { jsxs as p, jsx as a } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { useState as b } from "react";
|
|
3
3
|
import l from "@emotion/styled";
|
|
4
4
|
import { motion as c } from "motion/react";
|
|
5
|
-
const
|
|
5
|
+
const w = l(c.div)`
|
|
6
6
|
display: flex;
|
|
7
7
|
align-items: center;
|
|
8
8
|
gap: ${({ theme: { spacing: e } }) => e[200]};
|
|
@@ -119,7 +119,7 @@ const b = l(c.div)`
|
|
|
119
119
|
color: e[500],
|
|
120
120
|
cursor: "not-allowed"
|
|
121
121
|
} : {}};
|
|
122
|
-
`,
|
|
122
|
+
`, S = l(c.input)`
|
|
123
123
|
flex-grow: 1;
|
|
124
124
|
border: none;
|
|
125
125
|
outline: none;
|
|
@@ -136,18 +136,18 @@ const b = l(c.div)`
|
|
|
136
136
|
&:disabled {
|
|
137
137
|
cursor: not-allowed;
|
|
138
138
|
}
|
|
139
|
-
`,
|
|
139
|
+
`, $ = l.div`
|
|
140
140
|
display: flex;
|
|
141
141
|
align-items: center;
|
|
142
142
|
justify-content: center;
|
|
143
143
|
white-space: nowrap;
|
|
144
|
-
`,
|
|
144
|
+
`, x = l.div`
|
|
145
145
|
display: flex;
|
|
146
146
|
align-items: center;
|
|
147
147
|
justify-content: center;
|
|
148
148
|
white-space: nowrap;
|
|
149
149
|
`;
|
|
150
|
-
function
|
|
150
|
+
function O({
|
|
151
151
|
variant: e = "outlined",
|
|
152
152
|
size: n = "medium",
|
|
153
153
|
fullWidth: o,
|
|
@@ -156,29 +156,31 @@ function H({
|
|
|
156
156
|
endIcon: i,
|
|
157
157
|
onFocus: h,
|
|
158
158
|
onBlur: u,
|
|
159
|
-
|
|
159
|
+
css: f,
|
|
160
|
+
...g
|
|
160
161
|
}) {
|
|
161
|
-
const [
|
|
162
|
-
return /* @__PURE__ */
|
|
163
|
-
|
|
162
|
+
const [m, d] = b(!1);
|
|
163
|
+
return /* @__PURE__ */ p(
|
|
164
|
+
w,
|
|
164
165
|
{
|
|
165
166
|
variant: e,
|
|
166
167
|
size: n,
|
|
167
|
-
focused:
|
|
168
|
+
focused: m,
|
|
168
169
|
fullWidth: o,
|
|
169
170
|
disabled: t,
|
|
171
|
+
css: f,
|
|
170
172
|
children: [
|
|
171
|
-
r && /* @__PURE__ */ a(
|
|
172
|
-
/* @__PURE__ */ a(
|
|
173
|
+
r && /* @__PURE__ */ a($, { children: r }),
|
|
174
|
+
/* @__PURE__ */ a(S, { ...g, onFocus: (s) => {
|
|
173
175
|
d(!0), h?.(s);
|
|
174
176
|
}, onBlur: (s) => {
|
|
175
177
|
d(!1), u?.(s);
|
|
176
178
|
}, disabled: t }),
|
|
177
|
-
i && /* @__PURE__ */ a(
|
|
179
|
+
i && /* @__PURE__ */ a(x, { children: i })
|
|
178
180
|
]
|
|
179
181
|
}
|
|
180
182
|
);
|
|
181
183
|
}
|
|
182
184
|
export {
|
|
183
|
-
|
|
185
|
+
O as default
|
|
184
186
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { UtilityProps } from '../../typings/utility';
|
|
2
3
|
import { HTMLMotionProps } from 'motion/react';
|
|
3
|
-
export interface TextFieldProps extends Omit<HTMLMotionProps<"input">, "size"> {
|
|
4
|
+
export interface TextFieldProps extends Omit<HTMLMotionProps<"input">, "size">, Pick<UtilityProps, "css"> {
|
|
4
5
|
variant?: "contained" | "outlined";
|
|
5
6
|
startIcon?: ReactNode;
|
|
6
7
|
endIcon?: ReactNode;
|