@mattermost/compass-ui 0.1.0-alpha.15 → 0.1.0-alpha.17
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/dist/components/admin-console-footer/AdminConsoleFooter.cjs +2 -0
- package/dist/components/admin-console-footer/AdminConsoleFooter.cjs.map +1 -0
- package/dist/components/admin-console-footer/AdminConsoleFooter.css +1 -0
- package/dist/components/admin-console-footer/AdminConsoleFooter.d.ts +27 -0
- package/dist/components/admin-console-footer/AdminConsoleFooter.d.ts.map +1 -0
- package/dist/components/admin-console-footer/AdminConsoleFooter.js +84 -0
- package/dist/components/admin-console-footer/AdminConsoleFooter.js.map +1 -0
- package/dist/components/admin-console-footer/AdminConsoleFooter.module.scss.cjs +2 -0
- package/dist/components/admin-console-footer/AdminConsoleFooter.module.scss.cjs.map +1 -0
- package/dist/components/admin-console-footer/AdminConsoleFooter.module.scss.js +13 -0
- package/dist/components/admin-console-footer/AdminConsoleFooter.module.scss.js.map +1 -0
- package/dist/components/admin-console-footer/index.cjs +2 -0
- package/dist/components/admin-console-footer/index.cjs.map +1 -0
- package/dist/components/admin-console-footer/index.d.ts +3 -0
- package/dist/components/admin-console-footer/index.d.ts.map +1 -0
- package/dist/components/admin-console-footer/index.js +5 -0
- package/dist/components/admin-console-footer/index.js.map +1 -0
- package/dist/components/admin-panel/AdminPanel.cjs +1 -1
- package/dist/components/admin-panel/AdminPanel.cjs.map +1 -1
- package/dist/components/admin-panel/AdminPanel.d.ts +41 -9
- package/dist/components/admin-panel/AdminPanel.d.ts.map +1 -1
- package/dist/components/admin-panel/AdminPanel.js +91 -81
- package/dist/components/admin-panel/AdminPanel.js.map +1 -1
- package/dist/components/admin-panel-footer/AdminPanelFooter.cjs +1 -1
- package/dist/components/admin-panel-footer/AdminPanelFooter.cjs.map +1 -1
- package/dist/components/admin-panel-footer/AdminPanelFooter.css +1 -1
- package/dist/components/admin-panel-footer/AdminPanelFooter.d.ts +18 -21
- package/dist/components/admin-panel-footer/AdminPanelFooter.d.ts.map +1 -1
- package/dist/components/admin-panel-footer/AdminPanelFooter.js +24 -61
- package/dist/components/admin-panel-footer/AdminPanelFooter.js.map +1 -1
- package/dist/components/admin-panel-footer/AdminPanelFooter.module.scss.cjs +1 -1
- package/dist/components/admin-panel-footer/AdminPanelFooter.module.scss.js +7 -9
- package/dist/components/admin-panel-footer/AdminPanelFooter.module.scss.js.map +1 -1
- package/dist/components/admin-panel-footer/index.d.ts +1 -1
- package/dist/components/admin-panel-footer/index.d.ts.map +1 -1
- package/dist/components/admin-panel-header/AdminPanelHeader.cjs.map +1 -1
- package/dist/components/admin-panel-header/AdminPanelHeader.d.ts +3 -2
- package/dist/components/admin-panel-header/AdminPanelHeader.d.ts.map +1 -1
- package/dist/components/admin-panel-header/AdminPanelHeader.js.map +1 -1
- package/dist/components/channel-sidebar-item/ChannelSidebarItem.css +1 -1
- package/dist/components/channel-sidebar-item/ChannelSidebarItem.module.scss.cjs +1 -1
- package/dist/components/channel-sidebar-item/ChannelSidebarItem.module.scss.js +22 -22
- package/dist/components/checkbox/Checkbox.css +1 -1
- package/dist/components/checkbox/Checkbox.module.scss.cjs +1 -1
- package/dist/components/checkbox/Checkbox.module.scss.js +10 -10
- package/dist/components/chip/Chip.css +1 -1
- package/dist/components/chip/Chip.module.scss.cjs +1 -1
- package/dist/components/chip/Chip.module.scss.js +12 -12
- package/dist/components/combobox/Combobox.cjs +1 -1
- package/dist/components/combobox/Combobox.cjs.map +1 -1
- package/dist/components/combobox/Combobox.css +1 -1
- package/dist/components/combobox/Combobox.d.ts +14 -0
- package/dist/components/combobox/Combobox.d.ts.map +1 -1
- package/dist/components/combobox/Combobox.js +240 -224
- package/dist/components/combobox/Combobox.js.map +1 -1
- package/dist/components/combobox/Combobox.module.scss.cjs +1 -1
- package/dist/components/combobox/Combobox.module.scss.js +21 -21
- package/dist/components/error-message/ErrorMessage.cjs +1 -1
- package/dist/components/error-message/ErrorMessage.cjs.map +1 -1
- package/dist/components/error-message/ErrorMessage.d.ts +2 -3
- package/dist/components/error-message/ErrorMessage.d.ts.map +1 -1
- package/dist/components/error-message/ErrorMessage.js +16 -14
- package/dist/components/error-message/ErrorMessage.js.map +1 -1
- package/dist/components/field/FieldClearButton.cjs +2 -0
- package/dist/components/field/FieldClearButton.cjs.map +1 -0
- package/dist/components/field/FieldClearButton.css +1 -0
- package/dist/components/field/FieldClearButton.d.ts +17 -0
- package/dist/components/field/FieldClearButton.d.ts.map +1 -0
- package/dist/components/field/FieldClearButton.js +40 -0
- package/dist/components/field/FieldClearButton.js.map +1 -0
- package/dist/components/field/FieldClearButton.module.scss.cjs +2 -0
- package/dist/components/field/FieldClearButton.module.scss.cjs.map +1 -0
- package/dist/components/field/FieldClearButton.module.scss.js +7 -0
- package/dist/components/field/FieldClearButton.module.scss.js.map +1 -0
- package/dist/components/field/fieldDescribedBy.cjs +2 -0
- package/dist/components/field/fieldDescribedBy.cjs.map +1 -0
- package/dist/components/field/fieldDescribedBy.d.ts +11 -0
- package/dist/components/field/fieldDescribedBy.d.ts.map +1 -0
- package/dist/components/field/fieldDescribedBy.js +15 -0
- package/dist/components/field/fieldDescribedBy.js.map +1 -0
- package/dist/components/field/useFieldClear.cjs +2 -0
- package/dist/components/field/useFieldClear.cjs.map +1 -0
- package/dist/components/field/useFieldClear.d.ts +21 -0
- package/dist/components/field/useFieldClear.d.ts.map +1 -0
- package/dist/components/field/useFieldClear.js +73 -0
- package/dist/components/field/useFieldClear.js.map +1 -0
- package/dist/components/field-message/FieldMessage.cjs +2 -0
- package/dist/components/field-message/FieldMessage.cjs.map +1 -0
- package/dist/components/field-message/FieldMessage.css +1 -0
- package/dist/components/field-message/FieldMessage.d.ts +17 -0
- package/dist/components/field-message/FieldMessage.d.ts.map +1 -0
- package/dist/components/field-message/FieldMessage.js +28 -0
- package/dist/components/field-message/FieldMessage.js.map +1 -0
- package/dist/components/field-message/FieldMessage.module.scss.cjs +2 -0
- package/dist/components/field-message/FieldMessage.module.scss.cjs.map +1 -0
- package/dist/components/field-message/FieldMessage.module.scss.js +13 -0
- package/dist/components/field-message/FieldMessage.module.scss.js.map +1 -0
- package/dist/components/field-message/index.cjs +2 -0
- package/dist/components/field-message/index.cjs.map +1 -0
- package/dist/components/field-message/index.d.ts +3 -0
- package/dist/components/field-message/index.d.ts.map +1 -0
- package/dist/components/field-message/index.js +5 -0
- package/dist/components/field-message/index.js.map +1 -0
- package/dist/components/menu-item/MenuItem.cjs.map +1 -1
- package/dist/components/menu-item/MenuItem.css +1 -1
- package/dist/components/menu-item/MenuItem.d.ts +20 -0
- package/dist/components/menu-item/MenuItem.d.ts.map +1 -1
- package/dist/components/menu-item/MenuItem.js.map +1 -1
- package/dist/components/menu-item/MenuItem.module.scss.cjs +1 -1
- package/dist/components/menu-item/MenuItem.module.scss.js +16 -16
- package/dist/components/menu-item/index.d.ts +1 -1
- package/dist/components/menu-item/index.d.ts.map +1 -1
- package/dist/components/password-input/PasswordInput.cjs +2 -0
- package/dist/components/password-input/PasswordInput.cjs.map +1 -0
- package/dist/components/password-input/PasswordInput.css +1 -0
- package/dist/components/password-input/PasswordInput.d.ts +49 -0
- package/dist/components/password-input/PasswordInput.d.ts.map +1 -0
- package/dist/components/password-input/PasswordInput.js +140 -0
- package/dist/components/password-input/PasswordInput.js.map +1 -0
- package/dist/components/password-input/PasswordInput.module.scss.cjs +2 -0
- package/dist/components/password-input/PasswordInput.module.scss.cjs.map +1 -0
- package/dist/components/password-input/PasswordInput.module.scss.js +18 -0
- package/dist/components/password-input/PasswordInput.module.scss.js.map +1 -0
- package/dist/components/password-input/index.cjs +2 -0
- package/dist/components/password-input/index.cjs.map +1 -0
- package/dist/components/password-input/index.d.ts +3 -0
- package/dist/components/password-input/index.d.ts.map +1 -0
- package/dist/components/password-input/index.js +5 -0
- package/dist/components/password-input/index.js.map +1 -0
- package/dist/components/radio/Radio.css +1 -1
- package/dist/components/radio/Radio.module.scss.cjs +1 -1
- package/dist/components/radio/Radio.module.scss.js +12 -12
- package/dist/components/search-input/SearchInput.cjs +1 -1
- package/dist/components/search-input/SearchInput.cjs.map +1 -1
- package/dist/components/search-input/SearchInput.css +1 -1
- package/dist/components/search-input/SearchInput.d.ts +8 -0
- package/dist/components/search-input/SearchInput.d.ts.map +1 -1
- package/dist/components/search-input/SearchInput.js +114 -115
- package/dist/components/search-input/SearchInput.js.map +1 -1
- package/dist/components/search-input/SearchInput.module.scss.cjs +1 -1
- package/dist/components/search-input/SearchInput.module.scss.js +15 -16
- package/dist/components/search-input/SearchInput.module.scss.js.map +1 -1
- package/dist/components/section-notice/SectionNotice.cjs +1 -1
- package/dist/components/section-notice/SectionNotice.cjs.map +1 -1
- package/dist/components/section-notice/SectionNotice.css +1 -1
- package/dist/components/section-notice/SectionNotice.js +17 -17
- package/dist/components/section-notice/SectionNotice.js.map +1 -1
- package/dist/components/section-notice/SectionNotice.module.scss.cjs +1 -1
- package/dist/components/section-notice/SectionNotice.module.scss.js +12 -12
- package/dist/components/select/Select.cjs +1 -1
- package/dist/components/select/Select.cjs.map +1 -1
- package/dist/components/select/Select.css +1 -1
- package/dist/components/select/Select.d.ts +16 -0
- package/dist/components/select/Select.d.ts.map +1 -1
- package/dist/components/select/Select.js +177 -157
- package/dist/components/select/Select.js.map +1 -1
- package/dist/components/select/Select.module.scss.cjs +1 -1
- package/dist/components/select/Select.module.scss.js +20 -20
- package/dist/components/switch/Switch.css +1 -1
- package/dist/components/switch/Switch.module.scss.cjs +1 -1
- package/dist/components/switch/Switch.module.scss.js +9 -9
- package/dist/components/text-area/TextArea.cjs +1 -1
- package/dist/components/text-area/TextArea.cjs.map +1 -1
- package/dist/components/text-area/TextArea.css +1 -1
- package/dist/components/text-area/TextArea.d.ts +8 -0
- package/dist/components/text-area/TextArea.d.ts.map +1 -1
- package/dist/components/text-area/TextArea.js +86 -67
- package/dist/components/text-area/TextArea.js.map +1 -1
- package/dist/components/text-area/TextArea.module.scss.cjs +1 -1
- package/dist/components/text-area/TextArea.module.scss.js +12 -10
- package/dist/components/text-area/TextArea.module.scss.js.map +1 -1
- package/dist/components/text-input/TextInput.cjs +1 -1
- package/dist/components/text-input/TextInput.cjs.map +1 -1
- package/dist/components/text-input/TextInput.css +1 -1
- package/dist/components/text-input/TextInput.d.ts +38 -1
- package/dist/components/text-input/TextInput.d.ts.map +1 -1
- package/dist/components/text-input/TextInput.js +149 -93
- package/dist/components/text-input/TextInput.js.map +1 -1
- package/dist/components/text-input/TextInput.module.scss.cjs +1 -1
- package/dist/components/text-input/TextInput.module.scss.js +19 -14
- package/dist/components/text-input/TextInput.module.scss.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +172 -166
- package/dist/index.js.map +1 -1
- package/dist/utils/menuItemProps.cjs +2 -0
- package/dist/utils/menuItemProps.cjs.map +1 -0
- package/dist/utils/menuItemProps.d.ts +5 -0
- package/dist/utils/menuItemProps.d.ts.map +1 -0
- package/dist/utils/menuItemProps.js +12 -0
- package/dist/utils/menuItemProps.js.map +1 -0
- package/package.json +10 -1
- package/dist/components/error-message/ErrorMessage.css +0 -1
- package/dist/components/error-message/ErrorMessage.module.scss.cjs +0 -2
- package/dist/components/error-message/ErrorMessage.module.scss.cjs.map +0 -1
- package/dist/components/error-message/ErrorMessage.module.scss.js +0 -9
- package/dist/components/error-message/ErrorMessage.module.scss.js.map +0 -1
|
@@ -1,130 +1,129 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { toKebab as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
|
|
1
|
+
import { jsxs as f, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as ie, useId as ne, useRef as te, useState as j, useCallback as r } from "react";
|
|
3
|
+
import { toKebab as le } from "../../utils/string.js";
|
|
4
|
+
import ce from "../icon/Icon.js";
|
|
5
|
+
import __oe from "@mattermost/compass-icons/components/magnify.js";const oe=__oe&&__oe.default?__oe.default:__oe;
|
|
6
|
+
import re from "../field/FieldClearButton.js";
|
|
7
|
+
import { mergeFieldDescribedBy as de, hasFieldMessage as ue, isFieldInvalid as he } from "../field/fieldDescribedBy.js";
|
|
8
|
+
import { useFieldClear as me } from "../field/useFieldClear.js";
|
|
9
|
+
import pe from "../field-message/FieldMessage.js";
|
|
10
|
+
import e from "./SearchInput.module.scss.js";
|
|
11
|
+
const fe = {
|
|
10
12
|
small: "12",
|
|
11
13
|
medium: "16",
|
|
12
14
|
large: "20"
|
|
13
|
-
},
|
|
14
|
-
small: "12",
|
|
15
|
-
medium: "16",
|
|
16
|
-
large: "16"
|
|
17
|
-
}, _e = P(
|
|
15
|
+
}, Me = ie(
|
|
18
16
|
function({
|
|
19
|
-
className:
|
|
20
|
-
size:
|
|
21
|
-
label:
|
|
22
|
-
invalid:
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
x(!1), d == null || d(e);
|
|
17
|
+
className: D = "",
|
|
18
|
+
size: d = "medium",
|
|
19
|
+
label: u,
|
|
20
|
+
invalid: K = !1,
|
|
21
|
+
message: h,
|
|
22
|
+
messageTone: v,
|
|
23
|
+
onClear: V,
|
|
24
|
+
clearLabel: k = "Clear search",
|
|
25
|
+
clearButtonProps: t,
|
|
26
|
+
id: z,
|
|
27
|
+
value: m,
|
|
28
|
+
defaultValue: I,
|
|
29
|
+
placeholder: E,
|
|
30
|
+
onFocus: l,
|
|
31
|
+
onBlur: c,
|
|
32
|
+
onChange: o,
|
|
33
|
+
disabled: b,
|
|
34
|
+
readOnly: _,
|
|
35
|
+
onKeyDown: $,
|
|
36
|
+
"aria-describedby": A,
|
|
37
|
+
...L
|
|
38
|
+
}, n) {
|
|
39
|
+
const T = ne(), p = z ?? T, C = te(null), i = m !== void 0, [U, g] = j(
|
|
40
|
+
I ?? ""
|
|
41
|
+
), y = i ? m : U, F = y != null && y !== "", [Z, N] = j(!1), q = Z || F, G = r(
|
|
42
|
+
(s) => {
|
|
43
|
+
N(!0), l == null || l(s);
|
|
47
44
|
},
|
|
48
|
-
[
|
|
49
|
-
),
|
|
50
|
-
(
|
|
51
|
-
|
|
45
|
+
[l]
|
|
46
|
+
), H = r(
|
|
47
|
+
(s) => {
|
|
48
|
+
N(!1), c == null || c(s);
|
|
52
49
|
},
|
|
53
|
-
[
|
|
54
|
-
), w =
|
|
55
|
-
(
|
|
56
|
-
|
|
50
|
+
[c]
|
|
51
|
+
), w = r(
|
|
52
|
+
(s) => {
|
|
53
|
+
i || g(s.target.value), o == null || o(s);
|
|
57
54
|
},
|
|
58
|
-
[
|
|
59
|
-
),
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
if (p) {
|
|
63
|
-
p(), (R = I.current) == null || R.focus();
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
const e = I.current;
|
|
67
|
-
e != null && (e.value = "", l || C(""), a == null || a({
|
|
68
|
-
target: e,
|
|
69
|
-
currentTarget: e
|
|
70
|
-
}), e.focus());
|
|
71
|
-
}, [c, l, a, p]), G = n(
|
|
72
|
-
(e) => {
|
|
73
|
-
m == null || m(e), !(e.defaultPrevented || c) && e.key === "Escape" && o && (e.preventDefault(), v());
|
|
55
|
+
[i, o]
|
|
56
|
+
), J = r(
|
|
57
|
+
(s) => {
|
|
58
|
+
C.current = s, typeof n == "function" ? n(s) : n && (n.current = s);
|
|
74
59
|
},
|
|
75
|
-
[
|
|
76
|
-
),
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
60
|
+
[n]
|
|
61
|
+
), { showClearButton: x, handleClear: O, handleKeyDown: Q } = me({
|
|
62
|
+
disabled: !!(b || _),
|
|
63
|
+
hasValue: F,
|
|
64
|
+
clearEnabled: !0,
|
|
65
|
+
isControlled: i,
|
|
66
|
+
onClear: V,
|
|
67
|
+
onChange: w,
|
|
68
|
+
onKeyDown: $,
|
|
69
|
+
inputRef: C,
|
|
70
|
+
setUncontrolledValue: g
|
|
71
|
+
}), M = he(K, h, v), S = ue(h), W = e[`search-input--size-${le(d)}`], X = M ? e["search-input--invalid"] : "", Y = u != null && q ? e["search-input--label-floated"] : "", B = e["search-input--has-leading-icon"], P = x ? e["search-input--has-trailing-icon"] : "", ee = fe[d], se = [
|
|
72
|
+
e["search-input"],
|
|
81
73
|
W,
|
|
82
74
|
X,
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
75
|
+
Y,
|
|
76
|
+
B,
|
|
77
|
+
P,
|
|
78
|
+
D
|
|
79
|
+
].filter(Boolean).join(" "), R = S ? `${p}-message` : void 0, ae = v ?? "error";
|
|
80
|
+
return /* @__PURE__ */ f("div", { className: se, children: [
|
|
81
|
+
/* @__PURE__ */ f("div", { className: e["search-input__wrapper"], children: [
|
|
82
|
+
u != null && /* @__PURE__ */ a("label", { className: e["search-input__label"], htmlFor: p, children: u }),
|
|
83
|
+
/* @__PURE__ */ f("div", { className: e["search-input__inner"], children: [
|
|
84
|
+
/* @__PURE__ */ a("span", { className: e["search-input__leading-icon"], "aria-hidden": !0, children: /* @__PURE__ */ a(ce, { size: ee, glyph: /* @__PURE__ */ a(oe, {}) }) }),
|
|
85
|
+
/* @__PURE__ */ a(
|
|
86
|
+
"input",
|
|
87
|
+
{
|
|
88
|
+
ref: J,
|
|
89
|
+
id: p,
|
|
90
|
+
type: "search",
|
|
91
|
+
className: e["search-input__input"],
|
|
92
|
+
value: i ? m : void 0,
|
|
93
|
+
defaultValue: i ? void 0 : I,
|
|
94
|
+
placeholder: E,
|
|
95
|
+
disabled: b,
|
|
96
|
+
readOnly: _,
|
|
97
|
+
onFocus: G,
|
|
98
|
+
onBlur: H,
|
|
99
|
+
onChange: w,
|
|
100
|
+
onKeyDown: Q,
|
|
101
|
+
"aria-invalid": M ? !0 : void 0,
|
|
102
|
+
"aria-describedby": de(
|
|
103
|
+
A,
|
|
104
|
+
R,
|
|
105
|
+
void 0
|
|
106
|
+
),
|
|
107
|
+
...L
|
|
108
|
+
}
|
|
109
|
+
),
|
|
110
|
+
x && /* @__PURE__ */ a("span", { className: e["search-input__trailing-icon"], children: /* @__PURE__ */ a(
|
|
111
|
+
re,
|
|
112
|
+
{
|
|
113
|
+
size: d,
|
|
114
|
+
clearLabel: k,
|
|
115
|
+
clearButtonProps: t,
|
|
116
|
+
onClick: O,
|
|
117
|
+
tabIndex: (t == null ? void 0 : t.tabIndex) ?? -1
|
|
118
|
+
}
|
|
119
|
+
) })
|
|
120
|
+
] })
|
|
121
|
+
] }),
|
|
122
|
+
S && /* @__PURE__ */ a(pe, { id: R, message: h, tone: ae })
|
|
123
|
+
] });
|
|
125
124
|
}
|
|
126
125
|
);
|
|
127
126
|
export {
|
|
128
|
-
|
|
127
|
+
Me as default
|
|
129
128
|
};
|
|
130
129
|
//# sourceMappingURL=SearchInput.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchInput.js","sources":["../../../src/components/search-input/SearchInput.tsx"],"sourcesContent":["import type {\n ChangeEvent,\n InputHTMLAttributes,\n KeyboardEvent,\n ReactNode,\n} from 'react';\nimport { forwardRef, useId, useState, useCallback, useRef } from 'react';\nimport { toKebab } from '@/utils/string';\nimport type { IconSize } from '@/components/icon/Icon';\nimport Icon from '@/components/icon/Icon';\nimport MagnifyIcon from '@mattermost/compass-icons/components/magnify';\nimport CloseCircleIcon from '@mattermost/compass-icons/components/close-circle';\nimport type { BuiltInButtonProps } from '@/utils/props';\nimport { mergeClassNames } from '@/utils/props';\nimport styles from './SearchInput.module.scss';\n\nexport type SearchInputSize = 'small' | 'medium' | 'large';\n\nconst ICON_SIZE_MAP: Record<SearchInputSize, IconSize> = {\n small: '12',\n medium: '16',\n large: '20',\n};\n\nconst CLEAR_ICON_SIZE_MAP: Record<SearchInputSize, IconSize> = {\n small: '12',\n medium: '16',\n large: '16',\n};\n\nexport interface SearchInputProps extends Omit<\n InputHTMLAttributes<HTMLInputElement>,\n 'size' | 'type'\n> {\n /** Optional CSS class name. */\n className?: string;\n /** When true, shows invalid/error styling. */\n invalid?: boolean;\n /** Floating label (placeholder-style). Floats above border when filled. */\n label?: ReactNode;\n /** Size variant. Default: Medium. */\n size?: SearchInputSize;\n /** Called when the clear button is pressed. Omit to use built-in clearing. */\n onClear?: () => void;\n /** Accessible name for the clear button. Default: \"Clear search\". */\n clearLabel?: string;\n /** Extra attributes for the clear button (e.g. `data-testid`). */\n clearButtonProps?: BuiltInButtonProps;\n}\n\n/**\n * Search Inputs are the entry point to filtering or finding content — global search, channel\n * switcher, member picker, file finder. They look like a text input with a leading magnifier\n * so the affordance is obvious before the user reads a single word.\n */\nconst SearchInput = forwardRef<HTMLInputElement, SearchInputProps>(\n function SearchInput(\n {\n className = '',\n size = 'medium',\n label,\n invalid = false,\n onClear,\n clearLabel = 'Clear search',\n clearButtonProps,\n id: idProp,\n value: valueProp,\n defaultValue,\n placeholder,\n onFocus,\n onBlur,\n onChange,\n disabled,\n onKeyDown,\n ...rest\n },\n ref,\n ) {\n const generatedId = useId();\n const id = idProp ?? generatedId;\n const inputRef = useRef<HTMLInputElement>(null);\n\n const isControlled = valueProp !== undefined;\n const [uncontrolledValue, setUncontrolledValue] = useState(\n defaultValue ?? '',\n );\n const value = isControlled ? (valueProp as string) : uncontrolledValue;\n const hasValue = value != null && value !== '';\n\n const [isFocused, setIsFocused] = useState(false);\n const labelFloated = isFocused || hasValue;\n\n const handleFocus = useCallback(\n (e: React.FocusEvent<HTMLInputElement>) => {\n setIsFocused(true);\n onFocus?.(e);\n },\n [onFocus],\n );\n const handleBlur = useCallback(\n (e: React.FocusEvent<HTMLInputElement>) => {\n setIsFocused(false);\n onBlur?.(e);\n },\n [onBlur],\n );\n const handleChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n if (!isControlled) setUncontrolledValue(e.target.value);\n onChange?.(e);\n },\n [isControlled, onChange],\n );\n\n const setInputRef = useCallback(\n (node: HTMLInputElement | null) => {\n inputRef.current = node;\n if (typeof ref === 'function') {\n ref(node);\n } else if (ref) {\n ref.current = node;\n }\n },\n [ref],\n );\n\n const handleClear = useCallback(() => {\n if (disabled) return;\n\n if (onClear) {\n onClear();\n inputRef.current?.focus();\n return;\n }\n\n const input = inputRef.current;\n if (input == null) return;\n\n input.value = '';\n if (!isControlled) setUncontrolledValue('');\n\n onChange?.({\n target: input,\n currentTarget: input,\n } as ChangeEvent<HTMLInputElement>);\n\n input.focus();\n }, [disabled, isControlled, onChange, onClear]);\n\n const handleKeyDown = useCallback(\n (e: KeyboardEvent<HTMLInputElement>) => {\n onKeyDown?.(e);\n if (e.defaultPrevented || disabled) return;\n if (e.key === 'Escape' && hasValue) {\n e.preventDefault();\n handleClear();\n }\n },\n [disabled, handleClear, hasValue, onKeyDown],\n );\n\n const showClearButton = hasValue && !disabled;\n\n const sizeClass = styles[`search-input--size-${toKebab(size)}`];\n const invalidClass = invalid ? styles['search-input--invalid'] : '';\n const labelFloatedClass =\n label != null && labelFloated\n ? styles['search-input--label-floated']\n : '';\n const hasLeadingClass = styles['search-input--has-leading-icon'];\n const hasTrailingClass = showClearButton\n ? styles['search-input--has-trailing-icon']\n : '';\n const iconSize = ICON_SIZE_MAP[size];\n const clearIconSize = CLEAR_ICON_SIZE_MAP[size];\n\n const rootClass = [\n styles['search-input'],\n sizeClass,\n invalidClass,\n labelFloatedClass,\n hasLeadingClass,\n hasTrailingClass,\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <div className={rootClass}>\n <div className={styles['search-input__wrapper']}>\n {label != null && (\n <label className={styles['search-input__label']} htmlFor={id}>\n {label}\n </label>\n )}\n <div className={styles['search-input__inner']}>\n <span className={styles['search-input__leading-icon']} aria-hidden>\n <Icon size={iconSize} glyph={<MagnifyIcon />} />\n </span>\n <input\n ref={setInputRef}\n id={id}\n type=\"search\"\n className={styles['search-input__input']}\n value={isControlled ? valueProp : undefined}\n defaultValue={isControlled ? undefined : defaultValue}\n placeholder={placeholder}\n disabled={disabled}\n onFocus={handleFocus}\n onBlur={handleBlur}\n onChange={handleChange}\n onKeyDown={handleKeyDown}\n aria-invalid={invalid ? true : undefined}\n {...rest}\n />\n {showClearButton && (\n <span className={styles['search-input__trailing-icon']}>\n <button\n {...clearButtonProps}\n type=\"button\"\n className={mergeClassNames(\n styles['search-input__clear-button'],\n clearButtonProps?.className,\n )}\n onClick={handleClear}\n aria-label={clearLabel}\n tabIndex={clearButtonProps?.tabIndex ?? -1}\n >\n <Icon size={clearIconSize} glyph={<CloseCircleIcon />} />\n </button>\n </span>\n )}\n </div>\n </div>\n </div>\n );\n },\n);\n\nexport default SearchInput;\n"],"names":["ICON_SIZE_MAP","CLEAR_ICON_SIZE_MAP","SearchInput","forwardRef","className","size","label","invalid","onClear","clearLabel","clearButtonProps","idProp","valueProp","defaultValue","placeholder","onFocus","onBlur","onChange","disabled","onKeyDown","rest","ref","generatedId","useId","id","inputRef","useRef","isControlled","uncontrolledValue","setUncontrolledValue","useState","value","hasValue","isFocused","setIsFocused","labelFloated","handleFocus","useCallback","handleBlur","handleChange","setInputRef","node","handleClear","_a","input","handleKeyDown","showClearButton","sizeClass","styles","toKebab","invalidClass","labelFloatedClass","hasLeadingClass","hasTrailingClass","iconSize","clearIconSize","rootClass","jsx","jsxs","Icon","MagnifyIcon","mergeClassNames","CloseCircleIcon"],"mappings":";;;;;;;;AAkBA,MAAMA,KAAmD;AAAA,EACvD,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,OAAO;AACT,GAEMC,KAAyD;AAAA,EAC7D,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,OAAO;AACT,GA2BMC,KAAcC;AAAA,EAClB,SACE;AAAA,IACE,WAAAC,IAAY;AAAA,IACZ,MAAAC,IAAO;AAAA,IACP,OAAAC;AAAA,IACA,SAAAC,IAAU;AAAA,IACV,SAAAC;AAAA,IACA,YAAAC,IAAa;AAAA,IACb,kBAAAC;AAAA,IACA,IAAIC;AAAA,IACJ,OAAOC;AAAA,IACP,cAAAC;AAAA,IACA,aAAAC;AAAA,IACA,SAAAC;AAAA,IACA,QAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,GAELC,GACA;AACA,UAAMC,IAAcC,EAAA,GACdC,IAAKb,KAAUW,GACfG,IAAWC,GAAyB,IAAI,GAExCC,IAAef,MAAc,QAC7B,CAACgB,GAAmBC,CAAoB,IAAIC;AAAA,MAChDjB,KAAgB;AAAA,IAAA,GAEZkB,IAAQJ,IAAgBf,IAAuBgB,GAC/CI,IAAWD,KAAS,QAAQA,MAAU,IAEtC,CAACE,GAAWC,CAAY,IAAIJ,EAAS,EAAK,GAC1CK,IAAeF,KAAaD,GAE5BI,IAAcC;AAAA,MAClB,CAAC,MAA0C;AACzC,QAAAH,EAAa,EAAI,GACjBnB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A,YAC9B,GAAGa;AAAA,UAAA;AAAA,QAAA;AAAA,QAEL0B,KACC,gBAAAW,EAAC,QAAA,EAAK,WAAWT,EAAO,6BAA6B,GACnD,UAAA,gBAAAS;AAAA,UAAC;AAAA,UAAA;AAAA,YACE,GAAG/C;AAAA,YACJ,MAAK;AAAA,YACL,WAAWmD;AAAA,cACTb,EAAO,4BAA4B;AAAA,cACnCtC,KAAA,gBAAAA,EAAkB;AAAA,YAAA;AAAA,YAEpB,SAASgC;AAAA,YACT,cAAYjC;AAAA,YACZ,WAAUC,KAAA,gBAAAA,EAAkB,aAAY;AAAA,YAExC,4BAACiD,GAAA,EAAK,MAAMJ,GAAe,OAAO,gBAAAE,EAACK,MAAgB,EAAA,CAAI;AAAA,UAAA;AAAA,QAAA,EACzD,CACF;AAAA,MAAA,EAAA,CAEJ;AAAA,IAAA,EAAA,CACF,EAAA,CACF;AAAA,EAEJ;AACF;"}
|
|
1
|
+
{"version":3,"file":"SearchInput.js","sources":["../../../src/components/search-input/SearchInput.tsx"],"sourcesContent":["import type {\n ChangeEvent,\n InputHTMLAttributes,\n KeyboardEvent,\n ReactNode,\n} from 'react';\nimport { forwardRef, useId, useState, useCallback, useRef } from 'react';\nimport { toKebab } from '@/utils/string';\nimport type { IconSize } from '@/components/icon/Icon';\nimport Icon from '@/components/icon/Icon';\nimport MagnifyIcon from '@mattermost/compass-icons/components/magnify';\nimport FieldClearButton from '@/components/field/FieldClearButton';\nimport {\n hasFieldMessage,\n isFieldInvalid,\n mergeFieldDescribedBy,\n} from '@/components/field/fieldDescribedBy';\nimport { useFieldClear } from '@/components/field/useFieldClear';\nimport FieldMessage from '@/components/field-message/FieldMessage';\nimport type { FieldMessageTone } from '@/components/field-message/FieldMessage';\nimport type { BuiltInButtonProps } from '@/utils/props';\nimport styles from './SearchInput.module.scss';\n\nexport type SearchInputSize = 'small' | 'medium' | 'large';\n\nconst ICON_SIZE_MAP: Record<SearchInputSize, IconSize> = {\n small: '12',\n medium: '16',\n large: '20',\n};\n\nexport interface SearchInputProps extends Omit<\n InputHTMLAttributes<HTMLInputElement>,\n 'size' | 'type'\n> {\n /** Optional CSS class name. */\n className?: string;\n /** When true, shows invalid/error styling. */\n invalid?: boolean;\n /** Floating label (placeholder-style). Floats above border when filled. */\n label?: ReactNode;\n /** Size variant. Default: Medium. */\n size?: SearchInputSize;\n /**\n * Field message under the field. Accepts translated nodes (e.g. `<FormattedMessage/>`).\n * Defaults to error tone (invalid chrome) when set without `messageTone`.\n */\n message?: ReactNode;\n /** Visual tone for `message`. Default: `error` when `message` is set. */\n messageTone?: FieldMessageTone;\n /** Called when the clear button is pressed. Omit to use built-in clearing. */\n onClear?: () => void;\n /** Accessible name for the clear button. Default: \"Clear search\". */\n clearLabel?: string;\n /** Extra attributes for the clear button (e.g. `data-testid`). */\n clearButtonProps?: BuiltInButtonProps;\n}\n\n/**\n * Search Inputs are the entry point to filtering or finding content — global search, channel\n * switcher, member picker, file finder. They look like a text input with a leading magnifier\n * so the affordance is obvious before the user reads a single word.\n */\nconst SearchInput = forwardRef<HTMLInputElement, SearchInputProps>(\n function SearchInput(\n {\n className = '',\n size = 'medium',\n label,\n invalid = false,\n message,\n messageTone,\n onClear,\n clearLabel = 'Clear search',\n clearButtonProps,\n id: idProp,\n value: valueProp,\n defaultValue,\n placeholder,\n onFocus,\n onBlur,\n onChange,\n disabled,\n readOnly,\n onKeyDown,\n 'aria-describedby': describedBy,\n ...rest\n },\n ref,\n ) {\n const generatedId = useId();\n const id = idProp ?? generatedId;\n const inputRef = useRef<HTMLInputElement | null>(null);\n\n const isControlled = valueProp !== undefined;\n const [uncontrolledValue, setUncontrolledValue] = useState(\n defaultValue ?? '',\n );\n const value = isControlled ? (valueProp as string) : uncontrolledValue;\n const hasValue = value != null && value !== '';\n\n const [isFocused, setIsFocused] = useState(false);\n const labelFloated = isFocused || hasValue;\n\n const handleFocus = useCallback(\n (e: React.FocusEvent<HTMLInputElement>) => {\n setIsFocused(true);\n onFocus?.(e);\n },\n [onFocus],\n );\n const handleBlur = useCallback(\n (e: React.FocusEvent<HTMLInputElement>) => {\n setIsFocused(false);\n onBlur?.(e);\n },\n [onBlur],\n );\n const handleChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n if (!isControlled) setUncontrolledValue(e.target.value);\n onChange?.(e);\n },\n [isControlled, onChange],\n );\n\n const setInputRef = useCallback(\n (node: HTMLInputElement | null) => {\n inputRef.current = node;\n if (typeof ref === 'function') {\n ref(node);\n } else if (ref) {\n ref.current = node;\n }\n },\n [ref],\n );\n\n const { showClearButton, handleClear, handleKeyDown } = useFieldClear({\n disabled: Boolean(disabled || readOnly),\n hasValue,\n clearEnabled: true,\n isControlled,\n onClear,\n onChange: handleChange,\n onKeyDown: onKeyDown as\n | ((e: KeyboardEvent<HTMLInputElement>) => void)\n | undefined,\n inputRef,\n setUncontrolledValue,\n });\n\n const showInvalid = isFieldInvalid(invalid, message, messageTone);\n const showMessage = hasFieldMessage(message);\n const sizeClass = styles[`search-input--size-${toKebab(size)}`];\n const invalidClass = showInvalid ? styles['search-input--invalid'] : '';\n const labelFloatedClass =\n label != null && labelFloated\n ? styles['search-input--label-floated']\n : '';\n const hasLeadingClass = styles['search-input--has-leading-icon'];\n const hasTrailingClass = showClearButton\n ? styles['search-input--has-trailing-icon']\n : '';\n const iconSize = ICON_SIZE_MAP[size];\n\n const rootClass = [\n styles['search-input'],\n sizeClass,\n invalidClass,\n labelFloatedClass,\n hasLeadingClass,\n hasTrailingClass,\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n const messageId = showMessage ? `${id}-message` : undefined;\n const resolvedTone = messageTone ?? 'error';\n\n return (\n <div className={rootClass}>\n <div className={styles['search-input__wrapper']}>\n {label != null && (\n <label className={styles['search-input__label']} htmlFor={id}>\n {label}\n </label>\n )}\n <div className={styles['search-input__inner']}>\n <span className={styles['search-input__leading-icon']} aria-hidden>\n <Icon size={iconSize} glyph={<MagnifyIcon />} />\n </span>\n <input\n ref={setInputRef}\n id={id}\n type=\"search\"\n className={styles['search-input__input']}\n value={isControlled ? valueProp : undefined}\n defaultValue={isControlled ? undefined : defaultValue}\n placeholder={placeholder}\n disabled={disabled}\n readOnly={readOnly}\n onFocus={handleFocus}\n onBlur={handleBlur}\n onChange={handleChange}\n onKeyDown={handleKeyDown}\n aria-invalid={showInvalid ? true : undefined}\n aria-describedby={mergeFieldDescribedBy(\n describedBy,\n messageId,\n undefined,\n )}\n {...rest}\n />\n {showClearButton && (\n <span className={styles['search-input__trailing-icon']}>\n <FieldClearButton\n size={size}\n clearLabel={clearLabel}\n clearButtonProps={clearButtonProps}\n onClick={handleClear}\n tabIndex={clearButtonProps?.tabIndex ?? -1}\n />\n </span>\n )}\n </div>\n </div>\n {showMessage && (\n <FieldMessage id={messageId} message={message} tone={resolvedTone} />\n )}\n </div>\n );\n },\n);\n\nexport default SearchInput;\n"],"names":["ICON_SIZE_MAP","SearchInput","forwardRef","className","size","label","invalid","message","messageTone","onClear","clearLabel","clearButtonProps","idProp","valueProp","defaultValue","placeholder","onFocus","onBlur","onChange","disabled","readOnly","onKeyDown","describedBy","rest","ref","generatedId","useId","id","inputRef","useRef","isControlled","uncontrolledValue","setUncontrolledValue","useState","value","hasValue","isFocused","setIsFocused","labelFloated","handleFocus","useCallback","e","handleBlur","handleChange","setInputRef","node","showClearButton","handleClear","handleKeyDown","useFieldClear","showInvalid","isFieldInvalid","showMessage","hasFieldMessage","sizeClass","styles","toKebab","invalidClass","labelFloatedClass","hasLeadingClass","hasTrailingClass","iconSize","rootClass","messageId","resolvedTone","jsxs","jsx","Icon","MagnifyIcon","mergeFieldDescribedBy","FieldClearButton","FieldMessage"],"mappings":";;;;;;;;;;AAyBA,MAAMA,KAAmD;AAAA,EACvD,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,OAAO;AACT,GAkCMC,KAAcC;AAAA,EAClB,SACE;AAAA,IACE,WAAAC,IAAY;AAAA,IACZ,MAAAC,IAAO;AAAA,IACP,OAAAC;AAAA,IACA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AA,gBAAAW,EAAC,QAAA,EAAK,WAAWX,EAAO,4BAA4B,GAAG,eAAW,IAChE,UAAA,gBAAAW,EAACC,IAAA,EAAK,MAAMN,IAAU,OAAO,gBAAAK,EAACE,IAAA,CAAA,CAAY,GAAI,GAChD;AAAA,UACA,gBAAAF;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,KAAKtB;AAAA,cACL,IAAAjB;AAAA,cACA,MAAK;AAAA,cACL,WAAW4B,EAAO,qBAAqB;AAAA,cACvC,OAAOzB,IAAejB,IAAY;AAAA,cAClC,cAAciB,IAAe,SAAYhB;AAAA,cACzC,aAAAC;AAAA,cACA,UAAAI;AAAA,cACA,UAAAC;AAAA,cACA,SAASmB;AAAA,cACT,QAAQG;AAAA,cACR,UAAUC;AAAA,cACV,WAAWK;AAAA,cACX,gBAAcE,IAAc,KAAO;AAAA,cACnC,oBAAkBmB;AAAA,gBAChB/C;AAAA,gBACAyC;AAAA,gBACA;AAAA,cAAA;AAAA,cAED,GAAGxC;AAAA,YAAA;AAAA,UAAA;AAAA,UAELuB,KACC,gBAAAoB,EAAC,QAAA,EAAK,WAAWX,EAAO,6BAA6B,GACnD,UAAA,gBAAAW;AAAA,YAACI;AAAA,YAAA;AAAA,cACC,MAAAlE;AAAA,cACA,YAAAM;AAAA,cACA,kBAAAC;AAAA,cACA,SAASoC;AAAA,cACT,WAAUpC,KAAA,gBAAAA,EAAkB,aAAY;AAAA,YAAA;AAAA,UAAA,EAC1C,CACF;AAAA,QAAA,EAAA,CAEJ;AAAA,MAAA,GACF;AAAA,MACCyC,KACC,gBAAAc,EAACK,IAAA,EAAa,IAAIR,GAAW,SAAAxD,GAAkB,MAAMyD,GAAA,CAAc;AAAA,IAAA,GAEvE;AAAA,EAEJ;AACF;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./SearchInput.css');const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./SearchInput.css');const _={"search-input":"_search-input_1h7hr_2","search-input__wrapper":"_search-input__wrapper_1h7hr_8","search-input__input":"_search-input__input_1h7hr_18","search-input__label":"_search-input__label_1h7hr_28","search-input--label-floated":"_search-input--label-floated_1h7hr_48","search-input__inner":"_search-input__inner_1h7hr_55","search-input__leading-icon":"_search-input__leading-icon_1h7hr_86","search-input__trailing-icon":"_search-input__trailing-icon_1h7hr_86","search-input--size-small":"_search-input--size-small_1h7hr_100","search-input--size-medium":"_search-input--size-medium_1h7hr_116","search-input--size-large":"_search-input--size-large_1h7hr_136","search-input--has-leading-icon":"_search-input--has-leading-icon_1h7hr_157","search-input--invalid":"_search-input--invalid_1h7hr_181"};exports.default=_;
|
|
2
2
|
//# sourceMappingURL=SearchInput.module.scss.cjs.map
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import './SearchInput.css';const
|
|
2
|
-
"search-input": "_search-
|
|
3
|
-
"search-input__wrapper": "_search-
|
|
4
|
-
"search-input__input": "_search-
|
|
5
|
-
"search-input__label": "_search-
|
|
6
|
-
"search-input--label-floated": "_search-input--label-
|
|
7
|
-
"search-input__inner": "_search-
|
|
8
|
-
"search-input__leading-icon": "_search-input__leading-
|
|
9
|
-
"search-input__trailing-icon": "_search-input__trailing-
|
|
10
|
-
"search-
|
|
11
|
-
"search-input--size-
|
|
12
|
-
"search-input--size-
|
|
13
|
-
"search-input--
|
|
14
|
-
"search-input--
|
|
15
|
-
"search-input--invalid": "_search-input--invalid_1iq6i_189"
|
|
1
|
+
import './SearchInput.css';const _ = {
|
|
2
|
+
"search-input": "_search-input_1h7hr_2",
|
|
3
|
+
"search-input__wrapper": "_search-input__wrapper_1h7hr_8",
|
|
4
|
+
"search-input__input": "_search-input__input_1h7hr_18",
|
|
5
|
+
"search-input__label": "_search-input__label_1h7hr_28",
|
|
6
|
+
"search-input--label-floated": "_search-input--label-floated_1h7hr_48",
|
|
7
|
+
"search-input__inner": "_search-input__inner_1h7hr_55",
|
|
8
|
+
"search-input__leading-icon": "_search-input__leading-icon_1h7hr_86",
|
|
9
|
+
"search-input__trailing-icon": "_search-input__trailing-icon_1h7hr_86",
|
|
10
|
+
"search-input--size-small": "_search-input--size-small_1h7hr_100",
|
|
11
|
+
"search-input--size-medium": "_search-input--size-medium_1h7hr_116",
|
|
12
|
+
"search-input--size-large": "_search-input--size-large_1h7hr_136",
|
|
13
|
+
"search-input--has-leading-icon": "_search-input--has-leading-icon_1h7hr_157",
|
|
14
|
+
"search-input--invalid": "_search-input--invalid_1h7hr_181"
|
|
16
15
|
};
|
|
17
16
|
export {
|
|
18
|
-
|
|
17
|
+
_ as default
|
|
19
18
|
};
|
|
20
19
|
//# sourceMappingURL=SearchInput.module.scss.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchInput.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SearchInput.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),d=require("../button/Button.cjs"),y=require("../icon-button/IconButton.cjs"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),d=require("../button/Button.cjs"),y=require("../icon-button/IconButton.cjs"),s=require("../icon/Icon.cjs"),__j=require("@mattermost/compass-icons/components/information-outline.js"),j=__j?.default??__j,__O=require("@mattermost/compass-icons/components/alert-outline.js"),O=__O?.default??__O,__S=require("@mattermost/compass-icons/components/alert-circle-outline.js"),S=__S?.default??__S,__k=require("@mattermost/compass-icons/components/check-circle-outline.js"),k=__k?.default??__k,__A=require("@mattermost/compass-icons/components/close.js"),A=__A?.default??__A,b=require("../../utils/props.cjs"),l=require("./SectionNotice.module.scss.cjs"),w={info:e.jsx(s.default,{size:"20",glyph:e.jsx(j,{})}),warning:e.jsx(s.default,{size:"20",glyph:e.jsx(S,{})}),danger:e.jsx(s.default,{size:"20",glyph:e.jsx(O,{})}),success:e.jsx(s.default,{size:"20",glyph:e.jsx(k,{})}),hint:e.jsx(s.default,{size:"20",glyph:e.jsx(j,{})})};function M({className:f="",type:t="info",icon:o,title:x,description:a,primaryButtonLabel:n,onPrimaryAction:h,secondaryButtonLabel:c,onSecondaryAction:_,primaryActionDisabled:m,primaryActionLoading:g,secondaryActionDisabled:C,secondaryActionLoading:N,onDismiss:r,dismissLabel:q="Dismiss",dismissButtonProps:i,...v}){const I=l.default[`section-notice--type-${t.toLowerCase()}`],z=[l.default["section-notice"],I,f].filter(Boolean).join(" "),u=o!==void 0?o:w[t],p=n!=null||c!=null;return e.jsxs("div",{...v,className:z,children:[e.jsxs("div",{className:l.default["section-notice__content"],children:[u!=null&&e.jsx("span",{className:l.default["section-notice__icon"],"aria-hidden":!0,children:e.jsx(s.IconSlotContext.Provider,{value:{size:"20"},children:u})}),e.jsxs("div",{className:l.default["section-notice__body"],children:[e.jsx("h4",{className:l.default["section-notice__title"],children:x}),a!=null&&e.jsx("div",{className:l.default["section-notice__description"],children:a}),p&&e.jsxs("div",{className:l.default["section-notice__actions"],children:[n!=null&&e.jsx(d.default,{emphasis:"primary",size:"small",disabled:m,loading:g,onClick:h,children:n}),c!=null&&e.jsx(d.default,{emphasis:"tertiary",size:"small",disabled:C,loading:N,onClick:_,children:c})]})]})]}),r!=null&&e.jsx(y.default,{...i,className:b.mergeClassNames(l.default["section-notice__dismiss"],i==null?void 0:i.className),"aria-label":q,size:"small",icon:e.jsx(s.default,{size:"16",glyph:e.jsx(A,{})}),onClick:r})]})}exports.default=M;
|
|
2
2
|
//# sourceMappingURL=SectionNotice.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SectionNotice.cjs","sources":["../../../src/components/section-notice/SectionNotice.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\nimport Button from '@/components/button/Button';\nimport IconButton from '@/components/icon-button/IconButton';\nimport Icon from '@/components/icon/Icon';\nimport { IconSlotContext } from '@/components/icon/Icon';\nimport InformationOutlineIcon from '@mattermost/compass-icons/components/information-outline';\nimport AlertOutlineIcon from '@mattermost/compass-icons/components/alert-outline';\nimport AlertCircleOutlineIcon from '@mattermost/compass-icons/components/alert-circle-outline';\nimport CheckCircleOutlineIcon from '@mattermost/compass-icons/components/check-circle-outline';\nimport CloseIcon from '@mattermost/compass-icons/components/close';\nimport type { BuiltInButtonProps } from '@/utils/props';\nimport { mergeClassNames } from '@/utils/props';\nimport styles from './SectionNotice.module.scss';\n\nexport type SectionNoticeType =\n | 'info'\n | 'warning'\n | 'danger'\n | 'success'\n | 'hint';\n\nexport interface SectionNoticeProps extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'title'\n> {\n /** Optional CSS class name. */\n className?: string;\n /** Type controls color-coding. Default: Info. */\n type?: SectionNoticeType;\n /** Optional leading icon. When omitted a default type icon is shown. Pass `<Icon glyph={<SomeIcon />} />` — SectionNotice provides the correct size via context. */\n icon?: ReactNode;\n /** Title / headline. Accepts translated nodes (e.g. `<FormattedMessage/>`). */\n title: ReactNode;\n /** Optional body description. */\n description?: ReactNode;\n /** Primary action button label. */\n primaryButtonLabel?: ReactNode;\n /** Primary action callback. */\n onPrimaryAction?: () => void;\n /** Disables the primary action button. */\n primaryActionDisabled?: boolean;\n /** Shows a spinner in the primary action button and disables it. */\n primaryActionLoading?: boolean;\n /** Secondary action button label. */\n secondaryButtonLabel?: ReactNode;\n /** Secondary action callback. */\n onSecondaryAction?: () => void;\n /** Disables the secondary action button. */\n secondaryActionDisabled?: boolean;\n /** Shows a spinner in the secondary action button and disables it. */\n secondaryActionLoading?: boolean;\n /** Called when dismiss (×) button is clicked. When omitted, dismiss button is hidden. */\n onDismiss?: () => void;\n /** Accessible name for the dismiss button. Default: \"Dismiss\". */\n dismissLabel?: string;\n /** Extra attributes for the dismiss button (e.g. `data-testid`). */\n dismissButtonProps?: BuiltInButtonProps;\n}\n\nconst DEFAULT_ICONS: Record<SectionNoticeType, ReactNode> = {\n info: <Icon size=\"20\" glyph={<InformationOutlineIcon />} />,\n warning: <Icon size=\"20\" glyph={<AlertCircleOutlineIcon />} />,\n danger: <Icon size=\"20\" glyph={<AlertOutlineIcon />} />,\n success: <Icon size=\"20\" glyph={<CheckCircleOutlineIcon />} />,\n hint: <Icon size=\"20\" glyph={<InformationOutlineIcon />} />,\n};\n\n/**\n * A Section Notice is an in-context alert that lives inside a settings page, admin panel, or\n * other content region. Use it to flag important information, report a state change, or\n * surface a problem the user needs to act on — without yanking them out of the flow.\n */\nexport default function SectionNotice({\n className = '',\n type = 'info',\n icon,\n title,\n description,\n primaryButtonLabel,\n onPrimaryAction,\n secondaryButtonLabel,\n onSecondaryAction,\n primaryActionDisabled,\n primaryActionLoading,\n secondaryActionDisabled,\n secondaryActionLoading,\n onDismiss,\n dismissLabel = 'Dismiss',\n dismissButtonProps,\n ...rest\n}: SectionNoticeProps) {\n const typeClass = styles[`section-notice--type-${type.toLowerCase()}`];\n\n const rootClass = [styles['section-notice'], typeClass, className]\n .filter(Boolean)\n .join(' ');\n\n const resolvedIcon = icon !== undefined ? icon : DEFAULT_ICONS[type];\n\n const hasActions = primaryButtonLabel != null || secondaryButtonLabel != null;\n\n return (\n <div {...rest} className={rootClass}>\n <div className={styles['section-notice__content']}>\n {resolvedIcon != null && (\n <span className={styles['section-notice__icon']} aria-hidden>\n <IconSlotContext.Provider value={{ size: '20' }}>\n {resolvedIcon}\n </IconSlotContext.Provider>\n </span>\n )}\n <div className={styles['section-notice__body']}>\n <
|
|
1
|
+
{"version":3,"file":"SectionNotice.cjs","sources":["../../../src/components/section-notice/SectionNotice.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\nimport Button from '@/components/button/Button';\nimport IconButton from '@/components/icon-button/IconButton';\nimport Icon from '@/components/icon/Icon';\nimport { IconSlotContext } from '@/components/icon/Icon';\nimport InformationOutlineIcon from '@mattermost/compass-icons/components/information-outline';\nimport AlertOutlineIcon from '@mattermost/compass-icons/components/alert-outline';\nimport AlertCircleOutlineIcon from '@mattermost/compass-icons/components/alert-circle-outline';\nimport CheckCircleOutlineIcon from '@mattermost/compass-icons/components/check-circle-outline';\nimport CloseIcon from '@mattermost/compass-icons/components/close';\nimport type { BuiltInButtonProps } from '@/utils/props';\nimport { mergeClassNames } from '@/utils/props';\nimport styles from './SectionNotice.module.scss';\n\nexport type SectionNoticeType =\n | 'info'\n | 'warning'\n | 'danger'\n | 'success'\n | 'hint';\n\nexport interface SectionNoticeProps extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'title'\n> {\n /** Optional CSS class name. */\n className?: string;\n /** Type controls color-coding. Default: Info. */\n type?: SectionNoticeType;\n /** Optional leading icon. When omitted a default type icon is shown. Pass `<Icon glyph={<SomeIcon />} />` — SectionNotice provides the correct size via context. */\n icon?: ReactNode;\n /** Title / headline. Accepts translated nodes (e.g. `<FormattedMessage/>`). */\n title: ReactNode;\n /** Optional body description. */\n description?: ReactNode;\n /** Primary action button label. */\n primaryButtonLabel?: ReactNode;\n /** Primary action callback. */\n onPrimaryAction?: () => void;\n /** Disables the primary action button. */\n primaryActionDisabled?: boolean;\n /** Shows a spinner in the primary action button and disables it. */\n primaryActionLoading?: boolean;\n /** Secondary action button label. */\n secondaryButtonLabel?: ReactNode;\n /** Secondary action callback. */\n onSecondaryAction?: () => void;\n /** Disables the secondary action button. */\n secondaryActionDisabled?: boolean;\n /** Shows a spinner in the secondary action button and disables it. */\n secondaryActionLoading?: boolean;\n /** Called when dismiss (×) button is clicked. When omitted, dismiss button is hidden. */\n onDismiss?: () => void;\n /** Accessible name for the dismiss button. Default: \"Dismiss\". */\n dismissLabel?: string;\n /** Extra attributes for the dismiss button (e.g. `data-testid`). */\n dismissButtonProps?: BuiltInButtonProps;\n}\n\nconst DEFAULT_ICONS: Record<SectionNoticeType, ReactNode> = {\n info: <Icon size=\"20\" glyph={<InformationOutlineIcon />} />,\n warning: <Icon size=\"20\" glyph={<AlertCircleOutlineIcon />} />,\n danger: <Icon size=\"20\" glyph={<AlertOutlineIcon />} />,\n success: <Icon size=\"20\" glyph={<CheckCircleOutlineIcon />} />,\n hint: <Icon size=\"20\" glyph={<InformationOutlineIcon />} />,\n};\n\n/**\n * A Section Notice is an in-context alert that lives inside a settings page, admin panel, or\n * other content region. Use it to flag important information, report a state change, or\n * surface a problem the user needs to act on — without yanking them out of the flow.\n */\nexport default function SectionNotice({\n className = '',\n type = 'info',\n icon,\n title,\n description,\n primaryButtonLabel,\n onPrimaryAction,\n secondaryButtonLabel,\n onSecondaryAction,\n primaryActionDisabled,\n primaryActionLoading,\n secondaryActionDisabled,\n secondaryActionLoading,\n onDismiss,\n dismissLabel = 'Dismiss',\n dismissButtonProps,\n ...rest\n}: SectionNoticeProps) {\n const typeClass = styles[`section-notice--type-${type.toLowerCase()}`];\n\n const rootClass = [styles['section-notice'], typeClass, className]\n .filter(Boolean)\n .join(' ');\n\n const resolvedIcon = icon !== undefined ? icon : DEFAULT_ICONS[type];\n\n const hasActions = primaryButtonLabel != null || secondaryButtonLabel != null;\n\n return (\n <div {...rest} className={rootClass}>\n <div className={styles['section-notice__content']}>\n {resolvedIcon != null && (\n <span className={styles['section-notice__icon']} aria-hidden>\n <IconSlotContext.Provider value={{ size: '20' }}>\n {resolvedIcon}\n </IconSlotContext.Provider>\n </span>\n )}\n <div className={styles['section-notice__body']}>\n <h4 className={styles['section-notice__title']}>{title}</h4>\n {description != null && (\n <div className={styles['section-notice__description']}>\n {description}\n </div>\n )}\n {hasActions && (\n <div className={styles['section-notice__actions']}>\n {primaryButtonLabel != null && (\n <Button\n emphasis=\"primary\"\n size=\"small\"\n disabled={primaryActionDisabled}\n loading={primaryActionLoading}\n onClick={onPrimaryAction}\n >\n {primaryButtonLabel}\n </Button>\n )}\n {secondaryButtonLabel != null && (\n <Button\n emphasis=\"tertiary\"\n size=\"small\"\n disabled={secondaryActionDisabled}\n loading={secondaryActionLoading}\n onClick={onSecondaryAction}\n >\n {secondaryButtonLabel}\n </Button>\n )}\n </div>\n )}\n </div>\n </div>\n {onDismiss != null && (\n <IconButton\n {...dismissButtonProps}\n className={mergeClassNames(\n styles['section-notice__dismiss'],\n dismissButtonProps?.className,\n )}\n aria-label={dismissLabel}\n size=\"small\"\n icon={<Icon size=\"16\" glyph={<CloseIcon />} />}\n onClick={onDismiss}\n />\n )}\n </div>\n );\n}\n"],"names":["DEFAULT_ICONS","Icon","jsx","InformationOutlineIcon","AlertCircleOutlineIcon","AlertOutlineIcon","CheckCircleOutlineIcon","SectionNotice","className","type","icon","title","description","primaryButtonLabel","onPrimaryAction","secondaryButtonLabel","onSecondaryAction","primaryActionDisabled","primaryActionLoading","secondaryActionDisabled","secondaryActionLoading","onDismiss","dismissLabel","dismissButtonProps","rest","typeClass","styles","rootClass","resolvedIcon","hasActions","jsxs","IconSlotContext","Button","IconButton","mergeClassNames","CloseIcon"],"mappings":"upBA2DMA,EAAsD,CAC1D,WAAOC,UAAA,CAAK,KAAK,KAAK,MAAOC,MAACC,IAAuB,EAAI,EACzD,cAAUF,UAAA,CAAK,KAAK,KAAK,MAAOC,MAACE,IAAuB,EAAI,EAC5D,aAASH,UAAA,CAAK,KAAK,KAAK,MAAOC,MAACG,IAAiB,EAAI,EACrD,cAAUJ,UAAA,CAAK,KAAK,KAAK,MAAOC,MAACI,IAAuB,EAAI,EAC5D,WAAOL,EAAAA,QAAA,CAAK,KAAK,KAAK,MAAOC,EAAAA,IAACC,IAAuB,CAAA,CAAI,CAC3D,EAOA,SAAwBI,EAAc,CACpC,UAAAC,EAAY,GACZ,KAAAC,EAAO,OACP,KAAAC,EACA,MAAAC,EACA,YAAAC,EACA,mBAAAC,EACA,gBAAAC,EACA,qBAAAC,EACA,kBAAAC,EACA,sBA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AD,CAAA,CAAA,CACH,CAAA,CAEJ,CAAA,CAAA,CAEJ,CAAA,EACF,EACCM,GAAa,MACZnB,EAAAA,IAAC+B,EAAAA,QAAA,CACE,GAAGV,EACJ,UAAWW,EAAAA,gBACTR,EAAAA,QAAO,yBAAyB,EAChCH,GAAA,YAAAA,EAAoB,SAAA,EAEtB,aAAYD,EACZ,KAAK,QACL,WAAOrB,UAAA,CAAK,KAAK,KAAK,MAAOC,MAACiC,IAAU,EAAI,EAC5C,QAASd,CAAA,CAAA,CACX,EAEJ,CAEJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
._section-
|
|
1
|
+
._section-notice_1fkh6_2{display:flex;flex-direction:column;align-items:flex-end;position:relative;border-radius:var(--radius-s);border:1px solid rgba(var(--color-info-rgb),.16);background-color:rgba(var(--color-info-rgb),.04)}._section-notice__content_1fkh6_11{display:flex;align-items:flex-start;gap:var(--spacing-m);padding:var(--spacing-m);width:100%}._section-notice__icon_1fkh6_18{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;color:var(--color-info)}._section-notice__body_1fkh6_25{display:flex;flex:1 0 0;flex-direction:column;gap:var(--spacing-xs);min-width:0;overflow:hidden;padding-right:var(--spacing-xl)}._section-notice__title_1fkh6_34{margin:0;padding:0;font-family:var(--font-family-body);font-size:var(--font-size-100);font-weight:var(--font-weight-semibold);line-height:var(--line-height-100);letter-spacing:var(--letter-spacing-normal);text-transform:none;color:var(--center-channel-color)}._section-notice__description_1fkh6_45{font-size:var(--font-size-100);font-weight:var(--font-weight-regular);line-height:var(--line-height-100);color:var(--center-channel-color)}._section-notice__actions_1fkh6_51{display:flex;align-items:center;gap:var(--spacing-s);padding:var(--spacing-xxs) 0}._section-notice__dismiss_1fkh6_57{position:absolute;top:var(--spacing-xxs);right:var(--spacing-xxs)}._section-notice--type-warning_1fkh6_62{background-color:rgba(var(--color-warning-rgb),.04);border-color:rgba(var(--color-warning-rgb),.16)}._section-notice--type-warning_1fkh6_62 ._section-notice__icon_1fkh6_18{color:var(--color-warning)}._section-notice--type-danger_1fkh6_69{background-color:rgba(var(--error-text-color-rgb, var(--color-danger-rgb)),.04);border-color:rgba(var(--error-text-color-rgb, var(--color-danger-rgb)),.16)}._section-notice--type-danger_1fkh6_69 ._section-notice__icon_1fkh6_18{color:var(--error-text, var(--color-danger))}._section-notice--type-success_1fkh6_76{background-color:rgba(var(--color-success-rgb),.04);border-color:rgba(var(--color-success-rgb),.16)}._section-notice--type-success_1fkh6_76 ._section-notice__icon_1fkh6_18{color:var(--color-success)}._section-notice--type-hint_1fkh6_83{background-color:rgba(var(--center-channel-color-rgb),.04);border-color:rgba(var(--center-channel-color-rgb),.16)}._section-notice--type-hint_1fkh6_83 ._section-notice__icon_1fkh6_18{color:rgba(var(--center-channel-color-rgb),.64)}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as o, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import h from "../button/Button.js";
|
|
3
3
|
import A from "../icon-button/IconButton.js";
|
|
4
|
-
import
|
|
4
|
+
import l, { IconSlotContext as j } from "../icon/Icon.js";
|
|
5
5
|
import __f from "@mattermost/compass-icons/components/information-outline.js";const f=__f&&__f.default?__f.default:__f;
|
|
6
6
|
import __S from "@mattermost/compass-icons/components/alert-outline.js";const S=__S&&__S.default?__S.default:__S;
|
|
7
7
|
import __w from "@mattermost/compass-icons/components/alert-circle-outline.js";const w=__w&&__w.default?__w.default:__w;
|
|
@@ -10,11 +10,11 @@ import __E from "@mattermost/compass-icons/components/close.js";const E=__E&&__E
|
|
|
10
10
|
import { mergeClassNames as F } from "../../utils/props.js";
|
|
11
11
|
import i from "./SectionNotice.module.scss.js";
|
|
12
12
|
const T = {
|
|
13
|
-
info: /* @__PURE__ */ e(
|
|
14
|
-
warning: /* @__PURE__ */ e(
|
|
15
|
-
danger: /* @__PURE__ */ e(
|
|
16
|
-
success: /* @__PURE__ */ e(
|
|
17
|
-
hint: /* @__PURE__ */ e(
|
|
13
|
+
info: /* @__PURE__ */ e(l, { size: "20", glyph: /* @__PURE__ */ e(f, {}) }),
|
|
14
|
+
warning: /* @__PURE__ */ e(l, { size: "20", glyph: /* @__PURE__ */ e(w, {}) }),
|
|
15
|
+
danger: /* @__PURE__ */ e(l, { size: "20", glyph: /* @__PURE__ */ e(S, {}) }),
|
|
16
|
+
success: /* @__PURE__ */ e(l, { size: "20", glyph: /* @__PURE__ */ e(D, {}) }),
|
|
17
|
+
hint: /* @__PURE__ */ e(l, { size: "20", glyph: /* @__PURE__ */ e(f, {}) })
|
|
18
18
|
};
|
|
19
19
|
function V({
|
|
20
20
|
className: p = "",
|
|
@@ -32,17 +32,17 @@ function V({
|
|
|
32
32
|
secondaryActionLoading: z,
|
|
33
33
|
onDismiss: m,
|
|
34
34
|
dismissLabel: v = "Dismiss",
|
|
35
|
-
dismissButtonProps:
|
|
35
|
+
dismissButtonProps: n,
|
|
36
36
|
...y
|
|
37
37
|
}) {
|
|
38
38
|
const O = i[`section-notice--type-${t.toLowerCase()}`], k = [i["section-notice"], O, p].filter(Boolean).join(" "), d = r !== void 0 ? r : T[t], x = c != null || s != null;
|
|
39
|
-
return /* @__PURE__ */
|
|
40
|
-
/* @__PURE__ */
|
|
39
|
+
return /* @__PURE__ */ o("div", { ...y, className: k, children: [
|
|
40
|
+
/* @__PURE__ */ o("div", { className: i["section-notice__content"], children: [
|
|
41
41
|
d != null && /* @__PURE__ */ e("span", { className: i["section-notice__icon"], "aria-hidden": !0, children: /* @__PURE__ */ e(j.Provider, { value: { size: "20" }, children: d }) }),
|
|
42
|
-
/* @__PURE__ */
|
|
43
|
-
/* @__PURE__ */ e("
|
|
42
|
+
/* @__PURE__ */ o("div", { className: i["section-notice__body"], children: [
|
|
43
|
+
/* @__PURE__ */ e("h4", { className: i["section-notice__title"], children: _ }),
|
|
44
44
|
a != null && /* @__PURE__ */ e("div", { className: i["section-notice__description"], children: a }),
|
|
45
|
-
x && /* @__PURE__ */
|
|
45
|
+
x && /* @__PURE__ */ o("div", { className: i["section-notice__actions"], children: [
|
|
46
46
|
c != null && /* @__PURE__ */ e(
|
|
47
47
|
h,
|
|
48
48
|
{
|
|
@@ -57,7 +57,7 @@ function V({
|
|
|
57
57
|
s != null && /* @__PURE__ */ e(
|
|
58
58
|
h,
|
|
59
59
|
{
|
|
60
|
-
emphasis: "
|
|
60
|
+
emphasis: "tertiary",
|
|
61
61
|
size: "small",
|
|
62
62
|
disabled: u,
|
|
63
63
|
loading: z,
|
|
@@ -71,14 +71,14 @@ function V({
|
|
|
71
71
|
m != null && /* @__PURE__ */ e(
|
|
72
72
|
A,
|
|
73
73
|
{
|
|
74
|
-
...
|
|
74
|
+
...n,
|
|
75
75
|
className: F(
|
|
76
76
|
i["section-notice__dismiss"],
|
|
77
|
-
|
|
77
|
+
n == null ? void 0 : n.className
|
|
78
78
|
),
|
|
79
79
|
"aria-label": v,
|
|
80
80
|
size: "small",
|
|
81
|
-
icon: /* @__PURE__ */ e(
|
|
81
|
+
icon: /* @__PURE__ */ e(l, { size: "16", glyph: /* @__PURE__ */ e(E, {}) }),
|
|
82
82
|
onClick: m
|
|
83
83
|
}
|
|
84
84
|
)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SectionNotice.js","sources":["../../../src/components/section-notice/SectionNotice.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\nimport Button from '@/components/button/Button';\nimport IconButton from '@/components/icon-button/IconButton';\nimport Icon from '@/components/icon/Icon';\nimport { IconSlotContext } from '@/components/icon/Icon';\nimport InformationOutlineIcon from '@mattermost/compass-icons/components/information-outline';\nimport AlertOutlineIcon from '@mattermost/compass-icons/components/alert-outline';\nimport AlertCircleOutlineIcon from '@mattermost/compass-icons/components/alert-circle-outline';\nimport CheckCircleOutlineIcon from '@mattermost/compass-icons/components/check-circle-outline';\nimport CloseIcon from '@mattermost/compass-icons/components/close';\nimport type { BuiltInButtonProps } from '@/utils/props';\nimport { mergeClassNames } from '@/utils/props';\nimport styles from './SectionNotice.module.scss';\n\nexport type SectionNoticeType =\n | 'info'\n | 'warning'\n | 'danger'\n | 'success'\n | 'hint';\n\nexport interface SectionNoticeProps extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'title'\n> {\n /** Optional CSS class name. */\n className?: string;\n /** Type controls color-coding. Default: Info. */\n type?: SectionNoticeType;\n /** Optional leading icon. When omitted a default type icon is shown. Pass `<Icon glyph={<SomeIcon />} />` — SectionNotice provides the correct size via context. */\n icon?: ReactNode;\n /** Title / headline. Accepts translated nodes (e.g. `<FormattedMessage/>`). */\n title: ReactNode;\n /** Optional body description. */\n description?: ReactNode;\n /** Primary action button label. */\n primaryButtonLabel?: ReactNode;\n /** Primary action callback. */\n onPrimaryAction?: () => void;\n /** Disables the primary action button. */\n primaryActionDisabled?: boolean;\n /** Shows a spinner in the primary action button and disables it. */\n primaryActionLoading?: boolean;\n /** Secondary action button label. */\n secondaryButtonLabel?: ReactNode;\n /** Secondary action callback. */\n onSecondaryAction?: () => void;\n /** Disables the secondary action button. */\n secondaryActionDisabled?: boolean;\n /** Shows a spinner in the secondary action button and disables it. */\n secondaryActionLoading?: boolean;\n /** Called when dismiss (×) button is clicked. When omitted, dismiss button is hidden. */\n onDismiss?: () => void;\n /** Accessible name for the dismiss button. Default: \"Dismiss\". */\n dismissLabel?: string;\n /** Extra attributes for the dismiss button (e.g. `data-testid`). */\n dismissButtonProps?: BuiltInButtonProps;\n}\n\nconst DEFAULT_ICONS: Record<SectionNoticeType, ReactNode> = {\n info: <Icon size=\"20\" glyph={<InformationOutlineIcon />} />,\n warning: <Icon size=\"20\" glyph={<AlertCircleOutlineIcon />} />,\n danger: <Icon size=\"20\" glyph={<AlertOutlineIcon />} />,\n success: <Icon size=\"20\" glyph={<CheckCircleOutlineIcon />} />,\n hint: <Icon size=\"20\" glyph={<InformationOutlineIcon />} />,\n};\n\n/**\n * A Section Notice is an in-context alert that lives inside a settings page, admin panel, or\n * other content region. Use it to flag important information, report a state change, or\n * surface a problem the user needs to act on — without yanking them out of the flow.\n */\nexport default function SectionNotice({\n className = '',\n type = 'info',\n icon,\n title,\n description,\n primaryButtonLabel,\n onPrimaryAction,\n secondaryButtonLabel,\n onSecondaryAction,\n primaryActionDisabled,\n primaryActionLoading,\n secondaryActionDisabled,\n secondaryActionLoading,\n onDismiss,\n dismissLabel = 'Dismiss',\n dismissButtonProps,\n ...rest\n}: SectionNoticeProps) {\n const typeClass = styles[`section-notice--type-${type.toLowerCase()}`];\n\n const rootClass = [styles['section-notice'], typeClass, className]\n .filter(Boolean)\n .join(' ');\n\n const resolvedIcon = icon !== undefined ? icon : DEFAULT_ICONS[type];\n\n const hasActions = primaryButtonLabel != null || secondaryButtonLabel != null;\n\n return (\n <div {...rest} className={rootClass}>\n <div className={styles['section-notice__content']}>\n {resolvedIcon != null && (\n <span className={styles['section-notice__icon']} aria-hidden>\n <IconSlotContext.Provider value={{ size: '20' }}>\n {resolvedIcon}\n </IconSlotContext.Provider>\n </span>\n )}\n <div className={styles['section-notice__body']}>\n <
|
|
1
|
+
{"version":3,"file":"SectionNotice.js","sources":["../../../src/components/section-notice/SectionNotice.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\nimport Button from '@/components/button/Button';\nimport IconButton from '@/components/icon-button/IconButton';\nimport Icon from '@/components/icon/Icon';\nimport { IconSlotContext } from '@/components/icon/Icon';\nimport InformationOutlineIcon from '@mattermost/compass-icons/components/information-outline';\nimport AlertOutlineIcon from '@mattermost/compass-icons/components/alert-outline';\nimport AlertCircleOutlineIcon from '@mattermost/compass-icons/components/alert-circle-outline';\nimport CheckCircleOutlineIcon from '@mattermost/compass-icons/components/check-circle-outline';\nimport CloseIcon from '@mattermost/compass-icons/components/close';\nimport type { BuiltInButtonProps } from '@/utils/props';\nimport { mergeClassNames } from '@/utils/props';\nimport styles from './SectionNotice.module.scss';\n\nexport type SectionNoticeType =\n | 'info'\n | 'warning'\n | 'danger'\n | 'success'\n | 'hint';\n\nexport interface SectionNoticeProps extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'title'\n> {\n /** Optional CSS class name. */\n className?: string;\n /** Type controls color-coding. Default: Info. */\n type?: SectionNoticeType;\n /** Optional leading icon. When omitted a default type icon is shown. Pass `<Icon glyph={<SomeIcon />} />` — SectionNotice provides the correct size via context. */\n icon?: ReactNode;\n /** Title / headline. Accepts translated nodes (e.g. `<FormattedMessage/>`). */\n title: ReactNode;\n /** Optional body description. */\n description?: ReactNode;\n /** Primary action button label. */\n primaryButtonLabel?: ReactNode;\n /** Primary action callback. */\n onPrimaryAction?: () => void;\n /** Disables the primary action button. */\n primaryActionDisabled?: boolean;\n /** Shows a spinner in the primary action button and disables it. */\n primaryActionLoading?: boolean;\n /** Secondary action button label. */\n secondaryButtonLabel?: ReactNode;\n /** Secondary action callback. */\n onSecondaryAction?: () => void;\n /** Disables the secondary action button. */\n secondaryActionDisabled?: boolean;\n /** Shows a spinner in the secondary action button and disables it. */\n secondaryActionLoading?: boolean;\n /** Called when dismiss (×) button is clicked. When omitted, dismiss button is hidden. */\n onDismiss?: () => void;\n /** Accessible name for the dismiss button. Default: \"Dismiss\". */\n dismissLabel?: string;\n /** Extra attributes for the dismiss button (e.g. `data-testid`). */\n dismissButtonProps?: BuiltInButtonProps;\n}\n\nconst DEFAULT_ICONS: Record<SectionNoticeType, ReactNode> = {\n info: <Icon size=\"20\" glyph={<InformationOutlineIcon />} />,\n warning: <Icon size=\"20\" glyph={<AlertCircleOutlineIcon />} />,\n danger: <Icon size=\"20\" glyph={<AlertOutlineIcon />} />,\n success: <Icon size=\"20\" glyph={<CheckCircleOutlineIcon />} />,\n hint: <Icon size=\"20\" glyph={<InformationOutlineIcon />} />,\n};\n\n/**\n * A Section Notice is an in-context alert that lives inside a settings page, admin panel, or\n * other content region. Use it to flag important information, report a state change, or\n * surface a problem the user needs to act on — without yanking them out of the flow.\n */\nexport default function SectionNotice({\n className = '',\n type = 'info',\n icon,\n title,\n description,\n primaryButtonLabel,\n onPrimaryAction,\n secondaryButtonLabel,\n onSecondaryAction,\n primaryActionDisabled,\n primaryActionLoading,\n secondaryActionDisabled,\n secondaryActionLoading,\n onDismiss,\n dismissLabel = 'Dismiss',\n dismissButtonProps,\n ...rest\n}: SectionNoticeProps) {\n const typeClass = styles[`section-notice--type-${type.toLowerCase()}`];\n\n const rootClass = [styles['section-notice'], typeClass, className]\n .filter(Boolean)\n .join(' ');\n\n const resolvedIcon = icon !== undefined ? icon : DEFAULT_ICONS[type];\n\n const hasActions = primaryButtonLabel != null || secondaryButtonLabel != null;\n\n return (\n <div {...rest} className={rootClass}>\n <div className={styles['section-notice__content']}>\n {resolvedIcon != null && (\n <span className={styles['section-notice__icon']} aria-hidden>\n <IconSlotContext.Provider value={{ size: '20' }}>\n {resolvedIcon}\n </IconSlotContext.Provider>\n </span>\n )}\n <div className={styles['section-notice__body']}>\n <h4 className={styles['section-notice__title']}>{title}</h4>\n {description != null && (\n <div className={styles['section-notice__description']}>\n {description}\n </div>\n )}\n {hasActions && (\n <div className={styles['section-notice__actions']}>\n {primaryButtonLabel != null && (\n <Button\n emphasis=\"primary\"\n size=\"small\"\n disabled={primaryActionDisabled}\n loading={primaryActionLoading}\n onClick={onPrimaryAction}\n >\n {primaryButtonLabel}\n </Button>\n )}\n {secondaryButtonLabel != null && (\n <Button\n emphasis=\"tertiary\"\n size=\"small\"\n disabled={secondaryActionDisabled}\n loading={secondaryActionLoading}\n onClick={onSecondaryAction}\n >\n {secondaryButtonLabel}\n </Button>\n )}\n </div>\n )}\n </div>\n </div>\n {onDismiss != null && (\n <IconButton\n {...dismissButtonProps}\n className={mergeClassNames(\n styles['section-notice__dismiss'],\n dismissButtonProps?.className,\n )}\n aria-label={dismissLabel}\n size=\"small\"\n icon={<Icon size=\"16\" glyph={<CloseIcon />} />}\n onClick={onDismiss}\n />\n )}\n </div>\n );\n}\n"],"names":["DEFAULT_ICONS","Icon","jsx","InformationOutlineIcon","AlertCircleOutlineIcon","AlertOutlineIcon","CheckCircleOutlineIcon","SectionNotice","className","type","icon","title","description","primaryButtonLabel","onPrimaryAction","secondaryButtonLabel","onSecondaryAction","primaryActionDisabled","primaryActionLoading","secondaryActionDisabled","secondaryActionLoading","onDismiss","dismissLabel","dismissButtonProps","rest","typeClass","styles","rootClass","resolvedIcon","hasActions","jsxs","IconSlotContext","Button","IconButton","mergeClassNames","CloseIcon"],"mappings":";;;;;;;;;;;AA2DA,MAAMA,IAAsD;AAAA,EAC1D,wBAAOC,GAAA,EAAK,MAAK,MAAK,OAAO,gBAAAC,EAACC,KAAuB,GAAI;AAAA,EACzD,2BAAUF,GAAA,EAAK,MAAK,MAAK,OAAO,gBAAAC,EAACE,KAAuB,GAAI;AAAA,EAC5D,0BAASH,GAAA,EAAK,MAAK,MAAK,OAAO,gBAAAC,EAACG,KAAiB,GAAI;AAAA,EACrD,2BAAUJ,GAAA,EAAK,MAAK,MAAK,OAAO,gBAAAC,EAACI,KAAuB,GAAI;AAAA,EAC5D,wBAAOL,GAAA,EAAK,MAAK,MAAK,OAAO,gBAAAC,EAACC,KAAuB,EAAA,CAAI;AAC3D;AAOA,SAAwBI,EAAc;AAAA,EACpC,WAAAC,IAAY;AAAA,EACZ,MAAAC,IAAO;AAAA,EACP,MAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,sBAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,uBAAAC;AAAA,EACA,sBAAAC;AAAA,EACA,yBAAAC;AAAA,EACA,wBAAAC;AAAA,EACA,WAAAC;AAAA,EACA,cAAAC,IAAe;AAAA,EACf,oBAAAC;AAAA,EACA,GAAGC;AACL,GAAuB;AACrB,QAAMC,IAAYC,EAAO,wBAAwBjB,EAAK,YAAA,CAAa,EAAE,GAE/DkB,IAAY,CAACD,EAAO,gBAAgB,GAAGD,GAAWjB,CAAS,EAC9D,OAAO,OAAO,EACd,KAAK,GAAG,GAELoB,I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E,GAAGV;AAAA,QACJ,WAAWW;AAAA,UACTR,EAAO,yBAAyB;AAAA,UAChCH,KAAA,gBAAAA,EAAoB;AAAA,QAAA;AAAA,QAEtB,cAAYD;AAAA,QACZ,MAAK;AAAA,QACL,wBAAOrB,GAAA,EAAK,MAAK,MAAK,OAAO,gBAAAC,EAACiC,KAAU,GAAI;AAAA,QAC5C,SAASd;AAAA,MAAA;AAAA,IAAA;AAAA,EACX,GAEJ;AAEJ;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./SectionNotice.css');const e={"section-notice":"_section-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./SectionNotice.css');const e={"section-notice":"_section-notice_1fkh6_2","section-notice__content":"_section-notice__content_1fkh6_11","section-notice__icon":"_section-notice__icon_1fkh6_18","section-notice__body":"_section-notice__body_1fkh6_25","section-notice__title":"_section-notice__title_1fkh6_34","section-notice__description":"_section-notice__description_1fkh6_45","section-notice__actions":"_section-notice__actions_1fkh6_51","section-notice__dismiss":"_section-notice__dismiss_1fkh6_57","section-notice--type-warning":"_section-notice--type-warning_1fkh6_62","section-notice--type-danger":"_section-notice--type-danger_1fkh6_69","section-notice--type-success":"_section-notice--type-success_1fkh6_76","section-notice--type-hint":"_section-notice--type-hint_1fkh6_83"};exports.default=e;
|
|
2
2
|
//# sourceMappingURL=SectionNotice.module.scss.cjs.map
|