@panneau/ui 0.0.0-stage → 5.0.0-alpha.0
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 +57 -2
- package/dist/alert/Alert.css +78 -0
- package/dist/alert/Alert.d.ts +30 -0
- package/dist/alert/Alert.d.ts.map +1 -0
- package/dist/alert/Alert.js +64 -0
- package/dist/alert/Alert.js.map +1 -0
- package/dist/alert/Alert.module.js +30 -0
- package/dist/alert/Alert.module.js.map +1 -0
- package/dist/badge/Badge.css +60 -0
- package/dist/badge/Badge.d.ts +15 -0
- package/dist/badge/Badge.d.ts.map +1 -0
- package/dist/badge/Badge.js +21 -0
- package/dist/badge/Badge.js.map +1 -0
- package/dist/badge/Badge.module.js +22 -0
- package/dist/badge/Badge.module.js.map +1 -0
- package/dist/button/Button.css +112 -0
- package/dist/button/Button.d.ts +26 -0
- package/dist/button/Button.d.ts.map +1 -0
- package/dist/button/Button.js +39 -0
- package/dist/button/Button.js.map +1 -0
- package/dist/button/Button.module.js +28 -0
- package/dist/button/Button.module.js.map +1 -0
- package/dist/card/Card.css +50 -0
- package/dist/card/Card.d.ts +20 -0
- package/dist/card/Card.d.ts.map +1 -0
- package/dist/card/Card.js +38 -0
- package/dist/card/Card.js.map +1 -0
- package/dist/card/Card.module.js +18 -0
- package/dist/card/Card.module.js.map +1 -0
- package/dist/checkbox/Checkbox.css +79 -0
- package/dist/checkbox/Checkbox.d.ts +11 -0
- package/dist/checkbox/Checkbox.d.ts.map +1 -0
- package/dist/checkbox/Checkbox.js +43 -0
- package/dist/checkbox/Checkbox.js.map +1 -0
- package/dist/checkbox/Checkbox.module.js +16 -0
- package/dist/checkbox/Checkbox.module.js.map +1 -0
- package/dist/checkbox/ChoiceChrome.d.ts +15 -0
- package/dist/checkbox/ChoiceChrome.d.ts.map +1 -0
- package/dist/checkbox/ChoiceChrome.js +36 -0
- package/dist/checkbox/ChoiceChrome.js.map +1 -0
- package/dist/combo-box/ComboBox.css +26 -0
- package/dist/combo-box/ComboBox.d.ts +30 -0
- package/dist/combo-box/ComboBox.d.ts.map +1 -0
- package/dist/combo-box/ComboBox.js +106 -0
- package/dist/combo-box/ComboBox.js.map +1 -0
- package/dist/combo-box/ComboBox.module.js +14 -0
- package/dist/combo-box/ComboBox.module.js.map +1 -0
- package/dist/date-picker/DatePicker.css +135 -0
- package/dist/date-picker/DatePicker.d.ts +12 -0
- package/dist/date-picker/DatePicker.d.ts.map +1 -0
- package/dist/date-picker/DatePicker.js +93 -0
- package/dist/date-picker/DatePicker.js.map +1 -0
- package/dist/date-picker/DatePicker.module.js +30 -0
- package/dist/date-picker/DatePicker.module.js.map +1 -0
- package/dist/dialog/Dialog.css +126 -0
- package/dist/dialog/Dialog.d.ts +31 -0
- package/dist/dialog/Dialog.d.ts.map +1 -0
- package/dist/dialog/Dialog.js +61 -0
- package/dist/dialog/Dialog.js.map +1 -0
- package/dist/dialog/Dialog.module.js +30 -0
- package/dist/dialog/Dialog.module.js.map +1 -0
- package/dist/disclosure/Disclosure.css +54 -0
- package/dist/disclosure/Disclosure.d.ts +20 -0
- package/dist/disclosure/Disclosure.d.ts.map +1 -0
- package/dist/disclosure/Disclosure.js +43 -0
- package/dist/disclosure/Disclosure.js.map +1 -0
- package/dist/disclosure/Disclosure.module.js +22 -0
- package/dist/disclosure/Disclosure.module.js.map +1 -0
- package/dist/field/Field.css +145 -0
- package/dist/field/Field.module.js +30 -0
- package/dist/field/Field.module.js.map +1 -0
- package/dist/field/FieldParts.d.ts +32 -0
- package/dist/field/FieldParts.d.ts.map +1 -0
- package/dist/field/FieldParts.js +56 -0
- package/dist/field/FieldParts.js.map +1 -0
- package/dist/field/Fieldset.d.ts +22 -0
- package/dist/field/Fieldset.d.ts.map +1 -0
- package/dist/field/Fieldset.js +50 -0
- package/dist/field/Fieldset.js.map +1 -0
- package/dist/icon/Icon.css +5 -0
- package/dist/icon/Icon.d.ts +31 -0
- package/dist/icon/Icon.d.ts.map +1 -0
- package/dist/icon/Icon.js +29 -0
- package/dist/icon/Icon.js.map +1 -0
- package/dist/icon/Icon.module.js +8 -0
- package/dist/icon/Icon.module.js.map +1 -0
- package/dist/icon-button/IconButton.css +9 -0
- package/dist/icon-button/IconButton.d.ts +15 -0
- package/dist/icon-button/IconButton.d.ts.map +1 -0
- package/dist/icon-button/IconButton.js +26 -0
- package/dist/icon-button/IconButton.js.map +1 -0
- package/dist/icon-button/IconButton.module.js +12 -0
- package/dist/icon-button/IconButton.module.js.map +1 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +29 -0
- package/dist/intl/messages.d.ts +2 -0
- package/dist/intl/messages.d.ts.map +1 -0
- package/dist/intl/messages.js +1 -0
- package/dist/intl/usePanneauIntl.d.ts +7 -0
- package/dist/intl/usePanneauIntl.d.ts.map +1 -0
- package/dist/intl/usePanneauIntl.js +22 -0
- package/dist/intl/usePanneauIntl.js.map +1 -0
- package/dist/locales/index.d.ts +15 -0
- package/dist/locales/index.d.ts.map +1 -0
- package/dist/locales/index.js +21 -0
- package/dist/locales/index.js.map +1 -0
- package/dist/menu/Menu.d.ts +27 -0
- package/dist/menu/Menu.d.ts.map +1 -0
- package/dist/menu/Menu.js +57 -0
- package/dist/menu/Menu.js.map +1 -0
- package/dist/number-input/NumberInput.css +57 -0
- package/dist/number-input/NumberInput.d.ts +21 -0
- package/dist/number-input/NumberInput.d.ts.map +1 -0
- package/dist/number-input/NumberInput.js +82 -0
- package/dist/number-input/NumberInput.js.map +1 -0
- package/dist/number-input/NumberInput.module.js +16 -0
- package/dist/number-input/NumberInput.module.js.map +1 -0
- package/dist/popover/Popover.css +32 -0
- package/dist/popover/Popover.d.ts +18 -0
- package/dist/popover/Popover.d.ts.map +1 -0
- package/dist/popover/Popover.js +41 -0
- package/dist/popover/Popover.js.map +1 -0
- package/dist/popover/Popover.module.js +14 -0
- package/dist/popover/Popover.module.js.map +1 -0
- package/dist/radio-group/RadioGroup.css +83 -0
- package/dist/radio-group/RadioGroup.d.ts +12 -0
- package/dist/radio-group/RadioGroup.d.ts.map +1 -0
- package/dist/radio-group/RadioGroup.js +61 -0
- package/dist/radio-group/RadioGroup.js.map +1 -0
- package/dist/radio-group/RadioGroup.module.js +20 -0
- package/dist/radio-group/RadioGroup.module.js.map +1 -0
- package/dist/root/PanneauRoot.css +251 -0
- package/dist/root/PanneauRoot.d.ts +34 -0
- package/dist/root/PanneauRoot.d.ts.map +1 -0
- package/dist/root/PanneauRoot.js +84 -0
- package/dist/root/PanneauRoot.js.map +1 -0
- package/dist/root/PanneauRoot.module.js +12 -0
- package/dist/root/PanneauRoot.module.js.map +1 -0
- package/dist/select/ListBox.css +104 -0
- package/dist/select/ListBox.module.js +32 -0
- package/dist/select/ListBox.module.js.map +1 -0
- package/dist/select/Select.d.ts +45 -0
- package/dist/select/Select.d.ts.map +1 -0
- package/dist/select/Select.js +136 -0
- package/dist/select/Select.js.map +1 -0
- package/dist/spinner/Spinner.css +40 -0
- package/dist/spinner/Spinner.d.ts +11 -0
- package/dist/spinner/Spinner.d.ts.map +1 -0
- package/dist/spinner/Spinner.js +25 -0
- package/dist/spinner/Spinner.js.map +1 -0
- package/dist/spinner/Spinner.module.js +18 -0
- package/dist/spinner/Spinner.module.js.map +1 -0
- package/dist/switch/Switch.css +69 -0
- package/dist/switch/Switch.d.ts +11 -0
- package/dist/switch/Switch.d.ts.map +1 -0
- package/dist/switch/Switch.js +33 -0
- package/dist/switch/Switch.js.map +1 -0
- package/dist/switch/Switch.module.js +15 -0
- package/dist/switch/Switch.module.js.map +1 -0
- package/dist/tabs/Tabs.css +83 -0
- package/dist/tabs/Tabs.d.ts +27 -0
- package/dist/tabs/Tabs.d.ts.map +1 -0
- package/dist/tabs/Tabs.js +141 -0
- package/dist/tabs/Tabs.js.map +1 -0
- package/dist/tabs/Tabs.module.js +16 -0
- package/dist/tabs/Tabs.module.js.map +1 -0
- package/dist/text-area/TextArea.css +8 -0
- package/dist/text-area/TextArea.d.ts +11 -0
- package/dist/text-area/TextArea.d.ts.map +1 -0
- package/dist/text-area/TextArea.js +41 -0
- package/dist/text-area/TextArea.js.map +1 -0
- package/dist/text-area/TextArea.module.js +8 -0
- package/dist/text-area/TextArea.module.js.map +1 -0
- package/dist/text-input/TextInput.d.ts +17 -0
- package/dist/text-input/TextInput.d.ts.map +1 -0
- package/dist/text-input/TextInput.js +61 -0
- package/dist/text-input/TextInput.js.map +1 -0
- package/dist/theme/bootstrap.d.ts +8 -0
- package/dist/theme/bootstrap.d.ts.map +1 -0
- package/dist/theme/bootstrap.js +61 -0
- package/dist/theme/bootstrap.js.map +1 -0
- package/dist/theme/theme.d.ts +23 -0
- package/dist/theme/theme.d.ts.map +1 -0
- package/dist/theme/theme.js +30 -0
- package/dist/theme/theme.js.map +1 -0
- package/dist/time-input/TimeInput.d.ts +8 -0
- package/dist/time-input/TimeInput.d.ts.map +1 -0
- package/dist/time-input/TimeInput.js +45 -0
- package/dist/time-input/TimeInput.js.map +1 -0
- package/dist/toast/Toast.css +109 -0
- package/dist/toast/Toast.d.ts +39 -0
- package/dist/toast/Toast.d.ts.map +1 -0
- package/dist/toast/Toast.js +152 -0
- package/dist/toast/Toast.js.map +1 -0
- package/dist/toast/Toast.module.js +30 -0
- package/dist/toast/Toast.module.js.map +1 -0
- package/dist/tooltip/Tooltip.css +25 -0
- package/dist/tooltip/Tooltip.d.ts +19 -0
- package/dist/tooltip/Tooltip.d.ts.map +1 -0
- package/dist/tooltip/Tooltip.js +29 -0
- package/dist/tooltip/Tooltip.js.map +1 -0
- package/dist/tooltip/Tooltip.module.js +12 -0
- package/dist/tooltip/Tooltip.module.js.map +1 -0
- package/dist/utils/cx.d.ts +3 -0
- package/dist/utils/cx.d.ts.map +1 -0
- package/dist/utils/cx.js +9 -0
- package/dist/utils/cx.js.map +1 -0
- package/package.json +48 -5
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
.panneau-card-V59wYu {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
min-width: 0;
|
|
5
|
+
color: var(--panneau-color-text);
|
|
6
|
+
background-color: var(--panneau-color-surface);
|
|
7
|
+
border: var(--panneau-border-width) solid var(--panneau-color-border);
|
|
8
|
+
border-radius: var(--panneau-radius-lg);
|
|
9
|
+
box-shadow: var(--panneau-shadow-sm);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.panneau-header-JX2f2b {
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-wrap: wrap;
|
|
15
|
+
align-items: center;
|
|
16
|
+
justify-content: space-between;
|
|
17
|
+
gap: var(--panneau-space-2);
|
|
18
|
+
padding: var(--panneau-space-3) var(--panneau-space-4);
|
|
19
|
+
border-bottom: var(--panneau-border-width) solid var(--panneau-color-border);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.panneau-title-uA0j8G {
|
|
23
|
+
font-size: var(--panneau-font-size-lg);
|
|
24
|
+
font-weight: var(--panneau-font-weight-bold);
|
|
25
|
+
line-height: var(--panneau-line-height-tight);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.panneau-body-Zo-Z8N {
|
|
29
|
+
display: flex;
|
|
30
|
+
flex-direction: column;
|
|
31
|
+
gap: var(--panneau-space-4);
|
|
32
|
+
padding: var(--panneau-space-4);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.panneau-footer-8OW7kW {
|
|
36
|
+
display: flex;
|
|
37
|
+
flex-wrap: wrap;
|
|
38
|
+
justify-content: flex-end;
|
|
39
|
+
gap: var(--panneau-space-2);
|
|
40
|
+
padding: var(--panneau-space-3) var(--panneau-space-4);
|
|
41
|
+
border-top: var(--panneau-border-width) solid var(--panneau-color-border);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@media (max-width: 30rem) {
|
|
45
|
+
.panneau-header-JX2f2b,
|
|
46
|
+
.panneau-body-Zo-Z8N,
|
|
47
|
+
.panneau-footer-8OW7kW {
|
|
48
|
+
padding-inline: var(--panneau-space-3);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export interface CardProps {
|
|
3
|
+
/** Title in the header. */
|
|
4
|
+
title?: ReactNode;
|
|
5
|
+
/** Heading level of the title. Defaults to 2. */
|
|
6
|
+
headingLevel?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
7
|
+
/** Content at the end of the header: actions, a status. */
|
|
8
|
+
actions?: ReactNode;
|
|
9
|
+
children?: ReactNode;
|
|
10
|
+
footer?: ReactNode;
|
|
11
|
+
/** Element of the card: `section` (default) with a title, `div` otherwise. */
|
|
12
|
+
as?: 'section' | 'div' | 'article';
|
|
13
|
+
className?: string;
|
|
14
|
+
headerClassName?: string;
|
|
15
|
+
bodyClassName?: string;
|
|
16
|
+
footerClassName?: string;
|
|
17
|
+
}
|
|
18
|
+
/** A surface that groups related content, with an optional header and footer. */
|
|
19
|
+
export declare function Card({ title, headingLevel, actions, children, footer, as, className, headerClassName, bodyClassName, footerClassName, }: CardProps): import("react").JSX.Element;
|
|
20
|
+
//# sourceMappingURL=Card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../src/card/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAS,MAAM,OAAO,CAAC;AAK9C,MAAM,WAAW,SAAS;IACtB,2BAA2B;IAC3B,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,iDAAiD;IACjD,YAAY,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACrC,2DAA2D;IAC3D,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,8EAA8E;IAC9E,EAAE,CAAC,EAAE,SAAS,GAAG,KAAK,GAAG,SAAS,CAAC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,iFAAiF;AACjF,wBAAgB,IAAI,CAAC,EACjB,KAAK,EACL,YAAgB,EAChB,OAAO,EACP,QAAQ,EACR,MAAM,EACN,EAAE,EACF,SAAS,EACT,eAAe,EACf,aAAa,EACb,eAAe,GAClB,EAAE,SAAS,+BA4BX"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { cx } from "../utils/cx.js";
|
|
2
|
+
import Card_module_default from "./Card.module.js";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { useId } from "react";
|
|
5
|
+
//#region src/card/Card.tsx
|
|
6
|
+
/** A surface that groups related content, with an optional header and footer. */
|
|
7
|
+
function Card({ title, headingLevel = 2, actions, children, footer, as, className, headerClassName, bodyClassName, footerClassName }) {
|
|
8
|
+
const titleId = useId();
|
|
9
|
+
const hasTitle = title !== void 0 && title !== null;
|
|
10
|
+
const Element = as ?? (hasTitle ? "section" : "div");
|
|
11
|
+
const Heading = `h${headingLevel}`;
|
|
12
|
+
return /* @__PURE__ */ jsxs(Element, {
|
|
13
|
+
className: cx(Card_module_default.card, className),
|
|
14
|
+
"aria-labelledby": hasTitle && Element !== "div" ? titleId : void 0,
|
|
15
|
+
children: [
|
|
16
|
+
hasTitle || actions !== void 0 && actions !== null ? /* @__PURE__ */ jsxs("header", {
|
|
17
|
+
className: cx(Card_module_default.header, headerClassName),
|
|
18
|
+
children: [hasTitle ? /* @__PURE__ */ jsx(Heading, {
|
|
19
|
+
id: titleId,
|
|
20
|
+
className: Card_module_default.title,
|
|
21
|
+
children: title
|
|
22
|
+
}) : /* @__PURE__ */ jsx("span", {}), actions]
|
|
23
|
+
}) : null,
|
|
24
|
+
/* @__PURE__ */ jsx("div", {
|
|
25
|
+
className: cx(Card_module_default.body, bodyClassName),
|
|
26
|
+
children
|
|
27
|
+
}),
|
|
28
|
+
footer !== void 0 && footer !== null ? /* @__PURE__ */ jsx("footer", {
|
|
29
|
+
className: cx(Card_module_default.footer, footerClassName),
|
|
30
|
+
children: footer
|
|
31
|
+
}) : null
|
|
32
|
+
]
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
export { Card };
|
|
37
|
+
|
|
38
|
+
//# sourceMappingURL=Card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.js","names":["styles"],"sources":["../../src/card/Card.tsx"],"sourcesContent":["import { type ReactNode, useId } from 'react';\n\nimport { cx } from '../utils/cx';\nimport styles from './Card.module.css';\n\nexport interface CardProps {\n /** Title in the header. */\n title?: ReactNode;\n /** Heading level of the title. Defaults to 2. */\n headingLevel?: 1 | 2 | 3 | 4 | 5 | 6;\n /** Content at the end of the header: actions, a status. */\n actions?: ReactNode;\n children?: ReactNode;\n footer?: ReactNode;\n /** Element of the card: `section` (default) with a title, `div` otherwise. */\n as?: 'section' | 'div' | 'article';\n className?: string;\n headerClassName?: string;\n bodyClassName?: string;\n footerClassName?: string;\n}\n\n/** A surface that groups related content, with an optional header and footer. */\nexport function Card({\n title,\n headingLevel = 2,\n actions,\n children,\n footer,\n as,\n className,\n headerClassName,\n bodyClassName,\n footerClassName,\n}: CardProps) {\n const titleId = useId();\n const hasTitle = title !== undefined && title !== null;\n const Element = as ?? (hasTitle ? 'section' : 'div');\n const Heading = `h${headingLevel}` as const;\n return (\n <Element\n className={cx(styles.card, className)}\n aria-labelledby={hasTitle && Element !== 'div' ? titleId : undefined}\n >\n {hasTitle || (actions !== undefined && actions !== null) ? (\n <header className={cx(styles.header, headerClassName)}>\n {hasTitle ? (\n <Heading id={titleId} className={styles.title}>\n {title}\n </Heading>\n ) : (\n <span />\n )}\n {actions}\n </header>\n ) : null}\n <div className={cx(styles.body, bodyClassName)}>{children}</div>\n {footer !== undefined && footer !== null ? (\n <footer className={cx(styles.footer, footerClassName)}>{footer}</footer>\n ) : null}\n </Element>\n );\n}\n"],"mappings":";;;;;;AAuBA,SAAgB,KAAK,EACjB,OACA,eAAe,GACf,SACA,UACA,QACA,IACA,WACA,iBACA,eACA,mBACU;CACV,MAAM,UAAU,MAAM;CACtB,MAAM,WAAW,UAAU,KAAA,KAAa,UAAU;CAClD,MAAM,UAAU,OAAO,WAAW,YAAY;CAC9C,MAAM,UAAU,IAAI;CACpB,OACI,qBAAC,SAAD;EACI,WAAW,GAAGA,oBAAO,MAAM,SAAS;EACpC,mBAAiB,YAAY,YAAY,QAAQ,UAAU,KAAA;EAF/D,UAAA;GAIK,YAAa,YAAY,KAAA,KAAa,YAAY,OAC/C,qBAAC,UAAD;IAAQ,WAAW,GAAGA,oBAAO,QAAQ,eAAe;IAApD,UAAA,CACK,WACG,oBAAC,SAAD;KAAS,IAAI;KAAS,WAAWA,oBAAO;KACnC,UAAA;IACI,CAAA,IAET,oBAAC,QAAD,CAAK,CAAA,GAER,OACG;GACR,CAAA,IAAA;GACJ,oBAAC,OAAD;IAAK,WAAW,GAAGA,oBAAO,MAAM,aAAa;IAAI;GAAc,CAAA;GAC9D,WAAW,KAAA,KAAa,WAAW,OAChC,oBAAC,UAAD;IAAQ,WAAW,GAAGA,oBAAO,QAAQ,eAAe;IAAI,UAAA;GAAe,CAAA,IACvE;EACC;;AAEjB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import "./Card.css";
|
|
2
|
+
//#region src/card/Card.module.css
|
|
3
|
+
var card = "panneau-card-V59wYu";
|
|
4
|
+
var header = "panneau-header-JX2f2b";
|
|
5
|
+
var title = "panneau-title-uA0j8G";
|
|
6
|
+
var body = "panneau-body-Zo-Z8N";
|
|
7
|
+
var footer = "panneau-footer-8OW7kW";
|
|
8
|
+
var Card_module_default = {
|
|
9
|
+
card,
|
|
10
|
+
header,
|
|
11
|
+
title,
|
|
12
|
+
body,
|
|
13
|
+
footer
|
|
14
|
+
};
|
|
15
|
+
//#endregion
|
|
16
|
+
export { body, card, Card_module_default as default, footer, header, title };
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=Card.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.module.js","names":[],"sources":["../../src/card/Card.module.css"],"sourcesContent":[".card {\n display: flex;\n flex-direction: column;\n min-width: 0;\n color: var(--panneau-color-text);\n background-color: var(--panneau-color-surface);\n border: var(--panneau-border-width) solid var(--panneau-color-border);\n border-radius: var(--panneau-radius-lg);\n box-shadow: var(--panneau-shadow-sm);\n}\n\n.header {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: space-between;\n gap: var(--panneau-space-2);\n padding: var(--panneau-space-3) var(--panneau-space-4);\n border-bottom: var(--panneau-border-width) solid var(--panneau-color-border);\n}\n\n.title {\n font-size: var(--panneau-font-size-lg);\n font-weight: var(--panneau-font-weight-bold);\n line-height: var(--panneau-line-height-tight);\n}\n\n.body {\n display: flex;\n flex-direction: column;\n gap: var(--panneau-space-4);\n padding: var(--panneau-space-4);\n}\n\n.footer {\n display: flex;\n flex-wrap: wrap;\n justify-content: flex-end;\n gap: var(--panneau-space-2);\n padding: var(--panneau-space-3) var(--panneau-space-4);\n border-top: var(--panneau-border-width) solid var(--panneau-color-border);\n}\n\n@media (max-width: 30rem) {\n .header,\n .body,\n .footer {\n padding-inline: var(--panneau-space-3);\n }\n}\n"],"mappings":""}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
.panneau-field-4Ta5L2 {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: var(--panneau-space-1);
|
|
5
|
+
min-width: 0;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.panneau-checkbox-05Z5t- {
|
|
9
|
+
display: inline-flex;
|
|
10
|
+
align-items: flex-start;
|
|
11
|
+
gap: var(--panneau-space-2);
|
|
12
|
+
min-height: 1.5rem;
|
|
13
|
+
font-size: var(--panneau-font-size-md);
|
|
14
|
+
color: var(--panneau-color-text);
|
|
15
|
+
cursor: pointer;
|
|
16
|
+
-webkit-tap-highlight-color: transparent;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.panneau-checkbox-05Z5t-[data-disabled] {
|
|
20
|
+
cursor: not-allowed;
|
|
21
|
+
opacity: 0.55;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.panneau-box-6cFOt8 {
|
|
25
|
+
display: flex;
|
|
26
|
+
flex: 0 0 auto;
|
|
27
|
+
align-items: center;
|
|
28
|
+
justify-content: center;
|
|
29
|
+
width: 1.125rem;
|
|
30
|
+
height: 1.125rem;
|
|
31
|
+
margin-top: 0.125rem;
|
|
32
|
+
color: var(--panneau-color-accent-text);
|
|
33
|
+
background-color: var(--panneau-color-surface);
|
|
34
|
+
border: var(--panneau-border-width) solid var(--panneau-color-border-control);
|
|
35
|
+
border-radius: var(--panneau-radius-sm);
|
|
36
|
+
transition:
|
|
37
|
+
background-color var(--panneau-duration),
|
|
38
|
+
border-color var(--panneau-duration);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.panneau-checkbox-05Z5t-[data-hovered] .panneau-box-6cFOt8 {
|
|
42
|
+
border-color: var(--panneau-color-text-muted);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.panneau-checkbox-05Z5t-[data-selected] .panneau-box-6cFOt8,
|
|
46
|
+
.panneau-checkbox-05Z5t-[data-indeterminate] .panneau-box-6cFOt8 {
|
|
47
|
+
background-color: var(--panneau-color-accent);
|
|
48
|
+
border-color: var(--panneau-color-accent);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.panneau-checkbox-05Z5t-[data-invalid] .panneau-box-6cFOt8 {
|
|
52
|
+
border-color: var(--panneau-color-danger);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.panneau-checkbox-05Z5t-[data-focus-visible] .panneau-box-6cFOt8 {
|
|
56
|
+
outline: var(--panneau-focus-width) solid var(--panneau-color-focus);
|
|
57
|
+
outline-offset: 2px;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.panneau-checkbox-05Z5t-[data-readonly] {
|
|
61
|
+
cursor: default;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.panneau-label-ubb5Uj {
|
|
65
|
+
line-height: var(--panneau-line-height);
|
|
66
|
+
overflow-wrap: anywhere;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/* Touch screens: a taller row, so the whole label is an easy target. */
|
|
70
|
+
@media (pointer: coarse) {
|
|
71
|
+
.panneau-checkbox-05Z5t- {
|
|
72
|
+
min-height: 2.75rem;
|
|
73
|
+
align-items: center;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.panneau-box-6cFOt8 {
|
|
77
|
+
margin-top: 0;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import { type CheckboxProps as AriaCheckboxProps } from 'react-aria-components';
|
|
3
|
+
import { type ChoiceChromeProps } from './ChoiceChrome';
|
|
4
|
+
export interface CheckboxProps extends Omit<AriaCheckboxProps, 'className' | 'style' | 'children' | 'isInvalid' | 'validate'>, ChoiceChromeProps {
|
|
5
|
+
/** Label, next to the box. */
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
checkboxClassName?: string;
|
|
8
|
+
}
|
|
9
|
+
/** A checkbox with its label, and optional description and errors under it. */
|
|
10
|
+
export declare function Checkbox({ children, description, errors, className, checkboxClassName, descriptionClassName, errorsClassName, ...props }: CheckboxProps): import("react").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=Checkbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../src/checkbox/Checkbox.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAEH,KAAK,aAAa,IAAI,iBAAiB,EAC1C,MAAM,uBAAuB,CAAC;AAK/B,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEtE,MAAM,WAAW,aACb,SACI,IAAI,CAAC,iBAAiB,EAAE,WAAW,GAAG,OAAO,GAAG,UAAU,GAAG,WAAW,GAAG,UAAU,CAAC,EACtF,iBAAiB;IACrB,8BAA8B;IAC9B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,+EAA+E;AAC/E,wBAAgB,QAAQ,CAAC,EACrB,QAAQ,EACR,WAAW,EACX,MAAW,EACX,SAAS,EACT,iBAAiB,EACjB,oBAAoB,EACpB,eAAe,EACf,GAAG,KAAK,EACX,EAAE,aAAa,+BAmCf"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { cx } from "../utils/cx.js";
|
|
2
|
+
import { Icon } from "../icon/Icon.js";
|
|
3
|
+
import Checkbox_module_default from "./Checkbox.module.js";
|
|
4
|
+
import { ChoiceChrome } from "./ChoiceChrome.js";
|
|
5
|
+
import { Check, Minus } from "lucide-react";
|
|
6
|
+
import { Checkbox } from "react-aria-components";
|
|
7
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
//#region src/checkbox/Checkbox.tsx
|
|
9
|
+
/** A checkbox with its label, and optional description and errors under it. */
|
|
10
|
+
function Checkbox$1({ children, description, errors = [], className, checkboxClassName, descriptionClassName, errorsClassName, ...props }) {
|
|
11
|
+
return /* @__PURE__ */ jsx(ChoiceChrome, {
|
|
12
|
+
description,
|
|
13
|
+
errors,
|
|
14
|
+
className,
|
|
15
|
+
descriptionClassName,
|
|
16
|
+
errorsClassName,
|
|
17
|
+
children: (describedBy) => /* @__PURE__ */ jsx(Checkbox, {
|
|
18
|
+
...props,
|
|
19
|
+
"aria-describedby": describedBy,
|
|
20
|
+
isInvalid: errors.length > 0,
|
|
21
|
+
validationBehavior: "aria",
|
|
22
|
+
className: cx(Checkbox_module_default.checkbox, checkboxClassName),
|
|
23
|
+
children: ({ isSelected, isIndeterminate }) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
|
|
24
|
+
className: Checkbox_module_default.box,
|
|
25
|
+
"aria-hidden": "true",
|
|
26
|
+
children: isIndeterminate ? /* @__PURE__ */ jsx(Icon, {
|
|
27
|
+
icon: Minus,
|
|
28
|
+
size: "xs"
|
|
29
|
+
}) : isSelected ? /* @__PURE__ */ jsx(Icon, {
|
|
30
|
+
icon: Check,
|
|
31
|
+
size: "xs"
|
|
32
|
+
}) : null
|
|
33
|
+
}), children !== void 0 ? /* @__PURE__ */ jsx("span", {
|
|
34
|
+
className: Checkbox_module_default.label,
|
|
35
|
+
children
|
|
36
|
+
}) : null] })
|
|
37
|
+
})
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
//#endregion
|
|
41
|
+
export { Checkbox$1 as Checkbox };
|
|
42
|
+
|
|
43
|
+
//# sourceMappingURL=Checkbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Checkbox.js","names":["Checkbox","AriaCheckbox","styles","_Fragment"],"sources":["../../src/checkbox/Checkbox.tsx"],"sourcesContent":["import { Check, Minus } from 'lucide-react';\nimport type { ReactNode } from 'react';\nimport {\n Checkbox as AriaCheckbox,\n type CheckboxProps as AriaCheckboxProps,\n} from 'react-aria-components';\n\nimport { Icon } from '../icon/Icon';\nimport { cx } from '../utils/cx';\nimport styles from './Checkbox.module.css';\nimport { ChoiceChrome, type ChoiceChromeProps } from './ChoiceChrome';\n\nexport interface CheckboxProps\n extends\n Omit<AriaCheckboxProps, 'className' | 'style' | 'children' | 'isInvalid' | 'validate'>,\n ChoiceChromeProps {\n /** Label, next to the box. */\n children?: ReactNode;\n checkboxClassName?: string;\n}\n\n/** A checkbox with its label, and optional description and errors under it. */\nexport function Checkbox({\n children,\n description,\n errors = [],\n className,\n checkboxClassName,\n descriptionClassName,\n errorsClassName,\n ...props\n}: CheckboxProps) {\n return (\n <ChoiceChrome\n description={description}\n errors={errors}\n className={className}\n descriptionClassName={descriptionClassName}\n errorsClassName={errorsClassName}\n >\n {(describedBy) => (\n <AriaCheckbox\n {...props}\n aria-describedby={describedBy}\n isInvalid={errors.length > 0}\n validationBehavior=\"aria\"\n className={cx(styles.checkbox, checkboxClassName)}\n >\n {({ isSelected, isIndeterminate }) => (\n <>\n <span className={styles.box} aria-hidden=\"true\">\n {isIndeterminate ? (\n <Icon icon={Minus} size=\"xs\" />\n ) : isSelected ? (\n <Icon icon={Check} size=\"xs\" />\n ) : null}\n </span>\n {children !== undefined ? (\n <span className={styles.label}>{children}</span>\n ) : null}\n </>\n )}\n </AriaCheckbox>\n )}\n </ChoiceChrome>\n );\n}\n"],"mappings":";;;;;;;;;AAsBA,SAAgBA,WAAS,EACrB,UACA,aACA,SAAS,CAAA,GACT,WACA,mBACA,sBACA,iBACA,GAAG,SACW;CACd,OACI,oBAAC,cAAD;EACiB;EACL;EACG;EACW;EACL;EAEf,WAAA,gBACE,oBAACC,UAAD;GACI,GAAI;GACJ,oBAAkB;GAClB,WAAW,OAAO,SAAS;GAC3B,oBAAmB;GACnB,WAAW,GAAGC,wBAAO,UAAU,iBAAiB;GAE9C,WAAA,EAAE,YAAY,sBACZ,qBAAAC,UAAA,EAAA,UAAA,CACI,oBAAC,QAAD;IAAM,WAAWD,wBAAO;IAAK,eAAY;IACpC,UAAA,kBACG,oBAAC,MAAD;KAAM,MAAM;KAAO,MAAK;IAAI,CAAA,IAC5B,aACA,oBAAC,MAAD;KAAM,MAAM;KAAO,MAAK;IAAI,CAAA,IAC5B;GACF,CAAA,GACL,aAAa,KAAA,IACV,oBAAC,QAAD;IAAM,WAAWA,wBAAO;IAAQ;GAAe,CAAA,IAC/C,IACR,EAAA,CAAA;EAEM,CAAA;CAER,CAAA;AAEtB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import "./Checkbox.css";
|
|
2
|
+
//#region src/checkbox/Checkbox.module.css
|
|
3
|
+
var field = "panneau-field-4Ta5L2";
|
|
4
|
+
var checkbox = "panneau-checkbox-05Z5t-";
|
|
5
|
+
var box = "panneau-box-6cFOt8";
|
|
6
|
+
var label = "panneau-label-ubb5Uj";
|
|
7
|
+
var Checkbox_module_default = {
|
|
8
|
+
field,
|
|
9
|
+
checkbox,
|
|
10
|
+
box,
|
|
11
|
+
label
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
14
|
+
export { box, checkbox, Checkbox_module_default as default, field, label };
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=Checkbox.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Checkbox.module.js","names":[],"sources":["../../src/checkbox/Checkbox.module.css"],"sourcesContent":[".field {\n display: flex;\n flex-direction: column;\n gap: var(--panneau-space-1);\n min-width: 0;\n}\n\n.checkbox {\n display: inline-flex;\n align-items: flex-start;\n gap: var(--panneau-space-2);\n min-height: 1.5rem;\n font-size: var(--panneau-font-size-md);\n color: var(--panneau-color-text);\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n}\n\n.checkbox[data-disabled] {\n cursor: not-allowed;\n opacity: 0.55;\n}\n\n.box {\n display: flex;\n flex: 0 0 auto;\n align-items: center;\n justify-content: center;\n width: 1.125rem;\n height: 1.125rem;\n margin-top: 0.125rem;\n color: var(--panneau-color-accent-text);\n background-color: var(--panneau-color-surface);\n border: var(--panneau-border-width) solid var(--panneau-color-border-control);\n border-radius: var(--panneau-radius-sm);\n transition:\n background-color var(--panneau-duration),\n border-color var(--panneau-duration);\n}\n\n.checkbox[data-hovered] .box {\n border-color: var(--panneau-color-text-muted);\n}\n\n.checkbox[data-selected] .box,\n.checkbox[data-indeterminate] .box {\n background-color: var(--panneau-color-accent);\n border-color: var(--panneau-color-accent);\n}\n\n.checkbox[data-invalid] .box {\n border-color: var(--panneau-color-danger);\n}\n\n.checkbox[data-focus-visible] .box {\n outline: var(--panneau-focus-width) solid var(--panneau-color-focus);\n outline-offset: 2px;\n}\n\n.checkbox[data-readonly] {\n cursor: default;\n}\n\n.label {\n line-height: var(--panneau-line-height);\n overflow-wrap: anywhere;\n}\n\n/* Touch screens: a taller row, so the whole label is an easy target. */\n@media (pointer: coarse) {\n .checkbox {\n min-height: 2.75rem;\n align-items: center;\n }\n\n .box {\n margin-top: 0;\n }\n}\n"],"mappings":""}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export interface ChoiceChromeProps {
|
|
3
|
+
/** Help text under the control. */
|
|
4
|
+
description?: ReactNode;
|
|
5
|
+
/** Error messages. Any message makes the control invalid. */
|
|
6
|
+
errors?: readonly string[];
|
|
7
|
+
className?: string;
|
|
8
|
+
descriptionClassName?: string;
|
|
9
|
+
errorsClassName?: string;
|
|
10
|
+
}
|
|
11
|
+
/** Description and errors under a checkbox or a switch, linked to it. */
|
|
12
|
+
export declare function ChoiceChrome({ description, errors, className, descriptionClassName, errorsClassName, children, }: ChoiceChromeProps & {
|
|
13
|
+
children: (describedBy: string | undefined) => ReactNode;
|
|
14
|
+
}): import("react").JSX.Element;
|
|
15
|
+
//# sourceMappingURL=ChoiceChrome.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChoiceChrome.d.ts","sourceRoot":"","sources":["../../src/checkbox/ChoiceChrome.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,SAAS,EAAS,MAAM,OAAO,CAAC;AAMxD,MAAM,WAAW,iBAAiB;IAC9B,mCAAmC;IACnC,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,6DAA6D;IAC7D,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,yEAAyE;AACzE,wBAAgB,YAAY,CAAC,EACzB,WAAW,EACX,MAAW,EACX,SAAS,EACT,oBAAoB,EACpB,eAAe,EACf,QAAQ,GACX,EAAE,iBAAiB,GAAG;IAAE,QAAQ,EAAE,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,KAAK,SAAS,CAAA;CAAE,+BA8BlF"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { cx } from "../utils/cx.js";
|
|
2
|
+
import Checkbox_module_default from "./Checkbox.module.js";
|
|
3
|
+
import Field_module_default from "../field/Field.module.js";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { Fragment as Fragment$1, useId } from "react";
|
|
6
|
+
//#region src/checkbox/ChoiceChrome.tsx
|
|
7
|
+
/** Description and errors under a checkbox or a switch, linked to it. */
|
|
8
|
+
function ChoiceChrome({ description, errors = [], className, descriptionClassName, errorsClassName, children }) {
|
|
9
|
+
const id = useId();
|
|
10
|
+
const descriptionId = description !== void 0 && description !== null ? `${id}-description` : null;
|
|
11
|
+
const errorsId = errors.length > 0 ? `${id}-errors` : null;
|
|
12
|
+
const describedBy = [descriptionId, errorsId].filter(Boolean).join(" ");
|
|
13
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
14
|
+
className: cx(Checkbox_module_default.field, className),
|
|
15
|
+
children: [
|
|
16
|
+
children(describedBy !== "" ? describedBy : void 0),
|
|
17
|
+
descriptionId !== null ? /* @__PURE__ */ jsx("div", {
|
|
18
|
+
id: descriptionId,
|
|
19
|
+
className: cx(Field_module_default.description, descriptionClassName),
|
|
20
|
+
children: description
|
|
21
|
+
}) : null,
|
|
22
|
+
errorsId !== null ? /* @__PURE__ */ jsx("div", {
|
|
23
|
+
id: errorsId,
|
|
24
|
+
className: cx(Field_module_default.errors, errorsClassName),
|
|
25
|
+
children: errors.map((error, index) => /* @__PURE__ */ jsxs(Fragment$1, { children: [index > 0 ? " " : null, /* @__PURE__ */ jsx("span", {
|
|
26
|
+
className: Field_module_default.error,
|
|
27
|
+
children: error
|
|
28
|
+
})] }, index))
|
|
29
|
+
}) : null
|
|
30
|
+
]
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
34
|
+
export { ChoiceChrome };
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=ChoiceChrome.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChoiceChrome.js","names":["styles","fieldStyles","Fragment"],"sources":["../../src/checkbox/ChoiceChrome.tsx"],"sourcesContent":["import { Fragment, type ReactNode, useId } from 'react';\n\nimport { fieldStyles } from '../field/FieldParts';\nimport { cx } from '../utils/cx';\nimport styles from './Checkbox.module.css';\n\nexport interface ChoiceChromeProps {\n /** Help text under the control. */\n description?: ReactNode;\n /** Error messages. Any message makes the control invalid. */\n errors?: readonly string[];\n className?: string;\n descriptionClassName?: string;\n errorsClassName?: string;\n}\n\n/** Description and errors under a checkbox or a switch, linked to it. */\nexport function ChoiceChrome({\n description,\n errors = [],\n className,\n descriptionClassName,\n errorsClassName,\n children,\n}: ChoiceChromeProps & { children: (describedBy: string | undefined) => ReactNode }) {\n const id = useId();\n const descriptionId =\n description !== undefined && description !== null ? `${id}-description` : null;\n const errorsId = errors.length > 0 ? `${id}-errors` : null;\n const describedBy = [descriptionId, errorsId].filter(Boolean).join(' ');\n return (\n <div className={cx(styles.field, className)}>\n {children(describedBy !== '' ? describedBy : undefined)}\n {descriptionId !== null ? (\n <div\n id={descriptionId}\n className={cx(fieldStyles.description, descriptionClassName)}\n >\n {description}\n </div>\n ) : null}\n {errorsId !== null ? (\n <div id={errorsId} className={cx(fieldStyles.errors, errorsClassName)}>\n {errors.map((error, index) => (\n <Fragment key={index}>\n {/* A space between messages, for assistive technologies. */}\n {index > 0 ? ' ' : null}\n <span className={fieldStyles.error}>{error}</span>\n </Fragment>\n ))}\n </div>\n ) : null}\n </div>\n );\n}\n"],"mappings":";;;;;;;AAiBA,SAAgB,aAAa,EACzB,aACA,SAAS,CAAA,GACT,WACA,sBACA,iBACA,YACiF;CACjF,MAAM,KAAK,MAAM;CACjB,MAAM,gBACF,gBAAgB,KAAA,KAAa,gBAAgB,OAAO,GAAG,GAAE,gBAAiB;CAC9E,MAAM,WAAW,OAAO,SAAS,IAAI,GAAG,GAAE,WAAY;CACtD,MAAM,cAAc,CAAC,eAAe,QAAQ,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;CACtE,OACI,qBAAC,OAAD;EAAK,WAAW,GAAGA,wBAAO,OAAO,SAAS;EAA1C,UAAA;GACK,SAAS,gBAAgB,KAAK,cAAc,KAAA,CAAS;GACrD,kBAAkB,OACf,oBAAC,OAAD;IACI,IAAI;IACJ,WAAW,GAAGC,qBAAY,aAAa,oBAAoB;IAE1D,UAAA;GACA,CAAA,IACL;GACH,aAAa,OACV,oBAAC,OAAD;IAAK,IAAI;IAAU,WAAW,GAAGA,qBAAY,QAAQ,eAAe;IAC/D,UAAA,OAAO,KAAK,OAAO,UAChB,qBAACC,YAAD,EAAA,UAAA,CAEK,QAAQ,IAAI,MAAM,MACnB,oBAAC,QAAD;KAAM,WAAWD,qBAAY;KAAQ,UAAA;IAAY,CAAA,CAC3C,EAAA,GAJK,KAIL,CACb;GACA,CAAA,IACL;EACH;;AAEb"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
.panneau-control-zMvu7z.panneau-control-zMvu7z {
|
|
2
|
+
padding-inline-end: 0;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.panneau-button-RsfUPx {
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
align-self: stretch;
|
|
10
|
+
width: 2rem;
|
|
11
|
+
padding: 0;
|
|
12
|
+
color: var(--panneau-color-text-muted);
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
background: transparent;
|
|
15
|
+
border: 0;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.panneau-button-RsfUPx[data-hovered] {
|
|
19
|
+
color: var(--panneau-color-text);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.panneau-status-8R1JBC {
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
padding-inline: var(--panneau-space-1);
|
|
26
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type ComboBoxProps as AriaComboBoxProps } from 'react-aria-components';
|
|
2
|
+
import { type FieldChromeProps } from '../field/FieldParts';
|
|
3
|
+
/** An item that a combo box can pick. */
|
|
4
|
+
export interface ComboBoxItem {
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface ComboBoxProps extends Omit<AriaComboBoxProps<ComboBoxItem>, 'className' | 'style' | 'children' | 'items' | 'defaultItems' | 'isInvalid' | 'validate' | 'selectedKey' | 'defaultSelectedKey' | 'onSelectionChange' | 'value' | 'defaultValue' | 'onChange'>, FieldChromeProps {
|
|
11
|
+
/** The items to show. For a local list, filter them with `inputValue`; for a search, fetch them. */
|
|
12
|
+
items: readonly ComboBoxItem[];
|
|
13
|
+
/** Id of the selected item, or `null`. */
|
|
14
|
+
value?: string | null;
|
|
15
|
+
onChange?: (id: string | null) => void;
|
|
16
|
+
placeholder?: string;
|
|
17
|
+
/** Shows a spinner while items load. */
|
|
18
|
+
isLoading?: boolean;
|
|
19
|
+
/** Text shown without items. Defaults to "No results". */
|
|
20
|
+
emptyMessage?: string;
|
|
21
|
+
controlClassName?: string;
|
|
22
|
+
inputClassName?: string;
|
|
23
|
+
popoverClassName?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* A text input with a list of suggestions, to pick one item. Items can be filtered locally or come
|
|
27
|
+
* from a search (`inputValue`, `onInputChange` and `isLoading`).
|
|
28
|
+
*/
|
|
29
|
+
export declare function ComboBox({ items, value, onChange, label, description, errors, placeholder, isLoading, emptyMessage, isRequired, menuTrigger, className, labelClassName, descriptionClassName, errorsClassName, controlClassName, inputClassName, popoverClassName, ...props }: ComboBoxProps): import("react").JSX.Element;
|
|
30
|
+
//# sourceMappingURL=ComboBox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComboBox.d.ts","sourceRoot":"","sources":["../../src/combo-box/ComboBox.tsx"],"names":[],"mappings":"AACA,OAAO,EAEH,KAAK,aAAa,IAAI,iBAAiB,EAO1C,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACH,KAAK,gBAAgB,EAKxB,MAAM,qBAAqB,CAAC;AAU7B,yCAAyC;AACzC,MAAM,WAAW,YAAY;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,aACb,SACI,IAAI,CACA,iBAAiB,CAAC,YAAY,CAAC,EAC7B,WAAW,GACX,OAAO,GACP,UAAU,GACV,OAAO,GACP,cAAc,GACd,WAAW,GACX,UAAU,GACV,aAAa,GACb,oBAAoB,GACpB,mBAAmB,GACnB,OAAO,GACP,cAAc,GACd,UAAU,CACf,EACD,gBAAgB;IACpB,oGAAoG;IACpG,KAAK,EAAE,SAAS,YAAY,EAAE,CAAC;IAC/B,0CAA0C;IAC1C,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACvC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wCAAwC;IACxC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,0DAA0D;IAC1D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,EACrB,KAAK,EACL,KAAK,EACL,QAAQ,EACR,KAAK,EACL,WAAW,EACX,MAAW,EACX,WAAW,EACX,SAAiB,EACjB,YAAY,EACZ,UAAU,EACV,WAAqB,EACrB,SAAS,EACT,cAAc,EACd,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,GAAG,KAAK,EACX,EAAE,aAAa,+BAsFf"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { cx } from "../utils/cx.js";
|
|
2
|
+
import { Icon } from "../icon/Icon.js";
|
|
3
|
+
import { messages } from "../intl/messages.js";
|
|
4
|
+
import { usePanneauIntl } from "../intl/usePanneauIntl.js";
|
|
5
|
+
import { Spinner } from "../spinner/Spinner.js";
|
|
6
|
+
import Field_module_default from "../field/Field.module.js";
|
|
7
|
+
import { FieldDescription, FieldErrors, FieldLabel } from "../field/FieldParts.js";
|
|
8
|
+
import { PopoverSurface } from "../popover/Popover.js";
|
|
9
|
+
import ListBox_module_default from "../select/ListBox.module.js";
|
|
10
|
+
import ComboBox_module_default from "./ComboBox.module.js";
|
|
11
|
+
import { Check, ChevronDown } from "lucide-react";
|
|
12
|
+
import { Button, ComboBox, Group, Input, ListBox, ListBoxItem, Text } from "react-aria-components";
|
|
13
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
14
|
+
//#region src/combo-box/ComboBox.tsx
|
|
15
|
+
/**
|
|
16
|
+
* A text input with a list of suggestions, to pick one item. Items can be filtered locally or come
|
|
17
|
+
* from a search (`inputValue`, `onInputChange` and `isLoading`).
|
|
18
|
+
*/
|
|
19
|
+
function ComboBox$1({ items, value, onChange, label, description, errors = [], placeholder, isLoading = false, emptyMessage, isRequired, menuTrigger = "focus", className, labelClassName, descriptionClassName, errorsClassName, controlClassName, inputClassName, popoverClassName, ...props }) {
|
|
20
|
+
const intl = usePanneauIntl();
|
|
21
|
+
const invalid = errors.length > 0;
|
|
22
|
+
return /* @__PURE__ */ jsxs(ComboBox, {
|
|
23
|
+
...props,
|
|
24
|
+
items,
|
|
25
|
+
selectedKey: value,
|
|
26
|
+
onSelectionChange: onChange !== void 0 ? (key) => onChange(key === null ? null : String(key)) : void 0,
|
|
27
|
+
disabledKeys: items.filter((item) => item.disabled === true).map((item_0) => item_0.id),
|
|
28
|
+
menuTrigger,
|
|
29
|
+
allowsEmptyCollection: true,
|
|
30
|
+
isRequired,
|
|
31
|
+
isInvalid: invalid,
|
|
32
|
+
validationBehavior: "aria",
|
|
33
|
+
className: cx(Field_module_default.field, className),
|
|
34
|
+
children: [
|
|
35
|
+
/* @__PURE__ */ jsx(FieldLabel, {
|
|
36
|
+
isRequired,
|
|
37
|
+
className: labelClassName,
|
|
38
|
+
children: label
|
|
39
|
+
}),
|
|
40
|
+
/* @__PURE__ */ jsxs(Group, {
|
|
41
|
+
className: cx(Field_module_default.control, ComboBox_module_default.control, controlClassName),
|
|
42
|
+
"data-invalid": invalid || void 0,
|
|
43
|
+
children: [
|
|
44
|
+
/* @__PURE__ */ jsx(Input, {
|
|
45
|
+
placeholder,
|
|
46
|
+
className: cx(Field_module_default.bare, inputClassName)
|
|
47
|
+
}),
|
|
48
|
+
isLoading ? /* @__PURE__ */ jsx("span", {
|
|
49
|
+
className: ComboBox_module_default.status,
|
|
50
|
+
children: /* @__PURE__ */ jsx(Spinner, { size: "sm" })
|
|
51
|
+
}) : null,
|
|
52
|
+
/* @__PURE__ */ jsx(Button, {
|
|
53
|
+
className: ComboBox_module_default.button,
|
|
54
|
+
"aria-label": intl.formatMessage(messages.showOptions),
|
|
55
|
+
children: /* @__PURE__ */ jsx(Icon, { icon: ChevronDown })
|
|
56
|
+
})
|
|
57
|
+
]
|
|
58
|
+
}),
|
|
59
|
+
/* @__PURE__ */ jsx(FieldDescription, {
|
|
60
|
+
className: descriptionClassName,
|
|
61
|
+
children: description
|
|
62
|
+
}),
|
|
63
|
+
/* @__PURE__ */ jsx(FieldErrors, {
|
|
64
|
+
errors,
|
|
65
|
+
className: errorsClassName
|
|
66
|
+
}),
|
|
67
|
+
/* @__PURE__ */ jsx(PopoverSurface, {
|
|
68
|
+
className: popoverClassName,
|
|
69
|
+
children: /* @__PURE__ */ jsx(ListBox, {
|
|
70
|
+
className: ListBox_module_default.listBox,
|
|
71
|
+
renderEmptyState: () => /* @__PURE__ */ jsx("div", {
|
|
72
|
+
className: ListBox_module_default.empty,
|
|
73
|
+
children: isLoading ? intl.formatMessage(messages.loading) : emptyMessage ?? intl.formatMessage(messages.noResults)
|
|
74
|
+
}),
|
|
75
|
+
children: (item_1) => /* @__PURE__ */ jsx(ListBoxItem, {
|
|
76
|
+
id: item_1.id,
|
|
77
|
+
textValue: item_1.label,
|
|
78
|
+
className: ListBox_module_default.item,
|
|
79
|
+
children: ({ isSelected }) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
|
|
80
|
+
className: ListBox_module_default.check,
|
|
81
|
+
children: isSelected ? /* @__PURE__ */ jsx(Icon, {
|
|
82
|
+
icon: Check,
|
|
83
|
+
size: "sm"
|
|
84
|
+
}) : null
|
|
85
|
+
}), /* @__PURE__ */ jsxs("span", {
|
|
86
|
+
className: ListBox_module_default.itemText,
|
|
87
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
88
|
+
slot: "label",
|
|
89
|
+
className: ListBox_module_default.itemLabel,
|
|
90
|
+
children: item_1.label
|
|
91
|
+
}), item_1.description !== void 0 ? /* @__PURE__ */ jsx(Text, {
|
|
92
|
+
slot: "description",
|
|
93
|
+
className: ListBox_module_default.itemDescription,
|
|
94
|
+
children: item_1.description
|
|
95
|
+
}) : null]
|
|
96
|
+
})] })
|
|
97
|
+
})
|
|
98
|
+
})
|
|
99
|
+
})
|
|
100
|
+
]
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
//#endregion
|
|
104
|
+
export { ComboBox$1 as ComboBox };
|
|
105
|
+
|
|
106
|
+
//# sourceMappingURL=ComboBox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComboBox.js","names":["item","ComboBox","AriaComboBox","fieldStyles","styles","listStyles","_Fragment"],"sources":["../../src/combo-box/ComboBox.tsx"],"sourcesContent":["import { Check, ChevronDown } from 'lucide-react';\nimport {\n ComboBox as AriaComboBox,\n type ComboBoxProps as AriaComboBoxProps,\n Button,\n Group,\n Input,\n ListBox,\n ListBoxItem,\n Text,\n} from 'react-aria-components';\n\nimport {\n type FieldChromeProps,\n FieldDescription,\n FieldErrors,\n FieldLabel,\n fieldStyles,\n} from '../field/FieldParts';\nimport { Icon } from '../icon/Icon';\nimport { messages } from '../intl/messages';\nimport { usePanneauIntl } from '../intl/usePanneauIntl';\nimport { PopoverSurface } from '../popover/Popover';\nimport listStyles from '../select/ListBox.module.css';\nimport { Spinner } from '../spinner/Spinner';\nimport { cx } from '../utils/cx';\nimport styles from './ComboBox.module.css';\n\n/** An item that a combo box can pick. */\nexport interface ComboBoxItem {\n id: string;\n label: string;\n description?: string;\n disabled?: boolean;\n}\n\nexport interface ComboBoxProps\n extends\n Omit<\n AriaComboBoxProps<ComboBoxItem>,\n | 'className'\n | 'style'\n | 'children'\n | 'items'\n | 'defaultItems'\n | 'isInvalid'\n | 'validate'\n | 'selectedKey'\n | 'defaultSelectedKey'\n | 'onSelectionChange'\n | 'value'\n | 'defaultValue'\n | 'onChange'\n >,\n FieldChromeProps {\n /** The items to show. For a local list, filter them with `inputValue`; for a search, fetch them. */\n items: readonly ComboBoxItem[];\n /** Id of the selected item, or `null`. */\n value?: string | null;\n onChange?: (id: string | null) => void;\n placeholder?: string;\n /** Shows a spinner while items load. */\n isLoading?: boolean;\n /** Text shown without items. Defaults to \"No results\". */\n emptyMessage?: string;\n controlClassName?: string;\n inputClassName?: string;\n popoverClassName?: string;\n}\n\n/**\n * A text input with a list of suggestions, to pick one item. Items can be filtered locally or come\n * from a search (`inputValue`, `onInputChange` and `isLoading`).\n */\nexport function ComboBox({\n items,\n value,\n onChange,\n label,\n description,\n errors = [],\n placeholder,\n isLoading = false,\n emptyMessage,\n isRequired,\n menuTrigger = 'focus',\n className,\n labelClassName,\n descriptionClassName,\n errorsClassName,\n controlClassName,\n inputClassName,\n popoverClassName,\n ...props\n}: ComboBoxProps) {\n const intl = usePanneauIntl();\n const invalid = errors.length > 0;\n return (\n <AriaComboBox\n {...props}\n items={items}\n selectedKey={value}\n onSelectionChange={\n onChange !== undefined\n ? (key) => onChange(key === null ? null : String(key))\n : undefined\n }\n disabledKeys={items.filter((item) => item.disabled === true).map((item) => item.id)}\n menuTrigger={menuTrigger}\n allowsEmptyCollection\n isRequired={isRequired}\n isInvalid={invalid}\n validationBehavior=\"aria\"\n className={cx(fieldStyles.field, className)}\n >\n <FieldLabel isRequired={isRequired} className={labelClassName}>\n {label}\n </FieldLabel>\n <Group\n className={cx(fieldStyles.control, styles.control, controlClassName)}\n data-invalid={invalid || undefined}\n >\n <Input placeholder={placeholder} className={cx(fieldStyles.bare, inputClassName)} />\n {isLoading ? (\n <span className={styles.status}>\n <Spinner size=\"sm\" />\n </span>\n ) : null}\n <Button\n className={styles.button}\n aria-label={intl.formatMessage(messages.showOptions)}\n >\n <Icon icon={ChevronDown} />\n </Button>\n </Group>\n <FieldDescription className={descriptionClassName}>{description}</FieldDescription>\n <FieldErrors errors={errors} className={errorsClassName} />\n <PopoverSurface className={popoverClassName}>\n <ListBox<ComboBoxItem>\n className={listStyles.listBox}\n renderEmptyState={() => (\n <div className={listStyles.empty}>\n {isLoading\n ? intl.formatMessage(messages.loading)\n : (emptyMessage ?? intl.formatMessage(messages.noResults))}\n </div>\n )}\n >\n {(item) => (\n <ListBoxItem\n id={item.id}\n textValue={item.label}\n className={listStyles.item}\n >\n {({ isSelected }) => (\n <>\n <span className={listStyles.check}>\n {isSelected ? <Icon icon={Check} size=\"sm\" /> : null}\n </span>\n <span className={listStyles.itemText}>\n <Text slot=\"label\" className={listStyles.itemLabel}>\n {item.label}\n </Text>\n {item.description !== undefined ? (\n <Text\n slot=\"description\"\n className={listStyles.itemDescription}\n >\n {item.description}\n </Text>\n ) : null}\n </span>\n </>\n )}\n </ListBoxItem>\n )}\n </ListBox>\n </PopoverSurface>\n </AriaComboBox>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AA0EA,SAAgBC,WAAS,EACrB,OACA,OACA,UACA,OACA,aACA,SAAS,CAAA,GACT,aACA,YAAY,OACZ,cACA,YACA,cAAc,SACd,WACA,gBACA,sBACA,iBACA,kBACA,gBACA,kBACA,GAAG,SACW;CACd,MAAM,OAAO,eAAe;CAC5B,MAAM,UAAU,OAAO,SAAS;CAChC,OACI,qBAACC,UAAD;EACI,GAAI;EACG;EACP,aAAa;EACb,mBACI,aAAa,KAAA,KACN,QAAQ,SAAS,QAAQ,OAAO,OAAO,OAAO,GAAG,CAAC,IACnD,KAAA;EAEV,cAAc,MAAM,QAAQ,SAAS,KAAK,aAAa,IAAI,CAAC,CAAC,KAAKF,WAASA,OAAK,EAAE;EACrE;EACb,uBAAA;EACY;EACZ,WAAW;EACX,oBAAmB;EACnB,WAAW,GAAGG,qBAAY,OAAO,SAAS;EAf9C,UAAA;GAiBI,oBAAC,YAAD;IAAwB;IAAY,WAAW;IAC1C,UAAA;GACO,CAAA;GACZ,qBAAC,OAAD;IACI,WAAW,GAAGA,qBAAY,SAASC,wBAAO,SAAS,gBAAgB;IACnE,gBAAc,WAAW,KAAA;IAF7B,UAAA;KAII,oBAAC,OAAD;MAAoB;MAAa,WAAW,GAAGD,qBAAY,MAAM,cAAc;KAAE,CAAA;KAChF,YACG,oBAAC,QAAD;MAAM,WAAWC,wBAAO;MACpB,UAAA,oBAAC,SAAD,EAAS,MAAK,KAAI,CAAA;KAChB,CAAA,IACN;KACJ,oBAAC,QAAD;MACI,WAAWA,wBAAO;MAClB,cAAY,KAAK,cAAc,SAAS,WAAW;MAEnD,UAAA,oBAAC,MAAD,EAAM,MAAM,YAAY,CAAA;KACpB,CAAA;IACL;;GACP,oBAAC,kBAAD;IAAkB,WAAW;IAAuB,UAAA;GAA8B,CAAA;GAClF,oBAAC,aAAD;IAAqB;IAAQ,WAAW;GAAgB,CAAA;GACxD,oBAAC,gBAAD;IAAgB,WAAW;IACvB,UAAA,oBAAC,SAAD;KACI,WAAWC,uBAAW;KACtB,wBACI,oBAAC,OAAD;MAAK,WAAWA,uBAAW;MACtB,UAAA,YACK,KAAK,cAAc,SAAS,OAAO,IAClC,gBAAgB,KAAK,cAAc,SAAS,SAAS;KAC3D,CAAA;KAGPL,WAAAA,WACE,oBAAC,aAAD;MACI,IAAIA,OAAK;MACT,WAAWA,OAAK;MAChB,WAAWK,uBAAW;MAEpB,WAAA,EAAE,iBACA,qBAAAC,UAAA,EAAA,UAAA,CACI,oBAAC,QAAD;OAAM,WAAWD,uBAAW;OACvB,UAAA,aAAa,oBAAC,MAAD;QAAM,MAAM;QAAO,MAAK;OAAI,CAAA,IAAM;MAC9C,CAAA,GACN,qBAAC,QAAD;OAAM,WAAWA,uBAAW;OAA5B,UAAA,CACI,oBAAC,MAAD;QAAM,MAAK;QAAQ,WAAWA,uBAAW;QACpCL,UAAAA,OAAK;OACJ,CAAA,GACLA,OAAK,gBAAgB,KAAA,IAClB,oBAAC,MAAD;QACI,MAAK;QACL,WAAWK,uBAAW;QAErBL,UAAAA,OAAK;OACJ,CAAA,IACN,IACF;MACV,CAAA,CAAA,EAAA,CAAA;KAEK,CAAA;IAEZ,CAAA;GACG,CAAA;EACN;;AAEtB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import "./ComboBox.css";
|
|
2
|
+
//#region src/combo-box/ComboBox.module.css
|
|
3
|
+
var control = "panneau-control-zMvu7z";
|
|
4
|
+
var button = "panneau-button-RsfUPx";
|
|
5
|
+
var status = "panneau-status-8R1JBC";
|
|
6
|
+
var ComboBox_module_default = {
|
|
7
|
+
control,
|
|
8
|
+
button,
|
|
9
|
+
status
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { button, control, ComboBox_module_default as default, status };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=ComboBox.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComboBox.module.js","names":[],"sources":["../../src/combo-box/ComboBox.module.css"],"sourcesContent":[".control.control {\n padding-inline-end: 0;\n}\n\n.button {\n display: flex;\n align-items: center;\n justify-content: center;\n align-self: stretch;\n width: 2rem;\n padding: 0;\n color: var(--panneau-color-text-muted);\n cursor: pointer;\n background: transparent;\n border: 0;\n}\n\n.button[data-hovered] {\n color: var(--panneau-color-text);\n}\n\n.status {\n display: flex;\n align-items: center;\n padding-inline: var(--panneau-space-1);\n}\n"],"mappings":""}
|