@accelint/design-toolkit 2.2.0 → 2.2.1

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 (52) hide show
  1. package/dist/components/accordion/index.js +1 -1
  2. package/dist/components/accordion/index.js.map +1 -1
  3. package/dist/components/avatar/index.js +1 -1
  4. package/dist/components/avatar/index.js.map +1 -1
  5. package/dist/components/button/index.js +1 -1
  6. package/dist/components/button/index.js.map +1 -1
  7. package/dist/components/checkbox/index.js +1 -1
  8. package/dist/components/checkbox/index.js.map +1 -1
  9. package/dist/components/chip/index.js +1 -1
  10. package/dist/components/chip/index.js.map +1 -1
  11. package/dist/components/color-picker/index.js +1 -1
  12. package/dist/components/color-picker/index.js.map +1 -1
  13. package/dist/components/combobox/index.js +1 -1
  14. package/dist/components/combobox/index.js.map +1 -1
  15. package/dist/components/date-field/index.js +1 -1
  16. package/dist/components/date-field/index.js.map +1 -1
  17. package/dist/components/dialog/index.js +1 -1
  18. package/dist/components/dialog/index.js.map +1 -1
  19. package/dist/components/floating-button/index.js +1 -1
  20. package/dist/components/floating-button/index.js.map +1 -1
  21. package/dist/components/icon/index.js +1 -1
  22. package/dist/components/icon/index.js.map +1 -1
  23. package/dist/components/icon-button/index.js +1 -1
  24. package/dist/components/icon-button/index.js.map +1 -1
  25. package/dist/components/label/index.js +1 -1
  26. package/dist/components/label/index.js.map +1 -1
  27. package/dist/components/options/index.js +1 -1
  28. package/dist/components/options/index.js.map +1 -1
  29. package/dist/components/options-item/index.js +1 -1
  30. package/dist/components/options-item/index.js.map +1 -1
  31. package/dist/components/popover/index.js +1 -1
  32. package/dist/components/popover/index.js.map +1 -1
  33. package/dist/components/query-builder/index.js +1 -1
  34. package/dist/components/query-builder/index.js.map +1 -1
  35. package/dist/components/radio/index.js +1 -1
  36. package/dist/components/radio/index.js.map +1 -1
  37. package/dist/components/search-field/index.js +1 -1
  38. package/dist/components/search-field/index.js.map +1 -1
  39. package/dist/components/slider/index.js +1 -1
  40. package/dist/components/slider/index.js.map +1 -1
  41. package/dist/components/switch/index.js +1 -1
  42. package/dist/components/switch/index.js.map +1 -1
  43. package/dist/components/tabs/index.js +1 -1
  44. package/dist/components/tabs/index.js.map +1 -1
  45. package/dist/components/text-area/index.js.map +1 -1
  46. package/dist/components/text-field/index.js.map +1 -1
  47. package/dist/components/toggle-icon-button/index.js +1 -1
  48. package/dist/components/toggle-icon-button/index.js.map +1 -1
  49. package/dist/components/tooltip/index.js +1 -1
  50. package/dist/components/tooltip/index.js.map +1 -1
  51. package/dist/metafile-esm.json +1 -1
  52. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/slider/index.tsx"],"names":["e","cva","layout","label","isRange","sliderValue","rangeValue","sliderDefaultValue","defaultRangeValue","defaultValue","jsxs","c","L","V","Label","jsx","a","RACSliderTrack","O","state","minValue","startPercent","index","Fragment","h","orientation","sizeInPercent","I","Tooltip","f","Text","x","RangeSlider","value","Slider","props","useContext","SliderStateContext","labelProps","useSlottedContext","LabelContext","B","F","$","NumberField","j","C"],"mappings":"+VA+BE,CAAA,CAAA,QACE,CAAQ,CACN,QAAS,OACT,CAAA,EAAQ,OAEV,CAAA,EAAA,CAAA,CAAA,WACE,CAAA,CAAA,QAAU,CAAA,yBACE,CAAA,aAGhB,CAAA,CAAA,CAAA,gBAEI,CAAA,CAAQ,CAAA,MAAA,CAAA,SACR,CAAA,wBACA,CAAA,SAAW,CAAA,sDAGX,CAAA,CAAQ,gBACR,CAAA,WAAa,CAAA,YACb,CAAA,SAAW,CAAA,gEAGH,CAAA,MAAA,CAAA,SACR,CAAA,sBACA,CAAA,SAAW,CAAA,2DAGX,CAAA,CAAQ,CAAA,MAAA,CAAA,QACR,CAAA,WAAa,CAAA,UACb,CAAA,qEAKuB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAAA,GAAA,CAAA,sDAEzB,CAAA,CAAA,WACE,CAAA,CAAA,sBACU,CAAA,0BAEJ,CACN,MAAA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AA,SAA8B,CAAA,CAAA,CAAA7B,CAAAA,oBAC5C,CAAA,CAAA,CAAA,CAAA,CAAA,QAIT,CAUa8B,GAAc,CAAC,CAC1B,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,YACA,CAAAC,CAAAA,CACA,KACF,CAAA,CAAA,CAEIlB,GAACmB,CAAA,CACE,GAAGC,GAAAA,CACJ,CAAA,CAAA,CAAA,GAAA,CAAA,CAAO,OACP,CAAA,IAAA,CAAA,iBACA,CAAA,CAAA,CAAA,UAKN,CAAA,CAAA,CAAA,EAAA,SAAuB,CAAA,CAAA,CAAA,SACrB,CAAMhB,CAAAA,CAAQiB,CAAAA,CAAWC,IACnBC,CAAaC,CAAAA,UAAkBC,CAAYC,kBAAA,CACjD,CAAA,CAAA,CAAAC,iBAAA,CAAAC,YAAA,CACE5B,8BACU,CAAA,CAAA,QAA2BO,IACjCP,CAAAA,CAAC6B,CAAAA,CAAA,CAEC,GAAA5B,GAAA,CAAA6B,WAAA,CAAA,CAAA,iBACA,CAAA,CAAA,EAAA,EAAOZ,CACP,KAAA,CAAA,CAAA,CAAA,QAAuB,CAAA,CAAA,EAAA,CAAA,CAAA,2BAGrB,CAAAjB,GAAA,CAAA8B,KAAA,CAAA,CAAA,SACE,CAAAjC,EAAA,CAAA,+HAP+B,MAAQ,CAAA,CAAA,KAW7C,CACD,KAGP,CAAA,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\nimport { cn } from '@/lib/utils';\nimport { cva } from 'cva';\nimport { useContext } from 'react';\nimport {\n Input,\n Label,\n LabelContext,\n NumberField,\n Slider as RACSlider,\n type SliderProps as RACSliderProps,\n SliderTrack as RACSliderTrack,\n SliderStateContext,\n SliderThumb,\n Text,\n useSlottedContext,\n} from 'react-aria-components';\nimport { Tooltip } from '../tooltip';\n\nconst sliderVariants = cva('grid gap-s', {\n variants: {\n layout: {\n stacked: '',\n inline: '',\n },\n orientation: {\n vertical: 'h-full w-fit',\n horizontal: 'h-xl w-full',\n },\n },\n compoundVariants: [\n {\n layout: 'stacked',\n orientation: 'horizontal',\n className: 'grid-cols-[auto_1fr_auto] grid-rows-[auto_auto_auto]',\n },\n {\n layout: 'inline',\n orientation: 'horizontal',\n className: 'grid-cols-[auto_auto_1fr_auto_auto] grid-rows-1 items-center',\n },\n {\n layout: 'stacked',\n orientation: 'vertical',\n className: 'grid-cols-[auto_auto_auto] grid-rows-[auto_auto_1fr_auto]',\n },\n {\n layout: 'inline',\n orientation: 'vertical',\n className: 'grid-cols-[auto_1fr_auto] grid-rows-[auto_auto_1fr_auto]',\n },\n ],\n});\n\nconst minValueVariants = cva('font-display text-body-m text-default-dark', {\n variants: {\n orientation: {\n horizontal: '',\n vertical: 'col-start-1 row-start-4',\n },\n layout: {\n inline: '',\n stacked: '',\n },\n },\n compoundVariants: [\n {\n layout: 'stacked',\n orientation: 'horizontal',\n className: 'col-start-1 row-start-3',\n },\n {\n layout: 'inline',\n orientation: 'horizontal',\n className: 'order-2',\n },\n {\n layout: 'stacked',\n orientation: 'vertical',\n className: 'self-end justify-self-end',\n },\n {\n layout: 'inline',\n orientation: 'vertical',\n className: 'justify-self-center',\n },\n ],\n});\n\nconst maxValueVariants = cva('font-display text-body-m text-default-dark', {\n variants: {\n orientation: {\n horizontal: '',\n vertical: 'col-start-1 row-start-2',\n },\n layout: {\n inline: '',\n stacked: '',\n },\n },\n compoundVariants: [\n {\n layout: 'stacked',\n orientation: 'horizontal',\n className: 'col-start-3 row-start-3 justify-self-end',\n },\n {\n layout: 'inline',\n orientation: 'horizontal',\n className: 'order-4',\n },\n {\n layout: 'stacked',\n orientation: 'vertical',\n className: 'justify-self-end',\n },\n ],\n});\n\nconst sliderTrackVariants = cva('relative', {\n variants: {\n orientation: {\n horizontal: 'h-s w-full',\n vertical: 'h-full w-s',\n },\n layout: {\n inline: '',\n stacked: '',\n },\n },\n compoundVariants: [\n {\n orientation: 'horizontal',\n layout: 'stacked',\n className: 'col-span-3 row-start-2',\n },\n {\n orientation: 'horizontal',\n layout: 'inline',\n className: 'order-3',\n },\n {\n orientation: 'vertical',\n layout: 'stacked',\n className: 'col-start-2 row-span-3 row-start-2',\n },\n {\n orientation: 'vertical',\n layout: 'inline',\n className: 'col-start-1 row-start-3 justify-self-center',\n },\n ],\n});\n\nconst inputVariants = cva('flex gap-s', {\n variants: {\n orientation: {\n horizontal: 'flex-row',\n vertical: 'flex-col-reverse',\n },\n layout: {\n inline: 'order-5',\n stacked: 'col-start-3 row-start-1',\n },\n },\n compoundVariants: [\n {\n layout: 'inline',\n orientation: 'horizontal',\n className: 'order-5',\n },\n {\n layout: 'inline',\n orientation: 'vertical',\n className: 'col-span-3 col-start-1',\n },\n {\n layout: 'stacked',\n orientation: 'vertical',\n className: 'row-start-4',\n },\n ],\n});\n\nconst labelVariants = cva('text-default-light', {\n variants: {\n orientation: {\n horizontal: '',\n vertical: '',\n },\n layout: {\n inline: 'order-1',\n stacked: 'col-start-1',\n },\n },\n compoundVariants: [\n {\n layout: 'stacked',\n orientation: 'vertical',\n className: 'col-span-2',\n },\n {\n layout: 'inline',\n orientation: 'vertical',\n className: 'col-span-3',\n },\n ],\n});\n\nconst sliderThumbVariants = cva(\n 'h-m w-m rounded-full bg-highlight-bold outline-highlight-bold/40 hover:outline-4 focus:outline-4',\n {\n variants: {\n orientation: {\n horizontal: 'translate-y-[50%]',\n vertical: 'translate-x-[40%]',\n },\n },\n },\n);\n\nconst sliderTrackBackgroundVariants = cva(\n 'absolute rounded-full bg-default-light/40',\n {\n variants: {\n orientation: {\n horizontal: 'top-[50%] h-xxs w-full translate-y-[50%]',\n vertical: 'left-[50%] h-full w-xxs ',\n },\n },\n },\n);\n\nconst sliderTrackValueVariants = cva('absolute rounded-full bg-highlight', {\n variants: {\n orientation: {\n horizontal: 'top-1/2 h-xxs translate-y-1/2',\n vertical: 'left-1/2 w-xxs',\n },\n },\n});\n\nexport interface SliderProps\n extends Omit<\n RACSliderProps,\n 'value' | 'defaultValue' | 'showOutput' | 'slot' | 'style' | 'formatOptions'\n > {\n className?: string;\n showInput?: boolean;\n showLabel?: boolean;\n layout: 'stacked' | 'inline';\n value?: number;\n defaultValue?: number;\n rangeValue?: [number, number];\n defaultRangeValue?: [number, number];\n isRange?: boolean;\n label: string;\n}\n\nexport const Slider = ({\n children,\n className,\n showInput = false,\n showLabel = true,\n layout = 'stacked',\n value,\n defaultValue,\n label,\n defaultRangeValue,\n rangeValue,\n minValue = 0,\n maxValue = 100,\n isRange = false,\n orientation = 'horizontal',\n ...props\n}: SliderProps) => {\n const sliderValue = isRange ? rangeValue : value;\n const sliderDefaultValue = isRange ? defaultRangeValue : defaultValue;\n\n return (\n <RACSlider\n className={cn(sliderVariants({ orientation, layout }))}\n minValue={minValue}\n maxValue={maxValue}\n orientation={orientation}\n value={sliderValue}\n defaultValue={sliderDefaultValue}\n {...props}\n >\n {showLabel && (\n <Label className={labelVariants({ orientation, layout })}>\n {label}\n </Label>\n )}\n {showInput && (\n <div className={inputVariants({ orientation, layout })}>\n <SliderInput />\n </div>\n )}\n <RACSliderTrack className={sliderTrackVariants({ layout, orientation })}>\n {({ state }) => {\n const minValue = state.getThumbPercent(0);\n const maxValue = state.getThumbPercent(1) || minValue;\n const sizeInPercent = `${(state.values.length === 2 ? maxValue - minValue : minValue) * 100}%`;\n const startPercent =\n state.values.length === 2 ? `${Math.floor(minValue * 100)}%` : '0';\n return (\n <>\n <div className={sliderTrackBackgroundVariants({ orientation })} />\n {state.values.map((_, index) => {\n return (\n <>\n <div\n key={`slider-${index === 0 ? 'min' : 'max'}`}\n className={sliderTrackValueVariants({ orientation })}\n style={\n orientation === 'horizontal'\n ? {\n left: startPercent,\n width: sizeInPercent,\n }\n : {\n bottom: startPercent,\n height: sizeInPercent,\n }\n }\n />\n\n <SliderThumb\n key={`slider-thumb-${index === 0 ? 'min' : 'max'}`}\n index={index}\n className={sliderThumbVariants({ orientation })}\n >\n {!showInput && (\n <Tooltip>\n <Tooltip.Trigger>\n <div className='size-full' />\n </Tooltip.Trigger>\n <Tooltip.Body placement='top'>\n {state.getThumbValue(index)}\n </Tooltip.Body>\n </Tooltip>\n )}\n </SliderThumb>\n </>\n );\n })}\n </>\n );\n }}\n </RACSliderTrack>\n <Text slot='min' className={minValueVariants({ layout, orientation })}>\n {minValue}\n </Text>\n <Text slot='max' className={maxValueVariants({ layout, orientation })}>\n {maxValue}\n </Text>\n </RACSlider>\n );\n};\n\nexport type RangeSliderProps = Omit<\n SliderProps,\n 'isRange' | 'defaultRangeValue' | 'rangeValue' | 'defaultValue' | 'value'\n> & {\n defaultValue: SliderProps['defaultRangeValue'];\n value: SliderProps['rangeValue'];\n};\n\nexport const RangeSlider = ({\n defaultValue,\n value,\n ...props\n}: RangeSliderProps) => {\n return (\n <Slider\n {...props}\n isRange\n defaultRangeValue={defaultValue}\n rangeValue={value}\n />\n );\n};\n\nfunction SliderInput({ className }: { className?: string }) {\n const state = useContext(SliderStateContext);\n const labelProps = useSlottedContext(LabelContext);\n return (\n <>\n {state?.values.map((value: number, index: number) => (\n <NumberField\n key={`number-field-${index === 0 ? 'min' : 'max'}`}\n aria-labelledby={labelProps?.id}\n value={value}\n onChange={(v) => state.setThumbValue(0, v)}\n >\n <Input\n className={cn(\n 'w-[50px] rounded-medium border border-interactive px-s py-xs font-display text-body-m text-default-light',\n className,\n )}\n />\n </NumberField>\n ))}\n </>\n );\n}\n"]}
1
+ {"version":3,"sources":["../../../src/components/slider/index.tsx"],"names":["e","cva","layout","value","label","isRange","sliderValue","rangeValue","sliderDefaultValue","defaultRangeValue","defaultValue","jsxs","c","L","Label","a","A","jsx","RACSliderTrack","O","state","minValue","startPercent","index","Fragment","h","orientation","sizeInPercent","I","Tooltip","f","Text","x","RangeSlider","Slider","props","useContext","SliderStateContext","labelProps","useSlottedContext","LabelContext","B","F","$","NumberField","j","C","V"],"mappings":"6VAgC2B,IAAA,CAAA,CAAAA,GAAA,CAAA,YACzB,CAAA,CAAA,SACU,CACN,MAAA,CAAA,CAAS,OACT,CAAA,EAAQ,CAAA,MAEV,CAAA,EAAA,CAAA,CAAA,qBACY,CAAA,cACV,CAAA,wBAGJ,CAAA,CAAA,CAAA,gBAEI,CAAA,CAAQ,iBACR,CAAA,WAAa,CAAA,sBACF,CAAA,sDAGX,CAAA,CAAQ,CAAA,MAAA,CAAA,QACR,CAAA,WAAa,CAAA,YACb,CAAA,SAAW,CAAA,8DAGX,CAAA,CAAQ,iBACR,CAAA,WAAa,CAAA,oBACF,CAAA,2DAGX,CAAA,CAAQ,CAAA,MAAA,CAAA,QACR,CAAA,sBACA,CAAA,SAAW,CAAA,0DAKQC,CAAI,sDAC3B,CAAA,CAAA,QACE,CAAA,CAAA,uBAEE,CAAA,EAAA,CAAA,kCAEF,CAAQ,CACN,MAAA,CAAQ,CAAA,MACR,CAAA,EAAA,CAAS,+BAKD,CAAA,MAAA,CAAA,SACR,CAAA,wBACA,CAAA,SAAW,CAAA,yBAGX,CAAA,CAAQ,gBACR,CAAA,WAAa,CAAA,sBACF,CAAA,SAGX,CAAA,CAAQ,CAAA,MAAA,CAAA,SACR,CAAA,sBACA,CAAA,SAAW,CAAA,2BAGX,CAAA,CAAQ,gBACR,CAAA,WAAa,CAAA,oBACF,CAAA,qBAKQA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAAD,GAAA,CAAA,4CAC3B,CAAA,CAAA,QACE,CAAA,CAAA,WACE,CAAA,CAAA,sBACU,CAAA,0BAEJ,CACN,MAAA,CAAQ,OACR,CAAA,EAAA,CA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,SAAuB,CAAA,CAAA,CAAA,SACrB,CAAMf,CAAAA,CAAQgB,CAAAA,CAAWC,IACnBC,CAAaC,CAAAA,UAAkBC,CAAYC,kBAAA,CACjD,CAAA,CAAA,CAAAC,iBAAA,CAAAC,YAAA,CACE1B,8BACU,CAAA,CAAA,QAA2BM,IACjCN,CAAAA,CAAC2B,CAAAA,CAAA,CAEC,GAAA7B,GAAA,CAAA8B,WAAA,CAAA,CAAA,iBACA,CAAA,CAAA,EAAA,EAAO1C,CACP,KAAA,CAAA,CAAA,CAAA,QAAuB,CAAA,CAAA,EAAA,CAAA,CAAA,2BAGrB,CAAAY,GAAA,CAAA+B,KAAA,CAAA,CAAA,SACE,CAAAC,EAAA,CAAA,+HAP+B,MAAQ,CAAA,CAAA,KAW7C,CACD,KAGP,CAAA,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 { useContext } from 'react';\nimport {\n Input,\n Label,\n LabelContext,\n NumberField,\n Slider as RACSlider,\n type SliderProps as RACSliderProps,\n SliderTrack as RACSliderTrack,\n SliderStateContext,\n SliderThumb,\n Text,\n useSlottedContext,\n} from 'react-aria-components';\nimport { Tooltip } from '../tooltip';\n\nconst sliderVariants = cva('grid gap-s', {\n variants: {\n layout: {\n stacked: '',\n inline: '',\n },\n orientation: {\n vertical: 'h-full w-fit',\n horizontal: 'h-xl w-full',\n },\n },\n compoundVariants: [\n {\n layout: 'stacked',\n orientation: 'horizontal',\n className: 'grid-cols-[auto_1fr_auto] grid-rows-[auto_auto_auto]',\n },\n {\n layout: 'inline',\n orientation: 'horizontal',\n className: 'grid-cols-[auto_auto_1fr_auto_auto] grid-rows-1 items-center',\n },\n {\n layout: 'stacked',\n orientation: 'vertical',\n className: 'grid-cols-[auto_auto_auto] grid-rows-[auto_auto_1fr_auto]',\n },\n {\n layout: 'inline',\n orientation: 'vertical',\n className: 'grid-cols-[auto_1fr_auto] grid-rows-[auto_auto_1fr_auto]',\n },\n ],\n});\n\nconst minValueVariants = cva('font-display text-body-m text-default-dark', {\n variants: {\n orientation: {\n horizontal: '',\n vertical: 'col-start-1 row-start-4',\n },\n layout: {\n inline: '',\n stacked: '',\n },\n },\n compoundVariants: [\n {\n layout: 'stacked',\n orientation: 'horizontal',\n className: 'col-start-1 row-start-3',\n },\n {\n layout: 'inline',\n orientation: 'horizontal',\n className: 'order-2',\n },\n {\n layout: 'stacked',\n orientation: 'vertical',\n className: 'self-end justify-self-end',\n },\n {\n layout: 'inline',\n orientation: 'vertical',\n className: 'justify-self-center',\n },\n ],\n});\n\nconst maxValueVariants = cva('font-display text-body-m text-default-dark', {\n variants: {\n orientation: {\n horizontal: '',\n vertical: 'col-start-1 row-start-2',\n },\n layout: {\n inline: '',\n stacked: '',\n },\n },\n compoundVariants: [\n {\n layout: 'stacked',\n orientation: 'horizontal',\n className: 'col-start-3 row-start-3 justify-self-end',\n },\n {\n layout: 'inline',\n orientation: 'horizontal',\n className: 'order-4',\n },\n {\n layout: 'stacked',\n orientation: 'vertical',\n className: 'justify-self-end',\n },\n ],\n});\n\nconst sliderTrackVariants = cva('relative', {\n variants: {\n orientation: {\n horizontal: 'h-s w-full',\n vertical: 'h-full w-s',\n },\n layout: {\n inline: '',\n stacked: '',\n },\n },\n compoundVariants: [\n {\n orientation: 'horizontal',\n layout: 'stacked',\n className: 'col-span-3 row-start-2',\n },\n {\n orientation: 'horizontal',\n layout: 'inline',\n className: 'order-3',\n },\n {\n orientation: 'vertical',\n layout: 'stacked',\n className: 'col-start-2 row-span-3 row-start-2',\n },\n {\n orientation: 'vertical',\n layout: 'inline',\n className: 'col-start-1 row-start-3 justify-self-center',\n },\n ],\n});\n\nconst inputVariants = cva('flex gap-s', {\n variants: {\n orientation: {\n horizontal: 'flex-row',\n vertical: 'flex-col-reverse',\n },\n layout: {\n inline: 'order-5',\n stacked: 'col-start-3 row-start-1',\n },\n },\n compoundVariants: [\n {\n layout: 'inline',\n orientation: 'horizontal',\n className: 'order-5',\n },\n {\n layout: 'inline',\n orientation: 'vertical',\n className: 'col-span-3 col-start-1',\n },\n {\n layout: 'stacked',\n orientation: 'vertical',\n className: 'row-start-4',\n },\n ],\n});\n\nconst labelVariants = cva('text-default-light', {\n variants: {\n orientation: {\n horizontal: '',\n vertical: '',\n },\n layout: {\n inline: 'order-1',\n stacked: 'col-start-1',\n },\n },\n compoundVariants: [\n {\n layout: 'stacked',\n orientation: 'vertical',\n className: 'col-span-2',\n },\n {\n layout: 'inline',\n orientation: 'vertical',\n className: 'col-span-3',\n },\n ],\n});\n\nconst sliderThumbVariants = cva(\n 'h-m w-m rounded-full bg-highlight-bold outline-highlight-bold/40 hover:outline-4 focus:outline-4',\n {\n variants: {\n orientation: {\n horizontal: 'translate-y-[50%]',\n vertical: 'translate-x-[40%]',\n },\n },\n },\n);\n\nconst sliderTrackBackgroundVariants = cva(\n 'absolute rounded-full bg-default-light/40',\n {\n variants: {\n orientation: {\n horizontal: 'top-[50%] h-xxs w-full translate-y-[50%]',\n vertical: 'left-[50%] h-full w-xxs ',\n },\n },\n },\n);\n\nconst sliderTrackValueVariants = cva('absolute rounded-full bg-highlight', {\n variants: {\n orientation: {\n horizontal: 'top-1/2 h-xxs translate-y-1/2',\n vertical: 'left-1/2 w-xxs',\n },\n },\n});\n\nexport interface SliderProps\n extends Omit<\n RACSliderProps,\n 'value' | 'defaultValue' | 'showOutput' | 'slot' | 'style' | 'formatOptions'\n > {\n className?: string;\n showInput?: boolean;\n showLabel?: boolean;\n layout: 'stacked' | 'inline';\n value?: number;\n defaultValue?: number;\n rangeValue?: [number, number];\n defaultRangeValue?: [number, number];\n isRange?: boolean;\n label: string;\n}\n\nexport const Slider = ({\n children,\n className,\n showInput = false,\n showLabel = true,\n layout = 'stacked',\n value,\n defaultValue,\n label,\n defaultRangeValue,\n rangeValue,\n minValue = 0,\n maxValue = 100,\n isRange = false,\n orientation = 'horizontal',\n ...props\n}: SliderProps) => {\n const sliderValue = isRange ? rangeValue : value;\n const sliderDefaultValue = isRange ? defaultRangeValue : defaultValue;\n\n return (\n <RACSlider\n className={cn(sliderVariants({ orientation, layout }))}\n minValue={minValue}\n maxValue={maxValue}\n orientation={orientation}\n value={sliderValue}\n defaultValue={sliderDefaultValue}\n {...props}\n >\n {showLabel && (\n <Label className={labelVariants({ orientation, layout })}>\n {label}\n </Label>\n )}\n {showInput && (\n <div className={inputVariants({ orientation, layout })}>\n <SliderInput />\n </div>\n )}\n <RACSliderTrack className={sliderTrackVariants({ layout, orientation })}>\n {({ state }) => {\n const minValue = state.getThumbPercent(0);\n const maxValue = state.getThumbPercent(1) || minValue;\n const sizeInPercent = `${(state.values.length === 2 ? maxValue - minValue : minValue) * 100}%`;\n const startPercent =\n state.values.length === 2 ? `${Math.floor(minValue * 100)}%` : '0';\n return (\n <>\n <div className={sliderTrackBackgroundVariants({ orientation })} />\n {state.values.map((_, index) => {\n return (\n <>\n <div\n key={`slider-${index === 0 ? 'min' : 'max'}`}\n className={sliderTrackValueVariants({ orientation })}\n style={\n orientation === 'horizontal'\n ? {\n left: startPercent,\n width: sizeInPercent,\n }\n : {\n bottom: startPercent,\n height: sizeInPercent,\n }\n }\n />\n\n <SliderThumb\n key={`slider-thumb-${index === 0 ? 'min' : 'max'}`}\n index={index}\n className={sliderThumbVariants({ orientation })}\n >\n {!showInput && (\n <Tooltip>\n <Tooltip.Trigger>\n <div className='size-full' />\n </Tooltip.Trigger>\n <Tooltip.Body placement='top'>\n {state.getThumbValue(index)}\n </Tooltip.Body>\n </Tooltip>\n )}\n </SliderThumb>\n </>\n );\n })}\n </>\n );\n }}\n </RACSliderTrack>\n <Text slot='min' className={minValueVariants({ layout, orientation })}>\n {minValue}\n </Text>\n <Text slot='max' className={maxValueVariants({ layout, orientation })}>\n {maxValue}\n </Text>\n </RACSlider>\n );\n};\n\nexport type RangeSliderProps = Omit<\n SliderProps,\n 'isRange' | 'defaultRangeValue' | 'rangeValue' | 'defaultValue' | 'value'\n> & {\n defaultValue: SliderProps['defaultRangeValue'];\n value: SliderProps['rangeValue'];\n};\n\nexport const RangeSlider = ({\n defaultValue,\n value,\n ...props\n}: RangeSliderProps) => {\n return (\n <Slider\n {...props}\n isRange\n defaultRangeValue={defaultValue}\n rangeValue={value}\n />\n );\n};\n\nfunction SliderInput({ className }: { className?: string }) {\n const state = useContext(SliderStateContext);\n const labelProps = useSlottedContext(LabelContext);\n return (\n <>\n {state?.values.map((value: number, index: number) => (\n <NumberField\n key={`number-field-${index === 0 ? 'min' : 'max'}`}\n aria-labelledby={labelProps?.id}\n value={value}\n onChange={(v) => state.setThumbValue(0, v)}\n >\n <Input\n className={cn(\n 'w-[50px] rounded-medium border border-interactive px-s py-xs font-display text-body-m text-default-light',\n className,\n )}\n />\n </NumberField>\n ))}\n </>\n );\n}\n"]}
@@ -1,2 +1,2 @@
1
- import {cn}from'./../../lib/utils.js';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 n=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:n,children:e})]})})}o.displayName="Switch";o.as=e=>cn(r({className:e}));export{o as Switch};//# sourceMappingURL=index.js.map
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
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":"+LAqB0B,IAAG,CAEvBA,CAAAA,KAAeC,CAAAA,EAEjB,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,4HACA,CAAA,kIAEK,CAAA,CAAA,KAAA,CAAA,mBAET,CAAA,CAAA,UACQ,CAAA,CAAA,IAAA,CAAA,mIAER,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,IACJC,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\nimport { cn } from '@/lib/utils';\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":["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,2 +1,2 @@
1
- import {containsExactChildren}from'./../../lib/react.js';import {cn}from'./../../lib/utils.js';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:g,isHovered:c,isFocused:h,isDisabled:f})=>cn(z({isSelected:g,isHovered:c,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: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
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/tabs/index.tsx"],"names":["children","className","orientation","containsExactChildren","p","Tabs","jsx","AriaTabs","l","v","isDisabled","cn","cva","b","TabList","AriaTabList","tabListStyles","variant","tabBaseStyles","AriaTab","id","T","isSelected","isHovered","i","isFocused","Tab","TabPanel","AriaTabPanel","P"],"mappings":"uNA6BEA,IAAAA,CACA,WAAAC,CACA,CAAA,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CAAA,CAAApB,EAAU,CAAA,CAAA,CAAA,QAAAC,CAAW,WAExC2B,CAAA,CACC,CAAA,GAAIR,CACJ,CAAA,GAAAZ,GAAA,CAAAqB,QAAA,CAAA,CAAA,EAAWlB,CACT,mHAKDX,GACH,CAIJ2B,SAAS,CAAA,CAAA,CAAA,CAAA,CAAc,CAAA,CAAA,WACvBtB,aAAasB,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\nimport { containsExactChildren } from '@/lib/react';\nimport { cn } from '@/lib/utils';\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,CAA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I,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 +1 @@
1
- {"version":3,"sources":["../../../src/components/text-area/index.tsx"],"names":["g","ref","size","props","TextAreaContext","P","h","T","e","textAreaStyles","n","Input","label","isSmall","shouldShowDescription","isInvalid","isDisabled","shouldShowError","isReadOnly","jsxs","b","Label","a","jsx","AriaText","x","TextArea"],"mappings":"2PA6BE,IAAC,CAAA,CAAAA,GAAA,CAAA,CAAA,0EAEC,CAAA,CAAA,CAAA,QAC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AA,CACC,sBACE,CAAAd,EAAA,CAAA,CAAA,4DAGG,CAAA,CAAA,CAAA,IAAA,CAAA,sBAMPa,CAAAA,CAACC,EAAA,CACC,CAAA,EAAAF,GAAA,CAAAG,IAAA,CAAA,CAAA,SAAU,CAAA,0DAGT,CAAA,QAMXC,EAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,WAAc,CAAA,UAAA","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport 'client-only';\nimport {\n Text as AriaText,\n TextArea as AriaTextArea,\n type TextAreaProps as AriaTextAreaProps,\n TextField as AriaTextField,\n type TextFieldProps as AriaTextFieldProps,\n TextAreaContext,\n useContextProps,\n} from 'react-aria-components';\n\nimport { cn } from '@/lib/utils';\nimport { type VariantProps, cva } from 'cva';\nimport type { ForwardedRef } from 'react';\nimport { Label } from '../label';\n\nconst textAreaStyles = cva(\n ['block w-full rounded-medium p-s font-display outline outline-interactive'],\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 isInvalid: {\n true: 'outline-serious',\n },\n isReadOnly: {\n true: 'rounded-none p-0 outline-none',\n },\n size: {\n medium: 'text-body-s',\n small: 'text-body-xs',\n },\n isClearable: {\n true: '',\n false: '',\n },\n },\n compoundVariants: [\n {\n isDisabled: true,\n isInvalid: true,\n className: 'outline-interactive-disabled',\n },\n {\n isClearable: true,\n isDisabled: false,\n size: 'medium',\n className: 'pr-xl',\n },\n ],\n defaultVariants: {\n isClearable: false,\n size: 'medium',\n },\n },\n);\n\ninterface InputProps\n extends VariantProps<typeof textAreaStyles>,\n Omit<AriaTextAreaProps, 'size'> {\n selectOnFocus?: boolean;\n ref?: ForwardedRef<HTMLTextAreaElement>;\n}\n\nconst Input = ({\n className,\n ref = null,\n selectOnFocus = false,\n size = 'medium',\n ...props\n}: InputProps) => {\n [props, ref] = useContextProps(props, ref, TextAreaContext);\n\n if (props.readOnly) {\n return (\n <span\n className={cn(\n textAreaStyles({\n isDisabled: false,\n isReadOnly: props.readOnly,\n size,\n className,\n }),\n )}\n >\n {props.value || '\\u00A0'}\n </span>\n );\n }\n\n return (\n <div className='relative flex items-center'>\n <AriaTextArea\n {...props}\n onFocus={(e) => {\n if (selectOnFocus) {\n ref.current?.select();\n }\n\n props.onFocus?.(e);\n }}\n ref={ref}\n className={({ isDisabled, isInvalid }) =>\n cn(\n textAreaStyles({\n isDisabled,\n isInvalid,\n isReadOnly: props.readOnly,\n size,\n className,\n }),\n )\n }\n />\n </div>\n );\n};\nInput.displayName = 'TextArea.Input';\n\nexport interface TextAreaProps\n extends Omit<\n VariantProps<typeof textAreaStyles>,\n 'isDisabled' | 'isInvalid' | 'isReadOnly'\n >,\n Omit<AriaTextFieldProps, 'className'>,\n Omit<InputProps, keyof AriaTextFieldProps> {\n className?: string;\n description?: string;\n errorMessage?: string;\n label?: string;\n placeholder?: string;\n}\n\nexport function TextArea({\n className,\n description,\n errorMessage,\n isDisabled,\n isInvalid,\n isReadOnly,\n label,\n placeholder,\n size = 'medium',\n ...props\n}: TextAreaProps) {\n const isSmall = size === 'small';\n const shouldShowDescription = !(isSmall || isInvalid) || isDisabled;\n const shouldShowError = isInvalid && !isDisabled && !isReadOnly;\n\n return (\n <AriaTextField\n {...(props as AriaTextFieldProps)}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n isReadOnly={isReadOnly}\n className={'flex flex-col gap-xs'}\n >\n {!isSmall && (\n <Label\n className='empty:hidden'\n isDisabled={isDisabled}\n isOptional={!props.isRequired}\n >\n {label}\n </Label>\n )}\n <Input className={className} placeholder={placeholder} size={size} />\n {shouldShowDescription && (\n <AriaText\n className={cn([\n 'fg-default-dark text-body-xs empty:hidden',\n isDisabled && 'fg-disabled',\n ])}\n slot='description'\n >\n {description}\n </AriaText>\n )}\n {shouldShowError && (\n <AriaText\n className='fg-serious text-body-xs empty:hidden'\n slot='errorMessage'\n >\n {errorMessage}\n </AriaText>\n )}\n </AriaTextField>\n );\n}\nTextArea.displayName = 'TextArea';\n"]}
1
+ {"version":3,"sources":["../../../src/components/text-area/index.tsx"],"names":["g","ref","size","props","TextAreaContext","P","h","T","e","textAreaStyles","n","Input","label","isSmall","shouldShowDescription","isInvalid","isDisabled","shouldShowError","isReadOnly","jsxs","b","Label","a","jsx","AriaText","x","TextArea"],"mappings":"2PA8BE,IAAC,CAAA,CAAAA,GAAA,CAAA,CAAA,0EAEC,CAAA,CAAA,CAAA,QACE,CAAA,CAAA,UACQ,CAAA,CAAA,IAAA,CAAA,sEAEJ,CAAA,KAAA,CAAA,0GAEJ,CAAA,CAAA,SACQ,CAAA,CAAA,IAAA,CAAA,iBAER,CAAA,CAAA,UACQ,CAAA,CAAA,IAAA,CAAA,+BAGN,CAAA,CAAA,IAAA,CAAQ,CAAA,MAAA,CAAA,aACD,CAAA,KAAA,CAAA,cAET,CAAA,CAAA,WACQ,CAAA,CACN,IAAA,CAAA,EAAO,CACT,KAEF,CAAA,EAAA,CAAA,CAAA,CAAA,gBAEI,CAAA,CAAA,CAAA,UACA,CAAA,IAAA,CAAA,SACA,CAAA,IAAA,CAAA,SAAW,CAAA,8BAGX,CAAA,CAAA,CAAA,WACA,CAAA,IAAA,CAAA,UACA,CAAM,KAAA,CAAA,IAAA,CAAA,QACN,CAAA,SACF,CACF,OACA,CAAA,CAAA,CAAA,eACE,CAAA,CAAA,WACA,CAAM,KAAA,CAAA,IAAA,CACR,QAYF,CAAA,CA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,QAGP,CAAA,GAAMW,EAAUX,CAAAA,CAAAA,IAAS,CAAA,CAAA,CAAA,GACnBY,OAAqCC,CAAAA,CAAAA,CAAAA,EAAcC,CACnDC,EAAkBF,CAAAA,CAAAA,EAAcC,CAAAA,CAAAA,CAAc,CAACE,GAErD,CAAA,CAAA,EAAA,CAAA,CACEC,CAAAA,OACOhB,IAAAA,CACLiB,SAAA,CAAA,CAAA,GAAA,CAAA,CAAA,UACA,CAAA,CAAA,CAAA,SACA,CAAA,CAAA,CAAA,UACA,CAAA,CAAA,CAAA,SAAW,CAAA,+BAGRC,CAAAA,CAAA,CACC,uBAAU,CAAA,cACV,CAAA,UACA,CAAA,CAAA,CAAA,UAAmB,CAAA,CAAA,CAAA,CAAA,UAElB,CAAA,QAGJV,CAAA,CAAM,CAAA,CAAA,CAAAW,GAAA,CAAA,CAAA,CAAA,CAAA,SAAsB,CAAA,CAAA,CAAA,WAAgCpB,CAAAA,CAAM,KAEjEqB,CAAAA,CAACC,CAAAA,CAAA,CACC,sBACE,CAAAd,EAAA,CAAA,CAAA,4DAGG,CAAA,CAAA,CAAA,IAAA,CAAA,sBAMPa,CAAAA,CAACC,EAAA,CACC,CAAA,EAAAF,GAAA,CAAAG,IAAA,CAAA,CAAA,SAAU,CAAA,0DAGT,CAAA,QAMXC,EAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,WAAc,CAAA,UAAA","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n'use client';\nimport 'client-only';\nimport {\n Text as AriaText,\n TextArea as AriaTextArea,\n type TextAreaProps as AriaTextAreaProps,\n TextField as AriaTextField,\n type TextFieldProps as AriaTextFieldProps,\n TextAreaContext,\n useContextProps,\n} from 'react-aria-components';\n\nimport { cn } from '@/lib/utils';\nimport { type VariantProps, cva } from 'cva';\nimport type { ForwardedRef } from 'react';\nimport { Label } from '../label';\n\nconst textAreaStyles = cva(\n ['block w-full rounded-medium p-s font-display outline outline-interactive'],\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 isInvalid: {\n true: 'outline-serious',\n },\n isReadOnly: {\n true: 'rounded-none p-0 outline-none',\n },\n size: {\n medium: 'text-body-s',\n small: 'text-body-xs',\n },\n isClearable: {\n true: '',\n false: '',\n },\n },\n compoundVariants: [\n {\n isDisabled: true,\n isInvalid: true,\n className: 'outline-interactive-disabled',\n },\n {\n isClearable: true,\n isDisabled: false,\n size: 'medium',\n className: 'pr-xl',\n },\n ],\n defaultVariants: {\n isClearable: false,\n size: 'medium',\n },\n },\n);\n\ninterface InputProps\n extends VariantProps<typeof textAreaStyles>,\n Omit<AriaTextAreaProps, 'size'> {\n selectOnFocus?: boolean;\n ref?: ForwardedRef<HTMLTextAreaElement>;\n}\n\nconst Input = ({\n className,\n ref = null,\n selectOnFocus = false,\n size = 'medium',\n ...props\n}: InputProps) => {\n [props, ref] = useContextProps(props, ref, TextAreaContext);\n\n if (props.readOnly) {\n return (\n <span\n className={cn(\n textAreaStyles({\n isDisabled: false,\n isReadOnly: props.readOnly,\n size,\n className,\n }),\n )}\n >\n {props.value || '\\u00A0'}\n </span>\n );\n }\n\n return (\n <div className='relative flex items-center'>\n <AriaTextArea\n {...props}\n onFocus={(e) => {\n if (selectOnFocus) {\n ref.current?.select();\n }\n\n props.onFocus?.(e);\n }}\n ref={ref}\n className={({ isDisabled, isInvalid }) =>\n cn(\n textAreaStyles({\n isDisabled,\n isInvalid,\n isReadOnly: props.readOnly,\n size,\n className,\n }),\n )\n }\n />\n </div>\n );\n};\nInput.displayName = 'TextArea.Input';\n\nexport interface TextAreaProps\n extends Omit<\n VariantProps<typeof textAreaStyles>,\n 'isDisabled' | 'isInvalid' | 'isReadOnly'\n >,\n Omit<AriaTextFieldProps, 'className'>,\n Omit<InputProps, keyof AriaTextFieldProps> {\n className?: string;\n description?: string;\n errorMessage?: string;\n label?: string;\n placeholder?: string;\n}\n\nexport function TextArea({\n className,\n description,\n errorMessage,\n isDisabled,\n isInvalid,\n isReadOnly,\n label,\n placeholder,\n size = 'medium',\n ...props\n}: TextAreaProps) {\n const isSmall = size === 'small';\n const shouldShowDescription = !(isSmall || isInvalid) || isDisabled;\n const shouldShowError = isInvalid && !isDisabled && !isReadOnly;\n\n return (\n <AriaTextField\n {...(props as AriaTextFieldProps)}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n isReadOnly={isReadOnly}\n className={'flex flex-col gap-xs'}\n >\n {!isSmall && (\n <Label\n className='empty:hidden'\n isDisabled={isDisabled}\n isOptional={!props.isRequired}\n >\n {label}\n </Label>\n )}\n <Input className={className} placeholder={placeholder} size={size} />\n {shouldShowDescription && (\n <AriaText\n className={cn([\n 'fg-default-dark text-body-xs empty:hidden',\n isDisabled && 'fg-disabled',\n ])}\n slot='description'\n >\n {description}\n </AriaText>\n )}\n {shouldShowError && (\n <AriaText\n className='fg-serious text-body-xs empty:hidden'\n slot='errorMessage'\n >\n {errorMessage}\n </AriaText>\n )}\n </AriaTextField>\n );\n}\nTextArea.displayName = 'TextArea';\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/text-field/index.tsx"],"names":["C","ref","size","props","InputContext","useEffect","I","handleKeyPressed","e","shouldShowClearButton","isClearable","jsx","s","c","jsxs","h","g","textFieldStyles","Button","P","N","O","TextField","label","shouldShowDescription","isSmall","isInvalid","isDisabled","shouldShowError","errorMessage","isReadOnly","AriaTextField","F","Label","AriaText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QAKX,CAAA,CAAA,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\nimport 'client-only';\nimport {\n Input as AriaInput,\n type InputProps as AriaInputProps,\n Text as AriaText,\n TextField as AriaTextField,\n type TextFieldProps as AriaTextFieldProps,\n Button,\n InputContext,\n useContextProps,\n} from 'react-aria-components';\n\nimport { cn } from '@/lib/utils';\nimport { CancelFill } from '@accelint/icons';\nimport { type VariantProps, cva } from 'cva';\nimport { type ChangeEvent, type ForwardedRef, useEffect } from 'react';\nimport { Icon } from '../icon';\nimport { Label } from '../label';\n\nconst textFieldStyles = cva(\n [\n 'block w-full rounded-medium px-s py-xs font-display outline outline-interactive',\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 isInvalid: {\n true: 'outline-serious focus:outline-serious',\n },\n isReadOnly: {\n true: 'rounded-none p-0 outline-none',\n },\n size: {\n medium: 'text-body-s',\n small: 'text-body-xs',\n },\n isClearable: {\n true: '',\n false: '',\n },\n },\n compoundVariants: [\n {\n isDisabled: true,\n isInvalid: true,\n className: 'outline-interactive-disabled',\n },\n {\n isClearable: true,\n isDisabled: false,\n size: 'medium',\n className: 'pr-xl',\n },\n ],\n defaultVariants: {\n isClearable: false,\n size: 'medium',\n },\n },\n);\n\ninterface InputProps\n extends VariantProps<typeof textFieldStyles>,\n Omit<AriaInputProps, 'size'> {\n isClearable?: boolean;\n selectOnFocus?: boolean;\n ref?: ForwardedRef<HTMLInputElement>;\n}\n\nconst clearInputEvent = {\n target: { value: '' },\n} as ChangeEvent<HTMLInputElement>;\n\nconst Input = ({\n className,\n isClearable = true,\n ref = null,\n selectOnFocus = false,\n size = 'medium',\n ...props\n}: InputProps) => {\n [props, ref] = useContextProps(props, ref, InputContext);\n\n useEffect(() => {\n function handleKeyPressed(e: KeyboardEvent) {\n if (isClearable && e.key === 'Escape') {\n props.onChange?.(clearInputEvent);\n }\n }\n\n ref.current?.addEventListener('keydown', handleKeyPressed);\n\n return () => ref.current?.removeEventListener('keydown', handleKeyPressed);\n }, [isClearable, props.onChange, ref]);\n\n const shouldShowClearButton =\n !props.readOnly &&\n props.value &&\n size !== 'small' &&\n isClearable &&\n !props.disabled;\n\n if (props.readOnly) {\n return (\n <span\n className={cn(\n textFieldStyles({\n isClearable: false,\n isDisabled: false,\n isReadOnly: props.readOnly,\n size,\n className,\n }),\n )}\n >\n {props.value || '\\u00A0'}\n </span>\n );\n }\n\n return (\n <div className='relative flex items-center'>\n <AriaInput\n onFocus={(e) => {\n if (selectOnFocus) {\n ref.current?.select();\n }\n\n props.onFocus?.(e);\n }}\n ref={ref}\n className={({ isDisabled, isInvalid }) =>\n cn(\n textFieldStyles({\n isClearable,\n isDisabled,\n isInvalid,\n isReadOnly: props.readOnly,\n size,\n className,\n }),\n )\n }\n />\n {shouldShowClearButton && (\n <Button\n className='fg-default-dark hover:fg-interactive-hover absolute right-[5px] cursor-pointer'\n excludeFromTabOrder\n onPress={() => {\n props.onChange?.(clearInputEvent);\n ref.current?.focus();\n }}\n >\n <Icon size='small'>\n <CancelFill />\n </Icon>\n </Button>\n )}\n </div>\n );\n};\n\nexport interface TextFieldProps\n extends Omit<\n VariantProps<typeof textFieldStyles>,\n 'isDisabled' | 'isInvalid' | 'isReadOnly'\n >,\n Omit<AriaTextFieldProps, 'className'>,\n Omit<InputProps, keyof AriaTextFieldProps> {\n className?: string;\n isClearable?: boolean;\n description?: string;\n errorMessage?: string;\n label?: string;\n placeholder?: string;\n}\n\nexport function TextField({\n className,\n isClearable = true,\n description,\n errorMessage,\n isDisabled,\n isInvalid,\n isReadOnly,\n label,\n placeholder,\n size = 'medium',\n ...props\n}: TextFieldProps) {\n const isSmall = size === 'small';\n const shouldShowDescription =\n description && (!(isSmall || isInvalid) || isDisabled);\n const shouldShowError =\n errorMessage && isInvalid && !isDisabled && !isReadOnly;\n\n return (\n <AriaTextField\n {...(props as TextFieldProps)}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n isReadOnly={isReadOnly}\n className={'flex flex-col gap-xs'}\n >\n {!isSmall && (\n <Label\n className='empty:hidden'\n isDisabled={isDisabled}\n isOptional={!props.isRequired}\n >\n {label}\n </Label>\n )}\n <Input\n className={className}\n isClearable={isClearable}\n placeholder={placeholder}\n size={size}\n {...(props as InputProps)}\n />\n {shouldShowDescription && (\n <AriaText\n className={cn([\n 'fg-default-dark text-body-xs empty:hidden',\n isDisabled && 'fg-disabled',\n ])}\n slot='description'\n >\n {description}\n </AriaText>\n )}\n {shouldShowError && (\n <AriaText\n className='fg-serious text-body-xs empty:hidden'\n slot='errorMessage'\n >\n {errorMessage}\n </AriaText>\n )}\n </AriaTextField>\n );\n}\n"]}
1
+ {"version":3,"sources":["../../../src/components/text-field/index.tsx"],"names":["C","ref","size","props","InputContext","useEffect","I","handleKeyPressed","e","shouldShowClearButton","isClearable","jsx","s","c","jsxs","h","g","textFieldStyles","Button","P","N","O","TextField","label","shouldShowDescription","isSmall","isInvalid","isDisabled","shouldShowError","errorMessage","isReadOnly","AriaTextField","F","Label","AriaText","x","description"],"mappings":"uWAkCI,IAAA,CAAA,CAAAA,GAAA,CAAA,CAAA,iFAGA,CAAA,CAAA,CAAU,iGAIJ,CAAA,KAAA,CAAA,0GAEJ,CAAA,CAAA,SACQ,CAAA,CAAA,IAAA,CAAA,uCAER,CAAA,CAAA,UACQ,CAAA,CAAA,IAAA,CAAA,+BAGN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AAAA,CACA,CAAA,KAAA,CAAA,CAAA,CAAA,YACO,CAAA,CAAA,IAAA,CAAA,CAAA,CACP,QAEA,CAAA,IAAgBrB,CAAAA,CAAAA,CAAAA,IAAS,CAAA,CAAA,CAAA,GACnBsB,OACcC,CAAAA,CAAAA,CAAWC,IAAcC,EAAAA,CACvCC,EACJC,CAAAA,CAAAA,EAAgBH,CAAAA,CAAa,CAACC,CAAAA,CAAAA,CAAc,EAACG,CAE/C,EAAA,CAAA,CAAA,EAAA,CACEhB,CAAAA,CAACiB,WAEC,CAAAC,SAAA,CAAA,CAAA,GAAA,CAAA,CAAA,UACA,CAAA,CAAA,CAAA,SACA,CAAA,CAAA,CAAA,sBACW,CAAA,sBAEV,CAAA,QACEC,CAAA,CACC,wBAAU,CAAA,cACV,CAAA,UACA,CAAA,CAAA,CAAA,UAAmB,CAAA,CAAA,CAAA,CAAA,UAElB,CAAAV,QAGJ,CACC,CAAA,CAAA,CAAA,CAAAX,GAAA,CAAA,CAAA,CAAA,CAAA,SACA,CAAA,CAAA,CAAA,WACA,CAAA,CAAA,CAAA,WACMV,CACL,CAAA,CAAA,IACH,CACCsB,CAAAA,CAAAA,GACEU,EAAA,CACC,CAAA,CAAA,EAAAtB,GAAA,CAAAuB,IAAA,CAAA,CAAA,SACE,CAAAtB,EAAA,CAAA,CAAA,4DAGG,CAAA,CAAA,CAAA,IAAA,CAAA,aAEJ,CAAAuB,QAIHzB,CAACuB,CAAAA,CAAA,CACC,CAAA,CAAA,EAAAtB,GAAA,CAAAuB,IAAA,CAAA,CAAA,SAAU,CAAA,sCACL,CAAA,IAAA,CAAA,cAEJ,CAAAN,QAKX,CAAA,CAAA,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 'client-only';\nimport {\n Input as AriaInput,\n type InputProps as AriaInputProps,\n Text as AriaText,\n TextField as AriaTextField,\n type TextFieldProps as AriaTextFieldProps,\n Button,\n InputContext,\n useContextProps,\n} from 'react-aria-components';\n\nimport { cn } from '@/lib/utils';\nimport { CancelFill } from '@accelint/icons';\nimport { type VariantProps, cva } from 'cva';\nimport { type ChangeEvent, type ForwardedRef, useEffect } from 'react';\nimport { Icon } from '../icon';\nimport { Label } from '../label';\n\nconst textFieldStyles = cva(\n [\n 'block w-full rounded-medium px-s py-xs font-display outline outline-interactive',\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 isInvalid: {\n true: 'outline-serious focus:outline-serious',\n },\n isReadOnly: {\n true: 'rounded-none p-0 outline-none',\n },\n size: {\n medium: 'text-body-s',\n small: 'text-body-xs',\n },\n isClearable: {\n true: '',\n false: '',\n },\n },\n compoundVariants: [\n {\n isDisabled: true,\n isInvalid: true,\n className: 'outline-interactive-disabled',\n },\n {\n isClearable: true,\n isDisabled: false,\n size: 'medium',\n className: 'pr-xl',\n },\n ],\n defaultVariants: {\n isClearable: false,\n size: 'medium',\n },\n },\n);\n\ninterface InputProps\n extends VariantProps<typeof textFieldStyles>,\n Omit<AriaInputProps, 'size'> {\n isClearable?: boolean;\n selectOnFocus?: boolean;\n ref?: ForwardedRef<HTMLInputElement>;\n}\n\nconst clearInputEvent = {\n target: { value: '' },\n} as ChangeEvent<HTMLInputElement>;\n\nconst Input = ({\n className,\n isClearable = true,\n ref = null,\n selectOnFocus = false,\n size = 'medium',\n ...props\n}: InputProps) => {\n [props, ref] = useContextProps(props, ref, InputContext);\n\n useEffect(() => {\n function handleKeyPressed(e: KeyboardEvent) {\n if (isClearable && e.key === 'Escape') {\n props.onChange?.(clearInputEvent);\n }\n }\n\n ref.current?.addEventListener('keydown', handleKeyPressed);\n\n return () => ref.current?.removeEventListener('keydown', handleKeyPressed);\n }, [isClearable, props.onChange, ref]);\n\n const shouldShowClearButton =\n !props.readOnly &&\n props.value &&\n size !== 'small' &&\n isClearable &&\n !props.disabled;\n\n if (props.readOnly) {\n return (\n <span\n className={cn(\n textFieldStyles({\n isClearable: false,\n isDisabled: false,\n isReadOnly: props.readOnly,\n size,\n className,\n }),\n )}\n >\n {props.value || '\\u00A0'}\n </span>\n );\n }\n\n return (\n <div className='relative flex items-center'>\n <AriaInput\n onFocus={(e) => {\n if (selectOnFocus) {\n ref.current?.select();\n }\n\n props.onFocus?.(e);\n }}\n ref={ref}\n className={({ isDisabled, isInvalid }) =>\n cn(\n textFieldStyles({\n isClearable,\n isDisabled,\n isInvalid,\n isReadOnly: props.readOnly,\n size,\n className,\n }),\n )\n }\n />\n {shouldShowClearButton && (\n <Button\n className='fg-default-dark hover:fg-interactive-hover absolute right-[5px] cursor-pointer'\n excludeFromTabOrder\n onPress={() => {\n props.onChange?.(clearInputEvent);\n ref.current?.focus();\n }}\n >\n <Icon size='small'>\n <CancelFill />\n </Icon>\n </Button>\n )}\n </div>\n );\n};\n\nexport interface TextFieldProps\n extends Omit<\n VariantProps<typeof textFieldStyles>,\n 'isDisabled' | 'isInvalid' | 'isReadOnly'\n >,\n Omit<AriaTextFieldProps, 'className'>,\n Omit<InputProps, keyof AriaTextFieldProps> {\n className?: string;\n isClearable?: boolean;\n description?: string;\n errorMessage?: string;\n label?: string;\n placeholder?: string;\n}\n\nexport function TextField({\n className,\n isClearable = true,\n description,\n errorMessage,\n isDisabled,\n isInvalid,\n isReadOnly,\n label,\n placeholder,\n size = 'medium',\n ...props\n}: TextFieldProps) {\n const isSmall = size === 'small';\n const shouldShowDescription =\n description && (!(isSmall || isInvalid) || isDisabled);\n const shouldShowError =\n errorMessage && isInvalid && !isDisabled && !isReadOnly;\n\n return (\n <AriaTextField\n {...(props as TextFieldProps)}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n isReadOnly={isReadOnly}\n className={'flex flex-col gap-xs'}\n >\n {!isSmall && (\n <Label\n className='empty:hidden'\n isDisabled={isDisabled}\n isOptional={!props.isRequired}\n >\n {label}\n </Label>\n )}\n <Input\n className={className}\n isClearable={isClearable}\n placeholder={placeholder}\n size={size}\n {...(props as InputProps)}\n />\n {shouldShowDescription && (\n <AriaText\n className={cn([\n 'fg-default-dark text-body-xs empty:hidden',\n isDisabled && 'fg-disabled',\n ])}\n slot='description'\n >\n {description}\n </AriaText>\n )}\n {shouldShowError && (\n <AriaText\n className='fg-serious text-body-xs empty:hidden'\n slot='errorMessage'\n >\n {errorMessage}\n </AriaText>\n )}\n </AriaTextField>\n );\n}\n"]}
@@ -1,2 +1,2 @@
1
- import {expectsIconWrapper}from'./../../lib/react.js';import {cn}from'./../../lib/utils.js';import {cva}from'cva';import {ToggleButton,composeRenderProps}from'react-aria-components';import {jsx}from'react/jsx-runtime';var r=cva("inline-flex cursor-pointer items-center justify-center bg-transparent outline-none hover:bg-interactive-hover-dark focus:bg-interactive-hover-dark",{variants:{variant:{primary:"icon-default-light dtk-selected:icon-highlight dtk-selected:hover:bg-highlight-subtle dtk-selected:focus:bg-highlight-subtle",secondary:"icon-default-dark hover:icon-default-light focus:icon-default-light dtk-selected:icon-highlight dtk-selected:hover:bg-highlight-subtle dtk-selected:focus:bg-highlight-subtle"},size:{medium:"size-[28px] rounded-medium [--icon-size:var(--spacing-xl)]",small:"size-[20px] rounded-small [--icon-size:var(--spacing-l)]"},isDisabled:{true:"not-dtk-selected:icon-disabled dtk-selected:cursor-default not-dtk-selected:cursor-not-allowed not-dtk-selected:bg-interactive-disabled dtk-selected:hover:bg-transparent not-dtk-selected:hover:bg-interactive-disabled dtk-selected:focus:bg-transparent not-dtk-selected:focus:bg-interactive-disabled",false:""}},defaultVariants:{isDisabled:false,size:"medium",variant:"primary"}}),o=({className:e,size:t="medium",variant:l="secondary",isDisabled:i,...s})=>(expectsIconWrapper({children:s.children,componentName:o.displayName}),jsx(ToggleButton,{className:composeRenderProps(e,a=>cn(r({isDisabled:i,size:t,variant:l,className:a}))),isDisabled:i,...s}));o.displayName="ToggleIconButton";o.as=(e,t)=>cn(r({...e,className:t}));export{o as ToggleIconButton};//# sourceMappingURL=index.js.map
1
+ import {expectsIconWrapper}from'./../../lib/react.js';import {cn}from'./../../lib/utils.js';import'client-only';import {cva}from'cva';import {ToggleButton,composeRenderProps}from'react-aria-components';import {jsx}from'react/jsx-runtime';var r=cva("inline-flex cursor-pointer items-center justify-center bg-transparent outline-none hover:bg-interactive-hover-dark focus:bg-interactive-hover-dark",{variants:{variant:{primary:"icon-default-light dtk-selected:icon-highlight dtk-selected:hover:bg-highlight-subtle dtk-selected:focus:bg-highlight-subtle",secondary:"icon-default-dark hover:icon-default-light focus:icon-default-light dtk-selected:icon-highlight dtk-selected:hover:bg-highlight-subtle dtk-selected:focus:bg-highlight-subtle"},size:{medium:"size-[28px] rounded-medium [--icon-size:var(--spacing-xl)]",small:"size-[20px] rounded-small [--icon-size:var(--spacing-l)]"},isDisabled:{true:"not-dtk-selected:icon-disabled dtk-selected:cursor-default not-dtk-selected:cursor-not-allowed not-dtk-selected:bg-interactive-disabled dtk-selected:hover:bg-transparent not-dtk-selected:hover:bg-interactive-disabled dtk-selected:focus:bg-transparent not-dtk-selected:focus:bg-interactive-disabled",false:""}},defaultVariants:{isDisabled:false,size:"medium",variant:"primary"}}),o=({className:e,size:t="medium",variant:l="secondary",isDisabled:i,...s})=>(expectsIconWrapper({children:s.children,componentName:o.displayName}),jsx(ToggleButton,{className:composeRenderProps(e,a=>cn(r({isDisabled:i,size:t,variant:l,className:a}))),isDisabled:i,...s}));o.displayName="ToggleIconButton";o.as=(e,t)=>cn(r({...e,className:t}));export{o as ToggleIconButton};//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/toggle-icon-button/index.tsx"],"names":["c","ToggleIconButton","className","d","jsx","p","composeRenderProps","u","n","isDisabled","cn","toggleIconButtonStyles","props"],"mappings":"0NAsBE,IAAA,CAAA,CAAAA,GAAA,CAAA,oJAGI,CAAA,CAAA,QACE,CAAA,CAAA,OACE,CAAA,CAAA,OAAA,CAAA,8HAEA,CAAA,SAAA,CAAA,+KAGF,CAAQ,CAAA,IAAA,CAAA,CAAA,MAAA,CAAA,4DACD,CAAA,KAAA,CAAA,0DAGP,CAAA,CAAA,UAAM,CAAA,CAAA,IAAA,CAAA,2SAIV,CAAA,KAAA,CAAA,EAAA,CAAA,CAAA,CAAA,eACc,CAAA,CACZ,UAAM,CAAA,KAAA,CACN,IAAA,CAAA,QAAS,CAAA,OAWFC,CAAAA,SACX,CAAA,CAAA,CAAA,CAAAC,CAAAA,CACA,CAAA,CAAA,SAAO,CAAA,CAAA,CAAA,IACP,CAAA,CAAA,CAAA,QAAU,CAAA,OAAA,CACV,CAAA,CAAA,WACA,CAAA,UAEmB,CACjB,CAAA,CAAA,GAAA,CAAA,CAAA,IAAgBC,kBAAA,CAAA,CAAA,QAChB,CAAA,CAAA,CAAA,QAAA,CAAeF,aACjB,CAAC,CAAA,CAGCG,WACE,CAAA,CAAA,CAAAC,GAAWC,CAAAA,YAAmBJ,CAAAA,CAAYA,SAGpC,CAAAK,kBAAA,CAAA,CAAA,CAAA,CAAA,EAAAC,EAAA,CAAAC,CAAAA,CACA,CAAA,UACA,CAAA,CAAA,CAAA,IACA,CAAA,CAAA,CAAA,OACF,CAAC,CACH,CACF,SACA,CAAA,CAAA,CAAA,CAAYA,CAAAA,CACX,CAAA,UAIU,CAAA,CAAA,CAAA,GAAA,CAAA,CAAA,CAAA,EAAc,CAAA,CAAA,WAAA,CAAA,kBAI1BC,CAAGC,CAAAA,CAAuB,EAAE,CAAA,CAAGC,CAAAA,CAAO,CAAA,GAAAJ,EAAA,CAAA,CAAA,CAAA,CAAA,GAAW,CAAC,CAAA,SAAA,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\nimport { expectsIconWrapper } from '@/lib/react';\nimport { cn } from '@/lib/utils';\nimport { type VariantProps, cva } from 'cva';\nimport {\n ToggleButton as AriaToggleButton,\n type ToggleButtonProps as AriaToggleButtonProps,\n composeRenderProps,\n} from 'react-aria-components';\n\nconst toggleIconButtonStyles = cva(\n 'inline-flex cursor-pointer items-center justify-center bg-transparent outline-none hover:bg-interactive-hover-dark focus:bg-interactive-hover-dark',\n {\n variants: {\n variant: {\n primary:\n 'icon-default-light dtk-selected:icon-highlight dtk-selected:hover:bg-highlight-subtle dtk-selected:focus:bg-highlight-subtle',\n secondary:\n 'icon-default-dark hover:icon-default-light focus:icon-default-light dtk-selected:icon-highlight dtk-selected:hover:bg-highlight-subtle dtk-selected:focus:bg-highlight-subtle',\n },\n size: {\n medium: 'size-[28px] rounded-medium [--icon-size:var(--spacing-xl)]',\n small: 'size-[20px] rounded-small [--icon-size:var(--spacing-l)]',\n },\n isDisabled: {\n true: 'not-dtk-selected:icon-disabled dtk-selected:cursor-default not-dtk-selected:cursor-not-allowed not-dtk-selected:bg-interactive-disabled dtk-selected:hover:bg-transparent not-dtk-selected:hover:bg-interactive-disabled dtk-selected:focus:bg-transparent not-dtk-selected:focus:bg-interactive-disabled',\n false: '',\n },\n },\n defaultVariants: {\n isDisabled: false,\n size: 'medium',\n variant: 'primary',\n },\n },\n);\n\nexport interface ToggleIconButtonProps\n extends Omit<AriaToggleButtonProps, 'isDisabled'>,\n VariantProps<typeof toggleIconButtonStyles> {\n isDisabled?: boolean;\n}\n\nexport const ToggleIconButton = ({\n className,\n size = 'medium',\n variant = 'secondary',\n isDisabled,\n ...props\n}: ToggleIconButtonProps) => {\n expectsIconWrapper({\n children: props.children,\n componentName: ToggleIconButton.displayName,\n });\n\n return (\n <AriaToggleButton\n className={composeRenderProps(className, (className) =>\n cn(\n toggleIconButtonStyles({\n isDisabled,\n size,\n variant,\n className,\n }),\n ),\n )}\n isDisabled={isDisabled}\n {...props}\n />\n );\n};\nToggleIconButton.displayName = 'ToggleIconButton';\nToggleIconButton.as = (\n props: VariantProps<typeof toggleIconButtonStyles>,\n className?: string | string[],\n) => cn(toggleIconButtonStyles({ ...props, className }));\n"]}
1
+ {"version":3,"sources":["../../../src/components/toggle-icon-button/index.tsx"],"names":["c","ToggleIconButton","className","d","jsx","p","composeRenderProps","u","n","isDisabled","cn","toggleIconButtonStyles","props"],"mappings":"8OAwBE,IAAA,CAAA,CAAAA,GAAA,CAAA,oJAGI,CAAA,CAAA,QACE,CAAA,CAAA,OACE,CAAA,CAAA,OAAA,CAAA,8HAEA,CAAA,SAAA,CAAA,+KAGF,CAAQ,CAAA,IAAA,CAAA,CAAA,MAAA,CAAA,4DACD,CAAA,KAAA,CAAA,0DAGP,YAAM,CAAA,CAAA,IAAA,CAAA,2SAIV,CAAA,KAAA,CAAA,EAAA,CAAA,CAAA,CAAA,eACc,CAAA,CACZ,UAAM,CAAA,KAAA,CACN,IAAA,CAAA,QAAS,CAAA,OAWFC,UACX,CAAA,CAAA,CAAA,CAAAC,CAAAA,CACA,CAAA,CAAA,SAAO,CAAA,CAAA,CAAA,IACP,CAAA,CAAA,CAAA,QAAU,CAAA,OAAA,CACV,CAAA,CAAA,WACA,CAAA,UAEmB,CACjB,CAAA,CAAA,GAAA,CAAA,CAAA,IAAgBC,kBAAA,CAAA,CAAA,QAChB,CAAA,CAAA,CAAA,QAAA,CAAeF,aACjB,CAAC,CAAA,CAGCG,WACE,CAAA,CAAA,CAAAC,GAAWC,CAAAA,YAAmBJ,CAAAA,CAAYA,SAGpC,CAAAK,kBAAA,CAAA,CAAA,CAAA,CAAA,EAAAC,EAAA,CAAAC,CAAAA,CACA,CAAA,UACA,CAAA,CAAA,CAAA,IACA,CAAA,CAAA,CAAA,OACF,CAAC,CACH,CACF,SACA,CAAA,CAAA,CAAA,CAAYA,CAAAA,CACX,CAAA,UAIU,CAAA,CAAA,CAAA,GAAA,CAAA,CAAA,CAAA,EAAc,CAAA,CAAA,WAAA,CAAA,kBAI1BC,CAAGC,CAAAA,CAAuB,EAAE,CAAA,CAAGC,CAAAA,CAAO,CAAA,GAAAJ,EAAA,CAAA,CAAA,CAAA,CAAA,GAAW,CAAC,CAAA,SAAA,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 { expectsIconWrapper } from '@/lib/react';\nimport { cn } from '@/lib/utils';\nimport 'client-only';\nimport { type VariantProps, cva } from 'cva';\nimport {\n ToggleButton as AriaToggleButton,\n type ToggleButtonProps as AriaToggleButtonProps,\n composeRenderProps,\n} from 'react-aria-components';\n\nconst toggleIconButtonStyles = cva(\n 'inline-flex cursor-pointer items-center justify-center bg-transparent outline-none hover:bg-interactive-hover-dark focus:bg-interactive-hover-dark',\n {\n variants: {\n variant: {\n primary:\n 'icon-default-light dtk-selected:icon-highlight dtk-selected:hover:bg-highlight-subtle dtk-selected:focus:bg-highlight-subtle',\n secondary:\n 'icon-default-dark hover:icon-default-light focus:icon-default-light dtk-selected:icon-highlight dtk-selected:hover:bg-highlight-subtle dtk-selected:focus:bg-highlight-subtle',\n },\n size: {\n medium: 'size-[28px] rounded-medium [--icon-size:var(--spacing-xl)]',\n small: 'size-[20px] rounded-small [--icon-size:var(--spacing-l)]',\n },\n isDisabled: {\n true: 'not-dtk-selected:icon-disabled dtk-selected:cursor-default not-dtk-selected:cursor-not-allowed not-dtk-selected:bg-interactive-disabled dtk-selected:hover:bg-transparent not-dtk-selected:hover:bg-interactive-disabled dtk-selected:focus:bg-transparent not-dtk-selected:focus:bg-interactive-disabled',\n false: '',\n },\n },\n defaultVariants: {\n isDisabled: false,\n size: 'medium',\n variant: 'primary',\n },\n },\n);\n\nexport interface ToggleIconButtonProps\n extends Omit<AriaToggleButtonProps, 'isDisabled'>,\n VariantProps<typeof toggleIconButtonStyles> {\n isDisabled?: boolean;\n}\n\nexport const ToggleIconButton = ({\n className,\n size = 'medium',\n variant = 'secondary',\n isDisabled,\n ...props\n}: ToggleIconButtonProps) => {\n expectsIconWrapper({\n children: props.children,\n componentName: ToggleIconButton.displayName,\n });\n\n return (\n <AriaToggleButton\n className={composeRenderProps(className, (className) =>\n cn(\n toggleIconButtonStyles({\n isDisabled,\n size,\n variant,\n className,\n }),\n ),\n )}\n isDisabled={isDisabled}\n {...props}\n />\n );\n};\nToggleIconButton.displayName = 'ToggleIconButton';\nToggleIconButton.as = (\n props: VariantProps<typeof toggleIconButtonStyles>,\n className?: string | string[],\n) => cn(toggleIconButtonStyles({ ...props, className }));\n"]}
@@ -1,2 +1,2 @@
1
- import {containsExactChildren}from'./../../lib/react.js';import {cn}from'./../../lib/utils.js';import {cva}from'cva';import {TooltipTrigger,Focusable,Tooltip}from'react-aria-components';import {jsx}from'react/jsx-runtime';var n=cva("fg-default-light flex max-w-[160px] items-center justify-center break-words rounded-small bg-surface-overlay px-s py-xs text-center text-body-xs shadow-elevation-overlay");function e({children:o,closeDelay:t=0,delay:r=400,...p}){return containsExactChildren({children:o,componentName:e.displayName,restrictions:{[i.displayName]:{min:1,max:1},[s.displayName]:{min:1,max:1}}}),jsx(TooltipTrigger,{closeDelay:t,delay:r,...p,children:o})}e.displayName="Tooltip";e.as=(o,t)=>cn(n({...o,className:t}));var i=({children:o,...t})=>jsx(Focusable,{...t,children:o});i.displayName="Tooltip.Trigger";var s=({children:o,className:t,offset:r=5,placement:p="bottom",...T})=>jsx(Tooltip,{...T,className:cn(n({className:t})),offset:r,placement:p,children:o});s.displayName="Tooltip.Body";e.Trigger=i;e.Body=s;export{e as Tooltip,s as TooltipBody,i as TooltipTrigger};//# 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 {TooltipTrigger,Focusable,Tooltip}from'react-aria-components';import {jsx}from'react/jsx-runtime';var n=cva("fg-default-light flex max-w-[160px] items-center justify-center break-words rounded-small bg-surface-overlay px-s py-xs text-center text-body-xs shadow-elevation-overlay");function e({children:o,closeDelay:t=0,delay:r=400,...p}){return containsExactChildren({children:o,componentName:e.displayName,restrictions:{[i.displayName]:{min:1,max:1},[s.displayName]:{min:1,max:1}}}),jsx(TooltipTrigger,{closeDelay:t,delay:r,...p,children:o})}e.displayName="Tooltip";e.as=(o,t)=>cn(n({...o,className:t}));var i=({children:o,...t})=>jsx(Focusable,{...t,children:o});i.displayName="Tooltip.Trigger";var s=({children:o,className:t,offset:r=5,placement:p="bottom",...T})=>jsx(Tooltip,{...T,className:cn(n({className:t})),offset:r,placement:p,children:o});s.displayName="Tooltip.Body";e.Trigger=i;e.Body=s;export{e as Tooltip,s as TooltipBody,i as TooltipTrigger};//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/tooltip/index.tsx"],"names":["y","closeDelay","containsExactChildren","m","Tooltip","TooltipBody","jsx","RACTooltipTrigger","l","props","children","cn","tooltipStyles","Focusable","TooltipTrigger","className","placement","a","offset"],"mappings":"8NAwBE,IAAA,CAAA,CAAAA,GAAA,CAAA,2KAMA,CAAA,CAAA,SACA,WAAAC,CAAAA,CAAa,CAAA,UACL,CAAA,CAAA,CACR,OAEA,CAAA,CAAA,CAAA,GAAA,CAAAC,GACE,CAAA,CAAA,CAAA,CAAA,OACAC,qBAAA,CAAA,CAAA,QAAA,CAAA,CAAA,CAAeC,cACf,CAAA,CAAA,WAAc,CACZ,cAA2B,CAAA,CAAG,CAAE,WAAe,EAC/C,CAACC,GAAY,CAAA,CAAA,CAAA,GAAA,CAAA,CAAA,CAAA,CAAW,EAAG,CAAE,WAAe,EAEhD,CAAC,GAGCC,CAACC,EAAA,GAAkB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAAC,GAAA,CAAYP,eAAY,CAAA,UAAkBQ,CAAAA,CAC1D,CAAA,KAAA,CAAA,CAAA,CAAAC,GAGP,CACAN,CAAAA,QAAQ,CAAA,CAAA,CAAA,CAAA,CAAc,aACd,CAAA,SAGHO,CAAGC,CAAAA,CAAc,EAAE,CAAA,CAAGH,CAAAA,CAAO,aAAW,CAAC,CAAA,SAKb,CAAA,CAAA,CAAA,CAAA,CAAA,CAAAC,IAAAA,CAAU,GAAGD,QACpCI,CAAA,CAAW,CAAA,GAAGJ,CAAQ,mBAAAC,GAAS,CAEzCI,SAAe,CAAA,CAAA,CAAA,EAAc,CAAA,CAAA,WAAA,CAAA,iBAK3B,CAAAJ,KACA,CAAA,CAAA,CAAA,QAAAK,CACA,WACA,UAAAC,CAAAA,CAAY,CAAA,CAAA,SACZ,CAAGP,CACL,SAGO,CAAA,GAAGA,CACJ,oBAAcG,CAAAA,CAAc,SAAE,CAAAK,EAAAF,CAAU,CAAC,CAAC,UAClCG,CACR,WAAWF,CAEV,CAAA,CAAA,SACH,CAAA,CAGJX,SAAY,CAAA,CAAA,CAAA,EAAc,CAAA,CAAA,WAAA,CAAA,eAGlB,CAAA,CAAA,OAAOA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,IAAAA,CAAAA,CAAAA","file":"index.js","sourcesContent":["import { containsExactChildren } from '@/lib/react';\nimport { cn } from '@/lib/utils';\nimport { type VariantProps, cva } from 'cva';\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 */\nimport type React from 'react';\nimport {\n Focusable,\n Tooltip as RACTooltip,\n type TooltipProps as RACTooltipProps,\n TooltipTrigger as RACTooltipTrigger,\n type TooltipTriggerComponentProps,\n} from 'react-aria-components';\n\nconst tooltipStyles = cva(\n 'fg-default-light flex max-w-[160px] items-center justify-center break-words rounded-small bg-surface-overlay px-s py-xs text-center text-body-xs shadow-elevation-overlay',\n);\n\nexport interface TooltipProps extends TooltipTriggerComponentProps {}\n\nexport function Tooltip({\n children,\n closeDelay = 0,\n delay = 400,\n ...props\n}: TooltipProps) {\n containsExactChildren({\n children,\n componentName: Tooltip.displayName,\n restrictions: {\n [TooltipTrigger.displayName]: { min: 1, max: 1 },\n [TooltipBody.displayName]: { min: 1, max: 1 },\n },\n });\n\n return (\n <RACTooltipTrigger closeDelay={closeDelay} delay={delay} {...props}>\n {children}\n </RACTooltipTrigger>\n );\n}\nTooltip.displayName = 'Tooltip';\nTooltip.as = (\n props: VariantProps<typeof tooltipStyles>,\n className?: string | string[],\n) => cn(tooltipStyles({ ...props, className }));\n\nexport interface TooltipTriggerProps\n extends React.ComponentProps<typeof Focusable> {}\n\nexport const TooltipTrigger = ({ children, ...props }: TooltipTriggerProps) => {\n return <Focusable {...props}>{children}</Focusable>;\n};\nTooltipTrigger.displayName = 'Tooltip.Trigger';\n\nexport interface TooltipBodyProps extends RACTooltipProps {}\n\nexport const TooltipBody = ({\n children,\n className,\n offset = 5,\n placement = 'bottom',\n ...props\n}: TooltipBodyProps) => {\n return (\n <RACTooltip\n {...props}\n className={cn(tooltipStyles({ className }))}\n offset={offset}\n placement={placement}\n >\n {children}\n </RACTooltip>\n );\n};\nTooltipBody.displayName = 'Tooltip.Body';\n\nTooltip.Trigger = TooltipTrigger;\nTooltip.Body = TooltipBody;\n"]}
1
+ {"version":3,"sources":["../../../src/components/tooltip/index.tsx"],"names":["y","closeDelay","containsExactChildren","m","Tooltip","TooltipBody","RACTooltipTrigger","props","children","cn","tooltipStyles","a","Focusable","l","c","TooltipTrigger","placement","g","className"],"mappings":"kPA0BE,IAAA,CAAA,CAAAA,GAAA,CAAA,2KAMA,CAAA,CAAA,SACA,CAAA,CAAA,CAAA,QAAAC,CAAAA,CAAa,cAEb,CAAA,CAAA,KAEA,OAAAC,GACE,WACAC,qBAAA,CAAA,CAAA,QAAA,CAAA,CAAA,CAAeC,aAAQ,CACvB,CAAA,CAAA,WAAc,CACZ,YAAgB,CAAA,CAAW,CAAA,CAAG,CAAE,WAAe,EAC/C,CAACC,aAAuB,CAAA,CAAG,CAAE,WAAe,EAEhD,CAAC,IAGEC,CAAAA,CAAA,cAA8BL,cAAAA,CAAY,CAAA,UAAkBM,CAAAA,CAC1D,CAAA,KAAA,CAAA,CAAA,CAAAC,GAGP,CACAJ,CAAAA,aAAsB,CAAA,CAAA,qBAIjBK,CAAGC,EAAc,EAAE,CAAA,CAAGH,EAAO,CAAA,GAAAI,EAAA,CAAA,CAAA,CAAA,CAAA,GAAW,CAAC,CAAA,SAKb,CAAA,CAAA,CAAA,CAAA,CAAA,CAAAH,KAAU,CAAA,CAAA,CAAGD,QACpCK,CAAA,CAAW,CAAA,IAAW,CAAA,GAAAC,GAAA,CAAAC,SAAA,CAAA,CAAAN,IAEhCO,CAAAA,QAAe,CAAA,CAAA,CAAA,EAAc,gCAK3BP,IAAAA,CACA,CAAA,CAAA,CAAA,SACA,CAAA,CAAA,SACA,CAAA,CAAA,CAAA,MAAA,CAAAQ,CAAAA,CAAY,CAAA,CAAA,SACZ,CAAGT,CACL,CAAA,QAGO,CAAA,IACD,CAAA,GAAAM,GAAA,CAAAI,OAAA,CAAA,CAAA,GAAcP,CAAAA,CAAc,YAAEQ,CAAU,CAAC,CAAC,CAAA,UAE1C,CAAA,CAAA,CAAA,CAAA,CAAA,MAAWF,CAEV,WACH,CAAA,CAGJX,SAAY,CAAA,CAAA,CAAA,EAAc,CAAA,CAAA,WAAA,CAAA,eAGlB,CAAA,CAAA,OAAOA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,IAAAA,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';\nimport { containsExactChildren } from '@/lib/react';\nimport { cn } from '@/lib/utils';\nimport 'client-only';\nimport { type VariantProps, cva } from 'cva';\nimport type React from 'react';\nimport {\n Focusable,\n Tooltip as RACTooltip,\n type TooltipProps as RACTooltipProps,\n TooltipTrigger as RACTooltipTrigger,\n type TooltipTriggerComponentProps,\n} from 'react-aria-components';\n\nconst tooltipStyles = cva(\n 'fg-default-light flex max-w-[160px] items-center justify-center break-words rounded-small bg-surface-overlay px-s py-xs text-center text-body-xs shadow-elevation-overlay',\n);\n\nexport interface TooltipProps extends TooltipTriggerComponentProps {}\n\nexport function Tooltip({\n children,\n closeDelay = 0,\n delay = 400,\n ...props\n}: TooltipProps) {\n containsExactChildren({\n children,\n componentName: Tooltip.displayName,\n restrictions: {\n [TooltipTrigger.displayName]: { min: 1, max: 1 },\n [TooltipBody.displayName]: { min: 1, max: 1 },\n },\n });\n\n return (\n <RACTooltipTrigger closeDelay={closeDelay} delay={delay} {...props}>\n {children}\n </RACTooltipTrigger>\n );\n}\nTooltip.displayName = 'Tooltip';\nTooltip.as = (\n props: VariantProps<typeof tooltipStyles>,\n className?: string | string[],\n) => cn(tooltipStyles({ ...props, className }));\n\nexport interface TooltipTriggerProps\n extends React.ComponentProps<typeof Focusable> {}\n\nexport const TooltipTrigger = ({ children, ...props }: TooltipTriggerProps) => {\n return <Focusable {...props}>{children}</Focusable>;\n};\nTooltipTrigger.displayName = 'Tooltip.Trigger';\n\nexport interface TooltipBodyProps extends RACTooltipProps {}\n\nexport const TooltipBody = ({\n children,\n className,\n offset = 5,\n placement = 'bottom',\n ...props\n}: TooltipBodyProps) => {\n return (\n <RACTooltip\n {...props}\n className={cn(tooltipStyles({ className }))}\n offset={offset}\n placement={placement}\n >\n {children}\n </RACTooltip>\n );\n};\nTooltipBody.displayName = 'Tooltip.Body';\n\nTooltip.Trigger = TooltipTrigger;\nTooltip.Body = TooltipBody;\n"]}