@clickhouse/click-ui 0.14.0 → 0.15.0-canary.g025425ce.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.
package/README.md CHANGED
@@ -88,6 +88,8 @@ Install the package via npm or your favorite package manager:
88
88
  npm i @clickhouse/click-ui@latest
89
89
  ```
90
90
 
91
+ Every merge to `main` is also published as a prerelease, for trying changes before a release: `npm i @clickhouse/click-ui@canary`.
92
+
91
93
  Click UI has three peer dependencies. Your app must provide them:
92
94
 
93
95
  | Package | Version |
@@ -43,7 +43,7 @@ const TextAreaField = react.forwardRef(
43
43
  id: id ?? defaultId,
44
44
  disabled,
45
45
  value,
46
- onInput: onChange,
46
+ onChange,
47
47
  ...props
48
48
  }
49
49
  )
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../../src/components/TextAreaField/TextAreaField.tsx"],"sourcesContent":["import { ChangeEvent, TextareaHTMLAttributes, forwardRef, useId, useRef } from 'react';\nimport { TextAreaElement, InputWrapper, WrapperProps } from '@/components/InputWrapper';\nimport { mergeRefs } from '@/utils/mergeRefs';\n\nexport interface TextAreaFieldProps\n extends\n Omit<WrapperProps, 'id' | 'children'>,\n Omit<\n TextareaHTMLAttributes<HTMLTextAreaElement>,\n 'children' | 'type' | 'value' | 'onChange' | 'dir'\n > {\n /** Number of visible text rows */\n rows?: number;\n /** The current value of the textarea */\n value?: string;\n /** Callback when the textarea value changes */\n onChange: (inputValue: string, e?: ChangeEvent<HTMLTextAreaElement>) => void;\n /** The orientation of the label relative to the input */\n orientation?: 'vertical' | 'horizontal';\n /** The direction/position of the label - start places label before, end places label after */\n dir?: 'start' | 'end';\n}\n\nexport const TextAreaField = forwardRef<HTMLTextAreaElement, TextAreaFieldProps>(\n (\n {\n rows,\n disabled,\n label,\n error,\n id,\n value = '',\n onChange: onChangeProp,\n orientation,\n dir,\n ...props\n },\n ref\n ) => {\n const inputRef = useRef<HTMLTextAreaElement>(null);\n const defaultId = useId();\n const onChange = (e: ChangeEvent<HTMLTextAreaElement>) => {\n onChangeProp(e.target.value, e);\n };\n\n return (\n <InputWrapper\n disabled={disabled}\n id={id ?? defaultId}\n label={label}\n error={error}\n orientation={orientation}\n dir={dir}\n resize=\"vertical\"\n >\n <TextAreaElement\n ref={mergeRefs([inputRef, ref])}\n rows={rows ?? 5}\n id={id ?? defaultId}\n disabled={disabled}\n value={value}\n // TODO: Still uses onInput={onChange}. All other field components use onChange. This will silently break React Hook Form and Formik integrations, and consumers can't override it via ...props since onChange is already omitted from the spread type.\n onInput={onChange}\n {...props}\n />\n </InputWrapper>\n );\n }\n);\n"],"names":["forwardRef","useRef","useId","jsx","InputWrapper","TextAreaElement","mergeRefs"],"mappings":";;;;;;;;;AAuBO,MAAM,aAAA,GAAgBA,gBAAA;AAAA,EAC3B,CACE;AAAA,IACE,IAAA;AAAA,IACA,QAAA;AAAA,IACA,KAAA;AAAA,IACA,KAAA;AAAA,IACA,EAAA;AAAA,IACA,KAAA,GAAQ,EAAA;AAAA,IACR,QAAA,EAAU,YAAA;AAAA,IACV,WAAA;AAAA,IACA,GAAA;AAAA,IACA,GAAG;AAAA,KAEL,GAAA,KACG;AACH,IAAA,MAAM,QAAA,GAAWC,aAA4B,IAAI,CAAA;AACjD,IAAA,MAAM,YAAYC,WAAA,EAAM;AACxB,IAAA,MAAM,QAAA,GAAW,CAAC,CAAA,KAAwC;AACxD,MAAA,YAAA,CAAa,CAAA,CAAE,MAAA,CAAO,KAAA,EAAO,CAAC,CAAA;AAAA,IAChC,CAAA;AAEA,IAAA,uBACEC,cAAA;AAAA,MAACC,yBAAA;AAAA,MAAA;AAAA,QACC,QAAA;AAAA,QACA,IAAI,EAAA,IAAM,SAAA;AAAA,QACV,KAAA;AAAA,QACA,KAAA;AAAA,QACA,WAAA;AAAA,QACA,GAAA;AAAA,QACA,MAAA,EAAO,UAAA;AAAA,QAEP,QAAA,kBAAAD,cAAA;AAAA,UAACE,4BAAA;AAAA,UAAA;AAAA,YACC,GAAA,EAAKC,mBAAA,CAAU,CAAC,QAAA,EAAU,GAAG,CAAC,CAAA;AAAA,YAC9B,MAAM,IAAA,IAAQ,CAAA;AAAA,YACd,IAAI,EAAA,IAAM,SAAA;AAAA,YACV,QAAA;AAAA,YACA,KAAA;AAAA,YAEA,OAAA,EAAS,QAAA;AAAA,YACR,GAAG;AAAA;AAAA;AACN;AAAA,KACF;AAAA,EAEJ;AACF;;"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../../src/components/TextAreaField/TextAreaField.tsx"],"sourcesContent":["import { ChangeEvent, TextareaHTMLAttributes, forwardRef, useId, useRef } from 'react';\nimport { TextAreaElement, InputWrapper, WrapperProps } from '@/components/InputWrapper';\nimport { mergeRefs } from '@/utils/mergeRefs';\n\nexport interface TextAreaFieldProps\n extends\n Omit<WrapperProps, 'id' | 'children'>,\n Omit<\n TextareaHTMLAttributes<HTMLTextAreaElement>,\n 'children' | 'type' | 'value' | 'onChange' | 'dir'\n > {\n /** Number of visible text rows */\n rows?: number;\n /** The current value of the textarea */\n value?: string;\n /** Callback when the textarea value changes */\n onChange: (inputValue: string, e?: ChangeEvent<HTMLTextAreaElement>) => void;\n /** The orientation of the label relative to the input */\n orientation?: 'vertical' | 'horizontal';\n /** The direction/position of the label - start places label before, end places label after */\n dir?: 'start' | 'end';\n}\n\nexport const TextAreaField = forwardRef<HTMLTextAreaElement, TextAreaFieldProps>(\n (\n {\n rows,\n disabled,\n label,\n error,\n id,\n value = '',\n onChange: onChangeProp,\n orientation,\n dir,\n ...props\n },\n ref\n ) => {\n const inputRef = useRef<HTMLTextAreaElement>(null);\n const defaultId = useId();\n const onChange = (e: ChangeEvent<HTMLTextAreaElement>) => {\n onChangeProp(e.target.value, e);\n };\n\n return (\n <InputWrapper\n disabled={disabled}\n id={id ?? defaultId}\n label={label}\n error={error}\n orientation={orientation}\n dir={dir}\n resize=\"vertical\"\n >\n <TextAreaElement\n ref={mergeRefs([inputRef, ref])}\n rows={rows ?? 5}\n id={id ?? defaultId}\n disabled={disabled}\n value={value}\n onChange={onChange}\n {...props}\n />\n </InputWrapper>\n );\n }\n);\n"],"names":["forwardRef","useRef","useId","jsx","InputWrapper","TextAreaElement","mergeRefs"],"mappings":";;;;;;;;;AAuBO,MAAM,aAAA,GAAgBA,gBAAA;AAAA,EAC3B,CACE;AAAA,IACE,IAAA;AAAA,IACA,QAAA;AAAA,IACA,KAAA;AAAA,IACA,KAAA;AAAA,IACA,EAAA;AAAA,IACA,KAAA,GAAQ,EAAA;AAAA,IACR,QAAA,EAAU,YAAA;AAAA,IACV,WAAA;AAAA,IACA,GAAA;AAAA,IACA,GAAG;AAAA,KAEL,GAAA,KACG;AACH,IAAA,MAAM,QAAA,GAAWC,aAA4B,IAAI,CAAA;AACjD,IAAA,MAAM,YAAYC,WAAA,EAAM;AACxB,IAAA,MAAM,QAAA,GAAW,CAAC,CAAA,KAAwC;AACxD,MAAA,YAAA,CAAa,CAAA,CAAE,MAAA,CAAO,KAAA,EAAO,CAAC,CAAA;AAAA,IAChC,CAAA;AAEA,IAAA,uBACEC,cAAA;AAAA,MAACC,yBAAA;AAAA,MAAA;AAAA,QACC,QAAA;AAAA,QACA,IAAI,EAAA,IAAM,SAAA;AAAA,QACV,KAAA;AAAA,QACA,KAAA;AAAA,QACA,WAAA;AAAA,QACA,GAAA;AAAA,QACA,MAAA,EAAO,UAAA;AAAA,QAEP,QAAA,kBAAAD,cAAA;AAAA,UAACE,4BAAA;AAAA,UAAA;AAAA,YACC,GAAA,EAAKC,mBAAA,CAAU,CAAC,QAAA,EAAU,GAAG,CAAC,CAAA;AAAA,YAC9B,MAAM,IAAA,IAAQ,CAAA;AAAA,YACd,IAAI,EAAA,IAAM,SAAA;AAAA,YACV,QAAA;AAAA,YACA,KAAA;AAAA,YACA,QAAA;AAAA,YACC,GAAG;AAAA;AAAA;AACN;AAAA,KACF;AAAA,EAEJ;AACF;;"}
@@ -39,7 +39,7 @@ const TextAreaField = forwardRef(
39
39
  id: id ?? defaultId,
40
40
  disabled,
41
41
  value,
42
- onInput: onChange,
42
+ onChange,
43
43
  ...props
44
44
  }
45
45
  )
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/TextAreaField/TextAreaField.tsx"],"sourcesContent":["import { ChangeEvent, TextareaHTMLAttributes, forwardRef, useId, useRef } from 'react';\nimport { TextAreaElement, InputWrapper, WrapperProps } from '@/components/InputWrapper';\nimport { mergeRefs } from '@/utils/mergeRefs';\n\nexport interface TextAreaFieldProps\n extends\n Omit<WrapperProps, 'id' | 'children'>,\n Omit<\n TextareaHTMLAttributes<HTMLTextAreaElement>,\n 'children' | 'type' | 'value' | 'onChange' | 'dir'\n > {\n /** Number of visible text rows */\n rows?: number;\n /** The current value of the textarea */\n value?: string;\n /** Callback when the textarea value changes */\n onChange: (inputValue: string, e?: ChangeEvent<HTMLTextAreaElement>) => void;\n /** The orientation of the label relative to the input */\n orientation?: 'vertical' | 'horizontal';\n /** The direction/position of the label - start places label before, end places label after */\n dir?: 'start' | 'end';\n}\n\nexport const TextAreaField = forwardRef<HTMLTextAreaElement, TextAreaFieldProps>(\n (\n {\n rows,\n disabled,\n label,\n error,\n id,\n value = '',\n onChange: onChangeProp,\n orientation,\n dir,\n ...props\n },\n ref\n ) => {\n const inputRef = useRef<HTMLTextAreaElement>(null);\n const defaultId = useId();\n const onChange = (e: ChangeEvent<HTMLTextAreaElement>) => {\n onChangeProp(e.target.value, e);\n };\n\n return (\n <InputWrapper\n disabled={disabled}\n id={id ?? defaultId}\n label={label}\n error={error}\n orientation={orientation}\n dir={dir}\n resize=\"vertical\"\n >\n <TextAreaElement\n ref={mergeRefs([inputRef, ref])}\n rows={rows ?? 5}\n id={id ?? defaultId}\n disabled={disabled}\n value={value}\n // TODO: Still uses onInput={onChange}. All other field components use onChange. This will silently break React Hook Form and Formik integrations, and consumers can't override it via ...props since onChange is already omitted from the spread type.\n onInput={onChange}\n {...props}\n />\n </InputWrapper>\n );\n }\n);\n"],"names":[],"mappings":";;;;;AAuBO,MAAM,aAAA,GAAgB,UAAA;AAAA,EAC3B,CACE;AAAA,IACE,IAAA;AAAA,IACA,QAAA;AAAA,IACA,KAAA;AAAA,IACA,KAAA;AAAA,IACA,EAAA;AAAA,IACA,KAAA,GAAQ,EAAA;AAAA,IACR,QAAA,EAAU,YAAA;AAAA,IACV,WAAA;AAAA,IACA,GAAA;AAAA,IACA,GAAG;AAAA,KAEL,GAAA,KACG;AACH,IAAA,MAAM,QAAA,GAAW,OAA4B,IAAI,CAAA;AACjD,IAAA,MAAM,YAAY,KAAA,EAAM;AACxB,IAAA,MAAM,QAAA,GAAW,CAAC,CAAA,KAAwC;AACxD,MAAA,YAAA,CAAa,CAAA,CAAE,MAAA,CAAO,KAAA,EAAO,CAAC,CAAA;AAAA,IAChC,CAAA;AAEA,IAAA,uBACE,GAAA;AAAA,MAAC,YAAA;AAAA,MAAA;AAAA,QACC,QAAA;AAAA,QACA,IAAI,EAAA,IAAM,SAAA;AAAA,QACV,KAAA;AAAA,QACA,KAAA;AAAA,QACA,WAAA;AAAA,QACA,GAAA;AAAA,QACA,MAAA,EAAO,UAAA;AAAA,QAEP,QAAA,kBAAA,GAAA;AAAA,UAAC,eAAA;AAAA,UAAA;AAAA,YACC,GAAA,EAAK,SAAA,CAAU,CAAC,QAAA,EAAU,GAAG,CAAC,CAAA;AAAA,YAC9B,MAAM,IAAA,IAAQ,CAAA;AAAA,YACd,IAAI,EAAA,IAAM,SAAA;AAAA,YACV,QAAA;AAAA,YACA,KAAA;AAAA,YAEA,OAAA,EAAS,QAAA;AAAA,YACR,GAAG;AAAA;AAAA;AACN;AAAA,KACF;AAAA,EAEJ;AACF;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/TextAreaField/TextAreaField.tsx"],"sourcesContent":["import { ChangeEvent, TextareaHTMLAttributes, forwardRef, useId, useRef } from 'react';\nimport { TextAreaElement, InputWrapper, WrapperProps } from '@/components/InputWrapper';\nimport { mergeRefs } from '@/utils/mergeRefs';\n\nexport interface TextAreaFieldProps\n extends\n Omit<WrapperProps, 'id' | 'children'>,\n Omit<\n TextareaHTMLAttributes<HTMLTextAreaElement>,\n 'children' | 'type' | 'value' | 'onChange' | 'dir'\n > {\n /** Number of visible text rows */\n rows?: number;\n /** The current value of the textarea */\n value?: string;\n /** Callback when the textarea value changes */\n onChange: (inputValue: string, e?: ChangeEvent<HTMLTextAreaElement>) => void;\n /** The orientation of the label relative to the input */\n orientation?: 'vertical' | 'horizontal';\n /** The direction/position of the label - start places label before, end places label after */\n dir?: 'start' | 'end';\n}\n\nexport const TextAreaField = forwardRef<HTMLTextAreaElement, TextAreaFieldProps>(\n (\n {\n rows,\n disabled,\n label,\n error,\n id,\n value = '',\n onChange: onChangeProp,\n orientation,\n dir,\n ...props\n },\n ref\n ) => {\n const inputRef = useRef<HTMLTextAreaElement>(null);\n const defaultId = useId();\n const onChange = (e: ChangeEvent<HTMLTextAreaElement>) => {\n onChangeProp(e.target.value, e);\n };\n\n return (\n <InputWrapper\n disabled={disabled}\n id={id ?? defaultId}\n label={label}\n error={error}\n orientation={orientation}\n dir={dir}\n resize=\"vertical\"\n >\n <TextAreaElement\n ref={mergeRefs([inputRef, ref])}\n rows={rows ?? 5}\n id={id ?? defaultId}\n disabled={disabled}\n value={value}\n onChange={onChange}\n {...props}\n />\n </InputWrapper>\n );\n }\n);\n"],"names":[],"mappings":";;;;;AAuBO,MAAM,aAAA,GAAgB,UAAA;AAAA,EAC3B,CACE;AAAA,IACE,IAAA;AAAA,IACA,QAAA;AAAA,IACA,KAAA;AAAA,IACA,KAAA;AAAA,IACA,EAAA;AAAA,IACA,KAAA,GAAQ,EAAA;AAAA,IACR,QAAA,EAAU,YAAA;AAAA,IACV,WAAA;AAAA,IACA,GAAA;AAAA,IACA,GAAG;AAAA,KAEL,GAAA,KACG;AACH,IAAA,MAAM,QAAA,GAAW,OAA4B,IAAI,CAAA;AACjD,IAAA,MAAM,YAAY,KAAA,EAAM;AACxB,IAAA,MAAM,QAAA,GAAW,CAAC,CAAA,KAAwC;AACxD,MAAA,YAAA,CAAa,CAAA,CAAE,MAAA,CAAO,KAAA,EAAO,CAAC,CAAA;AAAA,IAChC,CAAA;AAEA,IAAA,uBACE,GAAA;AAAA,MAAC,YAAA;AAAA,MAAA;AAAA,QACC,QAAA;AAAA,QACA,IAAI,EAAA,IAAM,SAAA;AAAA,QACV,KAAA;AAAA,QACA,KAAA;AAAA,QACA,WAAA;AAAA,QACA,GAAA;AAAA,QACA,MAAA,EAAO,UAAA;AAAA,QAEP,QAAA,kBAAA,GAAA;AAAA,UAAC,eAAA;AAAA,UAAA;AAAA,YACC,GAAA,EAAK,SAAA,CAAU,CAAC,QAAA,EAAU,GAAG,CAAC,CAAA;AAAA,YAC9B,MAAM,IAAA,IAAQ,CAAA;AAAA,YACd,IAAI,EAAA,IAAM,SAAA;AAAA,YACV,QAAA;AAAA,YACA,KAAA;AAAA,YACA,QAAA;AAAA,YACC,GAAG;AAAA;AAAA;AACN;AAAA,KACF;AAAA,EAEJ;AACF;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clickhouse/click-ui",
3
- "version": "0.14.0",
3
+ "version": "0.15.0-canary.g025425ce.0",
4
4
  "description": "Official ClickHouse design system react library",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -463,7 +463,7 @@
463
463
  "jsdom": "^24.0.0",
464
464
  "postcss": "^8.5.8",
465
465
  "postcss-modules": "^6.0.1",
466
- "prettier": "3.9.7",
466
+ "prettier": "3.9.9",
467
467
  "prop-types": "^15.8.1",
468
468
  "react": "18.3.1",
469
469
  "react-dom": "18.3.1",