@pathscale/ui 1.1.44 → 1.1.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/accordion/Accordion.js +44 -44
- package/dist/components/accordion/index.js +2 -9
- package/dist/components/alert/Alert.js +30 -30
- package/dist/components/alert/index.js +2 -8
- package/dist/components/avatar/Avatar.js +27 -27
- package/dist/components/avatar/AvatarGroup.js +11 -11
- package/dist/components/avatar/index.js +2 -6
- package/dist/components/badge/Badge.js +19 -19
- package/dist/components/badge/index.js +6 -9
- package/dist/components/breadcrumbs/Breadcrumbs.js +25 -25
- package/dist/components/breadcrumbs/index.js +2 -5
- package/dist/components/button/Button.js +22 -22
- package/dist/components/button/index.js +2 -3
- package/dist/components/button-group/ButtonGroup.js +14 -14
- package/dist/components/button-group/context.js +2 -2
- package/dist/components/button-group/index.js +2 -6
- package/dist/components/calendar/Calendar.js +85 -85
- package/dist/components/calendar/index.js +2 -3
- package/dist/components/card/Card.js +21 -21
- package/dist/components/card/index.js +2 -8
- package/dist/components/chatbubble/ChatBubble.js +19 -19
- package/dist/components/chatbubble/ChatBubbleAvatar.js +8 -8
- package/dist/components/chatbubble/ChatBubbleFooter.js +11 -11
- package/dist/components/chatbubble/ChatBubbleHeader.js +8 -8
- package/dist/components/chatbubble/ChatBubbleMessage.js +12 -12
- package/dist/components/chatbubble/ChatBubbleTime.js +11 -11
- package/dist/components/chatbubble/index.js +2 -3
- package/dist/components/checkbox/Checkbox.js +29 -29
- package/dist/components/checkbox/index.js +2 -3
- package/dist/components/checkbox-group/CheckboxGroup.js +16 -16
- package/dist/components/checkbox-group/context.js +2 -2
- package/dist/components/checkbox-group/index.js +3 -4
- package/dist/components/chip/Chip.js +32 -32
- package/dist/components/chip/index.js +5 -7
- package/dist/components/close-button/CloseButton.js +22 -22
- package/dist/components/close-button/index.js +2 -3
- package/dist/components/color-area/ColorArea.js +13 -13
- package/dist/components/color-area/index.js +2 -2
- package/dist/components/color-field/ColorField.js +23 -23
- package/dist/components/color-field/index.js +2 -2
- package/dist/components/color-picker/ColorPicker.js +44 -44
- package/dist/components/color-picker/index.js +2 -8
- package/dist/components/color-slider/ColorSlider.js +21 -21
- package/dist/components/color-slider/index.js +2 -2
- package/dist/components/color-swatch/ColorSwatch.js +14 -14
- package/dist/components/color-swatch/index.js +2 -2
- package/dist/components/color-swatch-picker/ColorSwatchPicker.js +14 -14
- package/dist/components/color-swatch-picker/index.js +2 -5
- package/dist/components/color-wheel-flower/ColorWheelFlower.js +83 -83
- package/dist/components/color-wheel-flower/colorWheelFlowerContext.js +3 -3
- package/dist/components/color-wheel-flower/index.js +3 -6
- package/dist/components/combo-box/ComboBox.js +90 -90
- package/dist/components/combo-box/index.js +2 -10
- package/dist/components/date-field/DateField.js +41 -41
- package/dist/components/date-field/index.js +2 -11
- package/dist/components/date-picker/DatePicker.js +40 -40
- package/dist/components/date-picker/index.js +2 -3
- package/dist/components/date-range-picker/DateRangePicker.js +55 -55
- package/dist/components/date-range-picker/index.js +2 -3
- package/dist/components/description/Description.js +9 -9
- package/dist/components/description/index.js +2 -5
- package/dist/components/disclosure/Disclosure.js +40 -40
- package/dist/components/disclosure/index.js +3 -9
- package/dist/components/disclosure-group/DisclosureGroup.js +13 -13
- package/dist/components/disclosure-group/index.js +4 -6
- package/dist/components/disclosure-group/useDisclosureGroupNavigation.js +4 -4
- package/dist/components/drawer/Drawer.css +39 -0
- package/dist/components/drawer/Drawer.d.ts +6 -0
- package/dist/components/drawer/Drawer.js +101 -80
- package/dist/components/drawer/index.d.ts +1 -1
- package/dist/components/drawer/index.js +2 -15
- package/dist/components/dropdown/Dropdown.js +60 -60
- package/dist/components/dropdown/index.js +2 -4
- package/dist/components/empty-state/EmptyState.js +25 -25
- package/dist/components/empty-state/index.js +2 -8
- package/dist/components/error-message/ErrorMessage.js +12 -12
- package/dist/components/error-message/index.js +2 -5
- package/dist/components/field-error/FieldError.js +16 -16
- package/dist/components/field-error/index.js +2 -5
- package/dist/components/fieldset/Fieldset.js +21 -21
- package/dist/components/fieldset/index.js +2 -8
- package/dist/components/flex/Flex.js +14 -14
- package/dist/components/flex/index.js +2 -3
- package/dist/components/floating-dock/FloatingDock.js +76 -76
- package/dist/components/floating-dock/index.js +2 -3
- package/dist/components/footer/Footer.js +11 -11
- package/dist/components/footer/FooterTitle.js +9 -9
- package/dist/components/footer/index.js +2 -3
- package/dist/components/form/Form.js +8 -8
- package/dist/components/form/index.js +2 -5
- package/dist/components/glass-panel/GlassPanel.js +29 -29
- package/dist/components/glass-panel/index.js +2 -3
- package/dist/components/glow-card/GlowCard.js +10 -10
- package/dist/components/glow-card/index.js +2 -3
- package/dist/components/grid/Grid.js +15 -15
- package/dist/components/grid/index.js +2 -3
- package/dist/components/header/Header.js +12 -12
- package/dist/components/header/index.js +2 -5
- package/dist/components/icon/Icon.js +8 -8
- package/dist/components/icon/index.js +2 -3
- package/dist/components/immersive-landing/ImmersiveLanding.js +44 -44
- package/dist/components/immersive-landing/ImmersiveLandingArrows.js +17 -17
- package/dist/components/immersive-landing/ImmersiveLandingContext.js +3 -3
- package/dist/components/immersive-landing/ImmersiveLandingNavigation.js +36 -36
- package/dist/components/immersive-landing/ImmersiveLandingPage.js +15 -15
- package/dist/components/immersive-landing/components/CookieConsent.js +71 -71
- package/dist/components/immersive-landing/components/FirefoxPWABanner.js +42 -42
- package/dist/components/immersive-landing/components/PWAInstallPrompt.js +40 -40
- package/dist/components/immersive-landing/index.js +7 -14
- package/dist/components/immersive-landing/useImmersiveLanding.js +7 -7
- package/dist/components/input/Input.js +48 -48
- package/dist/components/input/index.js +2 -2
- package/dist/components/input-group/InputGroup.js +33 -33
- package/dist/components/input-group/index.js +2 -9
- package/dist/components/input-otp/InputOTP.js +48 -48
- package/dist/components/input-otp/index.js +2 -11
- package/dist/components/join/Join.js +14 -14
- package/dist/components/join/index.js +2 -3
- package/dist/components/kbd/Kbd.js +20 -20
- package/dist/components/kbd/index.js +2 -8
- package/dist/components/label/Label.js +9 -9
- package/dist/components/label/index.js +2 -5
- package/dist/components/language-switcher/LanguageSwitcher.js +26 -26
- package/dist/components/language-switcher/createI18n.js +8 -8
- package/dist/components/language-switcher/index.js +3 -8
- package/dist/components/link/Link.js +22 -22
- package/dist/components/link/index.js +2 -5
- package/dist/components/list-box/ListBox.js +17 -17
- package/dist/components/list-box/ListBoxItem.js +32 -32
- package/dist/components/list-box/ListBoxSection.js +13 -13
- package/dist/components/list-box/context.js +2 -2
- package/dist/components/list-box/index.js +9 -15
- package/dist/components/live-chat/LiveChatBubble.js +27 -27
- package/dist/components/live-chat/LiveChatPanel.js +62 -62
- package/dist/components/live-chat/index.js +3 -5
- package/dist/components/menu/Menu.js +25 -30
- package/dist/components/menu/MenuItem.js +38 -38
- package/dist/components/menu/MenuSection.js +13 -13
- package/dist/components/menu/context.js +2 -2
- package/dist/components/menu/index.js +3 -12
- package/dist/components/meter/Meter.js +31 -31
- package/dist/components/meter/index.js +2 -8
- package/dist/components/modal/Modal.js +80 -80
- package/dist/components/modal/index.js +2 -13
- package/dist/components/navbar/Navbar.js +18 -18
- package/dist/components/navbar/NavbarRow.js +10 -10
- package/dist/components/navbar/NavbarSection.js +9 -9
- package/dist/components/navbar/NavbarStack.js +10 -10
- package/dist/components/navbar/index.js +2 -3
- package/dist/components/noise-background/NoiseBackground.js +35 -35
- package/dist/components/noise-background/index.js +2 -3
- package/dist/components/number-field/NumberField.js +42 -42
- package/dist/components/number-field/index.js +2 -9
- package/dist/components/pagination/Pagination.js +34 -34
- package/dist/components/pagination/index.js +2 -3
- package/dist/components/popover/Popover.js +44 -44
- package/dist/components/popover/index.js +3 -9
- package/dist/components/progress-bar/ProgressBar.js +27 -27
- package/dist/components/progress-bar/index.js +2 -3
- package/dist/components/progress-circle/ProgressCircle.js +32 -32
- package/dist/components/progress-circle/index.js +2 -3
- package/dist/components/radio/Radio.js +27 -27
- package/dist/components/radio/index.js +2 -3
- package/dist/components/radio-group/RadioGroup.js +33 -33
- package/dist/components/radio-group/context.js +2 -2
- package/dist/components/radio-group/index.js +3 -4
- package/dist/components/range-calendar/RangeCalendar.js +15 -15
- package/dist/components/range-calendar/index.js +2 -3
- package/dist/components/scroll-shadow/ScrollShadow.js +19 -19
- package/dist/components/scroll-shadow/index.js +2 -3
- package/dist/components/scroll-shadow/useScrollShadow.js +3 -3
- package/dist/components/search-field/SearchField.js +38 -38
- package/dist/components/search-field/index.js +2 -9
- package/dist/components/select/Select.js +123 -123
- package/dist/components/select/index.js +2 -3
- package/dist/components/separator/Separator.js +11 -11
- package/dist/components/separator/index.js +2 -4
- package/dist/components/size-picker/SizePicker.js +17 -17
- package/dist/components/size-picker/index.js +3 -6
- package/dist/components/size-picker/sizeStore.js +3 -3
- package/dist/components/skeleton/Skeleton.js +8 -8
- package/dist/components/skeleton/index.js +2 -3
- package/dist/components/slider/Slider.js +26 -26
- package/dist/components/slider/index.js +2 -3
- package/dist/components/spinner/Spinner.js +19 -19
- package/dist/components/spinner/index.js +2 -5
- package/dist/components/surface/Surface.js +9 -9
- package/dist/components/surface/index.js +2 -4
- package/dist/components/table/Table.js +80 -80
- package/dist/components/table/index.js +3 -28
- package/dist/components/tabs/Tabs.js +59 -59
- package/dist/components/tabs/index.js +2 -4
- package/dist/components/tag/Tag.js +40 -40
- package/dist/components/tag/index.js +2 -6
- package/dist/components/tag-group/TagGroup.js +20 -20
- package/dist/components/tag-group/context.js +2 -2
- package/dist/components/tag-group/index.js +2 -6
- package/dist/components/text/Text.js +9 -9
- package/dist/components/text/index.js +2 -5
- package/dist/components/text-area/TextArea.js +10 -10
- package/dist/components/text-area/index.js +2 -5
- package/dist/components/text-field/TextField.js +15 -15
- package/dist/components/text-field/index.js +2 -7
- package/dist/components/textarea/Textarea.js +11 -13
- package/dist/components/textarea/index.js +2 -6
- package/dist/components/theme-color-picker/ThemeColorPicker.js +43 -43
- package/dist/components/theme-color-picker/hueShift.js +3 -3
- package/dist/components/theme-color-picker/index.js +3 -7
- package/dist/components/time-field/TimeField.js +41 -41
- package/dist/components/time-field/index.js +2 -11
- package/dist/components/toast/Toast.js +98 -98
- package/dist/components/toast/index.js +2 -19
- package/dist/components/toggle/Toggle.js +31 -31
- package/dist/components/toggle/index.js +2 -3
- package/dist/components/toolbar/Toolbar.js +10 -10
- package/dist/components/toolbar/index.js +2 -5
- package/dist/components/tooltip/Tooltip.js +28 -28
- package/dist/components/tooltip/index.js +2 -7
- package/dist/components/utils.js +6 -7
- package/dist/components/video-preview/VideoPreview.js +15 -15
- package/dist/components/video-preview/index.js +2 -3
- package/dist/hooks/date/useCalendarNavigation.js +18 -18
- package/dist/hooks/date/useCalendarState.js +19 -19
- package/dist/hooks/date/useDateSelection.js +7 -7
- package/dist/hooks/date/usePickerOpenState.js +8 -8
- package/dist/hooks/date/useRangeSelection.js +16 -16
- package/dist/hooks/form/index.js +6 -12
- package/dist/hooks/form/useField.js +4 -4
- package/dist/hooks/form/useFieldError.js +2 -2
- package/dist/hooks/form/useFieldMeta.js +10 -10
- package/dist/hooks/form/useFieldProps.js +2 -2
- package/dist/hooks/form/useForm.js +4 -4
- package/dist/hooks/layout/index.js +2 -3
- package/dist/hooks/layout/useDesktop.js +4 -4
- package/dist/hooks/table/index.js +9 -18
- package/dist/hooks/table/useAnchoredOverlayPosition.js +4 -4
- package/dist/hooks/table/useTableExpansion.js +4 -4
- package/dist/hooks/table/useTableFiltering.js +8 -8
- package/dist/hooks/table/useTableModel.js +10 -10
- package/dist/hooks/table/useTablePagination.js +4 -4
- package/dist/hooks/table/useTableSelection.js +4 -4
- package/dist/hooks/table/useTableSorting.js +6 -6
- package/dist/index.d.ts +1 -1
- package/dist/index.js +97 -366
- package/dist/lib/refs/index.js +2 -3
- package/dist/lib/refs/mergeRefs.js +2 -2
- package/dist/lib/style/index.js +2 -4
- package/dist/lib/tag/createIsButton.js +4 -4
- package/dist/lib/tag/createTagName.js +2 -2
- package/dist/lib/tag/index.js +3 -7
- package/dist/motion/engine.js +4 -4
- package/dist/motion/index.js +11 -34
- package/dist/motion/popmotion.js +2 -2
- package/dist/motion/presets.js +4 -4
- package/dist/motion/route.js +7 -7
- package/dist/motion/solid/MotionDiv.js +13 -13
- package/dist/motion/solid/index.js +2 -3
- package/dist/motion/system.js +9 -9
- package/dist/primitives/streaming/index.js +3 -5
- package/dist/primitives/streaming/useStreamingBuffer.js +2 -2
- package/dist/primitives/streaming/useStreamingSubscription.js +7 -7
- package/dist/primitives/virtualizer/index.js +2 -3
- package/dist/primitives/virtualizer/useVirtualRows.js +7 -7
- package/dist/purge-manifest.json +2287 -2287
- package/package.json +1 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
var _tmpl$ = /*#__PURE__*/
|
|
6
|
-
const
|
|
7
|
-
const [local, others] =
|
|
1
|
+
import { mergeProps, spread, template } from "solid-js/web";
|
|
2
|
+
import { splitProps } from "solid-js";
|
|
3
|
+
import { twMerge } from "tailwind-merge";
|
|
4
|
+
import { CLASSES } from "./ChatBubble.classes.js";
|
|
5
|
+
var _tmpl$ = /*#__PURE__*/ template("<div>");
|
|
6
|
+
const ChatBubbleFooter_ChatBubbleFooter = (props)=>{
|
|
7
|
+
const [local, others] = splitProps(props, [
|
|
8
8
|
"class",
|
|
9
9
|
"className"
|
|
10
10
|
]);
|
|
11
11
|
return (()=>{
|
|
12
12
|
var _el$ = _tmpl$();
|
|
13
|
-
|
|
14
|
-
class:
|
|
13
|
+
spread(_el$, mergeProps(others, ()=>({
|
|
14
|
+
class: twMerge(CLASSES.slot.footer, local.class, local.className)
|
|
15
15
|
})), false, false);
|
|
16
16
|
return _el$;
|
|
17
17
|
})();
|
|
18
18
|
};
|
|
19
|
-
const
|
|
20
|
-
export {
|
|
19
|
+
const ChatBubbleFooter = ChatBubbleFooter_ChatBubbleFooter;
|
|
20
|
+
export { ChatBubbleFooter as default };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
var _tmpl$ = /*#__PURE__*/
|
|
1
|
+
import { mergeProps, spread, template } from "solid-js/web";
|
|
2
|
+
import { splitProps } from "solid-js";
|
|
3
|
+
import { twMerge } from "tailwind-merge";
|
|
4
|
+
import { CLASSES } from "./ChatBubble.classes.js";
|
|
5
|
+
var _tmpl$ = /*#__PURE__*/ template("<div>");
|
|
6
6
|
const ChatBubbleHeader_ChatBubbleHeader = (props)=>{
|
|
7
|
-
const [local, others] =
|
|
7
|
+
const [local, others] = splitProps(props, [
|
|
8
8
|
"class",
|
|
9
9
|
"className"
|
|
10
10
|
]);
|
|
11
11
|
return (()=>{
|
|
12
12
|
var _el$ = _tmpl$();
|
|
13
|
-
|
|
14
|
-
class:
|
|
13
|
+
spread(_el$, mergeProps(others, ()=>({
|
|
14
|
+
class: twMerge(CLASSES.slot.header, local.class, local.className)
|
|
15
15
|
})), false, false);
|
|
16
16
|
return _el$;
|
|
17
17
|
})();
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
var _tmpl$ = /*#__PURE__*/
|
|
6
|
-
const
|
|
7
|
-
const [local, others] =
|
|
1
|
+
import { mergeProps, spread, template } from "solid-js/web";
|
|
2
|
+
import { splitProps } from "solid-js";
|
|
3
|
+
import { twMerge } from "tailwind-merge";
|
|
4
|
+
import { CLASSES } from "./ChatBubble.classes.js";
|
|
5
|
+
var _tmpl$ = /*#__PURE__*/ template("<div>");
|
|
6
|
+
const ChatBubbleMessage = (props)=>{
|
|
7
|
+
const [local, others] = splitProps(props, [
|
|
8
8
|
"color",
|
|
9
9
|
"class",
|
|
10
10
|
"className"
|
|
11
11
|
]);
|
|
12
12
|
const colorClass = ()=>{
|
|
13
13
|
if (!local.color) return;
|
|
14
|
-
return
|
|
14
|
+
return CLASSES.color[local.color];
|
|
15
15
|
};
|
|
16
16
|
return (()=>{
|
|
17
17
|
var _el$ = _tmpl$();
|
|
18
|
-
|
|
18
|
+
spread(_el$, mergeProps(others, {
|
|
19
19
|
get ["class"] () {
|
|
20
|
-
return
|
|
20
|
+
return twMerge(CLASSES.slot.message, colorClass(), local.class, local.className);
|
|
21
21
|
}
|
|
22
22
|
}), false, false);
|
|
23
23
|
return _el$;
|
|
24
24
|
})();
|
|
25
25
|
};
|
|
26
|
-
const
|
|
27
|
-
export {
|
|
26
|
+
const chatbubble_ChatBubbleMessage = ChatBubbleMessage;
|
|
27
|
+
export { chatbubble_ChatBubbleMessage as default };
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
var _tmpl$ = /*#__PURE__*/
|
|
6
|
-
const
|
|
7
|
-
const [local, others] =
|
|
1
|
+
import { mergeProps, spread, template } from "solid-js/web";
|
|
2
|
+
import { splitProps } from "solid-js";
|
|
3
|
+
import { twMerge } from "tailwind-merge";
|
|
4
|
+
import { CLASSES } from "./ChatBubble.classes.js";
|
|
5
|
+
var _tmpl$ = /*#__PURE__*/ template("<time>");
|
|
6
|
+
const ChatBubbleTime_ChatBubbleTime = (props)=>{
|
|
7
|
+
const [local, others] = splitProps(props, [
|
|
8
8
|
"class",
|
|
9
9
|
"className"
|
|
10
10
|
]);
|
|
11
11
|
return (()=>{
|
|
12
12
|
var _el$ = _tmpl$();
|
|
13
|
-
|
|
14
|
-
class:
|
|
13
|
+
spread(_el$, mergeProps(others, ()=>({
|
|
14
|
+
class: twMerge(CLASSES.slot.time, local.class, local.className)
|
|
15
15
|
})), false, false);
|
|
16
16
|
return _el$;
|
|
17
17
|
})();
|
|
18
18
|
};
|
|
19
|
-
const
|
|
20
|
-
export {
|
|
19
|
+
const ChatBubbleTime = ChatBubbleTime_ChatBubbleTime;
|
|
20
|
+
export { ChatBubbleTime as default };
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export { __webpack_exports__default as default };
|
|
1
|
+
import external_ChatBubble_js_default from "./ChatBubble.js";
|
|
2
|
+
export { external_ChatBubble_js_default as default };
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { createComponent, insert, mergeProps, spread, template, use } from "solid-js/web";
|
|
2
2
|
import "./Checkbox.css";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
var _tmpl$ = /*#__PURE__*/
|
|
3
|
+
import { Show, createEffect, createSignal, splitProps, useContext } from "solid-js";
|
|
4
|
+
import { twMerge } from "tailwind-merge";
|
|
5
|
+
import { CheckboxGroupContext } from "../checkbox-group/context.js";
|
|
6
|
+
import { CLASSES } from "./Checkbox.classes.js";
|
|
7
|
+
var _tmpl$ = /*#__PURE__*/ template('<svg aria-hidden=true data-slot=checkbox-default-indicator--indeterminate fill=none role=presentation stroke=currentColor stroke-linecap=round stroke-width=3 viewBox="0 0 24 24"><line x1=21 x2=3 y1=12 y2=12>'), _tmpl$2 = /*#__PURE__*/ template("<span data-slot=label>"), _tmpl$3 = /*#__PURE__*/ template("<span>"), _tmpl$4 = /*#__PURE__*/ template("<label><input><span><span>"), _tmpl$5 = /*#__PURE__*/ template('<svg aria-hidden=true data-slot=checkbox-default-indicator--checkmark fill=none role=presentation stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2 viewBox="0 0 17 18"><polyline points="1 9 7 14 15 4">');
|
|
8
8
|
const invokeEventHandler = (handler, event)=>{
|
|
9
9
|
if ("function" == typeof handler) return void handler(event);
|
|
10
10
|
if (Array.isArray(handler) && "function" == typeof handler[0]) handler[0](handler[1], event);
|
|
11
11
|
};
|
|
12
12
|
const Checkbox_Checkbox = (props)=>{
|
|
13
13
|
let inputRef;
|
|
14
|
-
const group =
|
|
15
|
-
const [local, others] =
|
|
14
|
+
const group = useContext(CheckboxGroupContext);
|
|
15
|
+
const [local, others] = splitProps(props, [
|
|
16
16
|
"class",
|
|
17
17
|
"className",
|
|
18
18
|
"children",
|
|
@@ -31,7 +31,7 @@ const Checkbox_Checkbox = (props)=>{
|
|
|
31
31
|
"dataTheme",
|
|
32
32
|
"aria-invalid"
|
|
33
33
|
]);
|
|
34
|
-
const [internalSelected, setInternalSelected] =
|
|
34
|
+
const [internalSelected, setInternalSelected] = createSignal(Boolean(local.defaultChecked));
|
|
35
35
|
const isControlled = ()=>void 0 !== local.checked;
|
|
36
36
|
const optionValue = ()=>null != local.value ? String(local.value) : void 0;
|
|
37
37
|
const isGrouped = ()=>Boolean(group && void 0 !== optionValue());
|
|
@@ -42,7 +42,7 @@ const Checkbox_Checkbox = (props)=>{
|
|
|
42
42
|
const variant = ()=>local.variant ?? group?.variant() ?? "primary";
|
|
43
43
|
const name = ()=>local.name ?? group?.name();
|
|
44
44
|
const hasContent = ()=>null != local.children || null != local.description;
|
|
45
|
-
|
|
45
|
+
createEffect(()=>{
|
|
46
46
|
if (!inputRef) return;
|
|
47
47
|
inputRef.indeterminate = isIndeterminate();
|
|
48
48
|
});
|
|
@@ -55,8 +55,8 @@ const Checkbox_Checkbox = (props)=>{
|
|
|
55
55
|
};
|
|
56
56
|
return (()=>{
|
|
57
57
|
var _el$ = _tmpl$4(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.firstChild;
|
|
58
|
-
|
|
59
|
-
class:
|
|
58
|
+
spread(_el$, mergeProps(()=>({
|
|
59
|
+
class: twMerge(CLASSES.base, CLASSES.variant[variant()], isDisabled() && CLASSES.flag.disabled, local.class, local.className)
|
|
60
60
|
}), {
|
|
61
61
|
get ["data-theme"] () {
|
|
62
62
|
return local.dataTheme;
|
|
@@ -81,13 +81,13 @@ const Checkbox_Checkbox = (props)=>{
|
|
|
81
81
|
return isDisabled() ? "true" : "false";
|
|
82
82
|
}
|
|
83
83
|
}), false, true);
|
|
84
|
-
|
|
84
|
+
use((el)=>{
|
|
85
85
|
inputRef = el;
|
|
86
86
|
}, _el$2);
|
|
87
|
-
|
|
87
|
+
spread(_el$2, mergeProps(others, {
|
|
88
88
|
type: "checkbox"
|
|
89
89
|
}, ()=>({
|
|
90
|
-
class:
|
|
90
|
+
class: CLASSES.slot.input
|
|
91
91
|
}), {
|
|
92
92
|
"data-slot": "checkbox-input",
|
|
93
93
|
get value () {
|
|
@@ -110,18 +110,18 @@ const Checkbox_Checkbox = (props)=>{
|
|
|
110
110
|
},
|
|
111
111
|
onChange: handleChange
|
|
112
112
|
}), false, false);
|
|
113
|
-
|
|
114
|
-
class:
|
|
113
|
+
spread(_el$3, mergeProps(()=>({
|
|
114
|
+
class: CLASSES.slot.control
|
|
115
115
|
}), {
|
|
116
116
|
"data-slot": "checkbox-control",
|
|
117
117
|
"aria-hidden": "true"
|
|
118
118
|
}), false, true);
|
|
119
|
-
|
|
120
|
-
class:
|
|
119
|
+
spread(_el$4, mergeProps(()=>({
|
|
120
|
+
class: CLASSES.slot.indicator
|
|
121
121
|
}), {
|
|
122
122
|
"data-slot": "checkbox-indicator"
|
|
123
123
|
}), false, true);
|
|
124
|
-
|
|
124
|
+
insert(_el$4, createComponent(Show, {
|
|
125
125
|
get when () {
|
|
126
126
|
return isIndeterminate();
|
|
127
127
|
},
|
|
@@ -132,39 +132,39 @@ const Checkbox_Checkbox = (props)=>{
|
|
|
132
132
|
return _tmpl$();
|
|
133
133
|
}
|
|
134
134
|
}));
|
|
135
|
-
|
|
135
|
+
insert(_el$, createComponent(Show, {
|
|
136
136
|
get when () {
|
|
137
137
|
return hasContent();
|
|
138
138
|
},
|
|
139
139
|
get children () {
|
|
140
140
|
var _el$6 = _tmpl$3();
|
|
141
|
-
|
|
142
|
-
class:
|
|
141
|
+
spread(_el$6, mergeProps(()=>({
|
|
142
|
+
class: CLASSES.slot.content
|
|
143
143
|
}), {
|
|
144
144
|
"data-slot": "checkbox-content"
|
|
145
145
|
}), false, true);
|
|
146
|
-
|
|
146
|
+
insert(_el$6, createComponent(Show, {
|
|
147
147
|
get when () {
|
|
148
148
|
return local.children;
|
|
149
149
|
},
|
|
150
150
|
get children () {
|
|
151
151
|
var _el$7 = _tmpl$2();
|
|
152
|
-
|
|
152
|
+
insert(_el$7, ()=>local.children);
|
|
153
153
|
return _el$7;
|
|
154
154
|
}
|
|
155
155
|
}), null);
|
|
156
|
-
|
|
156
|
+
insert(_el$6, createComponent(Show, {
|
|
157
157
|
get when () {
|
|
158
158
|
return local.description;
|
|
159
159
|
},
|
|
160
160
|
get children () {
|
|
161
161
|
var _el$8 = _tmpl$3();
|
|
162
|
-
|
|
163
|
-
class:
|
|
162
|
+
spread(_el$8, mergeProps(()=>({
|
|
163
|
+
class: CLASSES.slot.description
|
|
164
164
|
}), {
|
|
165
165
|
"data-slot": "description"
|
|
166
166
|
}), false, true);
|
|
167
|
-
|
|
167
|
+
insert(_el$8, ()=>local.description);
|
|
168
168
|
return _el$8;
|
|
169
169
|
}
|
|
170
170
|
}), null);
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export { __webpack_exports__default as default };
|
|
1
|
+
import external_Checkbox_js_default from "./Checkbox.js";
|
|
2
|
+
export { external_Checkbox_js_default as default };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { createComponent, insert, memo, mergeProps, spread, template } from "solid-js/web";
|
|
2
2
|
import "./CheckboxGroup.css";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
var _tmpl$ = /*#__PURE__*/
|
|
8
|
-
const
|
|
9
|
-
const [local, others] =
|
|
3
|
+
import { createSignal, splitProps } from "solid-js";
|
|
4
|
+
import { twMerge } from "tailwind-merge";
|
|
5
|
+
import { CLASSES } from "./CheckboxGroup.classes.js";
|
|
6
|
+
import { CheckboxGroupContext } from "./context.js";
|
|
7
|
+
var _tmpl$ = /*#__PURE__*/ template("<div>");
|
|
8
|
+
const CheckboxGroup_CheckboxGroup = (props)=>{
|
|
9
|
+
const [local, others] = splitProps(props, [
|
|
10
10
|
"children",
|
|
11
11
|
"class",
|
|
12
12
|
"className",
|
|
@@ -22,7 +22,7 @@ const CheckboxGroup = (props)=>{
|
|
|
22
22
|
"variant",
|
|
23
23
|
"role"
|
|
24
24
|
]);
|
|
25
|
-
const [internalValue, setInternalValue] =
|
|
25
|
+
const [internalValue, setInternalValue] = createSignal(local.defaultValue ?? []);
|
|
26
26
|
const isControlled = ()=>void 0 !== local.value;
|
|
27
27
|
const selectedValues = ()=>isControlled() ? local.value ?? [] : internalValue();
|
|
28
28
|
const variant = ()=>local.variant ?? "primary";
|
|
@@ -48,11 +48,11 @@ const CheckboxGroup = (props)=>{
|
|
|
48
48
|
handleToggle(optionValue, checked);
|
|
49
49
|
}
|
|
50
50
|
};
|
|
51
|
-
return
|
|
51
|
+
return createComponent(CheckboxGroupContext.Provider, {
|
|
52
52
|
value: contextValue,
|
|
53
53
|
get children () {
|
|
54
54
|
var _el$ = _tmpl$();
|
|
55
|
-
|
|
55
|
+
spread(_el$, mergeProps(others, {
|
|
56
56
|
get role () {
|
|
57
57
|
return local.role ?? "group";
|
|
58
58
|
},
|
|
@@ -73,7 +73,7 @@ const CheckboxGroup = (props)=>{
|
|
|
73
73
|
return isInvalid() ? "true" : "false";
|
|
74
74
|
},
|
|
75
75
|
get ["class"] () {
|
|
76
|
-
return
|
|
76
|
+
return twMerge(CLASSES.base, CLASSES.variant[variant()], isDisabled() && CLASSES.flag.disabled, isInvalid() && CLASSES.flag.invalid, local.class, local.className);
|
|
77
77
|
},
|
|
78
78
|
get ["data-theme"] () {
|
|
79
79
|
return local.dataTheme;
|
|
@@ -82,13 +82,13 @@ const CheckboxGroup = (props)=>{
|
|
|
82
82
|
return local.style;
|
|
83
83
|
}
|
|
84
84
|
}), false, true);
|
|
85
|
-
|
|
86
|
-
var _c$ =
|
|
85
|
+
insert(_el$, (()=>{
|
|
86
|
+
var _c$ = memo(()=>"function" == typeof local.children);
|
|
87
87
|
return ()=>_c$() ? local.children(selectedValues()) : local.children;
|
|
88
88
|
})());
|
|
89
89
|
return _el$;
|
|
90
90
|
}
|
|
91
91
|
});
|
|
92
92
|
};
|
|
93
|
-
const
|
|
94
|
-
export {
|
|
93
|
+
const CheckboxGroup = CheckboxGroup_CheckboxGroup;
|
|
94
|
+
export { CheckboxGroup as default };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
const CheckboxGroupContext =
|
|
1
|
+
import { createContext } from "solid-js";
|
|
2
|
+
const CheckboxGroupContext = createContext();
|
|
3
3
|
export { CheckboxGroupContext };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
const checkbox_group =
|
|
3
|
-
|
|
4
|
-
export { checkbox_group as default, __webpack_exports__CheckboxGroup as CheckboxGroup };
|
|
1
|
+
import external_CheckboxGroup_js_default from "./CheckboxGroup.js";
|
|
2
|
+
const checkbox_group = external_CheckboxGroup_js_default;
|
|
3
|
+
export { external_CheckboxGroup_js_default as CheckboxGroup, checkbox_group as default };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { createComponent, insert, memo, mergeProps, spread, template } from "solid-js/web";
|
|
2
|
+
import { clsx } from "clsx";
|
|
3
|
+
import { Show, splitProps } from "solid-js";
|
|
4
|
+
import { twMerge } from "tailwind-merge";
|
|
5
5
|
import "./Chip.css";
|
|
6
|
-
import
|
|
7
|
-
var _tmpl$ = /*#__PURE__*/
|
|
6
|
+
import { CLASSES } from "./Chip.classes.js";
|
|
7
|
+
var _tmpl$ = /*#__PURE__*/ template("<span>"), _tmpl$2 = /*#__PURE__*/ template("<button type=button>");
|
|
8
8
|
const ChipRoot = (props)=>{
|
|
9
|
-
const [local, others] =
|
|
9
|
+
const [local, others] = splitProps(props, [
|
|
10
10
|
"children",
|
|
11
11
|
"class",
|
|
12
12
|
"className",
|
|
@@ -23,11 +23,11 @@ const ChipRoot = (props)=>{
|
|
|
23
23
|
const variant = local.variant ?? "solid";
|
|
24
24
|
const color = local.color ?? "default";
|
|
25
25
|
const size = local.size ?? "md";
|
|
26
|
-
return
|
|
26
|
+
return twMerge(clsx(CLASSES.base, CLASSES.variant[variant], CLASSES.color[color], CLASSES.size[size], local.class, local.className));
|
|
27
27
|
};
|
|
28
28
|
const chipChildren = ()=>{
|
|
29
29
|
const c = local.children;
|
|
30
|
-
if ("string" == typeof c || "number" == typeof c) return
|
|
30
|
+
if ("string" == typeof c || "number" == typeof c) return createComponent(ChipLabel, {
|
|
31
31
|
children: c
|
|
32
32
|
});
|
|
33
33
|
return c;
|
|
@@ -38,7 +38,7 @@ const ChipRoot = (props)=>{
|
|
|
38
38
|
};
|
|
39
39
|
return (()=>{
|
|
40
40
|
var _el$ = _tmpl$();
|
|
41
|
-
|
|
41
|
+
spread(_el$, mergeProps(others, ()=>({
|
|
42
42
|
class: classes()
|
|
43
43
|
}), {
|
|
44
44
|
"data-slot": "chip",
|
|
@@ -49,30 +49,30 @@ const ChipRoot = (props)=>{
|
|
|
49
49
|
return local.onRemove ? "true" : "false";
|
|
50
50
|
}
|
|
51
51
|
}), false, true);
|
|
52
|
-
|
|
52
|
+
insert(_el$, createComponent(Show, {
|
|
53
53
|
get when () {
|
|
54
54
|
return local.startIcon;
|
|
55
55
|
},
|
|
56
56
|
get children () {
|
|
57
57
|
var _el$2 = _tmpl$();
|
|
58
|
-
|
|
59
|
-
class:
|
|
58
|
+
spread(_el$2, mergeProps(()=>({
|
|
59
|
+
class: twMerge(CLASSES.slot.icon, CLASSES.slot.iconStart)
|
|
60
60
|
}), {
|
|
61
61
|
"data-slot": "chip-start-icon"
|
|
62
62
|
}), false, true);
|
|
63
|
-
|
|
63
|
+
insert(_el$2, ()=>local.startIcon);
|
|
64
64
|
return _el$2;
|
|
65
65
|
}
|
|
66
66
|
}), null);
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
insert(_el$, chipChildren, null);
|
|
68
|
+
insert(_el$, createComponent(Show, {
|
|
69
69
|
get when () {
|
|
70
|
-
return local.onRemove && local.endIcon;
|
|
70
|
+
return memo(()=>!!local.onRemove)() && local.endIcon;
|
|
71
71
|
},
|
|
72
72
|
get children () {
|
|
73
73
|
var _el$3 = _tmpl$2();
|
|
74
|
-
|
|
75
|
-
class:
|
|
74
|
+
spread(_el$3, mergeProps(()=>({
|
|
75
|
+
class: CLASSES.slot.remove
|
|
76
76
|
}), {
|
|
77
77
|
"data-slot": "chip-remove",
|
|
78
78
|
get ["aria-label"] () {
|
|
@@ -83,36 +83,36 @@ const ChipRoot = (props)=>{
|
|
|
83
83
|
return Boolean(local.isDisabled);
|
|
84
84
|
}
|
|
85
85
|
}), false, true);
|
|
86
|
-
|
|
86
|
+
insert(_el$3, createComponent(Show, {
|
|
87
87
|
get when () {
|
|
88
88
|
return local.endIcon;
|
|
89
89
|
},
|
|
90
90
|
get children () {
|
|
91
91
|
var _el$4 = _tmpl$();
|
|
92
|
-
|
|
93
|
-
class:
|
|
92
|
+
spread(_el$4, mergeProps(()=>({
|
|
93
|
+
class: CLASSES.slot.removeIcon
|
|
94
94
|
}), {
|
|
95
95
|
"data-slot": "chip-remove-icon"
|
|
96
96
|
}), false, true);
|
|
97
|
-
|
|
97
|
+
insert(_el$4, ()=>local.endIcon);
|
|
98
98
|
return _el$4;
|
|
99
99
|
}
|
|
100
100
|
}));
|
|
101
101
|
return _el$3;
|
|
102
102
|
}
|
|
103
103
|
}), null);
|
|
104
|
-
|
|
104
|
+
insert(_el$, createComponent(Show, {
|
|
105
105
|
get when () {
|
|
106
|
-
return
|
|
106
|
+
return memo(()=>!local.onRemove)() && local.endIcon;
|
|
107
107
|
},
|
|
108
108
|
get children () {
|
|
109
109
|
var _el$5 = _tmpl$();
|
|
110
|
-
|
|
111
|
-
class:
|
|
110
|
+
spread(_el$5, mergeProps(()=>({
|
|
111
|
+
class: twMerge(CLASSES.slot.icon, CLASSES.slot.iconEnd)
|
|
112
112
|
}), {
|
|
113
113
|
"data-slot": "chip-end-icon"
|
|
114
114
|
}), false, true);
|
|
115
|
-
|
|
115
|
+
insert(_el$5, ()=>local.endIcon);
|
|
116
116
|
return _el$5;
|
|
117
117
|
}
|
|
118
118
|
}), null);
|
|
@@ -120,18 +120,18 @@ const ChipRoot = (props)=>{
|
|
|
120
120
|
})();
|
|
121
121
|
};
|
|
122
122
|
const ChipLabel = (props)=>{
|
|
123
|
-
const [local, others] =
|
|
123
|
+
const [local, others] = splitProps(props, [
|
|
124
124
|
"children",
|
|
125
125
|
"class"
|
|
126
126
|
]);
|
|
127
127
|
return (()=>{
|
|
128
128
|
var _el$6 = _tmpl$();
|
|
129
|
-
|
|
130
|
-
class:
|
|
129
|
+
spread(_el$6, mergeProps(()=>({
|
|
130
|
+
class: twMerge(CLASSES.slot.label, local.class)
|
|
131
131
|
}), {
|
|
132
132
|
"data-slot": "chip-label"
|
|
133
133
|
}, others), false, true);
|
|
134
|
-
|
|
134
|
+
insert(_el$6, ()=>local.children);
|
|
135
135
|
return _el$6;
|
|
136
136
|
})();
|
|
137
137
|
};
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
const Chip = Object.assign(
|
|
3
|
-
Root:
|
|
4
|
-
Label:
|
|
1
|
+
import { ChipLabel, ChipRoot } from "./Chip.js";
|
|
2
|
+
const Chip = Object.assign(ChipRoot, {
|
|
3
|
+
Root: ChipRoot,
|
|
4
|
+
Label: ChipLabel
|
|
5
5
|
});
|
|
6
6
|
const chip = Chip;
|
|
7
|
-
|
|
8
|
-
var __webpack_exports__ChipRoot = __WEBPACK_EXTERNAL_MODULE__Chip_js_7b51fe41__.ChipRoot;
|
|
9
|
-
export { Chip, chip as default, __webpack_exports__ChipLabel as ChipLabel, __webpack_exports__ChipRoot as ChipRoot };
|
|
7
|
+
export { Chip, ChipLabel, ChipRoot, chip as default };
|