tembro 2.1.8 → 2.1.9
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/form/form-date-range-input.cjs +1 -1
- package/dist/components/form/form-date-range-input.d.ts +1 -1
- package/dist/components/form/form-date-range-input.js +1 -1
- package/dist/components/form/form-input.cjs +1 -1
- package/dist/components/form/form-input.d.ts +7 -7
- package/dist/components/form/form-input.js +11 -11
- package/dist/components/inputs/index.cjs +1 -1
- package/dist/components/inputs/index.d.ts +0 -14
- package/dist/components/inputs/index.js +9 -23
- package/dist/components/inputs/public.cjs +1 -1
- package/dist/components/inputs/public.d.ts +0 -14
- package/dist/components/inputs/public.js +9 -23
- package/dist/components/ui/input/chrome.cjs +1 -0
- package/dist/components/{inputs/input-chrome.js → ui/input/chrome.js} +2 -2
- package/dist/components/ui/input/clearable.cjs +1 -0
- package/dist/components/{inputs/clearable-input.d.ts → ui/input/clearable.d.ts} +1 -1
- package/dist/components/{inputs/clearable-input.js → ui/input/clearable.js} +4 -4
- package/dist/components/{inputs/date-range-input.cjs → ui/input/date-range.cjs} +1 -1
- package/dist/components/{inputs/date-range-input.d.ts → ui/input/date-range.d.ts} +1 -1
- package/dist/components/{inputs/date-range-input.js → ui/input/date-range.js} +3 -3
- package/dist/components/ui/input/date.cjs +1 -0
- package/dist/components/{inputs/date-input.d.ts → ui/input/date.d.ts} +1 -1
- package/dist/components/{inputs/date-input.js → ui/input/date.js} +3 -3
- package/dist/components/ui/input/decorator.cjs +1 -0
- package/dist/components/{inputs/input-decorator.js → ui/input/decorator.js} +3 -3
- package/dist/components/ui/input/index.cjs +1 -1
- package/dist/components/ui/input/index.d.ts +10 -10
- package/dist/components/ui/input/index.js +13 -13
- package/dist/components/ui/input/masked.cjs +1 -0
- package/dist/components/{inputs/masked-input.d.ts → ui/input/masked.d.ts} +1 -1
- package/dist/components/{inputs/masked-input.js → ui/input/masked.js} +3 -3
- package/dist/components/ui/input/money.cjs +1 -0
- package/dist/components/{inputs/money-input.js → ui/input/money.js} +5 -5
- package/dist/components/ui/input/number.cjs +1 -0
- package/dist/components/{inputs/number-input.d.ts → ui/input/number.d.ts} +1 -1
- package/dist/components/{inputs/number-input.js → ui/input/number.js} +3 -3
- package/dist/components/{inputs → ui/input}/numeric-value.js +1 -1
- package/dist/components/ui/input/password.cjs +1 -0
- package/dist/components/{inputs/password-input.d.ts → ui/input/password.d.ts} +1 -1
- package/dist/components/{inputs/password-input.js → ui/input/password.js} +2 -2
- package/dist/components/ui/input/phone.cjs +1 -0
- package/dist/components/{inputs/phone-input.d.ts → ui/input/phone.d.ts} +1 -1
- package/dist/components/{inputs/phone-input.js → ui/input/phone.js} +2 -2
- package/dist/components/ui/input/quantity.cjs +1 -0
- package/dist/components/{inputs/quantity-input.js → ui/input/quantity.js} +6 -6
- package/dist/components/ui/input/search.cjs +1 -0
- package/dist/components/{inputs/search-input.d.ts → ui/input/search.d.ts} +1 -1
- package/dist/components/{inputs/search-input.js → ui/input/search.js} +2 -2
- package/dist/components/{inputs/input-value.js → ui/input/value.js} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +124 -138
- package/dist/public-component-surface.cjs +1 -1
- package/dist/public-component-surface.js +0 -5
- package/dist/showcase/fallback.cjs +3 -3
- package/dist/showcase/fallback.js +119 -118
- package/dist/showcase/premium/combobox/mock.cjs +4 -3
- package/dist/showcase/premium/combobox/mock.js +2 -2
- package/dist/showcase/premium/combobox/showcase.cjs +1 -1
- package/dist/showcase/premium/combobox/showcase.js +2 -2
- package/dist/showcase/premium/date-input/mock.cjs +4 -3
- package/dist/showcase/premium/date-input/mock.js +2 -2
- package/dist/showcase/premium/date-input/showcase.cjs +1 -1
- package/dist/showcase/premium/date-input/showcase.js +2 -1
- package/dist/showcase/premium/date-range-input/mock.cjs +4 -3
- package/dist/showcase/premium/date-range-input/mock.js +2 -2
- package/dist/showcase/premium/date-range-input/showcase.cjs +1 -1
- package/dist/showcase/premium/date-range-input/showcase.js +2 -1
- package/dist/showcase/premium/masked-input/mock.cjs +4 -3
- package/dist/showcase/premium/masked-input/mock.js +2 -2
- package/dist/showcase/premium/masked-input/showcase.cjs +1 -1
- package/dist/showcase/premium/masked-input/showcase.js +2 -1
- package/dist/showcase/premium/money-input/mock.cjs +4 -3
- package/dist/showcase/premium/money-input/mock.js +2 -2
- package/dist/showcase/premium/money-input/showcase.cjs +1 -1
- package/dist/showcase/premium/money-input/showcase.js +2 -1
- package/dist/showcase/premium/number-input/mock.cjs +5 -7
- package/dist/showcase/premium/number-input/mock.js +2 -2
- package/dist/showcase/premium/number-input/showcase.cjs +1 -1
- package/dist/showcase/premium/number-input/showcase.js +2 -1
- package/dist/showcase/premium/password-input/mock.cjs +3 -2
- package/dist/showcase/premium/password-input/mock.js +1 -1
- package/dist/showcase/premium/password-input/showcase.cjs +1 -1
- package/dist/showcase/premium/password-input/showcase.js +2 -1
- package/dist/showcase/premium/phone-input/mock.cjs +5 -4
- package/dist/showcase/premium/phone-input/mock.js +2 -2
- package/dist/showcase/premium/phone-input/showcase.cjs +1 -1
- package/dist/showcase/premium/phone-input/showcase.js +2 -1
- package/dist/showcase/premium/quantity-input/mock.cjs +4 -3
- package/dist/showcase/premium/quantity-input/mock.js +2 -2
- package/dist/showcase/premium/quantity-input/showcase.cjs +1 -1
- package/dist/showcase/premium/quantity-input/showcase.js +2 -1
- package/dist/showcase/premium/search-input/mock.cjs +3 -2
- package/dist/showcase/premium/search-input/mock.js +1 -1
- package/dist/showcase/premium/search-input/showcase.cjs +1 -1
- package/dist/showcase/premium/search-input/showcase.js +2 -1
- package/dist/showcase/premium/simple-select/mock.cjs +3 -3
- package/dist/showcase/premium/simple-select/mock.js +2 -2
- package/dist/showcase/premium/simple-select/showcase.cjs +1 -1
- package/dist/showcase/premium/simple-select/showcase.js +1 -1
- package/dist/showcase/registry-specific.cjs +1 -1
- package/dist/showcase/registry-specific.js +92 -92
- package/dist/showcase/render-registry-preview.cjs +1 -1
- package/dist/showcase/render-registry-preview.js +214 -215
- package/dist/showcase/tembro-registry.json.cjs +1 -1
- package/dist/showcase/tembro-registry.json.js +2 -3
- package/package.json +1 -1
- package/packages/cli/dist/index.cjs +18 -18
- package/packages/cli/vendor/src/components/form/form-date-range-input.tsx +5 -5
- package/packages/cli/vendor/src/components/form/form-input.tsx +7 -7
- package/packages/cli/vendor/src/components/inputs/index.ts +0 -14
- package/packages/cli/vendor/src/components/inputs/public.ts +0 -19
- package/packages/cli/vendor/src/components/{inputs/clearable-input.tsx → ui/input/clearable.tsx} +2 -2
- package/packages/cli/vendor/src/components/{inputs/date-range-input.tsx → ui/input/date-range.tsx} +1 -1
- package/packages/cli/vendor/src/components/{inputs/date-input.tsx → ui/input/date.tsx} +2 -2
- package/packages/cli/vendor/src/components/ui/input/index.tsx +11 -11
- package/packages/cli/vendor/src/components/{inputs/masked-input.tsx → ui/input/masked.tsx} +2 -2
- package/packages/cli/vendor/src/components/{inputs/money-input.tsx → ui/input/money.tsx} +3 -3
- package/packages/cli/vendor/src/components/{inputs/number-input.tsx → ui/input/number.tsx} +3 -3
- package/packages/cli/vendor/src/components/{inputs/password-input.tsx → ui/input/password.tsx} +1 -1
- package/packages/cli/vendor/src/components/{inputs/phone-input.tsx → ui/input/phone.tsx} +1 -1
- package/packages/cli/vendor/src/components/{inputs/quantity-input.tsx → ui/input/quantity.tsx} +3 -3
- package/packages/cli/vendor/src/components/{inputs/search-input.tsx → ui/input/search.tsx} +1 -1
- package/packages/cli/vendor/src/public-component-surface.ts +0 -1
- package/packages/cli/vendor/src/showcase/fallback.tsx +4 -6
- package/packages/cli/vendor/src/showcase/premium/combobox/mock.ts +4 -3
- package/packages/cli/vendor/src/showcase/premium/combobox/showcase.tsx +3 -3
- package/packages/cli/vendor/src/showcase/premium/date-input/mock.ts +4 -3
- package/packages/cli/vendor/src/showcase/premium/date-input/showcase.tsx +3 -2
- package/packages/cli/vendor/src/showcase/premium/date-range-input/mock.ts +4 -3
- package/packages/cli/vendor/src/showcase/premium/date-range-input/showcase.tsx +3 -2
- package/packages/cli/vendor/src/showcase/premium/masked-input/mock.ts +4 -3
- package/packages/cli/vendor/src/showcase/premium/masked-input/showcase.tsx +3 -2
- package/packages/cli/vendor/src/showcase/premium/money-input/mock.ts +4 -3
- package/packages/cli/vendor/src/showcase/premium/money-input/showcase.tsx +3 -2
- package/packages/cli/vendor/src/showcase/premium/number-input/mock.ts +5 -7
- package/packages/cli/vendor/src/showcase/premium/number-input/showcase.tsx +2 -2
- package/packages/cli/vendor/src/showcase/premium/password-input/mock.ts +3 -2
- package/packages/cli/vendor/src/showcase/premium/password-input/showcase.tsx +3 -2
- package/packages/cli/vendor/src/showcase/premium/phone-input/mock.ts +5 -4
- package/packages/cli/vendor/src/showcase/premium/phone-input/showcase.tsx +4 -3
- package/packages/cli/vendor/src/showcase/premium/quantity-input/mock.ts +4 -3
- package/packages/cli/vendor/src/showcase/premium/quantity-input/showcase.tsx +3 -2
- package/packages/cli/vendor/src/showcase/premium/search-input/mock.ts +3 -2
- package/packages/cli/vendor/src/showcase/premium/search-input/showcase.tsx +3 -2
- package/packages/cli/vendor/src/showcase/premium/simple-select/mock.ts +3 -3
- package/packages/cli/vendor/src/showcase/premium/simple-select/showcase.tsx +3 -3
- package/packages/cli/vendor/src/showcase/registry-specific.tsx +1 -2
- package/packages/cli/vendor/src/showcase/render-registry-preview.tsx +2 -4
- package/packages/cli/vendor/src/showcase/tembro-registry.json +1 -3
- package/registry.json +1 -3
- package/dist/components/inputs/clearable-input.cjs +0 -1
- package/dist/components/inputs/color-input.cjs +0 -1
- package/dist/components/inputs/color-input.d.ts +0 -11
- package/dist/components/inputs/color-input.js +0 -42
- package/dist/components/inputs/combobox.cjs +0 -1
- package/dist/components/inputs/combobox.d.ts +0 -29
- package/dist/components/inputs/combobox.js +0 -113
- package/dist/components/inputs/date-input.cjs +0 -1
- package/dist/components/inputs/input-chrome.cjs +0 -1
- package/dist/components/inputs/input-decorator.cjs +0 -1
- package/dist/components/inputs/masked-input.cjs +0 -1
- package/dist/components/inputs/money-input.cjs +0 -1
- package/dist/components/inputs/number-input.cjs +0 -1
- package/dist/components/inputs/password-input.cjs +0 -1
- package/dist/components/inputs/phone-input.cjs +0 -1
- package/dist/components/inputs/quantity-input.cjs +0 -1
- package/dist/components/inputs/quantity-stepper.cjs +0 -1
- package/dist/components/inputs/quantity-stepper.d.ts +0 -12
- package/dist/components/inputs/quantity-stepper.js +0 -52
- package/dist/components/inputs/search-input.cjs +0 -1
- package/dist/components/inputs/simple-select.cjs +0 -1
- package/dist/components/inputs/simple-select.d.ts +0 -13
- package/dist/components/inputs/simple-select.js +0 -8
- package/packages/cli/vendor/src/components/inputs/color-input.tsx +0 -49
- package/packages/cli/vendor/src/components/inputs/combobox.tsx +0 -180
- package/packages/cli/vendor/src/components/inputs/quantity-stepper.tsx +0 -51
- package/packages/cli/vendor/src/components/inputs/simple-select.tsx +0 -23
- /package/dist/components/{inputs/input-chrome.d.ts → ui/input/chrome.d.ts} +0 -0
- /package/dist/components/{inputs/input-decorator.d.ts → ui/input/decorator.d.ts} +0 -0
- /package/dist/components/{inputs/money-input.d.ts → ui/input/money.d.ts} +0 -0
- /package/dist/components/{inputs → ui/input}/numeric-value.cjs +0 -0
- /package/dist/components/{inputs → ui/input}/numeric-value.d.ts +0 -0
- /package/dist/components/{inputs/quantity-input.d.ts → ui/input/quantity.d.ts} +0 -0
- /package/dist/components/{inputs/input-value.cjs → ui/input/value.cjs} +0 -0
- /package/dist/components/{inputs/input-value.d.ts → ui/input/value.d.ts} +0 -0
- /package/packages/cli/vendor/src/components/{inputs/input-chrome.tsx → ui/input/chrome.tsx} +0 -0
- /package/packages/cli/vendor/src/components/{inputs/input-decorator.tsx → ui/input/decorator.tsx} +0 -0
- /package/packages/cli/vendor/src/components/{inputs → ui/input}/numeric-value.ts +0 -0
- /package/packages/cli/vendor/src/components/{inputs/input-value.ts → ui/input/value.ts} +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Controller, type Control, type FieldPath, type FieldValues } from "react-hook-form"
|
|
2
2
|
|
|
3
3
|
import { FormFieldShell, type FormFieldShellProps } from "@/components/form/form-field-shell"
|
|
4
|
-
import {
|
|
5
|
-
DateRangeInput,
|
|
6
|
-
type DateRangeInputProps,
|
|
7
|
-
type DateRangeValue,
|
|
8
|
-
} from "@/components/
|
|
4
|
+
import {
|
|
5
|
+
DateRangeInput,
|
|
6
|
+
type DateRangeInputProps,
|
|
7
|
+
type DateRangeValue,
|
|
8
|
+
} from "@/components/ui/input/date-range"
|
|
9
9
|
|
|
10
10
|
export type FormDateRangeInputProps<
|
|
11
11
|
TFieldValues extends FieldValues = FieldValues,
|
|
@@ -6,18 +6,18 @@ import {
|
|
|
6
6
|
DateRangeInput,
|
|
7
7
|
type DateRangeInputProps,
|
|
8
8
|
type DateRangeValue,
|
|
9
|
-
} from "@/components/
|
|
10
|
-
import { DateInput, type DateInputProps } from "@/components/
|
|
9
|
+
} from "@/components/ui/input/date-range"
|
|
10
|
+
import { DateInput, type DateInputProps } from "@/components/ui/input/date"
|
|
11
11
|
import { Input, type InputClearableProps, type InputSearchProps, type InputTextProps } from "@/components/ui/input"
|
|
12
|
-
import { MaskedInput, type MaskedInputProps } from "@/components/
|
|
13
|
-
import { MoneyInput, type MoneyInputProps } from "@/components/
|
|
14
|
-
import { NumberInput, type NumberInputProps } from "@/components/
|
|
12
|
+
import { MaskedInput, type MaskedInputProps } from "@/components/ui/input/masked"
|
|
13
|
+
import { MoneyInput, type MoneyInputProps } from "@/components/ui/input/money"
|
|
14
|
+
import { NumberInput, type NumberInputProps } from "@/components/ui/input/number"
|
|
15
15
|
import {
|
|
16
16
|
PhoneInput,
|
|
17
17
|
formatPhoneDigits,
|
|
18
18
|
type PhoneInputProps,
|
|
19
|
-
} from "@/components/
|
|
20
|
-
import { QuantityInput, type QuantityInputProps } from "@/components/
|
|
19
|
+
} from "@/components/ui/input/phone"
|
|
20
|
+
import { QuantityInput, type QuantityInputProps } from "@/components/ui/input/quantity"
|
|
21
21
|
import {
|
|
22
22
|
FormFieldShell,
|
|
23
23
|
type FormFieldShellControlProps,
|
|
@@ -1,20 +1,6 @@
|
|
|
1
1
|
export * from "./async-select"
|
|
2
|
-
export * from "./clearable-input"
|
|
3
|
-
export * from "./combobox"
|
|
4
|
-
export * from "./color-input"
|
|
5
|
-
export * from "./date-input"
|
|
6
|
-
export * from "./date-range-input"
|
|
7
|
-
export * from "./masked-input"
|
|
8
|
-
export * from "./money-input"
|
|
9
|
-
export * from "./number-input"
|
|
10
2
|
export * from "./otp-input"
|
|
11
|
-
export * from "./password-input"
|
|
12
|
-
export * from "./phone-input"
|
|
13
|
-
export * from "./quantity-input"
|
|
14
|
-
export * from "./quantity-stepper"
|
|
15
3
|
export * from "./rating"
|
|
16
|
-
export * from "./search-input"
|
|
17
|
-
export * from "./simple-select"
|
|
18
4
|
export * from "./json-input"
|
|
19
5
|
export * from "./time-picker"
|
|
20
6
|
export * from "./slider"
|
|
@@ -1,27 +1,8 @@
|
|
|
1
|
-
// Select-family members
|
|
2
1
|
export * from "./async-select"
|
|
3
|
-
export * from "./combobox"
|
|
4
|
-
export * from "./simple-select"
|
|
5
|
-
|
|
6
|
-
// Input-family members
|
|
7
|
-
export * from "./clearable-input"
|
|
8
|
-
export * from "./color-input"
|
|
9
|
-
export * from "./date-input"
|
|
10
|
-
export * from "./date-range-input"
|
|
11
|
-
export * from "./masked-input"
|
|
12
|
-
export * from "./money-input"
|
|
13
|
-
export * from "./number-input"
|
|
14
2
|
export * from "./otp-input"
|
|
15
|
-
export * from "./password-input"
|
|
16
|
-
export * from "./phone-input"
|
|
17
|
-
export * from "./quantity-input"
|
|
18
|
-
export * from "./quantity-stepper"
|
|
19
3
|
export * from "./rating"
|
|
20
|
-
export * from "./search-input"
|
|
21
4
|
export * from "./slider"
|
|
22
5
|
export * from "./tag-input"
|
|
23
6
|
export * from "./inline-editable"
|
|
24
|
-
|
|
25
|
-
// Advanced / modern inputs
|
|
26
7
|
export * from "./json-input"
|
|
27
8
|
export * from "./time-picker"
|
package/packages/cli/vendor/src/components/{inputs/clearable-input.tsx → ui/input/clearable.tsx}
RENAMED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import * as React from "react"
|
|
4
4
|
import { XIcon } from "lucide-react"
|
|
5
5
|
|
|
6
|
-
import { InputDecorator } from "
|
|
7
|
-
import { createInputChangeHandler, getInputValue } from "
|
|
6
|
+
import { InputDecorator } from "./decorator"
|
|
7
|
+
import { createInputChangeHandler, getInputValue } from "./value"
|
|
8
8
|
import { stopInteractivePropagation } from "@/lib/utils"
|
|
9
9
|
|
|
10
10
|
export type ClearableInputProps = Omit<
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from "react"
|
|
2
2
|
import { CalendarDaysIcon } from "lucide-react"
|
|
3
3
|
|
|
4
|
-
import { InputDecorator } from "
|
|
5
|
-
import { createInputChangeHandler, getInputValue } from "
|
|
4
|
+
import { InputDecorator } from "./decorator"
|
|
5
|
+
import { createInputChangeHandler, getInputValue } from "./value"
|
|
6
6
|
|
|
7
7
|
export type DateInputProps = Omit<
|
|
8
8
|
React.ComponentProps<typeof InputDecorator>,
|
|
@@ -11,17 +11,17 @@ import {
|
|
|
11
11
|
InputGroupText,
|
|
12
12
|
InputGroupTextarea,
|
|
13
13
|
} from "./group"
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import { NumberInput, type NumberInputProps } from "
|
|
21
|
-
import { PasswordInput, type PasswordInputProps } from "
|
|
22
|
-
import { PhoneInput, type PhoneInputProps } from "
|
|
23
|
-
import { QuantityInput, type QuantityInputProps } from "
|
|
24
|
-
import { SearchInput, type SearchInputProps } from "
|
|
14
|
+
import { ClearableInput, type ClearableInputProps } from "./clearable"
|
|
15
|
+
import { DateInput, type DateInputProps } from "./date"
|
|
16
|
+
import { DateRangeInput, type DateRangeInputProps } from "./date-range"
|
|
17
|
+
import { InputDecorator } from "./decorator"
|
|
18
|
+
import { MaskedInput, type MaskedInputProps } from "./masked"
|
|
19
|
+
import { MoneyInput, type MoneyInputProps } from "./money"
|
|
20
|
+
import { NumberInput, type NumberInputProps } from "./number"
|
|
21
|
+
import { PasswordInput, type PasswordInputProps } from "./password"
|
|
22
|
+
import { PhoneInput, type PhoneInputProps } from "./phone"
|
|
23
|
+
import { QuantityInput, type QuantityInputProps } from "./quantity"
|
|
24
|
+
import { SearchInput, type SearchInputProps } from "./search"
|
|
25
25
|
import { cn } from "@/lib/utils"
|
|
26
26
|
|
|
27
27
|
export type InputKind =
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react"
|
|
2
2
|
|
|
3
|
-
import { InputDecorator } from "
|
|
4
|
-
import { getInputValue, setInputElementValue } from "
|
|
3
|
+
import { InputDecorator } from "./decorator"
|
|
4
|
+
import { getInputValue, setInputElementValue } from "./value"
|
|
5
5
|
|
|
6
6
|
export type MaskedInputProps = Omit<
|
|
7
7
|
React.ComponentProps<typeof InputDecorator>,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from "react"
|
|
2
2
|
|
|
3
|
-
import { InputChrome } from "
|
|
4
|
-
import { getInputValue } from "
|
|
5
|
-
import { parseMoneyLikeInput } from "
|
|
3
|
+
import { InputChrome } from "./chrome"
|
|
4
|
+
import { getInputValue } from "./value"
|
|
5
|
+
import { parseMoneyLikeInput } from "./numeric-value"
|
|
6
6
|
import { InputPrimitive } from "@/components/ui/input-primitive"
|
|
7
7
|
import { cn } from "@/lib/utils"
|
|
8
8
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from "react"
|
|
2
2
|
|
|
3
|
-
import { InputDecorator } from "
|
|
4
|
-
import { getInputValue } from "
|
|
5
|
-
import { clampNumericValue, parseDecimalInput } from "
|
|
3
|
+
import { InputDecorator } from "./decorator"
|
|
4
|
+
import { getInputValue } from "./value"
|
|
5
|
+
import { clampNumericValue, parseDecimalInput } from "./numeric-value"
|
|
6
6
|
|
|
7
7
|
export type NumberInputProps = Omit<
|
|
8
8
|
React.ComponentProps<typeof InputDecorator>,
|
package/packages/cli/vendor/src/components/{inputs/password-input.tsx → ui/input/password.tsx}
RENAMED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import * as React from "react"
|
|
4
4
|
import { EyeIcon, EyeOffIcon } from "lucide-react"
|
|
5
5
|
|
|
6
|
-
import { InputDecorator } from "
|
|
6
|
+
import { InputDecorator } from "./decorator"
|
|
7
7
|
|
|
8
8
|
export type PasswordInputProps = Omit<
|
|
9
9
|
React.ComponentProps<typeof InputDecorator>,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react"
|
|
2
2
|
import { PhoneIcon } from "lucide-react"
|
|
3
3
|
|
|
4
|
-
import { MaskedInput, type MaskedInputProps } from "
|
|
4
|
+
import { MaskedInput, type MaskedInputProps } from "./masked"
|
|
5
5
|
|
|
6
6
|
export type PhoneInputProps = Omit<MaskedInputProps, "mask" | "unmask" | "inputMode"> & {
|
|
7
7
|
countryCode?: string
|
package/packages/cli/vendor/src/components/{inputs/quantity-input.tsx → ui/input/quantity.tsx}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from "react"
|
|
2
2
|
import { MinusIcon, PlusIcon } from "lucide-react"
|
|
3
3
|
|
|
4
|
-
import { InputChrome } from "
|
|
5
|
-
import { getInputValue } from "
|
|
6
|
-
import { clampNumericValue, parseDecimalInput } from "
|
|
4
|
+
import { InputChrome } from "./chrome"
|
|
5
|
+
import { getInputValue } from "./value"
|
|
6
|
+
import { clampNumericValue, parseDecimalInput } from "./numeric-value"
|
|
7
7
|
import { Button } from "@/components/ui/button"
|
|
8
8
|
import { InputPrimitive } from "@/components/ui/input-primitive"
|
|
9
9
|
import { cn } from "@/lib/utils"
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import * as React from "react"
|
|
4
4
|
import { LoaderCircleIcon, SearchIcon } from "lucide-react"
|
|
5
5
|
|
|
6
|
-
import { ClearableInput, type ClearableInputProps } from "
|
|
6
|
+
import { ClearableInput, type ClearableInputProps } from "./clearable"
|
|
7
7
|
|
|
8
8
|
export type SearchInputProps = Omit<ClearableInputProps, "leadingIcon" | "type" | "onValueChange"> & {
|
|
9
9
|
searchIcon?: React.ReactNode
|
|
@@ -30,7 +30,6 @@ export const standalonePublicComponentSurfaces: readonly PublicComponentSurfaceE
|
|
|
30
30
|
{ slug: "skeleton", registryName: "skeleton", surface: "standalone" },
|
|
31
31
|
{ slug: "spinner", registryName: "spinner", surface: "standalone" },
|
|
32
32
|
{ slug: "command-bar", registryName: "command-bar", surface: "standalone" },
|
|
33
|
-
{ slug: "quantity-stepper", registryName: "quantity-stepper", surface: "standalone" },
|
|
34
33
|
{ slug: "inline-editable", registryName: "inline-editable", surface: "standalone" },
|
|
35
34
|
{ slug: "avatar", registryName: "avatar", surface: "standalone" },
|
|
36
35
|
{ slug: "code-block", registryName: "code-block", surface: "standalone" },
|
|
@@ -12,7 +12,6 @@ import {
|
|
|
12
12
|
Carousel,
|
|
13
13
|
CarouselItem,
|
|
14
14
|
CodeBlock,
|
|
15
|
-
ColorInput,
|
|
16
15
|
CopyButton,
|
|
17
16
|
CopyField,
|
|
18
17
|
DataState,
|
|
@@ -41,7 +40,6 @@ import {
|
|
|
41
40
|
PropertyGrid,
|
|
42
41
|
QuickActionGrid,
|
|
43
42
|
QRCode,
|
|
44
|
-
QuantityStepper,
|
|
45
43
|
RangeSlider,
|
|
46
44
|
Rating,
|
|
47
45
|
ResizableHandle,
|
|
@@ -445,8 +443,8 @@ function renderGenericPreviewSurface(
|
|
|
445
443
|
return <OtpInput value={state.textValue.replace(/\D/g, "").slice(0, 6)} onValueChange={(value) => setState({ textValue: value })} />
|
|
446
444
|
}
|
|
447
445
|
|
|
448
|
-
if (item.slug === "color-input") {
|
|
449
|
-
return <
|
|
446
|
+
if (item.slug === "color-input") {
|
|
447
|
+
return <Input type="color" defaultValue="#22c55e" aria-label="Accent color" />
|
|
450
448
|
}
|
|
451
449
|
|
|
452
450
|
if (item.slug === "tag-input") {
|
|
@@ -704,8 +702,8 @@ function renderGenericPreviewSurface(
|
|
|
704
702
|
return <QRCode value="https://azamat-ui.vercel.app" alt="Azamat UI" />
|
|
705
703
|
}
|
|
706
704
|
|
|
707
|
-
if (item.slug === "quantity-stepper") {
|
|
708
|
-
return <
|
|
705
|
+
if (item.slug === "quantity-stepper") {
|
|
706
|
+
return <Input kind="quantity" value={3} min={1} max={10} showControls aria-label="Quantity" />
|
|
709
707
|
}
|
|
710
708
|
|
|
711
709
|
if (item.slug === "resizable-panel") {
|
|
@@ -2,7 +2,7 @@ import type { ComponentDemoMock } from "../types"
|
|
|
2
2
|
|
|
3
3
|
export const comboboxMock: ComponentDemoMock = {
|
|
4
4
|
code: `import { useState } from "react"
|
|
5
|
-
import { Button,
|
|
5
|
+
import { Button, Select } from "tembro"
|
|
6
6
|
|
|
7
7
|
const teammateOptions = [
|
|
8
8
|
{ value: "azamat", label: "Azamat", description: "Design system owner" },
|
|
@@ -15,12 +15,13 @@ export function Example() {
|
|
|
15
15
|
|
|
16
16
|
return (
|
|
17
17
|
<div className="space-y-3">
|
|
18
|
-
<
|
|
18
|
+
<Select
|
|
19
19
|
value={value}
|
|
20
20
|
onValueChange={(nextValue) => setValue(nextValue ?? "azamat")}
|
|
21
21
|
options={teammateOptions}
|
|
22
22
|
placeholder="Assign owner"
|
|
23
23
|
searchPlaceholder="Search teammate..."
|
|
24
|
+
searchable
|
|
24
25
|
/>
|
|
25
26
|
<div className="rounded-2xl border border-[color:var(--aui-surface-border)] bg-[color:var(--aui-surface-muted)] px-4 py-3 text-sm aui-text-muted">
|
|
26
27
|
Current owner: <strong>{value}</strong>
|
|
@@ -30,7 +31,7 @@ export function Example() {
|
|
|
30
31
|
)
|
|
31
32
|
}`,
|
|
32
33
|
htmlCode: `<button data-slot="combobox-trigger">Open combobox</button>`,
|
|
33
|
-
cliCommand: "npx tembro add
|
|
34
|
+
cliCommand: "npx tembro add select",
|
|
34
35
|
highlights: ["Search-led selection", "Controlled value", "Description rows", "Fast reassignment flow"],
|
|
35
36
|
relatedBlockSlugs: ["settings-form", "users-table", "crm-dashboard"],
|
|
36
37
|
scenarios: [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react"
|
|
2
2
|
|
|
3
|
-
import { Badge, Button,
|
|
3
|
+
import { Badge, Button, Select } from "@/index"
|
|
4
4
|
|
|
5
5
|
import type { ComponentDemoProps } from "../types"
|
|
6
6
|
|
|
@@ -42,14 +42,14 @@ export function ComboboxShowcase({ state, setState }: ComponentDemoProps) {
|
|
|
42
42
|
<div className={panelClass}>
|
|
43
43
|
<p className="text-sm font-medium aui-text-muted">Assign component owner</p>
|
|
44
44
|
<div className="mt-3">
|
|
45
|
-
<
|
|
45
|
+
<Select
|
|
46
46
|
value={currentValue}
|
|
47
47
|
options={teammateOptions.map((option) => ({ ...option }))}
|
|
48
48
|
onValueChange={(value) => setState({ selectValue: value ?? "azamat" })}
|
|
49
49
|
placeholder="Choose teammate"
|
|
50
50
|
searchPlaceholder="Search teammate..."
|
|
51
|
+
searchable
|
|
51
52
|
clearable
|
|
52
|
-
allowDeselect
|
|
53
53
|
showSelectedDescription
|
|
54
54
|
onSearchChange={setSearchValue}
|
|
55
55
|
/>
|
|
@@ -2,13 +2,14 @@ import type { ComponentDemoMock } from "../types"
|
|
|
2
2
|
|
|
3
3
|
export const dateInputMock: ComponentDemoMock = {
|
|
4
4
|
code: `import { useState } from "react"
|
|
5
|
-
import {
|
|
5
|
+
import { Input } from "tembro"
|
|
6
6
|
|
|
7
7
|
export function Example() {
|
|
8
8
|
const [value, setValue] = useState("2026-06-19")
|
|
9
9
|
|
|
10
10
|
return (
|
|
11
|
-
<
|
|
11
|
+
<Input
|
|
12
|
+
kind="date"
|
|
12
13
|
value={value}
|
|
13
14
|
onValueChange={setValue}
|
|
14
15
|
min="2026-06-01"
|
|
@@ -18,7 +19,7 @@ export function Example() {
|
|
|
18
19
|
)
|
|
19
20
|
}`,
|
|
20
21
|
htmlCode: '<label for="date">Date</label><input id="date" type="text" value="2026-06-19" placeholder="YYYY-MM-DD" />',
|
|
21
|
-
cliCommand: "npx tembro add
|
|
22
|
+
cliCommand: "npx tembro add input",
|
|
22
23
|
highlights: ["ISO-like string format assumptions", "min/max constraints", "Controlled editing", "Clear disabled behavior"],
|
|
23
24
|
relatedBlockSlugs: ["dashboard-starter", "crm-dashboard", "settings-form"],
|
|
24
25
|
scenarios: [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useState } from "react"
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { Input } from "@/index"
|
|
4
4
|
|
|
5
5
|
import type { ComponentDemoProps } from "../types"
|
|
6
6
|
|
|
@@ -9,7 +9,8 @@ export function DateInputShowcase({ mode }: ComponentDemoProps) {
|
|
|
9
9
|
|
|
10
10
|
return (
|
|
11
11
|
<div className="space-y-4">
|
|
12
|
-
<
|
|
12
|
+
<Input
|
|
13
|
+
kind="date"
|
|
13
14
|
value={value}
|
|
14
15
|
onValueChange={(nextValue: string) => setValue(nextValue)}
|
|
15
16
|
min="2026-06-01"
|
|
@@ -2,13 +2,14 @@ import type { ComponentDemoMock } from "../types"
|
|
|
2
2
|
|
|
3
3
|
export const dateRangeInputMock: ComponentDemoMock = {
|
|
4
4
|
code: `import { useState } from "react"
|
|
5
|
-
import {
|
|
5
|
+
import { Input } from "tembro"
|
|
6
6
|
|
|
7
7
|
export function Example() {
|
|
8
8
|
const [value, setValue] = useState({ from: "2026-06-01", to: "2026-06-30" })
|
|
9
9
|
|
|
10
10
|
return (
|
|
11
|
-
<
|
|
11
|
+
<Input
|
|
12
|
+
kind="date-range"
|
|
12
13
|
value={value}
|
|
13
14
|
onValueChange={(nextValue) => setValue({ from: nextValue.from ?? "", to: nextValue.to ?? "" })}
|
|
14
15
|
fromInputProps={{ min: "2026-06-01" }}
|
|
@@ -18,7 +19,7 @@ export function Example() {
|
|
|
18
19
|
)
|
|
19
20
|
}`,
|
|
20
21
|
htmlCode: '<label for="date-range">Date range</label><input id="date-range" type="text" value="2026-06-01 to 2026-06-30" />',
|
|
21
|
-
cliCommand: "npx tembro add
|
|
22
|
+
cliCommand: "npx tembro add input",
|
|
22
23
|
highlights: ["from/to object contract", "range behavior", "min/max boundaries", "single source of truth formatting"],
|
|
23
24
|
relatedBlockSlugs: ["dashboard-starter", "crm-dashboard", "users-table"],
|
|
24
25
|
scenarios: [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useState } from "react"
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { Input } from "@/index"
|
|
4
4
|
|
|
5
5
|
import type { ComponentDemoProps } from "../types"
|
|
6
6
|
|
|
@@ -9,7 +9,8 @@ export function DateRangeInputShowcase({ mode }: ComponentDemoProps) {
|
|
|
9
9
|
|
|
10
10
|
return (
|
|
11
11
|
<div className="space-y-4">
|
|
12
|
-
<
|
|
12
|
+
<Input
|
|
13
|
+
kind="date-range"
|
|
13
14
|
value={value}
|
|
14
15
|
onValueChange={(nextValue: { from?: string | null; to?: string | null }) => setValue({ from: nextValue.from ?? "", to: nextValue.to ?? "" })}
|
|
15
16
|
fromInputProps={{ min: "2026-06-01" }}
|
|
@@ -2,13 +2,14 @@ import type { ComponentDemoMock } from "../types"
|
|
|
2
2
|
|
|
3
3
|
export const maskedInputMock: ComponentDemoMock = {
|
|
4
4
|
code: `import { useState } from "react"
|
|
5
|
-
import {
|
|
5
|
+
import { Input } from "tembro"
|
|
6
6
|
|
|
7
7
|
export function Example() {
|
|
8
8
|
const [value, setValue] = useState("AA-123")
|
|
9
9
|
|
|
10
10
|
return (
|
|
11
|
-
<
|
|
11
|
+
<Input
|
|
12
|
+
kind="masked"
|
|
12
13
|
value={value}
|
|
13
14
|
onValueChange={(nextValue) => setValue(nextValue)}
|
|
14
15
|
mask={(raw: string) => raw.toUpperCase().slice(0, 6).replace(/(.{3})(?=.)/, "$1-")}
|
|
@@ -18,7 +19,7 @@ export function Example() {
|
|
|
18
19
|
}
|
|
19
20
|
`,
|
|
20
21
|
htmlCode: '<label for="masked">Referral code</label><input id="masked" type="text" value="AA-123" placeholder="AA-123" />',
|
|
21
|
-
cliCommand: "npx tembro add
|
|
22
|
+
cliCommand: "npx tembro add input",
|
|
22
23
|
highlights: [
|
|
23
24
|
"Mask callback runs on each edit",
|
|
24
25
|
"Uppercase and slicing are explicit formatting assumptions",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useState } from "react"
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { Input } from "@/index"
|
|
4
4
|
|
|
5
5
|
import type { ComponentDemoProps } from "../types"
|
|
6
6
|
|
|
@@ -9,7 +9,8 @@ export function MaskedInputShowcase({ mode }: ComponentDemoProps) {
|
|
|
9
9
|
|
|
10
10
|
return (
|
|
11
11
|
<div className="space-y-4">
|
|
12
|
-
<
|
|
12
|
+
<Input
|
|
13
|
+
kind="masked"
|
|
13
14
|
value={value}
|
|
14
15
|
onValueChange={(nextValue: string) => setValue(nextValue)}
|
|
15
16
|
mask={(raw: string) => raw.toUpperCase().slice(0, 6).replace(/(.{3})(?=.)/, "$1-")}
|
|
@@ -2,7 +2,7 @@ import type { ComponentDemoMock } from "../types"
|
|
|
2
2
|
|
|
3
3
|
export const moneyInputMock: ComponentDemoMock = {
|
|
4
4
|
code: `import { useState } from "react"
|
|
5
|
-
import {
|
|
5
|
+
import { Input } from "tembro"
|
|
6
6
|
|
|
7
7
|
export function Example() {
|
|
8
8
|
const [value, setValue] = useState<number | null>(2990.5)
|
|
@@ -10,7 +10,8 @@ export function Example() {
|
|
|
10
10
|
|
|
11
11
|
return (
|
|
12
12
|
<div className="space-y-3">
|
|
13
|
-
<
|
|
13
|
+
<Input
|
|
14
|
+
kind="money"
|
|
14
15
|
value={value}
|
|
15
16
|
onValueChange={(nextValue, rawValue) => {
|
|
16
17
|
setValue(nextValue)
|
|
@@ -29,7 +30,7 @@ export function Example() {
|
|
|
29
30
|
)
|
|
30
31
|
}`,
|
|
31
32
|
htmlCode: '<label for="money">Budget</label><div>$<input id="money" inputmode="decimal" type="text" /></div>',
|
|
32
|
-
cliCommand: "npx tembro add
|
|
33
|
+
cliCommand: "npx tembro add input",
|
|
33
34
|
highlights: ["Currency prefix/suffix", "Numeric payload", "Invalid text handling", "Custom keyboard mode"],
|
|
34
35
|
relatedBlockSlugs: ["settings-form", "users-table", "crm-dashboard"],
|
|
35
36
|
scenarios: [
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { useState } from "react"
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { Input } from "@/index"
|
|
4
4
|
|
|
5
5
|
export function MoneyInputShowcase() {
|
|
6
6
|
const [value, setValue] = useState<number | null>(125.75)
|
|
7
7
|
|
|
8
8
|
return (
|
|
9
9
|
<div className="space-y-3">
|
|
10
|
-
<
|
|
10
|
+
<Input
|
|
11
|
+
kind="money"
|
|
11
12
|
value={value}
|
|
12
13
|
onValueChange={(nextValue: number | null) => setValue(nextValue)}
|
|
13
14
|
prefix="$"
|
|
@@ -2,7 +2,7 @@ import type { ComponentDemoMock } from "../types"
|
|
|
2
2
|
|
|
3
3
|
export const numberInputMock: ComponentDemoMock = {
|
|
4
4
|
code: `import { useState } from "react"
|
|
5
|
-
import {
|
|
5
|
+
import { Input } from "tembro"
|
|
6
6
|
|
|
7
7
|
export function Example() {
|
|
8
8
|
const [value, setValue] = useState<number | null>(14)
|
|
@@ -10,16 +10,14 @@ export function Example() {
|
|
|
10
10
|
|
|
11
11
|
return (
|
|
12
12
|
<div className="space-y-3">
|
|
13
|
-
<
|
|
13
|
+
<Input
|
|
14
|
+
kind="number"
|
|
14
15
|
value={value}
|
|
15
16
|
onNumberChange={(nextValue) => {
|
|
16
17
|
setValue(nextValue)
|
|
17
18
|
setRaw(String(nextValue ?? ""))
|
|
18
19
|
}}
|
|
19
|
-
onChange={(event) =>
|
|
20
|
-
const candidate = parseNumberInput(event.target.value)
|
|
21
|
-
if (candidate === null) setRaw(event.target.value)
|
|
22
|
-
}}
|
|
20
|
+
onChange={(event) => setRaw(event.target.value)}
|
|
23
21
|
min={0}
|
|
24
22
|
max={100}
|
|
25
23
|
step={5}
|
|
@@ -36,7 +34,7 @@ export function Example() {
|
|
|
36
34
|
)
|
|
37
35
|
}`,
|
|
38
36
|
htmlCode: `<label for="example-number">Amount</label><input id="example-number" inputmode="decimal" type="text" />`,
|
|
39
|
-
cliCommand: "npx tembro add
|
|
37
|
+
cliCommand: "npx tembro add input",
|
|
40
38
|
highlights: ["Numeric parsing", "Min/max constraints", "Decimal steps", "allowEmpty fallback"],
|
|
41
39
|
relatedBlockSlugs: ["settings-form", "users-table", "crm-dashboard"],
|
|
42
40
|
scenarios: [
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { useState } from "react"
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { Input } from "@/index"
|
|
4
4
|
|
|
5
5
|
export function NumberInputShowcase() {
|
|
6
6
|
const [value, setValue] = useState<number | null>(12)
|
|
7
7
|
|
|
8
8
|
return (
|
|
9
9
|
<div className="space-y-3">
|
|
10
|
-
<
|
|
10
|
+
<Input kind="number" value={value} onNumberChange={setValue} min={0} max={30} step={1} />
|
|
11
11
|
<p className="aui-text-subtle text-sm">Current value: {value ?? "unset"}</p>
|
|
12
12
|
</div>
|
|
13
13
|
)
|
|
@@ -2,13 +2,14 @@ import type { ComponentDemoMock } from "../types"
|
|
|
2
2
|
|
|
3
3
|
export const passwordInputMock: ComponentDemoMock = {
|
|
4
4
|
code: `import * as React from "react"
|
|
5
|
-
import {
|
|
5
|
+
import { Input } from "tembro"
|
|
6
6
|
|
|
7
7
|
export function Example() {
|
|
8
8
|
const [value, setValue] = React.useState("")
|
|
9
9
|
|
|
10
10
|
return (
|
|
11
|
-
<
|
|
11
|
+
<Input
|
|
12
|
+
kind="password"
|
|
12
13
|
value={value}
|
|
13
14
|
onValueChange={setValue}
|
|
14
15
|
placeholder="Enter workspace password"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react"
|
|
2
2
|
|
|
3
|
-
import { Badge,
|
|
3
|
+
import { Badge, Input } from "@/index"
|
|
4
4
|
|
|
5
5
|
import type { ComponentDemoProps } from "../types"
|
|
6
6
|
|
|
@@ -36,7 +36,8 @@ export function PasswordInputShowcase({ mode }: ComponentDemoProps) {
|
|
|
36
36
|
</section>
|
|
37
37
|
|
|
38
38
|
<section className={panelClass}>
|
|
39
|
-
<
|
|
39
|
+
<Input
|
|
40
|
+
kind="password"
|
|
40
41
|
value={password}
|
|
41
42
|
onValueChange={setPassword}
|
|
42
43
|
visible={visible}
|