@longline/aqua-ui 1.0.302 → 1.0.303
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/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
|
@@ -32,17 +32,42 @@ interface ITertiaryButtonProps {
|
|
|
32
32
|
icon?: string | IIconProps;
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
36
|
-
* an `InfoBox`. It renders as a `<button>` element.
|
|
35
|
+
* A lightweight button for contextual actions within components.
|
|
37
36
|
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
37
|
+
* Renders a `<button>` with uppercase text styling. Suited for secondary
|
|
38
|
+
* actions within cards, info boxes, or other contained areas.
|
|
40
39
|
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
40
|
+
* ## Usage
|
|
41
|
+
*
|
|
42
|
+
* ```tsx
|
|
43
|
+
* // Basic button
|
|
44
|
+
* <TertiaryButton onClick={handleClick}>Learn More</TertiaryButton>
|
|
45
|
+
*
|
|
46
|
+
* // Primary variant (themed color)
|
|
47
|
+
* <TertiaryButton primary onClick={handleAction}>Submit</TertiaryButton>
|
|
48
|
+
*
|
|
49
|
+
* // With icon
|
|
50
|
+
* <TertiaryButton icon={SVG.Icons.Arrow} onClick={handleNext}>Next</TertiaryButton>
|
|
51
|
+
*
|
|
52
|
+
* // Custom width
|
|
53
|
+
* <TertiaryButton minWidth="150px" onClick={handleClick}>Wide Button</TertiaryButton>
|
|
54
|
+
*
|
|
55
|
+
* // Disabled state
|
|
56
|
+
* <TertiaryButton disabled onClick={handleClick}>Unavailable</TertiaryButton>
|
|
57
|
+
* ```
|
|
58
|
+
*
|
|
59
|
+
* ## Props
|
|
60
|
+
*
|
|
61
|
+
* | Prop | Description |
|
|
62
|
+
* |------|-------------|
|
|
63
|
+
* | `primary` | Use themed primary color instead of white |
|
|
64
|
+
* | `icon` | SVG path or `IIconProps` for leading icon |
|
|
65
|
+
* | `minWidth` | Minimum button width (default: "92px") |
|
|
66
|
+
* | `disabled` | Prevents interaction |
|
|
43
67
|
*/
|
|
44
68
|
declare const TertiaryButton: {
|
|
45
69
|
({ disabled, minWidth, ...props }: ITertiaryButtonProps): React.JSX.Element;
|
|
46
70
|
displayName: string;
|
|
47
71
|
};
|
|
48
|
-
export { TertiaryButton
|
|
72
|
+
export { TertiaryButton };
|
|
73
|
+
export type { ITertiaryButtonProps };
|
|
@@ -45,25 +45,73 @@ var TertiaryButtonBase = function (props) {
|
|
|
45
45
|
};
|
|
46
46
|
var TertiaryButtonStyled = styled(TertiaryButtonBase)(templateObject_3 || (templateObject_3 = __makeTemplateObject([" \n // Size:\n height: 42px;\n min-width: ", ";\n padding-left: 16px;\n padding-right: 16px;\n\n // Font\n font: ", ";\n color: ", ";\n\n // Presentation:\n background-color: ", ";\n border-radius: ", "px;\n transition: \n background-color ease-in-out ", "ms, \n box-shadow ease-in-out ", "ms;\n border: none;\n cursor: pointer;\n text-transform: uppercase;\n user-select: none;\n outline: none;\n\n // Content alignment:\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n flex-wrap: nowrap;\n white-space: nowrap;\n gap: 6px;\n \n // Shadow:\n box-shadow: ", ";\n &:hover {\n box-shadow: ", ";\n }\n &:active {\n ", " \n }\n\n // Disabled:\n ", "\n"], [" \n // Size:\n height: 42px;\n min-width: ", ";\n padding-left: 16px;\n padding-right: 16px;\n\n // Font\n font: ", ";\n color: ", ";\n\n // Presentation:\n background-color: ", ";\n border-radius: ", "px;\n transition: \n background-color ease-in-out ", "ms, \n box-shadow ease-in-out ", "ms;\n border: none;\n cursor: pointer;\n text-transform: uppercase;\n user-select: none;\n outline: none;\n\n // Content alignment:\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n flex-wrap: nowrap;\n white-space: nowrap;\n gap: 6px;\n \n // Shadow:\n box-shadow: ", ";\n &:hover {\n box-shadow: ", ";\n }\n &:active {\n ", " \n }\n\n // Disabled:\n ", "\n"
|
|
47
47
|
/**
|
|
48
|
-
*
|
|
49
|
-
* an `InfoBox`. It renders as a `<button>` element.
|
|
48
|
+
* A lightweight button for contextual actions within components.
|
|
50
49
|
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
50
|
+
* Renders a `<button>` with uppercase text styling. Suited for secondary
|
|
51
|
+
* actions within cards, info boxes, or other contained areas.
|
|
53
52
|
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
53
|
+
* ## Usage
|
|
54
|
+
*
|
|
55
|
+
* ```tsx
|
|
56
|
+
* // Basic button
|
|
57
|
+
* <TertiaryButton onClick={handleClick}>Learn More</TertiaryButton>
|
|
58
|
+
*
|
|
59
|
+
* // Primary variant (themed color)
|
|
60
|
+
* <TertiaryButton primary onClick={handleAction}>Submit</TertiaryButton>
|
|
61
|
+
*
|
|
62
|
+
* // With icon
|
|
63
|
+
* <TertiaryButton icon={SVG.Icons.Arrow} onClick={handleNext}>Next</TertiaryButton>
|
|
64
|
+
*
|
|
65
|
+
* // Custom width
|
|
66
|
+
* <TertiaryButton minWidth="150px" onClick={handleClick}>Wide Button</TertiaryButton>
|
|
67
|
+
*
|
|
68
|
+
* // Disabled state
|
|
69
|
+
* <TertiaryButton disabled onClick={handleClick}>Unavailable</TertiaryButton>
|
|
70
|
+
* ```
|
|
71
|
+
*
|
|
72
|
+
* ## Props
|
|
73
|
+
*
|
|
74
|
+
* | Prop | Description |
|
|
75
|
+
* |------|-------------|
|
|
76
|
+
* | `primary` | Use themed primary color instead of white |
|
|
77
|
+
* | `icon` | SVG path or `IIconProps` for leading icon |
|
|
78
|
+
* | `minWidth` | Minimum button width (default: "92px") |
|
|
79
|
+
* | `disabled` | Prevents interaction |
|
|
56
80
|
*/
|
|
57
81
|
])), function (p) { return p.minWidth ? p.minWidth : "92px"; }, function (p) { return p.theme.font.labelSmall; }, function (p) { return p.primary ? p.theme.colors.neutral[100] : p.theme.colors.primary[3]; }, function (p) { return p.primary ? p.theme.colors.primary[1] : p.theme.colors.neutral[100]; }, function (p) { return p.theme.radius.normal; }, function (p) { return p.theme.animation.duration; }, function (p) { return p.theme.animation.duration; }, function (p) { return p.theme.shadows.medium; }, function (p) { return p.theme.shadows.large; }, function (p) { return !p.disabled && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-color: ", ";\n box-shadow: none;\n "], ["\n background-color: ", ";\n box-shadow: none;\n "])), p.primary ? p.theme.colors.primary[2] : p.theme.colors.neutral[95]); }, function (p) { return p.disabled && css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background-color: ", ";\n cursor: auto;\n box-shadow: none;\n pointer-events: none;\n "], ["\n background-color: ", ";\n cursor: auto;\n box-shadow: none;\n pointer-events: none;\n "])), p.theme.colors.neutral[50]); });
|
|
58
82
|
/**
|
|
59
|
-
*
|
|
60
|
-
*
|
|
83
|
+
* A lightweight button for contextual actions within components.
|
|
84
|
+
*
|
|
85
|
+
* Renders a `<button>` with uppercase text styling. Suited for secondary
|
|
86
|
+
* actions within cards, info boxes, or other contained areas.
|
|
87
|
+
*
|
|
88
|
+
* ## Usage
|
|
89
|
+
*
|
|
90
|
+
* ```tsx
|
|
91
|
+
* // Basic button
|
|
92
|
+
* <TertiaryButton onClick={handleClick}>Learn More</TertiaryButton>
|
|
93
|
+
*
|
|
94
|
+
* // Primary variant (themed color)
|
|
95
|
+
* <TertiaryButton primary onClick={handleAction}>Submit</TertiaryButton>
|
|
96
|
+
*
|
|
97
|
+
* // With icon
|
|
98
|
+
* <TertiaryButton icon={SVG.Icons.Arrow} onClick={handleNext}>Next</TertiaryButton>
|
|
99
|
+
*
|
|
100
|
+
* // Custom width
|
|
101
|
+
* <TertiaryButton minWidth="150px" onClick={handleClick}>Wide Button</TertiaryButton>
|
|
102
|
+
*
|
|
103
|
+
* // Disabled state
|
|
104
|
+
* <TertiaryButton disabled onClick={handleClick}>Unavailable</TertiaryButton>
|
|
105
|
+
* ```
|
|
61
106
|
*
|
|
62
|
-
*
|
|
63
|
-
* capitalized.
|
|
107
|
+
* ## Props
|
|
64
108
|
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
109
|
+
* | Prop | Description |
|
|
110
|
+
* |------|-------------|
|
|
111
|
+
* | `primary` | Use themed primary color instead of white |
|
|
112
|
+
* | `icon` | SVG path or `IIconProps` for leading icon |
|
|
113
|
+
* | `minWidth` | Minimum button width (default: "92px") |
|
|
114
|
+
* | `disabled` | Prevents interaction |
|
|
67
115
|
*/
|
|
68
116
|
var TertiaryButton = function (_a) {
|
|
69
117
|
var _b = _a.disabled, disabled = _b === void 0 ? false : _b, _c = _a.minWidth, minWidth = _c === void 0 ? "92px" : _c, props = __rest(_a, ["disabled", "minWidth"]);
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { TertiaryButton } from './TertiaryButton';
|
|
2
|
+
export type { ITertiaryButtonProps } from './TertiaryButton';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { TertiaryButton } from './TertiaryButton';
|
|
@@ -31,8 +31,41 @@ interface IToggleButtonProps {
|
|
|
31
31
|
onClick: (e?: React.MouseEvent) => void;
|
|
32
32
|
}
|
|
33
33
|
/**
|
|
34
|
-
*
|
|
35
|
-
*
|
|
34
|
+
* An icon button that visually indicates on/off or active/inactive state.
|
|
35
|
+
*
|
|
36
|
+
* Supports two visual states: `active` (highlighted) and `open` (depressed).
|
|
37
|
+
* Useful for toolbar toggles, filters, or expandable controls.
|
|
38
|
+
*
|
|
39
|
+
* ## Usage
|
|
40
|
+
*
|
|
41
|
+
* ```tsx
|
|
42
|
+
* // Basic toggle
|
|
43
|
+
* <ToggleButton url={SVG.Icons.Filter} title="Filter" onClick={toggleFilter} />
|
|
44
|
+
*
|
|
45
|
+
* // Active state (highlighted)
|
|
46
|
+
* <ToggleButton url={SVG.Icons.Bold} title="Bold" active={isBold} onClick={toggleBold} />
|
|
47
|
+
*
|
|
48
|
+
* // Open state (depressed, e.g., for dropdowns)
|
|
49
|
+
* <ToggleButton url={SVG.Icons.Menu} title="Menu" open={menuOpen} onClick={toggleMenu} />
|
|
50
|
+
*
|
|
51
|
+
* // Disabled
|
|
52
|
+
* <ToggleButton url={SVG.Icons.Lock} title="Locked" disabled onClick={noop} />
|
|
53
|
+
* ```
|
|
54
|
+
*
|
|
55
|
+
* ## Props
|
|
56
|
+
*
|
|
57
|
+
* | Prop | Description |
|
|
58
|
+
* |------|-------------|
|
|
59
|
+
* | `url` | SVG icon path (required) |
|
|
60
|
+
* | `active` | Highlighted state (accent color) |
|
|
61
|
+
* | `open` | Depressed state (for expanded menus) |
|
|
62
|
+
* | `title` | Tooltip text |
|
|
63
|
+
* | `disabled` | Prevents interaction |
|
|
64
|
+
*
|
|
65
|
+
* ## Accessibility
|
|
66
|
+
*
|
|
67
|
+
* Uses `aria-pressed` for toggle state and `aria-expanded` for open state.
|
|
36
68
|
*/
|
|
37
69
|
declare const ToggleButton: React.ForwardRefExoticComponent<IToggleButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
38
|
-
export { ToggleButton
|
|
70
|
+
export { ToggleButton };
|
|
71
|
+
export type { IToggleButtonProps };
|
|
@@ -38,18 +38,82 @@ var ToggleButtonStyled = styled(ToggleButtonBase).attrs(function (p) {
|
|
|
38
38
|
};
|
|
39
39
|
})(templateObject_4 || (templateObject_4 = __makeTemplateObject([" \n position: relative;\n // Size:\n height: 34px;\n\n // Presentation:\n background-color: ", ";\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 &:hover {\n box-shadow: ", ";\n }\n &:active {\n background-color: ", " !important;\n box-shadow: ", ", ", ";\n }\n\n &:focus {\n outline: solid 2px ", ";\n }\n\n // Content alignment:\n display: flex;\n flex-direction: row;\n justify-content: start;\n align-items: center;\n\n svg {\n fill: ", ";\n width: 24px !important;\n max-width: 24px;\n height: 24px !important;\n max-height: 24px;\n } \n\n // Special active state overrides other states:\n ", "\n\n // Special open state overrides other states:\n ", " \n\n ", "\n"], [" \n position: relative;\n // Size:\n height: 34px;\n\n // Presentation:\n background-color: ", ";\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 &:hover {\n box-shadow: ", ";\n }\n &:active {\n background-color: ", " !important;\n box-shadow: ", ", ", ";\n }\n\n &:focus {\n outline: solid 2px ", ";\n }\n\n // Content alignment:\n display: flex;\n flex-direction: row;\n justify-content: start;\n align-items: center;\n\n svg {\n fill: ", ";\n width: 24px !important;\n max-width: 24px;\n height: 24px !important;\n max-height: 24px;\n } \n\n // Special active state overrides other states:\n ", "\n\n // Special open state overrides other states:\n ", " \n\n ", "\n"
|
|
40
40
|
/**
|
|
41
|
-
*
|
|
42
|
-
*
|
|
41
|
+
* An icon button that visually indicates on/off or active/inactive state.
|
|
42
|
+
*
|
|
43
|
+
* Supports two visual states: `active` (highlighted) and `open` (depressed).
|
|
44
|
+
* Useful for toolbar toggles, filters, or expandable controls.
|
|
45
|
+
*
|
|
46
|
+
* ## Usage
|
|
47
|
+
*
|
|
48
|
+
* ```tsx
|
|
49
|
+
* // Basic toggle
|
|
50
|
+
* <ToggleButton url={SVG.Icons.Filter} title="Filter" onClick={toggleFilter} />
|
|
51
|
+
*
|
|
52
|
+
* // Active state (highlighted)
|
|
53
|
+
* <ToggleButton url={SVG.Icons.Bold} title="Bold" active={isBold} onClick={toggleBold} />
|
|
54
|
+
*
|
|
55
|
+
* // Open state (depressed, e.g., for dropdowns)
|
|
56
|
+
* <ToggleButton url={SVG.Icons.Menu} title="Menu" open={menuOpen} onClick={toggleMenu} />
|
|
57
|
+
*
|
|
58
|
+
* // Disabled
|
|
59
|
+
* <ToggleButton url={SVG.Icons.Lock} title="Locked" disabled onClick={noop} />
|
|
60
|
+
* ```
|
|
61
|
+
*
|
|
62
|
+
* ## Props
|
|
63
|
+
*
|
|
64
|
+
* | Prop | Description |
|
|
65
|
+
* |------|-------------|
|
|
66
|
+
* | `url` | SVG icon path (required) |
|
|
67
|
+
* | `active` | Highlighted state (accent color) |
|
|
68
|
+
* | `open` | Depressed state (for expanded menus) |
|
|
69
|
+
* | `title` | Tooltip text |
|
|
70
|
+
* | `disabled` | Prevents interaction |
|
|
71
|
+
*
|
|
72
|
+
* ## Accessibility
|
|
73
|
+
*
|
|
74
|
+
* Uses `aria-pressed` for toggle state and `aria-expanded` for open state.
|
|
43
75
|
*/
|
|
44
76
|
])), function (p) { return p.theme.colors.primary[1]; }, 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.large; }, function (p) { return p.theme.shadows.medium; }, function (p) { return p.theme.colors.primary[4]; }, function (p) { return p.theme.shadows.inner; }, function (p) { return p.theme.shadows.medium; }, function (p) { return p.theme.colors.neutral[100]; }, function (p) { return p.$iconColor; }, function (p) { return p.active && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-color: ", ";\n svg { fill: ", "; }\n "], ["\n background-color: ", ";\n svg { fill: ", "; }\n "])), p.theme.colors.accent, p.theme.colors.neutral[100]); }, function (p) { return p.open && css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background-color: ", " !important;\n box-shadow: ", ";\n &:hover {\n box-shadow: ", ";\n }\n "], ["\n background-color: ", " !important;\n box-shadow: ", ";\n &:hover {\n box-shadow: ", ";\n }\n "])), function (p) { return p.theme.colors.primary[4]; }, function (p) { return p.theme.shadows.inner; }, function (p) { return p.theme.shadows.inner; }); }, function (p) { return p.disabled && css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n cursor: auto;\n background-color: ", ";\n box-shadow: none;\n svg {\n fill: ", ";\n }\n "], ["\n cursor: auto;\n background-color: ", ";\n box-shadow: none;\n svg {\n fill: ", ";\n }\n "])), p.theme.colors.neutral[50], p.theme.colors.primary[3]); });
|
|
45
77
|
/**
|
|
46
|
-
*
|
|
47
|
-
*
|
|
78
|
+
* An icon button that visually indicates on/off or active/inactive state.
|
|
79
|
+
*
|
|
80
|
+
* Supports two visual states: `active` (highlighted) and `open` (depressed).
|
|
81
|
+
* Useful for toolbar toggles, filters, or expandable controls.
|
|
82
|
+
*
|
|
83
|
+
* ## Usage
|
|
84
|
+
*
|
|
85
|
+
* ```tsx
|
|
86
|
+
* // Basic toggle
|
|
87
|
+
* <ToggleButton url={SVG.Icons.Filter} title="Filter" onClick={toggleFilter} />
|
|
88
|
+
*
|
|
89
|
+
* // Active state (highlighted)
|
|
90
|
+
* <ToggleButton url={SVG.Icons.Bold} title="Bold" active={isBold} onClick={toggleBold} />
|
|
91
|
+
*
|
|
92
|
+
* // Open state (depressed, e.g., for dropdowns)
|
|
93
|
+
* <ToggleButton url={SVG.Icons.Menu} title="Menu" open={menuOpen} onClick={toggleMenu} />
|
|
94
|
+
*
|
|
95
|
+
* // Disabled
|
|
96
|
+
* <ToggleButton url={SVG.Icons.Lock} title="Locked" disabled onClick={noop} />
|
|
97
|
+
* ```
|
|
98
|
+
*
|
|
99
|
+
* ## Props
|
|
100
|
+
*
|
|
101
|
+
* | Prop | Description |
|
|
102
|
+
* |------|-------------|
|
|
103
|
+
* | `url` | SVG icon path (required) |
|
|
104
|
+
* | `active` | Highlighted state (accent color) |
|
|
105
|
+
* | `open` | Depressed state (for expanded menus) |
|
|
106
|
+
* | `title` | Tooltip text |
|
|
107
|
+
* | `disabled` | Prevents interaction |
|
|
108
|
+
*
|
|
109
|
+
* ## Accessibility
|
|
110
|
+
*
|
|
111
|
+
* Uses `aria-pressed` for toggle state and `aria-expanded` for open state.
|
|
48
112
|
*/
|
|
49
113
|
var ToggleButton = React.forwardRef(function (_a, ref) {
|
|
50
114
|
var _b = _a.disabled, disabled = _b === void 0 ? false : _b, _c = _a.active, active = _c === void 0 ? false : _c, props = __rest(_a, ["disabled", "active"]);
|
|
51
115
|
return React.createElement(ToggleButtonStyled, __assign({ ref: ref, disabled: disabled, active: active }, props));
|
|
52
116
|
});
|
|
53
|
-
ToggleButton.displayName = "
|
|
117
|
+
ToggleButton.displayName = "ToggleButton";
|
|
54
118
|
export { ToggleButton };
|
|
55
119
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { ToggleButton } from './ToggleButton';
|
|
2
|
+
export type { IToggleButtonProps } from './ToggleButton';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { ToggleButton } from './ToggleButton';
|
package/controls/View/View.d.ts
CHANGED
|
@@ -45,19 +45,33 @@ interface IViewProps {
|
|
|
45
45
|
badge?: number;
|
|
46
46
|
}
|
|
47
47
|
/**
|
|
48
|
-
* A
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
48
|
+
* A read-only display field for showing labeled data.
|
|
49
|
+
*
|
|
50
|
+
* Displays a label with content below it. By default, content is ellipsized
|
|
51
|
+
* to one line. Set `height` to allow multi-line content with scrolling.
|
|
52
|
+
*
|
|
53
|
+
* ## Usage
|
|
54
54
|
*
|
|
55
55
|
* ```tsx
|
|
56
|
-
*
|
|
56
|
+
* // Basic view
|
|
57
|
+
* <View label="Email">{user.email}</View>
|
|
58
|
+
*
|
|
59
|
+
* // With hint
|
|
60
|
+
* <View label="Status" hint="Last updated 2 hours ago">Active</View>
|
|
61
|
+
*
|
|
62
|
+
* // Scrollable content
|
|
63
|
+
* <View label="Description" height="100px">{longText}</View>
|
|
64
|
+
*
|
|
65
|
+
* // With badge count
|
|
66
|
+
* <View label="Messages" badge={5}>Inbox</View>
|
|
67
|
+
*
|
|
68
|
+
* // Loading state
|
|
69
|
+
* <View label="Name" ghost />
|
|
57
70
|
* ```
|
|
58
71
|
*/
|
|
59
72
|
declare const View: {
|
|
60
73
|
({ ghost, ...props }: IViewProps): React.JSX.Element;
|
|
61
74
|
displayName: string;
|
|
62
75
|
};
|
|
63
|
-
export { View
|
|
76
|
+
export { View };
|
|
77
|
+
export type { IViewProps };
|
package/controls/View/View.js
CHANGED
|
@@ -48,28 +48,54 @@ var ViewStyled = styled(ViewBase)(templateObject_7 || (templateObject_7 = __make
|
|
|
48
48
|
var BadgeWrapper = styled.div(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n gap: 4px;\n align-items: center;\n"], ["\n display: flex;\n flex-direction: row;\n gap: 4px;\n align-items: center;\n"])));
|
|
49
49
|
var Badge = styled.div(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n height: 12px;\n width: 12px;\n display: flex;\n font-size: 8px;\n justify-content: center;\n align-items: center;\n border-radius: 8px;\n background: ", ";\n"], ["\n height: 12px;\n width: 12px;\n display: flex;\n font-size: 8px;\n justify-content: center;\n align-items: center;\n border-radius: 8px;\n background: ", ";\n"
|
|
50
50
|
/**
|
|
51
|
-
* A
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
51
|
+
* A read-only display field for showing labeled data.
|
|
52
|
+
*
|
|
53
|
+
* Displays a label with content below it. By default, content is ellipsized
|
|
54
|
+
* to one line. Set `height` to allow multi-line content with scrolling.
|
|
55
|
+
*
|
|
56
|
+
* ## Usage
|
|
57
57
|
*
|
|
58
58
|
* ```tsx
|
|
59
|
-
*
|
|
59
|
+
* // Basic view
|
|
60
|
+
* <View label="Email">{user.email}</View>
|
|
61
|
+
*
|
|
62
|
+
* // With hint
|
|
63
|
+
* <View label="Status" hint="Last updated 2 hours ago">Active</View>
|
|
64
|
+
*
|
|
65
|
+
* // Scrollable content
|
|
66
|
+
* <View label="Description" height="100px">{longText}</View>
|
|
67
|
+
*
|
|
68
|
+
* // With badge count
|
|
69
|
+
* <View label="Messages" badge={5}>Inbox</View>
|
|
70
|
+
*
|
|
71
|
+
* // Loading state
|
|
72
|
+
* <View label="Name" ghost />
|
|
60
73
|
* ```
|
|
61
74
|
*/
|
|
62
75
|
])), function (p) { return p.theme.colors.primary[2]; });
|
|
63
76
|
/**
|
|
64
|
-
* A
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
77
|
+
* A read-only display field for showing labeled data.
|
|
78
|
+
*
|
|
79
|
+
* Displays a label with content below it. By default, content is ellipsized
|
|
80
|
+
* to one line. Set `height` to allow multi-line content with scrolling.
|
|
81
|
+
*
|
|
82
|
+
* ## Usage
|
|
70
83
|
*
|
|
71
84
|
* ```tsx
|
|
72
|
-
*
|
|
85
|
+
* // Basic view
|
|
86
|
+
* <View label="Email">{user.email}</View>
|
|
87
|
+
*
|
|
88
|
+
* // With hint
|
|
89
|
+
* <View label="Status" hint="Last updated 2 hours ago">Active</View>
|
|
90
|
+
*
|
|
91
|
+
* // Scrollable content
|
|
92
|
+
* <View label="Description" height="100px">{longText}</View>
|
|
93
|
+
*
|
|
94
|
+
* // With badge count
|
|
95
|
+
* <View label="Messages" badge={5}>Inbox</View>
|
|
96
|
+
*
|
|
97
|
+
* // Loading state
|
|
98
|
+
* <View label="Name" ghost />
|
|
73
99
|
* ```
|
|
74
100
|
*/
|
|
75
101
|
var View = function (_a) {
|
package/controls/View/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { View } from './View';
|
|
2
|
+
export type { IViewProps } from './View';
|
package/controls/View/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { View } from './View';
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { Dropdown
|
|
1
|
+
export { Dropdown } from './Dropdown';
|
|
2
|
+
export type { IDropdownProps } from './Dropdown';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { IMapButtonProps } from '../base/MapButton';
|
|
2
|
+
import type { IMapButtonProps } from '../base/MapButton';
|
|
3
3
|
/**
|
|
4
4
|
* The `ZoomInButton` zooms the map in when clicked. It respects the min and
|
|
5
5
|
* max zoom levels of the map.
|
|
@@ -19,4 +19,5 @@ declare const ZoomInButton: {
|
|
|
19
19
|
({ hint, ...props }: IMapButtonProps): React.JSX.Element;
|
|
20
20
|
displayName: string;
|
|
21
21
|
};
|
|
22
|
-
export { ZoomInButton
|
|
22
|
+
export { ZoomInButton };
|
|
23
|
+
export type { IMapButtonProps };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { IMapButtonProps } from '../base/MapButton';
|
|
2
|
+
import type { IMapButtonProps } from '../base/MapButton';
|
|
3
3
|
/**
|
|
4
4
|
* The `ZoomInButton` zooms the map out when clicked. It respects the min and
|
|
5
5
|
* max zoom levels of the map.
|
|
@@ -19,4 +19,5 @@ declare const ZoomOutButton: {
|
|
|
19
19
|
({ hint, ...props }: IMapButtonProps): React.JSX.Element;
|
|
20
20
|
displayName: string;
|
|
21
21
|
};
|
|
22
|
-
export { ZoomOutButton
|
|
22
|
+
export { ZoomOutButton };
|
|
23
|
+
export type { IMapButtonProps };
|
|
@@ -43,4 +43,5 @@ interface IProps {
|
|
|
43
43
|
* which must be provided by its child.
|
|
44
44
|
*/
|
|
45
45
|
declare const MapButton: ({ size, disabled, active, grouped, ...props }: IProps & IMapButtonProps) => React.JSX.Element;
|
|
46
|
-
export { MapButton
|
|
46
|
+
export { MapButton };
|
|
47
|
+
export type { IMapButtonProps, IProps };
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { MapButton
|
|
1
|
+
export { MapButton } from './MapButton';
|
|
2
|
+
export type { IMapButtonProps } from './MapButton';
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { IToastProps } from "./IToastProps";
|
|
1
|
+
import type { IToastProps } from "./IToastProps";
|
|
2
2
|
/**
|
|
3
3
|
* A ToastMessage is a message with a duration, displayed as a Toast in
|
|
4
4
|
* a ToastContainer.
|
|
5
5
|
*/
|
|
6
6
|
interface IToastMessage {
|
|
7
7
|
message: React.ReactNode;
|
|
8
|
-
options
|
|
8
|
+
options?: IToastProps;
|
|
9
9
|
}
|
|
10
|
-
export { IToastMessage };
|
|
10
|
+
export type { IToastMessage };
|
|
@@ -1,21 +1,59 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { IToastProps } from './IToastProps';
|
|
2
|
+
import type { IToastProps } from './IToastProps';
|
|
3
3
|
interface IProps {
|
|
4
4
|
/** @ignore */
|
|
5
5
|
className?: string;
|
|
6
|
+
/**
|
|
7
|
+
* Message shown in the Toast. This can be a simple string or JSX.
|
|
8
|
+
*/
|
|
6
9
|
message: React.ReactNode;
|
|
10
|
+
/**
|
|
11
|
+
* Called when the Toast self-closes due to a timeout, or when the user
|
|
12
|
+
* dismisses the Toast.
|
|
13
|
+
*/
|
|
7
14
|
onClose: () => void;
|
|
8
15
|
}
|
|
9
16
|
/**
|
|
10
|
-
* A
|
|
17
|
+
* A brief notification message that appears temporarily to provide feedback to the user.
|
|
11
18
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
19
|
+
* Toasts are typically created through the `useToast` hook rather than being rendered directly.
|
|
20
|
+
* They automatically disappear after a configurable duration, or can be manually dismissed
|
|
21
|
+
* by the user if `dismissable` is enabled.
|
|
22
|
+
*
|
|
23
|
+
* ## Usage
|
|
24
|
+
*
|
|
25
|
+
* ```tsx
|
|
26
|
+
* const { toast } = useToast();
|
|
27
|
+
*
|
|
28
|
+
* // Simple toast
|
|
29
|
+
* toast("Changes saved successfully");
|
|
30
|
+
*
|
|
31
|
+
* // Toast with options
|
|
32
|
+
* toast("File uploaded", {
|
|
15
33
|
* duration: 5000,
|
|
16
34
|
* dismissable: true
|
|
17
35
|
* });
|
|
36
|
+
*
|
|
37
|
+
* // Toast with action button
|
|
38
|
+
* toast("Item deleted", {
|
|
39
|
+
* action: () => undoDelete(),
|
|
40
|
+
* actionLabel: "Undo"
|
|
41
|
+
* });
|
|
18
42
|
* ```
|
|
43
|
+
*
|
|
44
|
+
* ## Toast Options
|
|
45
|
+
*
|
|
46
|
+
* | Option | Type | Default | Description |
|
|
47
|
+
* |--------|------|---------|-------------|
|
|
48
|
+
* | `duration` | `number` | `8000` | Auto-dismiss delay in ms. Set to `0` for persistent toast. |
|
|
49
|
+
* | `dismissable` | `boolean` | `false` | Show close button for manual dismissal |
|
|
50
|
+
* | `action` | `function` | - | Callback for action button click |
|
|
51
|
+
* | `actionLabel` | `ReactNode` | `"Action"` | Label for the action button |
|
|
52
|
+
*
|
|
53
|
+
* ## Animation
|
|
54
|
+
*
|
|
55
|
+
* Toasts fade in when appearing and fade out when dismissed or timed out.
|
|
56
|
+
* The animation duration is derived from the theme's animation settings.
|
|
19
57
|
*/
|
|
20
58
|
declare const Toast: {
|
|
21
59
|
({ duration, dismissable, actionLabel, ...props }: IProps & IToastProps): React.JSX.Element;
|