@panneau/ui 5.0.0-alpha.6 → 5.0.0-alpha.8
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 +24 -1
- package/dist/alert/Alert.d.ts +2 -2
- package/dist/alert/Alert.js +108 -40
- package/dist/alert/Alert.js.map +1 -1
- package/dist/alert/tokens.d.ts +1 -1
- package/dist/alert/tokens.js.map +1 -1
- package/dist/badge/Badge.d.ts +1 -1
- package/dist/badge/Badge.js +34 -6
- package/dist/badge/Badge.js.map +1 -1
- package/dist/badge/tokens.d.ts +1 -1
- package/dist/badge/tokens.js.map +1 -1
- package/dist/button/Button.d.ts +3 -3
- package/dist/button/Button.js +111 -17
- package/dist/button/Button.js.map +1 -1
- package/dist/button/tokens.d.ts +1 -1
- package/dist/button/tokens.js.map +1 -1
- package/dist/card/Card.js +76 -23
- package/dist/card/Card.js.map +1 -1
- package/dist/card/tokens.d.ts +1 -1
- package/dist/card/tokens.js.map +1 -1
- package/dist/checkbox/Checkbox.d.ts +1 -1
- package/dist/checkbox/Checkbox.js +86 -25
- package/dist/checkbox/Checkbox.js.map +1 -1
- package/dist/checkbox/ChoiceChrome.js +82 -21
- package/dist/checkbox/ChoiceChrome.js.map +1 -1
- package/dist/checkbox/tokens.d.ts +1 -1
- package/dist/checkbox/tokens.js.map +1 -1
- package/dist/combo-box/ComboBox.d.ts +1 -1
- package/dist/combo-box/ComboBox.js +291 -79
- package/dist/combo-box/ComboBox.js.map +1 -1
- package/dist/command-palette/CommandPalette.d.ts +1 -1
- package/dist/command-palette/CommandPalette.js +463 -160
- package/dist/command-palette/CommandPalette.js.map +1 -1
- package/dist/command-palette/match.d.ts +1 -1
- package/dist/command-palette/match.js.map +1 -1
- package/dist/command-palette/tokens.d.ts +1 -1
- package/dist/command-palette/tokens.js.map +1 -1
- package/dist/command-palette/useCommandShortcut.js +31 -12
- package/dist/command-palette/useCommandShortcut.js.map +1 -1
- package/dist/container/Container.js +48 -5
- package/dist/container/Container.js.map +1 -1
- package/dist/container/tokens.d.ts +1 -1
- package/dist/container/tokens.js.map +1 -1
- package/dist/date-picker/DatePicker.d.ts +1 -1
- package/dist/date-picker/DatePicker.js +234 -73
- package/dist/date-picker/DatePicker.js.map +1 -1
- package/dist/date-picker/calendarTokens.d.ts +1 -1
- package/dist/date-picker/calendarTokens.js.map +1 -1
- package/dist/dialog/Dialog.js +161 -45
- package/dist/dialog/Dialog.js.map +1 -1
- package/dist/dialog/tokens.d.ts +1 -1
- package/dist/dialog/tokens.js.map +1 -1
- package/dist/disclosure/Disclosure.js +132 -28
- package/dist/disclosure/Disclosure.js.map +1 -1
- package/dist/disclosure/tokens.d.ts +1 -1
- package/dist/disclosure/tokens.js.map +1 -1
- package/dist/divider/Divider.js +55 -11
- package/dist/divider/Divider.js.map +1 -1
- package/dist/divider/tokens.d.ts +1 -1
- package/dist/divider/tokens.js.map +1 -1
- package/dist/field/FieldParts.d.ts +1 -1
- package/dist/field/FieldParts.js +69 -15
- package/dist/field/FieldParts.js.map +1 -1
- package/dist/field/Fieldset.js +99 -32
- package/dist/field/Fieldset.js.map +1 -1
- package/dist/field/inputTokens.d.ts +1 -1
- package/dist/field/inputTokens.js.map +1 -1
- package/dist/field/tokens.d.ts +1 -1
- package/dist/field/tokens.js.map +1 -1
- package/dist/grid/Grid.d.ts +1 -1
- package/dist/grid/Grid.js +123 -14
- package/dist/grid/Grid.js.map +1 -1
- package/dist/grid/tokens.d.ts +1 -1
- package/dist/grid/tokens.js.map +1 -1
- package/dist/heading/Heading.js +41 -6
- package/dist/heading/Heading.js.map +1 -1
- package/dist/heading/tokens.d.ts +1 -1
- package/dist/heading/tokens.js.map +1 -1
- package/dist/icon/Icon.js +36 -11
- package/dist/icon/Icon.js.map +1 -1
- package/dist/icon/lucideIconLoader.d.ts +1 -1
- package/dist/icon/lucideIconLoader.js.map +1 -1
- package/dist/icon/namedIcons.d.ts +1 -1
- package/dist/icon/namedIcons.js +87 -26
- package/dist/icon/namedIcons.js.map +1 -1
- package/dist/icon-button/IconButton.d.ts +2 -2
- package/dist/icon-button/IconButton.js +70 -13
- package/dist/icon-button/IconButton.js.map +1 -1
- package/dist/index.d.ts +61 -59
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/inline/Inline.d.ts +1 -1
- package/dist/inline/Inline.js +65 -7
- package/dist/inline/Inline.js.map +1 -1
- package/dist/inline/tokens.d.ts +1 -1
- package/dist/inline/tokens.js.map +1 -1
- package/dist/intl/usePanneauIntl.js.map +1 -1
- package/dist/layout/responsive.js.map +1 -1
- package/dist/locales/index.js.map +1 -1
- package/dist/menu/Menu.d.ts +1 -1
- package/dist/menu/Menu.js +170 -44
- package/dist/menu/Menu.js.map +1 -1
- package/dist/menu/tokens.d.ts +1 -1
- package/dist/menu/tokens.js.map +1 -1
- package/dist/named-icons/index.d.ts +1 -1
- package/dist/number-input/NumberInput.d.ts +1 -1
- package/dist/number-input/NumberInput.js +232 -60
- package/dist/number-input/NumberInput.js.map +1 -1
- package/dist/number-input/tokens.d.ts +1 -1
- package/dist/number-input/tokens.js.map +1 -1
- package/dist/pill-trigger/PillTrigger.js +76 -20
- package/dist/pill-trigger/PillTrigger.js.map +1 -1
- package/dist/pill-trigger/tokens.d.ts +1 -1
- package/dist/pill-trigger/tokens.js.map +1 -1
- package/dist/popover/Popover.js +109 -18
- package/dist/popover/Popover.js.map +1 -1
- package/dist/popover/tokens.d.ts +1 -1
- package/dist/popover/tokens.js.map +1 -1
- package/dist/prose/Prose.js +36 -5
- package/dist/prose/Prose.js.map +1 -1
- package/dist/prose/tokens.d.ts +1 -1
- package/dist/prose/tokens.js.map +1 -1
- package/dist/radio-group/RadioGroup.d.ts +2 -2
- package/dist/radio-group/RadioGroup.js +211 -61
- package/dist/radio-group/RadioGroup.js.map +1 -1
- package/dist/radio-group/tokens.d.ts +1 -1
- package/dist/radio-group/tokens.js.map +1 -1
- package/dist/root/PanneauRoot.d.ts +9 -3
- package/dist/root/PanneauRoot.d.ts.map +1 -1
- package/dist/root/PanneauRoot.js +212 -49
- package/dist/root/PanneauRoot.js.map +1 -1
- package/dist/root/ThemeScope.d.ts +1 -1
- package/dist/root/ThemeScope.js +107 -26
- package/dist/root/ThemeScope.js.map +1 -1
- package/dist/segmented-control/SegmentedControl.d.ts +1 -1
- package/dist/segmented-control/SegmentedControl.js +120 -22
- package/dist/segmented-control/SegmentedControl.js.map +1 -1
- package/dist/segmented-control/tokens.d.ts +1 -1
- package/dist/segmented-control/tokens.js.map +1 -1
- package/dist/select/Select.d.ts +1 -1
- package/dist/select/Select.js +298 -92
- package/dist/select/Select.js.map +1 -1
- package/dist/select/listBoxTokens.d.ts +1 -1
- package/dist/select/listBoxTokens.js.map +1 -1
- package/dist/skeleton/LoadingRegion.d.ts +16 -0
- package/dist/skeleton/LoadingRegion.d.ts.map +1 -0
- package/dist/skeleton/LoadingRegion.js +65 -0
- package/dist/skeleton/LoadingRegion.js.map +1 -0
- package/dist/skeleton/Skeleton.css +62 -0
- package/dist/skeleton/Skeleton.d.ts +25 -0
- package/dist/skeleton/Skeleton.d.ts.map +1 -0
- package/dist/skeleton/Skeleton.js +106 -0
- package/dist/skeleton/Skeleton.js.map +1 -0
- package/dist/skeleton/Skeleton.module.js +22 -0
- package/dist/skeleton/Skeleton.module.js.map +1 -0
- package/dist/skeleton/tokens.d.ts +3 -0
- package/dist/skeleton/tokens.d.ts.map +1 -0
- package/dist/skeleton/tokens.js +15 -0
- package/dist/skeleton/tokens.js.map +1 -0
- package/dist/slider/Slider.d.ts +1 -1
- package/dist/slider/Slider.js +222 -44
- package/dist/slider/Slider.js.map +1 -1
- package/dist/spinner/Spinner.js +49 -9
- package/dist/spinner/Spinner.js.map +1 -1
- package/dist/spinner/tokens.d.ts +1 -1
- package/dist/spinner/tokens.js.map +1 -1
- package/dist/stack/Stack.d.ts +1 -1
- package/dist/stack/Stack.js +60 -7
- package/dist/stack/Stack.js.map +1 -1
- package/dist/stack/tokens.d.ts +1 -1
- package/dist/stack/tokens.js.map +1 -1
- package/dist/switch/Switch.d.ts +1 -1
- package/dist/switch/Switch.js +68 -11
- package/dist/switch/Switch.js.map +1 -1
- package/dist/switch/tokens.d.ts +1 -1
- package/dist/switch/tokens.js.map +1 -1
- package/dist/tabs/Tabs.js +1 -1
- package/dist/tabs/Tabs.js.map +1 -1
- package/dist/tabs/tokens.d.ts +1 -1
- package/dist/tabs/tokens.js.map +1 -1
- package/dist/tags-input/TagsInput.d.ts +1 -1
- package/dist/tags-input/TagsInput.js +277 -121
- package/dist/tags-input/TagsInput.js.map +1 -1
- package/dist/text/Text.d.ts +1 -1
- package/dist/text/Text.js +70 -5
- package/dist/text/Text.js.map +1 -1
- package/dist/text/tokens.d.ts +1 -1
- package/dist/text/tokens.js.map +1 -1
- package/dist/text-area/TextArea.d.ts +1 -1
- package/dist/text-area/TextArea.js +135 -28
- package/dist/text-area/TextArea.js.map +1 -1
- package/dist/text-input/TextInput.d.ts +1 -1
- package/dist/text-input/TextInput.js +164 -49
- package/dist/text-input/TextInput.js.map +1 -1
- package/dist/theme/bootstrap.d.ts +2 -2
- package/dist/theme/bootstrap.js.map +1 -1
- package/dist/theme/chartColors.js.map +1 -1
- package/dist/theme/checkTheme.d.ts +2 -2
- package/dist/theme/checkTheme.js.map +1 -1
- package/dist/theme/cli.d.ts +2 -2
- package/dist/theme/cli.js.map +1 -1
- package/dist/theme/color.js.map +1 -1
- package/dist/theme/colorVision.d.ts +1 -1
- package/dist/theme/colorVision.js.map +1 -1
- package/dist/theme/componentTokens.js.map +1 -1
- package/dist/theme/components.d.ts +1 -0
- package/dist/theme/components.d.ts.map +1 -1
- package/dist/theme/components.js +2 -0
- package/dist/theme/components.js.map +1 -1
- package/dist/theme/defineTheme.d.ts +5 -5
- package/dist/theme/defineTheme.js.map +1 -1
- package/dist/theme/fonts.js.map +1 -1
- package/dist/theme/index.d.ts +12 -12
- package/dist/theme/semanticTokens.js.map +1 -1
- package/dist/theme/theme.d.ts +2 -2
- package/dist/theme/theme.js.map +1 -1
- package/dist/theme/toneClass.d.ts +1 -1
- package/dist/theme/toneClass.js.map +1 -1
- package/dist/theme/tones.d.ts +1 -1
- package/dist/theme/tones.js.map +1 -1
- package/dist/time-input/TimeInput.d.ts +1 -1
- package/dist/time-input/TimeInput.js +138 -31
- package/dist/time-input/TimeInput.js.map +1 -1
- package/dist/toast/Toast.d.ts +1 -1
- package/dist/toast/Toast.js +1 -1
- package/dist/toast/Toast.js.map +1 -1
- package/dist/toast/tokens.d.ts +1 -1
- package/dist/toast/tokens.js.map +1 -1
- package/dist/tooltip/Tooltip.js +38 -8
- package/dist/tooltip/Tooltip.js.map +1 -1
- package/dist/tooltip/tokens.d.ts +1 -1
- package/dist/tooltip/tokens.js.map +1 -1
- package/dist/utils/cx.js.map +1 -1
- package/package.json +5 -5
package/dist/popover/Popover.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { cx } from "../utils/cx.js";
|
|
2
2
|
import { usePortalContainer } from "../root/PanneauRoot.js";
|
|
3
3
|
import Popover_module_default from "./Popover.module.js";
|
|
4
|
+
import { c } from "react/compiler-runtime";
|
|
4
5
|
import { Dialog, DialogTrigger as PopoverTrigger, Popover } from "react-aria-components";
|
|
5
6
|
import { jsx } from "react/jsx-runtime";
|
|
6
7
|
//#region src/popover/Popover.tsx
|
|
@@ -8,32 +9,122 @@ import { jsx } from "react/jsx-runtime";
|
|
|
8
9
|
* A popover with free content, inside a `PopoverTrigger` with its button as the first child. Its
|
|
9
10
|
* content is a non-modal dialog: focus moves into it and comes back to the button when it closes.
|
|
10
11
|
*/
|
|
11
|
-
function Popover$1(
|
|
12
|
+
function Popover$1(t0) {
|
|
13
|
+
const $ = c(21);
|
|
14
|
+
let ariaLabel;
|
|
15
|
+
let children;
|
|
16
|
+
let className;
|
|
17
|
+
let dialogClassName;
|
|
18
|
+
let props;
|
|
19
|
+
let t1;
|
|
20
|
+
if ($[0] !== t0) {
|
|
21
|
+
({children, "aria-label": ariaLabel, className, dialogClassName, offset: t1, ...props} = t0);
|
|
22
|
+
$[0] = t0;
|
|
23
|
+
$[1] = ariaLabel;
|
|
24
|
+
$[2] = children;
|
|
25
|
+
$[3] = className;
|
|
26
|
+
$[4] = dialogClassName;
|
|
27
|
+
$[5] = props;
|
|
28
|
+
$[6] = t1;
|
|
29
|
+
} else {
|
|
30
|
+
ariaLabel = $[1];
|
|
31
|
+
children = $[2];
|
|
32
|
+
className = $[3];
|
|
33
|
+
dialogClassName = $[4];
|
|
34
|
+
props = $[5];
|
|
35
|
+
t1 = $[6];
|
|
36
|
+
}
|
|
37
|
+
const offset = t1 === void 0 ? 6 : t1;
|
|
12
38
|
const container = usePortalContainer();
|
|
13
39
|
if (container === null) return null;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
40
|
+
let t2;
|
|
41
|
+
if ($[7] !== className) {
|
|
42
|
+
t2 = cx("panneau-popover", Popover_module_default.popover, className);
|
|
43
|
+
$[7] = className;
|
|
44
|
+
$[8] = t2;
|
|
45
|
+
} else t2 = $[8];
|
|
46
|
+
let t3;
|
|
47
|
+
if ($[9] !== dialogClassName) {
|
|
48
|
+
t3 = cx(Popover_module_default.dialog, dialogClassName);
|
|
49
|
+
$[9] = dialogClassName;
|
|
50
|
+
$[10] = t3;
|
|
51
|
+
} else t3 = $[10];
|
|
52
|
+
let t4;
|
|
53
|
+
if ($[11] !== ariaLabel || $[12] !== children || $[13] !== t3) {
|
|
54
|
+
t4 = /* @__PURE__ */ jsx(Dialog, {
|
|
20
55
|
"aria-label": ariaLabel,
|
|
21
|
-
className:
|
|
56
|
+
className: t3,
|
|
22
57
|
children
|
|
23
|
-
})
|
|
24
|
-
|
|
58
|
+
});
|
|
59
|
+
$[11] = ariaLabel;
|
|
60
|
+
$[12] = children;
|
|
61
|
+
$[13] = t3;
|
|
62
|
+
$[14] = t4;
|
|
63
|
+
} else t4 = $[14];
|
|
64
|
+
let t5;
|
|
65
|
+
if ($[15] !== container || $[16] !== offset || $[17] !== props || $[18] !== t2 || $[19] !== t4) {
|
|
66
|
+
t5 = /* @__PURE__ */ jsx(Popover, {
|
|
67
|
+
...props,
|
|
68
|
+
offset,
|
|
69
|
+
className: t2,
|
|
70
|
+
UNSTABLE_portalContainer: container,
|
|
71
|
+
children: t4
|
|
72
|
+
});
|
|
73
|
+
$[15] = container;
|
|
74
|
+
$[16] = offset;
|
|
75
|
+
$[17] = props;
|
|
76
|
+
$[18] = t2;
|
|
77
|
+
$[19] = t4;
|
|
78
|
+
$[20] = t5;
|
|
79
|
+
} else t5 = $[20];
|
|
80
|
+
return t5;
|
|
25
81
|
}
|
|
26
82
|
/** The popover surface without a dialog, for listboxes and menus. */
|
|
27
|
-
function PopoverSurface(
|
|
83
|
+
function PopoverSurface(t0) {
|
|
84
|
+
const $ = c(13);
|
|
85
|
+
let children;
|
|
86
|
+
let className;
|
|
87
|
+
let props;
|
|
88
|
+
let t1;
|
|
89
|
+
if ($[0] !== t0) {
|
|
90
|
+
({children, className, offset: t1, ...props} = t0);
|
|
91
|
+
$[0] = t0;
|
|
92
|
+
$[1] = children;
|
|
93
|
+
$[2] = className;
|
|
94
|
+
$[3] = props;
|
|
95
|
+
$[4] = t1;
|
|
96
|
+
} else {
|
|
97
|
+
children = $[1];
|
|
98
|
+
className = $[2];
|
|
99
|
+
props = $[3];
|
|
100
|
+
t1 = $[4];
|
|
101
|
+
}
|
|
102
|
+
const offset = t1 === void 0 ? 6 : t1;
|
|
28
103
|
const container = usePortalContainer();
|
|
29
104
|
if (container === null) return null;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
105
|
+
let t2;
|
|
106
|
+
if ($[5] !== className) {
|
|
107
|
+
t2 = cx("panneau-popover", Popover_module_default.popover, className);
|
|
108
|
+
$[5] = className;
|
|
109
|
+
$[6] = t2;
|
|
110
|
+
} else t2 = $[6];
|
|
111
|
+
let t3;
|
|
112
|
+
if ($[7] !== children || $[8] !== container || $[9] !== offset || $[10] !== props || $[11] !== t2) {
|
|
113
|
+
t3 = /* @__PURE__ */ jsx(Popover, {
|
|
114
|
+
...props,
|
|
115
|
+
offset,
|
|
116
|
+
className: t2,
|
|
117
|
+
UNSTABLE_portalContainer: container,
|
|
118
|
+
children
|
|
119
|
+
});
|
|
120
|
+
$[7] = children;
|
|
121
|
+
$[8] = container;
|
|
122
|
+
$[9] = offset;
|
|
123
|
+
$[10] = props;
|
|
124
|
+
$[11] = t2;
|
|
125
|
+
$[12] = t3;
|
|
126
|
+
} else t3 = $[12];
|
|
127
|
+
return t3;
|
|
37
128
|
}
|
|
38
129
|
//#endregion
|
|
39
130
|
export { Popover$1 as Popover, PopoverSurface, PopoverTrigger };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.js","names":["Popover","AriaPopover","styles"],"sources":["../../src/popover/Popover.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport {\n Popover as AriaPopover,\n type PopoverProps as AriaPopoverProps,\n Dialog,\n} from 'react-aria-components';\n\nimport { usePortalContainer } from '../root/PanneauRoot';\nimport { cx } from '../utils/cx';\nimport styles from './Popover.module.css';\n\nexport interface PopoverProps extends Omit<\n AriaPopoverProps,\n 'className' | 'style' | 'children' | 'UNSTABLE_portalContainer'\n> {\n children?: ReactNode;\n /** Accessible label of the popover's dialog, when it has no heading. */\n 'aria-label'?: string;\n className?: string;\n dialogClassName?: string;\n}\n\n/**\n * A popover with free content, inside a `PopoverTrigger` with its button as the first child. Its\n * content is a non-modal dialog: focus moves into it and comes back to the button when it closes.\n */\nexport function Popover({\n children,\n 'aria-label': ariaLabel,\n className,\n dialogClassName,\n offset = 6,\n ...props\n}: PopoverProps) {\n const container = usePortalContainer();\n if (container === null) {\n return null;\n }\n return (\n <AriaPopover\n {...props}\n offset={offset}\n className={cx('panneau-popover', styles.popover, className)}\n UNSTABLE_portalContainer={container}\n >\n <Dialog aria-label={ariaLabel} className={cx(styles.dialog, dialogClassName)}>\n {children}\n </Dialog>\n </AriaPopover>\n );\n}\n\n/** The popover surface without a dialog, for listboxes and menus. */\nexport function PopoverSurface({\n children,\n className,\n offset = 6,\n ...props\n}: Omit<PopoverProps, 'aria-label' | 'dialogClassName'>) {\n const container = usePortalContainer();\n if (container === null) {\n return null;\n }\n return (\n <AriaPopover\n {...props}\n offset={offset}\n className={cx('panneau-popover', styles.popover, className)}\n UNSTABLE_portalContainer={container}\n >\n {children}\n </AriaPopover>\n );\n}\n\nexport { DialogTrigger as PopoverTrigger } from 'react-aria-components';\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Popover.js","names":["ReactNode","Popover","AriaPopover","PopoverProps","AriaPopoverProps","Dialog","usePortalContainer","cx","styles","Omit","children","className","dialogClassName","t0","$","_c","ariaLabel","props","t1","offset","undefined","container","t2","popover","t3","dialog","t4","t5","PopoverSurface","DialogTrigger","PopoverTrigger","Popover","_c","styles","AriaPopover"],"sources":["../../src/popover/Popover.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport {\n Popover as AriaPopover,\n type PopoverProps as AriaPopoverProps,\n Dialog,\n} from 'react-aria-components';\n\nimport { usePortalContainer } from '../root/PanneauRoot';\nimport { cx } from '../utils/cx';\nimport styles from './Popover.module.css';\n\nexport interface PopoverProps extends Omit<\n AriaPopoverProps,\n 'className' | 'style' | 'children' | 'UNSTABLE_portalContainer'\n> {\n children?: ReactNode;\n /** Accessible label of the popover's dialog, when it has no heading. */\n 'aria-label'?: string;\n className?: string;\n dialogClassName?: string;\n}\n\n/**\n * A popover with free content, inside a `PopoverTrigger` with its button as the first child. Its\n * content is a non-modal dialog: focus moves into it and comes back to the button when it closes.\n */\nexport function Popover({\n children,\n 'aria-label': ariaLabel,\n className,\n dialogClassName,\n offset = 6,\n ...props\n}: PopoverProps) {\n const container = usePortalContainer();\n if (container === null) {\n return null;\n }\n return (\n <AriaPopover\n {...props}\n offset={offset}\n className={cx('panneau-popover', styles.popover, className)}\n UNSTABLE_portalContainer={container}\n >\n <Dialog aria-label={ariaLabel} className={cx(styles.dialog, dialogClassName)}>\n {children}\n </Dialog>\n </AriaPopover>\n );\n}\n\n/** The popover surface without a dialog, for listboxes and menus. */\nexport function PopoverSurface({\n children,\n className,\n offset = 6,\n ...props\n}: Omit<PopoverProps, 'aria-label' | 'dialogClassName'>) {\n const container = usePortalContainer();\n if (container === null) {\n return null;\n }\n return (\n <AriaPopover\n {...props}\n offset={offset}\n className={cx('panneau-popover', styles.popover, className)}\n UNSTABLE_portalContainer={container}\n >\n {children}\n </AriaPopover>\n );\n}\n\nexport { DialogTrigger as PopoverTrigger } from 'react-aria-components';\n"],"mappings":";;;;;;;;;;;AA0BA,SAAOC,UAAAY,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAC;CAAA,IAAAN;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAK;CAAA,IAAAC;CAAA,IAAAJ,EAAA,OAAAD,IAAA;EAAiB,CAAA,CAAAH,UAAA,cAAAM,WAAAL,WAAAC,iBAAAO,QAAAD,IAAA,GAAAD,SAAAJ;EAOTC,EAAA,KAAAD;EAAAC,EAAA,KAAAE;EAAAF,EAAA,KAAAJ;EAAAI,EAAA,KAAAH;EAAAG,EAAA,KAAAF;EAAAE,EAAA,KAAAG;EAAAH,EAAA,KAAAI;CAAA,OAAA;EAAAF,YAAAF,EAAA;EAAAJ,WAAAI,EAAA;EAAAH,YAAAG,EAAA;EAAAF,kBAAAE,EAAA;EAAAG,QAAAH,EAAA;EAAAI,KAAAJ,EAAA;CAAA;CAFX,MAAAK,SAAAD,OAAAE,KAAAA,IAAA,IAAAF;CAGA,MAAAG,YAAkBf,mBAAmB;CACrC,IAAIe,cAAc,MAAI,OACX;CACV,IAAAC;CAAA,IAAAR,EAAA,OAAAH,WAAA;EAKkBW,KAAAf,GAAG,mBAAmBC,uBAAMe,SAAUZ,SAAS;EAACG,EAAA,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AA;EAAAH,YAAAG,EAAA;EAAAG,QAAAH,EAAA;EAAAI,KAAAJ,EAAA;CAAA;CAFnD,MAAAK,SAAAD,OAAAE,KAAAA,IAAA,IAAAF;CAGA,MAAAG,YAAkBf,mBAAmB;CACrC,IAAIe,cAAc,MAAI,OACX;CACV,IAAAC;CAAA,IAAAR,EAAA,OAAAH,WAAA;EAKkBW,KAAAf,GAAG,mBAAmBC,uBAAMe,SAAUZ,SAAS;EAACG,EAAA,KAAAH;EAAAG,EAAA,KAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAAA,IAAAU;CAAA,IAAAV,EAAA,OAAAJ,YAAAI,EAAA,OAAAO,aAAAP,EAAA,OAAAK,UAAAL,EAAA,QAAAG,SAAAH,EAAA,QAAAQ,IAAA;EAH/DE,KAAA,oBAACU,SAAD;GAAY,GACJjB;GACIE;GACG,WAAAG;GACeD,0BAAAA;GAEzBX;EANO,CAAA;EAOEI,EAAA,KAAAJ;EAAAI,EAAA,KAAAO;EAAAP,EAAA,KAAAK;EAAAL,EAAA,MAAAG;EAAAH,EAAA,MAAAQ;EAAAR,EAAA,MAAAU;CAAA,OAAAA,KAAAV,EAAA;CAAA,OAPdU;AAOc"}
|
package/dist/popover/tokens.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/** Tokens of Popover. */
|
|
2
|
-
export declare const popoverTokens: import("
|
|
2
|
+
export declare const popoverTokens: import("../index.js").ComponentTokens<"popover", "panneau-popover-radius" | "panneau-popover-padding" | "panneau-popover-bg" | "panneau-popover-border-color" | "panneau-popover-shadow">;
|
|
3
3
|
//# sourceMappingURL=tokens.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.js","names":[],"sources":["../../src/popover/tokens.ts"],"sourcesContent":["import { defineComponentTokens } from '../theme/componentTokens';\n\n/** Tokens of Popover. */\nexport const popoverTokens = defineComponentTokens('popover', {\n /** Background. */\n bg: 'var(--panneau-color-surface-raised)',\n /** Border color. */\n 'border-color': 'var(--panneau-color-border)',\n /** Corner radius. */\n radius: 'var(--panneau-radius-lg)',\n /** Shadow. */\n shadow: 'var(--panneau-shadow-lg)',\n /** Padding of the content. */\n padding: 'var(--panneau-space-3)',\n});\n"],"mappings":";;;AAGA,
|
|
1
|
+
{"version":3,"file":"tokens.js","names":["defineComponentTokens","popoverTokens","bg","radius","shadow","padding"],"sources":["../../src/popover/tokens.ts"],"sourcesContent":["import { defineComponentTokens } from '../theme/componentTokens';\n\n/** Tokens of Popover. */\nexport const popoverTokens = defineComponentTokens('popover', {\n /** Background. */\n bg: 'var(--panneau-color-surface-raised)',\n /** Border color. */\n 'border-color': 'var(--panneau-color-border)',\n /** Corner radius. */\n radius: 'var(--panneau-radius-lg)',\n /** Shadow. */\n shadow: 'var(--panneau-shadow-lg)',\n /** Padding of the content. */\n padding: 'var(--panneau-space-3)',\n});\n"],"mappings":";;;AAGA,IAAaC,gBAAgBD,sBAAsB,WAAW;;CAE1DE,IAAI;;CAEJ,gBAAgB;;CAEhBC,QAAQ;;CAERC,QAAQ;;CAERC,SAAS;AACb,CAAC"}
|
package/dist/prose/Prose.js
CHANGED
|
@@ -1,16 +1,47 @@
|
|
|
1
1
|
import { cx } from "../utils/cx.js";
|
|
2
2
|
import Prose_module_default from "./Prose.module.js";
|
|
3
|
+
import { c } from "react/compiler-runtime";
|
|
3
4
|
import { jsx } from "react/jsx-runtime";
|
|
4
5
|
//#region src/prose/Prose.tsx
|
|
5
6
|
/**
|
|
6
7
|
* Styles the elements of rich content (headings, paragraphs, lists, links, quotes, code, tables):
|
|
7
8
|
* the output of an editor, Markdown, or a help page. Outside of it, Panneau styles no element.
|
|
8
9
|
*/
|
|
9
|
-
function Prose(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
function Prose(t0) {
|
|
11
|
+
const $ = c(10);
|
|
12
|
+
let className;
|
|
13
|
+
let props;
|
|
14
|
+
let t1;
|
|
15
|
+
if ($[0] !== t0) {
|
|
16
|
+
({as: t1, className, ...props} = t0);
|
|
17
|
+
$[0] = t0;
|
|
18
|
+
$[1] = className;
|
|
19
|
+
$[2] = props;
|
|
20
|
+
$[3] = t1;
|
|
21
|
+
} else {
|
|
22
|
+
className = $[1];
|
|
23
|
+
props = $[2];
|
|
24
|
+
t1 = $[3];
|
|
25
|
+
}
|
|
26
|
+
const Element = t1 === void 0 ? "div" : t1;
|
|
27
|
+
let t2;
|
|
28
|
+
if ($[4] !== className) {
|
|
29
|
+
t2 = cx("panneau-prose", Prose_module_default.prose, className);
|
|
30
|
+
$[4] = className;
|
|
31
|
+
$[5] = t2;
|
|
32
|
+
} else t2 = $[5];
|
|
33
|
+
let t3;
|
|
34
|
+
if ($[6] !== Element || $[7] !== props || $[8] !== t2) {
|
|
35
|
+
t3 = /* @__PURE__ */ jsx(Element, {
|
|
36
|
+
...props,
|
|
37
|
+
className: t2
|
|
38
|
+
});
|
|
39
|
+
$[6] = Element;
|
|
40
|
+
$[7] = props;
|
|
41
|
+
$[8] = t2;
|
|
42
|
+
$[9] = t3;
|
|
43
|
+
} else t3 = $[9];
|
|
44
|
+
return t3;
|
|
14
45
|
}
|
|
15
46
|
//#endregion
|
|
16
47
|
export { Prose };
|
package/dist/prose/Prose.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Prose.js","names":["styles"],"sources":["../../src/prose/Prose.tsx"],"sourcesContent":["import type { HTMLAttributes } from 'react';\n\nimport { cx } from '../utils/cx';\nimport styles from './Prose.module.css';\n\nexport interface ProseProps extends HTMLAttributes<HTMLElement> {\n /** Element to render. Defaults to `div`. */\n as?: 'div' | 'article' | 'section';\n}\n\n/**\n * Styles the elements of rich content (headings, paragraphs, lists, links, quotes, code, tables):\n * the output of an editor, Markdown, or a help page. Outside of it, Panneau styles no element.\n */\nexport function Prose({ as: Element = 'div', className, ...props }: ProseProps) {\n return <Element {...props} className={cx('panneau-prose', styles.prose, className)} />;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Prose.js","names":["HTMLAttributes","cx","styles","ProseProps","HTMLElement","as","Prose","t0","$","_c","className","props","t1","Element","undefined","t2","prose","t3","_c","styles"],"sources":["../../src/prose/Prose.tsx"],"sourcesContent":["import type { HTMLAttributes } from 'react';\n\nimport { cx } from '../utils/cx';\nimport styles from './Prose.module.css';\n\nexport interface ProseProps extends HTMLAttributes<HTMLElement> {\n /** Element to render. Defaults to `div`. */\n as?: 'div' | 'article' | 'section';\n}\n\n/**\n * Styles the elements of rich content (headings, paragraphs, lists, links, quotes, code, tables):\n * the output of an editor, Markdown, or a help page. Outside of it, Panneau styles no element.\n */\nexport function Prose({ as: Element = 'div', className, ...props }: ProseProps) {\n return <Element {...props} className={cx('panneau-prose', styles.prose, className)} />;\n}\n"],"mappings":";;;;;;;;;AAcA,SAAOM,MAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAJ,EAAA,OAAAD,IAAA;EAAe,CAAA,CAAAF,IAAAO,IAAAF,WAAA,GAAAC,SAAAJ;EAAwDC,EAAA,KAAAD;EAAAC,EAAA,KAAAE;EAAAF,EAAA,KAAAG;EAAAH,EAAA,KAAAI;CAAA,OAAA;EAAAF,YAAAF,EAAA;EAAAG,QAAAH,EAAA;EAAAI,KAAAJ,EAAA;CAAA;CAAlD,MAAAK,UAAAD,OAAAE,KAAAA,IAAA,QAAAF;CAAe,IAAAG;CAAA,IAAAP,EAAA,OAAAE,WAAA;EACDK,KAAAd,GAAG,iBAAiBC,qBAAMc,OAAQN,SAAS;EAACF,EAAA,KAAAE;EAAAF,EAAA,KAAAO;CAAA,OAAAA,KAAAP,EAAA;CAAA,IAAAS;CAAA,IAAAT,EAAA,OAAAK,WAAAL,EAAA,OAAAG,SAAAH,EAAA,OAAAO,IAAA;EAA3EE,KAAA,oBAAC,SAAD;GAAQ,GAAKN;GAAkB,WAAAI;EAA4C,CAAA;EAAIP,EAAA,KAAAK;EAAAL,EAAA,KAAAG;EAAAH,EAAA,KAAAO;EAAAP,EAAA,KAAAS;CAAA,OAAAA,KAAAT,EAAA;CAAA,OAA/ES;AAA+E"}
|
package/dist/prose/tokens.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/** Tokens of Prose. Its headings use the tokens of Heading. */
|
|
2
|
-
export declare const proseTokens: import("
|
|
2
|
+
export declare const proseTokens: import("../index.js").ComponentTokens<"prose", "panneau-prose-gap" | "panneau-prose-border-color" | "panneau-prose-line-height" | "panneau-prose-heading-gap" | "panneau-prose-list-indent" | "panneau-prose-link-color" | "panneau-prose-code-font-size" | "panneau-prose-code-color" | "panneau-prose-code-bg" | "panneau-prose-code-radius" | "panneau-prose-quote-border-color" | "panneau-prose-quote-color">;
|
|
3
3
|
//# sourceMappingURL=tokens.d.ts.map
|
package/dist/prose/tokens.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.js","names":[],"sources":["../../src/prose/tokens.ts"],"sourcesContent":["import { defineComponentTokens } from '../theme/componentTokens';\n\n/** Tokens of Prose. Its headings use the tokens of Heading. */\nexport const proseTokens = defineComponentTokens('prose', {\n /** Line height of the content. */\n 'line-height': '1.6',\n /** Space between blocks: paragraphs, lists, tables. */\n gap: 'var(--panneau-space-4)',\n /** Space above a heading. */\n 'heading-gap': 'var(--panneau-space-6)',\n /** Indent of lists. */\n 'list-indent': '1.5em',\n /** Color of links. */\n 'link-color': 'var(--panneau-color-link)',\n /** Font size of code, relative to the text around it. */\n 'code-font-size': '0.875em',\n /** Text color of code: inherited, so that a site's global `code` color doesn't apply. */\n 'code-color': 'inherit',\n /** Background of code and code blocks. */\n 'code-bg': 'var(--panneau-color-surface-sunken)',\n /** Corner radius of code and code blocks. */\n 'code-radius': 'var(--panneau-radius-sm)',\n /** Border of quotes. */\n 'quote-border-color': 'var(--panneau-color-border)',\n /** Text color of quotes and captions. */\n 'quote-color': 'var(--panneau-color-text-muted)',\n /** Color of the borders of tables and of horizontal rules. */\n 'border-color': 'var(--panneau-color-border)',\n});\n"],"mappings":";;;AAGA,
|
|
1
|
+
{"version":3,"file":"tokens.js","names":["defineComponentTokens","proseTokens","gap"],"sources":["../../src/prose/tokens.ts"],"sourcesContent":["import { defineComponentTokens } from '../theme/componentTokens';\n\n/** Tokens of Prose. Its headings use the tokens of Heading. */\nexport const proseTokens = defineComponentTokens('prose', {\n /** Line height of the content. */\n 'line-height': '1.6',\n /** Space between blocks: paragraphs, lists, tables. */\n gap: 'var(--panneau-space-4)',\n /** Space above a heading. */\n 'heading-gap': 'var(--panneau-space-6)',\n /** Indent of lists. */\n 'list-indent': '1.5em',\n /** Color of links. */\n 'link-color': 'var(--panneau-color-link)',\n /** Font size of code, relative to the text around it. */\n 'code-font-size': '0.875em',\n /** Text color of code: inherited, so that a site's global `code` color doesn't apply. */\n 'code-color': 'inherit',\n /** Background of code and code blocks. */\n 'code-bg': 'var(--panneau-color-surface-sunken)',\n /** Corner radius of code and code blocks. */\n 'code-radius': 'var(--panneau-radius-sm)',\n /** Border of quotes. */\n 'quote-border-color': 'var(--panneau-color-border)',\n /** Text color of quotes and captions. */\n 'quote-color': 'var(--panneau-color-text-muted)',\n /** Color of the borders of tables and of horizontal rules. */\n 'border-color': 'var(--panneau-color-border)',\n});\n"],"mappings":";;;AAGA,IAAaC,cAAcD,sBAAsB,SAAS;;CAEtD,eAAe;;CAEfE,KAAK;;CAEL,eAAe;;CAEf,eAAe;;CAEf,cAAc;;CAEd,kBAAkB;;CAElB,cAAc;;CAEd,WAAW;;CAEX,eAAe;;CAEf,sBAAsB;;CAEtB,eAAe;;CAEf,gBAAgB;AACpB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import { type RadioGroupProps as AriaRadioGroupProps } from 'react-aria-components';
|
|
3
|
-
import { type FieldChromeProps } from '../field/FieldParts';
|
|
4
|
-
import type { OptionValue, SelectOption } from '../select/Select';
|
|
3
|
+
import { type FieldChromeProps } from '../field/FieldParts.js';
|
|
4
|
+
import type { OptionValue, SelectOption } from '../select/Select.js';
|
|
5
5
|
/** An option of a `RadioGroup`: a `SelectOption`, with an optional leading media. */
|
|
6
6
|
export interface RadioGroupOption extends SelectOption {
|
|
7
7
|
/** Leading media, such as an avatar or an image, between the radio and the label. */
|
|
@@ -2,6 +2,7 @@ import { cx } from "../utils/cx.js";
|
|
|
2
2
|
import Field_module_default from "../field/Field.module.js";
|
|
3
3
|
import { FieldDescription, FieldErrors, FieldLabel } from "../field/FieldParts.js";
|
|
4
4
|
import RadioGroup_module_default from "./RadioGroup.module.js";
|
|
5
|
+
import { c } from "react/compiler-runtime";
|
|
5
6
|
import { Radio, RadioGroup } from "react-aria-components";
|
|
6
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
8
|
//#region src/radio-group/RadioGroup.tsx
|
|
@@ -9,72 +10,221 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
9
10
|
* A set of options where one can be picked, all visible at once, as a list of radios or as cards
|
|
10
11
|
* (`appearance="cards"`). Arrow keys move between options in both appearances.
|
|
11
12
|
*/
|
|
12
|
-
function RadioGroup$1(
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
]
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
13
|
+
function RadioGroup$1(t0) {
|
|
14
|
+
const $ = c(61);
|
|
15
|
+
let className;
|
|
16
|
+
let description;
|
|
17
|
+
let descriptionClassName;
|
|
18
|
+
let errorsClassName;
|
|
19
|
+
let isRequired;
|
|
20
|
+
let label;
|
|
21
|
+
let labelClassName;
|
|
22
|
+
let onChange;
|
|
23
|
+
let options;
|
|
24
|
+
let props;
|
|
25
|
+
let radioClassName;
|
|
26
|
+
let t1;
|
|
27
|
+
let t2;
|
|
28
|
+
let t3;
|
|
29
|
+
let t4;
|
|
30
|
+
let value;
|
|
31
|
+
if ($[0] !== t0) {
|
|
32
|
+
({options, value, onChange, label, description, errors: t1, orientation: t2, appearance: t3, columns: t4, isRequired, className, labelClassName, descriptionClassName, errorsClassName, radioClassName, ...props} = t0);
|
|
33
|
+
$[0] = t0;
|
|
34
|
+
$[1] = className;
|
|
35
|
+
$[2] = description;
|
|
36
|
+
$[3] = descriptionClassName;
|
|
37
|
+
$[4] = errorsClassName;
|
|
38
|
+
$[5] = isRequired;
|
|
39
|
+
$[6] = label;
|
|
40
|
+
$[7] = labelClassName;
|
|
41
|
+
$[8] = onChange;
|
|
42
|
+
$[9] = options;
|
|
43
|
+
$[10] = props;
|
|
44
|
+
$[11] = radioClassName;
|
|
45
|
+
$[12] = t1;
|
|
46
|
+
$[13] = t2;
|
|
47
|
+
$[14] = t3;
|
|
48
|
+
$[15] = t4;
|
|
49
|
+
$[16] = value;
|
|
50
|
+
} else {
|
|
51
|
+
className = $[1];
|
|
52
|
+
description = $[2];
|
|
53
|
+
descriptionClassName = $[3];
|
|
54
|
+
errorsClassName = $[4];
|
|
55
|
+
isRequired = $[5];
|
|
56
|
+
label = $[6];
|
|
57
|
+
labelClassName = $[7];
|
|
58
|
+
onChange = $[8];
|
|
59
|
+
options = $[9];
|
|
60
|
+
props = $[10];
|
|
61
|
+
radioClassName = $[11];
|
|
62
|
+
t1 = $[12];
|
|
63
|
+
t2 = $[13];
|
|
64
|
+
t3 = $[14];
|
|
65
|
+
t4 = $[15];
|
|
66
|
+
value = $[16];
|
|
67
|
+
}
|
|
68
|
+
let t5;
|
|
69
|
+
if ($[17] !== t1) {
|
|
70
|
+
t5 = t1 === void 0 ? [] : t1;
|
|
71
|
+
$[17] = t1;
|
|
72
|
+
$[18] = t5;
|
|
73
|
+
} else t5 = $[18];
|
|
74
|
+
const errors = t5;
|
|
75
|
+
const orientation = t2 === void 0 ? "vertical" : t2;
|
|
76
|
+
const appearance = t3 === void 0 ? "list" : t3;
|
|
77
|
+
const columns = t4 === void 0 ? 2 : t4;
|
|
78
|
+
let t6;
|
|
79
|
+
if ($[19] !== appearance || $[20] !== options || $[21] !== radioClassName) {
|
|
80
|
+
let t7;
|
|
81
|
+
if ($[23] !== appearance || $[24] !== radioClassName) {
|
|
82
|
+
t7 = (option, position) => /* @__PURE__ */ jsxs(Radio, {
|
|
83
|
+
value: String(position),
|
|
84
|
+
isDisabled: option.disabled,
|
|
85
|
+
className: cx("panneau-radio", RadioGroup_module_default.radio, appearance === "cards" && RadioGroup_module_default.card, radioClassName),
|
|
86
|
+
children: [
|
|
87
|
+
/* @__PURE__ */ jsx("span", {
|
|
88
|
+
className: RadioGroup_module_default.circle,
|
|
89
|
+
"aria-hidden": "true"
|
|
90
|
+
}),
|
|
91
|
+
option.media !== void 0 && option.media !== null ? /* @__PURE__ */ jsx("span", {
|
|
92
|
+
className: RadioGroup_module_default.media,
|
|
93
|
+
children: option.media
|
|
94
|
+
}) : null,
|
|
95
|
+
/* @__PURE__ */ jsxs("span", {
|
|
96
|
+
className: RadioGroup_module_default.text,
|
|
97
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
98
|
+
className: RadioGroup_module_default.optionLabel,
|
|
99
|
+
children: option.label
|
|
100
|
+
}), option.description !== void 0 ? /* @__PURE__ */ jsx("span", {
|
|
101
|
+
className: RadioGroup_module_default.description,
|
|
102
|
+
children: option.description
|
|
103
|
+
}) : null]
|
|
104
|
+
})
|
|
105
|
+
]
|
|
106
|
+
}, position);
|
|
107
|
+
$[23] = appearance;
|
|
108
|
+
$[24] = radioClassName;
|
|
109
|
+
$[25] = t7;
|
|
110
|
+
} else t7 = $[25];
|
|
111
|
+
t6 = options.map(t7);
|
|
112
|
+
$[19] = appearance;
|
|
113
|
+
$[20] = options;
|
|
114
|
+
$[21] = radioClassName;
|
|
115
|
+
$[22] = t6;
|
|
116
|
+
} else t6 = $[22];
|
|
117
|
+
const radios = t6;
|
|
118
|
+
let t7;
|
|
119
|
+
if ($[26] !== options || $[27] !== value) {
|
|
120
|
+
t7 = value === void 0 ? void 0 : options.findIndex((o) => o.value === value);
|
|
121
|
+
$[26] = options;
|
|
122
|
+
$[27] = value;
|
|
123
|
+
$[28] = t7;
|
|
124
|
+
} else t7 = $[28];
|
|
125
|
+
const index = t7;
|
|
126
|
+
const t8 = index === void 0 ? void 0 : index === -1 ? null : String(index);
|
|
127
|
+
let t9;
|
|
128
|
+
if ($[29] !== onChange || $[30] !== options) {
|
|
129
|
+
t9 = (key) => {
|
|
45
130
|
const option_0 = options[Number(key)];
|
|
46
131
|
if (option_0 !== void 0) onChange?.(option_0.value);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
132
|
+
};
|
|
133
|
+
$[29] = onChange;
|
|
134
|
+
$[30] = options;
|
|
135
|
+
$[31] = t9;
|
|
136
|
+
} else t9 = $[31];
|
|
137
|
+
const t10 = errors.length > 0;
|
|
138
|
+
const t11 = appearance === "cards" ? RadioGroup_module_default.cards : orientation === "horizontal" && RadioGroup_module_default.horizontal;
|
|
139
|
+
let t12;
|
|
140
|
+
if ($[32] !== className || $[33] !== t11) {
|
|
141
|
+
t12 = cx("panneau-radio-group", Field_module_default.field, t11, className);
|
|
142
|
+
$[32] = className;
|
|
143
|
+
$[33] = t11;
|
|
144
|
+
$[34] = t12;
|
|
145
|
+
} else t12 = $[34];
|
|
146
|
+
let t13;
|
|
147
|
+
if ($[35] !== isRequired || $[36] !== label || $[37] !== labelClassName) {
|
|
148
|
+
t13 = /* @__PURE__ */ jsx(FieldLabel, {
|
|
149
|
+
isRequired,
|
|
150
|
+
className: labelClassName,
|
|
151
|
+
children: label
|
|
152
|
+
});
|
|
153
|
+
$[35] = isRequired;
|
|
154
|
+
$[36] = label;
|
|
155
|
+
$[37] = labelClassName;
|
|
156
|
+
$[38] = t13;
|
|
157
|
+
} else t13 = $[38];
|
|
158
|
+
let t14;
|
|
159
|
+
if ($[39] !== appearance || $[40] !== columns || $[41] !== radios) {
|
|
160
|
+
t14 = appearance === "cards" ? /* @__PURE__ */ jsx("div", {
|
|
161
|
+
className: RadioGroup_module_default.grid,
|
|
162
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
65
163
|
className: RadioGroup_module_default.options,
|
|
164
|
+
style: { "--_panneau-radio-group-columns": String(Math.max(1, Math.floor(columns))) },
|
|
66
165
|
children: radios
|
|
67
|
-
}),
|
|
68
|
-
/* @__PURE__ */ jsx(FieldDescription, {
|
|
69
|
-
className: descriptionClassName,
|
|
70
|
-
children: description
|
|
71
|
-
}),
|
|
72
|
-
/* @__PURE__ */ jsx(FieldErrors, {
|
|
73
|
-
errors,
|
|
74
|
-
className: errorsClassName
|
|
75
166
|
})
|
|
76
|
-
|
|
77
|
-
|
|
167
|
+
}) : /* @__PURE__ */ jsx("div", {
|
|
168
|
+
className: RadioGroup_module_default.options,
|
|
169
|
+
children: radios
|
|
170
|
+
});
|
|
171
|
+
$[39] = appearance;
|
|
172
|
+
$[40] = columns;
|
|
173
|
+
$[41] = radios;
|
|
174
|
+
$[42] = t14;
|
|
175
|
+
} else t14 = $[42];
|
|
176
|
+
let t15;
|
|
177
|
+
if ($[43] !== description || $[44] !== descriptionClassName) {
|
|
178
|
+
t15 = /* @__PURE__ */ jsx(FieldDescription, {
|
|
179
|
+
className: descriptionClassName,
|
|
180
|
+
children: description
|
|
181
|
+
});
|
|
182
|
+
$[43] = description;
|
|
183
|
+
$[44] = descriptionClassName;
|
|
184
|
+
$[45] = t15;
|
|
185
|
+
} else t15 = $[45];
|
|
186
|
+
let t16;
|
|
187
|
+
if ($[46] !== errors || $[47] !== errorsClassName) {
|
|
188
|
+
t16 = /* @__PURE__ */ jsx(FieldErrors, {
|
|
189
|
+
errors,
|
|
190
|
+
className: errorsClassName
|
|
191
|
+
});
|
|
192
|
+
$[46] = errors;
|
|
193
|
+
$[47] = errorsClassName;
|
|
194
|
+
$[48] = t16;
|
|
195
|
+
} else t16 = $[48];
|
|
196
|
+
let t17;
|
|
197
|
+
if ($[49] !== isRequired || $[50] !== orientation || $[51] !== props || $[52] !== t10 || $[53] !== t12 || $[54] !== t13 || $[55] !== t14 || $[56] !== t15 || $[57] !== t16 || $[58] !== t8 || $[59] !== t9) {
|
|
198
|
+
t17 = /* @__PURE__ */ jsxs(RadioGroup, {
|
|
199
|
+
...props,
|
|
200
|
+
orientation,
|
|
201
|
+
isRequired,
|
|
202
|
+
value: t8,
|
|
203
|
+
onChange: t9,
|
|
204
|
+
isInvalid: t10,
|
|
205
|
+
validationBehavior: "aria",
|
|
206
|
+
className: t12,
|
|
207
|
+
children: [
|
|
208
|
+
t13,
|
|
209
|
+
t14,
|
|
210
|
+
t15,
|
|
211
|
+
t16
|
|
212
|
+
]
|
|
213
|
+
});
|
|
214
|
+
$[49] = isRequired;
|
|
215
|
+
$[50] = orientation;
|
|
216
|
+
$[51] = props;
|
|
217
|
+
$[52] = t10;
|
|
218
|
+
$[53] = t12;
|
|
219
|
+
$[54] = t13;
|
|
220
|
+
$[55] = t14;
|
|
221
|
+
$[56] = t15;
|
|
222
|
+
$[57] = t16;
|
|
223
|
+
$[58] = t8;
|
|
224
|
+
$[59] = t9;
|
|
225
|
+
$[60] = t17;
|
|
226
|
+
} else t17 = $[60];
|
|
227
|
+
return t17;
|
|
78
228
|
}
|
|
79
229
|
//#endregion
|
|
80
230
|
export { RadioGroup$1 as RadioGroup };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroup.js","names":["option","RadioGroup","styles","AriaRadioGroup","fieldStyles"],"sources":["../../src/radio-group/RadioGroup.tsx"],"sourcesContent":["import type { CSSProperties, ReactNode } from 'react';\nimport {\n RadioGroup as AriaRadioGroup,\n type RadioGroupProps as AriaRadioGroupProps,\n Radio,\n} from 'react-aria-components';\n\nimport {\n type FieldChromeProps,\n FieldDescription,\n FieldErrors,\n FieldLabel,\n fieldStyles,\n} from '../field/FieldParts';\nimport type { OptionValue, SelectOption } from '../select/Select';\nimport { cx } from '../utils/cx';\nimport styles from './RadioGroup.module.css';\n\n/** An option of a `RadioGroup`: a `SelectOption`, with an optional leading media. */\nexport interface RadioGroupOption extends SelectOption {\n /** Leading media, such as an avatar or an image, between the radio and the label. */\n media?: ReactNode;\n}\n\n/** How a `RadioGroup` shows its options: a list of radios, or bordered cards in a grid. */\nexport type RadioGroupAppearance = 'list' | 'cards';\n\nexport interface RadioGroupProps\n extends\n Omit<\n AriaRadioGroupProps,\n | 'className'\n | 'style'\n | 'children'\n | 'isInvalid'\n | 'validate'\n | 'value'\n | 'defaultValue'\n | 'onChange'\n >,\n FieldChromeProps {\n options: readonly RadioGroupOption[];\n value?: OptionValue | null;\n onChange?: (value: OptionValue) => void;\n /**\n * `list` (default) shows the options as radios, one under the other or side by side with\n * `orientation=\"horizontal\"`. `cards` shows them as bordered cards in a grid of `columns`, which\n * becomes a single column in a narrow container. The selected card has a stronger border.\n */\n appearance?: RadioGroupAppearance;\n /** Columns of cards, with `appearance=\"cards\"`. Defaults to 2. */\n columns?: number;\n radioClassName?: string;\n}\n\n/**\n * A set of options where one can be picked, all visible at once, as a list of radios or as cards\n * (`appearance=\"cards\"`). Arrow keys move between options in both appearances.\n */\nexport function RadioGroup({\n options,\n value,\n onChange,\n label,\n description,\n errors = [],\n orientation = 'vertical',\n appearance = 'list',\n columns = 2,\n isRequired,\n className,\n labelClassName,\n descriptionClassName,\n errorsClassName,\n radioClassName,\n ...props\n}: RadioGroupProps) {\n const radios = options.map((option, position) => (\n <Radio\n key={position}\n value={String(position)}\n isDisabled={option.disabled}\n className={cx(\n 'panneau-radio',\n styles.radio,\n appearance === 'cards' && styles.card,\n radioClassName,\n )}\n >\n <span className={styles.circle} aria-hidden=\"true\" />\n {option.media !== undefined && option.media !== null ? (\n <span className={styles.media}>{option.media}</span>\n ) : null}\n <span className={styles.text}>\n <span className={styles.optionLabel}>{option.label}</span>\n {option.description !== undefined ? (\n <span className={styles.description}>{option.description}</span>\n ) : null}\n </span>\n </Radio>\n ));\n const index = value === undefined ? undefined : options.findIndex((o) => o.value === value);\n return (\n <AriaRadioGroup\n {...props}\n orientation={orientation}\n isRequired={isRequired}\n value={index === undefined ? undefined : index === -1 ? null : String(index)}\n onChange={(key) => {\n const option = options[Number(key)];\n if (option !== undefined) {\n onChange?.(option.value);\n }\n }}\n isInvalid={errors.length > 0}\n validationBehavior=\"aria\"\n className={cx(\n 'panneau-radio-group',\n fieldStyles.field,\n appearance === 'cards'\n ? styles.cards\n : orientation === 'horizontal' && styles.horizontal,\n className,\n )}\n >\n <FieldLabel isRequired={isRequired} className={labelClassName}>\n {label}\n </FieldLabel>\n {appearance === 'cards' ? (\n <div className={styles.grid}>\n <div\n className={styles.options}\n style={\n {\n '--_panneau-radio-group-columns': String(\n Math.max(1, Math.floor(columns)),\n ),\n } as CSSProperties\n }\n >\n {radios}\n </div>\n </div>\n ) : (\n <div className={styles.options}>{radios}</div>\n )}\n <FieldDescription className={descriptionClassName}>{description}</FieldDescription>\n <FieldErrors errors={errors} className={errorsClassName} />\n </AriaRadioGroup>\n );\n}\n"],"mappings":";;;;;;;;;;;AA2DA,SAAgBC,aAAW,EACvB,SACA,OACA,UACA,OACA,aACA,SAAS,CAAA,GACT,cAAc,YACd,aAAa,QACb,UAAU,GACV,YACA,WACA,gBACA,sBACA,iBACA,gBACA,GAAG,SACa;CAChB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KACI,WAAWA,0BAAO;KAClB,OACI,EACI,kCAAkC,OAC9B,KAAK,IAAI,GAAG,KAAK,MAAM,OAAO,CAAC,CACnC,EACJ;KAGH,UAAA;IACA,CAAA;GACJ,CAAA,IAEL,oBAAC,OAAD;IAAK,WAAWA,0BAAO;IAAU,UAAA;GAAY,CAAA;GAEjD,oBAAC,kBAAD;IAAkB,WAAW;IAAuB,UAAA;GAA8B,CAAA;GAClF,oBAAC,aAAD;IAAqB;IAAQ,WAAW;GAAgB,CAAA;EAC5C;;AAExB"}
|
|
1
|
+
{"version":3,"file":"RadioGroup.js","names":["CSSProperties","ReactNode","RadioGroup","AriaRadioGroup","RadioGroupProps","AriaRadioGroupProps","Radio","FieldChromeProps","FieldDescription","FieldErrors","FieldLabel","fieldStyles","OptionValue","SelectOption","cx","styles","RadioGroupOption","media","RadioGroupAppearance","Omit","options","value","onChange","appearance","columns","radioClassName","t0","$","_c","className","description","descriptionClassName","errorsClassName","isRequired","label","labelClassName","props","t1","t2","t3","t4","errors","orientation","t5","undefined","t6","t7","option","position","String","disabled","radio","card","circle","text","optionLabel","map","radios","findIndex","o","index","t8","t9","key","option_0","Number","t10","length","t11","cards","horizontal","t12","field","t13","t14","grid","Math","max","floor","t15","t16","t17","RadioGroup","_c","styles","fieldStyles","AriaRadioGroup"],"sources":["../../src/radio-group/RadioGroup.tsx"],"sourcesContent":["import type { CSSProperties, ReactNode } from 'react';\nimport {\n RadioGroup as AriaRadioGroup,\n type RadioGroupProps as AriaRadioGroupProps,\n Radio,\n} from 'react-aria-components';\n\nimport {\n type FieldChromeProps,\n FieldDescription,\n FieldErrors,\n FieldLabel,\n fieldStyles,\n} from '../field/FieldParts';\nimport type { OptionValue, SelectOption } from '../select/Select';\nimport { cx } from '../utils/cx';\nimport styles from './RadioGroup.module.css';\n\n/** An option of a `RadioGroup`: a `SelectOption`, with an optional leading media. */\nexport interface RadioGroupOption extends SelectOption {\n /** Leading media, such as an avatar or an image, between the radio and the label. */\n media?: ReactNode;\n}\n\n/** How a `RadioGroup` shows its options: a list of radios, or bordered cards in a grid. */\nexport type RadioGroupAppearance = 'list' | 'cards';\n\nexport interface RadioGroupProps\n extends\n Omit<\n AriaRadioGroupProps,\n | 'className'\n | 'style'\n | 'children'\n | 'isInvalid'\n | 'validate'\n | 'value'\n | 'defaultValue'\n | 'onChange'\n >,\n FieldChromeProps {\n options: readonly RadioGroupOption[];\n value?: OptionValue | null;\n onChange?: (value: OptionValue) => void;\n /**\n * `list` (default) shows the options as radios, one under the other or side by side with\n * `orientation=\"horizontal\"`. `cards` shows them as bordered cards in a grid of `columns`, which\n * becomes a single column in a narrow container. The selected card has a stronger border.\n */\n appearance?: RadioGroupAppearance;\n /** Columns of cards, with `appearance=\"cards\"`. Defaults to 2. */\n columns?: number;\n radioClassName?: string;\n}\n\n/**\n * A set of options where one can be picked, all visible at once, as a list of radios or as cards\n * (`appearance=\"cards\"`). Arrow keys move between options in both appearances.\n */\nexport function RadioGroup({\n options,\n value,\n onChange,\n label,\n description,\n errors = [],\n orientation = 'vertical',\n appearance = 'list',\n columns = 2,\n isRequired,\n className,\n labelClassName,\n descriptionClassName,\n errorsClassName,\n radioClassName,\n ...props\n}: RadioGroupProps) {\n const radios = options.map((option, position) => (\n <Radio\n key={position}\n value={String(position)}\n isDisabled={option.disabled}\n className={cx(\n 'panneau-radio',\n styles.radio,\n appearance === 'cards' && styles.card,\n radioClassName,\n )}\n >\n <span className={styles.circle} aria-hidden=\"true\" />\n {option.media !== undefined && option.media !== null ? (\n <span className={styles.media}>{option.media}</span>\n ) : null}\n <span className={styles.text}>\n <span className={styles.optionLabel}>{option.label}</span>\n {option.description !== undefined ? (\n <span className={styles.description}>{option.description}</span>\n ) : null}\n </span>\n </Radio>\n ));\n const index = value === undefined ? undefined : options.findIndex((o) => o.value === value);\n return (\n <AriaRadioGroup\n {...props}\n orientation={orientation}\n isRequired={isRequired}\n value={index === undefined ? undefined : index === -1 ? null : String(index)}\n onChange={(key) => {\n const option = options[Number(key)];\n if (option !== undefined) {\n onChange?.(option.value);\n }\n }}\n isInvalid={errors.length > 0}\n validationBehavior=\"aria\"\n className={cx(\n 'panneau-radio-group',\n fieldStyles.field,\n appearance === 'cards'\n ? styles.cards\n : orientation === 'horizontal' && styles.horizontal,\n className,\n )}\n >\n <FieldLabel isRequired={isRequired} className={labelClassName}>\n {label}\n </FieldLabel>\n {appearance === 'cards' ? (\n <div className={styles.grid}>\n <div\n className={styles.options}\n style={\n {\n '--_panneau-radio-group-columns': String(\n Math.max(1, Math.floor(columns)),\n ),\n } as CSSProperties\n }\n >\n {radios}\n </div>\n </div>\n ) : (\n <div className={styles.options}>{radios}</div>\n )}\n <FieldDescription className={descriptionClassName}>{description}</FieldDescription>\n <FieldErrors errors={errors} className={errorsClassName} />\n </AriaRadioGroup>\n );\n}\n"],"mappings":";;;;;;;;;;;;AA2DA,SAAOE,aAAAwB,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAb;CAAA,IAAAF;CAAA,IAAAgB;CAAA,IAAAX;CAAA,IAAAY;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAnB;CAAA,IAAAM,EAAA,OAAAD,IAAA;EAAoB,CAAA,CAAAN,SAAAC,OAAAC,UAAAY,OAAAJ,aAAAW,QAAAJ,IAAAK,aAAAJ,IAAAf,YAAAgB,IAAAf,SAAAgB,IAAAP,YAAAJ,WAAAM,gBAAAJ,sBAAAC,iBAAAP,gBAAA,GAAAW,SAAAV;EAiBTC,EAAA,KAAAD;EAAAC,EAAA,KAAAE;EAAAF,EAAA,KAAAG;EAAAH,EAAA,KAAAI;EAAAJ,EAAA,KAAAK;EAAAL,EAAA,KAAAM;EAAAN,EAAA,KAAAO;EAAAP,EAAA,KAAAQ;EAAAR,EAAA,KAAAL;EAAAK,EAAA,KAAAP;E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A,OA7CjBsD;AA6CiB"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/** Tokens of RadioGroup: its radios, the media of its options, and its cards. */
|
|
2
|
-
export declare const radioTokens: import("
|
|
2
|
+
export declare const radioTokens: import("../index.js").ComponentTokens<"radio", "panneau-radio-size" | "panneau-radio-bg" | "panneau-radio-border-color" | "panneau-radio-checked-color" | "panneau-radio-media-size" | "panneau-radio-media-radius" | "panneau-radio-checked-border-width" | "panneau-radio-card-gap" | "panneau-radio-card-padding" | "panneau-radio-card-bg" | "panneau-radio-card-border-color" | "panneau-radio-card-border-color-hover" | "panneau-radio-card-border-color-selected" | "panneau-radio-card-radius" | "panneau-radio-card-label-font-weight">;
|
|
3
3
|
//# sourceMappingURL=tokens.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.js","names":[],"sources":["../../src/radio-group/tokens.ts"],"sourcesContent":["import { defineComponentTokens } from '../theme/componentTokens';\n\n/** Tokens of RadioGroup: its radios, the media of its options, and its cards. */\nexport const radioTokens = defineComponentTokens('radio', {\n /** Size of the circle. */\n size: '1.125rem',\n /** Background of the circle. */\n bg: 'var(--panneau-color-surface)',\n /** Border color of the circle. */\n 'border-color': 'var(--panneau-color-border-control)',\n /** Color of a selected circle. */\n 'checked-color': 'var(--panneau-color-accent)',\n /** Border width of a selected circle, which draws the dot. */\n 'checked-border-width': '0.3125rem',\n /** Size of the leading media of an option. */\n 'media-size': '2rem',\n /** Corner radius of the leading media of an option: its content is clipped to it. */\n 'media-radius': 'var(--panneau-radius-full)',\n /** Space between the cards, with `appearance=\"cards\"`. */\n 'card-gap': 'var(--panneau-space-2)',\n /** Padding of a card. */\n 'card-padding': 'var(--panneau-space-3)',\n /** Background of a card. */\n 'card-bg': 'var(--panneau-color-surface)',\n /** Border color of a card. */\n 'card-border-color': 'var(--panneau-color-border)',\n /** Border color of a hovered card. */\n 'card-border-color-hover': 'var(--panneau-color-border-control)',\n /** Border color of the selected card, which is twice as wide. */\n 'card-border-color-selected': 'var(--panneau-color-accent)',\n /** Corner radius of a card. */\n 'card-radius': 'var(--panneau-radius-md)',\n /** Font weight of the label of a card. */\n 'card-label-font-weight': 'var(--panneau-font-weight-medium)',\n});\n"],"mappings":";;;AAGA,
|
|
1
|
+
{"version":3,"file":"tokens.js","names":["defineComponentTokens","radioTokens","size","bg"],"sources":["../../src/radio-group/tokens.ts"],"sourcesContent":["import { defineComponentTokens } from '../theme/componentTokens';\n\n/** Tokens of RadioGroup: its radios, the media of its options, and its cards. */\nexport const radioTokens = defineComponentTokens('radio', {\n /** Size of the circle. */\n size: '1.125rem',\n /** Background of the circle. */\n bg: 'var(--panneau-color-surface)',\n /** Border color of the circle. */\n 'border-color': 'var(--panneau-color-border-control)',\n /** Color of a selected circle. */\n 'checked-color': 'var(--panneau-color-accent)',\n /** Border width of a selected circle, which draws the dot. */\n 'checked-border-width': '0.3125rem',\n /** Size of the leading media of an option. */\n 'media-size': '2rem',\n /** Corner radius of the leading media of an option: its content is clipped to it. */\n 'media-radius': 'var(--panneau-radius-full)',\n /** Space between the cards, with `appearance=\"cards\"`. */\n 'card-gap': 'var(--panneau-space-2)',\n /** Padding of a card. */\n 'card-padding': 'var(--panneau-space-3)',\n /** Background of a card. */\n 'card-bg': 'var(--panneau-color-surface)',\n /** Border color of a card. */\n 'card-border-color': 'var(--panneau-color-border)',\n /** Border color of a hovered card. */\n 'card-border-color-hover': 'var(--panneau-color-border-control)',\n /** Border color of the selected card, which is twice as wide. */\n 'card-border-color-selected': 'var(--panneau-color-accent)',\n /** Corner radius of a card. */\n 'card-radius': 'var(--panneau-radius-md)',\n /** Font weight of the label of a card. */\n 'card-label-font-weight': 'var(--panneau-font-weight-medium)',\n});\n"],"mappings":";;;AAGA,IAAaC,cAAcD,sBAAsB,SAAS;;CAEtDE,MAAM;;CAENC,IAAI;;CAEJ,gBAAgB;;CAEhB,iBAAiB;;CAEjB,wBAAwB;;CAExB,cAAc;;CAEd,gBAAgB;;CAEhB,YAAY;;CAEZ,gBAAgB;;CAEhB,WAAW;;CAEX,qBAAqB;;CAErB,2BAA2B;;CAE3B,8BAA8B;;CAE9B,eAAe;;CAEf,0BAA0B;AAC9B,CAAC"}
|