@techsio/ui-kit 0.15.0 → 0.16.0

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.
@@ -1,7 +1,7 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import code_connect from "@figma/code-connect";
3
3
  import { SearchForm } from "./search-form.js";
4
- code_connect.connect(SearchForm, "https://www.figma.com/design/12xb1pqXKwE2vbOByN3ntg/New-Design-System-vol.-2?node-id=1146-48", {
4
+ code_connect.connect(SearchForm, "https://www.figma.com/design/12xb1pqXKwE2vbOByN3ntg/New-Design-System-vol.-2?node-id=2620-122", {
5
5
  imports: [
6
6
  'import { SearchForm } from "@libs/ui/molecules/search-form"'
7
7
  ],
@@ -10,15 +10,19 @@ code_connect.connect(SearchForm, "https://www.figma.com/design/12xb1pqXKwE2vbOBy
10
10
  sm: "sm",
11
11
  md: "md",
12
12
  lg: "lg"
13
- })
13
+ }),
14
+ gapped: code_connect.boolean("gapped")
14
15
  },
15
- example: ({ size })=>/*#__PURE__*/ jsxs(SearchForm, {
16
+ example: ({ size, gapped })=>/*#__PURE__*/ jsx(SearchForm, {
17
+ gapped: gapped,
16
18
  size: size,
17
- children: [
18
- /*#__PURE__*/ jsx(SearchForm.Input, {
19
- placeholder: "Search..."
20
- }),
21
- /*#__PURE__*/ jsx(SearchForm.Button, {})
22
- ]
19
+ children: /*#__PURE__*/ jsxs(SearchForm.Control, {
20
+ children: [
21
+ /*#__PURE__*/ jsx(SearchForm.Input, {
22
+ placeholder: "Search..."
23
+ }),
24
+ /*#__PURE__*/ jsx(SearchForm.Button, {})
25
+ ]
26
+ })
23
27
  })
24
28
  });
@@ -1,5 +1,6 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { createContext, useContext, useId, useState } from "react";
2
+ import { createContext, useContext, useEffect, useId, useState } from "react";
3
+ import { createPortal } from "react-dom";
3
4
  import { Button } from "../atoms/button.js";
4
5
  import { Input } from "../atoms/input.js";
5
6
  import { Label } from "../atoms/label.js";
@@ -10,46 +11,55 @@ const searchFormVariants = tv({
10
11
  "relative grid"
11
12
  ],
12
13
  control: [
13
- "relative flex items-center overflow-hidden",
14
- "form-control-base",
15
- "hover:border-input-border-hover",
16
- "focus-within:border-input-border-focus",
17
- "focus-within:outline-(style:--default-ring-style) focus-within:outline-(length:--default-ring-width)",
18
- "focus-within:outline-input-ring",
19
- "focus-within:outline-offset-(length:--default-ring-offset)",
20
- "transition-colors duration-200 motion-reduce:transition-none"
14
+ "flex items-stretch"
15
+ ],
16
+ inputWrapper: [
17
+ "relative min-w-0 flex-1",
18
+ "focus-within:z-10"
21
19
  ],
22
20
  input: [
23
- "peer",
24
- "min-w-0 flex-1",
25
- "border-none bg-transparent",
26
- "focus-visible:outline-none"
21
+ "w-full"
27
22
  ],
28
23
  button: [
29
- "h-full shrink-0 items-center rounded-l-none"
24
+ "relative shrink-0",
25
+ "focus-visible:z-10"
30
26
  ],
31
27
  clearButton: [
32
- "h-full shrink-0 rounded-none p-search-form-clear-button",
33
- "peer-hover:bg-input-hover peer-focus:bg-input-focus"
28
+ "absolute inset-y-0",
29
+ "inline-flex items-center justify-center"
34
30
  ]
35
31
  },
36
32
  variants: {
37
33
  size: {
38
34
  sm: {
39
35
  root: "gap-search-form-sm",
40
- control: "h-form-control-sm rounded-search-form-sm"
36
+ button: "h-form-control-sm",
37
+ clearButton: "end-(length:--padding-input-sm)"
41
38
  },
42
39
  md: {
43
40
  root: "gap-search-form-md",
44
- control: "h-form-control-md rounded-search-form-md"
41
+ button: "h-form-control-md",
42
+ clearButton: "end-(length:--padding-input-md)"
45
43
  },
46
44
  lg: {
47
- root: "gap-search-form-lg"
45
+ root: "gap-search-form-lg",
46
+ button: "h-form-control-lg",
47
+ clearButton: "end-(length:--padding-input-lg)"
48
+ }
49
+ },
50
+ gapped: {
51
+ false: {
52
+ input: "rounded-e-none",
53
+ button: "rounded-s-none"
54
+ },
55
+ true: {
56
+ control: "gap-search-form-gapped"
48
57
  }
49
58
  }
50
59
  },
51
60
  defaultVariants: {
52
- size: "md"
61
+ size: "md",
62
+ gapped: false
53
63
  }
54
64
  });
55
65
  const SearchFormContext = /*#__PURE__*/ createContext(null);
@@ -58,10 +68,12 @@ function useSearchFormContext() {
58
68
  if (!context) throw new Error("SearchForm components must be used within SearchForm");
59
69
  return context;
60
70
  }
61
- function SearchForm({ size = "md", children, defaultValue = "", value, onValueChange, className, ref, onSubmit, ...props }) {
71
+ function SearchForm({ size = "md", gapped = false, children, defaultValue = "", value, onValueChange, className, ref, onSubmit, ...props }) {
62
72
  const generatedId = useId();
63
73
  const inputId = `search-input-${generatedId}`;
64
74
  const [internalValue, setInternalValue] = useState(defaultValue);
75
+ const [clearSlot, setClearSlot] = useState(null);
76
+ const [hasClearButton, setHasClearButton] = useState(false);
65
77
  const isControlled = void 0 !== value;
66
78
  const inputValue = isControlled ? value : internalValue;
67
79
  const setInputValue = (newValue)=>{
@@ -76,16 +88,22 @@ function SearchForm({ size = "md", children, defaultValue = "", value, onValueCh
76
88
  onSubmit?.(e);
77
89
  };
78
90
  const styles = searchFormVariants({
79
- size
91
+ size,
92
+ gapped
80
93
  });
81
94
  return /*#__PURE__*/ jsx(SearchFormContext.Provider, {
82
95
  value: {
83
96
  size,
97
+ gapped,
84
98
  inputId,
85
99
  inputValue,
86
100
  setInputValue,
87
101
  clearInput,
88
- hasValue: inputValue.length > 0
102
+ hasValue: inputValue.length > 0,
103
+ clearSlot,
104
+ setClearSlot,
105
+ hasClearButton,
106
+ setHasClearButton
89
107
  },
90
108
  children: /*#__PURE__*/ jsx("search", {
91
109
  children: /*#__PURE__*/ jsx("form", {
@@ -111,9 +129,10 @@ SearchForm.Label = function({ children, className, ...props }) {
111
129
  });
112
130
  };
113
131
  SearchForm.Control = function({ children, className, ref, ...props }) {
114
- const { size } = useSearchFormContext();
132
+ const { size, gapped } = useSearchFormContext();
115
133
  const styles = searchFormVariants({
116
- size
134
+ size,
135
+ gapped
117
136
  });
118
137
  return /*#__PURE__*/ jsx("div", {
119
138
  className: styles.control({
@@ -125,29 +144,36 @@ SearchForm.Control = function({ children, className, ref, ...props }) {
125
144
  });
126
145
  };
127
146
  SearchForm.Input = function({ className, placeholder = "Search...", ref, ...props }) {
128
- const { inputId, inputValue, setInputValue, size } = useSearchFormContext();
147
+ const { inputId, inputValue, setInputValue, size, gapped, hasValue, hasClearButton, setClearSlot } = useSearchFormContext();
129
148
  const styles = searchFormVariants({
130
- size
149
+ size,
150
+ gapped
131
151
  });
132
- return /*#__PURE__*/ jsx(Input, {
133
- "aria-label": props["aria-label"] || "Search",
134
- className: styles.input({
135
- className
136
- }),
137
- id: inputId,
138
- onChange: (e)=>setInputValue(e.target.value),
139
- placeholder: placeholder,
140
- ref: ref,
141
- size: size,
142
- type: "search",
143
- value: inputValue,
144
- ...props
152
+ return /*#__PURE__*/ jsx("div", {
153
+ className: styles.inputWrapper(),
154
+ ref: setClearSlot,
155
+ children: /*#__PURE__*/ jsx(Input, {
156
+ "aria-label": props["aria-label"] || "Search",
157
+ className: styles.input({
158
+ className
159
+ }),
160
+ id: inputId,
161
+ onChange: (e)=>setInputValue(e.target.value),
162
+ placeholder: placeholder,
163
+ ref: ref,
164
+ size: size,
165
+ type: "search",
166
+ value: inputValue,
167
+ withButtonInside: hasValue && hasClearButton ? "right" : void 0,
168
+ ...props
169
+ })
145
170
  });
146
171
  };
147
172
  SearchForm.Button = function({ className, children, showSearchIcon = false, icon, iconPosition = "right", ...props }) {
148
- const { size } = useSearchFormContext();
173
+ const { size, gapped } = useSearchFormContext();
149
174
  const styles = searchFormVariants({
150
- size
175
+ size,
176
+ gapped
151
177
  });
152
178
  const effectiveIcon = icon ?? (showSearchIcon ? "token-icon-search" : void 0);
153
179
  return /*#__PURE__*/ jsx(Button, {
@@ -163,12 +189,19 @@ SearchForm.Button = function({ className, children, showSearchIcon = false, icon
163
189
  });
164
190
  };
165
191
  SearchForm.ClearButton = function({ className, icon = "token-icon-close", theme = "unstyled", ...props }) {
166
- const { size, clearInput, hasValue, inputValue } = useSearchFormContext();
192
+ const { size, gapped, clearInput, hasValue, inputValue, clearSlot, setHasClearButton } = useSearchFormContext();
167
193
  const styles = searchFormVariants({
168
- size
194
+ size,
195
+ gapped
169
196
  });
170
- if (!hasValue) return null;
171
- return /*#__PURE__*/ jsx(Button, {
197
+ useEffect(()=>{
198
+ setHasClearButton(true);
199
+ return ()=>setHasClearButton(false);
200
+ }, [
201
+ setHasClearButton
202
+ ]);
203
+ if (!(hasValue && clearSlot)) return null;
204
+ return /*#__PURE__*/ createPortal(/*#__PURE__*/ jsx(Button, {
172
205
  "aria-label": `Clear search: ${inputValue}`,
173
206
  className: styles.clearButton({
174
207
  className
@@ -179,7 +212,7 @@ SearchForm.ClearButton = function({ className, icon = "token-icon-close", theme
179
212
  theme: theme,
180
213
  type: "button",
181
214
  ...props
182
- });
215
+ }), clearSlot);
183
216
  };
184
217
  SearchForm.displayName = "SearchForm";
185
218
  export { SearchForm, searchFormVariants, useSearchFormContext };
@@ -7,19 +7,33 @@ declare const searchFormVariants: import("tailwind-variants").TVReturnType<{
7
7
  size: {
8
8
  sm: {
9
9
  root: string;
10
- control: string;
10
+ button: string;
11
+ clearButton: string;
11
12
  };
12
13
  md: {
13
14
  root: string;
14
- control: string;
15
+ button: string;
16
+ clearButton: string;
15
17
  };
16
18
  lg: {
17
19
  root: string;
20
+ button: string;
21
+ clearButton: string;
22
+ };
23
+ };
24
+ gapped: {
25
+ false: {
26
+ input: string;
27
+ button: string;
28
+ };
29
+ true: {
30
+ control: string;
18
31
  };
19
32
  };
20
33
  }, {
21
34
  root: string[];
22
35
  control: string[];
36
+ inputWrapper: string[];
23
37
  input: string[];
24
38
  button: string[];
25
39
  clearButton: string[];
@@ -27,19 +41,33 @@ declare const searchFormVariants: import("tailwind-variants").TVReturnType<{
27
41
  size: {
28
42
  sm: {
29
43
  root: string;
30
- control: string;
44
+ button: string;
45
+ clearButton: string;
31
46
  };
32
47
  md: {
33
48
  root: string;
34
- control: string;
49
+ button: string;
50
+ clearButton: string;
35
51
  };
36
52
  lg: {
37
53
  root: string;
54
+ button: string;
55
+ clearButton: string;
56
+ };
57
+ };
58
+ gapped: {
59
+ false: {
60
+ input: string;
61
+ button: string;
62
+ };
63
+ true: {
64
+ control: string;
38
65
  };
39
66
  };
40
67
  }, {
41
68
  root: string[];
42
69
  control: string[];
70
+ inputWrapper: string[];
43
71
  input: string[];
44
72
  button: string[];
45
73
  clearButton: string[];
@@ -47,19 +75,33 @@ declare const searchFormVariants: import("tailwind-variants").TVReturnType<{
47
75
  size: {
48
76
  sm: {
49
77
  root: string;
50
- control: string;
78
+ button: string;
79
+ clearButton: string;
51
80
  };
52
81
  md: {
53
82
  root: string;
54
- control: string;
83
+ button: string;
84
+ clearButton: string;
55
85
  };
56
86
  lg: {
57
87
  root: string;
88
+ button: string;
89
+ clearButton: string;
90
+ };
91
+ };
92
+ gapped: {
93
+ false: {
94
+ input: string;
95
+ button: string;
96
+ };
97
+ true: {
98
+ control: string;
58
99
  };
59
100
  };
60
101
  }, {
61
102
  root: string[];
62
103
  control: string[];
104
+ inputWrapper: string[];
63
105
  input: string[];
64
106
  button: string[];
65
107
  clearButton: string[];
@@ -67,11 +109,16 @@ declare const searchFormVariants: import("tailwind-variants").TVReturnType<{
67
109
  export type SearchFormSize = "sm" | "md" | "lg";
68
110
  type SearchFormContextValue = {
69
111
  size: SearchFormSize;
112
+ gapped: boolean;
70
113
  inputId: string;
71
114
  inputValue: string;
72
115
  setInputValue: (value: string) => void;
73
116
  clearInput: () => void;
74
117
  hasValue: boolean;
118
+ clearSlot: HTMLDivElement | null;
119
+ setClearSlot: (element: HTMLDivElement | null) => void;
120
+ hasClearButton: boolean;
121
+ setHasClearButton: (present: boolean) => void;
75
122
  };
76
123
  declare function useSearchFormContext(): SearchFormContextValue;
77
124
  export interface SearchFormProps extends VariantProps<typeof searchFormVariants>, Omit<ComponentPropsWithoutRef<"form">, "size"> {
@@ -81,13 +128,13 @@ export interface SearchFormProps extends VariantProps<typeof searchFormVariants>
81
128
  onValueChange?: (value: string) => void;
82
129
  ref?: Ref<HTMLFormElement>;
83
130
  }
84
- export declare function SearchForm({ size, children, defaultValue, value, onValueChange, className, ref, onSubmit, ...props }: SearchFormProps): import("react/jsx-runtime").JSX.Element;
131
+ export declare function SearchForm({ size, gapped, children, defaultValue, value, onValueChange, className, ref, onSubmit, ...props }: SearchFormProps): import("react/jsx-runtime").JSX.Element;
85
132
  export declare namespace SearchForm {
86
133
  var Label: ({ children, className, ...props }: SearchFormLabelProps) => import("react/jsx-runtime").JSX.Element;
87
134
  var Control: ({ children, className, ref, ...props }: SearchFormControlProps) => import("react/jsx-runtime").JSX.Element;
88
135
  var Input: ({ className, placeholder, ref, ...props }: SearchFormInputProps) => import("react/jsx-runtime").JSX.Element;
89
136
  var Button: ({ className, children, showSearchIcon, icon, iconPosition, ...props }: SearchFormButtonProps) => import("react/jsx-runtime").JSX.Element;
90
- var ClearButton: ({ className, icon, theme, ...props }: SearchFormClearButtonProps) => import("react/jsx-runtime").JSX.Element | null;
137
+ var ClearButton: ({ className, icon, theme, ...props }: SearchFormClearButtonProps) => import("react").ReactPortal | null;
91
138
  var displayName: string;
92
139
  }
93
140
  interface SearchFormLabelProps extends Omit<LabelProps, "htmlFor" | "size"> {
@@ -95,7 +142,7 @@ interface SearchFormLabelProps extends Omit<LabelProps, "htmlFor" | "size"> {
95
142
  interface SearchFormControlProps extends ComponentPropsWithoutRef<"div"> {
96
143
  ref?: Ref<HTMLDivElement>;
97
144
  }
98
- interface SearchFormInputProps extends Omit<InputProps, "size" | "value" | "onChange"> {
145
+ interface SearchFormInputProps extends Omit<InputProps, "size" | "value" | "onChange" | "withButtonInside"> {
99
146
  }
100
147
  interface SearchFormButtonProps extends Omit<ButtonProps, "size"> {
101
148
  showSearchIcon?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"search-form.d.ts","sourceRoot":"","sources":["../../../src/molecules/search-form.tsx"],"names":[],"mappings":"AA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tB,oBAAoB;wFA2CpB,qBAAqB;4DA8BrB,0BAA0B;;;AAxH7B,UAAU,oBAAqB,SAAQ,IAAI,CAAC,UAAU,EAAE,SAAS,GAAG,MAAM,CAAC;CAAG;AAgB9E,UAAU,sBAAuB,SAAQ,wBAAwB,CAAC,KAAK,CAAC;IACtE,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAA;CAC1B;AAkBD,UAAU,oBACR,SAAQ,IAAI,CACV,UAAU,EACV,MAAM,GAAG,OAAO,GAAG,UAAU,GAAG,kBAAkB,CACnD;CAAG;AAuCN,UAAU,qBAAsB,SAAQ,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC;IAC/D,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB;AA+BD,UAAU,0BACR,SAAQ,IAAI,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC;CAAG;AA8C3D,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,CAAA"}
@@ -4,6 +4,7 @@ declare const meta: Meta<typeof SearchForm>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof SearchForm>;
6
6
  export declare const Default: Story;
7
+ export declare const Gapped: Story;
7
8
  export declare const WithLabel: Story;
8
9
  export declare const IconButton: Story;
9
10
  export declare const WithoutButton: Story;
@@ -1 +1 @@
1
- {"version":3,"file":"search-form.stories.d.ts","sourceRoot":"","sources":["../../../stories/molecules/search-form.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAGtD,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AAE5D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,UAAU,CAoBjC,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,UAAU,CAAC,CAAA;AAExC,eAAO,MAAM,OAAO,EAAE,KAWrB,CAAA;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1 +1 @@
1
- {"version":3,"file":"component-comparison.stories.d.ts","sourceRoot":"","sources":["../../../stories/overview/component-comparison.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AA6CtD,QAAA,MAAM,IAAI,EAAE,IAMX,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAA;AAkwBrB,eAAO,MAAM,UAAU,EAAE,KAExB,CAAA"}
1
+ {"version":3,"file":"component-comparison.stories.d.ts","sourceRoot":"","sources":["../../../stories/overview/component-comparison.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AA6CtD,QAAA,MAAM,IAAI,EAAE,IAMX,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAA;AA8xBrB,eAAO,MAAM,UAAU,EAAE,KAExB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@techsio/ui-kit",
3
- "version": "0.15.0",
3
+ "version": "0.16.0",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,4 +1,12 @@
1
1
  /*
2
- * SearchForm — runtime tokens come entirely from
2
+ * SearchForm — runtime tokens come mostly from
3
3
  * libs/ui/src/tokens/figma/variables.css.
4
+ *
5
+ * This file only declares what Figma does not export:
6
+ * - `--spacing-search-form-gapped` — the horizontal gap inserted between
7
+ * the input and the button when the `gapped` prop is enabled (8px).
4
8
  */
9
+
10
+ @theme static {
11
+ --spacing-search-form-gapped: var(--dimension-8);
12
+ }