@accelint/design-toolkit 2.4.3 → 2.5.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/dist/components/accordion/index.d.ts +1 -1
- package/dist/components/accordion/index.js +1 -1
- package/dist/components/accordion/index.js.map +1 -1
- package/dist/components/accordion/styles.d.ts +1 -5
- package/dist/components/accordion/styles.js +1 -1
- package/dist/components/accordion/styles.js.map +1 -1
- package/dist/components/accordion/types.d.ts +9 -10
- package/dist/components/avatar/index.d.ts +4 -2
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/avatar/index.js.map +1 -1
- package/dist/components/avatar/styles.d.ts +16 -15
- package/dist/components/avatar/styles.js +1 -1
- package/dist/components/avatar/styles.js.map +1 -1
- package/dist/components/avatar/types.d.ts +7 -7
- package/dist/components/badge/index.d.ts +3 -2
- package/dist/components/badge/index.js +1 -1
- package/dist/components/badge/index.js.map +1 -1
- package/dist/components/badge/styles.js +1 -1
- package/dist/components/badge/styles.js.map +1 -1
- package/dist/components/badge/types.d.ts +3 -4
- package/dist/components/box/index.js +1 -1
- package/dist/components/box/index.js.map +1 -1
- package/dist/components/button/index.d.ts +6 -4
- package/dist/components/button/index.js +1 -1
- package/dist/components/button/index.js.map +1 -1
- package/dist/components/button/styles.d.ts +25 -24
- package/dist/components/button/styles.js +1 -1
- package/dist/components/button/styles.js.map +1 -1
- package/dist/components/button/types.d.ts +3 -5
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/checkbox/index.js.map +1 -1
- package/dist/components/checkbox/styles.d.ts +19 -18
- package/dist/components/checkbox/styles.js +1 -1
- package/dist/components/checkbox/styles.js.map +1 -1
- package/dist/components/chip/index.d.ts +4 -2
- package/dist/components/chip/index.js +1 -1
- package/dist/components/chip/index.js.map +1 -1
- package/dist/components/chip/styles.d.ts +70 -69
- package/dist/components/chip/styles.js +1 -1
- package/dist/components/chip/styles.js.map +1 -1
- package/dist/components/chip/types.d.ts +5 -5
- package/dist/components/classification-badge/index.d.ts +3 -2
- package/dist/components/classification-badge/index.js +1 -1
- package/dist/components/classification-badge/index.js.map +1 -1
- package/dist/components/classification-badge/styles.js +1 -1
- package/dist/components/classification-badge/styles.js.map +1 -1
- package/dist/components/classification-badge/types.d.ts +3 -4
- package/dist/components/classification-banner/index.d.ts +3 -2
- package/dist/components/classification-banner/index.js +1 -1
- package/dist/components/classification-banner/index.js.map +1 -1
- package/dist/components/classification-banner/styles.js +1 -1
- package/dist/components/classification-banner/styles.js.map +1 -1
- package/dist/components/classification-banner/types.d.ts +3 -4
- package/dist/components/color-picker/index.d.ts +45 -15
- package/dist/components/color-picker/index.js +1 -1
- package/dist/components/color-picker/index.js.map +1 -1
- package/dist/components/color-picker/styles.d.ts +42 -0
- package/dist/components/color-picker/styles.js +2 -0
- package/dist/components/color-picker/styles.js.map +1 -0
- package/dist/components/color-picker/types.d.ts +13 -0
- package/dist/components/color-picker/types.js +2 -0
- package/dist/components/color-picker/types.js.map +1 -0
- package/dist/components/combobox/index.d.ts +9 -14
- package/dist/components/combobox/index.js +1 -1
- package/dist/components/combobox/index.js.map +1 -1
- package/dist/components/date-field/index.d.ts +8 -24
- package/dist/components/date-field/index.js +1 -1
- package/dist/components/date-field/index.js.map +1 -1
- package/dist/components/date-field/styles.d.ts +69 -0
- package/dist/components/date-field/styles.js +2 -0
- package/dist/components/date-field/styles.js.map +1 -0
- package/dist/components/date-field/types.d.ts +29 -0
- package/dist/components/date-field/types.js +2 -0
- package/dist/components/date-field/types.js.map +1 -0
- package/dist/components/details-list/index.d.ts +59 -0
- package/dist/components/details-list/index.js +2 -0
- package/dist/components/details-list/index.js.map +1 -0
- package/dist/components/details-list/styles.d.ts +65 -0
- package/dist/components/details-list/styles.js +2 -0
- package/dist/components/details-list/styles.js.map +1 -0
- package/dist/components/details-list/types.d.ts +16 -0
- package/dist/components/details-list/types.js +2 -0
- package/dist/components/details-list/types.js.map +1 -0
- package/dist/components/dialog/index.d.ts +1 -0
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/dialog/index.js.map +1 -1
- package/dist/components/drawer/context.d.ts +13 -0
- package/dist/components/drawer/context.js +2 -0
- package/dist/components/drawer/context.js.map +1 -0
- package/dist/components/drawer/index.d.ts +48 -0
- package/dist/components/drawer/index.js +2 -0
- package/dist/components/drawer/index.js.map +1 -0
- package/dist/components/drawer/state.d.ts +26 -0
- package/dist/components/drawer/state.js +2 -0
- package/dist/components/drawer/state.js.map +1 -0
- package/dist/components/drawer/styles.d.ts +118 -0
- package/dist/components/drawer/styles.js +2 -0
- package/dist/components/drawer/styles.js.map +1 -0
- package/dist/components/drawer/types.d.ts +279 -0
- package/dist/components/drawer/types.js +2 -0
- package/dist/components/drawer/types.js.map +1 -0
- package/dist/components/hero/index.d.ts +45 -0
- package/dist/components/hero/index.js +2 -0
- package/dist/components/hero/index.js.map +1 -0
- package/dist/components/hero/styles.d.ts +48 -0
- package/dist/components/hero/styles.js +2 -0
- package/dist/components/hero/styles.js.map +1 -0
- package/dist/components/hero/types.d.ts +13 -0
- package/dist/components/hero/types.js +2 -0
- package/dist/components/hero/types.js.map +1 -0
- package/dist/components/icon/index.d.ts +3 -2
- package/dist/components/icon/index.js +1 -1
- package/dist/components/icon/index.js.map +1 -1
- package/dist/components/icon/styles.js +1 -1
- package/dist/components/icon/styles.js.map +1 -1
- package/dist/components/icon/types.d.ts +4 -5
- package/dist/components/input/index.d.ts +1 -0
- package/dist/components/input/index.js +1 -1
- package/dist/components/input/index.js.map +1 -1
- package/dist/components/input/styles.js +1 -1
- package/dist/components/input/styles.js.map +1 -1
- package/dist/components/input/types.d.ts +1 -0
- package/dist/components/label/index.d.ts +3 -2
- package/dist/components/label/index.js +1 -1
- package/dist/components/label/index.js.map +1 -1
- package/dist/components/label/styles.js +1 -1
- package/dist/components/label/styles.js.map +1 -1
- package/dist/components/label/types.d.ts +2 -3
- package/dist/components/menu/index.d.ts +16 -21
- package/dist/components/menu/index.js +1 -1
- package/dist/components/menu/index.js.map +1 -1
- package/dist/components/menu/styles.js +1 -1
- package/dist/components/menu/styles.js.map +1 -1
- package/dist/components/navigation-stack/index.d.ts +20 -0
- package/dist/components/navigation-stack/index.js +2 -0
- package/dist/components/navigation-stack/index.js.map +1 -0
- package/dist/components/navigation-stack/types.d.ts +31 -0
- package/dist/components/navigation-stack/types.js +2 -0
- package/dist/components/navigation-stack/types.js.map +1 -0
- package/dist/components/options/index.d.ts +28 -22
- package/dist/components/options/index.js +1 -1
- package/dist/components/options/index.js.map +1 -1
- package/dist/components/options/styles.d.ts +72 -0
- package/dist/components/options/styles.js +2 -0
- package/dist/components/options/styles.js.map +1 -0
- package/dist/components/options/types.d.ts +29 -0
- package/dist/components/options/types.js +2 -0
- package/dist/components/options/types.js.map +1 -0
- package/dist/components/popover/index.js +1 -1
- package/dist/components/popover/index.js.map +1 -1
- package/dist/components/popover/styles.d.ts +16 -15
- package/dist/components/popover/styles.js +1 -1
- package/dist/components/popover/styles.js.map +1 -1
- package/dist/components/query-builder/action-element.js +1 -1
- package/dist/components/query-builder/action-element.js.map +1 -1
- package/dist/components/query-builder/constants.js +1 -1
- package/dist/components/query-builder/constants.js.map +1 -1
- package/dist/components/query-builder/group.js +1 -1
- package/dist/components/query-builder/group.js.map +1 -1
- package/dist/components/query-builder/index.d.ts +5 -20
- package/dist/components/query-builder/index.js +1 -1
- package/dist/components/query-builder/index.js.map +1 -1
- package/dist/components/query-builder/rule.js +1 -1
- package/dist/components/query-builder/rule.js.map +1 -1
- package/dist/components/query-builder/types.d.ts +22 -0
- package/dist/components/query-builder/types.js +2 -0
- package/dist/components/query-builder/types.js.map +1 -0
- package/dist/components/query-builder/utils.js +1 -1
- package/dist/components/query-builder/utils.js.map +1 -1
- package/dist/components/query-builder/value-editor.js +1 -1
- package/dist/components/query-builder/value-editor.js.map +1 -1
- package/dist/components/query-builder/value-selector.js +1 -1
- package/dist/components/query-builder/value-selector.js.map +1 -1
- package/dist/components/radio/index.js +1 -1
- package/dist/components/radio/index.js.map +1 -1
- package/dist/components/radio/styles.d.ts +19 -18
- package/dist/components/radio/styles.js +1 -1
- package/dist/components/radio/styles.js.map +1 -1
- package/dist/components/radio/types.d.ts +2 -3
- package/dist/components/search-field/index.d.ts +56 -15
- package/dist/components/search-field/index.js +1 -1
- package/dist/components/search-field/index.js.map +1 -1
- package/dist/components/search-field/styles.d.ts +53 -0
- package/dist/components/search-field/styles.js +2 -0
- package/dist/components/search-field/styles.js.map +1 -0
- package/dist/components/search-field/types.d.ts +25 -0
- package/dist/components/search-field/types.js +2 -0
- package/dist/components/search-field/types.js.map +1 -0
- package/dist/components/skeleton/index.d.ts +42 -0
- package/dist/components/skeleton/index.js +2 -0
- package/dist/components/skeleton/index.js.map +1 -0
- package/dist/components/skeleton/styles.d.ts +23 -0
- package/dist/components/skeleton/styles.js +2 -0
- package/dist/components/skeleton/styles.js.map +1 -0
- package/dist/components/skeleton/types.d.ts +8 -0
- package/dist/components/skeleton/types.js +2 -0
- package/dist/components/skeleton/types.js.map +1 -0
- package/dist/components/slider/index.js +1 -1
- package/dist/components/slider/index.js.map +1 -1
- package/dist/components/switch/index.d.ts +3 -2
- package/dist/components/switch/index.js +1 -1
- package/dist/components/switch/index.js.map +1 -1
- package/dist/components/switch/styles.d.ts +13 -12
- package/dist/components/switch/styles.js +1 -1
- package/dist/components/switch/styles.js.map +1 -1
- package/dist/components/switch/types.d.ts +2 -3
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/tabs/index.js.map +1 -1
- package/dist/components/text-area-field/index.d.ts +4 -3
- package/dist/components/text-area-field/index.js +1 -1
- package/dist/components/text-area-field/index.js.map +1 -1
- package/dist/components/text-area-field/styles.d.ts +19 -18
- package/dist/components/text-area-field/styles.js +1 -1
- package/dist/components/text-area-field/styles.js.map +1 -1
- package/dist/components/text-area-field/types.d.ts +2 -3
- package/dist/components/text-field/index.d.ts +4 -2
- package/dist/components/text-field/index.js +1 -1
- package/dist/components/text-field/index.js.map +1 -1
- package/dist/components/text-field/styles.d.ts +19 -18
- package/dist/components/text-field/styles.js +1 -1
- package/dist/components/text-field/styles.js.map +1 -1
- package/dist/components/text-field/types.d.ts +4 -4
- package/dist/components/tooltip/index.d.ts +14 -28
- package/dist/components/tooltip/index.js +1 -1
- package/dist/components/tooltip/index.js.map +1 -1
- package/dist/components/tooltip/styles.d.ts +5 -0
- package/dist/components/tooltip/styles.js +2 -0
- package/dist/components/tooltip/styles.js.map +1 -0
- package/dist/components/tooltip/types.d.ts +8 -0
- package/dist/components/tooltip/types.js +2 -0
- package/dist/components/tooltip/types.js.map +1 -0
- package/dist/icons/catalog.js +1 -1
- package/dist/index.d.ts +54 -28
- package/dist/index.js +1 -1
- package/dist/lib/react.d.ts +13 -12
- package/dist/lib/react.js +4 -4
- package/dist/lib/react.js.map +1 -1
- package/dist/lib/types.d.ts +6 -2
- package/dist/lib/utils.js +1 -1
- package/dist/lib/utils.js.map +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/styles.css +1341 -278
- package/dist/tokens/index.js +1 -1
- package/dist/tokens/index.js.map +1 -1
- package/dist/variants/variants.css +6 -0
- package/package.json +79 -56
- package/dist/components/options-item/index.d.ts +0 -30
- package/dist/components/options-item/index.js +0 -2
- package/dist/components/options-item/index.js.map +0 -1
- package/dist/components/query-builder/example-configuration.d.ts +0 -30
- package/dist/components/query-builder/example-configuration.js +0 -2
- package/dist/components/query-builder/example-configuration.js.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/query-builder/value-editor.tsx"],"names":["name","rule","value","validator","p","jsx","u","h","values","m","option","defaultOptions","type","rest","P","y","valid","reasons","C","inputType","g","valueEditors","RadioGroupValueEditor","SelectValueEditor","SwitchValueEditor","TextValueEditor","ruleProp","props","V","useCallback","b","valueAsArray","index","handleRangeStartChange","multiValueHandler","handleRangeEndChange","valueEditorType","operator","multiValueOperators","D","A","term"],"mappings":"4eA6BA,SACE,CAAA,CAAA,CAAA,QACA,CAAA,CAAA,CAAA,SAAaA,CAAM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CAAA,CAAA,CAAA,cAGF,CAAA,CARQ,CAAA,CAAA,CAAGhC,CAAI,CAAA,CAAA,CAAA,CAAIyC,CAAI,EASzB,CACD,EACH,EAKFpC,CAAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAAC,GACC,CAAA,KAAA,CAAA,CAAA,QAAS,CAAGqB,GAAAA,CAAO,EACrB,CAEJ,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA","file":"value-editor.js","sourcesContent":["// __private-exports\n/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { useCallback } from 'react';\nimport {\n type InputType,\n type ValueEditorProps,\n useValueEditor,\n} from 'react-querybuilder';\nimport { Checkbox } from '../checkbox';\nimport { Radio } from '../radio';\nimport { Switch } from '../switch';\nimport { TextAreaField } from '../text-area-field';\nimport { TextField } from '../text-field';\nimport type { QueryBuilderValueEditors } from './';\nimport { multiValueOperators } from './constants';\nimport { getValidationResult } from './utils';\nimport { ValueSelector } from './value-selector';\n\nfunction CheckboxValueEditor({\n disabled,\n fieldData: { name, validator },\n handleOnChange,\n rule,\n value,\n}: ValueEditorProps) {\n const { valid } = getValidationResult(rule, validator);\n\n return (\n <Checkbox\n isDisabled={disabled}\n isSelected={value}\n onChange={handleOnChange}\n aria-invalid={!valid}\n aria-label={name}\n />\n );\n}\n\nfunction RadioGroupValueEditor({\n disabled,\n fieldData: { name, validator },\n handleOnChange,\n rule,\n value,\n values,\n}: ValueEditorProps) {\n const { valid } = getValidationResult(rule, validator);\n\n return (\n <Radio.Group\n value={value}\n isDisabled={disabled}\n onChange={handleOnChange}\n aria-invalid={!valid}\n aria-label={name}\n aria-labelledby={name}\n >\n {values?.map((option) => (\n <Radio key={option.name} value={option.value}>\n {option.label}\n </Radio>\n ))}\n </Radio.Group>\n );\n}\n\nconst defaultOptions: unknown[] = [];\n\nfunction SelectValueEditor({\n disabled,\n fieldData: { name, validator },\n handleOnChange,\n rule,\n type,\n value,\n values = defaultOptions,\n ...rest\n}: ValueEditorProps) {\n const { valid } = getValidationResult(rule, validator);\n\n return (\n <ValueSelector\n {...rest}\n disabled={disabled}\n multiple={type === 'multiselect'}\n options={values}\n title={name}\n validation={!valid}\n value={value}\n handleOnChange={handleOnChange}\n aria-labelledby={name}\n />\n );\n}\n\nfunction SwitchValueEditor({\n disabled,\n fieldData: { name, validator },\n handleOnChange,\n rule,\n value,\n}: ValueEditorProps) {\n const { valid } = getValidationResult(rule, validator);\n\n return (\n <Switch\n isDisabled={disabled}\n isSelected={Boolean(value)}\n onChange={handleOnChange}\n aria-invalid={!valid}\n aria-label={name}\n aria-labelledby={name}\n />\n );\n}\n\nfunction TextValueEditor({\n disabled,\n fieldData: { name, placeholder, validator },\n handleOnChange,\n inputType,\n rule,\n value,\n}: ValueEditorProps) {\n const { valid, reasons } = getValidationResult(rule, validator);\n\n return (\n <TextField\n inputProps={{ placeholder }}\n type={(inputType as InputType) ?? 'text'}\n size='small'\n value={value}\n isDisabled={disabled}\n isInvalid={!valid}\n onChange={handleOnChange}\n aria-invalid={!valid}\n aria-label={name}\n aria-labelledby={name}\n errorMessage={reasons?.join('/n')}\n />\n );\n}\n\nfunction TextareaValueEditor({\n disabled,\n fieldData: { name, placeholder, validator },\n handleOnChange,\n rule,\n value,\n}: ValueEditorProps) {\n const { valid, reasons } = getValidationResult(rule, validator);\n\n return (\n <TextAreaField\n size='small'\n errorMessage={reasons?.join('/n')}\n inputProps={{ placeholder }}\n value={value}\n isDisabled={disabled}\n isInvalid={!valid}\n onChange={handleOnChange}\n aria-label={name}\n aria-invalid={!valid}\n aria-labelledby={name}\n />\n );\n}\n\nconst valueEditors: QueryBuilderValueEditors = {\n checkbox: CheckboxValueEditor,\n radio: RadioGroupValueEditor,\n select: SelectValueEditor,\n switch: SwitchValueEditor,\n text: TextValueEditor,\n textarea: TextareaValueEditor,\n};\n\nexport function ValueEditor(props: ValueEditorProps) {\n const {\n fieldData: { name, valueEditorType },\n operator,\n rule: ruleProp,\n } = props;\n\n const { valueAsArray, multiValueHandler } = useValueEditor({\n ...props,\n skipHook: true,\n });\n\n const rule = useCallback(\n (index: number) => ({\n ...ruleProp,\n value: valueAsArray[index],\n }),\n [ruleProp, valueAsArray],\n );\n\n const handleRangeStartChange = useCallback(\n (value: string) => multiValueHandler(value, 0),\n [multiValueHandler],\n );\n\n const handleRangeEndChange = useCallback(\n (value: string) => multiValueHandler(value, 1),\n [multiValueHandler],\n );\n\n const type =\n (typeof valueEditorType === 'function'\n ? valueEditorType(operator)\n : valueEditorType) ?? 'text';\n\n const Editor = valueEditors?.[type];\n\n if (operator === 'null' || operator === 'notNull' || !Editor) {\n return null;\n }\n\n if (multiValueOperators.includes(operator)) {\n return (\n <>\n {['start', 'end'].map((term, index) => (\n <div key={`${name}-${term}`}>\n <Editor\n {...props}\n rule={rule(index)}\n value={valueAsArray[index]}\n handleOnChange={\n index ? handleRangeEndChange : handleRangeStartChange\n }\n />\n </div>\n ))}\n </>\n );\n }\n\n return (\n <div>\n <Editor {...props} />\n </div>\n );\n}\n"]}
|
1
|
+
{"version":3,"sources":["../../../src/components/query-builder/value-editor.tsx"],"names":["value","valid","getValidationResult","disabled","p","u","y","rule","validator","b","name","values","defaultOptions","type","jsx","h","handleOnChange","inputType","TextField","placeholder","P","TextareaValueEditor","TextAreaField","g","valueEditors","CheckboxValueEditor","SelectValueEditor","ruleProp","props","valueAsArray","useValueEditor","useCallback","index","multiValueHandler","v","valueEditorType","operator","Editor","multiValueOperators","Fragment","C","A","handleRangeStartChange","term"],"mappings":"ggBA+BE,SACA,CAAA,CAAA,CAAA,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CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAAhC,GAAA,CAAA,KAAA,CAAA,CAAA,QAAA,CAAAA,GAAA,CAAA,CAAA,CAAA,CAAA,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA","file":"value-editor.js","sourcesContent":["// __private-exports\n/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n'use client';\n\nimport 'client-only';\nimport { useCallback } from 'react';\nimport { type ValueEditorProps, useValueEditor } from 'react-querybuilder';\nimport { Checkbox } from '../checkbox';\nimport type { InputProps } from '../input/types';\nimport { Radio } from '../radio';\nimport { Switch } from '../switch';\nimport { TextAreaField } from '../text-area-field';\nimport { TextField } from '../text-field';\nimport { multiValueOperators } from './constants';\nimport type { QueryBuilderValueEditors } from './types';\nimport { getValidationResult } from './utils';\nimport { ValueSelector } from './value-selector';\n\nfunction CheckboxValueEditor({\n disabled,\n fieldData: { name, validator },\n handleOnChange,\n rule,\n value,\n}: ValueEditorProps) {\n const { valid } = getValidationResult(rule, validator);\n\n return (\n <Checkbox\n isDisabled={disabled}\n isSelected={value}\n onChange={handleOnChange}\n aria-invalid={!valid}\n aria-label={name}\n />\n );\n}\n\nfunction RadioGroupValueEditor({\n disabled,\n fieldData: { name, validator },\n handleOnChange,\n rule,\n value,\n values,\n}: ValueEditorProps) {\n const { valid } = getValidationResult(rule, validator);\n\n return (\n <Radio.Group\n value={value}\n isDisabled={disabled}\n onChange={handleOnChange}\n aria-invalid={!valid}\n aria-label={name}\n aria-labelledby={name}\n >\n {values?.map((option) => (\n <Radio key={option.name} value={option.value}>\n {option.label}\n </Radio>\n ))}\n </Radio.Group>\n );\n}\n\nconst defaultOptions: unknown[] = [];\n\nfunction SelectValueEditor({\n disabled,\n fieldData: { name, validator },\n handleOnChange,\n rule,\n type,\n value,\n values = defaultOptions,\n ...rest\n}: ValueEditorProps) {\n const { valid } = getValidationResult(rule, validator);\n\n return (\n <ValueSelector\n {...rest}\n disabled={disabled}\n multiple={type === 'multiselect'}\n options={values}\n title={name}\n validation={!valid}\n value={value}\n handleOnChange={handleOnChange}\n aria-labelledby={name}\n />\n );\n}\n\nfunction SwitchValueEditor({\n disabled,\n fieldData: { name, validator },\n handleOnChange,\n rule,\n value,\n}: ValueEditorProps) {\n const { valid } = getValidationResult(rule, validator);\n\n return (\n <Switch\n isDisabled={disabled}\n isSelected={Boolean(value)}\n onChange={handleOnChange}\n aria-invalid={!valid}\n aria-label={name}\n aria-labelledby={name}\n />\n );\n}\n\nfunction TextValueEditor({\n disabled,\n fieldData: { name, placeholder, validator },\n handleOnChange,\n inputType,\n rule,\n value,\n}: ValueEditorProps) {\n const { valid, reasons } = getValidationResult(rule, validator);\n\n return (\n <TextField\n inputProps={{\n placeholder,\n type: (inputType as InputProps['type']) ?? 'text',\n }}\n size='small'\n value={value}\n isDisabled={disabled}\n isInvalid={!valid}\n onChange={handleOnChange}\n aria-invalid={!valid}\n aria-label={name}\n aria-labelledby={name}\n errorMessage={reasons?.join('/n')}\n />\n );\n}\n\nfunction TextareaValueEditor({\n disabled,\n fieldData: { name, placeholder, validator },\n handleOnChange,\n rule,\n value,\n}: ValueEditorProps) {\n const { valid, reasons } = getValidationResult(rule, validator);\n\n return (\n <TextAreaField\n size='small'\n errorMessage={reasons?.join('/n')}\n inputProps={{ placeholder }}\n value={value}\n isDisabled={disabled}\n isInvalid={!valid}\n onChange={handleOnChange}\n aria-label={name}\n aria-invalid={!valid}\n aria-labelledby={name}\n />\n );\n}\n\nconst valueEditors: QueryBuilderValueEditors = {\n checkbox: CheckboxValueEditor,\n radio: RadioGroupValueEditor,\n select: SelectValueEditor,\n switch: SwitchValueEditor,\n text: TextValueEditor,\n textarea: TextareaValueEditor,\n};\n\nexport function ValueEditor(props: ValueEditorProps) {\n const {\n fieldData: { name, valueEditorType },\n operator,\n rule: ruleProp,\n } = props;\n\n const { valueAsArray, multiValueHandler } = useValueEditor({\n ...props,\n skipHook: true,\n });\n\n const rule = useCallback(\n (index: number) => ({\n ...ruleProp,\n value: valueAsArray[index],\n }),\n [ruleProp, valueAsArray],\n );\n\n const handleRangeStartChange = useCallback(\n (value: string) => multiValueHandler(value, 0),\n [multiValueHandler],\n );\n\n const handleRangeEndChange = useCallback(\n (value: string) => multiValueHandler(value, 1),\n [multiValueHandler],\n );\n\n const type =\n (typeof valueEditorType === 'function'\n ? valueEditorType(operator)\n : valueEditorType) ?? 'text';\n\n const Editor = valueEditors?.[type];\n\n if (operator === 'null' || operator === 'notNull' || !Editor) {\n return null;\n }\n\n if (multiValueOperators.includes(operator)) {\n return (\n <>\n {['start', 'end'].map((term, index) => (\n <div key={`${name}-${term}`}>\n <Editor\n {...props}\n rule={rule(index)}\n value={valueAsArray[index]}\n handleOnChange={\n index ? handleRangeEndChange : handleRangeStartChange\n }\n />\n </div>\n ))}\n </>\n );\n }\n\n return (\n <div>\n <Editor {...props} />\n </div>\n );\n}\n"]}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import {
|
1
|
+
import {jsx}from'react/jsx-runtime';import'client-only';import {useCallback,useMemo}from'react';import {useValueSelector,isOptionGroupArray}from'react-querybuilder';import {ComboBox}from'../combobox/index.js';import {Options}from'../options/index.js';function K(i){const{handleOnChange:n,disabled:m,listsAsArrays:p,options:l,multiple:u,title:y,validation:V,value:c,...b}=i,{onChange:s,val:o}=useValueSelector({handleOnChange:n,listsAsArrays:p,multiple:u,value:c}),d=useCallback(e=>{e&&s(`${e}`);},[s]),h=useMemo(()=>isOptionGroupArray(l)?l.map(e=>jsx(Options.Section,{header:e.label,children:e.options.map(t=>jsx(Options.Item,{id:t.name,children:t.label},t.name))},e.label)):l.map(e=>jsx(Options.Item,{textValue:e.label,id:e.name,children:e.label},e.name)),[l]);return jsx(ComboBox,{size:"small",isDisabled:m,...b,selectedKey:Array.isArray(o)?o[0]:o,"aria-labelledby":y,onSelectionChange:d,children:h})}export{K as ValueSelector};//# sourceMappingURL=value-selector.js.map
|
2
2
|
//# sourceMappingURL=value-selector.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/query-builder/value-selector.tsx"],"names":["
|
1
|
+
{"version":3,"sources":["../../../src/components/query-builder/value-selector.tsx"],"names":["multiple","title","validation","value","onChange","val","useValueSelector","handleOnChange","O","selection","S","options","useMemo","isOptionGroupArray","optionsProp","section","jsx","Options","C","r","option","a","A","disabled","handleSelectionChange"],"mappings":"2PA2BI,SAAA,CAAA,CAAA,CAAA,CAAA,CAAA,oBAEA,CAAA,CAAA,CAAA,QACA,CAAA,CAAA,CAAA,eACAA,CAAAA,OACAC,CAAAA,CACA,CAAA,QAAA,CAAA,CAAAC,MACA,CAAA,CAAAC,CAAAA,UAIM,CAAA,CAAA,CAAA,KAAA,CAAAC,CAAAA,CAAU,GAAA,CAAAC,CAAI,CAAA,CAAIC,CAAAA,CAAiB,QACzC,CAAA,CAAA,CAAA,GAAA,CAAA,CAAAC,CAAAA,CACAC,gCACA,CAAA,CAAA,CAAA,aACAL,CACF,CAAC,CAAA,QAG4B,CACrBM,CAAAA,CAAAA,KACO,CAAGA,CAAS,EAAE,CAE3B,CAAA,CACAC,WAACN,CAAQ,CACX,EAEMO,CAAAA,CAAUC,EACd,CAAA,CAAA,CAAA,EACEC,CAAmBC,CAAW,CAAA,EAC1BA,CAAAA,CAAY,IAAKC,CAAAA,CAAAA,CACfC,OAAAA,CAACC,IAAQC,kBAAA,CAAA,CAAA,CAAA,CAAA,CAAR,CAAoC,GAAA,CAAA,CAAA,EAAQH,GAAAA,CAAQI,eAClD,CAAA,CAAA,MAAQ,QAAQ,CAAA,QACdF,CAAAA,CAAQ,CAAA,OAAK,CAAIG,GAAO,CAAA,CAAA,EACtBC,GAAA,CAAAF,OAAA,CAAA,IAAA,CAAAC,GAAO,CAAA,CAAA,CAAA,IAD0BA,CAAO,QAFzBL,CAAAA,CAAQ,CAAA,KAO/B,CAAA,CACDD,CAAAA,CAAY,IAAKM,CAAAA,CAAAA,CACfJ,CAAAA,CAACC,MAAQ,CAAR,CACC,CAAA,CAAA,CAAA,GAAA,CAAA,CAAA,EAAWG,GAAAA,CAAOD,YAClB,CAAA,CAAA,SAGC,CAAA,CAAA,CAAA,KAAAC,CAAAA,SAFIA,CAAO,QAKrBN,CAAW,CACd,MAEA,CAAA,CAAA,CACEE,CAAAA,IACE,CAAA,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,OACLK,GAAA,CAAAC,QAAA,CAAA,CAAA,IAAYC,mBAEC,CAAA,CAAA,CAAA,GAAM,CAAA,CAAA,WAAmB,CAAC,KACvC,CAAA,OAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAiBtB,CAAAA,CACjB,kBAAmBuB,CAAAA,CAElB,iBAGP,CAAA,CAAA,CAAA,QAAA,CAAA,CAAA,CAAA,CAAA","file":"value-selector.js","sourcesContent":["// __private-exports\n/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n'use client';\n\nimport 'client-only';\nimport type { Key } from '@react-types/shared';\nimport { useCallback, useMemo } from 'react';\nimport {\n type ValueSelectorProps,\n isOptionGroupArray,\n useValueSelector,\n} from 'react-querybuilder';\nimport { ComboBox } from '../combobox';\nimport { Options } from '../options';\n\nexport function ValueSelector(props: ValueSelectorProps) {\n const {\n handleOnChange,\n disabled,\n listsAsArrays,\n options: optionsProp,\n multiple,\n title,\n validation,\n value,\n ...rest\n } = props;\n\n const { onChange, val } = useValueSelector({\n handleOnChange,\n listsAsArrays,\n multiple,\n value,\n });\n\n const handleSelectionChange = useCallback(\n (selection: Key | null) => {\n if (selection) {\n onChange(`${selection}`);\n }\n },\n [onChange],\n );\n\n const options = useMemo(\n () =>\n isOptionGroupArray(optionsProp)\n ? optionsProp.map((section) => (\n <Options.Section key={section.label} header={section.label}>\n {section.options.map((option) => (\n <Options.Item id={option.name} key={option.name}>\n {option.label}\n </Options.Item>\n ))}\n </Options.Section>\n ))\n : optionsProp.map((option) => (\n <Options.Item\n textValue={option.label}\n id={option.name}\n key={option.name}\n >\n {option.label}\n </Options.Item>\n )),\n [optionsProp],\n );\n\n return (\n <ComboBox\n size='small'\n isDisabled={disabled}\n {...rest}\n selectedKey={Array.isArray(val) ? val[0] : val}\n aria-labelledby={title}\n onSelectionChange={handleSelectionChange}\n >\n {options}\n </ComboBox>\n );\n}\n"]}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import'client-only';import {createContext}from'react';import {Radio,composeRenderProps,useContextProps,RadioGroup}from'react-aria-components';import {Label}from'../label/index.js';import {RadioStyles}from'./styles.js';
|
1
|
+
import {jsx,jsxs,Fragment}from'react/jsx-runtime';import'client-only';import {createContext}from'react';import {Radio,composeRenderProps,useContextProps,RadioGroup}from'react-aria-components';import {Label}from'../label/index.js';import {RadioStyles}from'./styles.js';const {group:y,groupLabel:C,radio:A,control:L,label:g}=RadioStyles(),D=createContext(null);function p({ref:o,...r}){[r,o]=useContextProps(r,o??null,D);const{children:s,classNames:a,label:t,...m}=r;return jsx(RadioGroup,{...m,ref:o,className:composeRenderProps(a?.group,l=>y({className:l})),children:composeRenderProps(s,(l,{isDisabled:R,isRequired:c})=>jsxs(Fragment,{children:[t&&jsx(Label,{className:C({className:a?.label}),isDisabled:R,isRequired:c,children:t}),l]}))})}p.displayName="Radio.Group";function d({classNames:o,children:r,...s}){return jsx(Radio,{...s,className:composeRenderProps(o?.radio,a=>A({className:a})),children:composeRenderProps(r,a=>jsxs(Fragment,{children:[jsx("span",{className:L({className:o?.control})}),jsx("span",{className:g({className:o?.label}),children:a})]}))})}d.displayName="Radio",d.Group=p;export{d as Radio,D as RadioContext};//# sourceMappingURL=index.js.map
|
2
2
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/radio/index.tsx"],"names":["
|
1
|
+
{"version":3,"sources":["../../../src/components/radio/index.tsx"],"names":["groupLabel","RadioContext","x","G","props","useContextProps","ref","P","classNames","rest","AriaRadioGroup","b","composeRenderProps","className","group","children","i","isDisabled","isRequired","u","label","jsx","e","RadioGroup","AriaRadio","radio"],"mappings":"4QA0Be,MAAA,CAAA,KAAAA,CAAAA,CAAY,CAAA,UAAO,CAAA,CAAA,CAAA,KAAS,CAAA,CAAA,CAAA,OAAsB,EAEpDC,CAAAA,KACkD,CAAA,CAAI,CAAA,CAEnEC,WAAA,EAAA,CAAA,CAAA,CAAAC,aAAA,CAAA,IAAsB,EAAA,SAAc,CAAoB,CACtD,CAACC,GAAU,CAAA,CAAIC,CAAAA,GAAuBC,GAAO,CAAA,CAAA,CAAA,CAAA,CAAML,CAAY,CAAAM,eAE/D,CAAA,CAAA,CAAA,CAAA,EAAQ,IAAA,CAAA,CAAA,CAAA,CAAA,KAAU,CAAA,QAAAC,CAAAA,CAAY,CAAA,UAAUC,CAAK,EAAIL,KAEjD,CAAA,CAAA,CAAA,GACGM,CAAAA,CAAA,CACE,SACIJ,GAAAA,CACLK,UAAA,CAAA,CAAA,GAAA,CAAA,CAAA,GAAWC,CAAmBJ,CAAAA,CAAAA,SAAoBK,CAChDC,kBAAAA,CAAM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A,CAAAA,KAAAA,CAAAA,CAAAA","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n'use client';\n\nimport 'client-only';\nimport { createContext } from 'react';\nimport {\n Radio as AriaRadio,\n RadioGroup as AriaRadioGroup,\n type ContextValue,\n composeRenderProps,\n useContextProps,\n} from 'react-aria-components';\nimport { Label } from '../label';\nimport { RadioStyles } from './styles';\nimport type { RadioGroupProps, RadioProps } from './types';\n\nconst { group, groupLabel, radio, control, label } = RadioStyles();\n\nexport const RadioContext =\n createContext<ContextValue<RadioGroupProps, HTMLDivElement>>(null);\n\nfunction RadioGroup({ ref, ...props }: RadioGroupProps) {\n [props, ref] = useContextProps(props, ref ?? null, RadioContext);\n\n const { children, classNames, label, ...rest } = props;\n\n return (\n <AriaRadioGroup\n {...rest}\n ref={ref}\n className={composeRenderProps(classNames?.group, (className) =>\n group({ className }),\n )}\n >\n {composeRenderProps(children, (children, { isDisabled, isRequired }) => (\n <>\n {label && (\n <Label\n className={groupLabel({ className: classNames?.label })}\n isDisabled={isDisabled}\n isRequired={isRequired}\n >\n {label}\n </Label>\n )}\n {children}\n </>\n ))}\n </AriaRadioGroup>\n );\n}\nRadioGroup.displayName = 'Radio.Group';\n\nexport function Radio({ classNames, children, ...rest }: RadioProps) {\n return (\n <AriaRadio\n {...rest}\n className={composeRenderProps(classNames?.radio, (className) =>\n radio({ className }),\n )}\n >\n {composeRenderProps(children, (children) => (\n <>\n <span className={control({ className: classNames?.control })} />\n <span className={label({ className: classNames?.label })}>\n {children}\n </span>\n </>\n ))}\n </AriaRadio>\n );\n}\nRadio.displayName = 'Radio';\nRadio.Group = RadioGroup;\n"]}
|
@@ -1,23 +1,24 @@
|
|
1
1
|
import * as tailwind_variants from 'tailwind-variants';
|
2
|
+
import * as tailwind_merge from 'tailwind-merge';
|
2
3
|
|
3
4
|
declare const RadioStyles: tailwind_variants.TVReturnType<{
|
4
5
|
[key: string]: {
|
5
|
-
[key: string]:
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
groupLabel?:
|
10
|
-
control?:
|
6
|
+
[key: string]: tailwind_merge.ClassNameValue | {
|
7
|
+
label?: tailwind_merge.ClassNameValue;
|
8
|
+
group?: tailwind_merge.ClassNameValue;
|
9
|
+
radio?: tailwind_merge.ClassNameValue;
|
10
|
+
groupLabel?: tailwind_merge.ClassNameValue;
|
11
|
+
control?: tailwind_merge.ClassNameValue;
|
11
12
|
};
|
12
13
|
};
|
13
14
|
} | {
|
14
15
|
[x: string]: {
|
15
|
-
[x: string]:
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
groupLabel?:
|
20
|
-
control?:
|
16
|
+
[x: string]: tailwind_merge.ClassNameValue | {
|
17
|
+
label?: tailwind_merge.ClassNameValue;
|
18
|
+
group?: tailwind_merge.ClassNameValue;
|
19
|
+
radio?: tailwind_merge.ClassNameValue;
|
20
|
+
groupLabel?: tailwind_merge.ClassNameValue;
|
21
|
+
control?: tailwind_merge.ClassNameValue;
|
21
22
|
};
|
22
23
|
};
|
23
24
|
} | {}, {
|
@@ -28,12 +29,12 @@ declare const RadioStyles: tailwind_variants.TVReturnType<{
|
|
28
29
|
label: string[];
|
29
30
|
}, undefined, {
|
30
31
|
[key: string]: {
|
31
|
-
[key: string]:
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
groupLabel?:
|
36
|
-
control?:
|
32
|
+
[key: string]: tailwind_merge.ClassNameValue | {
|
33
|
+
label?: tailwind_merge.ClassNameValue;
|
34
|
+
group?: tailwind_merge.ClassNameValue;
|
35
|
+
radio?: tailwind_merge.ClassNameValue;
|
36
|
+
groupLabel?: tailwind_merge.ClassNameValue;
|
37
|
+
control?: tailwind_merge.ClassNameValue;
|
37
38
|
};
|
38
39
|
};
|
39
40
|
} | {}, {
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import {tv}from'./../../lib/utils.js';
|
1
|
+
import {tv}from'./../../lib/utils.js';const r=tv({slots:{group:["group/radio-group flex gap-xs","orientation-horizontal:flex-wrap","orientation-vertical:flex-col"],groupLabel:"w-full",radio:["group/radio flex cursor-pointer items-center gap-m group-orientation-horizontal/radio-group:grow group-orientation-horizontal/radio-group:basis-1/3","disabled:cursor-not-allowed"],control:["my-xxs flex size-l items-center justify-center rounded-full outline outline-interactive before:block before:size-s before:rounded-full","group-enabled/radio:group-focus/radio:outline-interactive-hover","group-enabled/radio:group-hover/radio:outline-interactive-hover","group-enabled/radio:group-selected/radio:outline-highlight group-enabled/radio:group-selected/radio:before:bg-highlight","group-enabled/radio:group-selected/radio:group-focus/radio:outline-interactive-hover","group-enabled/radio:group-selected/radio:group-hover/radio:outline-interactive-hover","group-disabled/radio:outline-interactive-disabled","group-disabled/radio:group-selected/radio:before:bg-interactive-disabled"],label:["text-body-s text-interactive-default","group-disabled/radio:text-interactive-disabled"]}});export{r as RadioStyles};//# sourceMappingURL=styles.js.map
|
2
2
|
//# sourceMappingURL=styles.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/radio/styles.ts"],"names":["e"],"mappings":"sCAeE,
|
1
|
+
{"version":3,"sources":["../../../src/components/radio/styles.ts"],"names":["e"],"mappings":"sCAeE,MAAA,CAAO,CACLA,EAAA,CAAA,CAAA,KACE,CAAA,CAAA,KAAA,CAAA,CAAA,+BACA,CAAA,kEAGF,CAAA,CAAA,UACA,CAAA,QACE,CAAA,KAAA,CAAA,CAAA,qJACA,CAAA,6BAEO,CACP,kJACA,CAAA,iEACA,CAAA,2LAEA,CAAA,sFACA,CAAA,sFACA,CAAA,mDACA,CAAA,yHAIA,CAAA,gDAGL,CAAA,CAAA,CAAA","file":"styles.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { tv } from '@/lib/utils';\n\nexport const RadioStyles = tv({\n slots: {\n group: [\n 'group/radio-group flex gap-xs',\n 'orientation-horizontal:flex-wrap',\n 'orientation-vertical:flex-col',\n ],\n groupLabel: 'w-full',\n radio: [\n 'group/radio flex cursor-pointer items-center gap-m group-orientation-horizontal/radio-group:grow group-orientation-horizontal/radio-group:basis-1/3',\n 'disabled:cursor-not-allowed',\n ],\n control: [\n 'my-xxs flex size-l items-center justify-center rounded-full outline outline-interactive before:block before:size-s before:rounded-full',\n 'group-enabled/radio:group-focus/radio:outline-interactive-hover',\n 'group-enabled/radio:group-hover/radio:outline-interactive-hover',\n 'group-enabled/radio:group-selected/radio:outline-highlight group-enabled/radio:group-selected/radio:before:bg-highlight',\n 'group-enabled/radio:group-selected/radio:group-focus/radio:outline-interactive-hover',\n 'group-enabled/radio:group-selected/radio:group-hover/radio:outline-interactive-hover',\n 'group-disabled/radio:outline-interactive-disabled',\n 'group-disabled/radio:group-selected/radio:before:bg-interactive-disabled',\n ],\n label: [\n 'text-body-s text-interactive-default',\n 'group-disabled/radio:text-interactive-disabled',\n ],\n },\n});\n"]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { RefAttributes
|
1
|
+
import { RefAttributes } from 'react';
|
2
2
|
import { RadioProps as RadioProps$1, RadioGroupProps as RadioGroupProps$1 } from 'react-aria-components';
|
3
3
|
import { LabelProps } from '../label/types.js';
|
4
4
|
|
@@ -16,6 +16,5 @@ type RadioProps = Omit<RadioProps$1, 'className'> & RefAttributes<HTMLLabelEleme
|
|
16
16
|
label?: string;
|
17
17
|
};
|
18
18
|
};
|
19
|
-
type RadioProviderProps = PropsWithChildren<RadioGroupProps>;
|
20
19
|
|
21
|
-
export type { RadioGroupProps, RadioProps
|
20
|
+
export type { RadioGroupProps, RadioProps };
|
@@ -1,19 +1,60 @@
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
2
|
+
import * as react from 'react';
|
3
|
+
import { ProviderProps } from '../../lib/types.js';
|
4
|
+
import { ContextValue } from 'react-aria-components';
|
5
|
+
import { SearchFieldProps } from './types.js';
|
6
|
+
import 'tailwind-variants';
|
7
|
+
import '../button/types.js';
|
8
|
+
import '../button/styles.js';
|
9
|
+
import 'tailwind-merge';
|
10
|
+
import '../icon/types.js';
|
11
|
+
import './styles.js';
|
2
12
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
+
declare const SearchFieldContext: react.Context<ContextValue<SearchFieldProps, HTMLDivElement>>;
|
14
|
+
declare function SearchFieldProvider({ children, ...props }: ProviderProps<SearchFieldProps>): react_jsx_runtime.JSX.Element;
|
15
|
+
declare namespace SearchFieldProvider {
|
16
|
+
var displayName: string;
|
17
|
+
}
|
18
|
+
/**
|
19
|
+
* SearchField - A customizable search input component built on React Aria Components
|
20
|
+
*
|
21
|
+
* Provides a search input with integrated search icon, loading state, and clear functionality.
|
22
|
+
* Supports two visual variants (filled/outlined), and granular styling control.
|
23
|
+
*
|
24
|
+
* @example
|
25
|
+
* // Basic search field
|
26
|
+
* <SearchField placeholder="Search..." />
|
27
|
+
*
|
28
|
+
* @example
|
29
|
+
* // Filled variant with custom styling
|
30
|
+
* <SearchField
|
31
|
+
* variant="filled"
|
32
|
+
* placeholder="Search products"
|
33
|
+
* classNames={{
|
34
|
+
* input: "bg-gray-100",
|
35
|
+
* searchIcon: "text-blue-600"
|
36
|
+
* }}
|
37
|
+
* />
|
38
|
+
*
|
39
|
+
* @example
|
40
|
+
* // With event handlers
|
41
|
+
* <SearchField
|
42
|
+
* placeholder="Type to search"
|
43
|
+
* onSubmit={(value) => console.log('Search:', value)}
|
44
|
+
* onChange={(value) => setQuery(value)}
|
45
|
+
* />
|
46
|
+
*
|
47
|
+
* @example
|
48
|
+
* // Using context provider for default props
|
49
|
+
* <SearchField.Provider variant="filled">
|
50
|
+
* <SearchField placeholder="Search 1" />
|
51
|
+
* <SearchField placeholder="Search 2" />
|
52
|
+
* </SearchField.Provider>
|
53
|
+
*/
|
54
|
+
declare function SearchField({ ref, ...props }: SearchFieldProps): react_jsx_runtime.JSX.Element;
|
55
|
+
declare namespace SearchField {
|
56
|
+
var displayName: string;
|
57
|
+
var Provider: typeof SearchFieldProvider;
|
13
58
|
}
|
14
|
-
declare const SearchField: {
|
15
|
-
({ className, placeholder, variant, isLoading, ...rest }: SearchFieldProps): react_jsx_runtime.JSX.Element;
|
16
|
-
displayName: string;
|
17
|
-
};
|
18
59
|
|
19
|
-
export { SearchField,
|
60
|
+
export { SearchField, SearchFieldContext };
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import {
|
1
|
+
import {jsx,jsxs}from'react/jsx-runtime';import'client-only';import {Search,Loop,CancelFill}from'@accelint/icons';import {createContext}from'react';import {useContextProps,SearchField,composeRenderProps,Input,Button}from'react-aria-components';import {Icon}from'../icon/index.js';import {SearchFieldStyles,SearchFieldStylesDefaults}from'./styles.js';const {field:I,input:g,search:L,loading:A,clear:B}=SearchFieldStyles(),c=createContext(null);function n({children:r,...a}){return jsx(c.Provider,{value:a,children:r})}n.displayName="SearchField.Provider";function d({ref:r,...a}){[a,r]=useContextProps(a,r??null,c);const{classNames:o,inputProps:p,isLoading:m=false,variant:i=SearchFieldStylesDefaults.variant,...h}=a;return jsx(Icon.Provider,{size:"small",children:jsxs(SearchField,{...h,ref:r,className:composeRenderProps(o?.field,l=>I({className:l,variant:i})),children:[jsx(Icon,{className:L({className:o?.search,variant:i}),children:jsx(Search,{})}),jsx(Input,{...p,className:composeRenderProps(o?.input,l=>g({className:l,variant:i})),type:"search"}),m?jsx(Icon,{className:A({className:o?.loading,variant:i}),children:jsx(Loop,{})}):jsx(Button,{className:composeRenderProps(o?.clear,l=>B({className:l,variant:i})),children:jsx(Icon,{children:jsx(CancelFill,{})})})]})})}d.displayName="SearchField",d.Provider=n;export{d as SearchField,c as SearchFieldContext};//# sourceMappingURL=index.js.map
|
2
2
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/search-field/index.tsx"],"names":["
|
1
|
+
{"version":3,"sources":["../../../src/components/search-field/index.tsx"],"names":["input","SearchFieldContext","x","F","props","jsx","e","SearchFieldProvider","useContextProps","ref","N","inputProps","isLoading","variant","SearchFieldStylesDefaults","rest","C","Icon","t","v","composeRenderProps","classNames","className","field","search","Search","Input","u","y","loading","Loop","Button","S","clear","CancelFill","P","SearchField"],"mappings":"8VA6Be,MAAA,CAAAA,KAAO,CAAA,CAAA,CAAA,KAAQ,CAAA,CAAA,CAAA,MAAS,CAAA,CAAA,CAAA,OAA4B,CAAA,CAEtDC,CAAAA,KACmD,CAAA,CAAI,CAAA,CAEpEC,iBAAA,EAAA,CAAA,CAAA,CAAAC,aAAA,CAAA,IACE,EAAA,SACA,CAAA,CAAA,CAAGC,QAEH,CAAA,CAAA,CACEC,GAACJ,CAAmB,CAAA,CAAA,CAAA,OAASK,GAAA,CAAA,CAAA,CAAA,QAC1B,CAAA,CAAA,KACH,CAEJ,CACAC,CAAAA,QAAoB,CAAA,CAAA,CAAA,CAAA,CAAc,CAAA,CAAA,WAAA,CAAA,sBAsCJ,CAAA,SAAc,CAAqB,CAC/D,CAACH,GAAU,CAAA,CAAII,CAAAA,GAAuBC,CAAAA,CAAAA,CAAO,CAAA,CAAA,CAAA,CAAA,CAAMR,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CAAA,QAGFC,CAAAzB,GACC,CAAA0B,IAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA1B,GAAWc,CAAAA,MAAmBC,CAAAA,CAAAA,SAAoBC,CAChDW,kBAAAA,CAAM,CAAE,EAAA,KAAA,CAAA,CAAA,EAAAX,CAAW,CAAA,CAAA,SACrB,CAAA,CAEA,CAAA,OAAA,CAAAjB,CAAAA,CAACY,CAAAA,CAAA,CACC,QAAA,CAAAZ,GAAAA,CAAC6B,IAAAA,CAAA,CAAA,QAIT,CAAA5B,GACF,CAEJ6B,UAEAC,CAAAA,EAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc,CAAA,CAAA,WAAA,CAC1BA,aAAuB7B,CAAAA,CAAAA,CAAAA,QAAAA,CAAAA,CAAAA","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n'use client';\n\nimport 'client-only';\nimport type { ProviderProps } from '@/lib/types';\nimport { CancelFill, Loop, Search } from '@accelint/icons';\nimport { createContext } from 'react';\nimport {\n SearchField as AriaSearchField,\n Button,\n type ContextValue,\n Input,\n composeRenderProps,\n useContextProps,\n} from 'react-aria-components';\nimport { Icon } from '../icon';\nimport { SearchFieldStyles, SearchFieldStylesDefaults } from './styles';\nimport type { SearchFieldProps } from './types';\n\nconst { field, input, search, loading, clear } = SearchFieldStyles();\n\nexport const SearchFieldContext =\n createContext<ContextValue<SearchFieldProps, HTMLDivElement>>(null);\n\nfunction SearchFieldProvider({\n children,\n ...props\n}: ProviderProps<SearchFieldProps>) {\n return (\n <SearchFieldContext.Provider value={props}>\n {children}\n </SearchFieldContext.Provider>\n );\n}\nSearchFieldProvider.displayName = 'SearchField.Provider';\n\n/**\n * SearchField - A customizable search input component built on React Aria Components\n *\n * Provides a search input with integrated search icon, loading state, and clear functionality.\n * Supports two visual variants (filled/outlined), and granular styling control.\n *\n * @example\n * // Basic search field\n * <SearchField placeholder=\"Search...\" />\n *\n * @example\n * // Filled variant with custom styling\n * <SearchField\n * variant=\"filled\"\n * placeholder=\"Search products\"\n * classNames={{\n * input: \"bg-gray-100\",\n * searchIcon: \"text-blue-600\"\n * }}\n * />\n *\n * @example\n * // With event handlers\n * <SearchField\n * placeholder=\"Type to search\"\n * onSubmit={(value) => console.log('Search:', value)}\n * onChange={(value) => setQuery(value)}\n * />\n *\n * @example\n * // Using context provider for default props\n * <SearchField.Provider variant=\"filled\">\n * <SearchField placeholder=\"Search 1\" />\n * <SearchField placeholder=\"Search 2\" />\n * </SearchField.Provider>\n */\nexport function SearchField({ ref, ...props }: SearchFieldProps) {\n [props, ref] = useContextProps(props, ref ?? null, SearchFieldContext);\n\n const {\n classNames,\n inputProps,\n isLoading = false,\n variant = SearchFieldStylesDefaults.variant,\n ...rest\n } = props;\n\n return (\n <Icon.Provider size='small'>\n <AriaSearchField\n {...rest}\n ref={ref}\n className={composeRenderProps(classNames?.field, (className) =>\n field({ className, variant }),\n )}\n >\n <Icon className={search({ className: classNames?.search, variant })}>\n <Search />\n </Icon>\n <Input\n {...inputProps}\n className={composeRenderProps(classNames?.input, (className) =>\n input({ className, variant }),\n )}\n type='search'\n />\n {isLoading ? (\n <Icon\n className={loading({ className: classNames?.loading, variant })}\n >\n <Loop />\n </Icon>\n ) : (\n <Button\n className={composeRenderProps(classNames?.clear, (className) =>\n clear({ className, variant }),\n )}\n >\n <Icon>\n <CancelFill />\n </Icon>\n </Button>\n )}\n </AriaSearchField>\n </Icon.Provider>\n );\n}\n\nSearchField.displayName = 'SearchField';\nSearchField.Provider = SearchFieldProvider;\n"]}
|
@@ -0,0 +1,53 @@
|
|
1
|
+
import * as tailwind_variants from 'tailwind-variants';
|
2
|
+
|
3
|
+
declare const SearchFieldStylesDefaults: {
|
4
|
+
readonly variant: "outlined";
|
5
|
+
};
|
6
|
+
declare const SearchFieldStyles: tailwind_variants.TVReturnType<{
|
7
|
+
variant: {
|
8
|
+
filled: {
|
9
|
+
field: string;
|
10
|
+
};
|
11
|
+
outlined: {
|
12
|
+
field: string;
|
13
|
+
};
|
14
|
+
};
|
15
|
+
}, {
|
16
|
+
field: string[];
|
17
|
+
input: string[];
|
18
|
+
clear: string[];
|
19
|
+
loading: string;
|
20
|
+
search: string;
|
21
|
+
}, undefined, {
|
22
|
+
variant: {
|
23
|
+
filled: {
|
24
|
+
field: string;
|
25
|
+
};
|
26
|
+
outlined: {
|
27
|
+
field: string;
|
28
|
+
};
|
29
|
+
};
|
30
|
+
}, {
|
31
|
+
field: string[];
|
32
|
+
input: string[];
|
33
|
+
clear: string[];
|
34
|
+
loading: string;
|
35
|
+
search: string;
|
36
|
+
}, tailwind_variants.TVReturnType<{
|
37
|
+
variant: {
|
38
|
+
filled: {
|
39
|
+
field: string;
|
40
|
+
};
|
41
|
+
outlined: {
|
42
|
+
field: string;
|
43
|
+
};
|
44
|
+
};
|
45
|
+
}, {
|
46
|
+
field: string[];
|
47
|
+
input: string[];
|
48
|
+
clear: string[];
|
49
|
+
loading: string;
|
50
|
+
search: string;
|
51
|
+
}, undefined, unknown, unknown, undefined>>;
|
52
|
+
|
53
|
+
export { SearchFieldStyles, SearchFieldStylesDefaults };
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import {tv}from'./../../lib/utils.js';const i={variant:"outlined"},l=tv({slots:{field:["group/search-field fg-default-light flex items-center gap-s rounded-round p-s outline","focus-within:outline-highlight","hover:outline-interactive-hover","disabled:fg-disabled disabled:placeholder:fg-disabled disabled:cursor-not-allowed disabled:outline-interactive-disabled"],input:["hide-cancel block w-full font-display text-body-s outline-none","placeholder:text-default-dark","disabled:cursor-not-allowed"],clear:["fg-interactive cursor-pointer","focus:fg-interactive-hover","hover:fg-interactive-hover","group-empty/search-field:invisible group-disabled/search-field:invisible"],loading:"motion-safe:animate-spin",search:""},variants:{variant:{filled:{field:"bg-surface-raised outline-static-dark"},outlined:{field:"outline-interactive"}}},defaultVariants:i});export{l as SearchFieldStyles,i as SearchFieldStylesDefaults};//# sourceMappingURL=styles.js.map
|
2
|
+
//# sourceMappingURL=styles.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../src/components/search-field/styles.ts"],"names":["e"],"mappings":"sCAeE,MAAA,CAAS,CAAA,CAAA,OAAA,CACX,UAGE,CAAA,CAAA,CAAO,CACLA,EAAA,CAAA,CAAA,KACE,CAAA,CAAA,KAAA,CAAA,CAAA,uFACA,CAAA,gCACA,CAAA,iCACA,CAAA,yHAGA,CAAA,CAAA,KAAA,CAAA,CAAA,gEACA,CAAA,+BACA,CAAA,6BAGA,CAAA,CAAA,KAAA,CAAA,CAAA,+BACA,CAAA,4BACA,CAAA,4BACA,CAAA,0EAEO,CAAA,CAAA,OAAA,CAAA,0BAEX,CAAA,MACA,CAAA,EAAA,CAAU,CACR,QAAS,CACP,CAAA,OACE,CAAA,CAAA,MAAO,CAAA,CAAA,KAAA,CAAA,uCAET,CAAU,CACR,QAAO,CAAA,CAAA,KAAA,CAAA,qBAIb,CAAA,CAAA,CAAA,CAAA,eACD,CAAA,CAAA,CAAA","file":"styles.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { tv } from '@/lib/utils';\n\nexport const SearchFieldStylesDefaults = {\n variant: 'outlined',\n} as const;\n\nexport const SearchFieldStyles = tv({\n slots: {\n field: [\n 'group/search-field fg-default-light flex items-center gap-s rounded-round p-s outline',\n 'focus-within:outline-highlight',\n 'hover:outline-interactive-hover',\n 'disabled:fg-disabled disabled:placeholder:fg-disabled disabled:cursor-not-allowed disabled:outline-interactive-disabled',\n ],\n input: [\n 'hide-cancel block w-full font-display text-body-s outline-none',\n 'placeholder:text-default-dark',\n 'disabled:cursor-not-allowed',\n ],\n clear: [\n 'fg-interactive cursor-pointer',\n 'focus:fg-interactive-hover',\n 'hover:fg-interactive-hover',\n 'group-empty/search-field:invisible group-disabled/search-field:invisible',\n ],\n loading: 'motion-safe:animate-spin',\n search: '',\n },\n variants: {\n variant: {\n filled: {\n field: 'bg-surface-raised outline-static-dark',\n },\n outlined: {\n field: 'outline-interactive',\n },\n },\n },\n defaultVariants: SearchFieldStylesDefaults,\n});\n"]}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import { RefAttributes } from 'react';
|
2
|
+
import { SearchFieldProps as SearchFieldProps$1, InputProps } from 'react-aria-components';
|
3
|
+
import { VariantProps } from 'tailwind-variants';
|
4
|
+
import { ButtonProps } from '../button/types.js';
|
5
|
+
import { IconProps } from '../icon/types.js';
|
6
|
+
import { SearchFieldStyles } from './styles.js';
|
7
|
+
import '../button/styles.js';
|
8
|
+
import 'tailwind-merge';
|
9
|
+
|
10
|
+
type SearchFieldStyleVariants = VariantProps<typeof SearchFieldStyles>;
|
11
|
+
interface SearchFieldProps extends Omit<SearchFieldProps$1, 'className' | 'pattern' | 'type'>, RefAttributes<HTMLDivElement> {
|
12
|
+
classNames?: {
|
13
|
+
field?: SearchFieldProps$1['className'];
|
14
|
+
input?: InputProps['className'];
|
15
|
+
clear?: ButtonProps['className'];
|
16
|
+
loading?: IconProps['className'];
|
17
|
+
search?: IconProps['className'];
|
18
|
+
};
|
19
|
+
inputProps?: Omit<InputProps, 'type'>;
|
20
|
+
variant?: 'filled' | 'outlined';
|
21
|
+
/** Displays a loading spinner. */
|
22
|
+
isLoading?: boolean;
|
23
|
+
}
|
24
|
+
|
25
|
+
export type { SearchFieldProps, SearchFieldStyleVariants };
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"types.js"}
|
@@ -0,0 +1,42 @@
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
2
|
+
import { SkeletonProps } from './types.js';
|
3
|
+
import 'react';
|
4
|
+
import 'tailwind-variants';
|
5
|
+
import './styles.js';
|
6
|
+
|
7
|
+
/**
|
8
|
+
* Skeleton - A flexible skeleton loader component for indicating loading states
|
9
|
+
*
|
10
|
+
* Used to show placeholder content while data is being fetched or processed.
|
11
|
+
* Provides visual feedback to users during loading states with customizable shapes.
|
12
|
+
*
|
13
|
+
* @example
|
14
|
+
* // Basic rectangular placeholder
|
15
|
+
* <Skeleton />
|
16
|
+
*
|
17
|
+
* @example
|
18
|
+
* // Circular placeholder (useful for avatars)
|
19
|
+
* <Skeleton shape="circ" />
|
20
|
+
*
|
21
|
+
* @example
|
22
|
+
* // With loading text content
|
23
|
+
* <Skeleton>Loading content...</Skeleton>
|
24
|
+
*
|
25
|
+
* @example
|
26
|
+
* // Nested placeholders for complex layouts
|
27
|
+
* <Skeleton className="mb-xl p-m">
|
28
|
+
* <br />
|
29
|
+
* <br />
|
30
|
+
* <Skeleton className="w-[75%]" />
|
31
|
+
* </Skeleton>
|
32
|
+
*
|
33
|
+
* @example
|
34
|
+
* // Custom styling
|
35
|
+
* <Skeleton className="w-[50%] mt-l" />
|
36
|
+
*/
|
37
|
+
declare function Skeleton({ className, shape, ...rest }: SkeletonProps): react_jsx_runtime.JSX.Element;
|
38
|
+
declare namespace Skeleton {
|
39
|
+
var displayName: string;
|
40
|
+
}
|
41
|
+
|
42
|
+
export { Skeleton };
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import {jsx}from'react/jsx-runtime';import {SkeletonStyles,SkeletonStylesDefaults}from'./styles.js';function s({className:e,shape:o=SkeletonStylesDefaults.shape,...t}){return jsx("div",{...t,className:SkeletonStyles({className:e,shape:o})})}s.displayName="Skeleton";export{s as Skeleton};//# sourceMappingURL=index.js.map
|
2
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../src/components/skeleton/index.tsx"],"names":["SkeletonStylesDefaults","rest","n","l","Skeleton"],"mappings":"oGA6CO,SACL,CAAA,CAAA,CAAA,iBACQA,CAAuB,8BAC5BC,CACL,GACE,WAAQC,GAAA,CAAA,KAAK,CAAGD,CAAAA,cAAkC,CAAAE,cAAA,CAAA,CAAA,kBAAqB,CACzE,CACAC,EAAS,CAAA,CAAA,CAAA,CAAA,WAAc,CAAA,UAAA","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { SkeletonStyles, SkeletonStylesDefaults } from './styles';\nimport type { SkeletonProps } from './types';\n\n/**\n * Skeleton - A flexible skeleton loader component for indicating loading states\n *\n * Used to show placeholder content while data is being fetched or processed.\n * Provides visual feedback to users during loading states with customizable shapes.\n *\n * @example\n * // Basic rectangular placeholder\n * <Skeleton />\n *\n * @example\n * // Circular placeholder (useful for avatars)\n * <Skeleton shape=\"circ\" />\n *\n * @example\n * // With loading text content\n * <Skeleton>Loading content...</Skeleton>\n *\n * @example\n * // Nested placeholders for complex layouts\n * <Skeleton className=\"mb-xl p-m\">\n * <br />\n * <br />\n * <Skeleton className=\"w-[75%]\" />\n * </Skeleton>\n *\n * @example\n * // Custom styling\n * <Skeleton className=\"w-[50%] mt-l\" />\n */\nexport function Skeleton({\n className,\n shape = SkeletonStylesDefaults.shape,\n ...rest\n}: SkeletonProps) {\n return <div {...rest} className={SkeletonStyles({ className, shape })} />;\n}\nSkeleton.displayName = 'Skeleton';\n"]}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import * as tailwind_variants from 'tailwind-variants';
|
2
|
+
|
3
|
+
declare const SkeletonStylesDefaults: {
|
4
|
+
readonly shape: "rect";
|
5
|
+
};
|
6
|
+
declare const SkeletonStyles: tailwind_variants.TVReturnType<{
|
7
|
+
shape: {
|
8
|
+
circ: string;
|
9
|
+
rect: string;
|
10
|
+
};
|
11
|
+
}, undefined, "fg-default-light bg-transparent-light px-l py-s motion-safe:animate-pulse", {
|
12
|
+
shape: {
|
13
|
+
circ: string;
|
14
|
+
rect: string;
|
15
|
+
};
|
16
|
+
}, undefined, tailwind_variants.TVReturnType<{
|
17
|
+
shape: {
|
18
|
+
circ: string;
|
19
|
+
rect: string;
|
20
|
+
};
|
21
|
+
}, undefined, "fg-default-light bg-transparent-light px-l py-s motion-safe:animate-pulse", unknown, unknown, undefined>>;
|
22
|
+
|
23
|
+
export { SkeletonStyles, SkeletonStylesDefaults };
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import {tv}from'./../../lib/utils.js';const e={shape:"rect"},l=tv({base:"fg-default-light bg-transparent-light px-l py-s motion-safe:animate-pulse",variants:{shape:{circ:"aspect-square w-[1lh] rounded-full",rect:"min-h-[1lh] w-full rounded-small"}},defaultVariants:e});export{l as SkeletonStyles,e as SkeletonStylesDefaults};//# sourceMappingURL=styles.js.map
|
2
|
+
//# sourceMappingURL=styles.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../src/components/skeleton/styles.ts"],"names":["SkeletonStyles","tv"],"mappings":"sCAeS,MAAA,CAAA,CAAA,CAAA,KAGIA,CAAiBC,MAC5B,CAAA,CAAM,sFACI,CACR,QACE,CAAA,CAAA,KAAM,CAAA,CAAA,IAAA,CAAA,oCACA,CAAA,IAAA,CAAA,kCAGV,CAAA,CAAA,CAAA,eACD,CAAA,CAAA,CAAA","file":"styles.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { tv } from '@/lib/utils';\n\nexport const SkeletonStylesDefaults = {\n shape: 'rect',\n} as const;\n\nexport const SkeletonStyles = tv({\n base: 'fg-default-light bg-transparent-light px-l py-s motion-safe:animate-pulse',\n variants: {\n shape: {\n circ: 'aspect-square w-[1lh] rounded-full',\n rect: 'min-h-[1lh] w-full rounded-small',\n },\n },\n defaultVariants: SkeletonStylesDefaults,\n});\n"]}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { ComponentPropsWithRef } from 'react';
|
2
|
+
import { VariantProps } from 'tailwind-variants';
|
3
|
+
import { SkeletonStyles } from './styles.js';
|
4
|
+
|
5
|
+
type SkeletonStyleVariants = VariantProps<typeof SkeletonStyles>;
|
6
|
+
type SkeletonProps = ComponentPropsWithRef<'div'> & SkeletonStyleVariants;
|
7
|
+
|
8
|
+
export type { SkeletonProps, SkeletonStyleVariants };
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"types.js"}
|