Skip to content

Commit

Permalink
fix: input step 1
Browse files Browse the repository at this point in the history
  • Loading branch information
winchesHe committed Feb 19, 2025
1 parent a0f672d commit 1823e5d
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 48 deletions.
34 changes: 17 additions & 17 deletions packages/core/theme/src/components/input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,8 @@ const input = tv({
inputWrapper: "transition-background motion-reduce:transition-none !duration-150",
label: [
"will-change-auto",
"!duration-200",
"!ease-out",
"duration-200",
"ease-out",
"motion-reduce:transition-none",
"transition-[transform,color,left,opacity]",
],
Expand Down Expand Up @@ -667,7 +667,7 @@ const input = tv({
size: "sm",
class: {
label: [
"group-data-[filled-within=true]:-translate-y-[calc(50%_+_theme(fontSize.tiny)/2_-_8px)]",
"group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-tiny)/2_-_8px)]",
],
},
},
Expand All @@ -677,7 +677,7 @@ const input = tv({
size: "md",
class: {
label: [
"group-data-[filled-within=true]:-translate-y-[calc(50%_+_theme(fontSize.small)/2_-_6px)]",
"group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_6px)]",
],
},
},
Expand All @@ -688,7 +688,7 @@ const input = tv({
class: {
label: [
"text-medium",
"group-data-[filled-within=true]:-translate-y-[calc(50%_+_theme(fontSize.small)/2_-_8px)]",
"group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_8px)]",
],
},
},
Expand All @@ -700,7 +700,7 @@ const input = tv({
size: "sm",
class: {
label: [
"group-data-[filled-within=true]:-translate-y-[calc(50%_+_theme(fontSize.tiny)/2_-_8px_-_theme(borderWidth.medium))]",
"group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-tiny)/2_-_8px_-_var(--heroui-border-width-medium))]",
],
},
},
Expand All @@ -711,7 +711,7 @@ const input = tv({
size: "md",
class: {
label: [
"group-data-[filled-within=true]:-translate-y-[calc(50%_+_theme(fontSize.small)/2_-_6px_-_theme(borderWidth.medium))]",
"group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_6px_-_var(--heroui-border-width-medium))]",
],
},
},
Expand All @@ -723,7 +723,7 @@ const input = tv({
class: {
label: [
"text-medium",
"group-data-[filled-within=true]:-translate-y-[calc(50%_+_theme(fontSize.small)/2_-_8px_-_theme(borderWidth.medium))]",
"group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_8px_-_var(--heroui-border-width-medium))]",
],
},
},
Expand All @@ -735,7 +735,7 @@ const input = tv({
size: "sm",
class: {
label: [
"group-data-[filled-within=true]:-translate-y-[calc(50%_+_theme(fontSize.tiny)/2_-_5px)]",
"group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-tiny)/2_-_5px)]",
],
},
},
Expand All @@ -746,7 +746,7 @@ const input = tv({
size: "md",
class: {
label: [
"group-data-[filled-within=true]:-translate-y-[calc(50%_+_theme(fontSize.small)/2_-_3.5px)]",
"group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_3.5px)]",
],
},
},
Expand All @@ -758,7 +758,7 @@ const input = tv({
class: {
label: [
"text-medium",
"group-data-[filled-within=true]:-translate-y-[calc(50%_+_theme(fontSize.small)/2_-_4px)]",
"group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_4px)]",
],
},
},
Expand All @@ -771,9 +771,9 @@ const input = tv({
label: [
"start-2",
"text-tiny",
"group-data-[filled-within=true]:-translate-y-[calc(100%_+_theme(fontSize.tiny)/2_+_16px)]",
"group-data-[filled-within=true]:-translate-y-[calc(100%_+_var(--heroui-font-size-tiny)/2_+_16px)]",
],
base: "data-[has-label=true]:mt-[calc(theme(fontSize.small)_+_8px)]",
base: "data-[has-label=true]:mt-[calc(theme(--heroui-font-size-small)_+_8px)]",
},
},
{
Expand All @@ -785,9 +785,9 @@ const input = tv({
"start-3",
"end-auto",
"text-small",
"group-data-[filled-within=true]:-translate-y-[calc(100%_+_theme(fontSize.small)/2_+_20px)]",
"group-data-[filled-within=true]:-translate-y-[calc(100%_+_var(--heroui-font-size-small)/2_+_20px)]",
],
base: "data-[has-label=true]:mt-[calc(theme(fontSize.small)_+_10px)]",
base: "data-[has-label=true]:mt-[calc(theme(--heroui-font-size-small)_+_10px)]",
},
},
{
Expand All @@ -799,9 +799,9 @@ const input = tv({
"start-3",
"end-auto",
"text-medium",
"group-data-[filled-within=true]:-translate-y-[calc(100%_+_theme(fontSize.small)/2_+_24px)]",
"group-data-[filled-within=true]:-translate-y-[calc(100%_+_var(--heroui-font-size-small)/2_+_24px)]",
],
base: "data-[has-label=true]:mt-[calc(theme(fontSize.small)_+_12px)]",
base: "data-[has-label=true]:mt-[calc(theme(--heroui-font-size-small)_+_12px)]",
},
},
// outside-left & size & hasHelper
Expand Down
30 changes: 15 additions & 15 deletions packages/core/theme/src/components/number-input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ const numberInput = tv({
size: "sm",
class: {
label: [
"group-data-[filled-within=true]:-translate-y-[calc(50%_+_theme(fontSize.tiny)/2_-_8px)]",
"group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(fontSize.tiny)/2_-_8px)]",
],
},
},
Expand All @@ -665,7 +665,7 @@ const numberInput = tv({
size: "md",
class: {
label: [
"group-data-[filled-within=true]:-translate-y-[calc(50%_+_theme(fontSize.small)/2_-_6px)]",
"group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_6px)]",
],
},
},
Expand All @@ -675,7 +675,7 @@ const numberInput = tv({
class: {
label: [
"text-medium",
"group-data-[filled-within=true]:-translate-y-[calc(50%_+_theme(fontSize.small)/2_-_8px)]",
"group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_8px)]",
],
},
},
Expand Down Expand Up @@ -717,7 +717,7 @@ const numberInput = tv({
size: "sm",
class: {
label: [
"group-data-[filled-within=true]:-translate-y-[calc(50%_+_theme(fontSize.tiny)/2_-_8px_-_theme(borderWidth.medium))]",
"group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(fontSize.tiny)/2_-_8px_-_var(borderWidth.medium))]",
],
},
},
Expand All @@ -728,7 +728,7 @@ const numberInput = tv({
size: "md",
class: {
label: [
"group-data-[filled-within=true]:-translate-y-[calc(50%_+_theme(fontSize.small)/2_-_6px_-_theme(borderWidth.medium))]",
"group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_6px_-_var(borderWidth.medium))]",
],
},
},
Expand All @@ -739,7 +739,7 @@ const numberInput = tv({
class: {
label: [
"text-medium",
"group-data-[filled-within=true]:-translate-y-[calc(50%_+_theme(fontSize.small)/2_-_8px_-_theme(borderWidth.medium))]",
"group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_8px_-_var(borderWidth.medium))]",
],
},
},
Expand All @@ -750,7 +750,7 @@ const numberInput = tv({
size: "sm",
class: {
label: [
"group-data-[filled-within=true]:-translate-y-[calc(50%_+_theme(fontSize.tiny)/2_-_5px)]",
"group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(fontSize.tiny)/2_-_5px)]",
],
},
},
Expand All @@ -760,7 +760,7 @@ const numberInput = tv({
size: "md",
class: {
label: [
"group-data-[filled-within=true]:-translate-y-[calc(50%_+_theme(fontSize.small)/2_-_3.5px)]",
"group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_3.5px)]",
],
},
},
Expand All @@ -771,7 +771,7 @@ const numberInput = tv({
class: {
label: [
"text-medium",
"group-data-[filled-within=true]:-translate-y-[calc(50%_+_theme(fontSize.small)/2_-_4px)]",
"group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_4px)]",
],
},
},
Expand All @@ -783,9 +783,9 @@ const numberInput = tv({
label: [
"start-2",
"text-tiny",
"group-data-[filled-within=true]:-translate-y-[calc(100%_+_theme(fontSize.tiny)/2_+_16px)]",
"group-data-[filled-within=true]:-translate-y-[calc(100%_+_var(fontSize.tiny)/2_+_16px)]",
],
base: "data-[has-label=true]:mt-[calc(theme(fontSize.small)_+_8px)]",
base: "data-[has-label=true]:mt-[calc(theme(--heroui-font-size-small)_+_8px)]",
},
},
{
Expand All @@ -796,9 +796,9 @@ const numberInput = tv({
"start-3",
"end-auto",
"text-small",
"group-data-[filled-within=true]:-translate-y-[calc(100%_+_theme(fontSize.small)/2_+_20px)]",
"group-data-[filled-within=true]:-translate-y-[calc(100%_+_var(--heroui-font-size-small)/2_+_20px)]",
],
base: "data-[has-label=true]:mt-[calc(theme(fontSize.small)_+_10px)]",
base: "data-[has-label=true]:mt-[calc(theme(--heroui-font-size-small)_+_10px)]",
},
},
{
Expand All @@ -809,9 +809,9 @@ const numberInput = tv({
"start-3",
"end-auto",
"text-medium",
"group-data-[filled-within=true]:-translate-y-[calc(100%_+_theme(fontSize.small)/2_+_24px)]",
"group-data-[filled-within=true]:-translate-y-[calc(100%_+_var(--heroui-font-size-small)/2_+_24px)]",
],
base: "data-[has-label=true]:mt-[calc(theme(fontSize.small)_+_12px)]",
base: "data-[has-label=true]:mt-[calc(theme(--heroui-font-size-small)_+_12px)]",
stepperButton: "min-4 w-4 h-4",
},
},
Expand Down
32 changes: 16 additions & 16 deletions packages/core/theme/src/components/select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const select = tv({
trigger:
"relative px-3 gap-3 w-full inline-flex flex-row items-center shadow-xs outline-hidden tap-highlight-transparent",
innerWrapper:
"inline-flex h-fit w-[calc(100%_-_theme(spacing.6))] min-h-4 items-center gap-1.5 box-border",
"inline-flex h-fit w-[calc(100%_-_var(spacing.6))] min-h-4 items-center gap-1.5 box-border",
selectorIcon: "absolute end-3 w-4 h-4",
spinner: "absolute end-3",
value: ["text-foreground-500", "font-normal", "w-full", "text-start"],
Expand Down Expand Up @@ -584,7 +584,7 @@ const select = tv({
isMultiline: false,
size: "sm",
class: {
label: ["group-data-[filled=true]:-translate-y-[calc(50%_+_theme(fontSize.tiny)/2_-_8px)]"],
label: ["group-data-[filled=true]:-translate-y-[calc(50%_+_var(fontSize.tiny)/2_-_8px)]"],
innerWrapper: "group-data-[has-label=true]:pt-4",
},
},
Expand All @@ -594,7 +594,7 @@ const select = tv({
size: "md",
class: {
label: [
"group-data-[filled=true]:-translate-y-[calc(50%_+_theme(fontSize.small)/2_-_6px)]",
"group-data-[filled=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_6px)]",
],
innerWrapper: "group-data-[has-label=true]:pt-4",
},
Expand All @@ -606,7 +606,7 @@ const select = tv({
class: {
label: [
"text-medium",
"group-data-[filled=true]:-translate-y-[calc(50%_+_theme(fontSize.small)/2_-_8px)]",
"group-data-[filled=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_8px)]",
],
innerWrapper: "group-data-[has-label=true]:pt-5",
},
Expand All @@ -619,7 +619,7 @@ const select = tv({
size: "sm",
class: {
label: [
"group-data-[filled=true]:-translate-y-[calc(50%_+_theme(fontSize.tiny)/2_-_8px_-_theme(borderWidth.medium))]",
"group-data-[filled=true]:-translate-y-[calc(50%_+_var(fontSize.tiny)/2_-_8px_-_var(borderWidth.medium))]",
],
},
},
Expand All @@ -630,7 +630,7 @@ const select = tv({
size: "md",
class: {
label: [
"group-data-[filled=true]:-translate-y-[calc(50%_+_theme(fontSize.small)/2_-_6px_-_theme(borderWidth.medium))]",
"group-data-[filled=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_6px_-_var(borderWidth.medium))]",
],
},
},
Expand All @@ -642,7 +642,7 @@ const select = tv({
class: {
label: [
"text-medium",
"group-data-[filled=true]:-translate-y-[calc(50%_+_theme(fontSize.small)/2_-_8px_-_theme(borderWidth.medium))]",
"group-data-[filled=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_8px_-_var(borderWidth.medium))]",
],
},
},
Expand All @@ -653,7 +653,7 @@ const select = tv({
isMultiline: false,
size: "sm",
class: {
label: ["group-data-[filled=true]:-translate-y-[calc(50%_+_theme(fontSize.tiny)/2_-_5px)]"],
label: ["group-data-[filled=true]:-translate-y-[calc(50%_+_var(fontSize.tiny)/2_-_5px)]"],
},
},
{
Expand All @@ -663,7 +663,7 @@ const select = tv({
size: "md",
class: {
label: [
"group-data-[filled=true]:-translate-y-[calc(50%_+_theme(fontSize.small)/2_-_3.5px)]",
"group-data-[filled=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_3.5px)]",
],
},
},
Expand All @@ -675,7 +675,7 @@ const select = tv({
class: {
label: [
"text-medium",
"group-data-[filled=true]:-translate-y-[calc(50%_+_theme(fontSize.small)/2_-_4px)]",
"group-data-[filled=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_4px)]",
],
},
},
Expand All @@ -688,9 +688,9 @@ const select = tv({
label: [
"start-2",
"text-tiny",
"group-data-[filled=true]:-translate-y-[calc(100%_+_theme(fontSize.tiny)/2_+_16px)]",
"group-data-[filled=true]:-translate-y-[calc(100%_+_var(fontSize.tiny)/2_+_16px)]",
],
base: "data-[has-label=true]:mt-[calc(theme(fontSize.small)_+_8px)]",
base: "data-[has-label=true]:mt-[calc(var(--heroui-font-size-small)_+_8px)]",
},
},
{
Expand All @@ -701,9 +701,9 @@ const select = tv({
label: [
"start-3",
"text-small",
"group-data-[filled=true]:-translate-y-[calc(100%_+_theme(fontSize.small)/2_+_20px)]",
"group-data-[filled=true]:-translate-y-[calc(100%_+_var(--heroui-font-size-small)/2_+_20px)]",
],
base: "data-[has-label=true]:mt-[calc(theme(fontSize.small)_+_10px)]",
base: "data-[has-label=true]:mt-[calc(var(--heroui-font-size-small)_+_10px)]",
},
},
{
Expand All @@ -714,9 +714,9 @@ const select = tv({
label: [
"start-3",
"text-medium",
"group-data-[filled=true]:-translate-y-[calc(100%_+_theme(fontSize.small)/2_+_24px)]",
"group-data-[filled=true]:-translate-y-[calc(100%_+_var(--heroui-font-size-small)/2_+_24px)]",
],
base: "data-[has-label=true]:mt-[calc(theme(fontSize.small)_+_12px)]",
base: "data-[has-label=true]:mt-[calc(var(--heroui-font-size-small)_+_12px)]",
},
},
// outside-left & size & hasHelper
Expand Down

0 comments on commit 1823e5d

Please sign in to comment.