@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
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export { Alert, type AlertProps, type AlertTone } from './alert/Alert';
|
|
2
|
+
export { Badge, type BadgeProps, type BadgeTone } from './badge/Badge';
|
|
3
|
+
export { Button, type ButtonProps, type ButtonVariant } from './button/Button';
|
|
4
|
+
export { Card, type CardProps } from './card/Card';
|
|
5
|
+
export { Checkbox, type CheckboxProps } from './checkbox/Checkbox';
|
|
6
|
+
export { type ChoiceChromeProps } from './checkbox/ChoiceChrome';
|
|
7
|
+
export { ComboBox, type ComboBoxItem, type ComboBoxProps } from './combo-box/ComboBox';
|
|
8
|
+
export { DatePicker, type DatePickerProps } from './date-picker/DatePicker';
|
|
9
|
+
export { Dialog, type DialogProps, DialogTrigger } from './dialog/Dialog';
|
|
10
|
+
export { Disclosure, type DisclosureProps } from './disclosure/Disclosure';
|
|
11
|
+
export { type FieldChromeProps } from './field/FieldParts';
|
|
12
|
+
export { Fieldset, type FieldsetProps } from './field/Fieldset';
|
|
13
|
+
export { Icon, type IconComponent, type IconProps, type IconSize } from './icon/Icon';
|
|
14
|
+
export { IconButton, type IconButtonProps } from './icon-button/IconButton';
|
|
15
|
+
export { usePanneauIntl } from './intl/usePanneauIntl';
|
|
16
|
+
export { Menu, MenuItem, type MenuItemProps, type MenuProps, MenuSeparator, MenuTrigger, } from './menu/Menu';
|
|
17
|
+
export { NumberInput, type NumberInputProps } from './number-input/NumberInput';
|
|
18
|
+
export { Popover, type PopoverProps, PopoverTrigger } from './popover/Popover';
|
|
19
|
+
export { RadioGroup, type RadioGroupProps } from './radio-group/RadioGroup';
|
|
20
|
+
export { PanneauRoot, type PanneauRootProps, usePortalContainer } from './root/PanneauRoot';
|
|
21
|
+
export { type MultipleSelectProps, type OptionValue, Select, type SelectBaseProps, type SelectOption, type SelectProps, type SingleSelectProps, } from './select/Select';
|
|
22
|
+
export { Spinner, type SpinnerProps } from './spinner/Spinner';
|
|
23
|
+
export { Switch, type SwitchProps } from './switch/Switch';
|
|
24
|
+
export { Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, Tabs, type TabsProps, } from './tabs/Tabs';
|
|
25
|
+
export { TextArea, type TextAreaProps } from './text-area/TextArea';
|
|
26
|
+
export { TextInput, type TextInputProps } from './text-input/TextInput';
|
|
27
|
+
export { bootstrapTheme } from './theme/bootstrap';
|
|
28
|
+
export { type ColorScheme, type Theme } from './theme/theme';
|
|
29
|
+
export { TimeInput, type TimeInputProps } from './time-input/TimeInput';
|
|
30
|
+
export { type ToastContent, type ToastOptions, type ToastTone, type Toasts, useToast, } from './toast/Toast';
|
|
31
|
+
export { Tooltip, type TooltipProps } from './tooltip/Tooltip';
|
|
32
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC/E,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,KAAK,YAAY,EAAE,KAAK,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACvF,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AACtF,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EACH,IAAI,EACJ,QAAQ,EACR,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,aAAa,EACb,WAAW,GACd,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAChF,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAC/E,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC5F,OAAO,EACH,KAAK,mBAAmB,EACxB,KAAK,WAAW,EAChB,MAAM,EACN,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,iBAAiB,GACzB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EACH,GAAG,EACH,OAAO,EACP,KAAK,YAAY,EACjB,QAAQ,EACR,KAAK,aAAa,EAClB,KAAK,QAAQ,EACb,IAAI,EACJ,KAAK,SAAS,GACjB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,KAAK,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EACH,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,MAAM,EACX,QAAQ,GACX,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Icon } from "./icon/Icon.js";
|
|
2
|
+
import { usePanneauIntl } from "./intl/usePanneauIntl.js";
|
|
3
|
+
import { Spinner } from "./spinner/Spinner.js";
|
|
4
|
+
import { Button } from "./button/Button.js";
|
|
5
|
+
import { useToast } from "./toast/Toast.js";
|
|
6
|
+
import { PanneauRoot, usePortalContainer } from "./root/PanneauRoot.js";
|
|
7
|
+
import { Tooltip } from "./tooltip/Tooltip.js";
|
|
8
|
+
import { IconButton } from "./icon-button/IconButton.js";
|
|
9
|
+
import { Alert } from "./alert/Alert.js";
|
|
10
|
+
import { Badge } from "./badge/Badge.js";
|
|
11
|
+
import { Card } from "./card/Card.js";
|
|
12
|
+
import { Checkbox } from "./checkbox/Checkbox.js";
|
|
13
|
+
import { Popover, PopoverTrigger } from "./popover/Popover.js";
|
|
14
|
+
import { ComboBox } from "./combo-box/ComboBox.js";
|
|
15
|
+
import { DatePicker } from "./date-picker/DatePicker.js";
|
|
16
|
+
import { Dialog, DialogTrigger } from "./dialog/Dialog.js";
|
|
17
|
+
import { Disclosure } from "./disclosure/Disclosure.js";
|
|
18
|
+
import { Fieldset } from "./field/Fieldset.js";
|
|
19
|
+
import { Menu, MenuItem, MenuSeparator, MenuTrigger } from "./menu/Menu.js";
|
|
20
|
+
import { NumberInput } from "./number-input/NumberInput.js";
|
|
21
|
+
import { RadioGroup } from "./radio-group/RadioGroup.js";
|
|
22
|
+
import { Select } from "./select/Select.js";
|
|
23
|
+
import { Switch } from "./switch/Switch.js";
|
|
24
|
+
import { Tab, TabList, TabPanel, Tabs } from "./tabs/Tabs.js";
|
|
25
|
+
import { TextArea } from "./text-area/TextArea.js";
|
|
26
|
+
import { TextInput } from "./text-input/TextInput.js";
|
|
27
|
+
import { bootstrapTheme } from "./theme/bootstrap.js";
|
|
28
|
+
import { TimeInput } from "./time-input/TimeInput.js";
|
|
29
|
+
export { Alert, Badge, Button, Card, Checkbox, ComboBox, DatePicker, Dialog, DialogTrigger, Disclosure, Fieldset, Icon, IconButton, Menu, MenuItem, MenuSeparator, MenuTrigger, NumberInput, PanneauRoot, Popover, PopoverTrigger, RadioGroup, Select, Spinner, Switch, Tab, TabList, TabPanel, Tabs, TextArea, TextInput, TimeInput, Tooltip, bootstrapTheme, usePanneauIntl, usePortalContainer, useToast };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/intl/messages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { uiMessages as messages } from "@panneau/intl";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type IntlShape } from 'react-intl';
|
|
2
|
+
/**
|
|
3
|
+
* The react-intl object of the closest `IntlProvider`. Without a provider, an English one with the
|
|
4
|
+
* default messages, so that Panneau components also render outside of an internationalized app.
|
|
5
|
+
*/
|
|
6
|
+
export declare function usePanneauIntl(): IntlShape;
|
|
7
|
+
//# sourceMappingURL=usePanneauIntl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePanneauIntl.d.ts","sourceRoot":"","sources":["../../src/intl/usePanneauIntl.ts"],"names":[],"mappings":"AACA,OAAO,EAAe,KAAK,SAAS,EAA+B,MAAM,YAAY,CAAC;AAItF;;;GAGG;AACH,wBAAgB,cAAc,IAAI,SAAS,CAO1C"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { use } from "react";
|
|
2
|
+
import { IntlContext, createIntl, createIntlCache } from "react-intl";
|
|
3
|
+
//#region src/intl/usePanneauIntl.ts
|
|
4
|
+
var fallback = null;
|
|
5
|
+
/**
|
|
6
|
+
* The react-intl object of the closest `IntlProvider`. Without a provider, an English one with the
|
|
7
|
+
* default messages, so that Panneau components also render outside of an internationalized app.
|
|
8
|
+
*/
|
|
9
|
+
function usePanneauIntl() {
|
|
10
|
+
const intl = use(IntlContext);
|
|
11
|
+
if (intl !== null && intl !== void 0) return intl;
|
|
12
|
+
fallback ??= createIntl({
|
|
13
|
+
locale: "en",
|
|
14
|
+
defaultLocale: "en",
|
|
15
|
+
messages: {}
|
|
16
|
+
}, createIntlCache());
|
|
17
|
+
return fallback;
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { usePanneauIntl };
|
|
21
|
+
|
|
22
|
+
//# sourceMappingURL=usePanneauIntl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePanneauIntl.js","names":[],"sources":["../../src/intl/usePanneauIntl.ts"],"sourcesContent":["import { use } from 'react';\nimport { IntlContext, type IntlShape, createIntl, createIntlCache } from 'react-intl';\n\nlet fallback: IntlShape | null = null;\n\n/**\n * The react-intl object of the closest `IntlProvider`. Without a provider, an English one with the\n * default messages, so that Panneau components also render outside of an internationalized app.\n */\nexport function usePanneauIntl(): IntlShape {\n const intl = use(IntlContext) as IntlShape | null | undefined;\n if (intl !== null && intl !== undefined) {\n return intl;\n }\n fallback ??= createIntl({ locale: 'en', defaultLocale: 'en', messages: {} }, createIntlCache());\n return fallback;\n}\n"],"mappings":";;;AAGA,IAAI,WAA6B;;;;;AAMjC,SAAgB,iBAA4B;CACxC,MAAM,OAAO,IAAI,WAAW;CAC5B,IAAI,SAAS,QAAQ,SAAS,KAAA,GAC1B,OAAO;CAEX,aAAa,WAAW;EAAE,QAAQ;EAAM,eAAe;EAAM,UAAU,CAAC;CAAE,GAAG,gBAAgB,CAAC;CAC9F,OAAO;AACX"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The English messages of `@panneau/ui`, by id. They are also the default messages.
|
|
3
|
+
*
|
|
4
|
+
* @deprecated Use `en`, or `withPanneauMessages()`, from `@panneau/intl`: they have the messages
|
|
5
|
+
* of every package.
|
|
6
|
+
*/
|
|
7
|
+
export declare const en: Record<string, string>;
|
|
8
|
+
/**
|
|
9
|
+
* The French messages of `@panneau/ui`, by id.
|
|
10
|
+
*
|
|
11
|
+
* @deprecated Use `fr`, or `withPanneauMessages()`, from `@panneau/intl`: they have the messages
|
|
12
|
+
* of every package.
|
|
13
|
+
*/
|
|
14
|
+
export declare const fr: Record<string, string>;
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/locales/index.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAgC,CAAC;AAEvE;;;;;GAKG;AACH,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAErC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { messages } from "../intl/messages.js";
|
|
2
|
+
import { fr as fr$1, getDefaultMessages } from "@panneau/intl";
|
|
3
|
+
//#region src/locales/index.ts
|
|
4
|
+
/**
|
|
5
|
+
* The English messages of `@panneau/ui`, by id. They are also the default messages.
|
|
6
|
+
*
|
|
7
|
+
* @deprecated Use `en`, or `withPanneauMessages()`, from `@panneau/intl`: they have the messages
|
|
8
|
+
* of every package.
|
|
9
|
+
*/
|
|
10
|
+
var en = getDefaultMessages(messages);
|
|
11
|
+
/**
|
|
12
|
+
* The French messages of `@panneau/ui`, by id.
|
|
13
|
+
*
|
|
14
|
+
* @deprecated Use `fr`, or `withPanneauMessages()`, from `@panneau/intl`: they have the messages
|
|
15
|
+
* of every package.
|
|
16
|
+
*/
|
|
17
|
+
var fr = Object.fromEntries(Object.entries(fr$1).filter(([id]) => id in en));
|
|
18
|
+
//#endregion
|
|
19
|
+
export { en, fr };
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["allFr"],"sources":["../../src/locales/index.ts"],"sourcesContent":["import { fr as allFr, getDefaultMessages } from '@panneau/intl';\n\nimport { messages } from '../intl/messages';\n\n/**\n * The English messages of `@panneau/ui`, by id. They are also the default messages.\n *\n * @deprecated Use `en`, or `withPanneauMessages()`, from `@panneau/intl`: they have the messages\n * of every package.\n */\nexport const en: Record<string, string> = getDefaultMessages(messages);\n\n/**\n * The French messages of `@panneau/ui`, by id.\n *\n * @deprecated Use `fr`, or `withPanneauMessages()`, from `@panneau/intl`: they have the messages\n * of every package.\n */\nexport const fr: Record<string, string> = Object.fromEntries(\n Object.entries(allFr).filter(([id]) => id in en),\n);\n"],"mappings":";;;;;;;;;AAUA,IAAa,KAA6B,mBAAmB,QAAQ;;;;;;;AAQrE,IAAa,KAA6B,OAAO,YAC7C,OAAO,QAAQA,IAAK,CAAC,CAAC,QAAQ,CAAC,QAAQ,MAAM,EAAE,CACnD"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import { type MenuItemProps as AriaMenuItemProps, type MenuProps as AriaMenuProps } from 'react-aria-components';
|
|
3
|
+
import { type IconComponent } from '../icon/Icon';
|
|
4
|
+
export interface MenuProps<T extends object> extends Omit<AriaMenuProps<T>, 'className' | 'style'> {
|
|
5
|
+
className?: string;
|
|
6
|
+
popoverClassName?: string;
|
|
7
|
+
placement?: 'bottom start' | 'bottom end' | 'top start' | 'top end';
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* A menu of actions, inside a `MenuTrigger` with its button as the first child. Arrow keys move
|
|
11
|
+
* between items, and typing a letter jumps to an item.
|
|
12
|
+
*/
|
|
13
|
+
export declare function Menu<T extends object>({ className, popoverClassName, placement, ...props }: MenuProps<T>): import("react").JSX.Element;
|
|
14
|
+
export interface MenuItemProps extends Omit<AriaMenuItemProps, 'className' | 'style' | 'children'> {
|
|
15
|
+
children?: ReactNode;
|
|
16
|
+
icon?: IconComponent;
|
|
17
|
+
description?: string;
|
|
18
|
+
/** Styles the item as destructive. */
|
|
19
|
+
isDanger?: boolean;
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
/** An item of a `Menu`. */
|
|
23
|
+
export declare function MenuItem({ children, icon, description, isDanger, className, textValue, ...props }: MenuItemProps): import("react").JSX.Element;
|
|
24
|
+
/** A line between groups of menu items. */
|
|
25
|
+
export declare function MenuSeparator(): import("react").JSX.Element;
|
|
26
|
+
export { MenuTrigger } from 'react-aria-components';
|
|
27
|
+
//# sourceMappingURL=Menu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../src/menu/Menu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAGH,KAAK,aAAa,IAAI,iBAAiB,EACvC,KAAK,SAAS,IAAI,aAAa,EAGlC,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAQ,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;AAKxD,MAAM,WAAW,SAAS,CAAC,CAAC,SAAS,MAAM,CAAE,SAAQ,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC;IAC9F,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,SAAS,CAAC,EAAE,cAAc,GAAG,YAAY,GAAG,WAAW,GAAG,SAAS,CAAC;CACvE;AAED;;;GAGG;AACH,wBAAgB,IAAI,CAAC,CAAC,SAAS,MAAM,EAAE,EACnC,SAAS,EACT,gBAAgB,EAChB,SAA0B,EAC1B,GAAG,KAAK,EACX,EAAE,SAAS,CAAC,CAAC,CAAC,+BAMd;AAED,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,iBAAiB,EAAE,WAAW,GAAG,OAAO,GAAG,UAAU,CAAC;IAC9F,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sCAAsC;IACtC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,2BAA2B;AAC3B,wBAAgB,QAAQ,CAAC,EACrB,QAAQ,EACR,IAAI,EACJ,WAAW,EACX,QAAgB,EAChB,SAAS,EACT,SAAS,EACT,GAAG,KAAK,EACX,EAAE,aAAa,+BAqBf;AAED,2CAA2C;AAC3C,wBAAgB,aAAa,gCAE5B;AAED,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { cx } from "../utils/cx.js";
|
|
2
|
+
import { Icon } from "../icon/Icon.js";
|
|
3
|
+
import { PopoverSurface } from "../popover/Popover.js";
|
|
4
|
+
import ListBox_module_default from "../select/ListBox.module.js";
|
|
5
|
+
import { Menu, MenuItem, MenuTrigger, Separator, Text } from "react-aria-components";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { c } from "react/compiler-runtime";
|
|
8
|
+
//#region src/menu/Menu.tsx
|
|
9
|
+
/**
|
|
10
|
+
* A menu of actions, inside a `MenuTrigger` with its button as the first child. Arrow keys move
|
|
11
|
+
* between items, and typing a letter jumps to an item.
|
|
12
|
+
*/
|
|
13
|
+
function Menu$1({ className, popoverClassName, placement = "bottom start", ...props }) {
|
|
14
|
+
return /* @__PURE__ */ jsx(PopoverSurface, {
|
|
15
|
+
placement,
|
|
16
|
+
className: popoverClassName,
|
|
17
|
+
children: /* @__PURE__ */ jsx(Menu, {
|
|
18
|
+
...props,
|
|
19
|
+
className: cx(ListBox_module_default.listBox, className)
|
|
20
|
+
})
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
/** An item of a `Menu`. */
|
|
24
|
+
function MenuItem$1({ children, icon, description, isDanger = false, className, textValue, ...props }) {
|
|
25
|
+
return /* @__PURE__ */ jsxs(MenuItem, {
|
|
26
|
+
...props,
|
|
27
|
+
textValue: textValue ?? (typeof children === "string" ? children : void 0),
|
|
28
|
+
className: cx(ListBox_module_default.item, className),
|
|
29
|
+
"data-danger": isDanger || void 0,
|
|
30
|
+
children: [icon !== void 0 ? /* @__PURE__ */ jsx(Icon, { icon }) : null, /* @__PURE__ */ jsxs("span", {
|
|
31
|
+
className: ListBox_module_default.itemText,
|
|
32
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
33
|
+
slot: "label",
|
|
34
|
+
className: ListBox_module_default.itemLabel,
|
|
35
|
+
children
|
|
36
|
+
}), description !== void 0 ? /* @__PURE__ */ jsx(Text, {
|
|
37
|
+
slot: "description",
|
|
38
|
+
className: ListBox_module_default.itemDescription,
|
|
39
|
+
children: description
|
|
40
|
+
}) : null]
|
|
41
|
+
})]
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
/** A line between groups of menu items. */
|
|
45
|
+
function MenuSeparator() {
|
|
46
|
+
const $ = c(1);
|
|
47
|
+
let t0;
|
|
48
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
49
|
+
t0 = /* @__PURE__ */ jsx(Separator, { className: ListBox_module_default.separator });
|
|
50
|
+
$[0] = t0;
|
|
51
|
+
} else t0 = $[0];
|
|
52
|
+
return t0;
|
|
53
|
+
}
|
|
54
|
+
//#endregion
|
|
55
|
+
export { Menu$1 as Menu, MenuItem$1 as MenuItem, MenuSeparator, MenuTrigger };
|
|
56
|
+
|
|
57
|
+
//# sourceMappingURL=Menu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Menu.js","names":["Menu","AriaMenu","styles","MenuItem","AriaMenuItem","_c"],"sources":["../../src/menu/Menu.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport {\n Menu as AriaMenu,\n MenuItem as AriaMenuItem,\n type MenuItemProps as AriaMenuItemProps,\n type MenuProps as AriaMenuProps,\n Separator,\n Text,\n} from 'react-aria-components';\n\nimport { Icon, type IconComponent } from '../icon/Icon';\nimport { PopoverSurface } from '../popover/Popover';\nimport styles from '../select/ListBox.module.css';\nimport { cx } from '../utils/cx';\n\nexport interface MenuProps<T extends object> extends Omit<AriaMenuProps<T>, 'className' | 'style'> {\n className?: string;\n popoverClassName?: string;\n placement?: 'bottom start' | 'bottom end' | 'top start' | 'top end';\n}\n\n/**\n * A menu of actions, inside a `MenuTrigger` with its button as the first child. Arrow keys move\n * between items, and typing a letter jumps to an item.\n */\nexport function Menu<T extends object>({\n className,\n popoverClassName,\n placement = 'bottom start',\n ...props\n}: MenuProps<T>) {\n return (\n <PopoverSurface placement={placement} className={popoverClassName}>\n <AriaMenu {...props} className={cx(styles.listBox, className)} />\n </PopoverSurface>\n );\n}\n\nexport interface MenuItemProps extends Omit<AriaMenuItemProps, 'className' | 'style' | 'children'> {\n children?: ReactNode;\n icon?: IconComponent;\n description?: string;\n /** Styles the item as destructive. */\n isDanger?: boolean;\n className?: string;\n}\n\n/** An item of a `Menu`. */\nexport function MenuItem({\n children,\n icon,\n description,\n isDanger = false,\n className,\n textValue,\n ...props\n}: MenuItemProps) {\n return (\n <AriaMenuItem\n {...props}\n textValue={textValue ?? (typeof children === 'string' ? children : undefined)}\n className={cx(styles.item, className)}\n data-danger={isDanger || undefined}\n >\n {icon !== undefined ? <Icon icon={icon} /> : null}\n <span className={styles.itemText}>\n <Text slot=\"label\" className={styles.itemLabel}>\n {children}\n </Text>\n {description !== undefined ? (\n <Text slot=\"description\" className={styles.itemDescription}>\n {description}\n </Text>\n ) : null}\n </span>\n </AriaMenuItem>\n );\n}\n\n/** A line between groups of menu items. */\nexport function MenuSeparator() {\n return <Separator className={styles.separator} />;\n}\n\nexport { MenuTrigger } from 'react-aria-components';\n"],"mappings":";;;;;;;;;;;;AAyBA,SAAgBA,OAAuB,EACnC,WACA,kBACA,YAAY,gBACZ,GAAG,SACU;CACb,OACI,oBAAC,gBAAD;EAA2B;EAAW,WAAW;EAC7C,UAAA,oBAACC,MAAD;GAAU,GAAI;GAAO,WAAW,GAAGC,uBAAO,SAAS,SAAS;EAAE,CAAA;CAClD,CAAA;AAExB;;AAYA,SAAgBC,WAAS,EACrB,UACA,MACA,aACA,WAAW,OACX,WACA,WACA,GAAG,SACW;CACd,OACI,qBAACC,UAAD;EACI,GAAI;EACJ,WAAW,cAAc,OAAO,aAAa,WAAW,WAAW,KAAA;EACnE,WAAW,GAAGF,uBAAO,MAAM,SAAS;EACpC,eAAa,YAAY,KAAA;EAJ7B,UAAA,CAMK,SAAS,KAAA,IAAY,oBAAC,MAAD,EAAY,KAAK,CAAA,IAAM,MAC7C,qBAAC,QAAD;GAAM,WAAWA,uBAAO;GAAxB,UAAA,CACI,oBAAC,MAAD;IAAM,MAAK;IAAQ,WAAWA,uBAAO;IAChC;GACC,CAAA,GACL,gBAAgB,KAAA,IACb,oBAAC,MAAD;IAAM,MAAK;IAAc,WAAWA,uBAAO;IACtC,UAAA;GACC,CAAA,IACN,IACF;EACI,CAAA,CAAA;;AAEtB;;AAGA,SAAO,gBAAA;CAAA,MAAA,IAAAG,EAAA,CAAA;CAAA,IAAA;CAAA,IAAA,EAAA,OAAA,OAAA,IAAA,2BAAA,GAAA;EACI,KAAA,oBAAC,WAAD,EAAsB,WAAAH,uBAAM,UAAU,CAAA;EAAI,EAAA,KAAA;CAAA,OAAA,KAAA,EAAA;CAAA,OAA1C;AAA0C"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
.panneau-control-4aptNi.panneau-control-4aptNi {
|
|
2
|
+
padding-inline-end: 0;
|
|
3
|
+
overflow: hidden;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.panneau-input-qqs-MV {
|
|
7
|
+
font-variant-numeric: tabular-nums;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.panneau-steppers-JoTs6w {
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
align-self: stretch;
|
|
14
|
+
border-inline-start: var(--panneau-border-width) solid var(--panneau-color-border);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.panneau-stepper-sAGR2f {
|
|
18
|
+
display: flex;
|
|
19
|
+
flex: 1 1 0;
|
|
20
|
+
align-items: center;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
width: 1.75rem;
|
|
23
|
+
padding: 0;
|
|
24
|
+
color: var(--panneau-color-text-muted);
|
|
25
|
+
cursor: pointer;
|
|
26
|
+
background: transparent;
|
|
27
|
+
border: 0;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.panneau-stepper-sAGR2f + .panneau-stepper-sAGR2f {
|
|
31
|
+
border-top: var(--panneau-border-width) solid var(--panneau-color-border);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.panneau-stepper-sAGR2f[data-hovered] {
|
|
35
|
+
color: var(--panneau-color-text);
|
|
36
|
+
background-color: var(--panneau-color-hover);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.panneau-stepper-sAGR2f[data-pressed] {
|
|
40
|
+
background-color: var(--panneau-color-pressed);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.panneau-stepper-sAGR2f[data-disabled] {
|
|
44
|
+
cursor: not-allowed;
|
|
45
|
+
opacity: 0.5;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/* Touch screens have their own keyboard for numbers: the steppers would be too small. */
|
|
49
|
+
@media (pointer: coarse) {
|
|
50
|
+
.panneau-steppers-JoTs6w {
|
|
51
|
+
display: none;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.panneau-control-4aptNi.panneau-control-4aptNi {
|
|
55
|
+
padding-inline-end: var(--panneau-space-3);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import { type NumberFieldProps as AriaNumberFieldProps } from 'react-aria-components';
|
|
3
|
+
import { type FieldChromeProps } from '../field/FieldParts';
|
|
4
|
+
export interface NumberInputProps extends Omit<AriaNumberFieldProps, 'className' | 'style' | 'children' | 'isInvalid' | 'validate' | 'value' | 'defaultValue' | 'onChange'>, FieldChromeProps {
|
|
5
|
+
/** The number, or `null` when empty. */
|
|
6
|
+
value?: number | null;
|
|
7
|
+
defaultValue?: number | null;
|
|
8
|
+
/** Called with the number, or `null` when the input is cleared. */
|
|
9
|
+
onChange?: (value: number | null) => void;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
/** Content after the number, inside the control: a unit. */
|
|
12
|
+
suffix?: ReactNode;
|
|
13
|
+
controlClassName?: string;
|
|
14
|
+
inputClassName?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* A number input, formatted for the locale, with steppers and arrow keys. An empty input is
|
|
18
|
+
* `null`, not `NaN`.
|
|
19
|
+
*/
|
|
20
|
+
export declare function NumberInput({ label, description, errors, value, defaultValue, onChange, placeholder, suffix, className, labelClassName, descriptionClassName, errorsClassName, controlClassName, inputClassName, isRequired, isReadOnly, ...props }: NumberInputProps): import("react").JSX.Element;
|
|
21
|
+
//# sourceMappingURL=NumberInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NumberInput.d.ts","sourceRoot":"","sources":["../../src/number-input/NumberInput.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EACH,KAAK,gBAAgB,IAAI,oBAAoB,EAKhD,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACH,KAAK,gBAAgB,EAKxB,MAAM,qBAAqB,CAAC;AAK7B,MAAM,WAAW,gBACb,SACI,IAAI,CACA,oBAAoB,EAClB,WAAW,GACX,OAAO,GACP,UAAU,GACV,WAAW,GACX,UAAU,GACV,OAAO,GACP,cAAc,GACd,UAAU,CACf,EACD,gBAAgB;IACpB,wCAAwC;IACxC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,mEAAmE;IACnE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC1C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4DAA4D;IAC5D,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;CAC3B;AAMD;;;GAGG;AACH,wBAAgB,WAAW,CAAC,EACxB,KAAK,EACL,WAAW,EACX,MAAW,EACX,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,WAAW,EACX,MAAM,EACN,SAAS,EACT,cAAc,EACd,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,UAAU,EACV,GAAG,KAAK,EACX,EAAE,gBAAgB,+BA4ClB"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { cx } from "../utils/cx.js";
|
|
2
|
+
import { Icon } from "../icon/Icon.js";
|
|
3
|
+
import Field_module_default from "../field/Field.module.js";
|
|
4
|
+
import { FieldDescription, FieldErrors, FieldLabel } from "../field/FieldParts.js";
|
|
5
|
+
import NumberInput_module_default from "./NumberInput.module.js";
|
|
6
|
+
import { ChevronDown, ChevronUp } from "lucide-react";
|
|
7
|
+
import { Button, Group, Input, NumberField } from "react-aria-components";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
//#region src/number-input/NumberInput.tsx
|
|
10
|
+
function toAria(value) {
|
|
11
|
+
return value === null ? NaN : value;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* A number input, formatted for the locale, with steppers and arrow keys. An empty input is
|
|
15
|
+
* `null`, not `NaN`.
|
|
16
|
+
*/
|
|
17
|
+
function NumberInput({ label, description, errors = [], value, defaultValue, onChange, placeholder, suffix, className, labelClassName, descriptionClassName, errorsClassName, controlClassName, inputClassName, isRequired, isReadOnly, ...props }) {
|
|
18
|
+
const invalid = errors.length > 0;
|
|
19
|
+
return /* @__PURE__ */ jsxs(NumberField, {
|
|
20
|
+
...props,
|
|
21
|
+
value: toAria(value),
|
|
22
|
+
defaultValue: toAria(defaultValue),
|
|
23
|
+
onChange: (next) => onChange?.(Number.isNaN(next) ? null : next),
|
|
24
|
+
isRequired,
|
|
25
|
+
isReadOnly,
|
|
26
|
+
isInvalid: invalid,
|
|
27
|
+
validationBehavior: "aria",
|
|
28
|
+
className: cx(Field_module_default.field, className),
|
|
29
|
+
children: [
|
|
30
|
+
/* @__PURE__ */ jsx(FieldLabel, {
|
|
31
|
+
isRequired,
|
|
32
|
+
className: labelClassName,
|
|
33
|
+
children: label
|
|
34
|
+
}),
|
|
35
|
+
/* @__PURE__ */ jsxs(Group, {
|
|
36
|
+
className: cx(Field_module_default.control, NumberInput_module_default.control, controlClassName),
|
|
37
|
+
"data-invalid": invalid || void 0,
|
|
38
|
+
"data-readonly": isReadOnly || void 0,
|
|
39
|
+
children: [
|
|
40
|
+
/* @__PURE__ */ jsx(Input, {
|
|
41
|
+
placeholder,
|
|
42
|
+
className: cx(Field_module_default.bare, NumberInput_module_default.input, inputClassName)
|
|
43
|
+
}),
|
|
44
|
+
suffix !== void 0 ? /* @__PURE__ */ jsx("span", {
|
|
45
|
+
className: Field_module_default.adornment,
|
|
46
|
+
children: suffix
|
|
47
|
+
}) : null,
|
|
48
|
+
isReadOnly !== true ? /* @__PURE__ */ jsxs("span", {
|
|
49
|
+
className: NumberInput_module_default.steppers,
|
|
50
|
+
children: [/* @__PURE__ */ jsx(Button, {
|
|
51
|
+
slot: "increment",
|
|
52
|
+
className: NumberInput_module_default.stepper,
|
|
53
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
54
|
+
icon: ChevronUp,
|
|
55
|
+
size: "xs"
|
|
56
|
+
})
|
|
57
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
58
|
+
slot: "decrement",
|
|
59
|
+
className: NumberInput_module_default.stepper,
|
|
60
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
61
|
+
icon: ChevronDown,
|
|
62
|
+
size: "xs"
|
|
63
|
+
})
|
|
64
|
+
})]
|
|
65
|
+
}) : null
|
|
66
|
+
]
|
|
67
|
+
}),
|
|
68
|
+
/* @__PURE__ */ jsx(FieldDescription, {
|
|
69
|
+
className: descriptionClassName,
|
|
70
|
+
children: description
|
|
71
|
+
}),
|
|
72
|
+
/* @__PURE__ */ jsx(FieldErrors, {
|
|
73
|
+
errors,
|
|
74
|
+
className: errorsClassName
|
|
75
|
+
})
|
|
76
|
+
]
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
//#endregion
|
|
80
|
+
export { NumberInput };
|
|
81
|
+
|
|
82
|
+
//# sourceMappingURL=NumberInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NumberInput.js","names":["fieldStyles","styles"],"sources":["../../src/number-input/NumberInput.tsx"],"sourcesContent":["import { ChevronDown, ChevronUp } from 'lucide-react';\nimport type { ReactNode } from 'react';\nimport {\n type NumberFieldProps as AriaNumberFieldProps,\n Button,\n Group,\n Input,\n NumberField,\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 { cx } from '../utils/cx';\nimport styles from './NumberInput.module.css';\n\nexport interface NumberInputProps\n extends\n Omit<\n AriaNumberFieldProps,\n | 'className'\n | 'style'\n | 'children'\n | 'isInvalid'\n | 'validate'\n | 'value'\n | 'defaultValue'\n | 'onChange'\n >,\n FieldChromeProps {\n /** The number, or `null` when empty. */\n value?: number | null;\n defaultValue?: number | null;\n /** Called with the number, or `null` when the input is cleared. */\n onChange?: (value: number | null) => void;\n placeholder?: string;\n /** Content after the number, inside the control: a unit. */\n suffix?: ReactNode;\n controlClassName?: string;\n inputClassName?: string;\n}\n\nfunction toAria(value: number | null | undefined): number | undefined {\n return value === null ? Number.NaN : value;\n}\n\n/**\n * A number input, formatted for the locale, with steppers and arrow keys. An empty input is\n * `null`, not `NaN`.\n */\nexport function NumberInput({\n label,\n description,\n errors = [],\n value,\n defaultValue,\n onChange,\n placeholder,\n suffix,\n className,\n labelClassName,\n descriptionClassName,\n errorsClassName,\n controlClassName,\n inputClassName,\n isRequired,\n isReadOnly,\n ...props\n}: NumberInputProps) {\n const invalid = errors.length > 0;\n return (\n <NumberField\n {...props}\n value={toAria(value)}\n defaultValue={toAria(defaultValue)}\n onChange={(next) => onChange?.(Number.isNaN(next) ? null : next)}\n isRequired={isRequired}\n isReadOnly={isReadOnly}\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 data-readonly={isReadOnly || undefined}\n >\n <Input\n placeholder={placeholder}\n className={cx(fieldStyles.bare, styles.input, inputClassName)}\n />\n {suffix !== undefined ? (\n <span className={fieldStyles.adornment}>{suffix}</span>\n ) : null}\n {isReadOnly !== true ? (\n <span className={styles.steppers}>\n <Button slot=\"increment\" className={styles.stepper}>\n <Icon icon={ChevronUp} size=\"xs\" />\n </Button>\n <Button slot=\"decrement\" className={styles.stepper}>\n <Icon icon={ChevronDown} size=\"xs\" />\n </Button>\n </span>\n ) : null}\n </Group>\n <FieldDescription className={descriptionClassName}>{description}</FieldDescription>\n <FieldErrors errors={errors} className={errorsClassName} />\n </NumberField>\n );\n}\n"],"mappings":";;;;;;;;;AA+CA,SAAS,OAAO,OAAsD;CAClE,OAAO,UAAU,OAAO,MAAa;AACzC;;;;;AAMA,SAAgB,YAAY,EACxB,OACA,aACA,SAAS,CAAA,GACT,OACA,cACA,UACA,aACA,QACA,WACA,gBACA,sBACA,iBACA,kBACA,gBACA,YACA,YACA,GAAG,SACc;CACjB,MAAM,UAAU,OAAO,SAAS;CAChC,OACI,qBAAC,aAAD;EACI,GAAI;EACJ,OAAO,OAAO,KAAK;EACnB,cAAc,OAAO,YAAY;EACjC,WAAW,SAAS,WAAW,OAAO,MAAM,IAAI,IAAI,OAAO,IAAI;EACnD;EACA;EACZ,WAAW;EACX,oBAAmB;EACnB,WAAW,GAAGA,qBAAY,OAAO,SAAS;EAT9C,UAAA;GAWI,oBAAC,YAAD;IAAwB;IAAY,WAAW;IAC1C,UAAA;GACO,CAAA;GACZ,qBAAC,OAAD;IACI,WAAW,GAAGA,qBAAY,SAASC,2BAAO,SAAS,gBAAgB;IACnE,gBAAc,WAAW,KAAA;IACzB,iBAAe,cAAc,KAAA;IAHjC,UAAA;KAKI,oBAAC,OAAD;MACiB;MACb,WAAW,GAAGD,qBAAY,MAAMC,2BAAO,OAAO,cAAc;KAAE,CAAA;KAEjE,WAAW,KAAA,IACR,oBAAC,QAAD;MAAM,WAAWD,qBAAY;MAAY,UAAA;KAAa,CAAA,IACtD;KACH,eAAe,OACZ,qBAAC,QAAD;MAAM,WAAWC,2BAAO;MAAxB,UAAA,CACI,oBAAC,QAAD;OAAQ,MAAK;OAAY,WAAWA,2BAAO;OACvC,UAAA,oBAAC,MAAD;QAAM,MAAM;QAAW,MAAK;OAAI,CAAA;MAC5B,CAAA,GACR,oBAAC,QAAD;OAAQ,MAAK;OAAY,WAAWA,2BAAO;OACvC,UAAA,oBAAC,MAAD;QAAM,MAAM;QAAa,MAAK;OAAI,CAAA;MAC9B,CAAA,CACN;KACN,CAAA,IAAA;IACD;;GACP,oBAAC,kBAAD;IAAkB,WAAW;IAAuB,UAAA;GAA8B,CAAA;GAClF,oBAAC,aAAD;IAAqB;IAAQ,WAAW;GAAgB,CAAA;EAC/C;;AAErB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import "./NumberInput.css";
|
|
2
|
+
//#region src/number-input/NumberInput.module.css
|
|
3
|
+
var control = "panneau-control-4aptNi";
|
|
4
|
+
var input = "panneau-input-qqs-MV";
|
|
5
|
+
var steppers = "panneau-steppers-JoTs6w";
|
|
6
|
+
var stepper = "panneau-stepper-sAGR2f";
|
|
7
|
+
var NumberInput_module_default = {
|
|
8
|
+
control,
|
|
9
|
+
input,
|
|
10
|
+
steppers,
|
|
11
|
+
stepper
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
14
|
+
export { control, NumberInput_module_default as default, input, stepper, steppers };
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=NumberInput.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NumberInput.module.js","names":[],"sources":["../../src/number-input/NumberInput.module.css"],"sourcesContent":[".control.control {\n padding-inline-end: 0;\n overflow: hidden;\n}\n\n.input {\n font-variant-numeric: tabular-nums;\n}\n\n.steppers {\n display: flex;\n flex-direction: column;\n align-self: stretch;\n border-inline-start: var(--panneau-border-width) solid var(--panneau-color-border);\n}\n\n.stepper {\n display: flex;\n flex: 1 1 0;\n align-items: center;\n justify-content: center;\n width: 1.75rem;\n padding: 0;\n color: var(--panneau-color-text-muted);\n cursor: pointer;\n background: transparent;\n border: 0;\n}\n\n.stepper + .stepper {\n border-top: var(--panneau-border-width) solid var(--panneau-color-border);\n}\n\n.stepper[data-hovered] {\n color: var(--panneau-color-text);\n background-color: var(--panneau-color-hover);\n}\n\n.stepper[data-pressed] {\n background-color: var(--panneau-color-pressed);\n}\n\n.stepper[data-disabled] {\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n/* Touch screens have their own keyboard for numbers: the steppers would be too small. */\n@media (pointer: coarse) {\n .steppers {\n display: none;\n }\n\n .control.control {\n padding-inline-end: var(--panneau-space-3);\n }\n}\n"],"mappings":""}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
.panneau-popover-KacUIM {
|
|
2
|
+
min-width: var(--trigger-width, 10rem);
|
|
3
|
+
max-width: calc(100vw - 2 * var(--panneau-space-4));
|
|
4
|
+
color: var(--panneau-color-text);
|
|
5
|
+
background-color: var(--panneau-color-surface-raised);
|
|
6
|
+
border: var(--panneau-border-width) solid var(--panneau-color-border);
|
|
7
|
+
border-radius: var(--panneau-radius-lg);
|
|
8
|
+
box-shadow: var(--panneau-shadow-lg);
|
|
9
|
+
outline: none;
|
|
10
|
+
overflow: auto;
|
|
11
|
+
z-index: var(--panneau-z-overlay);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.panneau-popover-KacUIM[data-entering] {
|
|
15
|
+
animation: panneau-pop-fB47s- var(--panneau-duration) ease-out;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.panneau-popover-KacUIM[data-exiting] {
|
|
19
|
+
animation: panneau-pop-fB47s- var(--panneau-duration) ease-in reverse;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.panneau-dialog-2cVt0D {
|
|
23
|
+
padding: var(--panneau-space-3);
|
|
24
|
+
outline: none;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@keyframes panneau-pop-fB47s- {
|
|
28
|
+
from {
|
|
29
|
+
opacity: 0;
|
|
30
|
+
transform: scale(0.97);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import { type PopoverProps as AriaPopoverProps } from 'react-aria-components';
|
|
3
|
+
export interface PopoverProps extends Omit<AriaPopoverProps, 'className' | 'style' | 'children' | 'UNSTABLE_portalContainer'> {
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
/** Accessible label of the popover's dialog, when it has no heading. */
|
|
6
|
+
'aria-label'?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
dialogClassName?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* A popover with free content, inside a `PopoverTrigger` with its button as the first child. Its
|
|
12
|
+
* content is a non-modal dialog: focus moves into it and comes back to the button when it closes.
|
|
13
|
+
*/
|
|
14
|
+
export declare function Popover({ children, 'aria-label': ariaLabel, className, dialogClassName, offset, ...props }: PopoverProps): import("react").JSX.Element | null;
|
|
15
|
+
/** The popover surface without a dialog, for listboxes and menus. */
|
|
16
|
+
export declare function PopoverSurface({ children, className, offset, ...props }: Omit<PopoverProps, 'aria-label' | 'dialogClassName'>): import("react").JSX.Element | null;
|
|
17
|
+
export { DialogTrigger as PopoverTrigger } from 'react-aria-components';
|
|
18
|
+
//# sourceMappingURL=Popover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../src/popover/Popover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAEH,KAAK,YAAY,IAAI,gBAAgB,EAExC,MAAM,uBAAuB,CAAC;AAM/B,MAAM,WAAW,YAAa,SAAQ,IAAI,CACtC,gBAAgB,EAChB,WAAW,GAAG,OAAO,GAAG,UAAU,GAAG,0BAA0B,CAClE;IACG,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,wEAAwE;IACxE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;GAGG;AACH,wBAAgB,OAAO,CAAC,EACpB,QAAQ,EACR,YAAY,EAAE,SAAS,EACvB,SAAS,EACT,eAAe,EACf,MAAU,EACV,GAAG,KAAK,EACX,EAAE,YAAY,sCAiBd;AAED,qEAAqE;AACrE,wBAAgB,cAAc,CAAC,EAC3B,QAAQ,EACR,SAAS,EACT,MAAU,EACV,GAAG,KAAK,EACX,EAAE,IAAI,CAAC,YAAY,EAAE,YAAY,GAAG,iBAAiB,CAAC,sCAetD;AAED,OAAO,EAAE,aAAa,IAAI,cAAc,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { cx } from "../utils/cx.js";
|
|
2
|
+
import { usePortalContainer } from "../root/PanneauRoot.js";
|
|
3
|
+
import Popover_module_default from "./Popover.module.js";
|
|
4
|
+
import { Dialog, DialogTrigger as PopoverTrigger, Popover } from "react-aria-components";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
//#region src/popover/Popover.tsx
|
|
7
|
+
/**
|
|
8
|
+
* A popover with free content, inside a `PopoverTrigger` with its button as the first child. Its
|
|
9
|
+
* content is a non-modal dialog: focus moves into it and comes back to the button when it closes.
|
|
10
|
+
*/
|
|
11
|
+
function Popover$1({ children, "aria-label": ariaLabel, className, dialogClassName, offset = 6, ...props }) {
|
|
12
|
+
const container = usePortalContainer();
|
|
13
|
+
if (container === null) return null;
|
|
14
|
+
return /* @__PURE__ */ jsx(Popover, {
|
|
15
|
+
...props,
|
|
16
|
+
offset,
|
|
17
|
+
className: cx(Popover_module_default.popover, className),
|
|
18
|
+
UNSTABLE_portalContainer: container,
|
|
19
|
+
children: /* @__PURE__ */ jsx(Dialog, {
|
|
20
|
+
"aria-label": ariaLabel,
|
|
21
|
+
className: cx(Popover_module_default.dialog, dialogClassName),
|
|
22
|
+
children
|
|
23
|
+
})
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
/** The popover surface without a dialog, for listboxes and menus. */
|
|
27
|
+
function PopoverSurface({ children, className, offset = 6, ...props }) {
|
|
28
|
+
const container = usePortalContainer();
|
|
29
|
+
if (container === null) return null;
|
|
30
|
+
return /* @__PURE__ */ jsx(Popover, {
|
|
31
|
+
...props,
|
|
32
|
+
offset,
|
|
33
|
+
className: cx(Popover_module_default.popover, className),
|
|
34
|
+
UNSTABLE_portalContainer: container,
|
|
35
|
+
children
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
39
|
+
export { Popover$1 as Popover, PopoverSurface, PopoverTrigger };
|
|
40
|
+
|
|
41
|
+
//# sourceMappingURL=Popover.js.map
|
|
@@ -0,0 +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(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(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,SAAgBA,UAAQ,EACpB,UACA,cAAc,WACd,WACA,iBACA,SAAS,GACT,GAAG,SACU;CACb,MAAM,YAAY,mBAAmB;CACrC,IAAI,cAAc,MACd,OAAO;CAEX,OACI,oBAACC,SAAD;EACI,GAAI;EACI;EACR,WAAW,GAAGC,uBAAO,SAAS,SAAS;EACvC,0BAA0B;EAE1B,UAAA,oBAAC,QAAD;GAAQ,cAAY;GAAW,WAAW,GAAGA,uBAAO,QAAQ,eAAe;GACtE;EACG,CAAA;CACC,CAAA;AAErB;;AAGA,SAAgB,eAAe,EAC3B,UACA,WACA,SAAS,GACT,GAAG,SACkD;CACrD,MAAM,YAAY,mBAAmB;CACrC,IAAI,cAAc,MACd,OAAO;CAEX,OACI,oBAACD,SAAD;EACI,GAAI;EACI;EACR,WAAW,GAAGC,uBAAO,SAAS,SAAS;EACvC,0BAA0B;EAEzB;CACQ,CAAA;AAErB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import "./Popover.css";
|
|
2
|
+
//#region src/popover/Popover.module.css
|
|
3
|
+
var popover = "panneau-popover-KacUIM";
|
|
4
|
+
var pop = "panneau-pop-fB47s-";
|
|
5
|
+
var dialog = "panneau-dialog-2cVt0D";
|
|
6
|
+
var Popover_module_default = {
|
|
7
|
+
popover,
|
|
8
|
+
pop,
|
|
9
|
+
dialog
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { Popover_module_default as default, dialog, pop, popover };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=Popover.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Popover.module.js","names":[],"sources":["../../src/popover/Popover.module.css"],"sourcesContent":[".popover {\n min-width: var(--trigger-width, 10rem);\n max-width: calc(100vw - 2 * var(--panneau-space-4));\n color: var(--panneau-color-text);\n background-color: var(--panneau-color-surface-raised);\n border: var(--panneau-border-width) solid var(--panneau-color-border);\n border-radius: var(--panneau-radius-lg);\n box-shadow: var(--panneau-shadow-lg);\n outline: none;\n overflow: auto;\n z-index: var(--panneau-z-overlay);\n}\n\n.popover[data-entering] {\n animation: pop var(--panneau-duration) ease-out;\n}\n\n.popover[data-exiting] {\n animation: pop var(--panneau-duration) ease-in reverse;\n}\n\n.dialog {\n padding: var(--panneau-space-3);\n outline: none;\n}\n\n@keyframes pop {\n from {\n opacity: 0;\n transform: scale(0.97);\n }\n}\n"],"mappings":""}
|