@longline/aqua-ui 1.0.302 → 1.0.304

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 (107) hide show
  1. package/controls/Chip/Chip.d.ts +41 -13
  2. package/controls/Chip/Chip.js +76 -22
  3. package/controls/Chip/index.d.ts +2 -1
  4. package/controls/Chip/index.js +1 -1
  5. package/controls/CircularProgress/CircularProgress.d.ts +38 -6
  6. package/controls/CircularProgress/CircularProgress.js +67 -17
  7. package/controls/CircularProgress/index.d.ts +1 -0
  8. package/controls/Dropzone/Dropzone.d.ts +42 -10
  9. package/controls/Dropzone/Dropzone.js +76 -16
  10. package/controls/Dropzone/index.d.ts +1 -0
  11. package/controls/Fab/Fab.d.ts +40 -15
  12. package/controls/Fab/Fab.js +76 -28
  13. package/controls/Fab/index.d.ts +2 -1
  14. package/controls/Fab/index.js +1 -1
  15. package/controls/Ghost/Ghost.d.ts +36 -0
  16. package/controls/Ghost/Ghost.js +72 -1
  17. package/controls/Ghost/index.d.ts +2 -1
  18. package/controls/Ghost/index.js +1 -1
  19. package/controls/Gradient/Gradient.d.ts +51 -5
  20. package/controls/Gradient/Gradient.js +98 -8
  21. package/controls/Gradient/index.d.ts +1 -0
  22. package/controls/Histogram/Histogram.d.ts +47 -6
  23. package/controls/Histogram/Histogram.js +84 -21
  24. package/controls/Histogram/HistogramAppearance.d.ts +2 -1
  25. package/controls/Histogram/IHistogramBin.d.ts +1 -1
  26. package/controls/Histogram/index.d.ts +5 -3
  27. package/controls/Histogram/index.js +2 -3
  28. package/controls/Icon/Icon.d.ts +50 -22
  29. package/controls/Icon/Icon.js +47 -18
  30. package/controls/Icon/index.d.ts +2 -1
  31. package/controls/Icon/index.js +1 -1
  32. package/controls/Key/Key.d.ts +39 -5
  33. package/controls/Key/Key.js +74 -8
  34. package/controls/Key/index.d.ts +2 -1
  35. package/controls/Key/index.js +1 -1
  36. package/controls/LinearChart/LinearChart.d.ts +36 -5
  37. package/controls/LinearChart/LinearChart.js +64 -6
  38. package/controls/LinearChart/index.d.ts +2 -1
  39. package/controls/LinearChart/index.js +1 -1
  40. package/controls/ListView/Column.d.ts +42 -5
  41. package/controls/ListView/Column.js +39 -3
  42. package/controls/ListView/IListViewProps.d.ts +2 -2
  43. package/controls/ListView/ListView.d.ts +58 -2
  44. package/controls/ListView/ListView.js +57 -2
  45. package/controls/ListView/index.d.ts +1 -0
  46. package/controls/Mouse/Mouse.d.ts +32 -7
  47. package/controls/Mouse/Mouse.js +60 -12
  48. package/controls/Mouse/index.d.ts +2 -1
  49. package/controls/Mouse/index.js +1 -1
  50. package/controls/PrimaryButton/PrimaryButton.d.ts +37 -9
  51. package/controls/PrimaryButton/PrimaryButton.js +70 -16
  52. package/controls/PrimaryButton/index.d.ts +2 -1
  53. package/controls/PrimaryButton/index.js +1 -1
  54. package/controls/Progress/Progress.d.ts +32 -10
  55. package/controls/Progress/Progress.js +60 -18
  56. package/controls/Progress/index.d.ts +2 -1
  57. package/controls/Progress/index.js +1 -1
  58. package/controls/SecondaryButton/SecondaryButton.d.ts +34 -8
  59. package/controls/SecondaryButton/SecondaryButton.js +64 -14
  60. package/controls/SecondaryButton/index.d.ts +1 -0
  61. package/controls/SpeechRecognizer/SpeechRecognizer.d.ts +31 -1
  62. package/controls/SpeechRecognizer/SpeechRecognizer.js +29 -1
  63. package/controls/SpeechRecognizer/index.d.ts +1 -1
  64. package/controls/SpeechRecognizer/index.js +1 -1
  65. package/controls/TabBar/Tab.d.ts +31 -1
  66. package/controls/TabBar/Tab.js +58 -1
  67. package/controls/TabBar/TabBar.d.ts +43 -5
  68. package/controls/TabBar/TabBar.js +82 -8
  69. package/controls/TabBar/index.d.ts +3 -1
  70. package/controls/TabBar/index.js +1 -1
  71. package/controls/TertiaryButton/TertiaryButton.d.ts +32 -7
  72. package/controls/TertiaryButton/TertiaryButton.js +60 -12
  73. package/controls/TertiaryButton/index.d.ts +2 -1
  74. package/controls/TertiaryButton/index.js +1 -1
  75. package/controls/ToggleButton/ToggleButton.d.ts +36 -3
  76. package/controls/ToggleButton/ToggleButton.js +69 -5
  77. package/controls/ToggleButton/index.d.ts +2 -1
  78. package/controls/ToggleButton/index.js +1 -1
  79. package/controls/View/View.d.ts +22 -8
  80. package/controls/View/View.js +40 -14
  81. package/controls/View/index.d.ts +2 -1
  82. package/controls/View/index.js +1 -1
  83. package/inputs/Dropdown/Dropdown.d.ts +2 -1
  84. package/inputs/Dropdown/index.d.ts +2 -1
  85. package/map/controls/CompassButton/CompassButton.d.ts +1 -1
  86. package/map/controls/FullscreenButton/FullscreenButton.d.ts +1 -1
  87. package/map/controls/ZoomInButton/ZoomInButton.d.ts +3 -2
  88. package/map/controls/ZoomOutButton/ZoomOutButton.d.ts +3 -2
  89. package/map/controls/base/MapButton/MapButton.d.ts +2 -1
  90. package/map/controls/base/MapButton/index.d.ts +2 -1
  91. package/map/layers/InterpolationLayer/ContoursFragmentShader.d.ts +1 -1
  92. package/map/layers/InterpolationLayer/ContoursFragmentShader.js +1 -1
  93. package/map/layers/InterpolationLayer/InterpolationLayer.d.ts +54 -5
  94. package/map/layers/InterpolationLayer/InterpolationLayer.js +52 -7
  95. package/map/layers/InterpolationLayer/index.d.ts +2 -1
  96. package/map/layers/InterpolationLayer/index.js +1 -1
  97. package/package.json +1 -1
  98. package/services/Toast/IToastMessage.d.ts +3 -3
  99. package/services/Toast/IToastProps.d.ts +1 -1
  100. package/services/Toast/Toast.d.ts +43 -5
  101. package/services/Toast/Toast.js +35 -4
  102. package/services/Toast/ToastContainer.d.ts +37 -4
  103. package/services/Toast/ToastContainer.js +75 -9
  104. package/services/Toast/ToastContext.d.ts +5 -4
  105. package/services/Toast/ToastProvider.js +16 -11
  106. package/services/Toast/useToast.d.ts +37 -1
  107. package/services/Toast/useToast.js +42 -2
@@ -18,21 +18,49 @@ interface IChipProps {
18
18
  onClick: (e?: React.MouseEvent | React.KeyboardEvent) => void;
19
19
  }
20
20
  /**
21
- * A set of `Chip` instances show consecutive user inputs and are individually
22
- * deselected. The "X" on a `Chip` is clickable. A `Chip` can have keyboard focus:
23
- * when `Delete` is pressed, `onClick` is triggered.
24
- *
25
- * A `Chip` has a slight left margin to offset it from the preceding `Chip` in a
26
- * set. This margin is only applied between `Chip` siblings.
27
- *
28
- * Chips have a minimum width and maximum width. Content that exceeds the
29
- * maximum width is ellipsized. If `verticalAlign` is specified, then the contents
30
- * of the `Chip` are aligned with flexbox. This is necessary when the chip label
31
- * is not a string but JSX. If `verticalAlign` is enabled, the Chip
32
- * content is no longer ellipsized.
21
+ * A compact element representing a user input, selection, or filter that can be removed.
22
+ *
23
+ * Chips are commonly used to display tags, selected options, or filter criteria. Each chip
24
+ * has a remove button (X) that triggers `onClick` when activated. Chips can also be removed
25
+ * via keyboard when focused.
26
+ *
27
+ * ## Usage
28
+ *
29
+ * ```tsx
30
+ * const [tags, setTags] = useState(['React', 'TypeScript', 'Node']);
31
+ *
32
+ * {tags.map(tag => (
33
+ * <Chip key={tag} onClick={() => removeTag(tag)}>
34
+ * {tag}
35
+ * </Chip>
36
+ * ))}
37
+ * ```
38
+ *
39
+ * ## Keyboard Support
40
+ *
41
+ * | Key | Action |
42
+ * |-----|--------|
43
+ * | `Tab` | Move focus to/from the chip |
44
+ * | `Delete` | Remove the chip (triggers `onClick`) |
45
+ * | `Backspace` | Remove the chip (triggers `onClick`) |
46
+ *
47
+ * ## Sizing
48
+ *
49
+ * Chips have constrained dimensions:
50
+ * - **Min width**: 80px
51
+ * - **Max width**: 150px
52
+ * - **Height**: 24px
53
+ *
54
+ * Content exceeding the max width is automatically ellipsized.
55
+ *
56
+ * ## Spacing
57
+ *
58
+ * Adjacent `Chip` siblings are automatically spaced with a small gap.
59
+ * No additional margin styling is needed when placing chips side by side.
33
60
  */
34
61
  declare const Chip: {
35
62
  ({ disabled, ...props }: IChipProps): React.JSX.Element;
36
63
  displayName: string;
37
64
  };
38
- export { Chip, IChipProps };
65
+ export { Chip };
66
+ export type { IChipProps };
@@ -33,7 +33,7 @@ var ChipBase = function (props) {
33
33
  if (props.disabled)
34
34
  return;
35
35
  // Pressing Delete or Backspace fires the onClick event.
36
- if (e.key == 'Delete' || e.key == 'Backspace') {
36
+ if (e.key === 'Delete' || e.key === 'Backspace') {
37
37
  e.stopPropagation();
38
38
  props.onClick(e);
39
39
  }
@@ -44,35 +44,89 @@ var ChipBase = function (props) {
44
44
  React.createElement("svg", null,
45
45
  React.createElement("use", { xlinkHref: SVG.Icons.Cross })))));
46
46
  };
47
- var ChipStyled = styled(ChipBase)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n // Dimensions:\n min-width: 80px;\n max-width: 150px;\n width: auto;\n height: 24px;\n padding: 0 3px 0 12px;\n\n // Appearance:\n background-color: ", ";\n border: none;\n color: ", ";\n border-radius: 12px;\n user-select: none;\n outline: none;\n\n display: inline-flex;\n align-items: center;\n gap: 4px; // Gap between content and \"X\".\n margin-right: 2px; \n\n // Spacing from previous Chip.\n & + & {\n margin-left: 2px;\n }\n\n font: ", ";\n\n span.inner {\n flex: 1;\n overflow-x: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n pointer-events: none;\n }\n\n & > button {\n border: none;\n background: transparent;\n outline: none;\n padding: none;\n margin: none;\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n }\n\n & > button {\n svg {\n transition: fill ", "ms ease-in-out,\n background-color ", "ms ease-in-out;\n fill: ", ";\n box-sizing: border-box;\n width: 18px;\n height: 18px;\n padding: 2px;\n border-radius: 50%;\n cursor: pointer;\n }\n }\n\n &:focus {\n outline: solid 2px ", ";\n }\n\n // When Chip is hovered, svg is colored.\n &:hover {\n & button > svg {\n background-color: ", ";\n fill: ", ";\n }\n }\n\n & > button svg:active {\n background-color: ", ";\n fill: ", ";\n }\n\n ", "\n"], ["\n // Dimensions:\n min-width: 80px;\n max-width: 150px;\n width: auto;\n height: 24px;\n padding: 0 3px 0 12px;\n\n // Appearance:\n background-color: ", ";\n border: none;\n color: ", ";\n border-radius: 12px;\n user-select: none;\n outline: none;\n\n display: inline-flex;\n align-items: center;\n gap: 4px; // Gap between content and \"X\".\n margin-right: 2px; \n\n // Spacing from previous Chip.\n & + & {\n margin-left: 2px;\n }\n\n font: ", ";\n\n span.inner {\n flex: 1;\n overflow-x: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n pointer-events: none;\n }\n\n & > button {\n border: none;\n background: transparent;\n outline: none;\n padding: none;\n margin: none;\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n }\n\n & > button {\n svg {\n transition: fill ", "ms ease-in-out,\n background-color ", "ms ease-in-out;\n fill: ", ";\n box-sizing: border-box;\n width: 18px;\n height: 18px;\n padding: 2px;\n border-radius: 50%;\n cursor: pointer;\n }\n }\n\n &:focus {\n outline: solid 2px ", ";\n }\n\n // When Chip is hovered, svg is colored.\n &:hover {\n & button > svg {\n background-color: ", ";\n fill: ", ";\n }\n }\n\n & > button svg:active {\n background-color: ", ";\n fill: ", ";\n }\n\n ", "\n"
47
+ var ChipStyled = styled(ChipBase)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n // Dimensions:\n min-width: 80px;\n max-width: 150px;\n width: auto;\n height: 24px;\n padding: 0 3px 0 12px;\n\n // Appearance:\n background-color: ", ";\n border: none;\n color: ", ";\n border-radius: 12px;\n user-select: none;\n outline: none;\n\n display: inline-flex;\n align-items: center;\n gap: 4px; // Gap between content and \"X\".\n margin-right: 2px; \n\n // Spacing from previous Chip.\n & + & {\n margin-left: 2px;\n }\n\n font: ", ";\n\n span.inner {\n flex: 1;\n overflow-x: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n pointer-events: none;\n }\n\n & > button {\n border: none;\n background: transparent;\n outline: none;\n padding: 0;\n margin: 0;\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n }\n\n & > button {\n svg {\n transition: fill ", "ms ease-in-out,\n background-color ", "ms ease-in-out;\n fill: ", ";\n box-sizing: border-box;\n width: 18px;\n height: 18px;\n padding: 2px;\n border-radius: 50%;\n cursor: pointer;\n }\n }\n\n &:focus {\n outline: solid 2px ", ";\n }\n\n // When Chip is hovered, svg is colored.\n &:hover {\n & button > svg {\n background-color: ", ";\n fill: ", ";\n }\n }\n\n & > button svg:active {\n background-color: ", ";\n fill: ", ";\n }\n\n ", "\n"], ["\n // Dimensions:\n min-width: 80px;\n max-width: 150px;\n width: auto;\n height: 24px;\n padding: 0 3px 0 12px;\n\n // Appearance:\n background-color: ", ";\n border: none;\n color: ", ";\n border-radius: 12px;\n user-select: none;\n outline: none;\n\n display: inline-flex;\n align-items: center;\n gap: 4px; // Gap between content and \"X\".\n margin-right: 2px; \n\n // Spacing from previous Chip.\n & + & {\n margin-left: 2px;\n }\n\n font: ", ";\n\n span.inner {\n flex: 1;\n overflow-x: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n pointer-events: none;\n }\n\n & > button {\n border: none;\n background: transparent;\n outline: none;\n padding: 0;\n margin: 0;\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n }\n\n & > button {\n svg {\n transition: fill ", "ms ease-in-out,\n background-color ", "ms ease-in-out;\n fill: ", ";\n box-sizing: border-box;\n width: 18px;\n height: 18px;\n padding: 2px;\n border-radius: 50%;\n cursor: pointer;\n }\n }\n\n &:focus {\n outline: solid 2px ", ";\n }\n\n // When Chip is hovered, svg is colored.\n &:hover {\n & button > svg {\n background-color: ", ";\n fill: ", ";\n }\n }\n\n & > button svg:active {\n background-color: ", ";\n fill: ", ";\n }\n\n ", "\n"
48
48
  /**
49
- * A set of `Chip` instances show consecutive user inputs and are individually
50
- * deselected. The "X" on a `Chip` is clickable. A `Chip` can have keyboard focus:
51
- * when `Delete` is pressed, `onClick` is triggered.
49
+ * A compact element representing a user input, selection, or filter that can be removed.
52
50
  *
53
- * A `Chip` has a slight left margin to offset it from the preceding `Chip` in a
54
- * set. This margin is only applied between `Chip` siblings.
51
+ * Chips are commonly used to display tags, selected options, or filter criteria. Each chip
52
+ * has a remove button (X) that triggers `onClick` when activated. Chips can also be removed
53
+ * via keyboard when focused.
55
54
  *
56
- * Chips have a minimum width and maximum width. Content that exceeds the
57
- * maximum width is ellipsized. If `verticalAlign` is specified, then the contents
58
- * of the `Chip` are aligned with flexbox. This is necessary when the chip label
59
- * is not a string but JSX. If `verticalAlign` is enabled, the Chip
60
- * content is no longer ellipsized.
55
+ * ## Usage
56
+ *
57
+ * ```tsx
58
+ * const [tags, setTags] = useState(['React', 'TypeScript', 'Node']);
59
+ *
60
+ * {tags.map(tag => (
61
+ * <Chip key={tag} onClick={() => removeTag(tag)}>
62
+ * {tag}
63
+ * </Chip>
64
+ * ))}
65
+ * ```
66
+ *
67
+ * ## Keyboard Support
68
+ *
69
+ * | Key | Action |
70
+ * |-----|--------|
71
+ * | `Tab` | Move focus to/from the chip |
72
+ * | `Delete` | Remove the chip (triggers `onClick`) |
73
+ * | `Backspace` | Remove the chip (triggers `onClick`) |
74
+ *
75
+ * ## Sizing
76
+ *
77
+ * Chips have constrained dimensions:
78
+ * - **Min width**: 80px
79
+ * - **Max width**: 150px
80
+ * - **Height**: 24px
81
+ *
82
+ * Content exceeding the max width is automatically ellipsized.
83
+ *
84
+ * ## Spacing
85
+ *
86
+ * Adjacent `Chip` siblings are automatically spaced with a small gap.
87
+ * No additional margin styling is needed when placing chips side by side.
61
88
  */
62
89
  ])), function (p) { return p.theme.colors.neutral[10]; }, function (p) { return p.theme.colors.neutral[100]; }, function (p) { return p.theme.font.labelSmall; }, function (p) { return p.theme.animation.duration; }, function (p) { return p.theme.animation.duration; }, function (p) { return p.theme.colors.neutral[50]; }, function (p) { return p.theme.colors.primary[1]; }, function (p) { return p.theme.colors.primary[2]; }, function (p) { return p.theme.colors.neutral[100]; }, function (p) { return p.theme.colors.primary[1]; }, function (p) { return p.theme.colors.neutral[100]; }, function (p) { return p.disabled && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n pointer-events: none;\n cursor: auto;\n background-color: ", ";\n color: ", ";\n & > button svg {\n fill: ", ";\n }\n "], ["\n pointer-events: none;\n cursor: auto;\n background-color: ", ";\n color: ", ";\n & > button svg {\n fill: ", ";\n }\n "])), function (p) { return p.theme.colors.neutral[50]; }, function (p) { return p.theme.colors.primary[3]; }, function (p) { return p.theme.colors.primary[3]; }); });
63
90
  /**
64
- * A set of `Chip` instances show consecutive user inputs and are individually
65
- * deselected. The "X" on a `Chip` is clickable. A `Chip` can have keyboard focus:
66
- * when `Delete` is pressed, `onClick` is triggered.
91
+ * A compact element representing a user input, selection, or filter that can be removed.
92
+ *
93
+ * Chips are commonly used to display tags, selected options, or filter criteria. Each chip
94
+ * has a remove button (X) that triggers `onClick` when activated. Chips can also be removed
95
+ * via keyboard when focused.
96
+ *
97
+ * ## Usage
98
+ *
99
+ * ```tsx
100
+ * const [tags, setTags] = useState(['React', 'TypeScript', 'Node']);
101
+ *
102
+ * {tags.map(tag => (
103
+ * <Chip key={tag} onClick={() => removeTag(tag)}>
104
+ * {tag}
105
+ * </Chip>
106
+ * ))}
107
+ * ```
108
+ *
109
+ * ## Keyboard Support
110
+ *
111
+ * | Key | Action |
112
+ * |-----|--------|
113
+ * | `Tab` | Move focus to/from the chip |
114
+ * | `Delete` | Remove the chip (triggers `onClick`) |
115
+ * | `Backspace` | Remove the chip (triggers `onClick`) |
116
+ *
117
+ * ## Sizing
118
+ *
119
+ * Chips have constrained dimensions:
120
+ * - **Min width**: 80px
121
+ * - **Max width**: 150px
122
+ * - **Height**: 24px
123
+ *
124
+ * Content exceeding the max width is automatically ellipsized.
67
125
  *
68
- * A `Chip` has a slight left margin to offset it from the preceding `Chip` in a
69
- * set. This margin is only applied between `Chip` siblings.
126
+ * ## Spacing
70
127
  *
71
- * Chips have a minimum width and maximum width. Content that exceeds the
72
- * maximum width is ellipsized. If `verticalAlign` is specified, then the contents
73
- * of the `Chip` are aligned with flexbox. This is necessary when the chip label
74
- * is not a string but JSX. If `verticalAlign` is enabled, the Chip
75
- * content is no longer ellipsized.
128
+ * Adjacent `Chip` siblings are automatically spaced with a small gap.
129
+ * No additional margin styling is needed when placing chips side by side.
76
130
  */
77
131
  var Chip = function (_a) {
78
132
  var _b = _a.disabled, disabled = _b === void 0 ? false : _b, props = __rest(_a, ["disabled"]);
@@ -1 +1,2 @@
1
- export * from './Chip';
1
+ export { Chip } from './Chip';
2
+ export type { IChipProps } from './Chip';
@@ -1 +1 @@
1
- export * from './Chip';
1
+ export { Chip } from './Chip';
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import * as React from 'react';
2
2
  interface ICircularProgressProps {
3
3
  /** @ignore */
4
4
  className?: string;
@@ -9,7 +9,6 @@ interface ICircularProgressProps {
9
9
  value: number;
10
10
  /**
11
11
  * Color of the progress arc.
12
- * @default primary 1
13
12
  */
14
13
  color?: string;
15
14
  /**
@@ -24,10 +23,43 @@ interface ICircularProgressProps {
24
23
  strokeWidth?: number;
25
24
  }
26
25
  /**
27
- * A reusable circular progress indicator component.
26
+ * A circular progress indicator that displays a percentage value as an arc.
28
27
  *
29
- * @example
30
- * <CircularProgress value={65} />
28
+ * Renders an SVG-based circular gauge with a progress arc and centered percentage label.
29
+ * The progress value is automatically clamped between 0 and 100.
30
+ *
31
+ * ## Usage
32
+ *
33
+ * ```tsx
34
+ * // Basic usage
35
+ * <CircularProgress value={75} />
36
+ *
37
+ * // Custom size and stroke
38
+ * <CircularProgress value={50} size={60} strokeWidth={4} />
39
+ *
40
+ * // Custom color
41
+ * <CircularProgress value={100} color="seagreen" />
42
+ * ```
43
+ *
44
+ * ## Accessibility
45
+ *
46
+ * The component includes proper ARIA attributes:
47
+ * - `role="progressbar"`
48
+ * - `aria-valuenow` (current value)
49
+ * - `aria-valuemin` (0)
50
+ * - `aria-valuemax` (100)
51
+ *
52
+ * ## Customization
53
+ *
54
+ * | Prop | Default | Description |
55
+ * |------|---------|-------------|
56
+ * | `size` | `100` | Diameter in pixels |
57
+ * | `strokeWidth` | `2` | Arc thickness in pixels |
58
+ * | `color` | theme primary | Arc color (CSS color value) |
31
59
  */
32
- declare const CircularProgress: ({ size, strokeWidth, ...props }: ICircularProgressProps) => React.JSX.Element;
60
+ declare const CircularProgress: {
61
+ ({ size, strokeWidth, ...props }: ICircularProgressProps): React.JSX.Element;
62
+ displayName: string;
63
+ };
33
64
  export { CircularProgress };
65
+ export type { ICircularProgressProps };
@@ -24,7 +24,7 @@ var __rest = (this && this.__rest) || function (s, e) {
24
24
  }
25
25
  return t;
26
26
  };
27
- import React from 'react';
27
+ import * as React from 'react';
28
28
  import styled from 'styled-components';
29
29
  var CircularProgressBase = function (props) {
30
30
  // Clamp progress value between 0 and 100:
@@ -40,33 +40,83 @@ var CircularProgressBase = function (props) {
40
40
  "%")));
41
41
  };
42
42
  /** Text label displayed at the center of the circle. */
43
- var Text = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n z-index: 1;\n font: ", ";\n"], ["\n position: relative;\n z-index: 1;\n font: ", ";\n"
44
- /**
45
- * Styled version of CircularProgressBase.
46
- * Handles sizing, positioning, and theming.
47
- */
48
- ])), function (p) { return p.theme.font.labelSmall; });
49
- /**
50
- * Styled version of CircularProgressBase.
51
- * Handles sizing, positioning, and theming.
52
- */
43
+ var Text = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n z-index: 1;\n font: ", ";\n"], ["\n position: relative;\n z-index: 1;\n font: ", ";\n"])), function (p) { return p.theme.font.labelSmall; });
53
44
  var CircularProgressStyled = styled(CircularProgressBase)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n position: relative;\n width: ", "px;\n height: ", "px;\n display: flex;\n justify-content: center;\n align-items: center;\n svg {\n position: absolute;\n inset: 0;\n stroke: ", ";\n stroke-width: ", ";\n }\n"], ["\n position: relative;\n width: ", "px;\n height: ", "px;\n display: flex;\n justify-content: center;\n align-items: center;\n svg {\n position: absolute;\n inset: 0;\n stroke: ", ";\n stroke-width: ", ";\n }\n"
54
45
  /**
55
- * A reusable circular progress indicator component.
46
+ * A circular progress indicator that displays a percentage value as an arc.
47
+ *
48
+ * Renders an SVG-based circular gauge with a progress arc and centered percentage label.
49
+ * The progress value is automatically clamped between 0 and 100.
50
+ *
51
+ * ## Usage
52
+ *
53
+ * ```tsx
54
+ * // Basic usage
55
+ * <CircularProgress value={75} />
56
+ *
57
+ * // Custom size and stroke
58
+ * <CircularProgress value={50} size={60} strokeWidth={4} />
59
+ *
60
+ * // Custom color
61
+ * <CircularProgress value={100} color="seagreen" />
62
+ * ```
63
+ *
64
+ * ## Accessibility
56
65
  *
57
- * @example
58
- * <CircularProgress value={65} />
66
+ * The component includes proper ARIA attributes:
67
+ * - `role="progressbar"`
68
+ * - `aria-valuenow` (current value)
69
+ * - `aria-valuemin` (0)
70
+ * - `aria-valuemax` (100)
71
+ *
72
+ * ## Customization
73
+ *
74
+ * | Prop | Default | Description |
75
+ * |------|---------|-------------|
76
+ * | `size` | `100` | Diameter in pixels |
77
+ * | `strokeWidth` | `2` | Arc thickness in pixels |
78
+ * | `color` | theme primary | Arc color (CSS color value) |
59
79
  */
60
80
  ])), function (p) { return p.size; }, function (p) { return p.size; }, function (p) { var _a; return (_a = p.color) !== null && _a !== void 0 ? _a : p.theme.colors.primary[1]; }, function (p) { return p.strokeWidth; });
61
81
  /**
62
- * A reusable circular progress indicator component.
82
+ * A circular progress indicator that displays a percentage value as an arc.
83
+ *
84
+ * Renders an SVG-based circular gauge with a progress arc and centered percentage label.
85
+ * The progress value is automatically clamped between 0 and 100.
86
+ *
87
+ * ## Usage
88
+ *
89
+ * ```tsx
90
+ * // Basic usage
91
+ * <CircularProgress value={75} />
92
+ *
93
+ * // Custom size and stroke
94
+ * <CircularProgress value={50} size={60} strokeWidth={4} />
95
+ *
96
+ * // Custom color
97
+ * <CircularProgress value={100} color="seagreen" />
98
+ * ```
99
+ *
100
+ * ## Accessibility
101
+ *
102
+ * The component includes proper ARIA attributes:
103
+ * - `role="progressbar"`
104
+ * - `aria-valuenow` (current value)
105
+ * - `aria-valuemin` (0)
106
+ * - `aria-valuemax` (100)
107
+ *
108
+ * ## Customization
63
109
  *
64
- * @example
65
- * <CircularProgress value={65} />
110
+ * | Prop | Default | Description |
111
+ * |------|---------|-------------|
112
+ * | `size` | `100` | Diameter in pixels |
113
+ * | `strokeWidth` | `2` | Arc thickness in pixels |
114
+ * | `color` | theme primary | Arc color (CSS color value) |
66
115
  */
67
116
  var CircularProgress = function (_a) {
68
117
  var _b = _a.size, size = _b === void 0 ? 100 : _b, _c = _a.strokeWidth, strokeWidth = _c === void 0 ? 2 : _c, props = __rest(_a, ["size", "strokeWidth"]);
69
118
  return React.createElement(CircularProgressStyled, __assign({ size: size, strokeWidth: strokeWidth }, props));
70
119
  };
120
+ CircularProgress.displayName = "CircularProgress";
71
121
  export { CircularProgress };
72
122
  var templateObject_1, templateObject_2;
@@ -1 +1,2 @@
1
1
  export { CircularProgress } from './CircularProgress';
2
+ export type { ICircularProgressProps } from './CircularProgress';
@@ -18,22 +18,54 @@ interface IDropzoneProps {
18
18
  message?: React.ReactNode;
19
19
  /**
20
20
  * A `Dropzone` can be disabled and will not accept files.
21
+ * @default false
21
22
  */
22
23
  disabled?: boolean;
23
24
  }
24
25
  /**
25
- * A `Dropzone` accepts files, either by dragging them into the zone or by
26
- * clicking the dropzone and selecting files from a dialog box. Multiple
27
- * files may be dragged or selected at the same time. When files are selected,
28
- * Dropzone fires `onAddFiles` with a `Files[]` argument.
29
- *
30
- * @example
31
- * <Dropzone
32
- * onAddFiles={(files: File[]) => console.log("Files dropped", files)}
33
- * />
26
+ * A file upload area that accepts files via drag-and-drop or click-to-select.
27
+ *
28
+ * The Dropzone renders as a clickable area with a dashed border and upload icon.
29
+ * Users can either drag files onto it or click to open the native file picker.
30
+ * Multiple files can be selected at once.
31
+ *
32
+ * ## Usage
33
+ *
34
+ * ```tsx
35
+ * const handleFiles = (files: File[]) => {
36
+ * files.forEach(file => console.log(file.name, file.size));
37
+ * };
38
+ *
39
+ * <Dropzone onAddFiles={handleFiles} />
40
+ *
41
+ * // With file type filter
42
+ * <Dropzone onAddFiles={handleFiles} accept=".pdf,.doc,.docx" />
43
+ * ```
44
+ *
45
+ * ## Interaction Methods
46
+ *
47
+ * | Method | Description |
48
+ * |--------|-------------|
49
+ * | Drag & Drop | Drag files from the file system onto the dropzone |
50
+ * | Click | Click to open the native file picker dialog |
51
+ * | Keyboard | Press `Enter` or `Space` when focused to open file picker |
52
+ *
53
+ * ## File Filtering
54
+ *
55
+ * The `accept` prop sets a file type filter in the file picker dialog, but does
56
+ * **not** prevent users from dropping unacceptable file types. Always validate
57
+ * files in your `onAddFiles` handler.
58
+ *
59
+ * ## Accessibility
60
+ *
61
+ * - Focusable via keyboard (`Tab`)
62
+ * - Activatable via `Enter` or `Space` keys
63
+ * - Includes `aria-label` for screen readers
64
+ * - Decorative SVG is hidden from assistive technology
34
65
  */
35
66
  declare const Dropzone: {
36
67
  ({ disabled, ...props }: IDropzoneProps): React.JSX.Element;
37
68
  displayName: string;
38
69
  };
39
- export { Dropzone, IDropzoneProps };
70
+ export { Dropzone };
71
+ export type { IDropzoneProps };
@@ -66,27 +66,87 @@ var DropzoneBase = function (props) {
66
66
  };
67
67
  var DropzoneStyled = styled(DropzoneBase)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n position: relative;\n border: dashed 2px ", ";\n border-radius: ", "px;\n cursor: ", ";\n width: 100%;\n text-align: center;\n background-color: transparent;\n transition: \n border-color ease-in-out 75ms, \n background-color ease-in-out 75ms;\n\n & > div.message {\n margin-top: 8px;\n font-weight: 500;\n color: ", ";\n transition: color ease-in-out 75ms;\n }\n\n & > svg {\n display: block;\n margin: 8px;\n width: 100%;\n height: 150px;\n fill: ", ";\n\n transition: fill ease-in-out 75ms, transform ease-in-out 500ms;\n }\n\n ", "\n\n & > input {\n display: none;\n }\n"], ["\n position: relative;\n border: dashed 2px ", ";\n border-radius: ", "px;\n cursor: ", ";\n width: 100%;\n text-align: center;\n background-color: transparent;\n transition: \n border-color ease-in-out 75ms, \n background-color ease-in-out 75ms;\n\n & > div.message {\n margin-top: 8px;\n font-weight: 500;\n color: ", ";\n transition: color ease-in-out 75ms;\n }\n\n & > svg {\n display: block;\n margin: 8px;\n width: 100%;\n height: 150px;\n fill: ", ";\n\n transition: fill ease-in-out 75ms, transform ease-in-out 500ms;\n }\n\n ", "\n\n & > input {\n display: none;\n }\n"
68
68
  /**
69
- * A `Dropzone` accepts files, either by dragging them into the zone or by
70
- * clicking the dropzone and selecting files from a dialog box. Multiple
71
- * files may be dragged or selected at the same time. When files are selected,
72
- * Dropzone fires `onAddFiles` with a `Files[]` argument.
69
+ * A file upload area that accepts files via drag-and-drop or click-to-select.
73
70
  *
74
- * @example
75
- * <Dropzone
76
- * onAddFiles={(files: File[]) => console.log("Files dropped", files)}
77
- * />
71
+ * The Dropzone renders as a clickable area with a dashed border and upload icon.
72
+ * Users can either drag files onto it or click to open the native file picker.
73
+ * Multiple files can be selected at once.
74
+ *
75
+ * ## Usage
76
+ *
77
+ * ```tsx
78
+ * const handleFiles = (files: File[]) => {
79
+ * files.forEach(file => console.log(file.name, file.size));
80
+ * };
81
+ *
82
+ * <Dropzone onAddFiles={handleFiles} />
83
+ *
84
+ * // With file type filter
85
+ * <Dropzone onAddFiles={handleFiles} accept=".pdf,.doc,.docx" />
86
+ * ```
87
+ *
88
+ * ## Interaction Methods
89
+ *
90
+ * | Method | Description |
91
+ * |--------|-------------|
92
+ * | Drag & Drop | Drag files from the file system onto the dropzone |
93
+ * | Click | Click to open the native file picker dialog |
94
+ * | Keyboard | Press `Enter` or `Space` when focused to open file picker |
95
+ *
96
+ * ## File Filtering
97
+ *
98
+ * The `accept` prop sets a file type filter in the file picker dialog, but does
99
+ * **not** prevent users from dropping unacceptable file types. Always validate
100
+ * files in your `onAddFiles` handler.
101
+ *
102
+ * ## Accessibility
103
+ *
104
+ * - Focusable via keyboard (`Tab`)
105
+ * - Activatable via `Enter` or `Space` keys
106
+ * - Includes `aria-label` for screen readers
107
+ * - Decorative SVG is hidden from assistive technology
78
108
  */
79
109
  ])), function (p) { return p.theme.colors.neutral[80]; }, function (p) { return p.theme.radius.normal; }, function (p) { return p.disabled ? 'auto' : 'pointer'; }, function (p) { return p.theme.colors.neutral[80]; }, function (p) { return p.disabled ? p.theme.colors.neutral[50] : p.theme.colors.primary[2]; }, function (p) { return !p.disabled && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n &.hover, &:hover {\n background-color: ", ";\n border-color: ", ";\n & > div.message {\n color: ", ";\n }\n & > svg {\n fill: ", ";\n transform: translateY(-8px);\n }\n }\n "], ["\n &.hover, &:hover {\n background-color: ", ";\n border-color: ", ";\n & > div.message {\n color: ", ";\n }\n & > svg {\n fill: ", ";\n transform: translateY(-8px);\n }\n }\n "])), p.theme.colors.primary[3], p.theme.colors.neutral[100], p.theme.colors.neutral[100], p.theme.colors.primary[1]); });
80
110
  /**
81
- * A `Dropzone` accepts files, either by dragging them into the zone or by
82
- * clicking the dropzone and selecting files from a dialog box. Multiple
83
- * files may be dragged or selected at the same time. When files are selected,
84
- * Dropzone fires `onAddFiles` with a `Files[]` argument.
111
+ * A file upload area that accepts files via drag-and-drop or click-to-select.
112
+ *
113
+ * The Dropzone renders as a clickable area with a dashed border and upload icon.
114
+ * Users can either drag files onto it or click to open the native file picker.
115
+ * Multiple files can be selected at once.
116
+ *
117
+ * ## Usage
118
+ *
119
+ * ```tsx
120
+ * const handleFiles = (files: File[]) => {
121
+ * files.forEach(file => console.log(file.name, file.size));
122
+ * };
123
+ *
124
+ * <Dropzone onAddFiles={handleFiles} />
125
+ *
126
+ * // With file type filter
127
+ * <Dropzone onAddFiles={handleFiles} accept=".pdf,.doc,.docx" />
128
+ * ```
129
+ *
130
+ * ## Interaction Methods
131
+ *
132
+ * | Method | Description |
133
+ * |--------|-------------|
134
+ * | Drag & Drop | Drag files from the file system onto the dropzone |
135
+ * | Click | Click to open the native file picker dialog |
136
+ * | Keyboard | Press `Enter` or `Space` when focused to open file picker |
137
+ *
138
+ * ## File Filtering
139
+ *
140
+ * The `accept` prop sets a file type filter in the file picker dialog, but does
141
+ * **not** prevent users from dropping unacceptable file types. Always validate
142
+ * files in your `onAddFiles` handler.
143
+ *
144
+ * ## Accessibility
85
145
  *
86
- * @example
87
- * <Dropzone
88
- * onAddFiles={(files: File[]) => console.log("Files dropped", files)}
89
- * />
146
+ * - Focusable via keyboard (`Tab`)
147
+ * - Activatable via `Enter` or `Space` keys
148
+ * - Includes `aria-label` for screen readers
149
+ * - Decorative SVG is hidden from assistive technology
90
150
  */
91
151
  var Dropzone = function (_a) {
92
152
  var _b = _a.disabled, disabled = _b === void 0 ? false : _b, props = __rest(_a, ["disabled"]);
@@ -1 +1,2 @@
1
1
  export { Dropzone } from './Dropzone';
2
+ export type { IDropzoneProps } from './Dropzone';
@@ -58,26 +58,51 @@ interface IFabProps {
58
58
  onClick: (e?: React.MouseEvent<HTMLButtonElement>) => void;
59
59
  }
60
60
  /**
61
- * Floating action buttons (FABs) help people take primary actions and are used
62
- * to represent the most important action on a screen. A FAB renders as a
63
- * `<button>` element.
61
+ * A floating action button (FAB) for primary or prominent actions.
64
62
  *
65
- * FABs always have an icon, but other button content is optional. The optional
66
- * button content is usually a string, but may be any React component.
67
- * The icon symbol path is passed in as a property.
63
+ * FABs are elevated buttons that stand out from the UI and typically represent
64
+ * the most important action on a screen. They always include an icon and optionally
65
+ * display text content.
68
66
  *
69
- * #### Colors
70
- * The FAB surface and text always have the same color, but the icon has
71
- * four options: `positive` (theme-dependent, usually a shade of green),
72
- * `negative` (theme-dependent, usually a shade of red), custom, and themed
73
- * (the default).
67
+ * ## Usage
74
68
  *
75
- * #### States
76
- * * The FAB can be in a `disabled` state where it cannot be clicked.
77
- * * The FAB can be in an `active` state where it appears depressed.
69
+ * ```tsx
70
+ * import { SVG } from '@longline/aqua-ui';
71
+ *
72
+ * // Icon only
73
+ * <Fab icon={SVG.Icons.Add} onClick={handleAdd} />
74
+ *
75
+ * // Icon with label
76
+ * <Fab icon={SVG.Icons.Save} onClick={handleSave}>
77
+ * Save Changes
78
+ * </Fab>
79
+ *
80
+ * // Positive action (green icon)
81
+ * <Fab icon={SVG.Icons.Check} positive onClick={handleConfirm}>
82
+ * Confirm
83
+ * </Fab>
84
+ * ```
85
+ *
86
+ * ## Icon Colors
87
+ *
88
+ * | Prop | Color | Use Case |
89
+ * |------|-------|----------|
90
+ * | (default) | Theme primary | Standard actions |
91
+ * | `positive` | Green | Confirmations, saves, approvals |
92
+ * | `negative` | Red | Deletions, cancellations, warnings |
93
+ * | `color` | Custom CSS | Brand colors, special emphasis |
94
+ *
95
+ * ## States
96
+ *
97
+ * | State | Description |
98
+ * |-------|-------------|
99
+ * | `disabled` | Cannot be interacted with, muted appearance |
100
+ * | `active` | Appears depressed with inverted colors |
101
+ * | `nofocus` | Returns focus to previous element after click |
78
102
  */
79
103
  declare const Fab: {
80
104
  ({ disabled, positive, negative, active, nofocus, ...props }: IFabProps): React.JSX.Element;
81
105
  displayName: string;
82
106
  };
83
- export { Fab, IFabProps };
107
+ export { Fab };
108
+ export type { IFabProps };