@accelint/design-toolkit 2.6.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. package/dist/components/accordion/index.d.ts +42 -0
  2. package/dist/components/accordion/index.js.map +1 -1
  3. package/dist/components/accordion/styles.js +1 -1
  4. package/dist/components/accordion/styles.js.map +1 -1
  5. package/dist/components/avatar/index.d.ts +29 -0
  6. package/dist/components/avatar/index.js.map +1 -1
  7. package/dist/components/badge/index.d.ts +24 -0
  8. package/dist/components/badge/index.js.map +1 -1
  9. package/dist/components/button/index.d.ts +104 -0
  10. package/dist/components/button/index.js +1 -1
  11. package/dist/components/button/index.js.map +1 -1
  12. package/dist/components/button/styles.d.ts +28 -106
  13. package/dist/components/button/styles.js +1 -1
  14. package/dist/components/button/styles.js.map +1 -1
  15. package/dist/components/button/types.d.ts +6 -4
  16. package/dist/components/checkbox/index.d.ts +33 -0
  17. package/dist/components/checkbox/index.js.map +1 -1
  18. package/dist/components/checkbox/styles.d.ts +3 -3
  19. package/dist/components/checkbox/styles.js +1 -1
  20. package/dist/components/checkbox/styles.js.map +1 -1
  21. package/dist/components/chip/index.d.ts +34 -0
  22. package/dist/components/chip/index.js.map +1 -1
  23. package/dist/components/chip/styles.js +1 -1
  24. package/dist/components/chip/styles.js.map +1 -1
  25. package/dist/components/classification-badge/index.d.ts +15 -0
  26. package/dist/components/classification-badge/index.js.map +1 -1
  27. package/dist/components/classification-banner/index.d.ts +11 -0
  28. package/dist/components/classification-banner/index.js.map +1 -1
  29. package/dist/components/color-picker/styles.js +1 -1
  30. package/dist/components/color-picker/styles.js.map +1 -1
  31. package/dist/components/combobox-field/index.d.ts +1 -0
  32. package/dist/components/combobox-field/styles.d.ts +3 -3
  33. package/dist/components/combobox-field/styles.js +1 -1
  34. package/dist/components/combobox-field/styles.js.map +1 -1
  35. package/dist/components/combobox-field/types.d.ts +1 -0
  36. package/dist/components/date-field/index.d.ts +44 -0
  37. package/dist/components/date-field/index.js.map +1 -1
  38. package/dist/components/date-field/styles.d.ts +3 -3
  39. package/dist/components/date-field/styles.js +1 -1
  40. package/dist/components/date-field/styles.js.map +1 -1
  41. package/dist/components/dialog/index.d.ts +26 -4
  42. package/dist/components/dialog/index.js +1 -1
  43. package/dist/components/dialog/index.js.map +1 -1
  44. package/dist/components/drawer/events.d.ts +8 -0
  45. package/dist/components/drawer/events.js +2 -0
  46. package/dist/components/drawer/events.js.map +1 -0
  47. package/dist/components/drawer/index.d.ts +89 -43
  48. package/dist/components/drawer/index.js +1 -1
  49. package/dist/components/drawer/index.js.map +1 -1
  50. package/dist/components/drawer/styles.d.ts +50 -16
  51. package/dist/components/drawer/styles.js +1 -1
  52. package/dist/components/drawer/styles.js.map +1 -1
  53. package/dist/components/drawer/types.d.ts +154 -238
  54. package/dist/components/drawer/types.js +1 -1
  55. package/dist/components/drawer/types.js.map +1 -1
  56. package/dist/components/hotkey/index.d.ts +32 -1
  57. package/dist/components/hotkey/index.js +1 -1
  58. package/dist/components/hotkey/index.js.map +1 -1
  59. package/dist/components/icon/index.d.ts +29 -0
  60. package/dist/components/icon/index.js.map +1 -1
  61. package/dist/components/input/index.d.ts +19 -0
  62. package/dist/components/input/index.js +1 -1
  63. package/dist/components/input/index.js.map +1 -1
  64. package/dist/components/input/styles.js +1 -1
  65. package/dist/components/input/styles.js.map +1 -1
  66. package/dist/components/input/types.d.ts +1 -0
  67. package/dist/components/label/index.d.ts +19 -0
  68. package/dist/components/label/index.js.map +1 -1
  69. package/dist/components/menu/index.d.ts +69 -7
  70. package/dist/components/menu/index.js +1 -1
  71. package/dist/components/menu/index.js.map +1 -1
  72. package/dist/components/menu/styles.d.ts +10 -37
  73. package/dist/components/menu/styles.js +1 -1
  74. package/dist/components/menu/styles.js.map +1 -1
  75. package/dist/components/menu/types.d.ts +11 -16
  76. package/dist/components/options/index.d.ts +41 -0
  77. package/dist/components/options/index.js.map +1 -1
  78. package/dist/components/options/styles.d.ts +3 -3
  79. package/dist/components/options/styles.js +1 -1
  80. package/dist/components/options/styles.js.map +1 -1
  81. package/dist/components/popover/index.d.ts +36 -2
  82. package/dist/components/popover/index.js +1 -1
  83. package/dist/components/popover/index.js.map +1 -1
  84. package/dist/components/query-builder/index.d.ts +24 -0
  85. package/dist/components/query-builder/index.js.map +1 -1
  86. package/dist/components/radio/index.d.ts +31 -0
  87. package/dist/components/radio/index.js.map +1 -1
  88. package/dist/components/radio/styles.d.ts +3 -3
  89. package/dist/components/radio/styles.js +1 -1
  90. package/dist/components/radio/styles.js.map +1 -1
  91. package/dist/components/search-field/styles.js +1 -1
  92. package/dist/components/search-field/styles.js.map +1 -1
  93. package/dist/components/search-field/types.d.ts +1 -0
  94. package/dist/components/select-field/index.d.ts +44 -0
  95. package/dist/components/select-field/index.js +1 -1
  96. package/dist/components/select-field/index.js.map +1 -1
  97. package/dist/components/select-field/styles.d.ts +3 -3
  98. package/dist/components/select-field/styles.js +1 -1
  99. package/dist/components/select-field/styles.js.map +1 -1
  100. package/dist/components/select-field/types.d.ts +1 -0
  101. package/dist/components/slider/index.d.ts +36 -2
  102. package/dist/components/slider/index.js +1 -1
  103. package/dist/components/slider/index.js.map +1 -1
  104. package/dist/components/switch/index.d.ts +36 -0
  105. package/dist/components/switch/index.js +1 -1
  106. package/dist/components/switch/index.js.map +1 -1
  107. package/dist/components/switch/styles.d.ts +23 -21
  108. package/dist/components/switch/styles.js +1 -1
  109. package/dist/components/switch/styles.js.map +1 -1
  110. package/dist/components/switch/types.d.ts +1 -0
  111. package/dist/components/tabs/index.d.ts +46 -0
  112. package/dist/components/tabs/index.js.map +1 -1
  113. package/dist/components/text-area-field/index.d.ts +20 -0
  114. package/dist/components/text-area-field/index.js.map +1 -1
  115. package/dist/components/text-area-field/styles.d.ts +3 -3
  116. package/dist/components/text-area-field/styles.js +1 -1
  117. package/dist/components/text-area-field/styles.js.map +1 -1
  118. package/dist/components/text-field/index.d.ts +62 -0
  119. package/dist/components/text-field/index.js.map +1 -1
  120. package/dist/components/text-field/styles.d.ts +3 -3
  121. package/dist/components/text-field/types.d.ts +1 -0
  122. package/dist/components/tooltip/index.d.ts +42 -0
  123. package/dist/components/tooltip/index.js.map +1 -1
  124. package/dist/components/view-stack/events.d.ts +9 -0
  125. package/dist/components/view-stack/events.js +2 -0
  126. package/dist/components/view-stack/events.js.map +1 -0
  127. package/dist/components/view-stack/index.d.ts +13 -10
  128. package/dist/components/view-stack/index.js +1 -1
  129. package/dist/components/view-stack/index.js.map +1 -1
  130. package/dist/components/view-stack/types.d.ts +13 -9
  131. package/dist/index.d.ts +15 -15
  132. package/dist/index.js +1 -1
  133. package/dist/lib/types.d.ts +6 -2
  134. package/dist/metafile-esm.json +1 -1
  135. package/dist/styles.css +922 -609
  136. package/dist/variants/variants.css +6 -5
  137. package/package.json +5 -5
  138. package/dist/components/box/index.d.ts +0 -19
  139. package/dist/components/box/index.js +0 -2
  140. package/dist/components/box/index.js.map +0 -1
  141. package/dist/components/drawer/context.d.ts +0 -13
  142. package/dist/components/drawer/context.js +0 -2
  143. package/dist/components/drawer/context.js.map +0 -1
  144. package/dist/components/drawer/state.d.ts +0 -26
  145. package/dist/components/drawer/state.js +0 -2
  146. package/dist/components/drawer/state.js.map +0 -1
@@ -16,6 +16,68 @@ declare function TextFieldProvider({ children, ...props }: ProviderProps<TextFie
16
16
  declare namespace TextFieldProvider {
17
17
  var displayName: string;
18
18
  }
19
+ /**
20
+ * TextField - A complete form field component with label, input, and validation
21
+ *
22
+ * Provides a comprehensive form field experience combining label, input, description,
23
+ * and error message components. Handles validation states and accessibility
24
+ * automatically while supporting extensive customization through styling props.
25
+ *
26
+ * @example
27
+ * // Basic text field with label and required validation
28
+ * <TextField label='Full Name' isRequired defaultValue='John Doe' />
29
+ *
30
+ * @example
31
+ * // Text field with placeholder and description
32
+ * <TextField
33
+ * label='Email Address'
34
+ * inputProps={{ placeholder: 'Enter your email address', type: 'email' }}
35
+ * description='We will never share your email with third parties'
36
+ * />
37
+ *
38
+ * @example
39
+ * // Text field with error state
40
+ * <TextField
41
+ * label='Username'
42
+ * isInvalid
43
+ * errorMessage='Username must be at least 3 characters long'
44
+ * inputProps={{ placeholder: 'Enter username' }}
45
+ * />
46
+ *
47
+ * @example
48
+ * // Small size text field with clearable input
49
+ * <TextField
50
+ * label='Search'
51
+ * size='small'
52
+ * inputProps={{
53
+ * placeholder: 'Type to search...',
54
+ * isClearable: true,
55
+ * type: 'search'
56
+ * }}
57
+ * />
58
+ *
59
+ * @example
60
+ * // Disabled text field
61
+ * <TextField
62
+ * label='Status'
63
+ * isDisabled
64
+ * defaultValue='Inactive'
65
+ * description='This field cannot be edited'
66
+ * />
67
+ *
68
+ * @example
69
+ * // Password field with validation
70
+ * <TextField
71
+ * label='Password'
72
+ * isRequired
73
+ * inputProps={{
74
+ * type: 'password',
75
+ * placeholder: 'Enter a secure password',
76
+ * minLength: 8
77
+ * }}
78
+ * description='Password must be at least 8 characters'
79
+ * />
80
+ */
19
81
  declare function TextField({ ref, ...props }: TextFieldProps): react_jsx_runtime.JSX.Element;
20
82
  declare namespace TextField {
21
83
  var displayName: string;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/text-field/index.tsx"],"names":["description","TextFieldStyles","TextFieldProvider","N","children","e","props","ref","L","rest","errorMessageProp","size","AriaTextField","composeRenderProps","classNames","className","field","c","isDisabled","isInvalid","isRequired","labelProp","isSmall","jsx","Label","label","g","inputProps","M","descriptionProp","I","error","errorMessage","TextField"],"mappings":"+TA8BsB,MAAA,CAAA,KAAAA,CAAa,CAAA,CAAA,KAAM,CAAA,CAAIC,CAAAA,WAGqB,CAAA,CAElE,CAAA,KAAA,CAAA,CAAA,CAASC,CAAAA,eAAkB,EACzB,CAAA,CAAA,CAAAC,aAAA,CAAA,IAAAC,EACA,SAEA,CAAA,CAAA,CAAA,QACoB,CAAA,CAAA,CAAA,GAAjB,CAA0B,CAAA,CAAA,CAAA,OACxBC,GAAA,CAAA,CAAA,CAAA,Q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,CAAA,CAAA,CAAYE,UAEX,CAAAC,CAAAA,CACH,UAGIM,CAAAA,CACJ,CAAA,QAAA,CAAA,CAAYb,CAAAA,CAAAA,CAAYT,GAAA,CAAAuB,KAAA,CAAA,CAAA,GACxB,CAAA,CAAA,UACA,CAAA,CAAA,EAAA,KACA,CAAA,QACA,CAAA,CAAA,CAAA,QAED,CAAC,CAACC,CAAAA,IAAqBP,CAAAA,CAAAA,CAAWH,SAE/B,CAAA,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,EAAA,CAAA,CAAA,EACLd,GAAA,CAAAyB,IAAA,CAAA,CAAA,IAAA,CAAW9B,aAAyBc,CAAAA,SAAY,CAAA,CAAA,CAAA,CAAY,SAE3D,CAAA,CAAA,EAAAe,WAIH,CAAA,CAAA,CAAA,QAA8Bf,CAAY,CAAA,CAAA,CAAA,CAAAT,GAAA,CAAQU,UAAAA,CAAAA,CAChDgB,SAAQ,CAAAd,kBAAA,CAAA,CAAAF,EAAW,KAGpB,CAAA,CAAA,EAAA,CAAA,CAAA,CAAAiB,SAObC,CAAAA,CAAU,CAAA,CAAA,CAAA,CAAA,QAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CACxBA,WAAqB/B,CAAAA,WAAAA,CAAAA,CAAAA,CAAAA,QAAAA,CAAAA,CAAAA","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n'use client';\n\nimport 'client-only';\nimport { createContext } from 'react';\nimport {\n TextField as AriaTextField,\n type ContextValue,\n FieldError,\n Text,\n composeRenderProps,\n useContextProps,\n} from 'react-aria-components';\n\nimport type { ProviderProps } from '@/lib/types';\nimport { Input } from '../input';\nimport { Label } from '../label';\nimport { TextFieldStyles } from './styles';\nimport type { TextFieldProps } from './types';\n\nconst { field, label, description, error } = TextFieldStyles();\n\nexport const TextFieldContext =\n createContext<ContextValue<TextFieldProps, HTMLDivElement>>(null);\n\nfunction TextFieldProvider({\n children,\n ...props\n}: ProviderProps<TextFieldProps>) {\n return (\n <TextFieldContext.Provider value={props}>\n {children}\n </TextFieldContext.Provider>\n );\n}\nTextFieldProvider.displayName = 'TextField.Provider';\n\nexport function TextField({ ref, ...props }: TextFieldProps) {\n [props, ref] = useContextProps(props, ref ?? null, TextFieldContext);\n\n const {\n classNames,\n description: descriptionProp,\n errorMessage: errorMessageProp,\n inputProps,\n label: labelProp,\n size = 'medium',\n isInvalid: isInvalidProp,\n ...rest\n } = props;\n const errorMessage = errorMessageProp || null; // Protect against empty string\n const isSmall = size === 'small';\n\n return (\n <AriaTextField\n {...rest}\n ref={ref}\n className={composeRenderProps(classNames?.field, (className) =>\n field({ className }),\n )}\n isInvalid={isInvalidProp || (errorMessage ? true : undefined)} // Leave uncontrolled if possible to fallback to validation state\n data-size={size}\n >\n {(\n { isDisabled, isInvalid, isRequired }, // Rely on internal state, not props, since state could differ from props\n ) => (\n <>\n {!!labelProp && !isSmall && (\n <Label\n className={label({ className: classNames?.label })}\n isDisabled={isDisabled}\n isRequired={isRequired}\n >\n {labelProp}\n </Label>\n )}\n <Input\n {...inputProps}\n classNames={classNames?.input}\n disabled={isDisabled}\n required={isRequired}\n size={size}\n isInvalid={isInvalid}\n />\n {!!descriptionProp && !(isSmall || isInvalid) && (\n <Text\n slot='description'\n className={description({ className: classNames?.description })}\n >\n {descriptionProp}\n </Text>\n )}\n <FieldError\n className={composeRenderProps(classNames?.error, (className) =>\n error({ className }),\n )}\n >\n {errorMessage}\n </FieldError>\n </>\n )}\n </AriaTextField>\n );\n}\nTextField.displayName = 'TextField';\nTextField.Provider = TextFieldProvider;\n"]}
1
+ {"version":3,"sources":["../../../src/components/text-field/index.tsx"],"names":["description","TextFieldStyles","TextFieldProvider","N","children","e","props","ref","L","rest","errorMessageProp","size","AriaTextField","composeRenderProps","classNames","className","field","c","isDisabled","isInvalid","isRequired","labelProp","isSmall","jsx","Label","label","g","inputProps","M","descriptionProp","I","error","errorMessage","TextField"],"mappings":"+TA8BsB,MAAA,CAAA,KAAAA,CAAa,CAAA,CAAA,KAAM,CAAA,CAAIC,CAAAA,WAGqB,CAAA,CAElE,CAAA,KAAA,CAAA,CAAA,CAASC,CAAAA,eAAkB,EACzB,CAAA,CAAA,CAAAC,aAAA,CAAA,IAAAC,EACA,SAEA,CAAA,CAAA,CAAA,QACoB,CAAA,CAAA,CAAA,GAAjB,CAA0B,CAAA,CAAA,CAAA,OACxBC,GAAA,CAAA,CAAA,CAAA,QAIPH,CAAkB,CAAA,KAAA,CAAA,CAAA,CAAA,QAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,WAgEzB,CAAA,oBAAmC,CAAmB,SAC5BI,CAAAA,CAAOC,CAAAA,GAAO,CAAA,CAAA,CAAA,GAAsB,CAEnE,CAAA,CAAA,CAAA,CAAA,CAAM,CACJ,CAAA,CAAA,CAAAC,eAAA,CAAA,CAAA,CAAA,CAAA,EAAA,IACA,CAAA,CAAA,CAAA,CAAA,KAAA,CAAA,UACA,CAAA,CAAA,CAAA,WACA,CAAA,CAAA,CAAA,YAEA,CAAA,CAAA,CAAA,UAAO,CAAA,CAAA,CACP,KAAA,CAAA,CAAA,CAAA,IACA,CAAA,CAAA,CAAGC,QAEgBC,CAAAA,SACLC,CAAAA,CAAAA,CAAS,GAAA,CAAA,CAAA,CAAA,CAAA,CAEzB,CAAA,CAAA,CAAA,EAAA,IACGC,CAAAA,CAAA,CACE,CAAA,GAAGH,OAEJ,CAAA,OAAAJ,GAAA,CAAWQ,SAA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AA,CAAA,EAAA,CAAA,CAAA,CAAAiB,SAObC,CAAAA,CAAU,CAAA,CAAA,CAAA,CAAA,QAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CACxBA,WAAqB/B,CAAAA,WAAAA,CAAAA,CAAAA,CAAAA,QAAAA,CAAAA,CAAAA","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n'use client';\n\nimport 'client-only';\nimport { createContext } from 'react';\nimport {\n TextField as AriaTextField,\n type ContextValue,\n FieldError,\n Text,\n composeRenderProps,\n useContextProps,\n} from 'react-aria-components';\n\nimport type { ProviderProps } from '@/lib/types';\nimport { Input } from '../input';\nimport { Label } from '../label';\nimport { TextFieldStyles } from './styles';\nimport type { TextFieldProps } from './types';\n\nconst { field, label, description, error } = TextFieldStyles();\n\nexport const TextFieldContext =\n createContext<ContextValue<TextFieldProps, HTMLDivElement>>(null);\n\nfunction TextFieldProvider({\n children,\n ...props\n}: ProviderProps<TextFieldProps>) {\n return (\n <TextFieldContext.Provider value={props}>\n {children}\n </TextFieldContext.Provider>\n );\n}\nTextFieldProvider.displayName = 'TextField.Provider';\n\n/**\n * TextField - A complete form field component with label, input, and validation\n *\n * Provides a comprehensive form field experience combining label, input, description,\n * and error message components. Handles validation states and accessibility\n * automatically while supporting extensive customization through styling props.\n *\n * @example\n * // Basic text field with label and required validation\n * <TextField label='Full Name' isRequired defaultValue='John Doe' />\n *\n * @example\n * // Text field with placeholder and description\n * <TextField\n * label='Email Address'\n * inputProps={{ placeholder: 'Enter your email address', type: 'email' }}\n * description='We will never share your email with third parties'\n * />\n *\n * @example\n * // Text field with error state\n * <TextField\n * label='Username'\n * isInvalid\n * errorMessage='Username must be at least 3 characters long'\n * inputProps={{ placeholder: 'Enter username' }}\n * />\n *\n * @example\n * // Small size text field with clearable input\n * <TextField\n * label='Search'\n * size='small'\n * inputProps={{\n * placeholder: 'Type to search...',\n * isClearable: true,\n * type: 'search'\n * }}\n * />\n *\n * @example\n * // Disabled text field\n * <TextField\n * label='Status'\n * isDisabled\n * defaultValue='Inactive'\n * description='This field cannot be edited'\n * />\n *\n * @example\n * // Password field with validation\n * <TextField\n * label='Password'\n * isRequired\n * inputProps={{\n * type: 'password',\n * placeholder: 'Enter a secure password',\n * minLength: 8\n * }}\n * description='Password must be at least 8 characters'\n * />\n */\nexport function TextField({ ref, ...props }: TextFieldProps) {\n [props, ref] = useContextProps(props, ref ?? null, TextFieldContext);\n\n const {\n classNames,\n description: descriptionProp,\n errorMessage: errorMessageProp,\n inputProps,\n label: labelProp,\n size = 'medium',\n isInvalid: isInvalidProp,\n ...rest\n } = props;\n const errorMessage = errorMessageProp || null; // Protect against empty string\n const isSmall = size === 'small';\n\n return (\n <AriaTextField\n {...rest}\n ref={ref}\n className={composeRenderProps(classNames?.field, (className) =>\n field({ className }),\n )}\n isInvalid={isInvalidProp || (errorMessage ? true : undefined)} // Leave uncontrolled if possible to fallback to validation state\n data-size={size}\n >\n {(\n { isDisabled, isInvalid, isRequired }, // Rely on internal state, not props, since state could differ from props\n ) => (\n <>\n {!!labelProp && !isSmall && (\n <Label\n className={label({ className: classNames?.label })}\n isDisabled={isDisabled}\n isRequired={isRequired}\n >\n {labelProp}\n </Label>\n )}\n <Input\n {...inputProps}\n classNames={classNames?.input}\n disabled={isDisabled}\n required={isRequired}\n size={size}\n isInvalid={isInvalid}\n />\n {!!descriptionProp && !(isSmall || isInvalid) && (\n <Text\n slot='description'\n className={description({ className: classNames?.description })}\n >\n {descriptionProp}\n </Text>\n )}\n <FieldError\n className={composeRenderProps(classNames?.error, (className) =>\n error({ className }),\n )}\n >\n {errorMessage}\n </FieldError>\n </>\n )}\n </AriaTextField>\n );\n}\nTextField.displayName = 'TextField';\nTextField.Provider = TextFieldProvider;\n"]}
@@ -6,9 +6,9 @@ declare const TextFieldStyles: tailwind_variants.TVReturnType<{
6
6
  [key: string]: tailwind_merge.ClassNameValue | {
7
7
  input?: tailwind_merge.ClassNameValue;
8
8
  label?: tailwind_merge.ClassNameValue;
9
- error?: tailwind_merge.ClassNameValue;
10
9
  description?: tailwind_merge.ClassNameValue;
11
10
  field?: tailwind_merge.ClassNameValue;
11
+ error?: tailwind_merge.ClassNameValue;
12
12
  };
13
13
  };
14
14
  } | {
@@ -16,9 +16,9 @@ declare const TextFieldStyles: tailwind_variants.TVReturnType<{
16
16
  [x: string]: tailwind_merge.ClassNameValue | {
17
17
  input?: tailwind_merge.ClassNameValue;
18
18
  label?: tailwind_merge.ClassNameValue;
19
- error?: tailwind_merge.ClassNameValue;
20
19
  description?: tailwind_merge.ClassNameValue;
21
20
  field?: tailwind_merge.ClassNameValue;
21
+ error?: tailwind_merge.ClassNameValue;
22
22
  };
23
23
  };
24
24
  } | {}, {
@@ -32,9 +32,9 @@ declare const TextFieldStyles: tailwind_variants.TVReturnType<{
32
32
  [key: string]: tailwind_merge.ClassNameValue | {
33
33
  input?: tailwind_merge.ClassNameValue;
34
34
  label?: tailwind_merge.ClassNameValue;
35
- error?: tailwind_merge.ClassNameValue;
36
35
  description?: tailwind_merge.ClassNameValue;
37
36
  field?: tailwind_merge.ClassNameValue;
37
+ error?: tailwind_merge.ClassNameValue;
38
38
  };
39
39
  };
40
40
  } | {}, {
@@ -4,6 +4,7 @@ import { InputProps } from '../input/types.js';
4
4
  import { LabelProps } from '../label/types.js';
5
5
  import 'tailwind-variants';
6
6
  import '../button/types.js';
7
+ import '../../lib/types.js';
7
8
  import '../button/styles.js';
8
9
  import 'tailwind-merge';
9
10
  import '../input/styles.js';
@@ -4,6 +4,48 @@ import { ContextValue } from 'react-aria-components';
4
4
  import { TooltipProps, TooltipTriggerProps, TooltipBodyProps } from './types.js';
5
5
 
6
6
  declare const TooltipContext: react.Context<ContextValue<TooltipProps, HTMLDivElement>>;
7
+ /**
8
+ * Tooltip - A contextual popup component for providing additional information
9
+ *
10
+ * Displays helpful information when users hover over or focus on an element.
11
+ * Provides accessible tooltip functionality with proper positioning, keyboard
12
+ * navigation, and screen reader support for enhanced user experience.
13
+ *
14
+ * @example
15
+ * // Basic tooltip
16
+ * <Tooltip>
17
+ * <Tooltip.Trigger>
18
+ * <Button>Hover me</Button>
19
+ * </Tooltip.Trigger>
20
+ * <Tooltip.Body>
21
+ * This is helpful information
22
+ * </Tooltip.Body>
23
+ * </Tooltip>
24
+ *
25
+ * @example
26
+ * // Tooltip with custom positioning
27
+ * <Tooltip>
28
+ * <Tooltip.Trigger>
29
+ * <Button>Hover for info</Button>
30
+ * </Tooltip.Trigger>
31
+ * <Tooltip.Body placement="top" offset={10}>
32
+ * Positioned above with custom offset
33
+ * </Tooltip.Body>
34
+ * </Tooltip>
35
+ *
36
+ * @example
37
+ * // Icon with tooltip
38
+ * <Tooltip>
39
+ * <Tooltip.Trigger>
40
+ * <Button variant="icon">
41
+ * <Icon><Info /></Icon>
42
+ * </Button>
43
+ * </Tooltip.Trigger>
44
+ * <Tooltip.Body>
45
+ * Additional context for this action
46
+ * </Tooltip.Body>
47
+ * </Tooltip>
48
+ */
7
49
  declare function Tooltip({ ref, ...props }: TooltipProps): react_jsx_runtime.JSX.Element;
8
50
  declare namespace Tooltip {
9
51
  var displayName: string;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/tooltip/index.tsx"],"names":["props","useContextProps","ref","TooltipContext","d","rest","m","Tooltip","jsx","AriaTooltipTrigger","n","g","children","u","TooltipTrigger","className","placement","c","y","f","offset","TooltipBody"],"mappings":"6TAiC0B,WAAc,CAAiB,CACvD,CAACA,GAAU,CAAA,CAAIC,CAA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AAA","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 { createContext } from 'react';\nimport 'client-only';\nimport { containsExactChildren } from '@/lib/react';\nimport {\n Tooltip as AriaTooltip,\n TooltipTrigger as AriaTooltipTrigger,\n type ContextValue,\n Focusable,\n composeRenderProps,\n useContextProps,\n} from 'react-aria-components';\nimport { TooltipStyles } from './styles';\nimport type {\n TooltipBodyProps,\n TooltipProps,\n TooltipTriggerProps,\n} from './types';\n\nexport const TooltipContext =\n createContext<ContextValue<TooltipProps, HTMLDivElement>>(null);\n\nexport function Tooltip({ ref, ...props }: TooltipProps) {\n [props, ref] = useContextProps(props, ref ?? null, TooltipContext);\n\n const { children, ...rest } = props;\n\n containsExactChildren({\n children,\n componentName: Tooltip.displayName,\n restrictions: [\n [TooltipTrigger, { min: 1, max: 1 }],\n [TooltipBody, { min: 1, max: 1 }],\n ],\n });\n\n return <AriaTooltipTrigger {...rest}>{children}</AriaTooltipTrigger>;\n}\nTooltip.displayName = 'Tooltip';\n\nfunction TooltipTrigger({ children, ...props }: TooltipTriggerProps) {\n return <Focusable {...props}>{children}</Focusable>;\n}\nTooltipTrigger.displayName = 'Tooltip.Trigger';\n\nfunction TooltipBody({\n children,\n className,\n offset = 5,\n placement = 'bottom',\n ...props\n}: TooltipBodyProps) {\n return (\n <AriaTooltip\n {...props}\n className={composeRenderProps(className, (className) =>\n TooltipStyles({ className }),\n )}\n offset={offset}\n placement={placement}\n >\n {children}\n </AriaTooltip>\n );\n}\nTooltipBody.displayName = 'Tooltip.Body';\n\nTooltip.Trigger = TooltipTrigger;\nTooltip.Body = TooltipBody;\n"]}
1
+ {"version":3,"sources":["../../../src/components/tooltip/index.tsx"],"names":["props","useContextProps","ref","TooltipContext","d","rest","m","Tooltip","jsx","AriaTooltipTrigger","n","g","children","u","TooltipTrigger","className","placement","c","y","f","offset","TooltipBody"],"mappings":"6TA2E0B,WAAc,CAAiB,CACvD,CAACA,GAAU,CAAA,CAAIC,CAAAA,GAAuBC,CAAAA,CAAAA,CAAO,CAAA,CAAA,CAAA,CAAA,CAAMC,CAAc,CAAAC,eAEjE,CAAA,CAAA,CAAA,CAAA,EAAQ,IAAA,CAAA,CAAA,CAAA,CAAA,KAAU,CAAGC,QAErB,CAAA,CAAA,CAAA,GAAsB,CACpB,CAAA,CAAA,CAAA,CAAA,OACAC,qBAAA,CAAA,CAAA,QAAA,CAAA,CAAA,CAAeC,aAAQ,CACvB,CAAA,CAAA,WAAc,CACZ,cAAgC,CAAE,CAAC,EACnC,GAAc,CAAE,CAAA,CAAA,GAAK,CAAG,IAAK,CAAE,CAAC,CAClC,CACF,GAEOC,CAAAA,CAACC,IAAoB,CAAA,CAAGJ,EAAO,CAAA,CAAA,CAAA,CAAAK,GAAA,CAAAC,cAAA,CAAA,CAAAC,GACxC,CACAL,SAAQ,CAAA,CAAA,CAAA,CAAA,CAAc,CAAA,CAAA,+BAEc,CAAA,CAAA,CAAGP,QACrC,CAAA,CAAA,CAAOQ,IAAC,CAAW,CAAA,CAAA,OAAWE,GAAA,CAAAG,SAAA,CAAA,CAAAD,GAChC,CACAE,SAAe,CAAA,CAAA,CAAA,CAAA,CAAc,CAAA,CAAA,WAAA,CAAA,2BAI3B,CAAA,CAAA,CAAA,QAAAC,CACA,CAAA,CAAA,SACA,CAAA,CAAA,CAAA,MAAA,CAAAC,EAAY,CAAA,CAAA,SACZ,CAAGhB,CACL,CAAA,QACE,CACEQ,IAAC,CACE,CAAA,CAAA,OACDE,GAAA,CAAAO,OAAA,CAAA,CAAA,GAA8BF,EAAYA,SACxB,CAAAG,kBAAA,CAAA,CAAA,CAAA,CAAA,EAAUC,aAAC,CAC7B,UACQC,CACR,WAAWJ,CAEV,CAAA,CAAA,SACH,CAEJ,CACAK,SAAY,CAAA,CAAA,CAAA,CAAA,CAAc,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 { createContext } from 'react';\nimport 'client-only';\nimport { containsExactChildren } from '@/lib/react';\nimport {\n Tooltip as AriaTooltip,\n TooltipTrigger as AriaTooltipTrigger,\n type ContextValue,\n Focusable,\n composeRenderProps,\n useContextProps,\n} from 'react-aria-components';\nimport { TooltipStyles } from './styles';\nimport type {\n TooltipBodyProps,\n TooltipProps,\n TooltipTriggerProps,\n} from './types';\n\nexport const TooltipContext =\n createContext<ContextValue<TooltipProps, HTMLDivElement>>(null);\n\n/**\n * Tooltip - A contextual popup component for providing additional information\n *\n * Displays helpful information when users hover over or focus on an element.\n * Provides accessible tooltip functionality with proper positioning, keyboard\n * navigation, and screen reader support for enhanced user experience.\n *\n * @example\n * // Basic tooltip\n * <Tooltip>\n * <Tooltip.Trigger>\n * <Button>Hover me</Button>\n * </Tooltip.Trigger>\n * <Tooltip.Body>\n * This is helpful information\n * </Tooltip.Body>\n * </Tooltip>\n *\n * @example\n * // Tooltip with custom positioning\n * <Tooltip>\n * <Tooltip.Trigger>\n * <Button>Hover for info</Button>\n * </Tooltip.Trigger>\n * <Tooltip.Body placement=\"top\" offset={10}>\n * Positioned above with custom offset\n * </Tooltip.Body>\n * </Tooltip>\n *\n * @example\n * // Icon with tooltip\n * <Tooltip>\n * <Tooltip.Trigger>\n * <Button variant=\"icon\">\n * <Icon><Info /></Icon>\n * </Button>\n * </Tooltip.Trigger>\n * <Tooltip.Body>\n * Additional context for this action\n * </Tooltip.Body>\n * </Tooltip>\n */\nexport function Tooltip({ ref, ...props }: TooltipProps) {\n [props, ref] = useContextProps(props, ref ?? null, TooltipContext);\n\n const { children, ...rest } = props;\n\n containsExactChildren({\n children,\n componentName: Tooltip.displayName,\n restrictions: [\n [TooltipTrigger, { min: 1, max: 1 }],\n [TooltipBody, { min: 1, max: 1 }],\n ],\n });\n\n return <AriaTooltipTrigger {...rest}>{children}</AriaTooltipTrigger>;\n}\nTooltip.displayName = 'Tooltip';\n\nfunction TooltipTrigger({ children, ...props }: TooltipTriggerProps) {\n return <Focusable {...props}>{children}</Focusable>;\n}\nTooltipTrigger.displayName = 'Tooltip.Trigger';\n\nfunction TooltipBody({\n children,\n className,\n offset = 5,\n placement = 'bottom',\n ...props\n}: TooltipBodyProps) {\n return (\n <AriaTooltip\n {...props}\n className={composeRenderProps(className, (className) =>\n TooltipStyles({ className }),\n )}\n offset={offset}\n placement={placement}\n >\n {children}\n </AriaTooltip>\n );\n}\nTooltipBody.displayName = 'Tooltip.Body';\n\nTooltip.Trigger = TooltipTrigger;\nTooltip.Body = TooltipBody;\n"]}
@@ -0,0 +1,9 @@
1
+ declare const ViewStackEventNamespace = "ViewStack";
2
+ declare const ViewStackEventTypes: {
3
+ readonly back: "ViewStack:back";
4
+ readonly clear: "ViewStack:clear";
5
+ readonly reset: "ViewStack:reset";
6
+ readonly push: "ViewStack:push";
7
+ };
8
+
9
+ export { ViewStackEventNamespace, ViewStackEventTypes };
@@ -0,0 +1,2 @@
1
+ const e="ViewStack",t={back:`${e}:back`,clear:`${e}:clear`,reset:`${e}:reset`,push:`${e}:push`};export{e as ViewStackEventNamespace,t as ViewStackEventTypes};//# sourceMappingURL=events.js.map
2
+ //# sourceMappingURL=events.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/view-stack/events.ts"],"names":["ViewStackEventNamespace","ViewStackEventTypes"],"mappings":"AAYO,MAAMA,EAA0B,WAAA,CAE1BC,CAAAA,CAAsB,CACjC,IAAA,CAAM,CAAA,EAAGD,CAAuB,CAAA,KAAA,CAAA,CAChC,KAAA,CAAO,GAAGA,CAAuB,CAAA,MAAA,CAAA,CACjC,MAAO,CAAA,EAAGA,CAAuB,SACjC,IAAA,CAAM,CAAA,EAAGA,CAAuB,CAAA,KAAA,CAClC","file":"events.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\nexport const ViewStackEventNamespace = 'ViewStack';\n\nexport const ViewStackEventTypes = {\n back: `${ViewStackEventNamespace}:back`,\n clear: `${ViewStackEventNamespace}:clear`,\n reset: `${ViewStackEventNamespace}:reset`,\n push: `${ViewStackEventNamespace}:push`,\n} as const;\n"]}
@@ -1,14 +1,17 @@
1
- import * as react from 'react';
2
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
- import { ViewStackProps, ViewStackViewProps, ViewStackTriggerProps } from './types.js';
4
- import '@accelint/core';
2
+ import * as react from 'react';
3
+ import { UniqueId } from '@accelint/core';
4
+ import { ViewStackProps, ViewStackViewProps, ViewStackTriggerProps, ViewStackContextValue } from './types.js';
5
+ import '@accelint/bus';
5
6
  import 'react-aria-components';
7
+ import './events.js';
6
8
 
7
- declare const ViewStackEventTypes: {
8
- readonly back: "ViewStack:back";
9
- readonly clear: "ViewStack:clear";
10
- readonly reset: "ViewStack:reset";
11
- readonly push: "ViewStack:push";
9
+ declare const ViewStackContext: react.Context<ViewStackContextValue>;
10
+ declare const ViewStackEventHandlers: {
11
+ readonly back: (stack: UniqueId) => void;
12
+ readonly clear: (stack: UniqueId) => void;
13
+ readonly push: (view: UniqueId) => void;
14
+ readonly reset: (stack: UniqueId) => void;
12
15
  };
13
16
  declare function ViewStackTrigger({ children, for: types }: ViewStackTriggerProps): react_jsx_runtime.JSX.Element;
14
17
  declare namespace ViewStackTrigger {
@@ -18,11 +21,11 @@ declare function ViewStackView({ id, children }: ViewStackViewProps): react.Reac
18
21
  declare namespace ViewStackView {
19
22
  var displayName: string;
20
23
  }
21
- declare function ViewStack({ id, children, defaultView }: ViewStackProps): react_jsx_runtime.JSX.Element;
24
+ declare function ViewStack({ id, children, defaultView, onChange, }: ViewStackProps): react_jsx_runtime.JSX.Element;
22
25
  declare namespace ViewStack {
23
26
  var displayName: string;
24
27
  var View: typeof ViewStackView;
25
28
  var Trigger: typeof ViewStackTrigger;
26
29
  }
27
30
 
28
- export { ViewStack, ViewStackEventTypes };
31
+ export { ViewStack, ViewStackContext, ViewStackEventHandlers };
@@ -1,2 +1,2 @@
1
- import {jsx}from'react/jsx-runtime';import'client-only';import {Broadcast}from'@accelint/bus';import {isUUID}from'@accelint/core';import {PressResponder}from'@react-aria/interactions';import {createContext,useRef,useState,useCallback,useEffect,useContext}from'react';import {Pressable}from'react-aria-components';const r=Broadcast.getInstance(),w="ViewStack",v=createContext({parent:null,stack:[],view:null,register:()=>{},unregister:()=>{}}),i={back:`${w}:back`,clear:`${w}:clear`,reset:`${w}:reset`,push:`${w}:push`};function y({children:e,for:c}){const{parent:t}=useContext(v);function o(){for(const n of Array.isArray(c)?c:[c])if(isUUID(n))r.emit(i.push,{view:n});else {const[s,p]=n.split(":"),k=p??t;k&&r.emit(`${w}:${s}`,{stack:k});}}return jsx(PressResponder,{onPress:o,children:jsx(Pressable,{children:e})})}y.displayName="ViewStack.Trigger";function E({id:e,children:c}){const{parent:t,view:o,register:n,unregister:s}=useContext(v);if(!t)throw new Error("ViewStack.View must be implemented within a ViewStack");if(!isUUID(e))throw new Error("ViewStack.View's id must be a UniqueId");return useEffect(()=>{n(e);},[n,s,e]),o===e?c:null}E.displayName="ViewStack.View";function m({id:e,children:c,defaultView:t}){if(!isUUID(e))throw new Error("ViewStack's id must be a UniqueId");const o=useRef(new Set),[n,s]=useState(t?[t]:[]),p=n.at(-1)??null,k=useCallback(a=>{e===a?.payload?.stack&&s(u=>u.length<=1?t?[t]:[]:u.slice(0,-1));},[e,t]),S=useCallback(a=>{e===a?.payload?.stack&&s(()=>[]);},[e]),V=useCallback(a=>{e===a?.payload?.stack&&s(()=>t?[t]:[]);},[e,t]),f=useCallback(a=>{o.current.has(a?.payload?.view)&&s(u=>[...u,a?.payload?.view]);},[]);return useEffect(()=>(r.on(i.back,k),r.on(i.clear,S),r.on(i.reset,V),r.on(i.push,f),()=>{r.off(i.back,k),r.off(i.clear,S),r.off(i.reset,V),r.off(i.push,f);}),[k,S,V,f]),jsx(v.Provider,{value:{parent:e,stack:n,view:p,register:a=>o.current.add(a),unregister:a=>o.current.delete(a)},children:c})}m.displayName="ViewStack",m.View=E,m.Trigger=y;export{m as ViewStack,i as ViewStackEventTypes};//# sourceMappingURL=index.js.map
1
+ import {jsx}from'react/jsx-runtime';import'client-only';import {Broadcast}from'@accelint/bus';import {isUUID}from'@accelint/core';import {createContext,useRef,useState,useCallback,useEffect,useContext}from'react';import {Pressable}from'react-aria-components';import {ViewStackEventTypes}from'./events.js';const u=Broadcast.getInstance(),p=createContext({parent:null,stack:[],view:null,register:()=>{},unregister:()=>{}}),T={back:e=>u.emit(ViewStackEventTypes.back,{stack:e}),clear:e=>u.emit(ViewStackEventTypes.clear,{stack:e}),push:e=>u.emit(ViewStackEventTypes.push,{view:e}),reset:e=>u.emit(ViewStackEventTypes.reset,{stack:e})};function P({children:e,for:k}){const{parent:r}=useContext(p);function i(){for(const n of Array.isArray(k)?k:[k]){let[s,a]=isUUID(n)?["push",n]:n.split(":");a??=r,a&&T[s](a);}}return jsx(Pressable,{onPress:i,children:e})}P.displayName="ViewStack.Trigger";function y({id:e,children:k}){const{parent:r,view:i,register:n,unregister:s}=useContext(p);if(!r)throw new Error("ViewStack.View must be implemented within a ViewStack");if(!isUUID(e))throw new Error("ViewStack.View's id must be a UniqueId");return useEffect(()=>{n(e);},[n,s,e]),i===e?k:null}y.displayName="ViewStack.View";function S({id:e,children:k,defaultView:r,onChange:i}){if(!isUUID(e))throw new Error("ViewStack's id must be a UniqueId");const n=useRef(new Set),[s,a]=useState(r?[r]:[]),U=s.at(-1)??null,V=useCallback(t=>{if(e===t?.payload?.stack){const c=s.slice(0,-1);!c.length&&r&&c.push(r),a(c),i?.(c.at(-1)??null);}},[e,r,i,s]),f=useCallback(t=>{e===t?.payload?.stack&&(a([]),i?.(null));},[e,i]),m=useCallback(t=>{n.current.has(t?.payload?.view)&&(a(c=>[...c,t?.payload?.view]),i?.(t?.payload?.view));},[i]),v=useCallback(t=>{e===t?.payload?.stack&&(a(r?[r]:[]),i?.(r??null));},[e,r,i]);return useEffect(()=>{const t=[u.on(ViewStackEventTypes.back,V),u.on(ViewStackEventTypes.clear,f),u.on(ViewStackEventTypes.push,m),u.on(ViewStackEventTypes.reset,v)];return ()=>{for(const c of t)c();}},[V,f,m,v]),jsx(p.Provider,{value:{parent:e,stack:s,view:U,register:t=>n.current.add(t),unregister:t=>n.current.delete(t)},children:k})}S.displayName="ViewStack",S.View=y,S.Trigger=P;export{S as ViewStack,p as ViewStackContext,T as ViewStackEventHandlers};//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/view-stack/index.tsx"],"names":["bus","Broadcast","ViewStackEventNamespace","ViewStackContext","createContext","ViewStackEventTypes","ViewStackTrigger","children","types","parent","useContext","handlePress","type","isUUID","event","target","stack","jsx","PressResponder","Pressable","ViewStackView","id","view","register","unregister","useEffect","ViewStack","defaultView","views","useRef","setStack","useState","handleBack","useCallback","data","prev","handleClear","handleReset","handlePush"],"mappings":"yTAqCA,MAAMA,CAAAA,CAAMC,SAAAA,CAAU,WAAA,EAAY,CAC5BC,CAAAA,CAA0B,WAAA,CAC1BC,CAAAA,CAAmBC,cAAqC,CAC5D,MAAA,CAAQ,IAAA,CACR,KAAA,CAAO,EAAC,CACR,IAAA,CAAM,IAAA,CACN,QAAA,CAAU,IAAG,CAAA,CAAA,CACb,UAAA,CAAY,IAAG,CAAA,CACjB,CAAC,CAAA,CAEYC,CAAAA,CAAsB,CACjC,IAAA,CAAM,CAAA,EAAGH,CAAuB,QAChC,KAAA,CAAO,CAAA,EAAGA,CAAuB,CAAA,MAAA,CAAA,CACjC,KAAA,CAAO,CAAA,EAAGA,CAAuB,CAAA,MAAA,CAAA,CACjC,IAAA,CAAM,CAAA,EAAGA,CAAuB,CAAA,KAAA,CAClC,EAEA,SAASI,CAAAA,CAAiB,CAAE,QAAA,CAAAC,CAAAA,CAAU,GAAA,CAAKC,CAAM,CAAA,CAA0B,CACzE,KAAM,CAAE,MAAA,CAAAC,CAAO,CAAA,CAAIC,UAAAA,CAAWP,CAAgB,CAAA,CAE9C,SAASQ,CAAAA,EAAc,CACrB,IAAA,MAAWC,CAAAA,IAAQ,KAAA,CAAM,QAAQJ,CAAK,CAAA,CAAIA,CAAAA,CAAQ,CAACA,CAAK,CAAA,CACtD,GAAIK,MAAAA,CAAOD,CAAI,CAAA,CACbZ,CAAAA,CAAI,IAAA,CAAyBK,CAAAA,CAAoB,IAAA,CAAM,CACrD,IAAA,CAAMO,CACR,CAAC,CAAA,CAAA,KACI,CACL,KAAM,CAACE,CAAAA,CAAOC,CAAM,CAAA,CAAIH,CAAAA,CAAK,KAAA,CAAM,GAAG,EAIhCI,CAAAA,CAAQD,CAAA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AAA,CAAGK,CAAAA,CAAoB,IAAA,CAAM2B,CAAU,CAAA,CAC3ChC,CAAAA,CAAI,EAAA,CAAGK,EAAoB,KAAA,CAAO+B,CAAW,CAAA,CAC7CpC,CAAAA,CAAI,EAAA,CAAGK,CAAAA,CAAoB,KAAA,CAAOgC,CAAW,CAAA,CAC7CrC,CAAAA,CAAI,EAAA,CAAGK,CAAAA,CAAoB,IAAA,CAAMiC,CAAU,EAEpC,IAAM,CACXtC,CAAAA,CAAI,GAAA,CAAIK,CAAAA,CAAoB,IAAA,CAAM2B,CAAU,CAAA,CAC5ChC,CAAAA,CAAI,GAAA,CAAIK,CAAAA,CAAoB,KAAA,CAAO+B,CAAW,CAAA,CAC9CpC,EAAI,GAAA,CAAIK,CAAAA,CAAoB,KAAA,CAAOgC,CAAW,CAAA,CAC9CrC,CAAAA,CAAI,GAAA,CAAIK,CAAAA,CAAoB,IAAA,CAAMiC,CAAU,EAC9C,CAAA,CAAA,CACC,CAACN,CAAAA,CAAYI,EAAaC,CAAAA,CAAaC,CAAU,CAAC,CAAA,CAGnDrB,GAAAA,CAACd,CAAAA,CAAiB,QAAA,CAAjB,CACC,KAAA,CAAO,CACL,MAAA,CAAQkB,CAAAA,CACR,KAAA,CAAAL,CAAAA,CACA,KAAAM,CAAAA,CACA,QAAA,CAAWA,CAAAA,EAAmBM,CAAAA,CAAM,OAAA,CAAQ,GAAA,CAAIN,CAAI,CAAA,CACpD,UAAA,CAAaA,CAAAA,EAAmBM,CAAAA,CAAM,OAAA,CAAQ,MAAA,CAAON,CAAI,CAC3D,CAAA,CAEC,QAAA,CAAAf,CAAAA,CACH,CAEJ,CACAmB,CAAAA,CAAU,WAAA,CAAc,WAAA,CACxBA,CAAAA,CAAU,IAAA,CAAON,CAAAA,CACjBM,CAAAA,CAAU,OAAA,CAAUpB,CAAAA","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n'use client';\n\nimport 'client-only';\nimport { Broadcast, type Payload } from '@accelint/bus';\nimport { type UniqueId, isUUID } from '@accelint/core';\nimport { PressResponder } from '@react-aria/interactions';\nimport {\n createContext,\n useCallback,\n useContext,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport { Pressable } from 'react-aria-components';\nimport type {\n ViewStackBackEvent,\n ViewStackClearEvent,\n ViewStackContextValue,\n ViewStackProps,\n ViewStackPushEvent,\n ViewStackResetEvent,\n ViewStackTriggerProps,\n ViewStackViewProps,\n} from './types';\n\nconst bus = Broadcast.getInstance();\nconst ViewStackEventNamespace = 'ViewStack';\nconst ViewStackContext = createContext<ViewStackContextValue>({\n parent: null,\n stack: [],\n view: null,\n register: () => undefined,\n unregister: () => undefined,\n});\n\nexport const ViewStackEventTypes = {\n back: `${ViewStackEventNamespace}:back`,\n clear: `${ViewStackEventNamespace}:clear`,\n reset: `${ViewStackEventNamespace}:reset`,\n push: `${ViewStackEventNamespace}:push`,\n} as const;\n\nfunction ViewStackTrigger({ children, for: types }: ViewStackTriggerProps) {\n const { parent } = useContext(ViewStackContext);\n\n function handlePress() {\n for (const type of Array.isArray(types) ? types : [types]) {\n if (isUUID(type)) {\n bus.emit<ViewStackPushEvent>(ViewStackEventTypes.push, {\n view: type,\n });\n } else {\n const [event, target] = type.split(':') as [\n 'back' | 'clear' | 'reset',\n UniqueId | undefined,\n ];\n const stack = target ?? parent;\n\n if (stack) {\n bus.emit<\n ViewStackBackEvent | ViewStackClearEvent | ViewStackResetEvent\n >(`${ViewStackEventNamespace}:${event}`, {\n stack,\n });\n }\n }\n }\n }\n\n return (\n <PressResponder onPress={handlePress}>\n <Pressable>{children}</Pressable>\n </PressResponder>\n );\n}\nViewStackTrigger.displayName = 'ViewStack.Trigger';\n\nfunction ViewStackView({ id, children }: ViewStackViewProps) {\n const { parent, view, register, unregister } = useContext(ViewStackContext);\n\n if (!parent) {\n throw new Error('ViewStack.View must be implemented within a ViewStack');\n }\n\n if (!isUUID(id)) {\n throw new Error(`ViewStack.View's id must be a UniqueId`);\n }\n\n useEffect(() => {\n register(id);\n\n () => unregister(id);\n }, [register, unregister, id]);\n\n return view === id ? children : null;\n}\nViewStackView.displayName = 'ViewStack.View';\n\nexport function ViewStack({ id, children, defaultView }: ViewStackProps) {\n if (!isUUID(id)) {\n throw new Error(`ViewStack's id must be a UniqueId`);\n }\n\n const views = useRef(new Set<UniqueId>());\n const [stack, setStack] = useState<UniqueId[]>(\n defaultView ? [defaultView] : [],\n );\n const view = stack.at(-1) ?? null;\n\n const handleBack = useCallback(\n (data: Payload<ViewStackBackEvent>) => {\n if (id === data?.payload?.stack) {\n setStack((prev) => {\n if (prev.length <= 1) {\n return defaultView ? [defaultView] : [];\n }\n\n return prev.slice(0, -1);\n });\n }\n },\n [id, defaultView],\n );\n\n const handleClear = useCallback(\n (data: Payload<ViewStackClearEvent>) => {\n if (id === data?.payload?.stack) {\n setStack(() => []);\n }\n },\n [id],\n );\n\n const handleReset = useCallback(\n (data: Payload<ViewStackResetEvent>) => {\n if (id === data?.payload?.stack) {\n setStack(() => (defaultView ? [defaultView] : []));\n }\n },\n [id, defaultView],\n );\n\n const handlePush = useCallback((data: Payload<ViewStackPushEvent>) => {\n if (views.current.has(data?.payload?.view)) {\n setStack((prev) => [...prev, data?.payload?.view]);\n }\n }, []);\n\n useEffect(() => {\n bus.on(ViewStackEventTypes.back, handleBack);\n bus.on(ViewStackEventTypes.clear, handleClear);\n bus.on(ViewStackEventTypes.reset, handleReset);\n bus.on(ViewStackEventTypes.push, handlePush);\n\n return () => {\n bus.off(ViewStackEventTypes.back, handleBack);\n bus.off(ViewStackEventTypes.clear, handleClear);\n bus.off(ViewStackEventTypes.reset, handleReset);\n bus.off(ViewStackEventTypes.push, handlePush);\n };\n }, [handleBack, handleClear, handleReset, handlePush]);\n\n return (\n <ViewStackContext.Provider\n value={{\n parent: id,\n stack,\n view,\n register: (view: UniqueId) => views.current.add(view),\n unregister: (view: UniqueId) => views.current.delete(view),\n }}\n >\n {children}\n </ViewStackContext.Provider>\n );\n}\nViewStack.displayName = 'ViewStack';\nViewStack.View = ViewStackView;\nViewStack.Trigger = ViewStackTrigger;\n"]}
1
+ {"version":3,"sources":["../../../src/components/view-stack/index.tsx"],"names":["Broadcast","h","ViewStackContext","createContext","q","ViewStackEventHandlers","bus","o","types","useContext","d","type","event","isUUID","l","id","parent","I","x","ViewStackTrigger","E","register","unregister","view","b","stack","setStack","useState","defaultView","g","useCallback","data","next","onChange","handleClear","handlePush","views","prev","handleReset","ViewStackEventTypes","off","listeners","handleBack","jsx","ViewStack"],"mappings":"iTAsCYA,MAAU,CAAA,CAAAC,SAAA,CAAA,WAETC,EAAmBC,CAAqC,CACnE,CAAAC,aAAA,CAAA,CAAA,MAAQ,CAAA,IACR,CAAA,KACA,CAAA,EAAA,CAAA,IAAM,CAAA,IACN,CAAA,QAAU,CAAG,IACb,CAAA,CAAA,CAAA,UAAY,CAAG,IAChB,CAEYC,CAAAA,CAAyB,CACpC,CAAA,CAAA,CAAA,CAAA,IAA2BC,CAAAA,CAAI,EAAA,CAAA,CAAA,IAAyB,CAAAC,mBAAA,CAAA,IAAQ,CAAA,CAAA,KAAO,CACvE,CAAA,CAAA,CAAA,CAAA,KAA4BD,CAAAA,CAAI,EAAA,CAAA,CAAA,IAAyB,CAAAC,mBAAA,CAAA,KAAS,CAAA,CAAA,KAAO,CACzE,CAAA,CAAA,CAAA,CAAA,IAA0BD,CAAAA,CAAI,EAAA,CAAA,CAAA,IAAyB,CAAAC,mBAAA,CAAA,IAAQ,CAAA,CAAA,KAC/D,CAAA,CAAA,CAAA,CAAA,KAA4BD,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GnDK,CAAAA,CAACzC,CAAAA,CAAiBe,GAAA,CAAA,CAAA,CAAA,QAChB,CAAA,CAAA,KACE,CAAA,CAAA,MACA,CAAA,CAAA,CAAA,KACA,CAAA,CAAA,CAAA,IACA,CAAA,CAAA,CAAA,QAA8BmB,CAAAA,CAAM,EAAA,CAAA,CAAA,OAAQ,CAAIb,GAChD,CAAA,CAAA,CAAA,CAAA,UAAgCa,CAAAA,CAAM,EAAA,CAAA,CAAA,OAAQ,CAAA,MAChD,CAEC,CAAA,CAAA,CAAA,CAAA,QAGP,CACAQ,CAAAA,CAAU,CAAA,CAAA,CAAA,CAAA,WAAc,CAAA,WACd,CAAA,CAAA,CAAA,IACVA,CAAU,CAAA,CAAA,CAAA,CAAA,OAAUzB,CAAAA,CAAAA","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n'use client';\n\nimport 'client-only';\nimport { Broadcast } from '@accelint/bus';\nimport { type UniqueId, isUUID } from '@accelint/core';\nimport {\n createContext,\n useCallback,\n useContext,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport { Pressable } from 'react-aria-components';\nimport { ViewStackEventTypes } from './events';\nimport type {\n ViewStackBackEvent,\n ViewStackClearEvent,\n ViewStackContextValue,\n ViewStackEvent,\n ViewStackProps,\n ViewStackPushEvent,\n ViewStackResetEvent,\n ViewStackTriggerProps,\n ViewStackViewProps,\n} from './types';\n\nconst bus = Broadcast.getInstance<ViewStackEvent>();\n\nexport const ViewStackContext = createContext<ViewStackContextValue>({\n parent: null,\n stack: [],\n view: null,\n register: () => undefined,\n unregister: () => undefined,\n});\n\nexport const ViewStackEventHandlers = {\n back: (stack: UniqueId) => bus.emit(ViewStackEventTypes.back, { stack }),\n clear: (stack: UniqueId) => bus.emit(ViewStackEventTypes.clear, { stack }),\n push: (view: UniqueId) => bus.emit(ViewStackEventTypes.push, { view }),\n reset: (stack: UniqueId) => bus.emit(ViewStackEventTypes.reset, { stack }),\n} as const;\n\nfunction ViewStackTrigger({ children, for: types }: ViewStackTriggerProps) {\n const { parent } = useContext(ViewStackContext);\n\n function handlePress() {\n for (const type of Array.isArray(types) ? types : [types]) {\n let [event, id] = (isUUID(type) ? ['push', type] : type.split(':')) as [\n 'back' | 'clear' | 'reset' | 'push',\n UniqueId | undefined | null,\n ];\n\n id ??= parent;\n\n if (!id) {\n continue;\n }\n\n ViewStackEventHandlers[event](id);\n }\n }\n\n return <Pressable onPress={handlePress}>{children}</Pressable>;\n}\nViewStackTrigger.displayName = 'ViewStack.Trigger';\n\nfunction ViewStackView({ id, children }: ViewStackViewProps) {\n const { parent, view, register, unregister } = useContext(ViewStackContext);\n\n if (!parent) {\n throw new Error('ViewStack.View must be implemented within a ViewStack');\n }\n\n if (!isUUID(id)) {\n throw new Error(`ViewStack.View's id must be a UniqueId`);\n }\n\n useEffect(() => {\n register(id);\n\n () => unregister(id);\n }, [register, unregister, id]);\n\n return view === id ? children : null;\n}\nViewStackView.displayName = 'ViewStack.View';\n\nexport function ViewStack({\n id,\n children,\n defaultView,\n onChange,\n}: ViewStackProps) {\n if (!isUUID(id)) {\n throw new Error(`ViewStack's id must be a UniqueId`);\n }\n\n const views = useRef(new Set<UniqueId>());\n const [stack, setStack] = useState<UniqueId[]>(\n defaultView ? [defaultView] : [],\n );\n const view = stack.at(-1) ?? null;\n\n const handleBack = useCallback(\n (data: ViewStackBackEvent) => {\n if (id === data?.payload?.stack) {\n const next = stack.slice(0, -1);\n\n if (!next.length && defaultView) {\n next.push(defaultView);\n }\n\n setStack(next);\n onChange?.(next.at(-1) ?? null);\n }\n },\n [id, defaultView, onChange, stack],\n );\n\n const handleClear = useCallback(\n (data: ViewStackClearEvent) => {\n if (id === data?.payload?.stack) {\n setStack([]);\n onChange?.(null);\n }\n },\n [id, onChange],\n );\n\n const handlePush = useCallback(\n (data: ViewStackPushEvent) => {\n if (views.current.has(data?.payload?.view)) {\n setStack((prev) => [...prev, data?.payload?.view]);\n onChange?.(data?.payload?.view);\n }\n },\n [onChange],\n );\n\n const handleReset = useCallback(\n (data: ViewStackResetEvent) => {\n if (id === data?.payload?.stack) {\n setStack(defaultView ? [defaultView] : []);\n onChange?.(defaultView ?? null);\n }\n },\n [id, defaultView, onChange],\n );\n\n useEffect(() => {\n const listeners = [\n bus.on(ViewStackEventTypes.back, handleBack),\n bus.on(ViewStackEventTypes.clear, handleClear),\n bus.on(ViewStackEventTypes.push, handlePush),\n bus.on(ViewStackEventTypes.reset, handleReset),\n ];\n\n return () => {\n for (const off of listeners) {\n off();\n }\n };\n }, [handleBack, handleClear, handlePush, handleReset]);\n\n return (\n <ViewStackContext.Provider\n value={{\n parent: id,\n stack,\n view,\n register: (view: UniqueId) => views.current.add(view),\n unregister: (view: UniqueId) => views.current.delete(view),\n }}\n >\n {children}\n </ViewStackContext.Provider>\n );\n}\nViewStack.displayName = 'ViewStack';\nViewStack.View = ViewStackView;\nViewStack.Trigger = ViewStackTrigger;\n"]}
@@ -1,26 +1,30 @@
1
+ import { Payload } from '@accelint/bus';
1
2
  import { UniqueId } from '@accelint/core';
2
3
  import { RefAttributes, PropsWithChildren, ComponentProps } from 'react';
3
4
  import { Pressable } from 'react-aria-components';
5
+ import { ViewStackEventTypes } from './events.js';
4
6
 
5
7
  type ViewStackProps = RefAttributes<HTMLDivElement> & PropsWithChildren<{
6
8
  id: UniqueId;
7
9
  defaultView?: UniqueId;
10
+ onChange?: (view: UniqueId | null) => void;
8
11
  }>;
9
12
  type ViewStackViewProps = RefAttributes<HTMLDivElement> & PropsWithChildren<{
10
13
  id: UniqueId;
11
14
  }>;
12
- type ViewStackBackEvent = {
15
+ type ViewStackBackEvent = Payload<typeof ViewStackEventTypes.back, {
13
16
  stack: UniqueId;
14
- };
15
- type ViewStackClearEvent = {
17
+ }>;
18
+ type ViewStackClearEvent = Payload<typeof ViewStackEventTypes.clear, {
16
19
  stack: UniqueId;
17
- };
18
- type ViewStackResetEvent = {
20
+ }>;
21
+ type ViewStackResetEvent = Payload<typeof ViewStackEventTypes.reset, {
19
22
  stack: UniqueId;
20
- };
21
- type ViewStackPushEvent = {
23
+ }>;
24
+ type ViewStackPushEvent = Payload<typeof ViewStackEventTypes.push, {
22
25
  view: UniqueId;
23
- };
26
+ }>;
27
+ type ViewStackEvent = ViewStackBackEvent | ViewStackClearEvent | ViewStackResetEvent | ViewStackPushEvent;
24
28
  type SimpleEvents = 'back' | 'clear' | 'reset' | UniqueId;
25
29
  type TargetedEvents = `back:${UniqueId}` | `clear:${UniqueId}` | `reset:${UniqueId}`;
26
30
  type ChainedEvents = (SimpleEvents | TargetedEvents)[];
@@ -55,4 +59,4 @@ type ViewStackContextValue = {
55
59
  unregister: (view: UniqueId) => void;
56
60
  };
57
61
 
58
- export type { ViewStackBackEvent, ViewStackClearEvent, ViewStackContextValue, ViewStackProps, ViewStackPushEvent, ViewStackResetEvent, ViewStackTriggerProps, ViewStackViewProps };
62
+ export type { ViewStackBackEvent, ViewStackClearEvent, ViewStackContextValue, ViewStackEvent, ViewStackProps, ViewStackPushEvent, ViewStackResetEvent, ViewStackTriggerProps, ViewStackViewProps };
package/dist/index.d.ts CHANGED
@@ -7,7 +7,6 @@ export { AvatarProps } from './components/avatar/types.js';
7
7
  export { Badge, BadgeContext } from './components/badge/index.js';
8
8
  export { BadgeStyles, BadgeStylesDefaults } from './components/badge/styles.js';
9
9
  export { BadgeProps } from './components/badge/types.js';
10
- export { Box, BoxProps } from './components/box/index.js';
11
10
  export { Button, ButtonContext, LinkButton, LinkButtonContext, ToggleButton, ToggleButtonContext } from './components/button/index.js';
12
11
  export { ButtonStyles, ButtonStylesDefaults, LinkButtonStyles, ToggleButtonStyles } from './components/button/styles.js';
13
12
  export { ButtonProps, ButtonStyleVariants, LinkButtonProps, ToggleButtonProps } from './components/button/types.js';
@@ -35,16 +34,15 @@ export { DateFieldProps, DateInputProps } from './components/date-field/types.js
35
34
  export { DetailsList, DetailsListContext } from './components/details-list/index.js';
36
35
  export { DetailsListStyles, DetailsListStylesDefaults } from './components/details-list/styles.js';
37
36
  export { DetailsListLabelProps, DetailsListProps, DetailsListValueProps } from './components/details-list/types.js';
38
- export { Dialog, DialogProps, DialogTitle } from './components/dialog/index.js';
39
- export { useDrawerContext, useDrawersContext, useDrawersState } from './components/drawer/context.js';
40
- export { Drawer } from './components/drawer/index.js';
41
- export { DrawerAction, createDefaultDrawerState, drawerStateReducer } from './components/drawer/state.js';
42
- export { DrawerMenuStyles, DrawerStyles } from './components/drawer/styles.js';
43
- export { DrawerContainerProps, DrawerContextValue, DrawerDefaults, DrawerLayoutProps, DrawerLayoutPush, DrawerLayouts, DrawerMenuItemProps, DrawerMenuProps, DrawerPanelProps, DrawerPlacement, DrawerProps, DrawerProviderProps, DrawerSize, DrawerState, DrawerTriggerProps, DrawersContextValue, OnOpenChangeCallback } from './components/drawer/types.js';
37
+ export { Dialog, DialogProps } from './components/dialog/index.js';
38
+ export { DrawerEventNamespace, DrawerEventTypes } from './components/drawer/events.js';
39
+ export { Drawer, DrawerContext, DrawerEventHandlers } from './components/drawer/index.js';
40
+ export { DrawerMenuStyles, DrawerMenuStylesDefaults, DrawerStyles, DrawerTitleStyles, DrawerTitleStylesDefaults } from './components/drawer/styles.js';
41
+ export { DrawerContextValue, DrawerEvent, DrawerLayoutProps, DrawerMenuItemProps, DrawerMenuProps, DrawerOpenEvent, DrawerProps, DrawerTitleProps, DrawerToggleEvent, DrawerTriggerProps } from './components/drawer/types.js';
44
42
  export { Hero, HeroContext } from './components/hero/index.js';
45
43
  export { HeroStyles } from './components/hero/styles.js';
46
44
  export { HeroProps } from './components/hero/types.js';
47
- export { Hotkey, HotkeyContext, HotkeySet } from './components/hotkey/index.js';
45
+ export { Hotkey, HotkeyContext } from './components/hotkey/index.js';
48
46
  export { HotkeyStyles, HotkeyStylesDefaults } from './components/hotkey/styles.js';
49
47
  export { HotkeyProps, HotkeySetProps } from './components/hotkey/types.js';
50
48
  export { Icon, IconContext } from './components/icon/index.js';
@@ -57,12 +55,12 @@ export { Label, LabelContext } from './components/label/index.js';
57
55
  export { LabelStyles } from './components/label/styles.js';
58
56
  export { LabelProps } from './components/label/types.js';
59
57
  export { Menu, MenuContext } from './components/menu/index.js';
60
- export { MenuStyleVariants, MenuStyles, MenuStylesDefaults } from './components/menu/styles.js';
61
- export { MenuItemProps, MenuProps, MenuSectionProps, MenuTextProps, MenuTriggerProps, SeparatorProps, SubmenuTriggerProps } from './components/menu/types.js';
58
+ export { MenuStyles, MenuStylesDefaults } from './components/menu/styles.js';
59
+ export { MenuItemProps, MenuProps, MenuSectionProps } from './components/menu/types.js';
62
60
  export { Options, OptionsContext } from './components/options/index.js';
63
61
  export { OptionsStyles } from './components/options/styles.js';
64
62
  export { OptionsDataItem, OptionsItemProps, OptionsItemTextProps, OptionsProps, OptionsSectionProps } from './components/options/types.js';
65
- export { Popover, PopoverTrigger } from './components/popover/index.js';
63
+ export { Popover } from './components/popover/index.js';
66
64
  export { PopoverStyles } from './components/popover/styles.js';
67
65
  export { PopoverBodyProps, PopoverContentProps, PopoverProps, PopoverTitleProps, PopoverTriggerProps } from './components/popover/types.js';
68
66
  export { QueryBuilder } from './components/query-builder/index.js';
@@ -93,10 +91,11 @@ export { TextFieldProps } from './components/text-field/types.js';
93
91
  export { Tooltip, TooltipContext } from './components/tooltip/index.js';
94
92
  export { TooltipStyles } from './components/tooltip/styles.js';
95
93
  export { TooltipBodyProps, TooltipProps, TooltipTriggerProps } from './components/tooltip/types.js';
96
- export { ViewStack, ViewStackEventTypes } from './components/view-stack/index.js';
97
- export { ViewStackBackEvent, ViewStackClearEvent, ViewStackContextValue, ViewStackProps, ViewStackPushEvent, ViewStackResetEvent, ViewStackTriggerProps, ViewStackViewProps } from './components/view-stack/types.js';
94
+ export { ViewStackEventNamespace, ViewStackEventTypes } from './components/view-stack/events.js';
95
+ export { ViewStack, ViewStackContext, ViewStackEventHandlers } from './components/view-stack/index.js';
96
+ export { ViewStackBackEvent, ViewStackClearEvent, ViewStackContextValue, ViewStackEvent, ViewStackProps, ViewStackPushEvent, ViewStackResetEvent, ViewStackTriggerProps, ViewStackViewProps } from './components/view-stack/types.js';
98
97
  export { containsExactChildren, expectsIconWrapper } from './lib/react.js';
99
- export { ChildrenRenderProps, ClassNameRenderProps, ProviderProps, RenderProps, RenderPropsChildren, RenderPropsClassName, RenderPropsStyle, SlottedValue, StylePropRenderProps, StyleRenderProps } from './lib/types.js';
98
+ export { AriaAttributes, AriaAttributesWithRef, ChildrenRenderProps, ClassNameRenderProps, ProviderProps, RenderProps, RenderPropsChildren, RenderPropsClassName, RenderPropsStyle, SlottedValue, StylePropRenderProps, StyleRenderProps } from './lib/types.js';
100
99
  export { cn, isSlottedContextValue, tv, twMerge } from './lib/utils.js';
101
100
  export { RGBAColor, colorAdvisory, colorAdvisoryBold, colorAdvisoryHover, colorAdvisorySubtle, colorClassificationConfidential, colorClassificationCui, colorClassificationMissing, colorClassificationSecret, colorClassificationTopSecret, colorClassificationTsSci, colorClassificationUnclass, colorCritical, colorCriticalBold, colorCriticalHover, colorCriticalSubtle, colorDefaultDark, colorDefaultLight, colorDisabled, colorHighlight, colorHighlightBold, colorHighlightHover, colorHighlightSubtle, colorInfo, colorInfoBold, colorInfoHover, colorInfoSubtle, colorInteractive, colorInteractiveDefault, colorInteractiveDisabled, colorInteractiveHover, colorInteractiveHoverDark, colorInteractiveHoverLight, colorInverseDark, colorInverseLight, colorNormal, colorNormalBold, colorNormalHover, colorNormalSubtle, colorSerious, colorSeriousBold, colorSeriousHover, colorSeriousSubtle, colorStaticDark, colorStaticLight, colorSurfaceDefault, colorSurfaceOverlay, colorSurfaceRaised, colorTransparentDark, colorTransparentLight, fontDisplay, fontPrimary, iconSizeL, iconSizeM, iconSizeS, iconSizeXs, radiusLarge, radiusMedium, radiusNone, radiusRound, radiusSmall, shadowElevationDefault, shadowElevationOverlay, shadowElevationRaised, spacing0, spacingL, spacingM, spacingNone, spacingOversized, spacingS, spacingXl, spacingXs, spacingXxl, spacingXxs, typographyBodyLHeight, typographyBodyLSize, typographyBodyLSpacing, typographyBodyMHeight, typographyBodyMSize, typographyBodyMSpacing, typographyBodySHeight, typographyBodySSize, typographyBodySSpacing, typographyBodyXsHeight, typographyBodyXsSize, typographyBodyXsSpacing, typographyBodyXxsHeight, typographyBodyXxsSize, typographyBodyXxsSpacing, typographyButtonLHeight, typographyButtonLSize, typographyButtonLSpacing, typographyButtonMHeight, typographyButtonMSize, typographyButtonMSpacing, typographyButtonSHeight, typographyButtonSSize, typographyButtonSSpacing, typographyButtonXsHeight, typographyButtonXsSize, typographyButtonXsSpacing, typographyHeaderLHeight, typographyHeaderLSize, typographyHeaderLSpacing, typographyHeaderMHeight, typographyHeaderMSize, typographyHeaderMSpacing, typographyHeaderSHeight, typographyHeaderSSize, typographyHeaderSSpacing, typographyHeaderXlHeight, typographyHeaderXlSize, typographyHeaderXlSpacing, typographyHeaderXsHeight, typographyHeaderXsSize, typographyHeaderXsSpacing, typographyHeaderXxlHeight, typographyHeaderXxlSize, typographyHeaderXxlSpacing } from './tokens/index.js';
102
101
  import 'react/jsx-runtime';
@@ -108,6 +107,8 @@ import '@radix-ui/react-avatar';
108
107
  import '@react-types/overlays';
109
108
  import '@react-types/shared';
110
109
  import '@internationalized/date';
110
+ import '@accelint/core';
111
+ import '@accelint/bus';
111
112
  import './components/query-builder/value-selector.js';
112
113
  import 'react-querybuilder';
113
114
  import './components/query-builder/value-editor.js';
@@ -115,5 +116,4 @@ import './components/query-builder/group.js';
115
116
  import './components/query-builder/rule.js';
116
117
  import './components/query-builder/action-element.js';
117
118
  import 'type-fest';
118
- import '@accelint/core';
119
119
  import 'clsx';
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export{Accordion,AccordionContext}from'./components/accordion/index.js';export{AccordionStyles,AccordionStylesDefaults}from'./components/accordion/styles.js';export{Avatar,AvatarContext}from'./components/avatar/index.js';export{AvatarStyles}from'./components/avatar/styles.js';export{Badge,BadgeContext}from'./components/badge/index.js';export{BadgeStyles,BadgeStylesDefaults}from'./components/badge/styles.js';export{Box}from'./components/box/index.js';export{Button,ButtonContext,LinkButton,LinkButtonContext,ToggleButton,ToggleButtonContext}from'./components/button/index.js';export{ButtonStyles,ButtonStylesDefaults,LinkButtonStyles,ToggleButtonStyles}from'./components/button/styles.js';export{Checkbox,CheckboxContext,CheckboxGroupContext}from'./components/checkbox/index.js';export{CheckboxStyles}from'./components/checkbox/styles.js';export{Chip,ChipContext}from'./components/chip/index.js';export{BaseChipStyles,ChipStyles,ChipStylesDefaults,DeletableChipStyles,SelectableChipStyles}from'./components/chip/styles.js';export{ClassificationBadge,ClassificationBadgeContext}from'./components/classification-badge/index.js';export{ClassificationBadgeStyles,ClassificationBadgeStylesDefaults}from'./components/classification-badge/styles.js';export{ClassificationBanner,ClassificationBannerContext}from'./components/classification-banner/index.js';export{ClassificationBannerStyles,ClassificationBannerStylesDefaults}from'./components/classification-banner/styles.js';export{ColorPicker}from'./components/color-picker/index.js';export{ColorPickerStyles}from'./components/color-picker/styles.js';export{ComboBoxField,ComboBoxFieldContext}from'./components/combobox-field/index.js';export{ComboBoxStyles}from'./components/combobox-field/styles.js';export{DateField}from'./components/date-field/index.js';export{DateFieldStyles,DateFieldStylesDefault}from'./components/date-field/styles.js';export{DetailsList,DetailsListContext}from'./components/details-list/index.js';export{DetailsListStyles,DetailsListStylesDefaults}from'./components/details-list/styles.js';export{Dialog,DialogTitle}from'./components/dialog/index.js';export{useDrawerContext,useDrawersContext,useDrawersState}from'./components/drawer/context.js';export{Drawer}from'./components/drawer/index.js';export{createDefaultDrawerState,drawerStateReducer}from'./components/drawer/state.js';export{DrawerMenuStyles,DrawerStyles}from'./components/drawer/styles.js';export{DrawerDefaults}from'./components/drawer/types.js';export{Hero,HeroContext}from'./components/hero/index.js';export{HeroStyles}from'./components/hero/styles.js';export{Hotkey,HotkeyContext,HotkeySet}from'./components/hotkey/index.js';export{HotkeyStyles,HotkeyStylesDefaults}from'./components/hotkey/styles.js';export{Icon,IconContext}from'./components/icon/index.js';export{IconStyles}from'./components/icon/styles.js';export{Input,InputContext}from'./components/input/index.js';export{InputStyles,InputStylesDefaults}from'./components/input/styles.js';export{Label,LabelContext}from'./components/label/index.js';export{LabelStyles}from'./components/label/styles.js';export{Menu,MenuContext}from'./components/menu/index.js';export{MenuStyles,MenuStylesDefaults}from'./components/menu/styles.js';export{Options,OptionsContext}from'./components/options/index.js';export{OptionsStyles}from'./components/options/styles.js';export{Popover,PopoverTrigger}from'./components/popover/index.js';export{PopoverStyles}from'./components/popover/styles.js';export{QueryBuilder}from'./components/query-builder/index.js';export{Radio,RadioContext}from'./components/radio/index.js';export{RadioStyles}from'./components/radio/styles.js';export{SearchField,SearchFieldContext}from'./components/search-field/index.js';export{SearchFieldStyles,SearchFieldStylesDefaults}from'./components/search-field/styles.js';export{SelectField,SelectFieldContext}from'./components/select-field/index.js';export{SelectFieldStyles}from'./components/select-field/styles.js';export{Skeleton}from'./components/skeleton/index.js';export{SkeletonStyles,SkeletonStylesDefaults}from'./components/skeleton/styles.js';export{RangeSlider,Slider}from'./components/slider/index.js';export{Switch,SwitchContext}from'./components/switch/index.js';export{SwitchStyles}from'./components/switch/styles.js';export{Tabs}from'./components/tabs/index.js';export{TextAreaField,TextAreaFieldContext}from'./components/text-area-field/index.js';export{TextAreaStyles}from'./components/text-area-field/styles.js';export{TextField,TextFieldContext}from'./components/text-field/index.js';export{TextFieldStyles}from'./components/text-field/styles.js';export{Tooltip,TooltipContext}from'./components/tooltip/index.js';export{TooltipStyles}from'./components/tooltip/styles.js';export{ViewStack,ViewStackEventTypes}from'./components/view-stack/index.js';export{containsExactChildren,expectsIconWrapper}from'./lib/react.js';export{cn,isSlottedContextValue,tv,twMerge}from'./lib/utils.js';export{colorAdvisory,colorAdvisoryBold,colorAdvisoryHover,colorAdvisorySubtle,colorClassificationConfidential,colorClassificationCui,colorClassificationMissing,colorClassificationSecret,colorClassificationTopSecret,colorClassificationTsSci,colorClassificationUnclass,colorCritical,colorCriticalBold,colorCriticalHover,colorCriticalSubtle,colorDefaultDark,colorDefaultLight,colorDisabled,colorHighlight,colorHighlightBold,colorHighlightHover,colorHighlightSubtle,colorInfo,colorInfoBold,colorInfoHover,colorInfoSubtle,colorInteractive,colorInteractiveDefault,colorInteractiveDisabled,colorInteractiveHover,colorInteractiveHoverDark,colorInteractiveHoverLight,colorInverseDark,colorInverseLight,colorNormal,colorNormalBold,colorNormalHover,colorNormalSubtle,colorSerious,colorSeriousBold,colorSeriousHover,colorSeriousSubtle,colorStaticDark,colorStaticLight,colorSurfaceDefault,colorSurfaceOverlay,colorSurfaceRaised,colorTransparentDark,colorTransparentLight,fontDisplay,fontPrimary,iconSizeL,iconSizeM,iconSizeS,iconSizeXs,radiusLarge,radiusMedium,radiusNone,radiusRound,radiusSmall,shadowElevationDefault,shadowElevationOverlay,shadowElevationRaised,spacing0,spacingL,spacingM,spacingNone,spacingOversized,spacingS,spacingXl,spacingXs,spacingXxl,spacingXxs,typographyBodyLHeight,typographyBodyLSize,typographyBodyLSpacing,typographyBodyMHeight,typographyBodyMSize,typographyBodyMSpacing,typographyBodySHeight,typographyBodySSize,typographyBodySSpacing,typographyBodyXsHeight,typographyBodyXsSize,typographyBodyXsSpacing,typographyBodyXxsHeight,typographyBodyXxsSize,typographyBodyXxsSpacing,typographyButtonLHeight,typographyButtonLSize,typographyButtonLSpacing,typographyButtonMHeight,typographyButtonMSize,typographyButtonMSpacing,typographyButtonSHeight,typographyButtonSSize,typographyButtonSSpacing,typographyButtonXsHeight,typographyButtonXsSize,typographyButtonXsSpacing,typographyHeaderLHeight,typographyHeaderLSize,typographyHeaderLSpacing,typographyHeaderMHeight,typographyHeaderMSize,typographyHeaderMSpacing,typographyHeaderSHeight,typographyHeaderSSize,typographyHeaderSSpacing,typographyHeaderXlHeight,typographyHeaderXlSize,typographyHeaderXlSpacing,typographyHeaderXsHeight,typographyHeaderXsSize,typographyHeaderXsSpacing,typographyHeaderXxlHeight,typographyHeaderXxlSize,typographyHeaderXxlSpacing}from'./tokens/index.js';//# sourceMappingURL=index.js.map
1
+ export{Accordion,AccordionContext}from'./components/accordion/index.js';export{AccordionStyles,AccordionStylesDefaults}from'./components/accordion/styles.js';export{Avatar,AvatarContext}from'./components/avatar/index.js';export{AvatarStyles}from'./components/avatar/styles.js';export{Badge,BadgeContext}from'./components/badge/index.js';export{BadgeStyles,BadgeStylesDefaults}from'./components/badge/styles.js';export{Button,ButtonContext,LinkButton,LinkButtonContext,ToggleButton,ToggleButtonContext}from'./components/button/index.js';export{ButtonStyles,ButtonStylesDefaults,LinkButtonStyles,ToggleButtonStyles}from'./components/button/styles.js';export{Checkbox,CheckboxContext,CheckboxGroupContext}from'./components/checkbox/index.js';export{CheckboxStyles}from'./components/checkbox/styles.js';export{Chip,ChipContext}from'./components/chip/index.js';export{BaseChipStyles,ChipStyles,ChipStylesDefaults,DeletableChipStyles,SelectableChipStyles}from'./components/chip/styles.js';export{ClassificationBadge,ClassificationBadgeContext}from'./components/classification-badge/index.js';export{ClassificationBadgeStyles,ClassificationBadgeStylesDefaults}from'./components/classification-badge/styles.js';export{ClassificationBanner,ClassificationBannerContext}from'./components/classification-banner/index.js';export{ClassificationBannerStyles,ClassificationBannerStylesDefaults}from'./components/classification-banner/styles.js';export{ColorPicker}from'./components/color-picker/index.js';export{ColorPickerStyles}from'./components/color-picker/styles.js';export{ComboBoxField,ComboBoxFieldContext}from'./components/combobox-field/index.js';export{ComboBoxStyles}from'./components/combobox-field/styles.js';export{DateField}from'./components/date-field/index.js';export{DateFieldStyles,DateFieldStylesDefault}from'./components/date-field/styles.js';export{DetailsList,DetailsListContext}from'./components/details-list/index.js';export{DetailsListStyles,DetailsListStylesDefaults}from'./components/details-list/styles.js';export{Dialog}from'./components/dialog/index.js';export{DrawerEventNamespace,DrawerEventTypes}from'./components/drawer/events.js';export{Drawer,DrawerContext,DrawerEventHandlers}from'./components/drawer/index.js';export{DrawerMenuStyles,DrawerMenuStylesDefaults,DrawerStyles,DrawerTitleStyles,DrawerTitleStylesDefaults}from'./components/drawer/styles.js';export{Hero,HeroContext}from'./components/hero/index.js';export{HeroStyles}from'./components/hero/styles.js';export{Hotkey,HotkeyContext}from'./components/hotkey/index.js';export{HotkeyStyles,HotkeyStylesDefaults}from'./components/hotkey/styles.js';export{Icon,IconContext}from'./components/icon/index.js';export{IconStyles}from'./components/icon/styles.js';export{Input,InputContext}from'./components/input/index.js';export{InputStyles,InputStylesDefaults}from'./components/input/styles.js';export{Label,LabelContext}from'./components/label/index.js';export{LabelStyles}from'./components/label/styles.js';export{Menu,MenuContext}from'./components/menu/index.js';export{MenuStyles,MenuStylesDefaults}from'./components/menu/styles.js';export{Options,OptionsContext}from'./components/options/index.js';export{OptionsStyles}from'./components/options/styles.js';export{Popover}from'./components/popover/index.js';export{PopoverStyles}from'./components/popover/styles.js';export{QueryBuilder}from'./components/query-builder/index.js';export{Radio,RadioContext}from'./components/radio/index.js';export{RadioStyles}from'./components/radio/styles.js';export{SearchField,SearchFieldContext}from'./components/search-field/index.js';export{SearchFieldStyles,SearchFieldStylesDefaults}from'./components/search-field/styles.js';export{SelectField,SelectFieldContext}from'./components/select-field/index.js';export{SelectFieldStyles}from'./components/select-field/styles.js';export{Skeleton}from'./components/skeleton/index.js';export{SkeletonStyles,SkeletonStylesDefaults}from'./components/skeleton/styles.js';export{RangeSlider,Slider}from'./components/slider/index.js';export{Switch,SwitchContext}from'./components/switch/index.js';export{SwitchStyles}from'./components/switch/styles.js';export{Tabs}from'./components/tabs/index.js';export{TextAreaField,TextAreaFieldContext}from'./components/text-area-field/index.js';export{TextAreaStyles}from'./components/text-area-field/styles.js';export{TextField,TextFieldContext}from'./components/text-field/index.js';export{TextFieldStyles}from'./components/text-field/styles.js';export{Tooltip,TooltipContext}from'./components/tooltip/index.js';export{TooltipStyles}from'./components/tooltip/styles.js';export{ViewStackEventNamespace,ViewStackEventTypes}from'./components/view-stack/events.js';export{ViewStack,ViewStackContext,ViewStackEventHandlers}from'./components/view-stack/index.js';export{containsExactChildren,expectsIconWrapper}from'./lib/react.js';export{cn,isSlottedContextValue,tv,twMerge}from'./lib/utils.js';export{colorAdvisory,colorAdvisoryBold,colorAdvisoryHover,colorAdvisorySubtle,colorClassificationConfidential,colorClassificationCui,colorClassificationMissing,colorClassificationSecret,colorClassificationTopSecret,colorClassificationTsSci,colorClassificationUnclass,colorCritical,colorCriticalBold,colorCriticalHover,colorCriticalSubtle,colorDefaultDark,colorDefaultLight,colorDisabled,colorHighlight,colorHighlightBold,colorHighlightHover,colorHighlightSubtle,colorInfo,colorInfoBold,colorInfoHover,colorInfoSubtle,colorInteractive,colorInteractiveDefault,colorInteractiveDisabled,colorInteractiveHover,colorInteractiveHoverDark,colorInteractiveHoverLight,colorInverseDark,colorInverseLight,colorNormal,colorNormalBold,colorNormalHover,colorNormalSubtle,colorSerious,colorSeriousBold,colorSeriousHover,colorSeriousSubtle,colorStaticDark,colorStaticLight,colorSurfaceDefault,colorSurfaceOverlay,colorSurfaceRaised,colorTransparentDark,colorTransparentLight,fontDisplay,fontPrimary,iconSizeL,iconSizeM,iconSizeS,iconSizeXs,radiusLarge,radiusMedium,radiusNone,radiusRound,radiusSmall,shadowElevationDefault,shadowElevationOverlay,shadowElevationRaised,spacing0,spacingL,spacingM,spacingNone,spacingOversized,spacingS,spacingXl,spacingXs,spacingXxl,spacingXxs,typographyBodyLHeight,typographyBodyLSize,typographyBodyLSpacing,typographyBodyMHeight,typographyBodyMSize,typographyBodyMSpacing,typographyBodySHeight,typographyBodySSize,typographyBodySSpacing,typographyBodyXsHeight,typographyBodyXsSize,typographyBodyXsSpacing,typographyBodyXxsHeight,typographyBodyXxsSize,typographyBodyXxsSpacing,typographyButtonLHeight,typographyButtonLSize,typographyButtonLSpacing,typographyButtonMHeight,typographyButtonMSize,typographyButtonMSpacing,typographyButtonSHeight,typographyButtonSSize,typographyButtonSSpacing,typographyButtonXsHeight,typographyButtonXsSize,typographyButtonXsSpacing,typographyHeaderLHeight,typographyHeaderLSize,typographyHeaderLSpacing,typographyHeaderMHeight,typographyHeaderMSize,typographyHeaderMSpacing,typographyHeaderSHeight,typographyHeaderSSize,typographyHeaderSSpacing,typographyHeaderXlHeight,typographyHeaderXlSize,typographyHeaderXlSpacing,typographyHeaderXsHeight,typographyHeaderXsSize,typographyHeaderXsSpacing,typographyHeaderXxlHeight,typographyHeaderXxlSize,typographyHeaderXxlSpacing}from'./tokens/index.js';//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- import { PropsWithChildren, ReactNode, CSSProperties } from 'react';
1
+ import { PropsWithChildren, AriaAttributes as AriaAttributes$1, AriaRole, RefAttributes, ReactNode, CSSProperties } from 'react';
2
2
 
3
3
  /**
4
4
  * Re-export due to not being exported by library
@@ -29,5 +29,9 @@ type SlottedValue<T> = {
29
29
  slots?: Record<string | symbol, T>;
30
30
  };
31
31
  type ProviderProps<T> = PropsWithChildren<Omit<T, 'children' | 'slot'> & SlottedValue<T>>;
32
+ type AriaAttributes = AriaAttributes$1 & {
33
+ role?: AriaRole;
34
+ };
35
+ type AriaAttributesWithRef<T> = AriaAttributes & RefAttributes<T>;
32
36
 
33
- export type { ChildrenRenderProps, ClassNameRenderProps, ProviderProps, RenderProps, RenderPropsChildren, RenderPropsClassName, RenderPropsStyle, SlottedValue, StylePropRenderProps, StyleRenderProps };
37
+ export type { AriaAttributes, AriaAttributesWithRef, ChildrenRenderProps, ClassNameRenderProps, ProviderProps, RenderProps, RenderPropsChildren, RenderPropsClassName, RenderPropsStyle, SlottedValue, StylePropRenderProps, StyleRenderProps };