@neoptocom/neopto-ui 1.6.12 → 1.6.14

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/index.cjs CHANGED
@@ -976,6 +976,7 @@ function Search({
976
976
  searchDelay = 300,
977
977
  disabled = false,
978
978
  maxHeight = 152,
979
+ placeholder = "Pesquisar",
979
980
  id,
980
981
  children,
981
982
  ...props
@@ -1135,7 +1136,7 @@ function Search({
1135
1136
  "leading-tight text-[var(--fg)] placeholder:text-[var(--muted-fg)]",
1136
1137
  "px-2"
1137
1138
  ].join(" "),
1138
- placeholder: "Pesquisar",
1139
+ placeholder,
1139
1140
  onClick: () => !disabled && setOpen(true)
1140
1141
  }
1141
1142
  ),
@@ -1165,6 +1166,7 @@ function getButtonClasses(variant = "primary", size = "md", fullWidth, className
1165
1166
  inline: "text-cyan-500 bg-transparent active:bg-cyan-100 disabled:text-neutral-400"
1166
1167
  };
1167
1168
  const sizes = {
1169
+ xs: "h-6 px-2",
1168
1170
  sm: "h-9 px-3",
1169
1171
  md: "h-12 px-[18px]",
1170
1172
  lg: "h-14 px-6"
package/dist/index.d.cts CHANGED
@@ -223,18 +223,20 @@ interface SearchProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onSele
223
223
  disabled?: boolean;
224
224
  /** Maximum height of the options dropdown */
225
225
  maxHeight?: number;
226
+ /** Placeholder shown when the input is empty and nothing is selected */
227
+ placeholder?: string;
226
228
  /** Optional id base (for accessibility hooks) */
227
229
  id?: string;
228
230
  /** Optional filter children to render when filters are expanded */
229
231
  children?: React.ReactNode;
230
232
  }
231
- declare function Search({ className, options, onSearch, selectedOption, onSelect, searchDelay, disabled, maxHeight, id, children, ...props }: SearchProps): react_jsx_runtime.JSX.Element;
233
+ declare function Search({ className, options, onSearch, selectedOption, onSelect, searchDelay, disabled, maxHeight, placeholder, id, children, ...props }: SearchProps): react_jsx_runtime.JSX.Element;
232
234
 
233
235
  type ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {
234
236
  /** Button visual variant */
235
237
  variant?: "primary" | "secondary" | "ghost" | "inline";
236
238
  /** Button size */
237
- size?: "sm" | "md" | "lg";
239
+ size?: "xs" | "sm" | "md" | "lg";
238
240
  /** Make button full width */
239
241
  fullWidth?: boolean;
240
242
  /** Icon component to display instead of text */
@@ -244,7 +246,7 @@ declare const Button: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes
244
246
  /** Button visual variant */
245
247
  variant?: "primary" | "secondary" | "ghost" | "inline";
246
248
  /** Button size */
247
- size?: "sm" | "md" | "lg";
249
+ size?: "xs" | "sm" | "md" | "lg";
248
250
  /** Make button full width */
249
251
  fullWidth?: boolean;
250
252
  /** Icon component to display instead of text */
package/dist/index.d.ts CHANGED
@@ -223,18 +223,20 @@ interface SearchProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onSele
223
223
  disabled?: boolean;
224
224
  /** Maximum height of the options dropdown */
225
225
  maxHeight?: number;
226
+ /** Placeholder shown when the input is empty and nothing is selected */
227
+ placeholder?: string;
226
228
  /** Optional id base (for accessibility hooks) */
227
229
  id?: string;
228
230
  /** Optional filter children to render when filters are expanded */
229
231
  children?: React.ReactNode;
230
232
  }
231
- declare function Search({ className, options, onSearch, selectedOption, onSelect, searchDelay, disabled, maxHeight, id, children, ...props }: SearchProps): react_jsx_runtime.JSX.Element;
233
+ declare function Search({ className, options, onSearch, selectedOption, onSelect, searchDelay, disabled, maxHeight, placeholder, id, children, ...props }: SearchProps): react_jsx_runtime.JSX.Element;
232
234
 
233
235
  type ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {
234
236
  /** Button visual variant */
235
237
  variant?: "primary" | "secondary" | "ghost" | "inline";
236
238
  /** Button size */
237
- size?: "sm" | "md" | "lg";
239
+ size?: "xs" | "sm" | "md" | "lg";
238
240
  /** Make button full width */
239
241
  fullWidth?: boolean;
240
242
  /** Icon component to display instead of text */
@@ -244,7 +246,7 @@ declare const Button: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes
244
246
  /** Button visual variant */
245
247
  variant?: "primary" | "secondary" | "ghost" | "inline";
246
248
  /** Button size */
247
- size?: "sm" | "md" | "lg";
249
+ size?: "xs" | "sm" | "md" | "lg";
248
250
  /** Make button full width */
249
251
  fullWidth?: boolean;
250
252
  /** Icon component to display instead of text */
package/dist/index.js CHANGED
@@ -955,6 +955,7 @@ function Search({
955
955
  searchDelay = 300,
956
956
  disabled = false,
957
957
  maxHeight = 152,
958
+ placeholder = "Pesquisar",
958
959
  id,
959
960
  children,
960
961
  ...props
@@ -1114,7 +1115,7 @@ function Search({
1114
1115
  "leading-tight text-[var(--fg)] placeholder:text-[var(--muted-fg)]",
1115
1116
  "px-2"
1116
1117
  ].join(" "),
1117
- placeholder: "Pesquisar",
1118
+ placeholder,
1118
1119
  onClick: () => !disabled && setOpen(true)
1119
1120
  }
1120
1121
  ),
@@ -1144,6 +1145,7 @@ function getButtonClasses(variant = "primary", size = "md", fullWidth, className
1144
1145
  inline: "text-cyan-500 bg-transparent active:bg-cyan-100 disabled:text-neutral-400"
1145
1146
  };
1146
1147
  const sizes = {
1148
+ xs: "h-6 px-2",
1147
1149
  sm: "h-9 px-3",
1148
1150
  md: "h-12 px-[18px]",
1149
1151
  lg: "h-14 px-6"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neoptocom/neopto-ui",
3
- "version": "1.6.12",
3
+ "version": "1.6.14",
4
4
  "private": false,
5
5
  "description": "A modern React component library built with Tailwind CSS v4 and TypeScript. Features dark mode, design tokens, and comprehensive documentation. Requires Tailwind v4+.",
6
6
  "keywords": [
@@ -6,7 +6,7 @@ import * as ButtonStories from "./Button.stories";
6
6
 
7
7
  # Button
8
8
 
9
- Buttons trigger primary user actions. They support three visual variants, three sizes, optional full
9
+ Buttons trigger primary user actions. They support three visual variants, four sizes (`xs`–`lg`), optional full
10
10
  width layout, and icon affordances.
11
11
 
12
12
  ## Usage
@@ -20,7 +20,7 @@ const meta: Meta<typeof Button> = {
20
20
  },
21
21
  size: {
22
22
  control: "inline-radio",
23
- options: ["sm", "md", "lg"]
23
+ options: ["xs", "sm", "md", "lg"]
24
24
  },
25
25
  fullWidth: {
26
26
  control: "boolean"
@@ -66,6 +66,11 @@ export const Variants: Story = {
66
66
  export const Sizes: Story = {
67
67
  render: () => (
68
68
  <div className="flex flex-wrap items-center gap-4">
69
+ <Button size="xs">
70
+ <Typo variant="label-sm" bold="semibold">
71
+ Extra small
72
+ </Typo>
73
+ </Button>
69
74
  <Button size="sm">
70
75
  <Typo variant="title-sm" bold="semibold">
71
76
  Small
@@ -4,7 +4,7 @@ export type ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {
4
4
  /** Button visual variant */
5
5
  variant?: "primary" | "secondary" | "ghost" | "inline";
6
6
  /** Button size */
7
- size?: "sm" | "md" | "lg";
7
+ size?: "xs" | "sm" | "md" | "lg";
8
8
  /** Make button full width */
9
9
  fullWidth?: boolean;
10
10
  /** Icon component to display instead of text */
@@ -30,6 +30,7 @@ function getButtonClasses(
30
30
  };
31
31
 
32
32
  const sizes = {
33
+ xs: "h-6 px-2",
33
34
  sm: "h-9 px-3",
34
35
  md: "h-12 px-[18px]",
35
36
  lg: "h-14 px-6"
@@ -28,6 +28,8 @@ export interface SearchProps
28
28
  disabled?: boolean;
29
29
  /** Maximum height of the options dropdown */
30
30
  maxHeight?: number;
31
+ /** Placeholder shown when the input is empty and nothing is selected */
32
+ placeholder?: string;
31
33
  /** Optional id base (for accessibility hooks) */
32
34
  id?: string;
33
35
  /** Optional filter children to render when filters are expanded */
@@ -43,6 +45,7 @@ export default function Search({
43
45
  searchDelay = 300,
44
46
  disabled = false,
45
47
  maxHeight = 152,
48
+ placeholder = "Pesquisar",
46
49
  id,
47
50
  children,
48
51
  ...props
@@ -218,7 +221,7 @@ export default function Search({
218
221
  "leading-tight text-[var(--fg)] placeholder:text-[var(--muted-fg)]",
219
222
  "px-2"
220
223
  ].join(" ")}
221
- placeholder="Pesquisar"
224
+ placeholder={placeholder}
222
225
  onClick={() => !disabled && setOpen(true)}
223
226
  />
224
227
  {/* Action button (clear or expand) */}
@@ -39,7 +39,8 @@ const meta: Meta<typeof Search> = {
39
39
  selectedOption: null,
40
40
  disabled: false,
41
41
  maxHeight: 180,
42
- searchDelay: 300
42
+ searchDelay: 300,
43
+ placeholder: "Pesquisar"
43
44
  }
44
45
  };
45
46