@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
@@ -48,37 +48,79 @@ var FillInner = styled.div(templateObject_2 || (templateObject_2 = __makeTemplat
48
48
  var Value = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n font-size: 8px;\n line-height: 0;\n color: ", ";\n text-shadow: 0px 0px 4px #000; \n"], ["\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n font-size: 8px;\n line-height: 0;\n color: ", ";\n text-shadow: 0px 0px 4px #000; \n"])), function (p) { return p.theme.colors.neutral[100]; });
49
49
  var ProgressStyled = styled(ProgressBase)(templateObject_6 || (templateObject_6 = __makeTemplateObject([" \n position: relative; \n box-sizing: border-box;\n height: ", "px;\n min-width: 100px;\n ", "\n margin: 4px 0 4px 0;\n\n ", "\n background-color: ", ";\n border-radius: ", "px;\n\n ", " {\n background-color: ", ";\n }\n"], [" \n position: relative; \n box-sizing: border-box;\n height: ", "px;\n min-width: 100px;\n ", "\n margin: 4px 0 4px 0;\n\n ", "\n background-color: ", ";\n border-radius: ", "px;\n\n ", " {\n background-color: ", ";\n }\n"
50
50
  /**
51
- * A visual progress bar component that shows completion of a task, range, or
52
- * metric.
51
+ * A horizontal progress bar showing completion percentage.
53
52
  *
54
- * - Automatically clamps `value` between `0` and `100`.
55
- * - Fully responsive and stretches to available width.
56
- * - Animated bar fill when `value` changes.
57
- * - Optionally displays percentage value text.
53
+ * Displays an animated fill representing a value from 0-100. Values outside
54
+ * this range are automatically clamped. Stretches to fill available width.
58
55
  *
59
- * The bar always stretches to fill all horizontal space available to it.
56
+ * ## Usage
60
57
  *
61
- * @example
62
58
  * ```tsx
63
- * <Progress value={45} numbered color="#00c2a8" thickness={8} />
59
+ * // Basic progress
60
+ * <Progress value={45} />
61
+ *
62
+ * // With percentage label
63
+ * <Progress value={75} numbered />
64
+ *
65
+ * // Custom color and thickness
66
+ * <Progress value={60} color="#00c2a8" thickness={8} />
67
+ *
68
+ * // Fixed width with padding
69
+ * <Progress value={30} width="200px" padded />
64
70
  * ```
71
+ *
72
+ * ## Props
73
+ *
74
+ * | Prop | Description |
75
+ * |------|-------------|
76
+ * | `value` | Percentage complete (0-100, clamped) |
77
+ * | `numbered` | Show percentage text centered on bar |
78
+ * | `thickness` | Bar height in pixels (default: 5) |
79
+ * | `color` | Custom fill color (default: theme primary) |
80
+ * | `width` | Fixed width (CSS value); otherwise fills container |
81
+ * | `padded` | Add 10px margin around bar |
82
+ *
83
+ * ## Accessibility
84
+ *
85
+ * Includes `role="progressbar"` with `aria-valuenow`, `aria-valuemin`, and `aria-valuemax`.
65
86
  */
66
87
  ])), function (p) { return p.thickness; }, function (p) { return p.width && css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["width: ", ";"], ["width: ", ";"])), p.width); }, function (p) { return p.padded && css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["margin: 10px;"], ["margin: 10px;"]))); }, function (p) { return p.theme.colors.neutral[50]; }, function (p) { return p.thickness / 2; }, FillInner, function (p) { var _a; return (_a = p.color) !== null && _a !== void 0 ? _a : p.theme.colors.primary[1]; });
67
88
  /**
68
- * A visual progress bar component that shows completion of a task, range, or
69
- * metric.
89
+ * A horizontal progress bar showing completion percentage.
70
90
  *
71
- * - Automatically clamps `value` between `0` and `100`.
72
- * - Fully responsive and stretches to available width.
73
- * - Animated bar fill when `value` changes.
74
- * - Optionally displays percentage value text.
91
+ * Displays an animated fill representing a value from 0-100. Values outside
92
+ * this range are automatically clamped. Stretches to fill available width.
75
93
  *
76
- * The bar always stretches to fill all horizontal space available to it.
94
+ * ## Usage
77
95
  *
78
- * @example
79
96
  * ```tsx
80
- * <Progress value={45} numbered color="#00c2a8" thickness={8} />
97
+ * // Basic progress
98
+ * <Progress value={45} />
99
+ *
100
+ * // With percentage label
101
+ * <Progress value={75} numbered />
102
+ *
103
+ * // Custom color and thickness
104
+ * <Progress value={60} color="#00c2a8" thickness={8} />
105
+ *
106
+ * // Fixed width with padding
107
+ * <Progress value={30} width="200px" padded />
81
108
  * ```
109
+ *
110
+ * ## Props
111
+ *
112
+ * | Prop | Description |
113
+ * |------|-------------|
114
+ * | `value` | Percentage complete (0-100, clamped) |
115
+ * | `numbered` | Show percentage text centered on bar |
116
+ * | `thickness` | Bar height in pixels (default: 5) |
117
+ * | `color` | Custom fill color (default: theme primary) |
118
+ * | `width` | Fixed width (CSS value); otherwise fills container |
119
+ * | `padded` | Add 10px margin around bar |
120
+ *
121
+ * ## Accessibility
122
+ *
123
+ * Includes `role="progressbar"` with `aria-valuenow`, `aria-valuemin`, and `aria-valuemax`.
82
124
  */
83
125
  var Progress = function (_a) {
84
126
  var _b = _a.thickness, thickness = _b === void 0 ? 5 : _b, _c = _a.numbered, numbered = _c === void 0 ? false : _c, _d = _a.padded, padded = _d === void 0 ? false : _d, props = __rest(_a, ["thickness", "numbered", "padded"]);
@@ -1 +1,2 @@
1
- export * from './Progress';
1
+ export { Progress } from './Progress';
2
+ export type { IProgressProps } from './Progress';
@@ -1 +1 @@
1
- export * from './Progress';
1
+ export { Progress } from './Progress';
@@ -44,18 +44,44 @@ interface ISecondaryButtonProps {
44
44
  onClick: (e?: React.MouseEvent) => void;
45
45
  }
46
46
  /**
47
- * The `SecondaryButton` is a small button that holds only an icon. It has no
48
- * other content. It renders as a `<button>` element. Although the button
49
- * shows only an icon, its `title` attribute is mandatory, and used as
50
- * a `aria-label`, so screenreaders can understand the button's purpose.
47
+ * A compact icon-only button for secondary actions.
51
48
  *
52
- * The color of the button defaults to a neutral theme color, unless overridden
53
- * with `positive`, `negative` or `color`.
49
+ * Renders a 32×32px `<button>` containing only an icon. The `title` prop is
50
+ * required and used as `aria-label` for screen reader accessibility.
54
51
  *
55
- * A `disabled` button cannot be clicked at all.
52
+ * ## Usage
53
+ *
54
+ * ```tsx
55
+ * // Basic icon button
56
+ * <SecondaryButton icon={SVG.Icons.Close} title="Close" onClick={handleClose} />
57
+ *
58
+ * // Positive action (green)
59
+ * <SecondaryButton positive icon={SVG.Icons.Check} title="Approve" onClick={handleApprove} />
60
+ *
61
+ * // Negative action (red)
62
+ * <SecondaryButton negative icon={SVG.Icons.Trash} title="Delete" onClick={handleDelete} />
63
+ *
64
+ * // Custom color
65
+ * <SecondaryButton color="purple" icon={SVG.Icons.Star} title="Favorite" onClick={handleFavorite} />
66
+ *
67
+ * // Disabled state
68
+ * <SecondaryButton disabled icon={SVG.Icons.Edit} title="Edit" onClick={handleEdit} />
69
+ * ```
70
+ *
71
+ * ## Props
72
+ *
73
+ * | Prop | Description |
74
+ * |------|-------------|
75
+ * | `icon` | SVG path or `IIconProps` (required) |
76
+ * | `title` | Tooltip and aria-label (required) |
77
+ * | `positive` | Green color for confirmations |
78
+ * | `negative` | Red color for destructive actions |
79
+ * | `color` | Custom background color (CSS value) |
80
+ * | `disabled` | Prevents interaction |
56
81
  */
57
82
  declare const SecondaryButton: {
58
83
  ({ disabled, positive, negative, ...props }: ISecondaryButtonProps): React.JSX.Element;
59
84
  displayName: string;
60
85
  };
61
- export { SecondaryButton, ISecondaryButtonProps };
86
+ export { SecondaryButton };
87
+ export type { ISecondaryButtonProps };
@@ -53,27 +53,77 @@ var SecondaryButtonStyled = styled(SecondaryButtonBase).attrs(function (p) {
53
53
  };
54
54
  })(templateObject_3 || (templateObject_3 = __makeTemplateObject([" \n // Size:\n height: 32px;\n width: 32px;\n\n // Presentation:\n background-color: ", ";\n // (Note that there is no hover state.)\n transition: \n background-color ease-in-out ", "ms, \n box-shadow ease-in-out ", "ms;\n border-radius: ", "px;\n border: none;\n cursor: pointer;\n user-select: none;\n outline: none;\n box-shadow: ", ";\n\n // Content alignment:\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n white-space: nowrap;\n\n &:hover {\n box-shadow: ", ";\n }\n\n &:focus {\n outline: solid 2px ", ";\n }\n\n // Button changes background & removes dropshadow when pressed:\n &:active {\n // Button background stays the same in case of color buttons:\n ", "\n box-shadow: none;\n }\n\n svg {\n width: 13px;\n height: 13px;\n } \n\n ", "\n"], [" \n // Size:\n height: 32px;\n width: 32px;\n\n // Presentation:\n background-color: ", ";\n // (Note that there is no hover state.)\n transition: \n background-color ease-in-out ", "ms, \n box-shadow ease-in-out ", "ms;\n border-radius: ", "px;\n border: none;\n cursor: pointer;\n user-select: none;\n outline: none;\n box-shadow: ", ";\n\n // Content alignment:\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n white-space: nowrap;\n\n &:hover {\n box-shadow: ", ";\n }\n\n &:focus {\n outline: solid 2px ", ";\n }\n\n // Button changes background & removes dropshadow when pressed:\n &:active {\n // Button background stays the same in case of color buttons:\n ", "\n box-shadow: none;\n }\n\n svg {\n width: 13px;\n height: 13px;\n } \n\n ", "\n"
55
55
  /**
56
- * The `SecondaryButton` is a small button that holds only an icon. It has no
57
- * other content. It renders as a `<button>` element. Although the button
58
- * shows only an icon, its `title` attribute is mandatory, and used as
59
- * a `aria-label`, so screenreaders can understand the button's purpose.
56
+ * A compact icon-only button for secondary actions.
60
57
  *
61
- * The color of the button defaults to a neutral theme color, unless overridden
62
- * with `positive`, `negative` or `color`.
58
+ * Renders a 32×32px `<button>` containing only an icon. The `title` prop is
59
+ * required and used as `aria-label` for screen reader accessibility.
63
60
  *
64
- * A `disabled` button cannot be clicked at all.
61
+ * ## Usage
62
+ *
63
+ * ```tsx
64
+ * // Basic icon button
65
+ * <SecondaryButton icon={SVG.Icons.Close} title="Close" onClick={handleClose} />
66
+ *
67
+ * // Positive action (green)
68
+ * <SecondaryButton positive icon={SVG.Icons.Check} title="Approve" onClick={handleApprove} />
69
+ *
70
+ * // Negative action (red)
71
+ * <SecondaryButton negative icon={SVG.Icons.Trash} title="Delete" onClick={handleDelete} />
72
+ *
73
+ * // Custom color
74
+ * <SecondaryButton color="purple" icon={SVG.Icons.Star} title="Favorite" onClick={handleFavorite} />
75
+ *
76
+ * // Disabled state
77
+ * <SecondaryButton disabled icon={SVG.Icons.Edit} title="Edit" onClick={handleEdit} />
78
+ * ```
79
+ *
80
+ * ## Props
81
+ *
82
+ * | Prop | Description |
83
+ * |------|-------------|
84
+ * | `icon` | SVG path or `IIconProps` (required) |
85
+ * | `title` | Tooltip and aria-label (required) |
86
+ * | `positive` | Green color for confirmations |
87
+ * | `negative` | Red color for destructive actions |
88
+ * | `color` | Custom background color (CSS value) |
89
+ * | `disabled` | Prevents interaction |
65
90
  */
66
91
  ])), function (p) { return p.$backgroundColor; }, function (p) { return p.theme.animation.duration; }, function (p) { return p.theme.animation.duration; }, function (p) { return p.theme.radius.normal; }, function (p) { return p.theme.shadows.small; }, function (p) { return p.theme.shadows.medium; }, function (p) { return p.theme.colors.primary[1]; }, function (p) { return !p.positive && !p.negative && !p.color && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["background-color: ", ";"], ["background-color: ", ";"])), p.theme.colors.neutral[10]); }, function (p) { return p.disabled && css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n cursor: auto;\n pointer-events: none;\n box-shadow: none;\n svg {\n fill: ", ";\n }\n "], ["\n cursor: auto;\n pointer-events: none;\n box-shadow: none;\n svg {\n fill: ", ";\n }\n "])), p.theme.colors.primary[3]); });
67
92
  /**
68
- * The `SecondaryButton` is a small button that holds only an icon. It has no
69
- * other content. It renders as a `<button>` element. Although the button
70
- * shows only an icon, its `title` attribute is mandatory, and used as
71
- * a `aria-label`, so screenreaders can understand the button's purpose.
93
+ * A compact icon-only button for secondary actions.
94
+ *
95
+ * Renders a 32×32px `<button>` containing only an icon. The `title` prop is
96
+ * required and used as `aria-label` for screen reader accessibility.
97
+ *
98
+ * ## Usage
99
+ *
100
+ * ```tsx
101
+ * // Basic icon button
102
+ * <SecondaryButton icon={SVG.Icons.Close} title="Close" onClick={handleClose} />
103
+ *
104
+ * // Positive action (green)
105
+ * <SecondaryButton positive icon={SVG.Icons.Check} title="Approve" onClick={handleApprove} />
106
+ *
107
+ * // Negative action (red)
108
+ * <SecondaryButton negative icon={SVG.Icons.Trash} title="Delete" onClick={handleDelete} />
109
+ *
110
+ * // Custom color
111
+ * <SecondaryButton color="purple" icon={SVG.Icons.Star} title="Favorite" onClick={handleFavorite} />
112
+ *
113
+ * // Disabled state
114
+ * <SecondaryButton disabled icon={SVG.Icons.Edit} title="Edit" onClick={handleEdit} />
115
+ * ```
72
116
  *
73
- * The color of the button defaults to a neutral theme color, unless overridden
74
- * with `positive`, `negative` or `color`.
117
+ * ## Props
75
118
  *
76
- * A `disabled` button cannot be clicked at all.
119
+ * | Prop | Description |
120
+ * |------|-------------|
121
+ * | `icon` | SVG path or `IIconProps` (required) |
122
+ * | `title` | Tooltip and aria-label (required) |
123
+ * | `positive` | Green color for confirmations |
124
+ * | `negative` | Red color for destructive actions |
125
+ * | `color` | Custom background color (CSS value) |
126
+ * | `disabled` | Prevents interaction |
77
127
  */
78
128
  var SecondaryButton = function (_a) {
79
129
  var _b = _a.disabled, disabled = _b === void 0 ? false : _b, _c = _a.positive, positive = _c === void 0 ? false : _c, _d = _a.negative, negative = _d === void 0 ? false : _d, props = __rest(_a, ["disabled", "positive", "negative"]);
@@ -1 +1,2 @@
1
1
  export { SecondaryButton } from './SecondaryButton';
2
+ export type { ISecondaryButtonProps } from './SecondaryButton';
@@ -1,3 +1,33 @@
1
1
  import * as React from 'react';
2
- declare const SpeechRecognizer: () => React.JSX.Element;
2
+ /**
3
+ * A floating action button that enables speech-to-text input.
4
+ *
5
+ * Uses the browser's Web Speech API to transcribe spoken words into the
6
+ * currently focused input, textarea, or contentEditable element. Automatically
7
+ * hides if the browser doesn't support speech recognition.
8
+ *
9
+ * ## Usage
10
+ *
11
+ * ```tsx
12
+ * // Add anywhere in your app - it tracks focused inputs automatically
13
+ * <SpeechRecognizer />
14
+ * ```
15
+ *
16
+ * ## Behavior
17
+ *
18
+ * - Click to start/stop listening
19
+ * - Transcribed text inserts at cursor position in focused input
20
+ * - Works with `<input>`, `<textarea>`, and TipTap editors
21
+ * - Shows "Listening" state while active
22
+ * - Returns `null` if browser doesn't support Speech Recognition API
23
+ *
24
+ * ## Browser Support
25
+ *
26
+ * Requires `SpeechRecognition` or `webkitSpeechRecognition` API.
27
+ * Supported in Chrome, Edge, and Safari. Not supported in Firefox.
28
+ */
29
+ declare const SpeechRecognizer: {
30
+ (): React.JSX.Element;
31
+ displayName: string;
32
+ };
3
33
  export { SpeechRecognizer };
@@ -3,6 +3,33 @@ import { Fab } from '../Fab';
3
3
  import { SVG } from '../../svg';
4
4
  import { EditorRegistry } from './EditorRegistry';
5
5
  var SpeechRecognition = window.SpeechRecognition || window.webkitSpeechRecognition;
6
+ /**
7
+ * A floating action button that enables speech-to-text input.
8
+ *
9
+ * Uses the browser's Web Speech API to transcribe spoken words into the
10
+ * currently focused input, textarea, or contentEditable element. Automatically
11
+ * hides if the browser doesn't support speech recognition.
12
+ *
13
+ * ## Usage
14
+ *
15
+ * ```tsx
16
+ * // Add anywhere in your app - it tracks focused inputs automatically
17
+ * <SpeechRecognizer />
18
+ * ```
19
+ *
20
+ * ## Behavior
21
+ *
22
+ * - Click to start/stop listening
23
+ * - Transcribed text inserts at cursor position in focused input
24
+ * - Works with `<input>`, `<textarea>`, and TipTap editors
25
+ * - Shows "Listening" state while active
26
+ * - Returns `null` if browser doesn't support Speech Recognition API
27
+ *
28
+ * ## Browser Support
29
+ *
30
+ * Requires `SpeechRecognition` or `webkitSpeechRecognition` API.
31
+ * Supported in Chrome, Edge, and Safari. Not supported in Firefox.
32
+ */
6
33
  var SpeechRecognizer = function () {
7
34
  var _a = React.useState(false), listening = _a[0], setListening = _a[1];
8
35
  var recognitionRef = React.useRef(null);
@@ -24,7 +51,7 @@ var SpeechRecognizer = function () {
24
51
  .filter(function (r) { return !r.isFinal && r.length > 0; })
25
52
  .reduce(function (acc, r) { return acc + r[0].transcript; }, "");
26
53
  if (focusedElementRef.current instanceof HTMLDivElement) {
27
- if (initialRef.current == false) {
54
+ if (initialRef.current === false) {
28
55
  EditorRegistry.getEditor(focusedElementRef.current).commands.undo();
29
56
  }
30
57
  EditorRegistry.getEditor(focusedElementRef.current).commands.insertContent(final + interim);
@@ -115,4 +142,5 @@ var SpeechRecognizer = function () {
115
142
  }
116
143
  return (React.createElement(Fab, { icon: SVG.Icons.Microphone, active: listening, nofocus: true, onClick: handleClick }, listening ? 'Listening' : 'Listen'));
117
144
  };
145
+ SpeechRecognizer.displayName = "SpeechRecognizer";
118
146
  export { SpeechRecognizer };
@@ -1 +1 @@
1
- export * from './SpeechRecognizer';
1
+ export { SpeechRecognizer } from './SpeechRecognizer';
@@ -1 +1 @@
1
- export * from './SpeechRecognizer';
1
+ export { SpeechRecognizer } from './SpeechRecognizer';
@@ -17,6 +17,7 @@ interface ITabProps {
17
17
  */
18
18
  onClick?: () => void;
19
19
  /**
20
+ * @ignore
20
21
  * If true, applies ghost state to `Tab`.
21
22
  * @default false
22
23
  */
@@ -36,5 +37,34 @@ interface ITabProps {
36
37
  */
37
38
  size?: 'small' | 'large';
38
39
  }
40
+ /**
41
+ * An individual tab within a `TabBar`.
42
+ *
43
+ * Tabs display text content and optionally a badge. The parent `TabBar`
44
+ * manages the active state and click handling automatically.
45
+ *
46
+ * ## Usage
47
+ *
48
+ * ```tsx
49
+ * <TabBar active={0} onChange={setActive}>
50
+ * <TabBar.Tab>First Tab</TabBar.Tab>
51
+ * <TabBar.Tab badge={5}>With Badge</TabBar.Tab>
52
+ * <TabBar.Tab onClick={() => console.log('clicked')}>With Handler</TabBar.Tab>
53
+ * </TabBar>
54
+ * ```
55
+ *
56
+ * ## Props
57
+ *
58
+ * | Prop | Description |
59
+ * |------|-------------|
60
+ * | `children` | Tab label content |
61
+ * | `badge` | Optional badge (e.g., notification count) |
62
+ * | `onClick` | Additional click handler (called with `TabBar.onChange`) |
63
+ * | `tabWidth` | Fixed width in pixels (usually set on parent) |
64
+ * | `size` | Font size: "small" or "large" (inherited from parent) |
65
+ * | `ghost` | Skeleton loading state (inherited from parent) |
66
+ * | `disabled` | Prevent interaction (inherited from parent) |
67
+ */
39
68
  declare const Tab: React.ForwardRefExoticComponent<ITabProps & React.RefAttributes<HTMLDivElement>>;
40
- export { Tab, ITabProps };
69
+ export { Tab };
70
+ export type { ITabProps };
@@ -40,7 +40,64 @@ var TabBase = React.forwardRef(function (props, ref) {
40
40
  });
41
41
  var TabStyled = styled(TabBase)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n position: relative;\n padding: 0 20px;\n\n font: ", ";\n box-sizing: border-box;\n ", "\n height: ", "px;\n z-index: 1;\n cursor: pointer;\n color: ", ";\n transition: color ", "ms ease-in-out;\n\n /* User cannot select header text.\n * This prevents accidental selection when clicking the tab.\n */\n user-select: none; \n\n ", " \n &:hover {\n color: ", ";\n }\n\n // Ghost and disabled cannot be clicked:\n ", "\n\n // Disabled:\n ", "\n\n // Ghost state:\n ", " \n"], ["\n position: relative;\n padding: 0 20px;\n\n font: ", ";\n box-sizing: border-box;\n ", "\n height: ", "px;\n z-index: 1;\n cursor: pointer;\n color: ", ";\n transition: color ", "ms ease-in-out;\n\n /* User cannot select header text.\n * This prevents accidental selection when clicking the tab.\n */\n user-select: none; \n\n ", " \n &:hover {\n color: ", ";\n }\n\n // Ghost and disabled cannot be clicked:\n ", "\n\n // Disabled:\n ", "\n\n // Ghost state:\n ", " \n"])), function (p) { return p.size === 'small' ? p.theme.font.labelSmall : p.theme.font.labelLarge; }, function (p) { return p.tabWidth && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["min-width: ", "px;"], ["min-width: ", "px;"])), p.tabWidth); }, function (p) { return p.size === 'small' ? 30 : 40; }, function (p) { return p.theme.colors.neutral[80]; }, function (p) { return p.theme.animation.duration; }, function (p) { return p.active && css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n color: ", ";\n "], ["\n color: ", ";\n "])), function (p) { return p.theme.colors.neutral[100]; }); }, function (p) { return p.theme.colors.neutral[100]; }, function (p) { return (p.ghost || p.disabled) && css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n pointer-events: none;\n "], ["\n pointer-events: none;\n "]))); }, function (p) { return p.disabled && css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n color: ", ";\n &:hover {\n color: ", ";\n }\n "], ["\n color: ", ";\n &:hover {\n color: ", ";\n }\n "])), function (p) { return p.theme.colors.neutral[50]; }, function (p) { return p.theme.colors.neutral[50]; }); }, function (p) { return p.ghost && css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n & > *:not(:first-child) {\n visibility: hidden;\n } \n "], ["\n & > *:not(:first-child) {\n visibility: hidden;\n } \n "]))); });
42
42
  var Content = styled.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 4px;\n white-space: nowrap;\n height: 100%;\n"], ["\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 4px;\n white-space: nowrap;\n height: 100%;\n"])));
43
- var Badge = styled.div(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n background: ", ";\n border-radius: ", "px;\n padding: 0 6px;\n font: ", ";\n"], ["\n background: ", ";\n border-radius: ", "px;\n padding: 0 6px;\n font: ", ";\n"])), function (p) { return p.theme.colors.primary[5]; }, function (p) { return p.theme.radius.normal; }, function (p) { return p.theme.font.labelSmall; });
43
+ var Badge = styled.div(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n background: ", ";\n border-radius: ", "px;\n padding: 0 6px;\n font: ", ";\n"], ["\n background: ", ";\n border-radius: ", "px;\n padding: 0 6px;\n font: ", ";\n"
44
+ /**
45
+ * An individual tab within a `TabBar`.
46
+ *
47
+ * Tabs display text content and optionally a badge. The parent `TabBar`
48
+ * manages the active state and click handling automatically.
49
+ *
50
+ * ## Usage
51
+ *
52
+ * ```tsx
53
+ * <TabBar active={0} onChange={setActive}>
54
+ * <TabBar.Tab>First Tab</TabBar.Tab>
55
+ * <TabBar.Tab badge={5}>With Badge</TabBar.Tab>
56
+ * <TabBar.Tab onClick={() => console.log('clicked')}>With Handler</TabBar.Tab>
57
+ * </TabBar>
58
+ * ```
59
+ *
60
+ * ## Props
61
+ *
62
+ * | Prop | Description |
63
+ * |------|-------------|
64
+ * | `children` | Tab label content |
65
+ * | `badge` | Optional badge (e.g., notification count) |
66
+ * | `onClick` | Additional click handler (called with `TabBar.onChange`) |
67
+ * | `tabWidth` | Fixed width in pixels (usually set on parent) |
68
+ * | `size` | Font size: "small" or "large" (inherited from parent) |
69
+ * | `ghost` | Skeleton loading state (inherited from parent) |
70
+ * | `disabled` | Prevent interaction (inherited from parent) |
71
+ */
72
+ ])), function (p) { return p.theme.colors.primary[5]; }, function (p) { return p.theme.radius.normal; }, function (p) { return p.theme.font.labelSmall; });
73
+ /**
74
+ * An individual tab within a `TabBar`.
75
+ *
76
+ * Tabs display text content and optionally a badge. The parent `TabBar`
77
+ * manages the active state and click handling automatically.
78
+ *
79
+ * ## Usage
80
+ *
81
+ * ```tsx
82
+ * <TabBar active={0} onChange={setActive}>
83
+ * <TabBar.Tab>First Tab</TabBar.Tab>
84
+ * <TabBar.Tab badge={5}>With Badge</TabBar.Tab>
85
+ * <TabBar.Tab onClick={() => console.log('clicked')}>With Handler</TabBar.Tab>
86
+ * </TabBar>
87
+ * ```
88
+ *
89
+ * ## Props
90
+ *
91
+ * | Prop | Description |
92
+ * |------|-------------|
93
+ * | `children` | Tab label content |
94
+ * | `badge` | Optional badge (e.g., notification count) |
95
+ * | `onClick` | Additional click handler (called with `TabBar.onChange`) |
96
+ * | `tabWidth` | Fixed width in pixels (usually set on parent) |
97
+ * | `size` | Font size: "small" or "large" (inherited from parent) |
98
+ * | `ghost` | Skeleton loading state (inherited from parent) |
99
+ * | `disabled` | Prevent interaction (inherited from parent) |
100
+ */
44
101
  var Tab = React.forwardRef(function (_a, ref) {
45
102
  var _b = _a.ghost, ghost = _b === void 0 ? false : _b, _c = _a.disabled, disabled = _c === void 0 ? false : _c, _d = _a.size, size = _d === void 0 ? 'large' : _d, props = __rest(_a, ["ghost", "disabled", "size"]);
46
103
  return React.createElement(TabStyled, __assign({ ref: ref, ghost: ghost, disabled: disabled, size: size }, props));
@@ -55,15 +55,53 @@ interface ITabBarProps {
55
55
  line?: boolean;
56
56
  }
57
57
  /**
58
- * A `TabBar` presents an array of `TabBar.Tab` children in a horizontal bar,
59
- * with an underliner under the active child. The `onClick(idx)` event is fired
60
- * when a tab is clicked.
58
+ * A horizontal tab navigation bar with animated underline indicator.
61
59
  *
62
- * This is just a `TabBar`; if you need tabs and panes, use the `Tab` container.
60
+ * Displays `TabBar.Tab` children with a sliding underline beneath the active tab.
61
+ * Supports drag-scrolling when tabs overflow the container width.
62
+ *
63
+ * ## Usage
64
+ *
65
+ * ```tsx
66
+ * // Basic tab bar
67
+ * <TabBar active={activeTab} onChange={setActiveTab}>
68
+ * <TabBar.Tab>Overview</TabBar.Tab>
69
+ * <TabBar.Tab>Details</TabBar.Tab>
70
+ * <TabBar.Tab>Settings</TabBar.Tab>
71
+ * </TabBar>
72
+ *
73
+ * // With badges and fixed width
74
+ * <TabBar active={0} tabWidth={120}>
75
+ * <TabBar.Tab badge={5}>Inbox</TabBar.Tab>
76
+ * <TabBar.Tab>Sent</TabBar.Tab>
77
+ * </TabBar>
78
+ *
79
+ * // Small size, centered
80
+ * <TabBar size="small" align="center">
81
+ * <TabBar.Tab>Tab 1</TabBar.Tab>
82
+ * <TabBar.Tab>Tab 2</TabBar.Tab>
83
+ * </TabBar>
84
+ * ```
85
+ *
86
+ * ## Props
87
+ *
88
+ * | Prop | Description |
89
+ * |------|-------------|
90
+ * | `active` | Zero-based index of active tab (default: 0) |
91
+ * | `onChange` | Callback when tab changes: `(index) => void` |
92
+ * | `tabWidth` | Fixed tab width in pixels (default: fluid) |
93
+ * | `align` | Tab alignment: "left", "center", "right" |
94
+ * | `size` | Font size: "small" or "large" (default) |
95
+ * | `ghost` | Skeleton loading state |
96
+ * | `disabled` | Prevent tab interactions |
97
+ * | `line` | Show bottom border |
98
+ *
99
+ * For tab content panels, use the `Tabs` container instead.
63
100
  */
64
101
  declare const TabBar: {
65
102
  ({ active, ghost, disabled, align, size, ...props }: ITabBarProps): React.JSX.Element;
66
103
  Tab: React.ForwardRefExoticComponent<import("./Tab").ITabProps & React.RefAttributes<HTMLDivElement>>;
67
104
  displayName: string;
68
105
  };
69
- export { TabBar, ITabBarProps };
106
+ export { TabBar };
107
+ export type { ITabBarProps };
@@ -213,19 +213,93 @@ var TabBarBase = function (props) {
213
213
  var Slider = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n // Position & size:\n position: absolute;\n left: 0;\n top: 0;\n width: auto !important;\n min-width: 100%;\n\n // Content:\n box-sizing: border-box;\n display: flex;\n flex-direction: row;\n justify-content: start;\n flex-wrap: nowrap;\n align-items: center;\n"], ["\n // Position & size:\n position: absolute;\n left: 0;\n top: 0;\n width: auto !important;\n min-width: 100%;\n\n // Content:\n box-sizing: border-box;\n display: flex;\n flex-direction: row;\n justify-content: start;\n flex-wrap: nowrap;\n align-items: center;\n"])));
214
214
  var TabBarStyled = styled(TabBarBase)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n position: relative;\n display: block;\n height: ", "px;\n min-height: ", "px;\n overflow-x: hidden;\n overflow-y: hidden;\n ", " {\n border-color: ", ";\n ", "\n ", "\n height: ", "px;\n border-bottom: solid 1px ", "; \n }\n"], ["\n position: relative;\n display: block;\n height: ", "px;\n min-height: ", "px;\n overflow-x: hidden;\n overflow-y: hidden;\n ", " {\n border-color: ", ";\n ", "\n ", "\n height: ", "px;\n border-bottom: solid 1px ", "; \n }\n"
215
215
  /**
216
- * A `TabBar` presents an array of `TabBar.Tab` children in a horizontal bar,
217
- * with an underliner under the active child. The `onClick(idx)` event is fired
218
- * when a tab is clicked.
216
+ * A horizontal tab navigation bar with animated underline indicator.
219
217
  *
220
- * This is just a `TabBar`; if you need tabs and panes, use the `Tab` container.
218
+ * Displays `TabBar.Tab` children with a sliding underline beneath the active tab.
219
+ * Supports drag-scrolling when tabs overflow the container width.
220
+ *
221
+ * ## Usage
222
+ *
223
+ * ```tsx
224
+ * // Basic tab bar
225
+ * <TabBar active={activeTab} onChange={setActiveTab}>
226
+ * <TabBar.Tab>Overview</TabBar.Tab>
227
+ * <TabBar.Tab>Details</TabBar.Tab>
228
+ * <TabBar.Tab>Settings</TabBar.Tab>
229
+ * </TabBar>
230
+ *
231
+ * // With badges and fixed width
232
+ * <TabBar active={0} tabWidth={120}>
233
+ * <TabBar.Tab badge={5}>Inbox</TabBar.Tab>
234
+ * <TabBar.Tab>Sent</TabBar.Tab>
235
+ * </TabBar>
236
+ *
237
+ * // Small size, centered
238
+ * <TabBar size="small" align="center">
239
+ * <TabBar.Tab>Tab 1</TabBar.Tab>
240
+ * <TabBar.Tab>Tab 2</TabBar.Tab>
241
+ * </TabBar>
242
+ * ```
243
+ *
244
+ * ## Props
245
+ *
246
+ * | Prop | Description |
247
+ * |------|-------------|
248
+ * | `active` | Zero-based index of active tab (default: 0) |
249
+ * | `onChange` | Callback when tab changes: `(index) => void` |
250
+ * | `tabWidth` | Fixed tab width in pixels (default: fluid) |
251
+ * | `align` | Tab alignment: "left", "center", "right" |
252
+ * | `size` | Font size: "small" or "large" (default) |
253
+ * | `ghost` | Skeleton loading state |
254
+ * | `disabled` | Prevent tab interactions |
255
+ * | `line` | Show bottom border |
256
+ *
257
+ * For tab content panels, use the `Tabs` container instead.
221
258
  */
222
259
  ])), function (p) { return p.size === 'small' ? 30 : 40; }, function (p) { return p.size === 'small' ? 30 : 40; }, Slider, function (p) { return (p.disabled || p.ghost) ? p.theme.colors.neutral[50] : p.theme.colors.neutral[80]; }, function (p) { return p.align === 'right' && css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["justify-content: end;"], ["justify-content: end;"]))); }, function (p) { return p.align === 'center' && css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["justify-content: center;"], ["justify-content: center;"]))); }, function (p) { return p.size === 'small' ? 30 : 40; }, function (p) { return p.line ? p.theme.colors.neutral[80] : "transparent"; });
223
260
  /**
224
- * A `TabBar` presents an array of `TabBar.Tab` children in a horizontal bar,
225
- * with an underliner under the active child. The `onClick(idx)` event is fired
226
- * when a tab is clicked.
261
+ * A horizontal tab navigation bar with animated underline indicator.
262
+ *
263
+ * Displays `TabBar.Tab` children with a sliding underline beneath the active tab.
264
+ * Supports drag-scrolling when tabs overflow the container width.
265
+ *
266
+ * ## Usage
267
+ *
268
+ * ```tsx
269
+ * // Basic tab bar
270
+ * <TabBar active={activeTab} onChange={setActiveTab}>
271
+ * <TabBar.Tab>Overview</TabBar.Tab>
272
+ * <TabBar.Tab>Details</TabBar.Tab>
273
+ * <TabBar.Tab>Settings</TabBar.Tab>
274
+ * </TabBar>
275
+ *
276
+ * // With badges and fixed width
277
+ * <TabBar active={0} tabWidth={120}>
278
+ * <TabBar.Tab badge={5}>Inbox</TabBar.Tab>
279
+ * <TabBar.Tab>Sent</TabBar.Tab>
280
+ * </TabBar>
281
+ *
282
+ * // Small size, centered
283
+ * <TabBar size="small" align="center">
284
+ * <TabBar.Tab>Tab 1</TabBar.Tab>
285
+ * <TabBar.Tab>Tab 2</TabBar.Tab>
286
+ * </TabBar>
287
+ * ```
288
+ *
289
+ * ## Props
290
+ *
291
+ * | Prop | Description |
292
+ * |------|-------------|
293
+ * | `active` | Zero-based index of active tab (default: 0) |
294
+ * | `onChange` | Callback when tab changes: `(index) => void` |
295
+ * | `tabWidth` | Fixed tab width in pixels (default: fluid) |
296
+ * | `align` | Tab alignment: "left", "center", "right" |
297
+ * | `size` | Font size: "small" or "large" (default) |
298
+ * | `ghost` | Skeleton loading state |
299
+ * | `disabled` | Prevent tab interactions |
300
+ * | `line` | Show bottom border |
227
301
  *
228
- * This is just a `TabBar`; if you need tabs and panes, use the `Tab` container.
302
+ * For tab content panels, use the `Tabs` container instead.
229
303
  */
230
304
  var TabBar = function (_a) {
231
305
  var _b = _a.active, active = _b === void 0 ? 0 : _b, _c = _a.ghost, ghost = _c === void 0 ? false : _c, _d = _a.disabled, disabled = _d === void 0 ? false : _d, _e = _a.align, align = _e === void 0 ? 'left' : _e, _f = _a.size, size = _f === void 0 ? 'large' : _f, props = __rest(_a, ["active", "ghost", "disabled", "align", "size"]);
@@ -1 +1,3 @@
1
- export * from './TabBar';
1
+ export { TabBar } from './TabBar';
2
+ export type { ITabBarProps } from './TabBar';
3
+ export type { ITabProps } from './Tab';
@@ -1 +1 @@
1
- export * from './TabBar';
1
+ export { TabBar } from './TabBar';