@fuf-stack/pixels 1.3.2 → 1.3.3
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 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/pixels/pixels/packages/pixels/dist/SearchInput/index.cjs","../../src/SearchInput/SearchInput.tsx","../../src/SearchInput/index.ts"],"names":["SearchInput_default"],"mappings":"AAAA,0GAA8B;AAC9B;AACA;ACCA,8BAAyB;AACzB,oCAAyB;AAEzB,sCAAmC;AAEnC,oDAAkD;
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/pixels/pixels/packages/pixels/dist/SearchInput/index.cjs","../../src/SearchInput/SearchInput.tsx","../../src/SearchInput/index.ts"],"names":["SearchInput_default"],"mappings":"AAAA,0GAA8B;AAC9B;AACA;ACCA,8BAAyB;AACzB,oCAAyB;AAEzB,sCAAmC;AAEnC,oDAAkD;AA+Ed,+CAAA;AA5E7B,IAAM,cAAA,EAAgB,4BAAA;AAAG,EAC9B,KAAA,EAAO;AAAA;AAAA,IAEL,IAAA,EAAM,EAAA;AAAA;AAAA,IAEN,WAAA,EAAa,EAAA;AAAA;AAAA,IAEb,KAAA,EAAO,EAAA;AAAA;AAAA,IAEP,YAAA,EAAc;AAAA,EAChB;AACF,CAAC,CAAA;AA6BD,IAAM,YAAA,EAAc,CAAC;AAAA,EACnB,SAAA,EAAW,WAAA,EAAa,KAAA,CAAA;AAAA,EACxB,SAAA,EAAW,KAAA;AAAA,EACX,WAAA,EAAa,KAAA,CAAA;AAAA,EACb,QAAA;AAAA,EACA,YAAA,EAAc,KAAA,CAAA;AAAA,EACd,KAAA,EAAO,KAAA,CAAA;AAAA,EACP,aAAA,EAAe,KAAA,CAAA;AAAA,EACf,OAAA,EAAS,KAAA,CAAA;AAAA,EACT,aAAA,EAAe,KAAA;AACjB,CAAA,EAAA,GAAwB;AAEtB,EAAA,MAAM,CAAC,KAAA,EAAO,QAAQ,EAAA,E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EAAU,aAAA,CAAa,CAAA;AAAA,MAC/D,KAAA;AAAA,MACA,OAAA,EAAQ,UAAA;AAAA,MACR,UAAA,EAAY;AAAA,QACV,IAAA,EAAM,UAAA,CAAW,IAAA;AAAA,QACjB,WAAA,EAAa,UAAA,CAAW,WAAA;AAAA,QACxB,KAAA,EAAO,UAAA,CAAW,KAAA;AAAA,QAClB,YAAA,EAAc,UAAA,CAAW;AAAA,MAC3B;AAAA,IAAA;AAAA,EACF,CAAA;AAEJ,CAAA;AAEA,IAAO,oBAAA,EAAQ,WAAA;ADnCf;AACA;AE5DA,IAAOA,qBAAAA,EAAQ,mBAAA;AF8Df;AACE;AACA;AACF,kFAAC","file":"/home/runner/work/pixels/pixels/packages/pixels/dist/SearchInput/index.cjs","sourcesContent":[null,"import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { ChangeEvent, ReactNode } from 'react';\n\nimport { useState } from 'react';\nimport { FaSearch } from 'react-icons/fa';\n\nimport { Input as HeroInput } from '@heroui/input';\n\nimport { slugify, tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\n// input variants\nexport const inputVariants = tv({\n slots: {\n /** wrapper around the whole input */\n base: '',\n /** clear button */\n clearButton: '',\n /** actual input element */\n input: '',\n /** inner wrapper (HeroUI inputWrapper slot) */\n inputWrapper: 'bg-content1 group-data-[focus=true]:border-focus',\n },\n});\n\ntype VariantProps = TVProps<typeof inputVariants>;\ntype ClassName = TVClassName<typeof inputVariants>;\n\nexport interface SearchInputProps extends VariantProps {\n /** CSS class name */\n className?: ClassName;\n /** input field is disabled */\n disabled?: boolean;\n /** added content to the end of the input Field. */\n endContent?: ReactNode;\n /** optional initial value of the input */\n initialValue?: string;\n /** callback that is fired when the value is changed or cleared */\n onChange: (value: string | null) => void;\n /** form field placeholder */\n placeholder?: string;\n /** size of the input */\n size?: 'sm' | 'md' | 'lg';\n /** content added to the start of the input field */\n startContent?: ReactNode;\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n}\n\n/**\n * SearchInput component based on [HeroUI Input](https://www.heroui.com//docs/components/input)\n */\nconst SearchInput = ({\n className: _className = undefined,\n disabled = false,\n endContent = undefined,\n onChange,\n placeholder = undefined,\n size = undefined,\n startContent = undefined,\n testId = undefined,\n initialValue = undefined,\n}: SearchInputProps) => {\n // handle controlled value with initial value\n const [value, setValue] = useState(initialValue ?? '');\n\n const handleChange = (e?: ChangeEvent<HTMLInputElement>) => {\n setValue(e?.target?.value ?? '');\n onChange(e?.target?.value ?? null);\n };\n\n // classNames from slots\n const variants = inputVariants();\n const classNames = variantsToClassNames(variants, _className, 'base');\n\n return (\n <HeroInput\n isClearable\n // disable password manager integrations\n autoComplete=\"off\"\n data-testid={testId ? slugify(testId) : undefined}\n endContent={endContent}\n isDisabled={disabled}\n onChange={handleChange}\n onClear={handleChange}\n placeholder={placeholder}\n radius=\"sm\"\n size={size}\n startContent={startContent ?? <FaSearch className=\"opacity-50\" />}\n value={value}\n variant=\"bordered\"\n classNames={{\n base: classNames.base,\n clearButton: classNames.clearButton,\n input: classNames.input,\n inputWrapper: classNames.inputWrapper,\n }}\n />\n );\n};\n\nexport default SearchInput;\n","import SearchInput from './SearchInput';\n\nexport type { SearchInputProps } from './SearchInput';\n\nexport { SearchInput };\n\nexport default SearchInput;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/SearchInput/SearchInput.tsx","../../src/SearchInput/index.ts"],"sourcesContent":["import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { ChangeEvent, ReactNode } from 'react';\n\nimport { useState } from 'react';\nimport { FaSearch } from 'react-icons/fa';\n\nimport { Input as HeroInput } from '@heroui/input';\n\nimport { slugify, tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\n// input variants\nexport const inputVariants = tv({\n slots: {\n /** wrapper around the whole input */\n base: '',\n /** clear button */\n clearButton: '',\n /** actual input element */\n input: '',\n /** inner wrapper (HeroUI inputWrapper slot) */\n inputWrapper: 'bg-content1 group-data-[focus=true]:border-focus',\n },\n});\n\ntype VariantProps = TVProps<typeof inputVariants>;\ntype ClassName = TVClassName<typeof inputVariants>;\n\nexport interface SearchInputProps extends VariantProps {\n /** CSS class name */\n className?: ClassName;\n /** input field is disabled */\n disabled?: boolean;\n /** added content to the end of the input Field. */\n endContent?: ReactNode;\n /** optional initial value of the input */\n initialValue?: string;\n /** callback that is fired when the value is changed or cleared */\n onChange: (value: string | null) => void;\n /** form field placeholder */\n placeholder?: string;\n /** size of the input */\n size?: 'sm' | 'md' | 'lg';\n /** content added to the start of the input field */\n startContent?: ReactNode;\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n}\n\n/**\n * SearchInput component based on [HeroUI Input](https://www.heroui.com//docs/components/input)\n */\nconst SearchInput = ({\n className: _className = undefined,\n disabled = false,\n endContent = undefined,\n onChange,\n placeholder = undefined,\n size = undefined,\n startContent = undefined,\n testId = undefined,\n initialValue = undefined,\n}: SearchInputProps) => {\n // handle controlled value with initial value\n const [value, setValue] = useState(initialValue ?? '');\n\n const handleChange = (e?: ChangeEvent<HTMLInputElement>) => {\n setValue(e?.target?.value ?? '');\n onChange(e?.target?.value ?? null);\n };\n\n // classNames from slots\n const variants = inputVariants();\n const classNames = variantsToClassNames(variants, _className, 'base');\n\n return (\n <HeroInput\n isClearable\n data-testid={testId ? slugify(testId) : undefined}\n endContent={endContent}\n isDisabled={disabled}\n onChange={handleChange}\n onClear={handleChange}\n placeholder={placeholder}\n radius=\"sm\"\n size={size}\n startContent={startContent ?? <FaSearch className=\"opacity-50\" />}\n value={value}\n variant=\"bordered\"\n classNames={{\n base: classNames.base,\n clearButton: classNames.clearButton,\n input: classNames.input,\n inputWrapper: classNames.inputWrapper,\n }}\n />\n );\n};\n\nexport default SearchInput;\n","import SearchInput from './SearchInput';\n\nexport type { SearchInputProps } from './SearchInput';\n\nexport { SearchInput };\n\nexport default SearchInput;\n"],"mappings":";;;AAGA,SAAS,gBAAgB;AACzB,SAAS,gBAAgB;AAEzB,SAAS,SAAS,iBAAiB;AAEnC,SAAS,SAAS,IAAI,4BAA4B;
|
|
1
|
+
{"version":3,"sources":["../../src/SearchInput/SearchInput.tsx","../../src/SearchInput/index.ts"],"sourcesContent":["import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { ChangeEvent, ReactNode } from 'react';\n\nimport { useState } from 'react';\nimport { FaSearch } from 'react-icons/fa';\n\nimport { Input as HeroInput } from '@heroui/input';\n\nimport { slugify, tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\n// input variants\nexport const inputVariants = tv({\n slots: {\n /** wrapper around the whole input */\n base: '',\n /** clear button */\n clearButton: '',\n /** actual input element */\n input: '',\n /** inner wrapper (HeroUI inputWrapper slot) */\n inputWrapper: 'bg-content1 group-data-[focus=true]:border-focus',\n },\n});\n\ntype VariantProps = TVProps<typeof inputVariants>;\ntype ClassName = TVClassName<typeof inputVariants>;\n\nexport interface SearchInputProps extends VariantProps {\n /** CSS class name */\n className?: ClassName;\n /** input field is disabled */\n disabled?: boolean;\n /** added content to the end of the input Field. */\n endContent?: ReactNode;\n /** optional initial value of the input */\n initialValue?: string;\n /** callback that is fired when the value is changed or cleared */\n onChange: (value: string | null) => void;\n /** form field placeholder */\n placeholder?: string;\n /** size of the input */\n size?: 'sm' | 'md' | 'lg';\n /** content added to the start of the input field */\n startContent?: ReactNode;\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n}\n\n/**\n * SearchInput component based on [HeroUI Input](https://www.heroui.com//docs/components/input)\n */\nconst SearchInput = ({\n className: _className = undefined,\n disabled = false,\n endContent = undefined,\n onChange,\n placeholder = undefined,\n size = undefined,\n startContent = undefined,\n testId = undefined,\n initialValue = undefined,\n}: SearchInputProps) => {\n // handle controlled value with initial value\n const [value, setValue] = useState(initialValue ?? '');\n\n const handleChange = (e?: ChangeEvent<HTMLInputElement>) => {\n setValue(e?.target?.value ?? '');\n onChange(e?.target?.value ?? null);\n };\n\n // classNames from slots\n const variants = inputVariants();\n const classNames = variantsToClassNames(variants, _className, 'base');\n\n return (\n <HeroInput\n isClearable\n // disable password manager integrations\n autoComplete=\"off\"\n data-testid={testId ? slugify(testId) : undefined}\n endContent={endContent}\n isDisabled={disabled}\n onChange={handleChange}\n onClear={handleChange}\n placeholder={placeholder}\n radius=\"sm\"\n size={size}\n startContent={startContent ?? <FaSearch className=\"opacity-50\" />}\n value={value}\n variant=\"bordered\"\n classNames={{\n base: classNames.base,\n clearButton: classNames.clearButton,\n input: classNames.input,\n inputWrapper: classNames.inputWrapper,\n }}\n />\n );\n};\n\nexport default SearchInput;\n","import SearchInput from './SearchInput';\n\nexport type { SearchInputProps } from './SearchInput';\n\nexport { SearchInput };\n\nexport default SearchInput;\n"],"mappings":";;;AAGA,SAAS,gBAAgB;AACzB,SAAS,gBAAgB;AAEzB,SAAS,SAAS,iBAAiB;AAEnC,SAAS,SAAS,IAAI,4BAA4B;AA+Ed;AA5E7B,IAAM,gBAAgB,GAAG;AAAA,EAC9B,OAAO;AAAA;AAAA,IAEL,MAAM;AAAA;AAAA,IAEN,aAAa;AAAA;AAAA,IAEb,OAAO;AAAA;AAAA,IAEP,cAAc;AAAA,EAChB;AACF,CAAC;AA6BD,IAAM,cAAc,CAAC;AAAA,EACnB,WAAW,aAAa;AAAA,EACxB,WAAW;AAAA,EACX,aAAa;AAAA,EACb;AAAA,EACA,cAAc;AAAA,EACd,OAAO;AAAA,EACP,eAAe;AAAA,EACf,SAAS;AAAA,EACT,eAAe;AACjB,MAAwB;AAEtB,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAS,sCAAgB,EAAE;AAErD,QAAM,eAAe,CAAC,MAAsC;AAjE9D;AAkEI,cAAS,kCAAG,WAAH,mBAAW,UAAX,YAAoB,EAAE;AAC/B,cAAS,kCAAG,WAAH,mBAAW,UAAX,YAAoB,IAAI;AAAA,EACnC;AAGA,QAAM,WAAW,cAAc;AAC/B,QAAM,aAAa,qBAAqB,UAAU,YAAY,MAAM;AAEpE,SAC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