@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
|
@@ -1,73 +1,57 @@
|
|
|
1
|
-
|
|
2
|
-
* Badge Component Styles
|
|
3
|
-
* Small, contextual information display with variants and sizes
|
|
4
|
-
*/
|
|
5
|
-
|
|
1
|
+
/* src/style/components/badge/badge.css */
|
|
6
2
|
.badge {
|
|
7
3
|
display: inline-flex;
|
|
8
4
|
align-items: center;
|
|
9
5
|
justify-content: center;
|
|
10
|
-
font-
|
|
11
|
-
|
|
6
|
+
font-family: var(--font-family-action);
|
|
7
|
+
font-weight: var(--font-weight-medium);
|
|
8
|
+
border-radius: var(--radius-full);
|
|
12
9
|
white-space: nowrap;
|
|
13
10
|
transition: all var(--transition-base, 0.2s ease);
|
|
14
11
|
}
|
|
15
|
-
|
|
16
|
-
/* Size variants */
|
|
17
12
|
.badge--sm {
|
|
18
|
-
padding:
|
|
13
|
+
padding: .01rem .5rem;
|
|
19
14
|
font-size: var(--font-size-xs);
|
|
20
|
-
min-height:
|
|
15
|
+
min-height: 16px;
|
|
21
16
|
}
|
|
22
|
-
|
|
23
17
|
.badge--md {
|
|
24
|
-
padding:
|
|
18
|
+
padding: .14rem .5rem 0 .5rem;
|
|
25
19
|
font-size: var(--font-size-sm);
|
|
26
20
|
min-height: 24px;
|
|
27
21
|
}
|
|
28
|
-
|
|
29
22
|
.badge--lg {
|
|
30
|
-
padding:
|
|
31
|
-
font-size: var(--font-size-
|
|
23
|
+
padding: 0 .6rem;
|
|
24
|
+
font-size: var(--font-size-md);
|
|
32
25
|
min-height: 32px;
|
|
33
26
|
}
|
|
34
|
-
|
|
35
|
-
/* Color variants */
|
|
36
27
|
.badge--primary {
|
|
37
28
|
background-color: var(--color-primary);
|
|
38
29
|
color: var(--color-on-primary);
|
|
39
30
|
}
|
|
40
|
-
|
|
41
31
|
.badge--secondary {
|
|
42
32
|
background-color: var(--color-secondary);
|
|
43
33
|
color: var(--color-on-secondary);
|
|
44
34
|
}
|
|
45
|
-
|
|
46
35
|
.badge--tertiary {
|
|
47
36
|
background-color: var(--color-tertiary);
|
|
48
37
|
color: var(--color-on-tertiary);
|
|
49
38
|
}
|
|
50
|
-
|
|
51
39
|
.badge--accent {
|
|
52
40
|
background-color: var(--color-accent);
|
|
53
41
|
color: var(--color-on-accent);
|
|
54
42
|
}
|
|
55
|
-
|
|
56
43
|
.badge--success {
|
|
57
44
|
background-color: hsla(var(--success-hue), var(--success-saturation), var(--success-lightness), 1);
|
|
58
45
|
color: hsla(var(--success-hue), 0%, 100%, 1);
|
|
59
46
|
}
|
|
60
|
-
|
|
61
47
|
.badge--warning {
|
|
62
48
|
background-color: hsla(var(--warning-hue), var(--warning-saturation), var(--warning-lightness), 1);
|
|
63
49
|
color: hsla(var(--warning-hue), 0%, 100%, 1);
|
|
64
50
|
}
|
|
65
|
-
|
|
66
51
|
.badge--error {
|
|
67
52
|
background-color: hsla(var(--error-hue), var(--error-saturation), var(--error-lightness), 1);
|
|
68
53
|
color: hsla(var(--error-hue), 0%, 100%, 1);
|
|
69
54
|
}
|
|
70
|
-
|
|
71
55
|
.badge--info {
|
|
72
56
|
background-color: hsla(var(--info-hue), var(--info-saturation), var(--info-lightness), 1);
|
|
73
57
|
color: hsla(var(--info-hue), 0%, 100%, 1);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
type BadgeVariant = 'primary' | 'secondary' | 'tertiary' | 'accent' | 'success' | 'warning' | 'error' | 'info';
|
|
4
|
+
type BadgeSize = 'sm' | 'md' | 'lg';
|
|
5
|
+
interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
6
|
+
variant?: BadgeVariant;
|
|
7
|
+
size?: BadgeSize;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
declare const Badge: React.FC<BadgeProps>;
|
|
11
|
+
|
|
12
|
+
export { Badge, type BadgeProps, type BadgeSize, type BadgeVariant };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
type BadgeVariant = 'primary' | 'secondary' | 'tertiary' | 'accent' | 'success' | 'warning' | 'error' | 'info';
|
|
4
|
+
type BadgeSize = 'sm' | 'md' | 'lg';
|
|
5
|
+
interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
6
|
+
variant?: BadgeVariant;
|
|
7
|
+
size?: BadgeSize;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
declare const Badge: React.FC<BadgeProps>;
|
|
11
|
+
|
|
12
|
+
export { Badge, type BadgeProps, type BadgeSize, type BadgeVariant };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/components/badge/index.ts
|
|
21
|
+
var badge_exports = {};
|
|
22
|
+
__export(badge_exports, {
|
|
23
|
+
Badge: () => Badge
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(badge_exports);
|
|
26
|
+
|
|
27
|
+
// src/components/badge/Badge.tsx
|
|
28
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
29
|
+
var Badge = ({
|
|
30
|
+
variant = "primary",
|
|
31
|
+
size = "md",
|
|
32
|
+
className = "",
|
|
33
|
+
children,
|
|
34
|
+
...props
|
|
35
|
+
}) => {
|
|
36
|
+
const classes = ["badge", `badge--${variant}`, `badge--${size}`, className].filter(Boolean).join(" ");
|
|
37
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: classes, ...props, children });
|
|
38
|
+
};
|
|
39
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
40
|
+
0 && (module.exports = {
|
|
41
|
+
Badge
|
|
42
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// src/components/badge/Badge.tsx
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
var Badge = ({
|
|
4
|
+
variant = "primary",
|
|
5
|
+
size = "md",
|
|
6
|
+
className = "",
|
|
7
|
+
children,
|
|
8
|
+
...props
|
|
9
|
+
}) => {
|
|
10
|
+
const classes = ["badge", `badge--${variant}`, `badge--${size}`, className].filter(Boolean).join(" ");
|
|
11
|
+
return /* @__PURE__ */ jsx("span", { className: classes, ...props, children });
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
Badge
|
|
15
|
+
};
|
|
@@ -0,0 +1,280 @@
|
|
|
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
|
+
}
|
|
44
|
+
|
|
45
|
+
/* src/style/components/button/button.css */
|
|
46
|
+
.btn {
|
|
47
|
+
position: relative;
|
|
48
|
+
display: inline-flex;
|
|
49
|
+
align-items: center;
|
|
50
|
+
justify-content: center;
|
|
51
|
+
gap: var(--spacing-2);
|
|
52
|
+
white-space: nowrap;
|
|
53
|
+
text-decoration: none;
|
|
54
|
+
user-select: none;
|
|
55
|
+
border-radius: var(--radius-base);
|
|
56
|
+
border: 1px solid transparent;
|
|
57
|
+
font-family: var(--font-family-action);
|
|
58
|
+
font-weight: var(--font-weight-semibold);
|
|
59
|
+
line-height: var(--line-height-normal);
|
|
60
|
+
letter-spacing: var(--letter-spacing-normal);
|
|
61
|
+
transition: var(--motion-transition-hover-in), transform var(--motion-duration-fast) var(--motion-easing-linear);
|
|
62
|
+
cursor: pointer;
|
|
63
|
+
}
|
|
64
|
+
.btn:not(:hover):not(:active) {
|
|
65
|
+
transition: var(--motion-transition-hover-out), transform var(--motion-duration-fast) var(--motion-easing-accelerate);
|
|
66
|
+
}
|
|
67
|
+
.btn--xs {
|
|
68
|
+
padding: var(--spacing-1);
|
|
69
|
+
font-size: var(--font-size-xs);
|
|
70
|
+
}
|
|
71
|
+
.btn--sm {
|
|
72
|
+
padding: var(--spacing-2) var(--spacing-3);
|
|
73
|
+
font-size: var(--font-size-sm);
|
|
74
|
+
min-height: 32px;
|
|
75
|
+
}
|
|
76
|
+
.btn--md {
|
|
77
|
+
padding: var(--spacing-2) var(--spacing-4);
|
|
78
|
+
font-size: var(--font-size-base);
|
|
79
|
+
min-height: 40px;
|
|
80
|
+
}
|
|
81
|
+
.btn--lg {
|
|
82
|
+
padding: var(--spacing-3) var(--spacing-6);
|
|
83
|
+
font-size: var(--font-size-lg);
|
|
84
|
+
min-height: 48px;
|
|
85
|
+
}
|
|
86
|
+
.btn--icon-only {
|
|
87
|
+
padding: var(--spacing-2);
|
|
88
|
+
width: auto;
|
|
89
|
+
aspect-ratio: 1;
|
|
90
|
+
}
|
|
91
|
+
.btn--icon-only.btn--xs {
|
|
92
|
+
padding: var(--spacing-1);
|
|
93
|
+
min-width: 24px;
|
|
94
|
+
min-height: 24px;
|
|
95
|
+
}
|
|
96
|
+
.btn--icon-only.btn--sm {
|
|
97
|
+
padding: var(--spacing-1);
|
|
98
|
+
min-width: 32px;
|
|
99
|
+
min-height: 32px;
|
|
100
|
+
}
|
|
101
|
+
.btn--icon-only.btn--md {
|
|
102
|
+
padding: var(--spacing-2);
|
|
103
|
+
min-width: 40px;
|
|
104
|
+
min-height: 40px;
|
|
105
|
+
}
|
|
106
|
+
.btn--icon-only.btn--lg {
|
|
107
|
+
padding: var(--spacing-3);
|
|
108
|
+
min-width: 48px;
|
|
109
|
+
min-height: 48px;
|
|
110
|
+
}
|
|
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
|
+
}
|
|
123
|
+
.btn--primary {
|
|
124
|
+
background-color: var(--color-action-primary);
|
|
125
|
+
outline: 0px solid var(--color-action-primary);
|
|
126
|
+
box-shadow: 0 0 0 0 var(--color-action-primary);
|
|
127
|
+
color: var(--color-on-action-primary);
|
|
128
|
+
}
|
|
129
|
+
.btn--primary:hover:not(:disabled) {
|
|
130
|
+
background-color: var(--color-action-primary-hover);
|
|
131
|
+
box-shadow: 0 0 0 2px var(--color-action-primary-hover);
|
|
132
|
+
outline: 2px solid var(--color-action-primary-hover);
|
|
133
|
+
}
|
|
134
|
+
.btn--primary:active:not(:disabled) {
|
|
135
|
+
background-color: var(--color-action-primary-active);
|
|
136
|
+
transform: scale(0.98);
|
|
137
|
+
}
|
|
138
|
+
.btn--primary:focus-visible:not(:disabled) {
|
|
139
|
+
outline: 2px solid var(--color-action-primary);
|
|
140
|
+
outline-offset: 2px;
|
|
141
|
+
}
|
|
142
|
+
.btn--secondary {
|
|
143
|
+
background-color: var(--color-action-secondary);
|
|
144
|
+
color: var(--color-on-action-secondary);
|
|
145
|
+
}
|
|
146
|
+
.btn--secondary:hover:not(:disabled) {
|
|
147
|
+
background-color: var(--color-action-secondary-hover);
|
|
148
|
+
}
|
|
149
|
+
.btn--secondary:active:not(:disabled) {
|
|
150
|
+
background-color: var(--color-action-secondary-active);
|
|
151
|
+
transform: scale(0.98);
|
|
152
|
+
}
|
|
153
|
+
.btn--secondary:focus-visible:not(:disabled) {
|
|
154
|
+
outline: 2px solid var(--color-action-secondary);
|
|
155
|
+
outline-offset: 2px;
|
|
156
|
+
}
|
|
157
|
+
.btn--tertiary {
|
|
158
|
+
background-color: transparent;
|
|
159
|
+
color: var(--color-foreground-2);
|
|
160
|
+
border-color: var(--color-action-tertiary);
|
|
161
|
+
border-width: 2px;
|
|
162
|
+
}
|
|
163
|
+
.btn--tertiary:hover:not(:disabled) {
|
|
164
|
+
background-color: hsla(var(--accent-hue), var(--accent-saturation), var(--accent-lightness-hover), 0.2);
|
|
165
|
+
border-color: var(--color-action-primary-hover);
|
|
166
|
+
color: var(--color-foreground-2);
|
|
167
|
+
}
|
|
168
|
+
.btn--tertiary:active:not(:disabled) {
|
|
169
|
+
background-color: hsla(var(--accent-hue), var(--accent-saturation), var(--accent-lightness-active), 0.2);
|
|
170
|
+
border-color: var(--color-action-primary-active);
|
|
171
|
+
color: var(--color-action-primary-active);
|
|
172
|
+
transform: scale(0.98);
|
|
173
|
+
}
|
|
174
|
+
.btn--tertiary:focus-visible:not(:disabled) {
|
|
175
|
+
outline: 2px solid var(--color-action-primary);
|
|
176
|
+
outline-offset: 2px;
|
|
177
|
+
}
|
|
178
|
+
.btn--ghost {
|
|
179
|
+
background-color: transparent;
|
|
180
|
+
color: var(--color-foreground-2);
|
|
181
|
+
border-color: transparent;
|
|
182
|
+
border-width: 2px;
|
|
183
|
+
}
|
|
184
|
+
.btn--ghost:hover:not(:disabled) {
|
|
185
|
+
background-color: transparent;
|
|
186
|
+
border-color: var(--color-action-primary-hover);
|
|
187
|
+
color: var(--color-foreground-2);
|
|
188
|
+
}
|
|
189
|
+
.btn--ghost:active:not(:disabled) {
|
|
190
|
+
background-color: hsla(var(--accent-hue), var(--accent-saturation), var(--accent-lightness-active), 0.2);
|
|
191
|
+
border-color: var(--color-action-primary-active);
|
|
192
|
+
color: var(--color-action-primary-active);
|
|
193
|
+
transform: scale(0.98);
|
|
194
|
+
}
|
|
195
|
+
.btn--ghost:focus-visible:not(:disabled) {
|
|
196
|
+
outline: 2px solid var(--color-action-primary);
|
|
197
|
+
outline-offset: 2px;
|
|
198
|
+
}
|
|
199
|
+
.btn:disabled {
|
|
200
|
+
background-color: var(--color-primary-disabled);
|
|
201
|
+
color: var(--color-foreground-2);
|
|
202
|
+
cursor: not-allowed;
|
|
203
|
+
border-color: var(--color-primary-disabled);
|
|
204
|
+
}
|
|
205
|
+
.btn--full-width {
|
|
206
|
+
width: 100%;
|
|
207
|
+
}
|
|
208
|
+
@media (hover: none) and (pointer: coarse) {
|
|
209
|
+
.btn--primary:active:not(:disabled) {
|
|
210
|
+
background-color: var(--color-primary-active);
|
|
211
|
+
}
|
|
212
|
+
.btn--secondary:active:not(:disabled) {
|
|
213
|
+
background-color: var(--color-secondary-active);
|
|
214
|
+
}
|
|
215
|
+
.btn--tertiary:active:not(:disabled) {
|
|
216
|
+
background-color: hsla(var(--primary-hue), var(--primary-saturation), var(--primary-lightness-active), 0.2);
|
|
217
|
+
}
|
|
218
|
+
.btn--ghost:active:not(:disabled) {
|
|
219
|
+
background-color: hsla(var(--primary-hue), var(--primary-saturation), var(--primary-lightness-active), 0.2);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
.btn__spinner {
|
|
223
|
+
display: inline-block;
|
|
224
|
+
width: 16px;
|
|
225
|
+
height: 16px;
|
|
226
|
+
border-radius: 50%;
|
|
227
|
+
border: 2px solid currentColor;
|
|
228
|
+
border-top-color: transparent;
|
|
229
|
+
animation: btn-spin 0.6s linear infinite;
|
|
230
|
+
}
|
|
231
|
+
.btn__icon {
|
|
232
|
+
flex-shrink: 0;
|
|
233
|
+
}
|
|
234
|
+
.btn__icon-placeholder {
|
|
235
|
+
flex-shrink: 0;
|
|
236
|
+
}
|
|
237
|
+
@keyframes btn-spin {
|
|
238
|
+
to {
|
|
239
|
+
transform: rotate(360deg);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
/* src/components/banner/banner.css */
|
|
244
|
+
.banner {
|
|
245
|
+
display: flex;
|
|
246
|
+
align-items: flex-start;
|
|
247
|
+
justify-content: space-between;
|
|
248
|
+
padding: var(--spacing-4);
|
|
249
|
+
border-radius: var(--radius-md);
|
|
250
|
+
margin-bottom: var(--spacing-4);
|
|
251
|
+
font-weight: 500;
|
|
252
|
+
gap: var(--spacing-3);
|
|
253
|
+
}
|
|
254
|
+
.banner__content {
|
|
255
|
+
display: flex;
|
|
256
|
+
align-items: flex-start;
|
|
257
|
+
gap: var(--spacing-3);
|
|
258
|
+
flex: 1;
|
|
259
|
+
}
|
|
260
|
+
.banner__message {
|
|
261
|
+
flex: 1;
|
|
262
|
+
line-height: 1.5;
|
|
263
|
+
margin: var(--spacing-1) var(--spacing-1) var(--spacing-1) 0;
|
|
264
|
+
}
|
|
265
|
+
.banner--info {
|
|
266
|
+
background-color: hsla(var(--info-hue), var(--info-saturation), var(--info-lightness), 1);
|
|
267
|
+
color: hsla(var(--info-hue), 0%, 100%, 1);
|
|
268
|
+
}
|
|
269
|
+
.banner--warning {
|
|
270
|
+
background-color: hsla(var(--warning-hue), var(--warning-saturation), var(--warning-lightness), 1);
|
|
271
|
+
color: hsla(var(--warning-hue), 0%, 100%, 1);
|
|
272
|
+
}
|
|
273
|
+
.banner--error {
|
|
274
|
+
background-color: hsla(var(--error-hue), var(--error-saturation), var(--error-lightness), 1);
|
|
275
|
+
color: hsla(var(--error-hue), 0%, 100%, 1);
|
|
276
|
+
}
|
|
277
|
+
.banner--success {
|
|
278
|
+
background-color: hsla(var(--success-hue), var(--success-saturation), var(--success-lightness), 1);
|
|
279
|
+
color: hsla(var(--success-hue), 0%, 100%, 1);
|
|
280
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React__default, { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
type BannerType = 'info' | 'warning' | 'error' | 'success';
|
|
4
|
+
interface BannerProps {
|
|
5
|
+
type?: BannerType;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
icon?: string;
|
|
8
|
+
onDismiss?: () => void;
|
|
9
|
+
}
|
|
10
|
+
declare const Banner: React__default.FC<BannerProps>;
|
|
11
|
+
|
|
12
|
+
export { Banner, type BannerProps, type BannerType };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React__default, { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
type BannerType = 'info' | 'warning' | 'error' | 'success';
|
|
4
|
+
interface BannerProps {
|
|
5
|
+
type?: BannerType;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
icon?: string;
|
|
8
|
+
onDismiss?: () => void;
|
|
9
|
+
}
|
|
10
|
+
declare const Banner: React__default.FC<BannerProps>;
|
|
11
|
+
|
|
12
|
+
export { Banner, type BannerProps, type BannerType };
|
|
@@ -0,0 +1,184 @@
|
|
|
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/banner/index.ts
|
|
31
|
+
var banner_exports = {};
|
|
32
|
+
__export(banner_exports, {
|
|
33
|
+
Banner: () => Banner
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(banner_exports);
|
|
36
|
+
|
|
37
|
+
// src/components/icons/icons.tsx
|
|
38
|
+
var import_react = require("@iconify/react");
|
|
39
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
40
|
+
var Icon = ({ name, size = 24, className, loading = false, ...rest }) => {
|
|
41
|
+
const iconName = name.includes(":") ? name : `heroicons:${name}`;
|
|
42
|
+
const classes = ["icon", className].filter(Boolean).join(" ");
|
|
43
|
+
if (loading) {
|
|
44
|
+
const style = { width: size, height: size };
|
|
45
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
46
|
+
"span",
|
|
47
|
+
{
|
|
48
|
+
className: `${classes} icon--skeleton`,
|
|
49
|
+
style,
|
|
50
|
+
"aria-hidden": rest["aria-label"] ? "false" : "true",
|
|
51
|
+
...rest["aria-label"] ? { "aria-label": rest["aria-label"] } : {}
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
56
|
+
import_react.Icon,
|
|
57
|
+
{
|
|
58
|
+
icon: iconName,
|
|
59
|
+
width: size,
|
|
60
|
+
height: size,
|
|
61
|
+
className: classes,
|
|
62
|
+
...rest
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
// src/components/icons/iconConstants.ts
|
|
68
|
+
var BANNER_TYPE_ICONS = {
|
|
69
|
+
info: "information-circle-16-solid",
|
|
70
|
+
warning: "exclamation-triangle-16-solid",
|
|
71
|
+
error: "x-circle-16-solid",
|
|
72
|
+
success: "check-circle-16-solid"
|
|
73
|
+
};
|
|
74
|
+
var ACTION_ICONS = {
|
|
75
|
+
close: "x-mark-solid",
|
|
76
|
+
back: "arrow-left-solid",
|
|
77
|
+
forward: "arrow-right-solid",
|
|
78
|
+
up: "arrow-up-solid",
|
|
79
|
+
down: "arrow-down-solid",
|
|
80
|
+
expand: "chevron-down-solid",
|
|
81
|
+
collapse: "chevron-up-solid",
|
|
82
|
+
menu: "bars-3-solid",
|
|
83
|
+
more: "ellipsis-horizontal-solid",
|
|
84
|
+
check: "check-solid",
|
|
85
|
+
cross: "x-mark-solid",
|
|
86
|
+
plus: "plus-solid",
|
|
87
|
+
minus: "minus-solid",
|
|
88
|
+
search: "magnifying-glass-solid",
|
|
89
|
+
clear: "x-mark-solid",
|
|
90
|
+
loading: "arrow-path-solid",
|
|
91
|
+
error: "exclamation-triangle-solid",
|
|
92
|
+
warning: "exclamation-triangle-solid",
|
|
93
|
+
info: "information-circle-solid",
|
|
94
|
+
success: "check-circle-solid"
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
// src/components/button/button.tsx
|
|
98
|
+
var import_react2 = __toESM(require("react"));
|
|
99
|
+
var import_react3 = require("@ariakit/react");
|
|
100
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
101
|
+
var Button = import_react2.default.forwardRef(
|
|
102
|
+
({
|
|
103
|
+
variant = "primary",
|
|
104
|
+
size = "md",
|
|
105
|
+
children,
|
|
106
|
+
isLoading = false,
|
|
107
|
+
disabled = false,
|
|
108
|
+
fullWidth = false,
|
|
109
|
+
startIcon,
|
|
110
|
+
endIcon,
|
|
111
|
+
iconOnly = false,
|
|
112
|
+
href,
|
|
113
|
+
active = false,
|
|
114
|
+
className,
|
|
115
|
+
onClick,
|
|
116
|
+
...props
|
|
117
|
+
}, ref) => {
|
|
118
|
+
const buttonClasses = [
|
|
119
|
+
"btn",
|
|
120
|
+
`btn--${variant}`,
|
|
121
|
+
`btn--${size}`,
|
|
122
|
+
fullWidth && "btn--full-width",
|
|
123
|
+
iconOnly && "btn--icon-only",
|
|
124
|
+
active && "btn--active",
|
|
125
|
+
className
|
|
126
|
+
].filter(Boolean).join(" ");
|
|
127
|
+
const iconSize = size === "xs" ? 14 : size === "sm" ? 16 : size === "lg" ? 24 : 20;
|
|
128
|
+
const buttonContent = /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
129
|
+
isLoading && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "btn__spinner" }),
|
|
130
|
+
startIcon && (isLoading ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "btn__icon-placeholder", style: { width: iconSize, height: iconSize } }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Icon, { name: startIcon, size: iconSize, className: "btn__icon" })),
|
|
131
|
+
!iconOnly && children,
|
|
132
|
+
endIcon && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Icon, { name: endIcon, size: iconSize, className: "btn__icon" })
|
|
133
|
+
] });
|
|
134
|
+
const handleClick = (e) => {
|
|
135
|
+
if (href && !isLoading && !disabled) {
|
|
136
|
+
window.location.href = href;
|
|
137
|
+
}
|
|
138
|
+
onClick?.(e);
|
|
139
|
+
};
|
|
140
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
141
|
+
import_react3.Button,
|
|
142
|
+
{
|
|
143
|
+
ref,
|
|
144
|
+
disabled: disabled || isLoading,
|
|
145
|
+
className: buttonClasses,
|
|
146
|
+
onClick: handleClick,
|
|
147
|
+
...props,
|
|
148
|
+
children: buttonContent
|
|
149
|
+
}
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
);
|
|
153
|
+
Button.displayName = "Button";
|
|
154
|
+
|
|
155
|
+
// src/components/banner/Banner.tsx
|
|
156
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
157
|
+
var Banner = ({
|
|
158
|
+
type = "info",
|
|
159
|
+
children,
|
|
160
|
+
icon,
|
|
161
|
+
onDismiss
|
|
162
|
+
}) => {
|
|
163
|
+
const displayIcon = icon || BANNER_TYPE_ICONS[type];
|
|
164
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: `banner banner--${type}`, children: [
|
|
165
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "banner__content", children: [
|
|
166
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Icon, { name: displayIcon, size: 32 }),
|
|
167
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "banner__message", children })
|
|
168
|
+
] }),
|
|
169
|
+
onDismiss && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
170
|
+
Button,
|
|
171
|
+
{
|
|
172
|
+
variant: "ghost",
|
|
173
|
+
size: "xs",
|
|
174
|
+
onClick: onDismiss,
|
|
175
|
+
"aria-label": "Dismiss banner",
|
|
176
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Icon, { name: ACTION_ICONS.close, size: 20 })
|
|
177
|
+
}
|
|
178
|
+
)
|
|
179
|
+
] });
|
|
180
|
+
};
|
|
181
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
182
|
+
0 && (module.exports = {
|
|
183
|
+
Banner
|
|
184
|
+
});
|