@hellboy/ds 0.1.2 → 0.2.7
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/README.md +568 -71
- package/{src/style/components/badge → dist/components}/badge.css +9 -25
- package/dist/components/badge.d.mts +12 -0
- package/dist/components/badge.d.ts +12 -0
- package/dist/components/badge.js +42 -0
- package/dist/components/badge.mjs +15 -0
- package/dist/components/banner.css +280 -0
- package/dist/components/banner.d.mts +12 -0
- package/dist/components/banner.d.ts +12 -0
- package/dist/components/banner.js +184 -0
- package/dist/components/banner.mjs +147 -0
- package/dist/components/button-group.css +289 -0
- package/dist/components/button-group.d.mts +81 -0
- package/dist/components/button-group.d.ts +81 -0
- package/dist/components/button-group.js +180 -0
- package/dist/components/button-group.mjs +143 -0
- package/{src/style/components/button → dist/components}/button.css +59 -62
- package/dist/components/button.d.mts +57 -0
- package/dist/components/button.d.ts +57 -0
- package/dist/components/button.js +129 -0
- package/dist/components/button.mjs +92 -0
- package/{src/style/components/card → dist/components}/card.css +9 -30
- package/dist/components/card.d.mts +31 -0
- package/dist/components/card.d.ts +31 -0
- package/dist/components/card.js +59 -0
- package/dist/components/card.mjs +32 -0
- package/{src/style → dist}/components/checkbox.css +51 -43
- package/dist/components/checkbox.d.mts +31 -0
- package/dist/components/checkbox.d.ts +31 -0
- package/dist/components/checkbox.js +130 -0
- package/dist/components/checkbox.mjs +93 -0
- package/{src/style/components/code-block → dist/components}/code-block.css +3 -7
- package/dist/components/code-block.d.mts +24 -0
- package/dist/components/code-block.d.ts +24 -0
- package/dist/components/code-block.js +43 -0
- package/dist/components/code-block.mjs +16 -0
- package/dist/components/color-control.css +285 -0
- package/dist/components/color-control.d.mts +5 -0
- package/dist/components/color-control.d.ts +5 -0
- package/dist/components/color-control.js +534 -0
- package/dist/components/color-control.mjs +497 -0
- package/dist/components/dialog.css +930 -0
- package/dist/components/dialog.d.mts +32 -0
- package/dist/components/dialog.d.ts +32 -0
- package/dist/components/dialog.js +1111 -0
- package/dist/components/dialog.mjs +1074 -0
- package/dist/components/divider.css +356 -0
- package/dist/components/divider.d.mts +32 -0
- package/dist/components/divider.d.ts +32 -0
- package/dist/components/divider.js +344 -0
- package/dist/components/divider.mjs +307 -0
- package/{src/style/components/drag-handle → dist/components}/drag-handle.css +3 -18
- package/dist/components/drag-handle.d.mts +11 -0
- package/dist/components/drag-handle.d.ts +11 -0
- package/dist/components/drag-handle.js +103 -0
- package/dist/components/drag-handle.mjs +66 -0
- package/dist/components/drawer.css +1027 -0
- package/dist/components/drawer.d.mts +14 -0
- package/dist/components/drawer.d.ts +14 -0
- package/dist/components/drawer.js +1072 -0
- package/dist/components/drawer.mjs +1035 -0
- package/dist/components/floating-bar.css +17 -0
- package/dist/components/floating-bar.d.mts +25 -0
- package/dist/components/floating-bar.d.ts +25 -0
- package/dist/components/floating-bar.js +52 -0
- package/dist/components/floating-bar.mjs +25 -0
- package/dist/components/footer.css +40 -0
- package/dist/components/footer.d.mts +8 -0
- package/dist/components/footer.d.ts +8 -0
- package/dist/components/footer.js +44 -0
- package/dist/components/footer.mjs +17 -0
- package/dist/components/grid.css +47 -0
- package/dist/components/grid.d.mts +27 -0
- package/dist/components/grid.d.ts +27 -0
- package/dist/components/grid.js +52 -0
- package/dist/components/grid.mjs +25 -0
- package/dist/components/header.css +1075 -0
- package/dist/components/header.d.mts +35 -0
- package/dist/components/header.d.ts +35 -0
- package/dist/components/header.js +1402 -0
- package/dist/components/header.mjs +1365 -0
- package/dist/components/hero.css +121 -0
- package/dist/components/hero.d.mts +111 -0
- package/dist/components/hero.d.ts +111 -0
- package/dist/components/hero.js +285 -0
- package/dist/components/hero.mjs +248 -0
- package/{src/style/components/icons → dist/components}/icons.css +14 -15
- package/dist/components/icons.d.mts +104 -0
- package/dist/components/icons.d.ts +104 -0
- package/dist/components/icons.js +239 -0
- package/dist/components/icons.mjs +203 -0
- package/{src/style/components/input → dist/components}/input.css +189 -102
- package/dist/components/input.d.mts +114 -0
- package/dist/components/input.d.ts +114 -0
- package/dist/components/input.js +926 -0
- package/dist/components/input.mjs +879 -0
- package/dist/components/layout.css +551 -0
- package/dist/components/layout.d.mts +16 -0
- package/dist/components/layout.d.ts +16 -0
- package/dist/components/layout.js +387 -0
- package/dist/components/layout.mjs +352 -0
- package/{src/style/components/list → dist/components}/list.css +47 -41
- package/dist/components/list.d.mts +46 -0
- package/dist/components/list.d.ts +46 -0
- package/dist/components/list.js +124 -0
- package/dist/components/list.mjs +96 -0
- package/dist/components/navbar.css +706 -0
- package/dist/components/navbar.d.mts +56 -0
- package/dist/components/navbar.d.ts +56 -0
- package/dist/components/navbar.js +994 -0
- package/dist/components/navbar.mjs +952 -0
- package/{src/style/components/page-index → dist/components}/page-index.css +2 -47
- package/dist/components/page-index.d.mts +25 -0
- package/dist/components/page-index.d.ts +25 -0
- package/dist/components/page-index.js +239 -0
- package/dist/components/page-index.mjs +202 -0
- package/{src/style/components/page → dist/components}/page.css +4 -15
- package/dist/components/page.d.mts +30 -0
- package/dist/components/page.d.ts +30 -0
- package/dist/components/page.js +40 -0
- package/dist/components/page.mjs +13 -0
- package/dist/components/popover.css +87 -0
- package/dist/components/popover.d.mts +22 -0
- package/dist/components/popover.d.ts +22 -0
- package/dist/components/popover.js +243 -0
- package/dist/components/popover.mjs +206 -0
- package/{src/style → dist}/components/radio.css +8 -51
- package/dist/components/radio.d.mts +59 -0
- package/dist/components/radio.d.ts +59 -0
- package/dist/components/radio.js +133 -0
- package/dist/components/radio.mjs +95 -0
- package/dist/components/section.css +993 -0
- package/dist/components/section.d.mts +33 -0
- package/dist/components/section.d.ts +33 -0
- package/dist/components/section.js +1401 -0
- package/dist/components/section.mjs +1364 -0
- package/dist/components/select.css +391 -0
- package/dist/components/select.d.mts +63 -0
- package/dist/components/select.d.ts +63 -0
- package/dist/components/select.js +452 -0
- package/dist/components/select.mjs +415 -0
- package/{src/style/components/slider → dist/components}/slider.css +55 -33
- package/dist/components/slider.d.mts +69 -0
- package/dist/components/slider.d.ts +69 -0
- package/dist/components/slider.js +254 -0
- package/dist/components/slider.mjs +217 -0
- package/dist/components/switch.css +1081 -0
- package/dist/components/switch.d.mts +33 -0
- package/dist/components/switch.d.ts +33 -0
- package/dist/components/switch.js +1092 -0
- package/dist/components/switch.mjs +1055 -0
- package/{src/style/components/table → dist/components}/table.css +3 -28
- package/dist/components/table.d.mts +42 -0
- package/dist/components/table.d.ts +42 -0
- package/dist/components/table.js +108 -0
- package/dist/components/table.mjs +76 -0
- package/dist/components/tag.css +97 -0
- package/dist/components/tag.d.mts +12 -0
- package/dist/components/tag.d.ts +12 -0
- package/dist/components/tag.js +42 -0
- package/dist/components/tag.mjs +15 -0
- package/dist/components/textarea.css +1359 -0
- package/dist/components/textarea.d.mts +84 -0
- package/dist/components/textarea.d.ts +84 -0
- package/dist/components/textarea.js +1962 -0
- package/dist/components/textarea.mjs +1924 -0
- package/{src/style/components/theme-control → dist/components}/theme-control.css +3 -7
- package/dist/components/theme-control.d.mts +9 -0
- package/dist/components/theme-control.d.ts +9 -0
- package/dist/components/theme-control.js +235 -0
- package/dist/components/theme-control.mjs +200 -0
- package/{src/style/components/tooltip → dist/components}/tooltip.css +5 -13
- package/dist/components/tooltip.d.mts +12 -0
- package/dist/components/tooltip.d.ts +12 -0
- package/dist/components/tooltip.js +200 -0
- package/dist/components/tooltip.mjs +163 -0
- package/dist/icons-Czahnf-r.d.mts +15 -0
- package/dist/icons-Czahnf-r.d.ts +15 -0
- package/dist/index.css +2915 -2068
- package/dist/index.d.mts +144 -721
- package/dist/index.d.ts +144 -721
- package/dist/index.js +4076 -2282
- package/dist/index.mjs +4132 -2366
- package/dist/theme.css +34 -34
- package/package.json +27 -8
- package/dist/index.css.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/hellboy-ds-0.1.2.tgz +0 -0
- package/src/components/badge/Badge.tsx +0 -29
- package/src/components/badge/index.ts +0 -1
- package/src/components/banner/Banner.tsx +0 -48
- package/src/components/banner/banner.css +0 -44
- package/src/components/banner/index.ts +0 -1
- package/src/components/button/button.tsx +0 -127
- package/src/components/button/index.ts +0 -1
- package/src/components/card/card.tsx +0 -57
- package/src/components/card/index.ts +0 -1
- package/src/components/checkbox/Checkbox.tsx +0 -98
- package/src/components/checkbox/index.ts +0 -1
- package/src/components/code-block/code-block.tsx +0 -44
- package/src/components/code-block/index.ts +0 -1
- package/src/components/color-control/color-control.tsx +0 -322
- package/src/components/color-control/index.ts +0 -1
- package/src/components/drag-handle/DragHandle.tsx +0 -78
- package/src/components/drag-handle/index.ts +0 -1
- package/src/components/drawer/drawer.tsx +0 -82
- package/src/components/drawer/index.ts +0 -1
- package/src/components/floating-bar/floating-bar.tsx +0 -52
- package/src/components/floating-bar/index.ts +0 -2
- package/src/components/footer/footer.tsx +0 -28
- package/src/components/footer/index.ts +0 -1
- package/src/components/grid/Grid.tsx +0 -53
- package/src/components/grid/index.ts +0 -1
- package/src/components/header/header.tsx +0 -57
- package/src/components/header/index.ts +0 -1
- package/src/components/icons/icons.tsx +0 -44
- package/src/components/icons/index.ts +0 -1
- package/src/components/index.ts +0 -29
- package/src/components/input/DatePicker.tsx +0 -133
- package/src/components/input/Input.tsx +0 -220
- package/src/components/input/InputDate.tsx +0 -10
- package/src/components/input/InputDateTime.tsx +0 -10
- package/src/components/input/InputEmail.tsx +0 -10
- package/src/components/input/InputField.tsx +0 -137
- package/src/components/input/InputNumber.tsx +0 -10
- package/src/components/input/InputPassword.tsx +0 -10
- package/src/components/input/InputSearch.tsx +0 -10
- package/src/components/input/InputTel.tsx +0 -10
- package/src/components/input/InputText.tsx +0 -10
- package/src/components/input/InputTime.tsx +0 -10
- package/src/components/input/InputUrl.tsx +0 -10
- package/src/components/input/TimePicker.tsx +0 -151
- package/src/components/input/index.ts +0 -11
- package/src/components/layout/Layout.tsx +0 -244
- package/src/components/layout/index.ts +0 -1
- package/src/components/list/List.tsx +0 -159
- package/src/components/list/index.ts +0 -1
- package/src/components/navbar/MenuCategory.tsx +0 -20
- package/src/components/navbar/MenuGroup.tsx +0 -288
- package/src/components/navbar/MenuItem.tsx +0 -65
- package/src/components/navbar/Navbar.tsx +0 -23
- package/src/components/navbar/index.ts +0 -4
- package/src/components/page/index.ts +0 -1
- package/src/components/page/page.tsx +0 -46
- package/src/components/page-index/PageIndex.tsx +0 -275
- package/src/components/page-index/index.ts +0 -1
- package/src/components/popover/index.ts +0 -1
- package/src/components/popover/popover.tsx +0 -199
- package/src/components/radio/Radio.tsx +0 -176
- package/src/components/radio/index.ts +0 -1
- package/src/components/section/index.ts +0 -1
- package/src/components/section/section.tsx +0 -66
- package/src/components/select/Select.tsx +0 -212
- package/src/components/select/index.ts +0 -1
- package/src/components/slider/Slider.tsx +0 -267
- package/src/components/slider/index.ts +0 -1
- package/src/components/switch/index.ts +0 -1
- package/src/components/switch/switch.tsx +0 -99
- package/src/components/table/Table.tsx +0 -147
- package/src/components/table/index.ts +0 -1
- package/src/components/theme-control/index.ts +0 -1
- package/src/components/theme-control/theme-control.tsx +0 -78
- package/src/components/tooltip/index.ts +0 -1
- package/src/components/tooltip/tooltip.tsx +0 -207
- package/src/contexts/NavbarTooltipContext.tsx +0 -48
- package/src/contexts/index.ts +0 -1
- package/src/foundations/motion.md +0 -136
- package/src/index.ts +0 -40
- package/src/style/_shared/field.css +0 -69
- package/src/style/components/color-control/color-control.css +0 -126
- package/src/style/components/drawer/drawer.css +0 -210
- package/src/style/components/floating-bar/floating-bar.css +0 -39
- package/src/style/components/footer/footer.css +0 -108
- package/src/style/components/grid/grid.css +0 -33
- package/src/style/components/header/header.css +0 -44
- package/src/style/components/layout/layout.css +0 -205
- package/src/style/components/navbar/navbar.css +0 -342
- package/src/style/components/popover/popover.css +0 -44
- package/src/style/components/section/section.css +0 -67
- package/src/style/components/select/select.css +0 -143
- package/src/style/components/switch/switch.css +0 -267
- package/src/style/foundations/global.css +0 -316
- package/src/style/foundations/motion.css +0 -164
- package/src/style/foundations/spacing.css +0 -51
- package/src/style/foundations/typography.css +0 -39
- package/src/style/foundations/z-index.css +0 -81
- package/src/style/modes/dark.css +0 -146
- package/src/style/modes/light.css +0 -147
- package/src/style/semantic.css +0 -52
- package/src/style/styles.css +0 -51
- package/src/style/themes/theme.json +0 -37
- package/src/utils/README.md +0 -305
- package/src/utils/USER_PREFERENCES.md +0 -558
- package/src/utils/theme.ts +0 -127
- package/src/utils/user-preferences.ts +0 -577
- package/tsconfig.json +0 -25
- package/tsup.config.ts +0 -52
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// src/components/button-group/index.ts
|
|
31
|
+
var button_group_exports = {};
|
|
32
|
+
__export(button_group_exports, {
|
|
33
|
+
ButtonGroup: () => ButtonGroup
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(button_group_exports);
|
|
36
|
+
|
|
37
|
+
// src/components/button-group/button-group.tsx
|
|
38
|
+
var import_react2 = __toESM(require("react"));
|
|
39
|
+
|
|
40
|
+
// src/components/icons/icons.tsx
|
|
41
|
+
var import_react = require("@iconify/react");
|
|
42
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
43
|
+
var Icon = ({ name, size = 24, className, loading = false, ...rest }) => {
|
|
44
|
+
const iconName = name.includes(":") ? name : `heroicons:${name}`;
|
|
45
|
+
const classes = ["icon", className].filter(Boolean).join(" ");
|
|
46
|
+
if (loading) {
|
|
47
|
+
const style = { width: size, height: size };
|
|
48
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
49
|
+
"span",
|
|
50
|
+
{
|
|
51
|
+
className: `${classes} icon--skeleton`,
|
|
52
|
+
style,
|
|
53
|
+
"aria-hidden": rest["aria-label"] ? "false" : "true",
|
|
54
|
+
...rest["aria-label"] ? { "aria-label": rest["aria-label"] } : {}
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
59
|
+
import_react.Icon,
|
|
60
|
+
{
|
|
61
|
+
icon: iconName,
|
|
62
|
+
width: size,
|
|
63
|
+
height: size,
|
|
64
|
+
className: classes,
|
|
65
|
+
...rest
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
// src/components/button-group/button-group.tsx
|
|
71
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
72
|
+
var ButtonGroup = import_react2.default.forwardRef(
|
|
73
|
+
({
|
|
74
|
+
variant = "primary",
|
|
75
|
+
size = "md",
|
|
76
|
+
orientation = "horizontal",
|
|
77
|
+
mode = "single",
|
|
78
|
+
options,
|
|
79
|
+
value: externalValue,
|
|
80
|
+
onChange,
|
|
81
|
+
fullWidth = false,
|
|
82
|
+
disabled = false,
|
|
83
|
+
className
|
|
84
|
+
}, ref) => {
|
|
85
|
+
const [internalValue, setInternalValue] = (0, import_react2.useState)(
|
|
86
|
+
mode === "multiple" ? [] : ""
|
|
87
|
+
);
|
|
88
|
+
const currentValue = externalValue !== void 0 ? externalValue : internalValue;
|
|
89
|
+
const groupClasses = [
|
|
90
|
+
"btn-group",
|
|
91
|
+
`btn-group--${variant}`,
|
|
92
|
+
`btn-group--${size}`,
|
|
93
|
+
`btn-group--${orientation}`,
|
|
94
|
+
`btn-group--${mode}`,
|
|
95
|
+
fullWidth && "btn-group--full-width",
|
|
96
|
+
disabled && "btn-group--disabled",
|
|
97
|
+
className
|
|
98
|
+
].filter(Boolean).join(" ");
|
|
99
|
+
const iconSize = size === "xs" ? 14 : size === "sm" ? 16 : size === "lg" ? 24 : 20;
|
|
100
|
+
const handleSingleChange = (newValue) => {
|
|
101
|
+
if (disabled) return;
|
|
102
|
+
if (externalValue === void 0) {
|
|
103
|
+
setInternalValue(newValue);
|
|
104
|
+
}
|
|
105
|
+
onChange?.(newValue);
|
|
106
|
+
};
|
|
107
|
+
const handleMultipleChange = (optionValue) => {
|
|
108
|
+
if (disabled) return;
|
|
109
|
+
const currentValues = Array.isArray(currentValue) ? currentValue : [];
|
|
110
|
+
const newValues = currentValues.includes(optionValue) ? currentValues.filter((v) => v !== optionValue) : [...currentValues, optionValue];
|
|
111
|
+
if (externalValue === void 0) {
|
|
112
|
+
setInternalValue(newValues);
|
|
113
|
+
}
|
|
114
|
+
onChange?.(newValues);
|
|
115
|
+
};
|
|
116
|
+
const isOptionSelected = (optionValue) => {
|
|
117
|
+
if (mode === "multiple") {
|
|
118
|
+
return Array.isArray(currentValue) && currentValue.includes(optionValue);
|
|
119
|
+
}
|
|
120
|
+
return currentValue === optionValue;
|
|
121
|
+
};
|
|
122
|
+
if (mode === "single") {
|
|
123
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { ref, className: groupClasses, role: "radiogroup", children: options.map((option) => {
|
|
124
|
+
const isSelected = isOptionSelected(option.value);
|
|
125
|
+
const isDisabled = disabled || option.disabled;
|
|
126
|
+
const buttonClasses = [
|
|
127
|
+
"btn-group__button",
|
|
128
|
+
isSelected && "btn-group__button--selected",
|
|
129
|
+
isDisabled && "btn-group__button--disabled"
|
|
130
|
+
].filter(Boolean).join(" ");
|
|
131
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
132
|
+
"button",
|
|
133
|
+
{
|
|
134
|
+
type: "button",
|
|
135
|
+
role: "radio",
|
|
136
|
+
"aria-checked": isSelected,
|
|
137
|
+
disabled: isDisabled,
|
|
138
|
+
className: buttonClasses,
|
|
139
|
+
onClick: () => handleSingleChange(option.value),
|
|
140
|
+
children: [
|
|
141
|
+
option.icon && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Icon, { name: option.icon, size: iconSize, className: "btn-group__icon" }),
|
|
142
|
+
option.label
|
|
143
|
+
]
|
|
144
|
+
},
|
|
145
|
+
option.value
|
|
146
|
+
);
|
|
147
|
+
}) });
|
|
148
|
+
}
|
|
149
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { ref, className: groupClasses, role: "group", children: options.map((option) => {
|
|
150
|
+
const isSelected = isOptionSelected(option.value);
|
|
151
|
+
const isDisabled = disabled || option.disabled;
|
|
152
|
+
const buttonClasses = [
|
|
153
|
+
"btn-group__button",
|
|
154
|
+
isSelected && "btn-group__button--selected",
|
|
155
|
+
isDisabled && "btn-group__button--disabled"
|
|
156
|
+
].filter(Boolean).join(" ");
|
|
157
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
158
|
+
"button",
|
|
159
|
+
{
|
|
160
|
+
type: "button",
|
|
161
|
+
role: "checkbox",
|
|
162
|
+
"aria-checked": isSelected,
|
|
163
|
+
disabled: isDisabled,
|
|
164
|
+
className: buttonClasses,
|
|
165
|
+
onClick: () => handleMultipleChange(option.value),
|
|
166
|
+
children: [
|
|
167
|
+
option.icon && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Icon, { name: option.icon, size: iconSize, className: "btn-group__icon" }),
|
|
168
|
+
option.label
|
|
169
|
+
]
|
|
170
|
+
},
|
|
171
|
+
option.value
|
|
172
|
+
);
|
|
173
|
+
}) });
|
|
174
|
+
}
|
|
175
|
+
);
|
|
176
|
+
ButtonGroup.displayName = "ButtonGroup";
|
|
177
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
178
|
+
0 && (module.exports = {
|
|
179
|
+
ButtonGroup
|
|
180
|
+
});
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
// src/components/button-group/button-group.tsx
|
|
2
|
+
import React, { useState } from "react";
|
|
3
|
+
|
|
4
|
+
// src/components/icons/icons.tsx
|
|
5
|
+
import { Icon as IconifyIcon } from "@iconify/react";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
var Icon = ({ name, size = 24, className, loading = false, ...rest }) => {
|
|
8
|
+
const iconName = name.includes(":") ? name : `heroicons:${name}`;
|
|
9
|
+
const classes = ["icon", className].filter(Boolean).join(" ");
|
|
10
|
+
if (loading) {
|
|
11
|
+
const style = { width: size, height: size };
|
|
12
|
+
return /* @__PURE__ */ jsx(
|
|
13
|
+
"span",
|
|
14
|
+
{
|
|
15
|
+
className: `${classes} icon--skeleton`,
|
|
16
|
+
style,
|
|
17
|
+
"aria-hidden": rest["aria-label"] ? "false" : "true",
|
|
18
|
+
...rest["aria-label"] ? { "aria-label": rest["aria-label"] } : {}
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
return /* @__PURE__ */ jsx(
|
|
23
|
+
IconifyIcon,
|
|
24
|
+
{
|
|
25
|
+
icon: iconName,
|
|
26
|
+
width: size,
|
|
27
|
+
height: size,
|
|
28
|
+
className: classes,
|
|
29
|
+
...rest
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
// src/components/button-group/button-group.tsx
|
|
35
|
+
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
36
|
+
var ButtonGroup = React.forwardRef(
|
|
37
|
+
({
|
|
38
|
+
variant = "primary",
|
|
39
|
+
size = "md",
|
|
40
|
+
orientation = "horizontal",
|
|
41
|
+
mode = "single",
|
|
42
|
+
options,
|
|
43
|
+
value: externalValue,
|
|
44
|
+
onChange,
|
|
45
|
+
fullWidth = false,
|
|
46
|
+
disabled = false,
|
|
47
|
+
className
|
|
48
|
+
}, ref) => {
|
|
49
|
+
const [internalValue, setInternalValue] = useState(
|
|
50
|
+
mode === "multiple" ? [] : ""
|
|
51
|
+
);
|
|
52
|
+
const currentValue = externalValue !== void 0 ? externalValue : internalValue;
|
|
53
|
+
const groupClasses = [
|
|
54
|
+
"btn-group",
|
|
55
|
+
`btn-group--${variant}`,
|
|
56
|
+
`btn-group--${size}`,
|
|
57
|
+
`btn-group--${orientation}`,
|
|
58
|
+
`btn-group--${mode}`,
|
|
59
|
+
fullWidth && "btn-group--full-width",
|
|
60
|
+
disabled && "btn-group--disabled",
|
|
61
|
+
className
|
|
62
|
+
].filter(Boolean).join(" ");
|
|
63
|
+
const iconSize = size === "xs" ? 14 : size === "sm" ? 16 : size === "lg" ? 24 : 20;
|
|
64
|
+
const handleSingleChange = (newValue) => {
|
|
65
|
+
if (disabled) return;
|
|
66
|
+
if (externalValue === void 0) {
|
|
67
|
+
setInternalValue(newValue);
|
|
68
|
+
}
|
|
69
|
+
onChange?.(newValue);
|
|
70
|
+
};
|
|
71
|
+
const handleMultipleChange = (optionValue) => {
|
|
72
|
+
if (disabled) return;
|
|
73
|
+
const currentValues = Array.isArray(currentValue) ? currentValue : [];
|
|
74
|
+
const newValues = currentValues.includes(optionValue) ? currentValues.filter((v) => v !== optionValue) : [...currentValues, optionValue];
|
|
75
|
+
if (externalValue === void 0) {
|
|
76
|
+
setInternalValue(newValues);
|
|
77
|
+
}
|
|
78
|
+
onChange?.(newValues);
|
|
79
|
+
};
|
|
80
|
+
const isOptionSelected = (optionValue) => {
|
|
81
|
+
if (mode === "multiple") {
|
|
82
|
+
return Array.isArray(currentValue) && currentValue.includes(optionValue);
|
|
83
|
+
}
|
|
84
|
+
return currentValue === optionValue;
|
|
85
|
+
};
|
|
86
|
+
if (mode === "single") {
|
|
87
|
+
return /* @__PURE__ */ jsx2("div", { ref, className: groupClasses, role: "radiogroup", children: options.map((option) => {
|
|
88
|
+
const isSelected = isOptionSelected(option.value);
|
|
89
|
+
const isDisabled = disabled || option.disabled;
|
|
90
|
+
const buttonClasses = [
|
|
91
|
+
"btn-group__button",
|
|
92
|
+
isSelected && "btn-group__button--selected",
|
|
93
|
+
isDisabled && "btn-group__button--disabled"
|
|
94
|
+
].filter(Boolean).join(" ");
|
|
95
|
+
return /* @__PURE__ */ jsxs(
|
|
96
|
+
"button",
|
|
97
|
+
{
|
|
98
|
+
type: "button",
|
|
99
|
+
role: "radio",
|
|
100
|
+
"aria-checked": isSelected,
|
|
101
|
+
disabled: isDisabled,
|
|
102
|
+
className: buttonClasses,
|
|
103
|
+
onClick: () => handleSingleChange(option.value),
|
|
104
|
+
children: [
|
|
105
|
+
option.icon && /* @__PURE__ */ jsx2(Icon, { name: option.icon, size: iconSize, className: "btn-group__icon" }),
|
|
106
|
+
option.label
|
|
107
|
+
]
|
|
108
|
+
},
|
|
109
|
+
option.value
|
|
110
|
+
);
|
|
111
|
+
}) });
|
|
112
|
+
}
|
|
113
|
+
return /* @__PURE__ */ jsx2("div", { ref, className: groupClasses, role: "group", children: options.map((option) => {
|
|
114
|
+
const isSelected = isOptionSelected(option.value);
|
|
115
|
+
const isDisabled = disabled || option.disabled;
|
|
116
|
+
const buttonClasses = [
|
|
117
|
+
"btn-group__button",
|
|
118
|
+
isSelected && "btn-group__button--selected",
|
|
119
|
+
isDisabled && "btn-group__button--disabled"
|
|
120
|
+
].filter(Boolean).join(" ");
|
|
121
|
+
return /* @__PURE__ */ jsxs(
|
|
122
|
+
"button",
|
|
123
|
+
{
|
|
124
|
+
type: "button",
|
|
125
|
+
role: "checkbox",
|
|
126
|
+
"aria-checked": isSelected,
|
|
127
|
+
disabled: isDisabled,
|
|
128
|
+
className: buttonClasses,
|
|
129
|
+
onClick: () => handleMultipleChange(option.value),
|
|
130
|
+
children: [
|
|
131
|
+
option.icon && /* @__PURE__ */ jsx2(Icon, { name: option.icon, size: iconSize, className: "btn-group__icon" }),
|
|
132
|
+
option.label
|
|
133
|
+
]
|
|
134
|
+
},
|
|
135
|
+
option.value
|
|
136
|
+
);
|
|
137
|
+
}) });
|
|
138
|
+
}
|
|
139
|
+
);
|
|
140
|
+
ButtonGroup.displayName = "ButtonGroup";
|
|
141
|
+
export {
|
|
142
|
+
ButtonGroup
|
|
143
|
+
};
|
|
@@ -1,16 +1,48 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
/* src/style/components/icons/icons.css */
|
|
2
|
+
.icon {
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
justify-content: center;
|
|
6
|
+
}
|
|
7
|
+
.icon--skeleton {
|
|
8
|
+
background:
|
|
9
|
+
linear-gradient(
|
|
10
|
+
90deg,
|
|
11
|
+
rgba(0, 0, 0, 0.06) 0%,
|
|
12
|
+
rgba(0, 0, 0, 0.03) 50%,
|
|
13
|
+
rgba(0, 0, 0, 0.06) 100%);
|
|
14
|
+
border-radius: 4px;
|
|
15
|
+
animation: hb-skeleton 1.2s ease-in-out infinite;
|
|
16
|
+
}
|
|
17
|
+
@keyframes hb-skeleton {
|
|
18
|
+
0% {
|
|
19
|
+
background-position: 200% 0;
|
|
20
|
+
}
|
|
21
|
+
100% {
|
|
22
|
+
background-position: -200% 0;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
.icon {
|
|
26
|
+
display: inline-block;
|
|
27
|
+
flex-shrink: 0;
|
|
28
|
+
transition: color var(--transition-base, 0.2s ease);
|
|
29
|
+
}
|
|
30
|
+
.icon--interactive {
|
|
31
|
+
cursor: pointer;
|
|
32
|
+
color: var(--color-foreground-1);
|
|
33
|
+
}
|
|
34
|
+
.icon--interactive:hover:not(:disabled) {
|
|
35
|
+
color: var(--color-action-primary-hover);
|
|
36
|
+
}
|
|
37
|
+
.icon--interactive:active:not(:disabled) {
|
|
38
|
+
color: var(--color-action-primary-active);
|
|
39
|
+
}
|
|
40
|
+
.icon--interactive:disabled {
|
|
41
|
+
cursor: not-allowed;
|
|
42
|
+
color: var(--color-foreground-2);
|
|
43
|
+
}
|
|
13
44
|
|
|
45
|
+
/* src/style/components/button/button.css */
|
|
14
46
|
.btn {
|
|
15
47
|
position: relative;
|
|
16
48
|
display: inline-flex;
|
|
@@ -22,203 +54,171 @@
|
|
|
22
54
|
user-select: none;
|
|
23
55
|
border-radius: var(--radius-base);
|
|
24
56
|
border: 1px solid transparent;
|
|
57
|
+
font-family: var(--font-family-action);
|
|
25
58
|
font-weight: var(--font-weight-semibold);
|
|
26
59
|
line-height: var(--line-height-normal);
|
|
27
60
|
letter-spacing: var(--letter-spacing-normal);
|
|
28
61
|
transition: var(--motion-transition-hover-in), transform var(--motion-duration-fast) var(--motion-easing-linear);
|
|
29
62
|
cursor: pointer;
|
|
30
63
|
}
|
|
31
|
-
|
|
32
64
|
.btn:not(:hover):not(:active) {
|
|
33
65
|
transition: var(--motion-transition-hover-out), transform var(--motion-duration-fast) var(--motion-easing-accelerate);
|
|
34
66
|
}
|
|
35
|
-
|
|
36
|
-
/* Sizes */
|
|
37
67
|
.btn--xs {
|
|
38
68
|
padding: var(--spacing-1);
|
|
39
69
|
font-size: var(--font-size-xs);
|
|
40
70
|
}
|
|
41
|
-
|
|
42
71
|
.btn--sm {
|
|
43
72
|
padding: var(--spacing-2) var(--spacing-3);
|
|
44
73
|
font-size: var(--font-size-sm);
|
|
45
74
|
min-height: 32px;
|
|
46
75
|
}
|
|
47
|
-
|
|
48
76
|
.btn--md {
|
|
49
77
|
padding: var(--spacing-2) var(--spacing-4);
|
|
50
78
|
font-size: var(--font-size-base);
|
|
51
79
|
min-height: 40px;
|
|
52
80
|
}
|
|
53
|
-
|
|
54
81
|
.btn--lg {
|
|
55
82
|
padding: var(--spacing-3) var(--spacing-6);
|
|
56
83
|
font-size: var(--font-size-lg);
|
|
57
84
|
min-height: 48px;
|
|
58
85
|
}
|
|
59
|
-
|
|
60
|
-
/* Icon only variant */
|
|
61
86
|
.btn--icon-only {
|
|
62
87
|
padding: var(--spacing-2);
|
|
63
88
|
width: auto;
|
|
64
89
|
aspect-ratio: 1;
|
|
65
90
|
}
|
|
66
|
-
|
|
67
91
|
.btn--icon-only.btn--xs {
|
|
68
92
|
padding: var(--spacing-1);
|
|
69
93
|
min-width: 24px;
|
|
70
94
|
min-height: 24px;
|
|
71
95
|
}
|
|
72
|
-
|
|
73
96
|
.btn--icon-only.btn--sm {
|
|
74
97
|
padding: var(--spacing-1);
|
|
75
98
|
min-width: 32px;
|
|
76
99
|
min-height: 32px;
|
|
77
100
|
}
|
|
78
|
-
|
|
79
101
|
.btn--icon-only.btn--md {
|
|
80
102
|
padding: var(--spacing-2);
|
|
81
103
|
min-width: 40px;
|
|
82
104
|
min-height: 40px;
|
|
83
105
|
}
|
|
84
|
-
|
|
85
106
|
.btn--icon-only.btn--lg {
|
|
86
107
|
padding: var(--spacing-3);
|
|
87
108
|
min-width: 48px;
|
|
88
109
|
min-height: 48px;
|
|
89
110
|
}
|
|
90
|
-
|
|
91
|
-
|
|
111
|
+
.btn--active {
|
|
112
|
+
background-color: var(--color-accent);
|
|
113
|
+
color: var(--color-on-accent);
|
|
114
|
+
}
|
|
115
|
+
.btn--active:hover:not(:disabled) {
|
|
116
|
+
background-color: var(--color-accent-hover);
|
|
117
|
+
color: var(--color-on-accent);
|
|
118
|
+
}
|
|
119
|
+
.btn--active:active:not(:disabled) {
|
|
120
|
+
background-color: var(--color-accent-active);
|
|
121
|
+
color: var(--color-on-accent);
|
|
122
|
+
}
|
|
92
123
|
.btn--primary {
|
|
93
124
|
background-color: var(--color-action-primary);
|
|
94
|
-
outline: 0px solid
|
|
125
|
+
outline: 0px solid var(--color-action-primary);
|
|
95
126
|
box-shadow: 0 0 0 0 var(--color-action-primary);
|
|
96
127
|
color: var(--color-on-action-primary);
|
|
97
128
|
}
|
|
98
|
-
|
|
99
|
-
/* Pointer hover */
|
|
100
129
|
.btn--primary:hover:not(:disabled) {
|
|
101
130
|
background-color: var(--color-action-primary-hover);
|
|
102
131
|
box-shadow: 0 0 0 2px var(--color-action-primary-hover);
|
|
103
|
-
outline: 2px solid
|
|
132
|
+
outline: 2px solid var(--color-action-primary-hover);
|
|
104
133
|
}
|
|
105
|
-
|
|
106
|
-
/* Keyboard/Touch active */
|
|
107
134
|
.btn--primary:active:not(:disabled) {
|
|
108
135
|
background-color: var(--color-action-primary-active);
|
|
109
136
|
transform: scale(0.98);
|
|
110
137
|
}
|
|
111
|
-
|
|
112
|
-
/* Focus indicator (keyboard navigation) */
|
|
113
138
|
.btn--primary:focus-visible:not(:disabled) {
|
|
114
139
|
outline: 2px solid var(--color-action-primary);
|
|
115
140
|
outline-offset: 2px;
|
|
116
141
|
}
|
|
117
|
-
|
|
118
|
-
/* ===== SECONDARY VARIANT ===== */
|
|
119
142
|
.btn--secondary {
|
|
120
143
|
background-color: var(--color-action-secondary);
|
|
121
144
|
color: var(--color-on-action-secondary);
|
|
122
145
|
}
|
|
123
|
-
|
|
124
146
|
.btn--secondary:hover:not(:disabled) {
|
|
125
147
|
background-color: var(--color-action-secondary-hover);
|
|
126
148
|
}
|
|
127
|
-
|
|
128
149
|
.btn--secondary:active:not(:disabled) {
|
|
129
150
|
background-color: var(--color-action-secondary-active);
|
|
130
151
|
transform: scale(0.98);
|
|
131
152
|
}
|
|
132
|
-
|
|
133
153
|
.btn--secondary:focus-visible:not(:disabled) {
|
|
134
154
|
outline: 2px solid var(--color-action-secondary);
|
|
135
155
|
outline-offset: 2px;
|
|
136
156
|
}
|
|
137
|
-
|
|
138
|
-
/* ===== TERTIARY VARIANT (Outline) ===== */
|
|
139
157
|
.btn--tertiary {
|
|
140
158
|
background-color: transparent;
|
|
141
159
|
color: var(--color-foreground-2);
|
|
142
160
|
border-color: var(--color-action-tertiary);
|
|
143
161
|
border-width: 2px;
|
|
144
162
|
}
|
|
145
|
-
|
|
146
163
|
.btn--tertiary:hover:not(:disabled) {
|
|
147
164
|
background-color: hsla(var(--accent-hue), var(--accent-saturation), var(--accent-lightness-hover), 0.2);
|
|
148
165
|
border-color: var(--color-action-primary-hover);
|
|
149
166
|
color: var(--color-foreground-2);
|
|
150
167
|
}
|
|
151
|
-
|
|
152
168
|
.btn--tertiary:active:not(:disabled) {
|
|
153
169
|
background-color: hsla(var(--accent-hue), var(--accent-saturation), var(--accent-lightness-active), 0.2);
|
|
154
170
|
border-color: var(--color-action-primary-active);
|
|
155
171
|
color: var(--color-action-primary-active);
|
|
156
172
|
transform: scale(0.98);
|
|
157
173
|
}
|
|
158
|
-
|
|
159
174
|
.btn--tertiary:focus-visible:not(:disabled) {
|
|
160
175
|
outline: 2px solid var(--color-action-primary);
|
|
161
176
|
outline-offset: 2px;
|
|
162
177
|
}
|
|
163
|
-
|
|
164
|
-
/* ===== GHOST VARIANT (Transparent Outline) ===== */
|
|
165
178
|
.btn--ghost {
|
|
166
179
|
background-color: transparent;
|
|
167
180
|
color: var(--color-foreground-2);
|
|
168
181
|
border-color: transparent;
|
|
169
182
|
border-width: 2px;
|
|
170
183
|
}
|
|
171
|
-
|
|
172
184
|
.btn--ghost:hover:not(:disabled) {
|
|
173
185
|
background-color: transparent;
|
|
174
186
|
border-color: var(--color-action-primary-hover);
|
|
175
187
|
color: var(--color-foreground-2);
|
|
176
188
|
}
|
|
177
|
-
|
|
178
189
|
.btn--ghost:active:not(:disabled) {
|
|
179
190
|
background-color: hsla(var(--accent-hue), var(--accent-saturation), var(--accent-lightness-active), 0.2);
|
|
180
191
|
border-color: var(--color-action-primary-active);
|
|
181
192
|
color: var(--color-action-primary-active);
|
|
182
193
|
transform: scale(0.98);
|
|
183
194
|
}
|
|
184
|
-
|
|
185
195
|
.btn--ghost:focus-visible:not(:disabled) {
|
|
186
196
|
outline: 2px solid var(--color-action-primary);
|
|
187
197
|
outline-offset: 2px;
|
|
188
198
|
}
|
|
189
|
-
|
|
190
|
-
/* ===== DISABLED STATE (All Variants) ===== */
|
|
191
199
|
.btn:disabled {
|
|
192
200
|
background-color: var(--color-primary-disabled);
|
|
193
201
|
color: var(--color-foreground-2);
|
|
194
202
|
cursor: not-allowed;
|
|
195
203
|
border-color: var(--color-primary-disabled);
|
|
196
204
|
}
|
|
197
|
-
|
|
198
|
-
/* ===== UTILITY CLASSES ===== */
|
|
199
205
|
.btn--full-width {
|
|
200
206
|
width: 100%;
|
|
201
207
|
}
|
|
202
|
-
|
|
203
|
-
/* Touch device support: no hover on touchscreen */
|
|
204
208
|
@media (hover: none) and (pointer: coarse) {
|
|
205
209
|
.btn--primary:active:not(:disabled) {
|
|
206
210
|
background-color: var(--color-primary-active);
|
|
207
211
|
}
|
|
208
|
-
|
|
209
212
|
.btn--secondary:active:not(:disabled) {
|
|
210
213
|
background-color: var(--color-secondary-active);
|
|
211
214
|
}
|
|
212
|
-
|
|
213
215
|
.btn--tertiary:active:not(:disabled) {
|
|
214
216
|
background-color: hsla(var(--primary-hue), var(--primary-saturation), var(--primary-lightness-active), 0.2);
|
|
215
217
|
}
|
|
216
|
-
|
|
217
218
|
.btn--ghost:active:not(:disabled) {
|
|
218
219
|
background-color: hsla(var(--primary-hue), var(--primary-saturation), var(--primary-lightness-active), 0.2);
|
|
219
220
|
}
|
|
220
221
|
}
|
|
221
|
-
|
|
222
222
|
.btn__spinner {
|
|
223
223
|
display: inline-block;
|
|
224
224
|
width: 16px;
|
|
@@ -228,15 +228,12 @@
|
|
|
228
228
|
border-top-color: transparent;
|
|
229
229
|
animation: btn-spin 0.6s linear infinite;
|
|
230
230
|
}
|
|
231
|
-
|
|
232
231
|
.btn__icon {
|
|
233
232
|
flex-shrink: 0;
|
|
234
233
|
}
|
|
235
|
-
|
|
236
234
|
.btn__icon-placeholder {
|
|
237
235
|
flex-shrink: 0;
|
|
238
236
|
}
|
|
239
|
-
|
|
240
237
|
@keyframes btn-spin {
|
|
241
238
|
to {
|
|
242
239
|
transform: rotate(360deg);
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import React__default, { ReactNode } from 'react';
|
|
2
|
+
import { ButtonProps as ButtonProps$1 } from '@ariakit/react';
|
|
3
|
+
import { a as IconName } from '../icons-Czahnf-r.mjs';
|
|
4
|
+
|
|
5
|
+
type ButtonVariant = 'primary' | 'secondary' | 'tertiary' | 'ghost';
|
|
6
|
+
type ButtonSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
7
|
+
interface ButtonProps extends Omit<ButtonProps$1, 'children'> {
|
|
8
|
+
/**
|
|
9
|
+
* Visual variant of the button
|
|
10
|
+
* @default 'primary'
|
|
11
|
+
*/
|
|
12
|
+
variant?: ButtonVariant;
|
|
13
|
+
/**
|
|
14
|
+
* Size of the button
|
|
15
|
+
* @default 'md'
|
|
16
|
+
*/
|
|
17
|
+
size?: ButtonSize;
|
|
18
|
+
/**
|
|
19
|
+
* Button content
|
|
20
|
+
*/
|
|
21
|
+
children?: ReactNode;
|
|
22
|
+
/**
|
|
23
|
+
* Whether the button is in a loading state
|
|
24
|
+
* @default false
|
|
25
|
+
*/
|
|
26
|
+
isLoading?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Full width button
|
|
29
|
+
* @default false
|
|
30
|
+
*/
|
|
31
|
+
fullWidth?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Icon to display at the start of the button
|
|
34
|
+
*/
|
|
35
|
+
startIcon?: IconName;
|
|
36
|
+
/**
|
|
37
|
+
* Icon to display at the end of the button
|
|
38
|
+
*/
|
|
39
|
+
endIcon?: IconName;
|
|
40
|
+
/**
|
|
41
|
+
* Whether the button should only display an icon (no text)
|
|
42
|
+
* @default false
|
|
43
|
+
*/
|
|
44
|
+
iconOnly?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* URL to navigate to when button is clicked (makes it work like a link)
|
|
47
|
+
*/
|
|
48
|
+
href?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Whether the button is in an active/selected state
|
|
51
|
+
* @default false
|
|
52
|
+
*/
|
|
53
|
+
active?: boolean;
|
|
54
|
+
}
|
|
55
|
+
declare const Button: React__default.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & React__default.RefAttributes<HTMLButtonElement>>;
|
|
56
|
+
|
|
57
|
+
export { Button, type ButtonProps, type ButtonSize, type ButtonVariant };
|