@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.
- package/controls/Chip/Chip.d.ts +41 -13
- package/controls/Chip/Chip.js +76 -22
- package/controls/Chip/index.d.ts +2 -1
- package/controls/Chip/index.js +1 -1
- package/controls/CircularProgress/CircularProgress.d.ts +38 -6
- package/controls/CircularProgress/CircularProgress.js +67 -17
- package/controls/CircularProgress/index.d.ts +1 -0
- package/controls/Dropzone/Dropzone.d.ts +42 -10
- package/controls/Dropzone/Dropzone.js +76 -16
- package/controls/Dropzone/index.d.ts +1 -0
- package/controls/Fab/Fab.d.ts +40 -15
- package/controls/Fab/Fab.js +76 -28
- package/controls/Fab/index.d.ts +2 -1
- package/controls/Fab/index.js +1 -1
- package/controls/Ghost/Ghost.d.ts +36 -0
- package/controls/Ghost/Ghost.js +72 -1
- package/controls/Ghost/index.d.ts +2 -1
- package/controls/Ghost/index.js +1 -1
- package/controls/Gradient/Gradient.d.ts +51 -5
- package/controls/Gradient/Gradient.js +98 -8
- package/controls/Gradient/index.d.ts +1 -0
- package/controls/Histogram/Histogram.d.ts +47 -6
- package/controls/Histogram/Histogram.js +84 -21
- package/controls/Histogram/HistogramAppearance.d.ts +2 -1
- package/controls/Histogram/IHistogramBin.d.ts +1 -1
- package/controls/Histogram/index.d.ts +5 -3
- package/controls/Histogram/index.js +2 -3
- package/controls/Icon/Icon.d.ts +50 -22
- package/controls/Icon/Icon.js +47 -18
- package/controls/Icon/index.d.ts +2 -1
- package/controls/Icon/index.js +1 -1
- package/controls/Key/Key.d.ts +39 -5
- package/controls/Key/Key.js +74 -8
- package/controls/Key/index.d.ts +2 -1
- package/controls/Key/index.js +1 -1
- package/controls/LinearChart/LinearChart.d.ts +36 -5
- package/controls/LinearChart/LinearChart.js +64 -6
- package/controls/LinearChart/index.d.ts +2 -1
- package/controls/LinearChart/index.js +1 -1
- package/controls/ListView/Column.d.ts +42 -5
- package/controls/ListView/Column.js +39 -3
- package/controls/ListView/IListViewProps.d.ts +2 -2
- package/controls/ListView/ListView.d.ts +58 -2
- package/controls/ListView/ListView.js +57 -2
- package/controls/ListView/index.d.ts +1 -0
- package/controls/Mouse/Mouse.d.ts +32 -7
- package/controls/Mouse/Mouse.js +60 -12
- package/controls/Mouse/index.d.ts +2 -1
- package/controls/Mouse/index.js +1 -1
- package/controls/PrimaryButton/PrimaryButton.d.ts +37 -9
- package/controls/PrimaryButton/PrimaryButton.js +70 -16
- package/controls/PrimaryButton/index.d.ts +2 -1
- package/controls/PrimaryButton/index.js +1 -1
- package/controls/Progress/Progress.d.ts +32 -10
- package/controls/Progress/Progress.js +60 -18
- package/controls/Progress/index.d.ts +2 -1
- package/controls/Progress/index.js +1 -1
- package/controls/SecondaryButton/SecondaryButton.d.ts +34 -8
- package/controls/SecondaryButton/SecondaryButton.js +64 -14
- package/controls/SecondaryButton/index.d.ts +1 -0
- package/controls/SpeechRecognizer/SpeechRecognizer.d.ts +31 -1
- package/controls/SpeechRecognizer/SpeechRecognizer.js +29 -1
- package/controls/SpeechRecognizer/index.d.ts +1 -1
- package/controls/SpeechRecognizer/index.js +1 -1
- package/controls/TabBar/Tab.d.ts +31 -1
- package/controls/TabBar/Tab.js +58 -1
- package/controls/TabBar/TabBar.d.ts +43 -5
- package/controls/TabBar/TabBar.js +82 -8
- package/controls/TabBar/index.d.ts +3 -1
- package/controls/TabBar/index.js +1 -1
- package/controls/TertiaryButton/TertiaryButton.d.ts +32 -7
- package/controls/TertiaryButton/TertiaryButton.js +60 -12
- package/controls/TertiaryButton/index.d.ts +2 -1
- package/controls/TertiaryButton/index.js +1 -1
- package/controls/ToggleButton/ToggleButton.d.ts +36 -3
- package/controls/ToggleButton/ToggleButton.js +69 -5
- package/controls/ToggleButton/index.d.ts +2 -1
- package/controls/ToggleButton/index.js +1 -1
- package/controls/View/View.d.ts +22 -8
- package/controls/View/View.js +40 -14
- package/controls/View/index.d.ts +2 -1
- package/controls/View/index.js +1 -1
- package/inputs/Dropdown/Dropdown.d.ts +2 -1
- package/inputs/Dropdown/index.d.ts +2 -1
- package/map/controls/CompassButton/CompassButton.d.ts +1 -1
- package/map/controls/FullscreenButton/FullscreenButton.d.ts +1 -1
- package/map/controls/ZoomInButton/ZoomInButton.d.ts +3 -2
- package/map/controls/ZoomOutButton/ZoomOutButton.d.ts +3 -2
- package/map/controls/base/MapButton/MapButton.d.ts +2 -1
- package/map/controls/base/MapButton/index.d.ts +2 -1
- package/map/layers/InterpolationLayer/ContoursFragmentShader.d.ts +1 -1
- package/map/layers/InterpolationLayer/ContoursFragmentShader.js +1 -1
- package/map/layers/InterpolationLayer/InterpolationLayer.d.ts +54 -5
- package/map/layers/InterpolationLayer/InterpolationLayer.js +52 -7
- package/map/layers/InterpolationLayer/index.d.ts +2 -1
- package/map/layers/InterpolationLayer/index.js +1 -1
- package/package.json +1 -1
- package/services/Toast/IToastMessage.d.ts +3 -3
- package/services/Toast/IToastProps.d.ts +1 -1
- package/services/Toast/Toast.d.ts +43 -5
- package/services/Toast/Toast.js +35 -4
- package/services/Toast/ToastContainer.d.ts +37 -4
- package/services/Toast/ToastContainer.js +75 -9
- package/services/Toast/ToastContext.d.ts +5 -4
- package/services/Toast/ToastProvider.js +16 -11
- package/services/Toast/useToast.d.ts +37 -1
- package/services/Toast/useToast.js +42 -2
package/controls/Chip/Chip.d.ts
CHANGED
|
@@ -18,21 +18,49 @@ interface IChipProps {
|
|
|
18
18
|
onClick: (e?: React.MouseEvent | React.KeyboardEvent) => void;
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
|
-
* A
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
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
|
|
65
|
+
export { Chip };
|
|
66
|
+
export type { IChipProps };
|
package/controls/Chip/Chip.js
CHANGED
|
@@ -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
|
|
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:
|
|
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
|
|
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
|
-
*
|
|
54
|
-
*
|
|
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
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
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
|
|
65
|
-
*
|
|
66
|
-
*
|
|
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
|
-
*
|
|
69
|
-
* set. This margin is only applied between `Chip` siblings.
|
|
126
|
+
* ## Spacing
|
|
70
127
|
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
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"]);
|
package/controls/Chip/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { Chip } from './Chip';
|
|
2
|
+
export type { IChipProps } from './Chip';
|
package/controls/Chip/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
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
|
|
26
|
+
* A circular progress indicator that displays a percentage value as an arc.
|
|
28
27
|
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
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:
|
|
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
|
|
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
|
-
*
|
|
58
|
-
*
|
|
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
|
|
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
|
-
*
|
|
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;
|
|
@@ -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
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
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
|
|
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
|
|
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
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
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
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
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
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
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"]);
|
package/controls/Fab/Fab.d.ts
CHANGED
|
@@ -58,26 +58,51 @@ interface IFabProps {
|
|
|
58
58
|
onClick: (e?: React.MouseEvent<HTMLButtonElement>) => void;
|
|
59
59
|
}
|
|
60
60
|
/**
|
|
61
|
-
*
|
|
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
|
|
66
|
-
*
|
|
67
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
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
|
|
107
|
+
export { Fab };
|
|
108
|
+
export type { IFabProps };
|