@accelint/design-toolkit 2.2.1 → 2.3.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.
Files changed (136) hide show
  1. package/README.md +1 -0
  2. package/dist/components/accordion/index.d.ts +2 -2
  3. package/dist/components/accordion/index.js +1 -1
  4. package/dist/components/accordion/index.js.map +1 -1
  5. package/dist/components/accordion/styles.d.ts +3 -39
  6. package/dist/components/accordion/styles.js +1 -1
  7. package/dist/components/accordion/styles.js.map +1 -1
  8. package/dist/components/avatar/index.d.ts +4 -4
  9. package/dist/components/badge/index.d.ts +2 -2
  10. package/dist/components/box/index.d.ts +3 -3
  11. package/dist/components/button/index.d.ts +35 -23
  12. package/dist/components/button/index.js +1 -1
  13. package/dist/components/button/index.js.map +1 -1
  14. package/dist/components/button/styles.d.ts +297 -0
  15. package/dist/components/button/styles.js +2 -0
  16. package/dist/components/button/styles.js.map +1 -0
  17. package/dist/components/button/types.d.ts +14 -0
  18. package/dist/components/button/types.js +2 -0
  19. package/dist/components/button/types.js.map +1 -0
  20. package/dist/components/checkbox/index.d.ts +2 -2
  21. package/dist/components/checkbox/index.js +1 -1
  22. package/dist/components/checkbox/index.js.map +1 -1
  23. package/dist/components/chip/index.d.ts +25 -48
  24. package/dist/components/chip/index.js +1 -1
  25. package/dist/components/chip/index.js.map +1 -1
  26. package/dist/components/chip/styles.d.ts +250 -0
  27. package/dist/components/chip/styles.js +2 -0
  28. package/dist/components/chip/styles.js.map +1 -0
  29. package/dist/components/chip/types.d.ts +20 -0
  30. package/dist/components/chip/types.js +2 -0
  31. package/dist/components/chip/types.js.map +1 -0
  32. package/dist/components/classification-badge/index.d.ts +15 -16
  33. package/dist/components/classification-badge/index.js +1 -1
  34. package/dist/components/classification-badge/index.js.map +1 -1
  35. package/dist/components/classification-badge/styles.d.ts +51 -0
  36. package/dist/components/classification-badge/styles.js +2 -0
  37. package/dist/components/classification-badge/styles.js.map +1 -0
  38. package/dist/components/classification-badge/types.d.ts +9 -0
  39. package/dist/components/classification-badge/types.js +2 -0
  40. package/dist/components/classification-badge/types.js.map +1 -0
  41. package/dist/components/classification-banner/index.d.ts +15 -16
  42. package/dist/components/classification-banner/index.js +1 -2
  43. package/dist/components/classification-banner/index.js.map +1 -1
  44. package/dist/components/classification-banner/styles.d.ts +38 -0
  45. package/dist/components/classification-banner/styles.js +2 -0
  46. package/dist/components/classification-banner/styles.js.map +1 -0
  47. package/dist/components/classification-banner/types.d.ts +9 -0
  48. package/dist/components/classification-banner/types.js +2 -0
  49. package/dist/components/classification-banner/types.js.map +1 -0
  50. package/dist/components/combobox/index.js +1 -1
  51. package/dist/components/combobox/index.js.map +1 -1
  52. package/dist/components/date-field/index.js +1 -1
  53. package/dist/components/date-field/index.js.map +1 -1
  54. package/dist/components/dialog/index.d.ts +5 -5
  55. package/dist/components/dialog/index.js +1 -1
  56. package/dist/components/dialog/index.js.map +1 -1
  57. package/dist/components/icon/index.d.ts +2 -2
  58. package/dist/components/icon/types.d.ts +3 -5
  59. package/dist/components/label/index.d.ts +10 -7
  60. package/dist/components/label/index.js +1 -1
  61. package/dist/components/label/index.js.map +1 -1
  62. package/dist/components/label/styles.d.ts +5 -0
  63. package/dist/components/label/styles.js +2 -0
  64. package/dist/components/label/styles.js.map +1 -0
  65. package/dist/components/label/types.d.ts +10 -0
  66. package/dist/components/label/types.js +2 -0
  67. package/dist/components/label/types.js.map +1 -0
  68. package/dist/components/options/index.d.ts +2 -2
  69. package/dist/components/options-item/index.js +1 -1
  70. package/dist/components/options-item/index.js.map +1 -1
  71. package/dist/components/popover/styles.d.ts +3 -3
  72. package/dist/components/query-builder/index.js +1 -1
  73. package/dist/components/query-builder/index.js.map +1 -1
  74. package/dist/components/query-builder/value-editor.js +1 -1
  75. package/dist/components/query-builder/value-editor.js.map +1 -1
  76. package/dist/components/radio/index.d.ts +11 -9
  77. package/dist/components/radio/index.js +1 -1
  78. package/dist/components/radio/index.js.map +1 -1
  79. package/dist/components/radio/styles.d.ts +53 -0
  80. package/dist/components/radio/styles.js +2 -0
  81. package/dist/components/radio/styles.js.map +1 -0
  82. package/dist/components/radio/types.d.ts +21 -0
  83. package/dist/components/radio/types.js +2 -0
  84. package/dist/components/radio/types.js.map +1 -0
  85. package/dist/components/search-field/index.js +1 -1
  86. package/dist/components/search-field/index.js.map +1 -1
  87. package/dist/components/switch/index.d.ts +10 -7
  88. package/dist/components/switch/index.js +1 -1
  89. package/dist/components/switch/index.js.map +1 -1
  90. package/dist/components/switch/styles.d.ts +41 -0
  91. package/dist/components/switch/styles.js +2 -0
  92. package/dist/components/switch/styles.js.map +1 -0
  93. package/dist/components/switch/types.d.ts +13 -0
  94. package/dist/components/switch/types.js +2 -0
  95. package/dist/components/switch/types.js.map +1 -0
  96. package/dist/components/tabs/index.js +1 -1
  97. package/dist/components/tabs/index.js.map +1 -1
  98. package/dist/components/text-area-field/index.d.ts +19 -0
  99. package/dist/components/text-area-field/index.js +2 -0
  100. package/dist/components/text-area-field/index.js.map +1 -0
  101. package/dist/components/text-area-field/styles.d.ts +113 -0
  102. package/dist/components/text-area-field/styles.js +2 -0
  103. package/dist/components/text-area-field/styles.js.map +1 -0
  104. package/dist/components/text-area-field/types.d.ts +23 -0
  105. package/dist/components/text-area-field/types.js +2 -0
  106. package/dist/components/text-area-field/types.js.map +1 -0
  107. package/dist/components/text-field/index.js +1 -1
  108. package/dist/components/text-field/index.js.map +1 -1
  109. package/dist/components/tooltip/index.d.ts +2 -2
  110. package/dist/index.css +122 -252
  111. package/dist/index.d.ts +25 -11
  112. package/dist/index.js +1 -1
  113. package/dist/lib/react.js.map +1 -1
  114. package/dist/lib/utils.js +1 -1
  115. package/dist/lib/utils.js.map +1 -1
  116. package/dist/metafile-esm.json +1 -1
  117. package/dist/styles.css +873 -754
  118. package/dist/tokens/generated/themes.css +147 -0
  119. package/dist/tokens/generated/themes.d.ts +2 -0
  120. package/dist/tokens/generated/tokens.css +119 -0
  121. package/dist/tokens/generated/tokens.d.ts +108 -0
  122. package/dist/tokens/generated/tokens.js +2 -0
  123. package/dist/tokens/generated/tokens.js.map +1 -0
  124. package/package.json +6 -6
  125. package/dist/components/floating-button/index.d.ts +0 -18
  126. package/dist/components/floating-button/index.js +0 -2
  127. package/dist/components/floating-button/index.js.map +0 -1
  128. package/dist/components/icon-button/index.d.ts +0 -20
  129. package/dist/components/icon-button/index.js +0 -2
  130. package/dist/components/icon-button/index.js.map +0 -1
  131. package/dist/components/text-area/index.d.ts +0 -30
  132. package/dist/components/text-area/index.js +0 -2
  133. package/dist/components/text-area/index.js.map +0 -1
  134. package/dist/components/toggle-icon-button/index.d.ts +0 -20
  135. package/dist/components/toggle-icon-button/index.js +0 -2
  136. package/dist/components/toggle-icon-button/index.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/query-builder/value-editor.tsx"],"names":["name","rule","value","validator","c","jsx","d","h","values","m","option","defaultOptions","type","rest","k","y","valid","reasons","C","inputType","g","valueEditors","RadioGroupValueEditor","SelectValueEditor","SwitchValueEditor","TextValueEditor","ruleProp","props","V","useCallback","index","b","valueAsArray","handleRangeStartChange","multiValueHandler","handleRangeEndChange","valueEditorType","Editor","operator","multiValueOperators","D","term"],"mappings":"ieA6BA,oBAEE,CAAA,CAAA,CAAA,SAAaA,CAAM,CAAA,IAAA,CAAA,CAAA,CAAA,2BAEnBC,CAAAA,CACA,CAAA,IAAA,CAAAC,CACF,CAAA,KACQ,CAAE,CAAA,CAAA,CAAA,CAAA,GAAM,CAAA,KAA8BC,CAAS,CAAA,CAErD,CAAAC,mBAAA,CAAA,CAAA,CAAA,CAAA,CACEC,CAAAA,OACEC,GAAA,CAAAC,QAAA,CAAA,CAAA,UACA,CAAA,CAAA,CAAA,UACA,CAAA,CAAA,CAAA,QACA,CAAA,CAAA,CAAA,cACA,CAAA,CAAA,CAAA,CAAA,YAKN,CAAA,CAAA,CAAA,CAAA,CAAA,SACE,CAAA,CAAA,CAAA,QACA,CAAA,CAAA,CAAA,S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AA,CAC5B3B,CAAAA,CAAAA,CAAkBgC,CAAAA,CAAkBhC,CAAAA,WAAO,CAAC,CAAA,EAC5CgC,CAAiB,CACpB,CAAA,CAEMC,CAAAA,CAAuBN,CAAAA,CAC1B3B,CAAAA,CAAAA,CAAkBgC,EAAkBhC,CAAAA,WAAO,CAAC,CAAA,EAC5CgC,CAAiB,CACpB,CAAA,CAEMtB,CAAAA,CAAAA,CACH,OAAOwB,CAAAA,OAAoB,CAAA,EAAA,UAExBA,CAAAA,CAAoB,CAAA,CAAA,CAAA,CAAA,CAAA,GAEpBC,MAA4B,CAAA,CAElC,CAAA,CAAA,GAAA,CAAA,CAAIC,CAAAA,OAAa,CAAA,GAAUA,MAAa,EAAA,CAAA,GAAA,SAC/B,EAGLC,CAAAA,CAAoB,CAAA,IAAA,CAAAC,mBAAA,CAAA,QAEpB,CACG,yBAAC,CAAA,CAAS,OAAO,CAAA,KAAKC,CAAMX,CAAAA,GAC3BzB,CAAAA,CAAC,SACC,CAAA,KAAA,CAAA,CAAA,QACG,CAAGsB,GAAAA,CACJ,CAAA,CAAA,CAAA,GAAM1B,CAAK6B,CAAK,IAChB,CAAA,CAAA,CAAA,CAAOE,CAAAA,CAAaF,KACpB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,cAGF,CAAA,CARQ,CAAA,CAAA,CAAG9B,CAAI,CAAA,CAAA,CAAA,CAAIyC,CAAI,EASzB,CACD,CAAA,CACH,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 { TextArea } from '../text-area';\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 isDisabled={disabled}\n isInvalid={!valid}\n placeholder={placeholder}\n type={(inputType as InputType) ?? 'text'}\n size='small'\n value={value}\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 <TextArea\n isDisabled={disabled}\n isInvalid={!valid}\n placeholder={placeholder}\n value={value}\n onChange={handleOnChange}\n aria-label={name}\n aria-invalid={!valid}\n aria-labelledby={name}\n errorMessage={reasons?.join('/n')}\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":["name","rule","value","validator","c","jsx","d","h","values","m","option","defaultOptions","type","rest","P","y","valid","reasons","C","inputType","g","valueEditors","RadioGroupValueEditor","SelectValueEditor","SwitchValueEditor","TextValueEditor","ruleProp","props","V","useCallback","index","b","valueAsArray","handleRangeStartChange","multiValueHandler","handleRangeEndChange","valueEditorType","Editor","operator","multiValueOperators","D","term"],"mappings":"4eA6BA,oBAEE,CAAA,CAAA,CAAA,SAAaA,CAAM,CAAA,IAAA,CAAA,CAAA,CAAA,2BAEnBC,CAAAA,CACA,CAAA,IAAA,CAAAC,CACF,CAAA,KACQ,CAAE,CAAA,CAAA,CAAA,CAAA,GAAM,CAAA,KAA8BC,CAAS,CAAA,CAErD,CAAAC,mBAAA,CAAA,CAAA,CAAA,CAAA,CACEC,QACEC,GAAA,CAAAC,QAAA,CAAA,CAAA,UACA,CAAA,CAAA,CAAA,UACA,CAAA,CAAA,CAAA,yBAEA,CAAA,CAAA,CAAA,CAAA,YAKN,CAAA,CAAA,CAAA,CAAA,CAAA,SACE,CAAA,CAAA,CAAA,QACA,CAAA,CAAA,CAAA,SAAaP,CAAM,CAAA,IAAA,CAAA,CAAA,CAAA,SACnB,CAAA,CAAA,CAAA,CAAA,cACAC,CAAAA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A,UAExBA,CAAAA,CAAoB,CAAA,CAAA,CAAA,CAAA,CAAA,GAEpBC,MAA4B,CAAA,CAElC,CAAA,CAAA,GAAA,CAAA,CAAIC,CAAAA,OAAa,CAAA,GAAUA,MAAa,EAAA,CAAA,GAAA,SAC/B,EAGLC,CAAAA,CAAoB,CAAA,IAAA,CAAAC,mBAAA,CAAA,QAEpB,CACG,yBAAC,CAAA,CAAS,OAAO,CAAA,KAAKC,CAAMX,CAAAA,GAC3BzB,CAAAA,CAAC,SACC,CAAA,KAAA,CAAA,CAAA,QACG,CAAGsB,GAAAA,CACJ,CAAA,CAAA,CAAA,GAAM1B,CAAK6B,CAAK,IAChB,CAAA,CAAA,CAAA,CAAOE,CAAAA,CAAaF,KACpB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,cAGF,CAAA,CARQ,CAAA,CAAA,CAAG9B,CAAI,CAAA,CAAA,CAAA,CAAIyC,CAAI,EASzB,CACD,CAAA,CACH,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 isDisabled={disabled}\n isInvalid={!valid}\n placeholder={placeholder}\n type={(inputType as InputType) ?? 'text'}\n size='small'\n value={value}\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,16 +1,18 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import React__default from 'react';
3
- import { RadioProps as RadioProps$1, RadioGroupProps as RadioGroupProps$1 } from 'react-aria-components';
2
+ import * as react from 'react';
3
+ import { ContextValue } from 'react-aria-components';
4
+ import { RadioProps, RadioGroupProps } from './types.js';
5
+ import '../label/types.js';
4
6
 
5
- interface RadioProps extends RadioProps$1 {
7
+ declare const RadioContext: react.Context<ContextValue<RadioGroupProps, HTMLDivElement>>;
8
+ declare function RadioGroup({ ref, ...props }: RadioGroupProps): react_jsx_runtime.JSX.Element;
9
+ declare namespace RadioGroup {
10
+ var displayName: string;
6
11
  }
7
- declare function Radio({ className, children, ...args }: RadioProps): react_jsx_runtime.JSX.Element;
12
+ declare function Radio({ classNames, children, ...rest }: RadioProps): react_jsx_runtime.JSX.Element;
8
13
  declare namespace Radio {
14
+ var displayName: string;
9
15
  var Group: typeof RadioGroup;
10
16
  }
11
- interface RadioGroupProps extends RadioGroupProps$1 {
12
- label?: string | React__default.JSX.Element;
13
- }
14
- declare function RadioGroup({ children, className, label, ...props }: RadioGroupProps): react_jsx_runtime.JSX.Element;
15
17
 
16
- export { Radio, type RadioGroupProps, type RadioProps };
18
+ export { Radio, RadioContext };
@@ -1,2 +1,2 @@
1
- import {cn}from'./../../lib/utils.js';import'client-only';import {cva}from'cva';import {Radio,RadioGroup,composeRenderProps}from'react-aria-components';import {Label}from'../label/index.js';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var v=cva("fg-default-light flex size-l items-center justify-center rounded-round outline outline-interactive before:block before:size-s before:rounded-round before:bg-transparent",{variants:{isSelected:{true:"outline-highlight before:bg-highlight"},isFocused:{true:"outline-interactive-hover hover:outline-interactive-hover"},isHovered:{true:"outline-interactive-hover hover:outline-interactive-hover"},isDisabled:{true:"outline-interactive-disabled"}},compoundVariants:[{isDisabled:true,isSelected:true,className:"hover:interactive-disabled outline-interactive-disabled before:bg-interactive-disabled"},{isDisabled:true,className:"hover:interactive-disabled outline-interactive-disabled"}],defaultVariants:{isDisabled:false,isFocused:false,isHovered:false,isSelected:false}});function m({className:i,children:t,...o}){return jsx(Radio,{...o,className:cn("fg-default-light flex items-center gap-m dtk-disabled:text-interactive-disabled",i),children:e=>jsxs(Fragment,{children:[jsx("div",{className:cn(v({isDisabled:e.isDisabled,isFocused:e.isFocused,isHovered:e.isHovered,isSelected:e.isSelected})),"aria-hidden":true}),typeof t=="function"?t(e):t]})})}function R({children:i,className:t,label:o,...e}){return jsx(RadioGroup,{...e,className:composeRenderProps(t,(a,n)=>cn("fg-default-light flex flex-col gap-m text-body-s",n.orientation==="horizontal"&&"flex-row items-center",a)),children:a=>jsxs(Fragment,{children:[o?jsx(Label,{children:o}):void 0,typeof i=="function"?i(a):i]})})}m.Group=R;export{m as Radio};//# sourceMappingURL=index.js.map
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';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var {group:y,groupLabel:C,radio:A,control:D,label:L}=RadioStyles(),g=createContext(null);function n({ref:o,...e}){[e,o]=useContextProps(e,o??null,g);let{children:s,classNames:a,label:t,isDisabled:p,isRequired:d,...c}=e;return jsx(RadioGroup,{...c,ref:o,className:composeRenderProps(a?.group,l=>y({className:l})),isDisabled:p,isRequired:d,children:composeRenderProps(s,l=>jsxs(Fragment,{children:[t&&jsx(Label,{className:C({className:a?.label}),isDisabled:p,isRequired:d,children:t}),l]}))})}n.displayName="Radio.Group";function u({classNames:o,children:e,...s}){return jsx(Radio,{...s,className:composeRenderProps(o?.radio,a=>A({className:a})),children:composeRenderProps(e,a=>jsxs(Fragment,{children:[jsx("span",{className:D({className:o?.control})}),jsx("span",{className:L({className:o?.label}),children:a})]}))})}u.displayName="Radio";u.Group=n;export{u as Radio,g as RadioContext};//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/radio/index.tsx"],"names":["u","jsx","args","c","s","l","d","r","children","label","props","f","renderProps","cn","b","Radio","RadioGroup"],"mappings":"gPA2BE,IAAA,CAAA,CAAAA,GAAA,CAAA,0KAEE,CAAA,CAAA,QACE,CAAA,CAAA,UACQ,CAAA,CAAA,IAAA,CAAA,oHAKR,CAAA,CAAA,SACQ,CAAA,CAAA,IAAA,CAAA,+HAQN,CAAA,CAAA,CAAA,UACA,CAAA,IAAA,CAAA,yBAEE,CAAA,wFAGF,CAAA,CAAA,CAAA,yBACW,CAAA,yDAGf,CAAA,CAAA,CAAA,eACE,CAAA,CAAA,UACA,CAAA,KAAA,CAAA,yBAEA,CAAA,KAAA,CAAA,UAOC,CAAA,KAAA,CAAA,CAAA,CAAA,CAAA,qBAA4B,CAAA,CAAA,CAAA,QAAkB,CAAe,CAClE,CAAA,GAAA,CAAA,CAAA,CACEC,CAAAA,OACMC,GAAAA,CACJC,qBACE,CAAAC,EAAA,CAAA,iFAID,CAAA,CAAA,CAAA,CAAA,QACC,CACE,CAAA,EAAAC,IAAA,CAAAC,QAAA,CAAA,CAAA,QAAC,CAAA,CAAAC,GACC,iBAEI,CAAAH,EAAA,CAAA,CAAA,CAAA,CAAA,uBACA,CAAA,SAAiB,CAAA,CAAA,CAAA,SACjB,CAAA,SAAiB,CAAA,CAAA,CAAA,oBACC,CAAA,CAAA,CAAA,2BAKvB,CAAA,IAAA,CAAA,CAAOI,CAAAA,OAAa,CAAA,EAAA,UAA+BA,CACtD,CAAA,CAEJ,CAEJ,CAOA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,SAAsB,CAAA,CAAA,CAAA,QAAU,CAAA,CAAA,CAAA,SAAW,CAAAC,EAAO,MAA6B,CAC7E,CAAA,GAAA,CAAA,CAAA,CACER,QACMS,GAAAA,CACJC,UAAA,CAAA,CAAA,GAAA,CAAA,CAAA,SAAqDC,qBACnDC,CAAAA,CACE,CAAA,CAAA,CAAA,GAAAT,EAAA,CAAA,kDACY,CAAA,CAAA,CAAA,WAAgB,GAAA,YAAgB,EAAA,oCAO9C,CACG,CAAA,EAAAC,IAAA,CAAAC,QAAA,CAAA,CAAA,QAAS,CAAO,CAAA,CAAA,CAAAC,GAAA,CAAAO,KAAA,CAAA,CAAA,YAChB,CAAA,MAAON,CAAAA,OAAa,CAAA,EAAA,WACvB,CAAA,CAEJ,CAEJ,CAEAO,CAAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQC,CAAAA,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\n'use client';\nimport { cn } from '@/lib/utils';\nimport 'client-only';\nimport { cva } from 'cva';\nimport type React from 'react';\nimport {\n Radio as AriaRadio,\n RadioGroup as AriaRadioGroup,\n type RadioGroupProps as AriaRadioGroupProps,\n type RadioProps as AriaRadioProps,\n composeRenderProps,\n} from 'react-aria-components';\nimport { Label } from '../label';\n\nconst radioStyles = cva(\n 'fg-default-light flex size-l items-center justify-center rounded-round outline outline-interactive before:block before:size-s before:rounded-round before:bg-transparent',\n {\n variants: {\n isSelected: {\n true: 'outline-highlight before:bg-highlight',\n },\n isFocused: {\n true: 'outline-interactive-hover hover:outline-interactive-hover',\n },\n isHovered: {\n true: 'outline-interactive-hover hover:outline-interactive-hover',\n },\n isDisabled: {\n true: 'outline-interactive-disabled',\n },\n },\n compoundVariants: [\n {\n isDisabled: true,\n isSelected: true,\n className:\n 'hover:interactive-disabled outline-interactive-disabled before:bg-interactive-disabled',\n },\n {\n isDisabled: true,\n className: 'hover:interactive-disabled outline-interactive-disabled',\n },\n ],\n defaultVariants: {\n isDisabled: false,\n isFocused: false,\n isHovered: false,\n isSelected: false,\n },\n },\n);\n\nexport interface RadioProps extends AriaRadioProps {}\n\nexport function Radio({ className, children, ...args }: RadioProps) {\n return (\n <AriaRadio\n {...args}\n className={cn(\n 'fg-default-light flex items-center gap-m dtk-disabled:text-interactive-disabled',\n className,\n )}\n >\n {(props) => (\n <>\n <div\n className={cn(\n radioStyles({\n isDisabled: props.isDisabled,\n isFocused: props.isFocused,\n isHovered: props.isHovered,\n isSelected: props.isSelected,\n }),\n )}\n aria-hidden\n />\n {typeof children === 'function' ? children(props) : children}\n </>\n )}\n </AriaRadio>\n );\n}\n\nexport interface RadioGroupProps extends AriaRadioGroupProps {\n // children: React.JSX.Element;\n label?: string | React.JSX.Element;\n}\n\nfunction RadioGroup({ children, className, label, ...props }: RadioGroupProps) {\n return (\n <AriaRadioGroup\n {...props}\n className={composeRenderProps(className, (className, renderProps) =>\n cn(\n 'fg-default-light flex flex-col gap-m text-body-s',\n renderProps.orientation === 'horizontal' && 'flex-row items-center',\n\n className,\n ),\n )}\n >\n {(props) => (\n <>\n {label ? <Label>{label}</Label> : undefined}\n {typeof children === 'function' ? children(props) : children}\n </>\n )}\n </AriaRadioGroup>\n );\n}\n\nRadio.Group = RadioGroup;\n"]}
1
+ {"version":3,"sources":["../../../src/components/radio/index.tsx"],"names":["group","groupLabel","radio","control","RadioStyles","x","createContext","b","ref","props","useContextProps","children","classNames","label","isDisabled","AriaRadioGroup","N","composeRenderProps","className","isRequired","jsxs","Fragment","m","jsx","Label","f","RadioGroup","AriaRadio","G","i","Radio"],"mappings":"4QA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nE,CAAA,CAAA,OACGgB,GAAAA,CAAAC,KACE,CAAA,CAAA,GACD,WAAWX,CAAmBL,kBAAAA,CAAAA,CAAY,OAAQM,CAAAA,CAChDhB,EAAM,CAAE,CAAA,CAAA,SAAU,CAAC,CACrB,CAAA,CAEC,CAAA,CAAA,SAAmBS,kBAAAA,CAAWA,CAAAA,CAAAA,CAC7BS,EAAAC,IAAAA,CAAAC,QACE,CAAA,CAAA,QAAAC,EAACM,GAAA,CAAA,MAAK,CAAA,CAAA,SAAW1B,CAAQ,CAAE,CAAA,CAAA,SAAWS,CAAAA,CAAY,SAAS,CAAG,EAC9DW,CAAAA,CAACM,GAAA,CAAA,MAAK,WAAWhB,CAAM,CAAE,CAAA,CAAA,SAAWD,CAAAA,CAAY,EAAA,MAC7C,CAAA,CAAA,QAAAD,CACH,CAAA,CAAA,CACF,CACD,CAAA,CACH,CAEJ,CACAmB,CAAAA,CAAM,CAAA,CAAA,WAAc,CAAA,OACpBA,CAAM,CAAA,CAAA,KAAQJ,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, isDisabled, isRequired, ...rest } =\n props;\n\n return (\n <AriaRadioGroup\n {...rest}\n ref={ref}\n className={composeRenderProps(classNames?.group, (className) =>\n group({ className }),\n )}\n isDisabled={isDisabled}\n isRequired={isRequired}\n >\n {composeRenderProps(children, (children) => (\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"]}
@@ -0,0 +1,53 @@
1
+ import * as tailwind_variants from 'tailwind-variants';
2
+
3
+ declare const RadioStyles: tailwind_variants.TVReturnType<{
4
+ [key: string]: {
5
+ [key: string]: tailwind_variants.ClassValue | {
6
+ group?: tailwind_variants.ClassValue;
7
+ radio?: tailwind_variants.ClassValue;
8
+ label?: tailwind_variants.ClassValue;
9
+ groupLabel?: tailwind_variants.ClassValue;
10
+ control?: tailwind_variants.ClassValue;
11
+ };
12
+ };
13
+ } | {
14
+ [x: string]: {
15
+ [x: string]: tailwind_variants.ClassValue | {
16
+ group?: tailwind_variants.ClassValue;
17
+ radio?: tailwind_variants.ClassValue;
18
+ label?: tailwind_variants.ClassValue;
19
+ groupLabel?: tailwind_variants.ClassValue;
20
+ control?: tailwind_variants.ClassValue;
21
+ };
22
+ };
23
+ } | {}, {
24
+ group: string[];
25
+ groupLabel: string;
26
+ radio: string[];
27
+ control: string[];
28
+ label: string[];
29
+ }, undefined, {
30
+ [key: string]: {
31
+ [key: string]: tailwind_variants.ClassValue | {
32
+ group?: tailwind_variants.ClassValue;
33
+ radio?: tailwind_variants.ClassValue;
34
+ label?: tailwind_variants.ClassValue;
35
+ groupLabel?: tailwind_variants.ClassValue;
36
+ control?: tailwind_variants.ClassValue;
37
+ };
38
+ };
39
+ } | {}, {
40
+ group: string[];
41
+ groupLabel: string;
42
+ radio: string[];
43
+ control: string[];
44
+ label: string[];
45
+ }, tailwind_variants.TVReturnType<unknown, {
46
+ group: string[];
47
+ groupLabel: string;
48
+ radio: string[];
49
+ control: string[];
50
+ label: string[];
51
+ }, undefined, unknown, unknown, undefined>>;
52
+
53
+ export { RadioStyles };
@@ -0,0 +1,2 @@
1
+ import {tv}from'./../../lib/utils.js';var 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
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/radio/styles.ts"],"names":["e"],"mappings":"sCAeE,IAAA,CAAA,CAAAA,EAAA,CAAO,CACL,KAAA,CAAO,CACL,KAAA,CAAA,CAAA,+BACA,CAAA,kEAGF,CAAA,CAAA,mBACO,CACL,KAAA,CAAA,CAAA,qJACA,CAAA,6BAEF,CAAA,CAAA,iJAEE,CAAA,iEACA,CAAA,2LAEA,CAAA,sFACA,CAAA,sFACA,CAAA,mDACA,CAAA,0EAEF,CAAO,CACL,6CACA,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"]}
@@ -0,0 +1,21 @@
1
+ import { RefAttributes, PropsWithChildren } from 'react';
2
+ import { RadioProps as RadioProps$1, RadioGroupProps as RadioGroupProps$1 } from 'react-aria-components';
3
+ import { LabelProps } from '../label/types.js';
4
+
5
+ type RadioGroupProps = Omit<RadioGroupProps$1, 'className'> & RefAttributes<HTMLDivElement> & {
6
+ classNames?: {
7
+ group?: RadioGroupProps$1['className'];
8
+ label?: LabelProps['className'];
9
+ };
10
+ label?: string;
11
+ };
12
+ type RadioProps = Omit<RadioProps$1, 'className'> & RefAttributes<HTMLLabelElement> & {
13
+ classNames?: {
14
+ radio?: RadioProps$1['className'];
15
+ control?: string;
16
+ label?: string;
17
+ };
18
+ };
19
+ type RadioProviderProps = PropsWithChildren<RadioGroupProps>;
20
+
21
+ export type { RadioGroupProps, RadioProps, RadioProviderProps };
@@ -0,0 +1,2 @@
1
+ //# sourceMappingURL=types.js.map
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"types.js"}
@@ -1,2 +1,2 @@
1
- import {cn}from'./../../lib/utils.js';import {Search,Loop,CancelFill}from'@accelint/icons';import'client-only';import {cva}from'cva';import {SearchField,Input,Button}from'react-aria-components';import {Icon}from'../icon/index.js';import {jsxs,jsx}from'react/jsx-runtime';var v=cva(["hide-cancel block w-full rounded-round p-s pr-[30px] pl-[35px] font-display text-body-s outline"],{variants:{isDisabled:{true:"text-disabled outline-interactive-disabled placeholder:text-disabled",false:"text-default-light placeholder:text-default-dark hover:outline-interactive-hover focus:outline-highlight"},variant:{filled:"bg-surface-raised outline-static-dark",outlined:"outline-interactive"}}}),g=({className:i,placeholder:l="Search",variant:o="outlined",isLoading:r=false,...s})=>jsxs(SearchField,{className:cn("group relative",i),...s,children:[jsx(Icon,{className:"fg-interactive-hover absolute top-[6px] left-[7px]",children:jsx(Search,{})}),jsx(Input,{placeholder:l,className:({isDisabled:d})=>cn(v({isDisabled:d,variant:o}))}),r?jsx(Icon,{className:"fg-interactive-hover absolute top-[6px] right-[8px] animate-spin",children:jsx(Loop,{className:"scale-x-[-1]"})}):jsx(Button,{className:"fg-default-dark hover:fg-interactive-hover absolute top-[8px] right-[8px] cursor-pointer group-dtk-disabled:hidden group-dtk-empty:hidden",children:jsx(Icon,{size:"small",children:jsx(CancelFill,{})})})]});g.displayName="SearchField";export{g as SearchField};//# sourceMappingURL=index.js.map
1
+ import {cn}from'./../../lib/utils.js';import {Search,Loop,CancelFill}from'@accelint/icons';import'client-only';import {cva}from'cva';import {SearchField,Input,Button}from'react-aria-components';import {Icon}from'../icon/index.js';import {jsxs,jsx}from'react/jsx-runtime';var v=cva(["hide-cancel block w-full rounded-round p-s pr-[30px] pl-[35px] font-display text-body-s outline"],{variants:{isDisabled:{true:"text-disabled outline-interactive-disabled placeholder:text-disabled",false:"text-default-light placeholder:text-default-dark hover:outline-interactive-hover focus:outline-highlight"},variant:{filled:"bg-surface-raised outline-static-dark",outlined:"outline-interactive"}}}),g=({className:i,placeholder:l="Search",variant:o="outlined",isLoading:r=false,...s})=>jsxs(SearchField,{className:cn("group relative",i),...s,children:[jsx(Icon,{className:"fg-interactive-hover absolute top-[6px] left-[7px]",children:jsx(Search,{})}),jsx(Input,{placeholder:l,className:({isDisabled:c})=>cn(v({isDisabled:c,variant:o}))}),r?jsx(Icon,{className:"fg-interactive-hover absolute top-[6px] right-[8px] animate-spin",children:jsx(Loop,{className:"scale-x-[-1]"})}):jsx(Button,{className:"fg-default-dark hover:fg-interactive-hover absolute top-[8px] right-[8px] cursor-pointer group-empty:hidden group-disabled:hidden",children:jsx(Icon,{size:"small",children:jsx(CancelFill,{})})})]});g.displayName="SearchField";export{g as SearchField};//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/search-field/index.tsx"],"names":["h","variant","rest","jsxs","AriaSearchField","x","u","t","e","a","jsx","Input","m","textFieldStyles","isLoading","Icon","n","Button","f","c","SearchField"],"mappings":"+QA0CI,IAAA,CAAA,CAAAA,GAAA,CAAA,CAAA,iGAGA,CAAA,CAAA,CAAA,QACE,CAAA,CAAA,UACQ,CAAA,CAAA,IAAA,CAAA,sEAEJ,CAAA,KAAA,CAAA,0GAEJ,CAAA,CAAS,OACP,CAAQ,CAAA,MAAA,CAAA,gDACE,CAAA,qBAMU,CAC1B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,SACA,CAAA,CAAA,CAAA,WAAc,CAAA,CAAA,CAAA,QACd,CAAAC,OAAU,CAAA,CAAA,CAAA,UACV,CAAA,UACGC,CACL,CAAA,KAAA,CAEIC,GAACC,CAAA,CAAgB,GAAAC,IAAA,CAAAC,WAAA,CAAA,CAAA,SAAc,CAAAC,EAAA,CAAA,gBAAkCL,CAC/D,CAAA,CAAA,CAAA,GAAA,CAAA,CAAA,QAAM,CAAA,CAAAM,GAAA,CAAAC,IAAA,CAAA,CAAA,SAAU,CAAA,oDACd,CAAA,QAAY,CACdD,GAAA,CACAE,OAACC,EAAA,CACC,CAAA,CAAA,CAAAH,GAAA,CAAAI,KAAA,CAAA,CAAA,uBACc,CAAA,CAAA,CAAA,UACTC,CAAAA,CAAgB,CAAE,GAAAN,EAAA,CAAA,CAAA,CAAA,CAAA,UAAY,CAAA,CAAA,CAAAN,OAGpCa,CAAAA,CACCJ,CAAAA,CAACK,CAAAA,CAAA,CAAK,CAAA,CAAA,CAAAP,GAAA,CAAAC,IAAA,CAAA,CAAA,SAAU,CAAA,kEACd,CAAA,QAAU,CAAAD,GAAA,CAAAQ,IAAA,CAAA,CAAA,SAAU,CAAA,cAGrBC,CAAA,CAAO,CAAA,CAAA,CAAAT,GAAA,CAAAU,MAAA,CAAA,CAAA,qJACN,CAAA,aAAWT,IAAA,CAAA,CAAA,IAAA,CACT,OAAA,CAAA,QAAY,CACdD,GAAA,CACFW,UAAA,CAAA,EAEJ,CAIJC,EAAY,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,WAAc,CAAA,aAAA","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\n'use client';\nimport { cn } from '@/lib/utils';\nimport {\n CancelFill,\n Loop as LoopIcon,\n Search as SearchIcon,\n} from '@accelint/icons';\nimport 'client-only';\nimport { cva } from 'cva';\nimport {\n SearchField as AriaSearchField,\n Button,\n Input,\n} from 'react-aria-components';\nimport { Icon } from '../icon';\n\nexport interface SearchFieldProps {\n className?: string;\n /** Disables the input field. */\n isDisabled?: boolean;\n /** Displays a loading spinner. */\n isLoading?: boolean;\n /** Displays placeholder text. */\n placeholder?: string;\n /** Whether the input has a filled background or outlined. */\n variant?: 'filled' | 'outlined';\n}\n\nconst textFieldStyles = cva(\n [\n 'hide-cancel block w-full rounded-round p-s pr-[30px] pl-[35px] font-display text-body-s outline',\n ],\n {\n variants: {\n isDisabled: {\n true: 'text-disabled outline-interactive-disabled placeholder:text-disabled',\n false:\n 'text-default-light placeholder:text-default-dark hover:outline-interactive-hover focus:outline-highlight',\n },\n variant: {\n filled: 'bg-surface-raised outline-static-dark',\n outlined: 'outline-interactive',\n },\n },\n },\n);\n\nexport const SearchField = ({\n className,\n placeholder = 'Search',\n variant = 'outlined',\n isLoading = false,\n ...rest\n}: SearchFieldProps) => {\n return (\n <AriaSearchField className={cn('group relative', className)} {...rest}>\n <Icon className='fg-interactive-hover absolute top-[6px] left-[7px]'>\n <SearchIcon />\n </Icon>\n <Input\n placeholder={placeholder}\n className={({ isDisabled }) =>\n cn(textFieldStyles({ isDisabled, variant }))\n }\n />\n {isLoading ? (\n <Icon className='fg-interactive-hover absolute top-[6px] right-[8px] animate-spin'>\n <LoopIcon className='scale-x-[-1]' />\n </Icon>\n ) : (\n <Button className='fg-default-dark hover:fg-interactive-hover absolute top-[8px] right-[8px] cursor-pointer group-dtk-disabled:hidden group-dtk-empty:hidden'>\n <Icon size='small'>\n <CancelFill />\n </Icon>\n </Button>\n )}\n </AriaSearchField>\n );\n};\n\nSearchField.displayName = 'SearchField';\n"]}
1
+ {"version":3,"sources":["../../../src/components/search-field/index.tsx"],"names":["h","variant","rest","jsxs","AriaSearchField","x","u","t","e","a","jsx","Input","m","textFieldStyles","isLoading","Icon","d","Button","f","n","SearchField"],"mappings":"+QA0CI,IAAA,CAAA,CAAAA,GAAA,CAAA,CAAA,iGAGA,CAAA,CAAA,CAAA,QACE,CAAA,CAAA,UACQ,CAAA,CAAA,IAAA,CAAA,sEAEJ,CAAA,KAAA,CAAA,0GAEJ,CAAA,CAAS,OACP,CAAQ,CAAA,MAAA,CAAA,gDACE,CAAA,qBAMU,CAC1B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,SACA,CAAA,CAAA,CAAA,WAAc,CAAA,CAAA,CAAA,QACd,CAAAC,OAAU,CAAA,CAAA,CAAA,UACV,CAAA,UACGC,CACL,CAAA,KAAA,CAEIC,GAACC,CAAA,CAAgB,GAAAC,IAAA,CAAAC,WAAA,CAAA,CAAA,SAAc,CAAAC,EAAA,CAAA,gBAAkCL,CAC/D,CAAA,CAAA,CAAA,GAAA,CAAA,CAAA,QAAM,CAAA,CAAAM,GAAA,CAAAC,IAAA,CAAA,CAAA,SAAU,CAAA,oDACd,CAAA,QAAY,CACdD,GAAA,CACAE,OAACC,EAAA,CACC,CAAA,CAAA,CAAAH,GAAA,CAAAI,KAAA,CAAA,CAAA,uBACc,CAAA,CAAA,CAAA,UACTC,CAAAA,CAAgB,CAAE,GAAAN,EAAA,CAAA,CAAA,CAAA,CAAA,UAAY,CAAA,CAAA,CAAAN,OAGpCa,CAAAA,CACCJ,CAAAA,CAACK,CAAAA,CAAA,CAAK,CAAA,CAAA,CAAAP,GAAA,CAAAC,IAAA,CAAA,CAAA,SAAU,CAAA,kEACd,CAAA,QAAU,CAAAD,GAAA,CAAAQ,IAAA,CAAA,CAAA,SAAU,CAAA,cAGrBC,CAAA,CAAO,CAAA,CAAA,CAAAT,GAAA,CAAAU,MAAA,CAAA,CAAA,6IACN,CAAA,aAAWT,IAAA,CAAA,CAAA,IAAA,CACT,OAAA,CAAA,QAAY,CACdD,GAAA,CACFW,UAAA,CAAA,EAEJ,CAIJC,EAAY,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,WAAc,CAAA,aAAA","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\n'use client';\nimport { cn } from '@/lib/utils';\nimport {\n CancelFill,\n Loop as LoopIcon,\n Search as SearchIcon,\n} from '@accelint/icons';\nimport 'client-only';\nimport { cva } from 'cva';\nimport {\n SearchField as AriaSearchField,\n Button,\n Input,\n} from 'react-aria-components';\nimport { Icon } from '../icon';\n\nexport interface SearchFieldProps {\n className?: string;\n /** Disables the input field. */\n isDisabled?: boolean;\n /** Displays a loading spinner. */\n isLoading?: boolean;\n /** Displays placeholder text. */\n placeholder?: string;\n /** Whether the input has a filled background or outlined. */\n variant?: 'filled' | 'outlined';\n}\n\nconst textFieldStyles = cva(\n [\n 'hide-cancel block w-full rounded-round p-s pr-[30px] pl-[35px] font-display text-body-s outline',\n ],\n {\n variants: {\n isDisabled: {\n true: 'text-disabled outline-interactive-disabled placeholder:text-disabled',\n false:\n 'text-default-light placeholder:text-default-dark hover:outline-interactive-hover focus:outline-highlight',\n },\n variant: {\n filled: 'bg-surface-raised outline-static-dark',\n outlined: 'outline-interactive',\n },\n },\n },\n);\n\nexport const SearchField = ({\n className,\n placeholder = 'Search',\n variant = 'outlined',\n isLoading = false,\n ...rest\n}: SearchFieldProps) => {\n return (\n <AriaSearchField className={cn('group relative', className)} {...rest}>\n <Icon className='fg-interactive-hover absolute top-[6px] left-[7px]'>\n <SearchIcon />\n </Icon>\n <Input\n placeholder={placeholder}\n className={({ isDisabled }) =>\n cn(textFieldStyles({ isDisabled, variant }))\n }\n />\n {isLoading ? (\n <Icon className='fg-interactive-hover absolute top-[6px] right-[8px] animate-spin'>\n <LoopIcon className='scale-x-[-1]' />\n </Icon>\n ) : (\n <Button className='fg-default-dark hover:fg-interactive-hover absolute top-[8px] right-[8px] cursor-pointer group-empty:hidden group-disabled:hidden'>\n <Icon size='small'>\n <CancelFill />\n </Icon>\n </Button>\n )}\n </AriaSearchField>\n );\n};\n\nSearchField.displayName = 'SearchField';\n"]}
@@ -1,14 +1,17 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { ReactNode } from 'react';
3
- import { SwitchProps as SwitchProps$1 } from 'react-aria-components';
2
+ import * as react from 'react';
3
+ import { ContextValue } from 'react-aria-components';
4
+ import { SwitchProps, SwitchProviderProps } from './types.js';
4
5
 
5
- interface SwitchProps extends Omit<SwitchProps$1, 'children'> {
6
- children?: ReactNode;
6
+ declare const SwitchContext: react.Context<ContextValue<SwitchProps, HTMLLabelElement>>;
7
+ declare function SwitchProvider({ children, ...props }: SwitchProviderProps): react_jsx_runtime.JSX.Element;
8
+ declare namespace SwitchProvider {
9
+ var displayName: string;
7
10
  }
8
- declare function Switch({ children, className, ...props }: SwitchProps): react_jsx_runtime.JSX.Element;
11
+ declare function Switch({ ref, ...props }: SwitchProps): react_jsx_runtime.JSX.Element;
9
12
  declare namespace Switch {
10
13
  var displayName: string;
11
- var as: (className?: string | string[]) => string;
14
+ var Provider: typeof SwitchProvider;
12
15
  }
13
16
 
14
- export { Switch, type SwitchProps };
17
+ export { Switch, SwitchContext };
@@ -1,2 +1,2 @@
1
- import {cn}from'./../../lib/utils.js';import'client-only';import {cva}from'cva';import {Switch}from'react-aria-components';import {Label}from'../label/index.js';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var b=Label.as(),r=cva(["relative flex h-l w-[32px] items-center rounded-round bg-transparent outline outline-interactive","before:absolute before:block before:size-m before:rounded-full before:bg-default-dark","group-hover:bg-interactive-hover-dark group-hover:outline-interactive-hover group-hover:before:bg-interactive-hover","group-focus-within:bg-interactive-hover-dark group-focus-within:outline-interactive-hover group-focus-within:before:bg-interactive-hover"],{variants:{isSelected:{true:["outline-highlight before:right-[3px] before:bg-highlight","group-hover:bg-highlight-subtle group-hover:outline-highlight group-hover:before:bg-highlight","group-focus-within:bg-highlight-subtle group-focus-within:outline-interactive-hover group-focus-within:before:bg-highlight","group-dtk-disabled:bg-interactive-disabled group-dtk-disabled:outline-interactive-disabled group-dtk-disabled:before:bg-disabled"],false:"before:left-[3px]"},isDisabled:{true:"group-dtk-disabled:bg-interactive-disabled group-dtk-disabled:outline-interactive-disabled group-dtk-disabled:before:bg-disabled",false:""}},defaultVariants:{isSelected:false}});function o({children:e,className:a,...s}){return jsx(Switch,{...s,className:"group flex dtk-disabled:cursor-not-allowed items-center gap-s",children:({isDisabled:l,isSelected:h})=>jsxs(Fragment,{children:[jsx("div",{className:cn(r({className:a,isDisabled:l,isSelected:h}))}),e&&jsx("span",{className:b,children:e})]})})}o.displayName="Switch";o.as=e=>cn(r({className:e}));export{o as Switch};//# sourceMappingURL=index.js.map
1
+ import'client-only';import {createContext}from'react';import {useContextProps,Switch,composeRenderProps}from'react-aria-components';import {SwitchStyles}from'./styles.js';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var {switch:P,control:d,label:u}=SwitchStyles(),c=createContext(null);function a({children:t,...e}){return jsx(c.Provider,{value:e,children:t})}a.displayName="Switch.Provider";function l({ref:t,...e}){[e,t]=useContextProps(e,t??null,c);let{children:n,classNames:s,...m}=e;return jsx(Switch,{...m,ref:t,className:composeRenderProps(s?.switch,o=>P({className:o})),children:composeRenderProps(n,o=>jsxs(Fragment,{children:[jsx("span",{className:d({className:s?.control})}),o&&jsx("span",{className:u({className:s?.label}),children:o})]}))})}l.displayName="Switch";l.Provider=a;export{l as Switch,c as SwitchContext};//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/switch/index.tsx"],"names":["switchStyles","cva","d","jsx","props","g","Fragment","u","c","i","t","children","Switch","className","cn"],"mappings":"mNAuB0B,IAAG,CAEvBA,CAAAA,KAAeC,GAEjB,EAAA,CAAA,CAAA,CAAAC,GAAA,CAAA,CAAA,kGACA,CAAA,uFACA,CAAA,qHACA,CAAA,0IAGA,CAAA,CAAA,CAAA,QACE,CAAA,CAAA,UAEI,CAAA,CAAA,IAAA,CAAA,CAAA,0DACA,CAAA,+FACA,CAAA,+PAGK,CAAA,CAAA,KAAA,CAAA,mBAET,CAAA,CAAA,UACQ,CAAA,CAAA,IAAA,CAAA,kIACC,CACT,KAEF,CAAA,EAAA,CAAA,CAAA,CAAA,eACE,CAAA,CAAA,UASC,CAAA,KAAA,CAAA,CAAA,CAAA,CAAA,SAAkB,CAAA,CAAA,CAAA,QAAU,CAAA,CAAA,CAAA,SAAoB,CAAgB,CACrE,CAAA,GAAA,CAAA,CAAA,CACEC,CAAAA,OACMC,GAAAA,CACJC,MAAA,CAAA,CAAA,GAAA,CAAA,CAAA,SAAU,CAAA,+DAET,CAAA,QAAG,CAAA,CAAA,CAAA,UAAY,CAAA,CAAA,CAAA,UACdC,CAAAA,CAAA,CACE,GAAAC,IAAA,CAAAC,QAAA,CAAA,CAAA,QAAC,CAAA,CAAAC,GACC,CAAA,KAAA,CAAA,CAAA,SAA6B,CAAAC,EAAA,CAAA,CAAA,CAAA,CAAA,SAAW,CAAA,CAAA,CAAA,UAAY,CAAA,CAAA,CAAA,UAErDC,CAAAA,CAAAA,CAAYR,CAAAA,CAAC,CAAA,CAAA,CAAA,CAAA,EAAAM,GAAA,CAAK,MAAA,CAAA,CAAA,SAAyB,CAAA,CAAA,CAAA,QAGlD,CAEJ,CACAG,CAAAA,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,oBACMC,CAAkCC,CAAAA,CAAGd,EAAa,CAAE,CAAA,EAAAU,EAAA,CAAA,CAAA,CAAA,CAAA,SAAY,CAAA,CAAA,CAAA,CAAA,CAAA","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\n'use client';\nimport { cn } from '@/lib/utils';\nimport 'client-only';\nimport { cva } from 'cva';\nimport type { ReactNode } from 'react';\nimport {\n Switch as AriaSwitch,\n type SwitchProps as AriaSwitchProps,\n} from 'react-aria-components';\nimport { Label } from '../label';\n\nconst labelStyles = Label.as();\n\nconst switchStyles = cva(\n [\n 'relative flex h-l w-[32px] items-center rounded-round bg-transparent outline outline-interactive',\n 'before:absolute before:block before:size-m before:rounded-full before:bg-default-dark',\n 'group-hover:bg-interactive-hover-dark group-hover:outline-interactive-hover group-hover:before:bg-interactive-hover',\n 'group-focus-within:bg-interactive-hover-dark group-focus-within:outline-interactive-hover group-focus-within:before:bg-interactive-hover',\n ],\n {\n variants: {\n isSelected: {\n true: [\n 'outline-highlight before:right-[3px] before:bg-highlight',\n 'group-hover:bg-highlight-subtle group-hover:outline-highlight group-hover:before:bg-highlight',\n 'group-focus-within:bg-highlight-subtle group-focus-within:outline-interactive-hover group-focus-within:before:bg-highlight',\n 'group-dtk-disabled:bg-interactive-disabled group-dtk-disabled:outline-interactive-disabled group-dtk-disabled:before:bg-disabled',\n ],\n false: 'before:left-[3px]',\n },\n isDisabled: {\n true: 'group-dtk-disabled:bg-interactive-disabled group-dtk-disabled:outline-interactive-disabled group-dtk-disabled:before:bg-disabled',\n false: '',\n },\n },\n defaultVariants: {\n isSelected: false,\n },\n },\n);\n\nexport interface SwitchProps extends Omit<AriaSwitchProps, 'children'> {\n children?: ReactNode;\n}\n\nexport function Switch({ children, className, ...props }: SwitchProps) {\n return (\n <AriaSwitch\n {...props}\n className='group flex dtk-disabled:cursor-not-allowed items-center gap-s'\n >\n {({ isDisabled, isSelected }) => (\n <>\n <div\n className={cn(switchStyles({ className, isDisabled, isSelected }))}\n />\n {children && <span className={labelStyles}>{children}</span>}\n </>\n )}\n </AriaSwitch>\n );\n}\nSwitch.displayName = 'Switch';\nSwitch.as = (className?: string | string[]) => cn(switchStyles({ className }));\n"]}
1
+ {"version":3,"sources":["../../../src/components/switch/index.tsx"],"names":["switchClassNames","control","label","SwitchStyles","SwitchContext","createContext","SwitchProvider","children","jsx","props","Switch","ref","useContextProps","classNames","AriaSwitch","composeRenderProps","className","jsxs","Fragment"],"mappings":"6NAyBM,IAAE,CAAA,MAAQA,CAAAA,CAAkB,QAAAC,CAAAA,CAAS,CAAA,KAAAC,CAAM,CAAA,CAAIC,aAAa,EAErDC,CAAAA,CACXC,CAAAA,aAA2D,CAAA,IAAI,EAEjE,SAASC,CAAe,CAAE,SAAAC,CAAAA,CAAU,CAAA,GAAS,CAAA,CAAwB,CACnE,CAAA,OACEC,GAACJ,CAAAA,CAAc,CAAA,QAAd,CAAuB,CAAA,KAAOK,CAAAA,CAAQ,CAAA,QAAAF,CAAAA,CAAS,CAEpD,CACAD,CAAAA,CAAe,CAAA,WAAc,CAAA,iBAEtB,UAASI,CAAO,CAAE,CAAA,GAAAC,CAAAA,CAAK,IAAS,CAAA,CAAgB,CACrD,CAACF,EAAOE,CAAG,CAAA,CAAIC,CAAAA,eAAgBH,CAAAA,CAAOE,CAAAA,CAAAA,EAAO,IAAMP,CAAa,CAAA,CAEhE,IAAQ,CAAA,QAAAG,CAAAA,CAAU,CAAA,UAAAM,EAAY,CAAA,GAAQ,CAAA,CAAIJ,CAAAA,CAE1C,QACED,GAACM,CAAAA,MAAA,CACE,CAAA,IACD,CAAA,GAAKH,CAAAA,CACL,CAAA,SAAWI,CAAAA,kBAAmBF,IAAY,MAASG,CAAAA,CAAAA,EACjDhB,CAAiB,CAAE,UAAAgB,CAAU,CAAC,CAChC,CAAA,CAEC,SAAAD,CAAAA,kBAAmBR,CAAAA,CAAWA,CAAAA,CAAAA,EAC7BU,IAAAC,SAAA,CACE,CAAA,QAAA,CAAAV,CAAAA,GAAC,CAAA,MAAA,CAAK,UAAWP,CAAAA,CAAQ,CAAE,CAAA,SAAWY,CAAAA,CAAAA,SAAqB,CAAA,CAAG,CAAA,CAC7DN,CAAAA,CAAAA,KACE,CAAA,MAAA,CAAK,CAAA,SAAWL,CAAAA,CAAM,CAAE,UAAWW,CAAAA,CAAAA,EAAY,KAAO,CAAA,CACpD,SAAAN,CAAAA,CACH,CAAA,CAAA,CAEJ,CACD,CAAA,CACH,CAEJ,CACAG,CAAAA,CAAO,CAAA,WAAc,CAAA,QACrBA,EAAO,CAAA,QAAWJ,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 Switch as AriaSwitch,\n type ContextValue,\n composeRenderProps,\n useContextProps,\n} from 'react-aria-components';\nimport { SwitchStyles } from './styles';\nimport type { SwitchProps, SwitchProviderProps } from './types';\n\n// \"switch\" is a reserved term in JS\nconst { switch: switchClassNames, control, label } = SwitchStyles();\n\nexport const SwitchContext =\n createContext<ContextValue<SwitchProps, HTMLLabelElement>>(null);\n\nfunction SwitchProvider({ children, ...props }: SwitchProviderProps) {\n return (\n <SwitchContext.Provider value={props}>{children}</SwitchContext.Provider>\n );\n}\nSwitchProvider.displayName = 'Switch.Provider';\n\nexport function Switch({ ref, ...props }: SwitchProps) {\n [props, ref] = useContextProps(props, ref ?? null, SwitchContext);\n\n const { children, classNames, ...rest } = props;\n\n return (\n <AriaSwitch\n {...rest}\n ref={ref}\n className={composeRenderProps(classNames?.switch, (className) =>\n switchClassNames({ className }),\n )}\n >\n {composeRenderProps(children, (children) => (\n <>\n <span className={control({ className: classNames?.control })} />\n {children && (\n <span className={label({ className: classNames?.label })}>\n {children}\n </span>\n )}\n </>\n ))}\n </AriaSwitch>\n );\n}\nSwitch.displayName = 'Switch';\nSwitch.Provider = SwitchProvider;\n"]}
@@ -0,0 +1,41 @@
1
+ import * as tailwind_variants from 'tailwind-variants';
2
+
3
+ declare const SwitchStyles: tailwind_variants.TVReturnType<{
4
+ [key: string]: {
5
+ [key: string]: tailwind_variants.ClassValue | {
6
+ switch?: tailwind_variants.ClassValue;
7
+ label?: tailwind_variants.ClassValue;
8
+ control?: tailwind_variants.ClassValue;
9
+ };
10
+ };
11
+ } | {
12
+ [x: string]: {
13
+ [x: string]: tailwind_variants.ClassValue | {
14
+ switch?: tailwind_variants.ClassValue;
15
+ label?: tailwind_variants.ClassValue;
16
+ control?: tailwind_variants.ClassValue;
17
+ };
18
+ };
19
+ } | {}, {
20
+ switch: string;
21
+ control: string[];
22
+ label: string[];
23
+ }, undefined, {
24
+ [key: string]: {
25
+ [key: string]: tailwind_variants.ClassValue | {
26
+ switch?: tailwind_variants.ClassValue;
27
+ label?: tailwind_variants.ClassValue;
28
+ control?: tailwind_variants.ClassValue;
29
+ };
30
+ };
31
+ } | {}, {
32
+ switch: string;
33
+ control: string[];
34
+ label: string[];
35
+ }, tailwind_variants.TVReturnType<unknown, {
36
+ switch: string;
37
+ control: string[];
38
+ label: string[];
39
+ }, undefined, unknown, unknown, undefined>>;
40
+
41
+ export { SwitchStyles };
@@ -0,0 +1,2 @@
1
+ import {tv}from'./../../lib/utils.js';var o=tv({slots:{switch:"group flex cursor-pointer items-center gap-s disabled:cursor-not-allowed",control:["flex rounded-round bg-transparent p-xxs outline outline-interactive before:mr-l before:block before:size-m before:rounded-full before:bg-default-dark","group-enabled:group-focus:bg-interactive-hover-dark group-enabled:group-focus:outline-interactive-hover group-enabled:group-focus:before:bg-interactive-hover","group-enabled:group-hover:bg-interactive-hover-dark group-enabled:group-hover:outline-interactive-hover group-enabled:group-hover:before:bg-interactive-hover","group-enabled:group-selected:outline-highlight group-selected:before:mr-0 group-selected:before:ml-l group-enabled:group-selected:before:bg-highlight","group-enabled:group-selected:group-focus:bg-highlight-subtle group-enabled:group-selected:group-focus:outline-interactive-hover group-enabled:group-selected:group-focus:before:bg-highlight","group-enabled:group-selected:group-hover:bg-highlight-subtle group-enabled:group-selected:group-hover:outline-highlight group-enabled:group-selected:group-hover:before:bg-highlight","group-disabled:bg-interactive-disabled group-disabled:outline-interactive-disabled group-disabled:before:bg-disabled"],label:["text-body-s text-interactive-default","group-disabled:text-interactive-disabled"]}});export{o as SwitchStyles};//# sourceMappingURL=styles.js.map
2
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/switch/styles.ts"],"names":["e"],"mappings":"sCAeE,IAAA,CAAA,CAAAA,EAAA,CAAO,CACL,KAAA,CAAA,CACE,MAAA,CAAA,0EACF,CAAA,OACE,CAAA,CAAA,uJACA,CAAA,+JACA,CAAA,+JACA,CAAA,uJACA,CAAA,8LACA,CAAA,sLACA,CAAA,sHAEF,CAAO,CACL,KAAA,CAAA,CAAA,sCACA,CAAA,0CAGL,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 SwitchStyles = tv({\n slots: {\n switch:\n 'group flex cursor-pointer items-center gap-s disabled:cursor-not-allowed',\n control: [\n 'flex rounded-round bg-transparent p-xxs outline outline-interactive before:mr-l before:block before:size-m before:rounded-full before:bg-default-dark',\n 'group-enabled:group-focus:bg-interactive-hover-dark group-enabled:group-focus:outline-interactive-hover group-enabled:group-focus:before:bg-interactive-hover',\n 'group-enabled:group-hover:bg-interactive-hover-dark group-enabled:group-hover:outline-interactive-hover group-enabled:group-hover:before:bg-interactive-hover',\n 'group-enabled:group-selected:outline-highlight group-selected:before:mr-0 group-selected:before:ml-l group-enabled:group-selected:before:bg-highlight',\n 'group-enabled:group-selected:group-focus:bg-highlight-subtle group-enabled:group-selected:group-focus:outline-interactive-hover group-enabled:group-selected:group-focus:before:bg-highlight',\n 'group-enabled:group-selected:group-hover:bg-highlight-subtle group-enabled:group-selected:group-hover:outline-highlight group-enabled:group-selected:group-hover:before:bg-highlight',\n 'group-disabled:bg-interactive-disabled group-disabled:outline-interactive-disabled group-disabled:before:bg-disabled',\n ],\n label: [\n 'text-body-s text-interactive-default',\n 'group-disabled:text-interactive-disabled',\n ],\n },\n});\n"]}
@@ -0,0 +1,13 @@
1
+ import { RefAttributes, PropsWithChildren } from 'react';
2
+ import { SwitchProps as SwitchProps$1 } from 'react-aria-components';
3
+
4
+ type SwitchProps = Omit<SwitchProps$1, 'className'> & RefAttributes<HTMLLabelElement> & {
5
+ classNames?: {
6
+ switch?: SwitchProps$1['className'];
7
+ control?: string;
8
+ label?: string;
9
+ };
10
+ };
11
+ type SwitchProviderProps = PropsWithChildren<SwitchProps>;
12
+
13
+ export type { SwitchProps, SwitchProviderProps };
@@ -0,0 +1,2 @@
1
+ //# sourceMappingURL=types.js.map
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"types.js"}
@@ -1,2 +1,2 @@
1
- import {containsExactChildren}from'./../../lib/react.js';import {cn}from'./../../lib/utils.js';import'client-only';import {cva}from'cva';import {Tabs,TabList,Tab,TabPanel}from'react-aria-components';import {jsx}from'react/jsx-runtime';var s=({children:t,className:a,orientation:e="horizontal",isDisabled:r=false,...o})=>(containsExactChildren({children:t,componentName:s.displayName,restrictions:{[n.displayName]:{min:1,max:1}}}),jsx(Tabs,{orientation:e,isDisabled:r,className:cn("group flex w-content flex-row dtk-orientation-horizontal:flex-col",a),...o,children:t}));s.displayName="Tabs";var k=cva("flex dtk-orientation-horizontal:flex-row flex-col",{variants:{variant:{icons:"[&>*]:p-xs dtk-orientation-horizontal:[&>*]:pr-s dtk-orientation-horizontal:[&>*]:pl-s [&>*]:leading-[0]",default:"[&>*]:p-s [&>*]:text-header-m"},drawer:{left:"dtk-orientation-vertical:gap-xs rounded-r-large bg-surface-default p-s",right:"dtk-orientation-vertical:gap-xs rounded-l-large bg-surface-default p-s",top:"dtk-orientation-vertical:gap-xs rounded-b-large bg-surface-default p-s",bottom:"dtk-orientation-vertical:gap-xs rounded-t-large bg-surface-default p-s"}}}),n=({children:t,className:a,variant:e="default",drawer:r=void 0,...o})=>(containsExactChildren({children:t,componentName:n.displayName,restrictions:{[d.displayName]:{min:1}}}),jsx(TabList,{className:cn(k({variant:e,drawer:r}),a),...o,children:t}));n.displayName="Tabs.List";s.List=n;var x=cn("fg-default-dark cursor-pointer p-s outline-none","rounded-medium group-dtk-orientation-horizontal:rounded-small group-dtk-orientation-horizontal:rounded-b-none","group-dtk-orientation-horizontal:border-static-light group-dtk-orientation-horizontal:border-b","group-dtk-orientation-vertical:border group-dtk-orientation-vertical:border-transparent"),z=cva(x,{variants:{isSelected:{true:"fg-highlight bg-highlight-subtle group-dtk-orientation-horizontal:border-highlight"},isHovered:{true:"fg-default-light group-dtk-orientation-horizontal:border-interactive-hover"},isFocused:{true:"fg-default-light group-dtk-orientation-horizontal:border-interactive-hover"},isDisabled:{true:"fg-disabled cursor-not-allowed group-dtk-orientation-horizontal:border-interactive-disabled"}},compoundVariants:[{isSelected:true,isHovered:true,className:"fg-highlight group-dtk-orientation-horizontal:border-highlight"},{isSelected:true,isFocused:true,className:"fg-highlight group-dtk-orientation-horizontal:border-interactive-hover group-dtk-orientation-vertical:border-interactive-hover"},{isDisabled:true,isSelected:true,className:"fg-disabled bg-interactive-disabled group-dtk-orientation-horizontal:border-interactive-disabled"}]}),d=({id:t,children:a,className:e,isDisabled:r=false,...o})=>jsx(Tab,{id:t,className:({isSelected:c,isHovered:g,isFocused:h,isDisabled:f})=>cn(z({isSelected:c,isHovered:g,isFocused:h,isDisabled:f}),e),isDisabled:r,...o,children:a});d.displayName="Tabs.Tab";s.Tab=d;var u=({id:t,children:a,className:e,...r})=>jsx(TabPanel,{id:t,className:cn("fg-default-light p-s group-dtk-orientation-vertical:pt-0 group-dtk-orientation-horizontal:pl-0",e),...r,children:a});u.displayName="Tabs.Panel";s.Panel=u;export{s as Tabs};//# sourceMappingURL=index.js.map
1
+ import {containsExactChildren}from'./../../lib/react.js';import {cn}from'./../../lib/utils.js';import'client-only';import {cva}from'cva';import {Tabs,TabList,Tab,TabPanel}from'react-aria-components';import {jsx}from'react/jsx-runtime';var s=({children:a,className:e,orientation:r="horizontal",isDisabled:t=false,...o})=>(containsExactChildren({children:a,componentName:s.displayName,restrictions:{[n.displayName]:{min:1,max:1}}}),jsx(Tabs,{orientation:r,isDisabled:t,className:cn("group flex w-content flex-row orientation-horizontal:flex-col",e),...o,children:a}));s.displayName="Tabs";var x=cva("flex orientation-horizontal:flex-row flex-col",{variants:{variant:{icons:"[&>*]:p-xs orientation-horizontal:[&>*]:pr-s orientation-horizontal:[&>*]:pl-s [&>*]:leading-[0]",default:"[&>*]:p-s [&>*]:text-header-m"},drawer:{left:"orientation-vertical:gap-xs rounded-r-large bg-surface-default p-s",right:"orientation-vertical:gap-xs rounded-l-large bg-surface-default p-s",top:"orientation-vertical:gap-xs rounded-b-large bg-surface-default p-s",bottom:"orientation-vertical:gap-xs rounded-t-large bg-surface-default p-s"}}}),n=({children:a,className:e,variant:r="default",drawer:t=void 0,...o})=>(containsExactChildren({children:a,componentName:n.displayName,restrictions:{[d.displayName]:{min:1}}}),jsx(TabList,{className:cn(x({variant:r,drawer:t}),e),...o,children:a}));n.displayName="Tabs.List";s.List=n;var z=cn("fg-default-dark cursor-pointer p-s outline-none","rounded-medium group-orientation-horizontal:rounded-small group-orientation-horizontal:rounded-b-none","group-orientation-horizontal:border-static-light group-orientation-horizontal:border-b","group-orientation-vertical:border group-orientation-vertical:border-transparent"),N=cva(z,{variants:{isSelected:{true:"fg-highlight bg-highlight-subtle group-orientation-horizontal:border-highlight"},isHovered:{true:"fg-default-light group-orientation-horizontal:border-interactive-hover"},isFocused:{true:"fg-default-light group-orientation-horizontal:border-interactive-hover"},isDisabled:{true:"fg-disabled cursor-not-allowed group-orientation-horizontal:border-interactive-disabled"}},compoundVariants:[{isSelected:true,isHovered:true,className:"fg-highlight group-orientation-horizontal:border-highlight"},{isSelected:true,isFocused:true,className:"fg-highlight group-orientation-horizontal:border-interactive-hover group-orientation-vertical:border-interactive-hover"},{isDisabled:true,isSelected:true,className:"fg-disabled bg-interactive-disabled group-orientation-horizontal:border-interactive-disabled"}]}),d=({id:a,children:e,className:r,isDisabled:t=false,...o})=>jsx(Tab,{id:a,className:({isSelected:c,isHovered:g,isFocused:h,isDisabled:f})=>cn(N({isSelected:c,isHovered:g,isFocused:h,isDisabled:f}),r),isDisabled:t,...o,children:e});d.displayName="Tabs.Tab";s.Tab=d;var u=({id:a,children:e,className:r,...t})=>jsx(TabPanel,{id:a,className:cn("fg-default-light p-s group-orientation-vertical:pt-0 group-orientation-horizontal:pl-0",r),...t,children:e});u.displayName="Tabs.Panel";s.Panel=u;export{s as Tabs};//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/tabs/index.tsx"],"names":["children","orientation","containsExactChildren","p","Tabs","jsx","AriaTabs","l","v","isDisabled","cn","i","cva","className","TabList","AriaTabList","tabListStyles","variant","tabBaseStyles","b","AriaTab","id","T","isSelected","isHovered","isFocused","Tab","TabPanel","AriaTabPanel","P"],"mappings":"2OA+BEA,IAAAA,CACA,CAAA,CAAA,CAAA,SACA,CAAA,CAAA,SAAA,CAAAC,CAAAA,CAAc,aACd,CAAA,YAAa,CAAA,UAEf,CACEC,CAAAA,CAAsB,KACpB,CAAA,GAAA,CAAA,CAAA,IACAC,qBAAA,CAAA,CAAA,QAAA,CAAA,CAAA,CAAeC,aAAK,CACpB,CAAA,CAAA,WAAc,CACZ,cAAoB,CAAA,CAAG,CAAE,WAAe,EAE5C,CAAC,GAGCC,CAACC,CAAAA,CAAA,GACC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAAC,GAAA,CAAAC,IAAaP,CAAAA,CACb,WAAYQ,CAAAA,CACZ,WAAWC,CACT,CAAA,CAAA,SAAA,CAAAC,EAAA,CAAA,mEAKD,CAAA,CAAA,CAAA,CAAAX,GACH,CAAA,CAIJI,cAAmB,CAAA,CAAA,WASGQ,CAAAA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,UAAW,CAAA,IACX,UACE,CAAA,IAAA,CAAA,SAAA,CAAA,gIAGU,GACZ,UAAA,CAAY,IAAA,CACZ,UACE,CAAA,IAAA,CAAA,SAAA,CAAA,kGASN,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAAnB,EACA,WAAAa,CACA,CAAA,CAAA,SAAAJ,CAAAA,CAAa,CAAA,UAIXJ,CAAAA,CAACe,CAAAA,KACC,CAAA,GAAIC,CACJ,CAAA,GAAAd,GAAA,CAAAe,GAAA,CAAA,CAAA,EAAY,CAAE,CAAA,CAAA,SAAAC,CAAAA,CAAY,WAAAC,CAAW,CAAA,CAAA,UAAW,CAAA,CAAA,SAAAf,CAAW,CAAA,CAAA,UAE3C,CAAA,CAAA,CAAA,GAAAE,EAAA,CAAAY,CAAAA,CAAY,CAAA,WAAW,CAAA,CAAA,SAAAE,CAAW,CAAA,CAAA,SAAAhB,CAAW,CAAC,CAAA,UAI9D,CAAA,CAAA,CAAA,CAAA,CAAYA,CAAAA,CACX,WAEA,CAAA,CAAA,CAAAT,GACH,CAIJ0B,SAAI,CAAA,CAAA,CAAA,CAAA,CAAc,CAAA,CAAA,WACb,CAAA,UAICC,CAAW,CAAC,CAAE,GAAAN,CAAAA,CAAI,CAAA,IAAA,CAAA,CAAA,CAAA,CAAArB,EAAU,CAAA,CAAA,CAAA,QAAAa,CAAW,WAExCe,CAAA,CACC,CAAA,GAAIP,CACJ,CAAA,GAAAd,GAAA,CAAAsB,QAAA,CAAA,CAAA,EAAWnB,CACT,mHAKDV,GACH,CAIJ2B,SAAS,CAAA,CAAA,CAAA,CAAA,CAAc,CAAA,CAAA,WACvBvB,aAAauB,CAAAA,CAAAA,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\n'use client';\nimport { containsExactChildren } from '@/lib/react';\nimport { cn } from '@/lib/utils';\nimport 'client-only';\nimport { cva } from 'cva';\nimport {\n Tab as AriaTab,\n TabList as AriaTabList,\n type TabListProps as AriaTabListProps,\n TabPanel as AriaTabPanel,\n type TabPanelProps as AriaTabPanelProps,\n type TabProps as AriaTabProps,\n Tabs as AriaTabs,\n type TabsProps as AriaTabsProps,\n} from 'react-aria-components';\n\nexport interface TabsProps extends AriaTabsProps {}\n\nexport const Tabs = ({\n children,\n className,\n orientation = 'horizontal',\n isDisabled = false,\n ...rest\n}: TabsProps) => {\n containsExactChildren({\n children,\n componentName: Tabs.displayName,\n restrictions: {\n [TabList.displayName]: { min: 1, max: 1 },\n },\n });\n\n return (\n <AriaTabs\n orientation={orientation}\n isDisabled={isDisabled}\n className={cn(\n 'group flex w-content flex-row dtk-orientation-horizontal:flex-col',\n className,\n )}\n {...rest}\n >\n {children}\n </AriaTabs>\n );\n};\n\nTabs.displayName = 'Tabs';\n\nexport interface TabListProps extends AriaTabListProps<object> {\n /** Whether the tabs are displaying iconography or text. */\n variant?: 'default' | 'icons';\n /** Whether the tabs are used as drawer controls. */\n drawer?: 'left' | 'right' | 'top' | 'bottom';\n}\n\nconst tabListStyles = cva('flex dtk-orientation-horizontal:flex-row flex-col', {\n variants: {\n variant: {\n icons:\n '[&>*]:p-xs dtk-orientation-horizontal:[&>*]:pr-s dtk-orientation-horizontal:[&>*]:pl-s [&>*]:leading-[0]',\n default: '[&>*]:p-s [&>*]:text-header-m',\n },\n drawer: {\n left: 'dtk-orientation-vertical:gap-xs rounded-r-large bg-surface-default p-s',\n right:\n 'dtk-orientation-vertical:gap-xs rounded-l-large bg-surface-default p-s',\n top: 'dtk-orientation-vertical:gap-xs rounded-b-large bg-surface-default p-s',\n bottom:\n 'dtk-orientation-vertical:gap-xs rounded-t-large bg-surface-default p-s',\n },\n },\n});\n\nconst TabList = ({\n children,\n className,\n variant = 'default',\n drawer = undefined,\n ...rest\n}: TabListProps) => {\n containsExactChildren({\n children,\n componentName: TabList.displayName,\n restrictions: {\n [Tab.displayName]: { min: 1 },\n },\n });\n\n return (\n <AriaTabList\n className={cn(tabListStyles({ variant, drawer }), className)}\n {...rest}\n >\n {children}\n </AriaTabList>\n );\n};\n\nTabList.displayName = 'Tabs.List';\nTabs.List = TabList;\n\nconst tabBaseStyles = cn(\n 'fg-default-dark cursor-pointer p-s outline-none',\n 'rounded-medium group-dtk-orientation-horizontal:rounded-small group-dtk-orientation-horizontal:rounded-b-none',\n 'group-dtk-orientation-horizontal:border-static-light group-dtk-orientation-horizontal:border-b',\n 'group-dtk-orientation-vertical:border group-dtk-orientation-vertical:border-transparent',\n);\n\nconst tabStyles = cva(tabBaseStyles, {\n variants: {\n isSelected: {\n true: 'fg-highlight bg-highlight-subtle group-dtk-orientation-horizontal:border-highlight',\n },\n isHovered: {\n true: 'fg-default-light group-dtk-orientation-horizontal:border-interactive-hover',\n },\n isFocused: {\n true: 'fg-default-light group-dtk-orientation-horizontal:border-interactive-hover',\n },\n isDisabled: {\n true: 'fg-disabled cursor-not-allowed group-dtk-orientation-horizontal:border-interactive-disabled',\n },\n },\n compoundVariants: [\n {\n isSelected: true,\n isHovered: true,\n className:\n 'fg-highlight group-dtk-orientation-horizontal:border-highlight',\n },\n {\n isSelected: true,\n isFocused: true,\n className:\n 'fg-highlight group-dtk-orientation-horizontal:border-interactive-hover group-dtk-orientation-vertical:border-interactive-hover',\n },\n {\n isDisabled: true,\n isSelected: true,\n className:\n 'fg-disabled bg-interactive-disabled group-dtk-orientation-horizontal:border-interactive-disabled',\n },\n ],\n});\n\nexport interface TabProps extends AriaTabProps {}\n\nconst Tab = ({\n id,\n children,\n className,\n isDisabled = false,\n ...rest\n}: TabProps) => {\n return (\n <AriaTab\n id={id}\n className={({ isSelected, isHovered, isFocused, isDisabled }) =>\n cn(\n tabStyles({ isSelected, isHovered, isFocused, isDisabled }),\n className,\n )\n }\n isDisabled={isDisabled}\n {...rest}\n >\n {children}\n </AriaTab>\n );\n};\n\nTab.displayName = 'Tabs.Tab';\nTabs.Tab = Tab;\n\nexport interface TabPanelProps extends AriaTabPanelProps {}\n\nconst TabPanel = ({ id, children, className, ...rest }: TabPanelProps) => {\n return (\n <AriaTabPanel\n id={id}\n className={cn(\n 'fg-default-light p-s group-dtk-orientation-vertical:pt-0 group-dtk-orientation-horizontal:pl-0',\n className,\n )}\n {...rest}\n >\n {children}\n </AriaTabPanel>\n );\n};\n\nTabPanel.displayName = 'Tabs.Panel';\nTabs.Panel = TabPanel;\n"]}
1
+ {"version":3,"sources":["../../../src/components/tabs/index.tsx"],"names":["children","orientation","containsExactChildren","p","Tabs","jsx","AriaTabs","l","v","isDisabled","cn","i","cva","className","TabList","AriaTabList","tabListStyles","variant","tabBaseStyles","b","AriaTab","id","T","isSelected","isHovered","isFocused","Tab","TabPanel","AriaTabPanel","P"],"mappings":"2OA+BEA,IAAAA,CACA,CAAA,CAAA,CAAA,SACA,CAAA,CAAA,SAAA,CAAAC,CAAAA,CAAc,aACd,CAAA,YAAa,CAAA,UAEf,CACEC,CAAAA,CAAsB,KACpB,CAAA,GAAA,CAAA,CAAA,IACAC,qBAAA,CAAA,CAAA,QAAA,CAAA,CAAA,CAAeC,aAAK,CACpB,CAAA,CAAA,WAAc,CACZ,cAAoB,CAAA,CAAG,CAAE,WAAe,EAE5C,CAAC,GAGCC,CAACC,CAAAA,CAAA,GACC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAAC,GAAA,CAAAC,IAAaP,CAAAA,CACb,WAAYQ,CAAAA,CACZ,WAAWC,CACT,CAAA,CAAA,SAAA,CAAAC,EAAA,CAAA,+DAKD,CAAA,CAAA,CAAA,CAAAX,GACH,CA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W,CAAA,IAAA,CAAA,SAAA,CAAA,4DAGC,GACZ,UAAW,CAAA,IACX,UACE,CAAA,IAAA,CAAA,SAAA,CAAA,wHAGU,GACZ,UAAA,CAAY,IAAA,CACZ,UACE,CAAA,IAAA,CAAA,SAAA,CAAA,8FASN,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAAnB,EACA,WAAAa,CACA,CAAA,CAAA,SAAAJ,CAAAA,CAAa,CAAA,UAIXJ,CAAAA,CAACe,CAAAA,KACC,CAAA,GAAIC,CACJ,CAAA,GAAAd,GAAA,CAAAe,GAAA,CAAA,CAAA,EAAY,CAAE,CAAA,CAAA,SAAAC,CAAAA,CAAY,WAAAC,CAAW,CAAA,CAAA,UAAW,CAAA,CAAA,SAAAf,CAAW,CAAA,CAAA,UAE3C,CAAA,CAAA,CAAA,GAAAE,EAAA,CAAAY,CAAAA,CAAY,CAAA,WAAW,CAAA,CAAA,SAAAE,CAAW,CAAA,CAAA,SAAAhB,CAAW,CAAC,CAAA,UAI9D,CAAA,CAAA,CAAA,CAAA,CAAYA,CAAAA,CACX,WAEA,CAAA,CAAA,CAAAT,GACH,CAIJ0B,SAAI,CAAA,CAAA,CAAA,CAAA,CAAc,CAAA,CAAA,WACb,CAAA,UAICC,CAAW,CAAC,CAAE,GAAAN,CAAAA,CAAI,CAAA,IAAA,CAAA,CAAA,CAAA,CAAArB,EAAU,CAAA,CAAA,CAAA,QAAAa,CAAW,WAExCe,CAAA,CACC,CAAA,GAAIP,CACJ,CAAA,GAAAd,GAAA,CAAAsB,QAAA,CAAA,CAAA,EAAWnB,CACT,2GAKDV,GACH,CAIJ2B,SAAS,CAAA,CAAA,CAAA,CAAA,CAAc,CAAA,CAAA,WACvBvB,aAAauB,CAAAA,CAAAA,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\n'use client';\nimport { containsExactChildren } from '@/lib/react';\nimport { cn } from '@/lib/utils';\nimport 'client-only';\nimport { cva } from 'cva';\nimport {\n Tab as AriaTab,\n TabList as AriaTabList,\n type TabListProps as AriaTabListProps,\n TabPanel as AriaTabPanel,\n type TabPanelProps as AriaTabPanelProps,\n type TabProps as AriaTabProps,\n Tabs as AriaTabs,\n type TabsProps as AriaTabsProps,\n} from 'react-aria-components';\n\nexport interface TabsProps extends AriaTabsProps {}\n\nexport const Tabs = ({\n children,\n className,\n orientation = 'horizontal',\n isDisabled = false,\n ...rest\n}: TabsProps) => {\n containsExactChildren({\n children,\n componentName: Tabs.displayName,\n restrictions: {\n [TabList.displayName]: { min: 1, max: 1 },\n },\n });\n\n return (\n <AriaTabs\n orientation={orientation}\n isDisabled={isDisabled}\n className={cn(\n 'group flex w-content flex-row orientation-horizontal:flex-col',\n className,\n )}\n {...rest}\n >\n {children}\n </AriaTabs>\n );\n};\n\nTabs.displayName = 'Tabs';\n\nexport interface TabListProps extends AriaTabListProps<object> {\n /** Whether the tabs are displaying iconography or text. */\n variant?: 'default' | 'icons';\n /** Whether the tabs are used as drawer controls. */\n drawer?: 'left' | 'right' | 'top' | 'bottom';\n}\n\nconst tabListStyles = cva('flex orientation-horizontal:flex-row flex-col', {\n variants: {\n variant: {\n icons:\n '[&>*]:p-xs orientation-horizontal:[&>*]:pr-s orientation-horizontal:[&>*]:pl-s [&>*]:leading-[0]',\n default: '[&>*]:p-s [&>*]:text-header-m',\n },\n drawer: {\n left: 'orientation-vertical:gap-xs rounded-r-large bg-surface-default p-s',\n right:\n 'orientation-vertical:gap-xs rounded-l-large bg-surface-default p-s',\n top: 'orientation-vertical:gap-xs rounded-b-large bg-surface-default p-s',\n bottom:\n 'orientation-vertical:gap-xs rounded-t-large bg-surface-default p-s',\n },\n },\n});\n\nconst TabList = ({\n children,\n className,\n variant = 'default',\n drawer = undefined,\n ...rest\n}: TabListProps) => {\n containsExactChildren({\n children,\n componentName: TabList.displayName,\n restrictions: {\n [Tab.displayName]: { min: 1 },\n },\n });\n\n return (\n <AriaTabList\n className={cn(tabListStyles({ variant, drawer }), className)}\n {...rest}\n >\n {children}\n </AriaTabList>\n );\n};\n\nTabList.displayName = 'Tabs.List';\nTabs.List = TabList;\n\nconst tabBaseStyles = cn(\n 'fg-default-dark cursor-pointer p-s outline-none',\n 'rounded-medium group-orientation-horizontal:rounded-small group-orientation-horizontal:rounded-b-none',\n 'group-orientation-horizontal:border-static-light group-orientation-horizontal:border-b',\n 'group-orientation-vertical:border group-orientation-vertical:border-transparent',\n);\n\nconst tabStyles = cva(tabBaseStyles, {\n variants: {\n isSelected: {\n true: 'fg-highlight bg-highlight-subtle group-orientation-horizontal:border-highlight',\n },\n isHovered: {\n true: 'fg-default-light group-orientation-horizontal:border-interactive-hover',\n },\n isFocused: {\n true: 'fg-default-light group-orientation-horizontal:border-interactive-hover',\n },\n isDisabled: {\n true: 'fg-disabled cursor-not-allowed group-orientation-horizontal:border-interactive-disabled',\n },\n },\n compoundVariants: [\n {\n isSelected: true,\n isHovered: true,\n className: 'fg-highlight group-orientation-horizontal:border-highlight',\n },\n {\n isSelected: true,\n isFocused: true,\n className:\n 'fg-highlight group-orientation-horizontal:border-interactive-hover group-orientation-vertical:border-interactive-hover',\n },\n {\n isDisabled: true,\n isSelected: true,\n className:\n 'fg-disabled bg-interactive-disabled group-orientation-horizontal:border-interactive-disabled',\n },\n ],\n});\n\nexport interface TabProps extends AriaTabProps {}\n\nconst Tab = ({\n id,\n children,\n className,\n isDisabled = false,\n ...rest\n}: TabProps) => {\n return (\n <AriaTab\n id={id}\n className={({ isSelected, isHovered, isFocused, isDisabled }) =>\n cn(\n tabStyles({ isSelected, isHovered, isFocused, isDisabled }),\n className,\n )\n }\n isDisabled={isDisabled}\n {...rest}\n >\n {children}\n </AriaTab>\n );\n};\n\nTab.displayName = 'Tabs.Tab';\nTabs.Tab = Tab;\n\nexport interface TabPanelProps extends AriaTabPanelProps {}\n\nconst TabPanel = ({ id, children, className, ...rest }: TabPanelProps) => {\n return (\n <AriaTabPanel\n id={id}\n className={cn(\n 'fg-default-light p-s group-orientation-vertical:pt-0 group-orientation-horizontal:pl-0',\n className,\n )}\n {...rest}\n >\n {children}\n </AriaTabPanel>\n );\n};\n\nTabPanel.displayName = 'Tabs.Panel';\nTabs.Panel = TabPanel;\n"]}
@@ -0,0 +1,19 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as react from 'react';
3
+ import { ContextValue } from 'react-aria-components';
4
+ import { TextAreaFieldProps, TextAreaFieldProviderProps } from './types.js';
5
+ import 'tailwind-variants';
6
+ import './styles.js';
7
+
8
+ declare const TextAreaFieldContext: react.Context<ContextValue<TextAreaFieldProviderProps, HTMLDivElement>>;
9
+ declare function TextAreaFieldProvider({ children, ...props }: TextAreaFieldProviderProps): react_jsx_runtime.JSX.Element;
10
+ declare namespace TextAreaFieldProvider {
11
+ var displayName: string;
12
+ }
13
+ declare function TextAreaField({ ref, ...props }: TextAreaFieldProps): react_jsx_runtime.JSX.Element;
14
+ declare namespace TextAreaField {
15
+ var displayName: string;
16
+ var Provider: typeof TextAreaFieldProvider;
17
+ }
18
+
19
+ export { TextAreaField, TextAreaFieldContext };
@@ -0,0 +1,2 @@
1
+ import'client-only';import {createContext}from'react';import {useContextProps,TextField,composeRenderProps,TextArea,Text,FieldError}from'react-aria-components';import {Label}from'../label/index.js';import {TextAreaStyles,TextAreaStylesDefaults}from'./styles.js';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var {field:z,label:O,input:V,description:H,error:h}=TextAreaStyles(),P=createContext(null);function T({children:d,...l}){return jsx(P.Provider,{value:l,children:d})}T.displayName="TextAreaField.Provider";function F({ref:d,...l}){[l,d]=useContextProps(l,d??null,P);let{classNames:o,description:p,errorMessage:A,label:x,inputRef:f,inputProps:v,size:i=TextAreaStylesDefaults.size,isDisabled:e,isInvalid:N,isReadOnly:t,isRequired:m,...b}=l,c=A||null,y=N??(c?true:void 0),u=i==="small";return jsx(TextField,{...b,className:composeRenderProps(o?.field,(r,{isInvalid:a})=>z({className:r,size:i,isDisabled:e,isInvalid:a,isReadOnly:t})),isDisabled:e,isInvalid:y,isReadOnly:t,isRequired:m,children:({isInvalid:r})=>jsxs(Fragment,{children:[!u&&!!x&&jsx(Label,{className:O({className:o?.label,size:i,isDisabled:e,isInvalid:r,isReadOnly:t}),isDisabled:e,isRequired:m,children:x}),jsx(TextArea,{ref:f,...v,className:composeRenderProps(o?.input,a=>V({className:a,size:i,isDisabled:e,isInvalid:r,isReadOnly:t}))}),!(u||r)&&!!p&&jsx(Text,{slot:"description",className:H({className:o?.description,size:i,isDisabled:e,isInvalid:r,isReadOnly:t}),children:p}),jsx(FieldError,{className:composeRenderProps(o?.error,a=>h({className:a,size:i,isDisabled:e,isInvalid:r,isReadOnly:t})),children:c})]})})}F.displayName="TextAreaField";F.Provider=T;export{F as TextAreaField,P as TextAreaFieldContext};//# sourceMappingURL=index.js.map
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/text-area-field/index.tsx"],"names":["field","label","input","description","TextAreaStyles","L","TextAreaFieldContext","createContext","R","children","props","TextAreaFieldProvider","ref","useContextProps","classNames","descriptionProp","errorMessageProp","inputRef","inputProps","size","TextAreaStylesDefaults","S","isDisabled","isInvalidProp","isRequired","errorMessage","isSmall","TextField","g","className","isInvalid","Fragment","k","labelProp","jsx","Label","E","TextArea","M","composeRenderProps","Text","D","FieldError","C","error","TextAreaField"],"mappings":"wTA6BQ,IAAA,CAAA,KAAAA,CAAO,CAAA,CAAA,KAAAC,CAAO,OAAAC,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AV,CACA,CAAA,CAAA,UAAAG,CACA,CAAA,CAAA,UACA,CAAA,CAAA,UACF,CAAC,CACH,EAEC,CAAA,CAAA,QAAAG,CACH,CAAA,CAAA,CACF,CAAA,CAEJ,CAEJ,CACAoB,CAAAA,CAAc,CAAA,CAAA,WAAc,CAAA,gBACd,CAAA,CAAA,QAAWlC,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\n'use client';\n\nimport 'client-only';\nimport { createContext } from 'react';\nimport {\n type ContextValue,\n FieldError,\n Text,\n TextArea,\n TextField,\n composeRenderProps,\n useContextProps,\n} from 'react-aria-components';\nimport { Label } from '../label';\nimport { TextAreaStyles, TextAreaStylesDefaults } from './styles';\nimport type { TextAreaFieldProps, TextAreaFieldProviderProps } from './types';\n\nconst { field, label, input, description, error } = TextAreaStyles();\n\nexport const TextAreaFieldContext =\n createContext<ContextValue<TextAreaFieldProviderProps, HTMLDivElement>>(null);\n\nfunction TextAreaFieldProvider({\n children,\n ...props\n}: TextAreaFieldProviderProps) {\n return (\n <TextAreaFieldContext.Provider value={props}>\n {children}\n </TextAreaFieldContext.Provider>\n );\n}\nTextAreaFieldProvider.displayName = 'TextAreaField.Provider';\n\nexport function TextAreaField({ ref, ...props }: TextAreaFieldProps) {\n [props, ref] = useContextProps(props, ref ?? null, TextAreaFieldContext);\n\n const {\n classNames,\n description: descriptionProp,\n errorMessage: errorMessageProp,\n label: labelProp,\n inputRef,\n inputProps,\n size = TextAreaStylesDefaults.size,\n isDisabled,\n isInvalid: isInvalidProp,\n isReadOnly,\n isRequired,\n ...rest\n } = props;\n const errorMessage = errorMessageProp || null; // Protect against empty string\n const isInvalid = isInvalidProp ?? (errorMessage ? true : undefined); // Leave uncontrolled if possible to fallback to validation state\n const isSmall = size === 'small';\n\n return (\n <TextField\n {...rest}\n className={composeRenderProps(\n classNames?.field,\n (className, { isInvalid }) =>\n field({ className, size, isDisabled, isInvalid, isReadOnly }),\n )}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n isReadOnly={isReadOnly}\n isRequired={isRequired}\n >\n {(\n { isInvalid }, // Rely on internal state, not props, since validation result could differ from props\n ) => (\n <>\n {!isSmall && !!labelProp && (\n <Label\n className={label({\n className: classNames?.label,\n size,\n isDisabled,\n isInvalid,\n isReadOnly,\n })}\n isDisabled={isDisabled}\n isRequired={isRequired}\n >\n {labelProp}\n </Label>\n )}\n <TextArea\n ref={inputRef}\n {...inputProps}\n className={composeRenderProps(classNames?.input, (className) =>\n input({\n className,\n size,\n isDisabled,\n isInvalid,\n isReadOnly,\n }),\n )}\n />\n {!(isSmall || isInvalid) && !!descriptionProp && (\n <Text\n slot='description'\n className={description({\n className: classNames?.description,\n size,\n isDisabled,\n isInvalid,\n isReadOnly,\n })}\n >\n {descriptionProp}\n </Text>\n )}\n <FieldError\n className={composeRenderProps(classNames?.error, (className) =>\n error({\n className,\n size,\n isDisabled,\n isInvalid,\n isReadOnly,\n }),\n )}\n >\n {errorMessage}\n </FieldError>\n </>\n )}\n </TextField>\n );\n}\nTextAreaField.displayName = 'TextAreaField';\nTextAreaField.Provider = TextAreaFieldProvider;\n"]}