@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,3 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export { __webpack_exports__default as default };
|
|
1
|
+
import external_Radio_js_default from "./Radio.js";
|
|
2
|
+
export { external_Radio_js_default as default };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { createComponent, insert, mergeProps, setAttribute, spread, template } from "solid-js/web";
|
|
2
2
|
import "./RadioGroup.css";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
var _tmpl$ = /*#__PURE__*/
|
|
8
|
-
const
|
|
9
|
-
const [local, others] =
|
|
3
|
+
import { Show, createSignal, createUniqueId, splitProps } from "solid-js";
|
|
4
|
+
import { twMerge } from "tailwind-merge";
|
|
5
|
+
import { RadioGroupContext } from "./context.js";
|
|
6
|
+
import { CLASSES } from "./RadioGroup.classes.js";
|
|
7
|
+
var _tmpl$ = /*#__PURE__*/ template("<span>"), _tmpl$2 = /*#__PURE__*/ template("<div><div>");
|
|
8
|
+
const RadioGroup_RadioGroup = (props)=>{
|
|
9
|
+
const [local, others] = splitProps(props, [
|
|
10
10
|
"children",
|
|
11
11
|
"class",
|
|
12
12
|
"className",
|
|
@@ -26,9 +26,9 @@ const RadioGroup = (props)=>{
|
|
|
26
26
|
"aria-describedby",
|
|
27
27
|
"aria-labelledby"
|
|
28
28
|
]);
|
|
29
|
-
const baseId =
|
|
29
|
+
const baseId = createUniqueId();
|
|
30
30
|
const generatedName = `${baseId}-radio-group`;
|
|
31
|
-
const [internalValue, setInternalValue] =
|
|
31
|
+
const [internalValue, setInternalValue] = createSignal(local.defaultValue);
|
|
32
32
|
const labelId = `${baseId}-label`;
|
|
33
33
|
const descriptionId = `${baseId}-description`;
|
|
34
34
|
const errorId = `${baseId}-error`;
|
|
@@ -63,11 +63,11 @@ const RadioGroup = (props)=>{
|
|
|
63
63
|
handleChange(value);
|
|
64
64
|
}
|
|
65
65
|
};
|
|
66
|
-
return
|
|
66
|
+
return createComponent(RadioGroupContext.Provider, {
|
|
67
67
|
value: contextValue,
|
|
68
68
|
get children () {
|
|
69
69
|
var _el$ = _tmpl$2(), _el$4 = _el$.firstChild;
|
|
70
|
-
|
|
70
|
+
spread(_el$, mergeProps(others, {
|
|
71
71
|
role: "radiogroup",
|
|
72
72
|
get ["aria-invalid"] () {
|
|
73
73
|
return isInvalid() ? "true" : void 0;
|
|
@@ -95,59 +95,59 @@ const RadioGroup = (props)=>{
|
|
|
95
95
|
return isInvalid() ? "true" : "false";
|
|
96
96
|
}
|
|
97
97
|
}, ()=>({
|
|
98
|
-
class:
|
|
98
|
+
class: twMerge(CLASSES.base, CLASSES.orientation[orientation()], CLASSES.variant[variant()], isDisabled() && CLASSES.flag.disabled, isInvalid() && CLASSES.flag.invalid, local.class, local.className)
|
|
99
99
|
})), false, true);
|
|
100
|
-
|
|
100
|
+
insert(_el$, createComponent(Show, {
|
|
101
101
|
get when () {
|
|
102
102
|
return local.label;
|
|
103
103
|
},
|
|
104
104
|
get children () {
|
|
105
105
|
var _el$2 = _tmpl$();
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
class:
|
|
106
|
+
setAttribute(_el$2, "id", labelId);
|
|
107
|
+
spread(_el$2, mergeProps(()=>({
|
|
108
|
+
class: CLASSES.slot.label
|
|
109
109
|
}), {
|
|
110
110
|
"data-slot": "label"
|
|
111
111
|
}), false, true);
|
|
112
|
-
|
|
112
|
+
insert(_el$2, ()=>local.label);
|
|
113
113
|
return _el$2;
|
|
114
114
|
}
|
|
115
115
|
}), _el$4);
|
|
116
|
-
|
|
116
|
+
insert(_el$, createComponent(Show, {
|
|
117
117
|
get when () {
|
|
118
118
|
return local.description;
|
|
119
119
|
},
|
|
120
120
|
get children () {
|
|
121
121
|
var _el$3 = _tmpl$();
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
class:
|
|
122
|
+
setAttribute(_el$3, "id", descriptionId);
|
|
123
|
+
spread(_el$3, mergeProps(()=>({
|
|
124
|
+
class: CLASSES.slot.description
|
|
125
125
|
}), {
|
|
126
126
|
"data-slot": "description"
|
|
127
127
|
}), false, true);
|
|
128
|
-
|
|
128
|
+
insert(_el$3, ()=>local.description);
|
|
129
129
|
return _el$3;
|
|
130
130
|
}
|
|
131
131
|
}), _el$4);
|
|
132
|
-
|
|
133
|
-
class:
|
|
132
|
+
spread(_el$4, mergeProps(()=>({
|
|
133
|
+
class: CLASSES.slot.items
|
|
134
134
|
}), {
|
|
135
135
|
"data-slot": "radio-group-items"
|
|
136
136
|
}), false, true);
|
|
137
|
-
|
|
138
|
-
|
|
137
|
+
insert(_el$4, ()=>local.children);
|
|
138
|
+
insert(_el$, createComponent(Show, {
|
|
139
139
|
get when () {
|
|
140
140
|
return local.errorMessage;
|
|
141
141
|
},
|
|
142
142
|
get children () {
|
|
143
143
|
var _el$5 = _tmpl$();
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
class:
|
|
144
|
+
setAttribute(_el$5, "id", errorId);
|
|
145
|
+
spread(_el$5, mergeProps(()=>({
|
|
146
|
+
class: CLASSES.slot.error
|
|
147
147
|
}), {
|
|
148
148
|
"data-slot": "error-message"
|
|
149
149
|
}), false, true);
|
|
150
|
-
|
|
150
|
+
insert(_el$5, ()=>local.errorMessage);
|
|
151
151
|
return _el$5;
|
|
152
152
|
}
|
|
153
153
|
}), null);
|
|
@@ -155,5 +155,5 @@ const RadioGroup = (props)=>{
|
|
|
155
155
|
}
|
|
156
156
|
});
|
|
157
157
|
};
|
|
158
|
-
const
|
|
159
|
-
export {
|
|
158
|
+
const RadioGroup = RadioGroup_RadioGroup;
|
|
159
|
+
export { RadioGroup as default };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
const RadioGroupContext =
|
|
1
|
+
import { createContext } from "solid-js";
|
|
2
|
+
const RadioGroupContext = createContext();
|
|
3
3
|
export { RadioGroupContext };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
const radio_group =
|
|
3
|
-
|
|
4
|
-
export { radio_group as default, __webpack_exports__RadioGroup as RadioGroup };
|
|
1
|
+
import external_RadioGroup_js_default from "./RadioGroup.js";
|
|
2
|
+
const radio_group = external_RadioGroup_js_default;
|
|
3
|
+
export { external_RadioGroup_js_default as RadioGroup, radio_group as default };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { createComponent, insert, mergeProps, spread, template, use } from "solid-js/web";
|
|
2
2
|
import "./RangeCalendar.css";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
var _tmpl$ = /*#__PURE__*/
|
|
3
|
+
import { createMemo, splitProps } from "solid-js";
|
|
4
|
+
import { twMerge } from "tailwind-merge";
|
|
5
|
+
import { useRangeSelection } from "../../hooks/date/index.js";
|
|
6
|
+
import index_js_default from "../calendar/index.js";
|
|
7
|
+
import { CLASSES } from "./RangeCalendar.classes.js";
|
|
8
|
+
var _tmpl$ = /*#__PURE__*/ template("<div>");
|
|
9
9
|
const RangeCalendar_RangeCalendar = (props)=>{
|
|
10
|
-
const [local, others] =
|
|
10
|
+
const [local, others] = splitProps(props, [
|
|
11
11
|
"class",
|
|
12
12
|
"className",
|
|
13
13
|
"dataTheme",
|
|
@@ -27,8 +27,8 @@ const RangeCalendar_RangeCalendar = (props)=>{
|
|
|
27
27
|
"onDaySelect",
|
|
28
28
|
"onDayHover"
|
|
29
29
|
]);
|
|
30
|
-
const isDisabled =
|
|
31
|
-
const rangeSelection =
|
|
30
|
+
const isDisabled = createMemo(()=>Boolean(local.isDisabled) || Boolean(local.disabled));
|
|
31
|
+
const rangeSelection = useRangeSelection({
|
|
32
32
|
value: ()=>local.value,
|
|
33
33
|
defaultValue: ()=>local.defaultValue,
|
|
34
34
|
onChange: ()=>local.onChange
|
|
@@ -43,10 +43,10 @@ const RangeCalendar_RangeCalendar = (props)=>{
|
|
|
43
43
|
};
|
|
44
44
|
return (()=>{
|
|
45
45
|
var _el$ = _tmpl$();
|
|
46
|
-
|
|
46
|
+
use((node)=>{
|
|
47
47
|
if ("function" == typeof local.ref) local.ref(node);
|
|
48
48
|
}, _el$);
|
|
49
|
-
|
|
49
|
+
spread(_el$, mergeProps(others, {
|
|
50
50
|
"data-slot": "range-calendar",
|
|
51
51
|
get ["data-disabled"] () {
|
|
52
52
|
return isDisabled() ? "true" : "false";
|
|
@@ -61,10 +61,10 @@ const RangeCalendar_RangeCalendar = (props)=>{
|
|
|
61
61
|
return isDisabled() ? "true" : void 0;
|
|
62
62
|
}
|
|
63
63
|
}, ()=>({
|
|
64
|
-
class:
|
|
64
|
+
class: twMerge(CLASSES.Root.base, isDisabled() && CLASSES.Root.flag.disabled, local.class, local.className)
|
|
65
65
|
})), false, true);
|
|
66
|
-
|
|
67
|
-
class:
|
|
66
|
+
insert(_el$, createComponent(index_js_default, mergeProps(()=>({
|
|
67
|
+
class: CLASSES.Calendar.base
|
|
68
68
|
}), {
|
|
69
69
|
selectionMode: "range",
|
|
70
70
|
get value () {
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export { __webpack_exports__default as default };
|
|
1
|
+
import external_RangeCalendar_js_default from "./RangeCalendar.js";
|
|
2
|
+
export { external_RangeCalendar_js_default as default };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { insert, mergeProps, spread, template, use } from "solid-js/web";
|
|
2
2
|
import "./ScrollShadow.css";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
var _tmpl$ = /*#__PURE__*/
|
|
8
|
-
const
|
|
9
|
-
const [local, others] =
|
|
3
|
+
import { createEffect, createMemo, splitProps } from "solid-js";
|
|
4
|
+
import { twMerge } from "tailwind-merge";
|
|
5
|
+
import { CLASSES } from "./ScrollShadow.classes.js";
|
|
6
|
+
import { applyControlledScrollShadowVisibility, clearScrollShadowDataAttributes, useScrollShadow } from "./useScrollShadow.js";
|
|
7
|
+
var _tmpl$ = /*#__PURE__*/ template("<div>");
|
|
8
|
+
const ScrollShadow_ScrollShadow = (props)=>{
|
|
9
|
+
const [local, others] = splitProps(props, [
|
|
10
10
|
"children",
|
|
11
11
|
"class",
|
|
12
12
|
"className",
|
|
@@ -29,7 +29,7 @@ const ScrollShadow = (props)=>{
|
|
|
29
29
|
const visibility = ()=>local.visibility ?? "auto";
|
|
30
30
|
const orientation = ()=>local.orientation ?? "vertical";
|
|
31
31
|
const isEnabled = ()=>local.isEnabled ?? true;
|
|
32
|
-
|
|
32
|
+
useScrollShadow({
|
|
33
33
|
containerRef: ()=>containerRef,
|
|
34
34
|
orientation,
|
|
35
35
|
offset,
|
|
@@ -37,16 +37,16 @@ const ScrollShadow = (props)=>{
|
|
|
37
37
|
isEnabled,
|
|
38
38
|
onVisibilityChange: ()=>local.onVisibilityChange
|
|
39
39
|
});
|
|
40
|
-
|
|
40
|
+
createEffect(()=>{
|
|
41
41
|
const el = containerRef;
|
|
42
42
|
if (!el) return;
|
|
43
|
-
if (!isEnabled()) return void
|
|
43
|
+
if (!isEnabled()) return void clearScrollShadowDataAttributes(el);
|
|
44
44
|
const currentVisibility = visibility();
|
|
45
45
|
if ("auto" === currentVisibility) return;
|
|
46
|
-
|
|
46
|
+
applyControlledScrollShadowVisibility(el, currentVisibility, orientation());
|
|
47
47
|
});
|
|
48
|
-
const classes =
|
|
49
|
-
const style =
|
|
48
|
+
const classes = createMemo(()=>twMerge(CLASSES.base, CLASSES.orientation[orientation()], CLASSES.variant[variant()], local.hideScrollBar && CLASSES.flag.hideScrollBar, local.class, local.className));
|
|
49
|
+
const style = createMemo(()=>{
|
|
50
50
|
if ("string" == typeof local.style) {
|
|
51
51
|
const trimmed = local.style.trim();
|
|
52
52
|
const suffix = trimmed.length > 0 && !trimmed.endsWith(";") ? ";" : "";
|
|
@@ -59,11 +59,11 @@ const ScrollShadow = (props)=>{
|
|
|
59
59
|
});
|
|
60
60
|
return (()=>{
|
|
61
61
|
var _el$ = _tmpl$();
|
|
62
|
-
|
|
62
|
+
use((el)=>{
|
|
63
63
|
containerRef = el;
|
|
64
64
|
if ("function" == typeof local.ref) local.ref(el);
|
|
65
65
|
}, _el$);
|
|
66
|
-
|
|
66
|
+
spread(_el$, mergeProps(others, ()=>({
|
|
67
67
|
class: classes()
|
|
68
68
|
}), {
|
|
69
69
|
get ["data-theme"] () {
|
|
@@ -79,9 +79,9 @@ const ScrollShadow = (props)=>{
|
|
|
79
79
|
return style();
|
|
80
80
|
}
|
|
81
81
|
}), false, true);
|
|
82
|
-
|
|
82
|
+
insert(_el$, ()=>local.children);
|
|
83
83
|
return _el$;
|
|
84
84
|
})();
|
|
85
85
|
};
|
|
86
|
-
const
|
|
87
|
-
export {
|
|
86
|
+
const ScrollShadow = ScrollShadow_ScrollShadow;
|
|
87
|
+
export { ScrollShadow as default };
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export { __webpack_exports__default as default };
|
|
1
|
+
import external_ScrollShadow_js_default from "./ScrollShadow.js";
|
|
2
|
+
export { external_ScrollShadow_js_default as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { createEffect, onCleanup } from "solid-js";
|
|
2
2
|
const clearScrollShadowDataAttributes = (el)=>{
|
|
3
3
|
delete el.dataset.topScroll;
|
|
4
4
|
delete el.dataset.bottomScroll;
|
|
@@ -50,7 +50,7 @@ const applyAutoVisibilityDataAttributes = (el, orientation, hasScrollBefore, has
|
|
|
50
50
|
delete el.dataset.leftRightScroll;
|
|
51
51
|
};
|
|
52
52
|
const useScrollShadow = (props)=>{
|
|
53
|
-
|
|
53
|
+
createEffect(()=>{
|
|
54
54
|
const el = props.containerRef();
|
|
55
55
|
const isEnabled = props.isEnabled();
|
|
56
56
|
const visibility = props.visibility();
|
|
@@ -86,7 +86,7 @@ const useScrollShadow = (props)=>{
|
|
|
86
86
|
});
|
|
87
87
|
const resizeObserver = "undefined" != typeof ResizeObserver ? new ResizeObserver(()=>checkOverflow()) : void 0;
|
|
88
88
|
resizeObserver?.observe(el);
|
|
89
|
-
|
|
89
|
+
onCleanup(()=>{
|
|
90
90
|
el.removeEventListener("scroll", checkOverflow);
|
|
91
91
|
resizeObserver?.disconnect();
|
|
92
92
|
if (null !== rafId) cancelAnimationFrame(rafId);
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { createComponent, insert, memo, mergeProps, spread, template } from "solid-js/web";
|
|
2
2
|
import "./SearchField.css";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
var _tmpl$ = /*#__PURE__*/
|
|
8
|
-
const SearchFieldContext =
|
|
3
|
+
import { Show, createContext, createSignal, splitProps, useContext } from "solid-js";
|
|
4
|
+
import { twMerge } from "tailwind-merge";
|
|
5
|
+
import index_js_default from "../close-button/index.js";
|
|
6
|
+
import { CLASSES } from "./SearchField.classes.js";
|
|
7
|
+
var _tmpl$ = /*#__PURE__*/ template("<div>"), _tmpl$2 = /*#__PURE__*/ template("<input>"), _tmpl$3 = /*#__PURE__*/ template("<span>");
|
|
8
|
+
const SearchFieldContext = createContext();
|
|
9
9
|
const invokeEventHandler = (handler, event)=>{
|
|
10
10
|
if ("function" == typeof handler) return void handler(event);
|
|
11
11
|
if (Array.isArray(handler) && "function" == typeof handler[0]) handler[0](handler[1], event);
|
|
12
12
|
};
|
|
13
13
|
const SearchFieldRoot = (props)=>{
|
|
14
|
-
const [local, others] =
|
|
14
|
+
const [local, others] = splitProps(props, [
|
|
15
15
|
"children",
|
|
16
16
|
"startIcon",
|
|
17
17
|
"endIcon",
|
|
@@ -30,7 +30,7 @@ const SearchFieldRoot = (props)=>{
|
|
|
30
30
|
"disabled",
|
|
31
31
|
"isInvalid"
|
|
32
32
|
]);
|
|
33
|
-
const [internalValue, setInternalValue] =
|
|
33
|
+
const [internalValue, setInternalValue] = createSignal(local.defaultValue ?? "");
|
|
34
34
|
const isControlled = ()=>void 0 !== local.value;
|
|
35
35
|
const value = ()=>isControlled() ? local.value ?? "" : internalValue();
|
|
36
36
|
const isEmpty = ()=>0 === value().length;
|
|
@@ -59,12 +59,12 @@ const SearchFieldRoot = (props)=>{
|
|
|
59
59
|
setValue,
|
|
60
60
|
clearValue: ()=>setValue("")
|
|
61
61
|
};
|
|
62
|
-
return
|
|
62
|
+
return createComponent(SearchFieldContext.Provider, {
|
|
63
63
|
value: contextValue,
|
|
64
64
|
get children () {
|
|
65
65
|
var _el$ = _tmpl$();
|
|
66
|
-
|
|
67
|
-
class:
|
|
66
|
+
spread(_el$, mergeProps(others, ()=>({
|
|
67
|
+
class: twMerge(CLASSES.Root.base, CLASSES.Root.variant[variant()], fullWidth() && CLASSES.Root.flag.fullWidth, local.class, local.className)
|
|
68
68
|
}), {
|
|
69
69
|
"data-slot": "search-field",
|
|
70
70
|
get ["data-empty"] () {
|
|
@@ -89,30 +89,30 @@ const SearchFieldRoot = (props)=>{
|
|
|
89
89
|
return local.style;
|
|
90
90
|
}
|
|
91
91
|
}), false, true);
|
|
92
|
-
|
|
93
|
-
var _c$ =
|
|
94
|
-
return ()=>_c$() ? local.children(renderProps()) :
|
|
92
|
+
insert(_el$, (()=>{
|
|
93
|
+
var _c$ = memo(()=>"function" == typeof local.children);
|
|
94
|
+
return ()=>_c$() ? local.children(renderProps()) : memo(()=>!!local.children)() ? local.children : createComponent(SearchFieldGroup, {
|
|
95
95
|
get children () {
|
|
96
96
|
return [
|
|
97
|
-
|
|
97
|
+
createComponent(Show, {
|
|
98
98
|
get when () {
|
|
99
99
|
return local.startIcon;
|
|
100
100
|
},
|
|
101
101
|
get children () {
|
|
102
|
-
return
|
|
102
|
+
return createComponent(SearchFieldSearchIcon, {
|
|
103
103
|
get children () {
|
|
104
104
|
return local.startIcon;
|
|
105
105
|
}
|
|
106
106
|
});
|
|
107
107
|
}
|
|
108
108
|
}),
|
|
109
|
-
|
|
110
|
-
|
|
109
|
+
createComponent(SearchFieldInput, {}),
|
|
110
|
+
createComponent(Show, {
|
|
111
111
|
get when () {
|
|
112
112
|
return local.endIcon;
|
|
113
113
|
},
|
|
114
114
|
get children () {
|
|
115
|
-
return
|
|
115
|
+
return createComponent(SearchFieldClearButton, {
|
|
116
116
|
get children () {
|
|
117
117
|
return local.endIcon;
|
|
118
118
|
}
|
|
@@ -128,8 +128,8 @@ const SearchFieldRoot = (props)=>{
|
|
|
128
128
|
});
|
|
129
129
|
};
|
|
130
130
|
const SearchFieldGroup = (props)=>{
|
|
131
|
-
const context =
|
|
132
|
-
const [local, others] =
|
|
131
|
+
const context = useContext(SearchFieldContext);
|
|
132
|
+
const [local, others] = splitProps(props, [
|
|
133
133
|
"children",
|
|
134
134
|
"class",
|
|
135
135
|
"className",
|
|
@@ -144,8 +144,8 @@ const SearchFieldGroup = (props)=>{
|
|
|
144
144
|
});
|
|
145
145
|
return (()=>{
|
|
146
146
|
var _el$2 = _tmpl$();
|
|
147
|
-
|
|
148
|
-
class:
|
|
147
|
+
spread(_el$2, mergeProps(others, ()=>({
|
|
148
|
+
class: twMerge(CLASSES.Group.base, context?.fullWidth() && CLASSES.Group.flag.fullWidth, local.class, local.className)
|
|
149
149
|
}), {
|
|
150
150
|
"data-slot": "search-field-group",
|
|
151
151
|
get ["data-invalid"] () {
|
|
@@ -161,16 +161,16 @@ const SearchFieldGroup = (props)=>{
|
|
|
161
161
|
return local.style;
|
|
162
162
|
}
|
|
163
163
|
}), false, true);
|
|
164
|
-
|
|
165
|
-
var _c$2 =
|
|
164
|
+
insert(_el$2, (()=>{
|
|
165
|
+
var _c$2 = memo(()=>"function" == typeof local.children);
|
|
166
166
|
return ()=>_c$2() ? local.children(renderProps()) : local.children;
|
|
167
167
|
})());
|
|
168
168
|
return _el$2;
|
|
169
169
|
})();
|
|
170
170
|
};
|
|
171
171
|
const SearchFieldInput = (props)=>{
|
|
172
|
-
const context =
|
|
173
|
-
const [local, others] =
|
|
172
|
+
const context = useContext(SearchFieldContext);
|
|
173
|
+
const [local, others] = splitProps(props, [
|
|
174
174
|
"class",
|
|
175
175
|
"className",
|
|
176
176
|
"dataTheme",
|
|
@@ -190,10 +190,10 @@ const SearchFieldInput = (props)=>{
|
|
|
190
190
|
};
|
|
191
191
|
return (()=>{
|
|
192
192
|
var _el$3 = _tmpl$2();
|
|
193
|
-
|
|
193
|
+
spread(_el$3, mergeProps(others, {
|
|
194
194
|
type: "search"
|
|
195
195
|
}, ()=>({
|
|
196
|
-
class:
|
|
196
|
+
class: twMerge(CLASSES.Input.base, local.class, local.className)
|
|
197
197
|
}), {
|
|
198
198
|
"data-slot": "search-field-input",
|
|
199
199
|
get ["data-theme"] () {
|
|
@@ -224,7 +224,7 @@ const SearchFieldInput = (props)=>{
|
|
|
224
224
|
})();
|
|
225
225
|
};
|
|
226
226
|
const SearchFieldSearchIcon = (props)=>{
|
|
227
|
-
const [local, others] =
|
|
227
|
+
const [local, others] = splitProps(props, [
|
|
228
228
|
"children",
|
|
229
229
|
"class",
|
|
230
230
|
"className",
|
|
@@ -234,8 +234,8 @@ const SearchFieldSearchIcon = (props)=>{
|
|
|
234
234
|
if (!local.children) return null;
|
|
235
235
|
return (()=>{
|
|
236
236
|
var _el$4 = _tmpl$3();
|
|
237
|
-
|
|
238
|
-
class:
|
|
237
|
+
spread(_el$4, mergeProps(others, ()=>({
|
|
238
|
+
class: twMerge(CLASSES.SearchIcon.base, local.class, local.className)
|
|
239
239
|
}), {
|
|
240
240
|
"data-slot": "search-field-search-icon",
|
|
241
241
|
get ["data-theme"] () {
|
|
@@ -245,14 +245,14 @@ const SearchFieldSearchIcon = (props)=>{
|
|
|
245
245
|
return local.style;
|
|
246
246
|
}
|
|
247
247
|
}), false, true);
|
|
248
|
-
|
|
248
|
+
insert(_el$4, ()=>local.children);
|
|
249
249
|
return _el$4;
|
|
250
250
|
})();
|
|
251
251
|
};
|
|
252
252
|
const SearchFieldClearButton = (props)=>{
|
|
253
|
-
const context =
|
|
253
|
+
const context = useContext(SearchFieldContext);
|
|
254
254
|
const hasIcon = ()=>null != props.children || null != props.startIcon || null != props.endIcon;
|
|
255
|
-
const [local, others] =
|
|
255
|
+
const [local, others] = splitProps(props, [
|
|
256
256
|
"class",
|
|
257
257
|
"className",
|
|
258
258
|
"dataTheme",
|
|
@@ -265,8 +265,8 @@ const SearchFieldClearButton = (props)=>{
|
|
|
265
265
|
if (event.defaultPrevented) return;
|
|
266
266
|
context?.clearValue();
|
|
267
267
|
};
|
|
268
|
-
return
|
|
269
|
-
class:
|
|
268
|
+
return createComponent(index_js_default, mergeProps(others, ()=>({
|
|
269
|
+
class: twMerge(CLASSES.ClearButton.base, local.class, local.className)
|
|
270
270
|
}), {
|
|
271
271
|
"data-slot": "search-field-clear-button",
|
|
272
272
|
get ["data-theme"] () {
|
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
var __webpack_exports__SearchFieldClearButton = __WEBPACK_EXTERNAL_MODULE__SearchField_js_abba5c84__.SearchFieldClearButton;
|
|
4
|
-
var __webpack_exports__SearchFieldGroup = __WEBPACK_EXTERNAL_MODULE__SearchField_js_abba5c84__.SearchFieldGroup;
|
|
5
|
-
var __webpack_exports__SearchFieldInput = __WEBPACK_EXTERNAL_MODULE__SearchField_js_abba5c84__.SearchFieldInput;
|
|
6
|
-
var __webpack_exports__SearchFieldRoot = __WEBPACK_EXTERNAL_MODULE__SearchField_js_abba5c84__.SearchFieldRoot;
|
|
7
|
-
var __webpack_exports__SearchFieldSearchIcon = __WEBPACK_EXTERNAL_MODULE__SearchField_js_abba5c84__.SearchFieldSearchIcon;
|
|
8
|
-
var __webpack_exports__default = __WEBPACK_EXTERNAL_MODULE__SearchField_js_abba5c84__["default"];
|
|
9
|
-
export { __webpack_exports__SearchField as SearchField, __webpack_exports__SearchFieldClearButton as SearchFieldClearButton, __webpack_exports__SearchFieldGroup as SearchFieldGroup, __webpack_exports__SearchFieldInput as SearchFieldInput, __webpack_exports__SearchFieldRoot as SearchFieldRoot, __webpack_exports__SearchFieldSearchIcon as SearchFieldSearchIcon, __webpack_exports__default as default };
|
|
1
|
+
import external_SearchField_js_default, { SearchField, SearchFieldClearButton, SearchFieldGroup, SearchFieldInput, SearchFieldRoot, SearchFieldSearchIcon } from "./SearchField.js";
|
|
2
|
+
export { SearchField, SearchFieldClearButton, SearchFieldGroup, SearchFieldInput, SearchFieldRoot, SearchFieldSearchIcon, external_SearchField_js_default as default };
|