@cloudwick/astral-ui 8.1.0 → 8.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/README.md +1 -1
  2. package/dist/components/card/card.d.ts +20 -1
  3. package/dist/components/card/cardVariants.d.ts +28 -22
  4. package/dist/components/card/index.d.ts +1 -1
  5. package/dist/components/ctaGroup/ctaGroup.d.ts +16 -10
  6. package/dist/components/ctaGroup/ctaGroupVariants.d.ts +6 -6
  7. package/dist/components/ctaGroup/index.d.ts +1 -1
  8. package/dist/components/dataTable/DataTableColumnSettings.d.ts +2 -1
  9. package/dist/components/fileUpload/fileUpload.d.ts +2 -2
  10. package/dist/components/fileUpload/fileUploadVariants.d.ts +3 -0
  11. package/dist/components/modal/modal.d.ts +21 -0
  12. package/dist/components/multiSelectTransfer/multiSelectTransferDropdown.d.ts +10 -4
  13. package/dist/components/multiSelectTransfer/multiSelectTransferDropdownHeader.d.ts +31 -0
  14. package/dist/components/multiSelectTransfer/multiSelectTransferModal.d.ts +3 -1
  15. package/dist/components/multiSelectTransfer/multiSelectTransferOptionRow.d.ts +33 -0
  16. package/dist/components/multiSelectTransfer/multiSelectTransferPill.d.ts +9 -2
  17. package/dist/components/multiSelectTransfer/multiSelectTransferTrigger.d.ts +8 -0
  18. package/dist/components/multiSelectTransfer/multiSelectTransferVariants.d.ts +54 -0
  19. package/dist/components/multiSelectTransfer/types.d.ts +9 -0
  20. package/dist/components/otp/input.d.ts +4 -0
  21. package/dist/components/pagination/paginationUtils.d.ts +17 -0
  22. package/dist/components/pagination/usePaginationCollapse.d.ts +22 -0
  23. package/dist/components/scrollbar/scrollbar.d.ts +7 -0
  24. package/dist/components/select/selectComponents.d.ts +14 -1
  25. package/dist/components/select/selectKeyboard.d.ts +28 -0
  26. package/dist/components/select/selectVariants.d.ts +15 -0
  27. package/dist/components/select/types.d.ts +23 -2
  28. package/dist/components/select/utils.d.ts +3 -0
  29. package/dist/components/tabs/tabs.d.ts +8 -0
  30. package/dist/components/tabs/tabsVariants.d.ts +3 -3
  31. package/dist/components/toast/toastVariants.d.ts +3 -3
  32. package/dist/components/toggle/toggle.d.ts +7 -3
  33. package/dist/components/toggle/toggleVariants.d.ts +3 -3
  34. package/dist/components/tooltip/tooltip.d.ts +16 -0
  35. package/dist/components/transferList/transferListItem.d.ts +6 -1
  36. package/dist/components/transferList/transferListPanel.d.ts +3 -1
  37. package/dist/components/transferList/transferListVariants.d.ts +3 -0
  38. package/dist/components/transferList/useTransferListSource.d.ts +2 -0
  39. package/dist/css/index.min.css +1 -1
  40. package/dist/hooks/index.d.ts +1 -0
  41. package/dist/hooks/useFilterQuery.d.ts +2 -2
  42. package/dist/hooks/useLabelPeekDismissal.d.ts +11 -0
  43. package/dist/index.cjs.js +5 -5
  44. package/dist/index.esm.js +5 -5
  45. package/dist/utils/fieldHelperText.d.ts +23 -0
  46. package/dist/utils/index.d.ts +2 -0
  47. package/dist/utils/stringUtils/index.d.ts +2 -0
  48. package/dist/utils/stringUtils/joinIds.d.ts +10 -0
  49. package/dist/utils/stringUtils/resultsAvailable.d.ts +9 -0
  50. package/dist/utils/truncatedLabelReveal.d.ts +7 -0
  51. package/package.json +1 -1
@@ -0,0 +1,23 @@
1
+ import { type ReactElement, type ReactNode } from "react";
2
+ /**
3
+ * Id of a form control's helper text element, derived from the control's id.
4
+ * @param controlId - id of the form control the helper text describes
5
+ * @returns {string} - the helper text element's id
6
+ */
7
+ export declare const getHelperTextId: (controlId: string) => string;
8
+ export interface IFieldHelperTextProps {
9
+ /**
10
+ * Id referenced by the control's `aria-describedby`
11
+ */
12
+ id: string;
13
+ /**
14
+ * Classes applied while there is helper text to show
15
+ */
16
+ className: string;
17
+ children?: ReactNode;
18
+ }
19
+ /**
20
+ * Helper text below a form control. It stays mounted, visually hidden while empty, so helper
21
+ * text that appears later (such as a validation error) is announced by the live region.
22
+ */
23
+ export declare const FieldHelperText: ({ id, className, children }: IFieldHelperTextProps) => ReactElement;
@@ -8,3 +8,5 @@ export * from "./mergeUnique";
8
8
  export * from "./devWarn";
9
9
  export * from "./resolveLoadErrors";
10
10
  export * from "./resolveReloadControls";
11
+ export * from "./fieldHelperText";
12
+ export * from "./truncatedLabelReveal";
@@ -1,3 +1,5 @@
1
1
  export { PlaceholderText } from "./placeholderText";
2
2
  export { readableFileSize } from "./fileSize";
3
3
  export { isRegexSafe } from "./isRegexSafe";
4
+ export { joinIds } from "./joinIds";
5
+ export { formatResultsAvailable } from "./resultsAvailable";
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Joins element ids into a space-separated list for ARIA id-reference attributes
3
+ * such as `aria-describedby` and `aria-labelledby`.
4
+ * @param ids - ids to join; empty and undefined values are skipped
5
+ * @returns {string | undefined} - the joined ids, or undefined when none remain
6
+ * @example
7
+ * joinIds("hint", undefined, "error") // returns "hint error"
8
+ * joinIds(undefined, "") // returns undefined
9
+ */
10
+ export declare function joinIds(...ids: (string | undefined)[]): string | undefined;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * The status-region text a listbox announces for the options it is showing.
3
+ * @param count - how many options are on screen
4
+ * @returns {string} - the announcement
5
+ * @example
6
+ * formatResultsAvailable(1) // returns "1 result available"
7
+ * formatResultsAvailable(3) // returns "3 results available"
8
+ */
9
+ export declare function formatResultsAvailable(count: number): string;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Classes for a list row's label that shows its full text over the rows around it when it is clipped.
3
+ * They apply while the row (a `group`) is marked `data-truncated="true"` and is hovered or marked
4
+ * `data-active="true"`; `useLabelPeekDismissal` is the matching Escape dismissal. Append them to the
5
+ * label's base classes, which keep it on one truncated line otherwise.
6
+ */
7
+ export declare const truncatedLabelReveal: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudwick/astral-ui",
3
- "version": "8.1.0",
3
+ "version": "8.3.0",
4
4
  "description": "UI Library for Cloudwick",
5
5
  "homepage": "https://www.astral-ui.amorphic.link/",
6
6
  "main": "./dist/index.cjs.js",