@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,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
var _tmpl$ = /*#__PURE__*/
|
|
1
|
+
import { insert, mergeProps, spread, template } from "solid-js/web";
|
|
2
|
+
import { children, createMemo, splitProps } from "solid-js";
|
|
3
|
+
import { twMerge } from "tailwind-merge";
|
|
4
|
+
import { CLASSES } from "./Navbar.classes.js";
|
|
5
|
+
var _tmpl$ = /*#__PURE__*/ template("<div>");
|
|
6
6
|
const NavbarStack = (props)=>{
|
|
7
|
-
const [local, others] =
|
|
7
|
+
const [local, others] = splitProps(props, [
|
|
8
8
|
"children",
|
|
9
9
|
"sticky",
|
|
10
10
|
"container",
|
|
@@ -13,11 +13,11 @@ const NavbarStack = (props)=>{
|
|
|
13
13
|
"style",
|
|
14
14
|
"dataTheme"
|
|
15
15
|
]);
|
|
16
|
-
const resolvedChildren =
|
|
17
|
-
const classes =
|
|
16
|
+
const resolvedChildren = children(()=>local.children);
|
|
17
|
+
const classes = createMemo(()=>twMerge(CLASSES.stack.base, local.sticky && CLASSES.stack.flag.sticky, local.container && CLASSES.stack.flag.container, local.class, local.className));
|
|
18
18
|
return (()=>{
|
|
19
19
|
var _el$ = _tmpl$();
|
|
20
|
-
|
|
20
|
+
spread(_el$, mergeProps(()=>({
|
|
21
21
|
class: classes()
|
|
22
22
|
}), {
|
|
23
23
|
get style () {
|
|
@@ -27,7 +27,7 @@ const NavbarStack = (props)=>{
|
|
|
27
27
|
return local.dataTheme;
|
|
28
28
|
}
|
|
29
29
|
}, others), false, true);
|
|
30
|
-
|
|
30
|
+
insert(_el$, resolvedChildren);
|
|
31
31
|
return _el$;
|
|
32
32
|
})();
|
|
33
33
|
};
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export { __webpack_exports__default as default };
|
|
1
|
+
import external_Navbar_js_default from "./Navbar.js";
|
|
2
|
+
export { external_Navbar_js_default as default };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { insert, memo, mergeProps, spread, template, use } from "solid-js/web";
|
|
2
2
|
import "./NoiseBackground.css";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
var _tmpl$ = /*#__PURE__*/
|
|
3
|
+
import { onCleanup, onMount, splitProps } from "solid-js";
|
|
4
|
+
import { twMerge } from "tailwind-merge";
|
|
5
|
+
import { CLASSES } from "./NoiseBackground.classes.js";
|
|
6
|
+
var _tmpl$ = /*#__PURE__*/ template("<div><div></div><div></div><div></div><div></div><div>"), _tmpl$2 = /*#__PURE__*/ template("<div><img alt>");
|
|
7
7
|
function createSpring(initial, stiffness = 100, damping = 30) {
|
|
8
8
|
let current = initial;
|
|
9
9
|
let velocity = 0;
|
|
@@ -21,8 +21,8 @@ function createSpring(initial, stiffness = 100, damping = 30) {
|
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
const
|
|
25
|
-
const [local, others] =
|
|
24
|
+
const NoiseBackground_NoiseBackground = (rawProps)=>{
|
|
25
|
+
const [local, others] = splitProps(rawProps, [
|
|
26
26
|
"children",
|
|
27
27
|
"class",
|
|
28
28
|
"className",
|
|
@@ -67,7 +67,7 @@ const NoiseBackground = (rawProps)=>{
|
|
|
67
67
|
y: Math.sin(angle) * mag
|
|
68
68
|
};
|
|
69
69
|
};
|
|
70
|
-
|
|
70
|
+
onMount(()=>{
|
|
71
71
|
if (!containerRef) return;
|
|
72
72
|
const initRect = containerRef.getBoundingClientRect();
|
|
73
73
|
const cx = initRect.width / 2;
|
|
@@ -137,16 +137,16 @@ const NoiseBackground = (rawProps)=>{
|
|
|
137
137
|
};
|
|
138
138
|
rafId = requestAnimationFrame(tick);
|
|
139
139
|
});
|
|
140
|
-
|
|
140
|
+
onCleanup(()=>{
|
|
141
141
|
if (void 0 !== rafId) cancelAnimationFrame(rafId);
|
|
142
142
|
});
|
|
143
|
-
const containerClasses = ()=>
|
|
144
|
-
const contentClasses = ()=>
|
|
143
|
+
const containerClasses = ()=>twMerge(CLASSES.base, (local.backdropBlur ?? false) && CLASSES.flag.backdropBlur, local.containerClass);
|
|
144
|
+
const contentClasses = ()=>twMerge(CLASSES.slot.content, local.class, local.className);
|
|
145
145
|
return (()=>{
|
|
146
146
|
var _el$ = _tmpl$(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling, _el$6 = _el$5.nextSibling;
|
|
147
147
|
var _ref$ = containerRef;
|
|
148
|
-
"function" == typeof _ref$ ?
|
|
149
|
-
|
|
148
|
+
"function" == typeof _ref$ ? use(_ref$, _el$) : containerRef = _el$;
|
|
149
|
+
spread(_el$, mergeProps(()=>({
|
|
150
150
|
class: containerClasses()
|
|
151
151
|
}), {
|
|
152
152
|
get style () {
|
|
@@ -161,24 +161,24 @@ const NoiseBackground = (rawProps)=>{
|
|
|
161
161
|
}
|
|
162
162
|
}, others), false, true);
|
|
163
163
|
var _ref$2 = layer0;
|
|
164
|
-
"function" == typeof _ref$2 ?
|
|
165
|
-
|
|
166
|
-
class:
|
|
164
|
+
"function" == typeof _ref$2 ? use(_ref$2, _el$2) : layer0 = _el$2;
|
|
165
|
+
spread(_el$2, mergeProps(()=>({
|
|
166
|
+
class: CLASSES.slot.layer0
|
|
167
167
|
})), false, false);
|
|
168
168
|
var _ref$3 = layer1;
|
|
169
|
-
"function" == typeof _ref$3 ?
|
|
170
|
-
|
|
171
|
-
class:
|
|
169
|
+
"function" == typeof _ref$3 ? use(_ref$3, _el$3) : layer1 = _el$3;
|
|
170
|
+
spread(_el$3, mergeProps(()=>({
|
|
171
|
+
class: CLASSES.slot.layer1
|
|
172
172
|
})), false, false);
|
|
173
173
|
var _ref$4 = layer2;
|
|
174
|
-
"function" == typeof _ref$4 ?
|
|
175
|
-
|
|
176
|
-
class:
|
|
174
|
+
"function" == typeof _ref$4 ? use(_ref$4, _el$4) : layer2 = _el$4;
|
|
175
|
+
spread(_el$4, mergeProps(()=>({
|
|
176
|
+
class: CLASSES.slot.layer2
|
|
177
177
|
})), false, false);
|
|
178
178
|
var _ref$5 = stripEl;
|
|
179
|
-
"function" == typeof _ref$5 ?
|
|
180
|
-
|
|
181
|
-
class:
|
|
179
|
+
"function" == typeof _ref$5 ? use(_ref$5, _el$5) : stripEl = _el$5;
|
|
180
|
+
spread(_el$5, mergeProps(()=>({
|
|
181
|
+
class: CLASSES.slot.strip
|
|
182
182
|
}), {
|
|
183
183
|
get style () {
|
|
184
184
|
return {
|
|
@@ -187,19 +187,19 @@ const NoiseBackground = (rawProps)=>{
|
|
|
187
187
|
};
|
|
188
188
|
}
|
|
189
189
|
}), false, false);
|
|
190
|
-
|
|
191
|
-
var _c$ =
|
|
190
|
+
insert(_el$, (()=>{
|
|
191
|
+
var _c$ = memo(()=>!!(local.showNoise ?? false));
|
|
192
192
|
return ()=>_c$() && (()=>{
|
|
193
193
|
var _el$7 = _tmpl$2(), _el$8 = _el$7.firstChild;
|
|
194
|
-
|
|
195
|
-
class:
|
|
194
|
+
spread(_el$7, mergeProps(()=>({
|
|
195
|
+
class: CLASSES.slot.noiseWrap
|
|
196
196
|
})), false, true);
|
|
197
|
-
|
|
197
|
+
spread(_el$8, mergeProps({
|
|
198
198
|
get src () {
|
|
199
199
|
return local.noiseSrc ?? "/noise.webp";
|
|
200
200
|
}
|
|
201
201
|
}, ()=>({
|
|
202
|
-
class:
|
|
202
|
+
class: CLASSES.slot.noiseImage
|
|
203
203
|
}), {
|
|
204
204
|
style: {
|
|
205
205
|
opacity: "var(--noise-opacity, 0.2)"
|
|
@@ -208,12 +208,12 @@ const NoiseBackground = (rawProps)=>{
|
|
|
208
208
|
return _el$7;
|
|
209
209
|
})();
|
|
210
210
|
})(), _el$6);
|
|
211
|
-
|
|
211
|
+
spread(_el$6, mergeProps(()=>({
|
|
212
212
|
class: contentClasses()
|
|
213
213
|
})), false, true);
|
|
214
|
-
|
|
214
|
+
insert(_el$6, ()=>local.children);
|
|
215
215
|
return _el$;
|
|
216
216
|
})();
|
|
217
217
|
};
|
|
218
|
-
const
|
|
219
|
-
export {
|
|
218
|
+
const NoiseBackground = NoiseBackground_NoiseBackground;
|
|
219
|
+
export { NoiseBackground as default };
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export { __webpack_exports__default as default };
|
|
1
|
+
import external_NoiseBackground_js_default from "./NoiseBackground.js";
|
|
2
|
+
export { external_NoiseBackground_js_default as default };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { createComponent, insert, memo, mergeProps, spread, template } from "solid-js/web";
|
|
2
2
|
import "./NumberField.css";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
var _tmpl$ = /*#__PURE__*/
|
|
7
|
-
const NumberFieldContext =
|
|
3
|
+
import { createContext, createEffect, createSignal, splitProps, useContext } from "solid-js";
|
|
4
|
+
import { twMerge } from "tailwind-merge";
|
|
5
|
+
import { CLASSES } from "./NumberField.classes.js";
|
|
6
|
+
var _tmpl$ = /*#__PURE__*/ template("<div>"), _tmpl$2 = /*#__PURE__*/ template("<input>"), _tmpl$3 = /*#__PURE__*/ template("<button>"), _tmpl$4 = /*#__PURE__*/ template('<svg aria-hidden=true data-slot=number-field-increment-button-icon fill=none role=presentation viewBox="0 0 16 16"><path d="M8 3.25a.75.75 0 0 1 .75.75v3.25H12a.75.75 0 0 1 0 1.5H8.75V12a.75.75 0 0 1-1.5 0V8.75H4a.75.75 0 0 1 0-1.5h3.25V4A.75.75 0 0 1 8 3.25Z"fill=currentColor>'), _tmpl$5 = /*#__PURE__*/ template('<svg aria-hidden=true data-slot=number-field-decrement-button-icon fill=none role=presentation viewBox="0 0 16 16"><path d="M4 7.25a.75.75 0 0 0 0 1.5h8a.75.75 0 0 0 0-1.5H4Z"fill=currentColor>');
|
|
7
|
+
const NumberFieldContext = createContext();
|
|
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);
|
|
@@ -23,7 +23,7 @@ const clamp = (value, min, max)=>{
|
|
|
23
23
|
};
|
|
24
24
|
const formatNumber = (value)=>void 0 === value ? "" : `${value}`;
|
|
25
25
|
const NumberFieldRoot = (props)=>{
|
|
26
|
-
const [local, others] =
|
|
26
|
+
const [local, others] = splitProps(props, [
|
|
27
27
|
"children",
|
|
28
28
|
"class",
|
|
29
29
|
"className",
|
|
@@ -43,8 +43,8 @@ const NumberFieldRoot = (props)=>{
|
|
|
43
43
|
"disabled",
|
|
44
44
|
"isInvalid"
|
|
45
45
|
]);
|
|
46
|
-
const [internalValue, setInternalValue] =
|
|
47
|
-
const [inputValue, setInputValue] =
|
|
46
|
+
const [internalValue, setInternalValue] = createSignal(local.defaultValue);
|
|
47
|
+
const [inputValue, setInputValue] = createSignal(formatNumber(local.defaultValue));
|
|
48
48
|
const isControlled = ()=>void 0 !== local.value;
|
|
49
49
|
const value = ()=>isControlled() ? local.value : internalValue();
|
|
50
50
|
const variant = ()=>local.variant ?? "primary";
|
|
@@ -54,7 +54,7 @@ const NumberFieldRoot = (props)=>{
|
|
|
54
54
|
const step = ()=>local.step && Number.isFinite(local.step) ? local.step : 1;
|
|
55
55
|
const min = ()=>local.min;
|
|
56
56
|
const max = ()=>local.max;
|
|
57
|
-
|
|
57
|
+
createEffect(()=>{
|
|
58
58
|
if (!isControlled()) return;
|
|
59
59
|
setInputValue(formatNumber(local.value));
|
|
60
60
|
});
|
|
@@ -102,12 +102,12 @@ const NumberFieldRoot = (props)=>{
|
|
|
102
102
|
increment: ()=>adjustValue(1),
|
|
103
103
|
decrement: ()=>adjustValue(-1)
|
|
104
104
|
};
|
|
105
|
-
return
|
|
105
|
+
return createComponent(NumberFieldContext.Provider, {
|
|
106
106
|
value: contextValue,
|
|
107
107
|
get children () {
|
|
108
108
|
var _el$ = _tmpl$();
|
|
109
|
-
|
|
110
|
-
class:
|
|
109
|
+
spread(_el$, mergeProps(others, ()=>({
|
|
110
|
+
class: twMerge(CLASSES.Root.base, CLASSES.Root.variant[variant()], fullWidth() && CLASSES.Root.flag.fullWidth, local.class, local.className)
|
|
111
111
|
}), {
|
|
112
112
|
"data-slot": "number-field",
|
|
113
113
|
get ["data-invalid"] () {
|
|
@@ -129,14 +129,14 @@ const NumberFieldRoot = (props)=>{
|
|
|
129
129
|
return local.style;
|
|
130
130
|
}
|
|
131
131
|
}), false, true);
|
|
132
|
-
|
|
133
|
-
var _c$ =
|
|
134
|
-
return ()=>_c$() ? local.children(renderProps()) :
|
|
132
|
+
insert(_el$, (()=>{
|
|
133
|
+
var _c$ = memo(()=>"function" == typeof local.children);
|
|
134
|
+
return ()=>_c$() ? local.children(renderProps()) : memo(()=>!!local.children)() ? local.children : createComponent(NumberFieldGroup, {
|
|
135
135
|
get children () {
|
|
136
136
|
return [
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
137
|
+
createComponent(NumberFieldDecrementButton, {}),
|
|
138
|
+
createComponent(NumberFieldInput, {}),
|
|
139
|
+
createComponent(NumberFieldIncrementButton, {})
|
|
140
140
|
];
|
|
141
141
|
}
|
|
142
142
|
});
|
|
@@ -146,8 +146,8 @@ const NumberFieldRoot = (props)=>{
|
|
|
146
146
|
});
|
|
147
147
|
};
|
|
148
148
|
const NumberFieldGroup = (props)=>{
|
|
149
|
-
const context =
|
|
150
|
-
const [local, others] =
|
|
149
|
+
const context = useContext(NumberFieldContext);
|
|
150
|
+
const [local, others] = splitProps(props, [
|
|
151
151
|
"children",
|
|
152
152
|
"class",
|
|
153
153
|
"className",
|
|
@@ -161,8 +161,8 @@ const NumberFieldGroup = (props)=>{
|
|
|
161
161
|
});
|
|
162
162
|
return (()=>{
|
|
163
163
|
var _el$2 = _tmpl$();
|
|
164
|
-
|
|
165
|
-
class:
|
|
164
|
+
spread(_el$2, mergeProps(others, ()=>({
|
|
165
|
+
class: twMerge(CLASSES.Group.base, context?.fullWidth() && CLASSES.Group.flag.fullWidth, local.class, local.className)
|
|
166
166
|
}), {
|
|
167
167
|
"data-slot": "number-field-group",
|
|
168
168
|
get ["data-invalid"] () {
|
|
@@ -178,16 +178,16 @@ const NumberFieldGroup = (props)=>{
|
|
|
178
178
|
return local.style;
|
|
179
179
|
}
|
|
180
180
|
}), false, true);
|
|
181
|
-
|
|
182
|
-
var _c$2 =
|
|
181
|
+
insert(_el$2, (()=>{
|
|
182
|
+
var _c$2 = memo(()=>"function" == typeof local.children);
|
|
183
183
|
return ()=>_c$2() ? local.children(renderProps()) : local.children;
|
|
184
184
|
})());
|
|
185
185
|
return _el$2;
|
|
186
186
|
})();
|
|
187
187
|
};
|
|
188
188
|
const NumberFieldInput = (props)=>{
|
|
189
|
-
const context =
|
|
190
|
-
const [local, others] =
|
|
189
|
+
const context = useContext(NumberFieldContext);
|
|
190
|
+
const [local, others] = splitProps(props, [
|
|
191
191
|
"class",
|
|
192
192
|
"className",
|
|
193
193
|
"dataTheme",
|
|
@@ -207,11 +207,11 @@ const NumberFieldInput = (props)=>{
|
|
|
207
207
|
};
|
|
208
208
|
return (()=>{
|
|
209
209
|
var _el$3 = _tmpl$2();
|
|
210
|
-
|
|
210
|
+
spread(_el$3, mergeProps(others, {
|
|
211
211
|
type: "text",
|
|
212
212
|
inputmode: "decimal"
|
|
213
213
|
}, ()=>({
|
|
214
|
-
class:
|
|
214
|
+
class: twMerge(CLASSES.Input.base, local.class, local.className)
|
|
215
215
|
}), {
|
|
216
216
|
"data-slot": "number-field-input",
|
|
217
217
|
get ["data-theme"] () {
|
|
@@ -251,8 +251,8 @@ const NumberFieldInput = (props)=>{
|
|
|
251
251
|
})();
|
|
252
252
|
};
|
|
253
253
|
const NumberFieldIncrementButton = (props)=>{
|
|
254
|
-
const context =
|
|
255
|
-
const [local, others] =
|
|
254
|
+
const context = useContext(NumberFieldContext);
|
|
255
|
+
const [local, others] = splitProps(props, [
|
|
256
256
|
"children",
|
|
257
257
|
"class",
|
|
258
258
|
"className",
|
|
@@ -267,10 +267,10 @@ const NumberFieldIncrementButton = (props)=>{
|
|
|
267
267
|
};
|
|
268
268
|
return (()=>{
|
|
269
269
|
var _el$4 = _tmpl$3();
|
|
270
|
-
|
|
270
|
+
spread(_el$4, mergeProps(others, {
|
|
271
271
|
type: "button"
|
|
272
272
|
}, ()=>({
|
|
273
|
-
class:
|
|
273
|
+
class: twMerge(CLASSES.IncrementButton.base, local.class, local.className)
|
|
274
274
|
}), {
|
|
275
275
|
"data-slot": "number-field-increment-button",
|
|
276
276
|
get ["data-theme"] () {
|
|
@@ -288,13 +288,13 @@ const NumberFieldIncrementButton = (props)=>{
|
|
|
288
288
|
slot: "increment",
|
|
289
289
|
onClick: handleClick
|
|
290
290
|
}), false, true);
|
|
291
|
-
|
|
291
|
+
insert(_el$4, ()=>local.children ?? _tmpl$4());
|
|
292
292
|
return _el$4;
|
|
293
293
|
})();
|
|
294
294
|
};
|
|
295
295
|
const NumberFieldDecrementButton = (props)=>{
|
|
296
|
-
const context =
|
|
297
|
-
const [local, others] =
|
|
296
|
+
const context = useContext(NumberFieldContext);
|
|
297
|
+
const [local, others] = splitProps(props, [
|
|
298
298
|
"children",
|
|
299
299
|
"class",
|
|
300
300
|
"className",
|
|
@@ -309,10 +309,10 @@ const NumberFieldDecrementButton = (props)=>{
|
|
|
309
309
|
};
|
|
310
310
|
return (()=>{
|
|
311
311
|
var _el$6 = _tmpl$3();
|
|
312
|
-
|
|
312
|
+
spread(_el$6, mergeProps(others, {
|
|
313
313
|
type: "button"
|
|
314
314
|
}, ()=>({
|
|
315
|
-
class:
|
|
315
|
+
class: twMerge(CLASSES.DecrementButton.base, local.class, local.className)
|
|
316
316
|
}), {
|
|
317
317
|
"data-slot": "number-field-decrement-button",
|
|
318
318
|
get ["data-theme"] () {
|
|
@@ -330,16 +330,16 @@ const NumberFieldDecrementButton = (props)=>{
|
|
|
330
330
|
slot: "decrement",
|
|
331
331
|
onClick: handleClick
|
|
332
332
|
}), false, true);
|
|
333
|
-
|
|
333
|
+
insert(_el$6, ()=>local.children ?? _tmpl$5());
|
|
334
334
|
return _el$6;
|
|
335
335
|
})();
|
|
336
336
|
};
|
|
337
|
-
const
|
|
337
|
+
const NumberField = Object.assign(NumberFieldRoot, {
|
|
338
338
|
Root: NumberFieldRoot,
|
|
339
339
|
Group: NumberFieldGroup,
|
|
340
340
|
Input: NumberFieldInput,
|
|
341
341
|
IncrementButton: NumberFieldIncrementButton,
|
|
342
342
|
DecrementButton: NumberFieldDecrementButton
|
|
343
343
|
});
|
|
344
|
-
const
|
|
345
|
-
export {
|
|
344
|
+
const number_field_NumberField = NumberField;
|
|
345
|
+
export { NumberField, NumberFieldDecrementButton, NumberFieldGroup, NumberFieldIncrementButton, NumberFieldInput, NumberFieldRoot, number_field_NumberField as default };
|
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
var __webpack_exports__NumberFieldDecrementButton = __WEBPACK_EXTERNAL_MODULE__NumberField_js_68db54de__.NumberFieldDecrementButton;
|
|
4
|
-
var __webpack_exports__NumberFieldGroup = __WEBPACK_EXTERNAL_MODULE__NumberField_js_68db54de__.NumberFieldGroup;
|
|
5
|
-
var __webpack_exports__NumberFieldIncrementButton = __WEBPACK_EXTERNAL_MODULE__NumberField_js_68db54de__.NumberFieldIncrementButton;
|
|
6
|
-
var __webpack_exports__NumberFieldInput = __WEBPACK_EXTERNAL_MODULE__NumberField_js_68db54de__.NumberFieldInput;
|
|
7
|
-
var __webpack_exports__NumberFieldRoot = __WEBPACK_EXTERNAL_MODULE__NumberField_js_68db54de__.NumberFieldRoot;
|
|
8
|
-
var __webpack_exports__default = __WEBPACK_EXTERNAL_MODULE__NumberField_js_68db54de__["default"];
|
|
9
|
-
export { __webpack_exports__NumberField as NumberField, __webpack_exports__NumberFieldDecrementButton as NumberFieldDecrementButton, __webpack_exports__NumberFieldGroup as NumberFieldGroup, __webpack_exports__NumberFieldIncrementButton as NumberFieldIncrementButton, __webpack_exports__NumberFieldInput as NumberFieldInput, __webpack_exports__NumberFieldRoot as NumberFieldRoot, __webpack_exports__default as default };
|
|
1
|
+
import external_NumberField_js_default, { NumberField, NumberFieldDecrementButton, NumberFieldGroup, NumberFieldIncrementButton, NumberFieldInput, NumberFieldRoot } from "./NumberField.js";
|
|
2
|
+
export { NumberField, NumberFieldDecrementButton, NumberFieldGroup, NumberFieldIncrementButton, NumberFieldInput, NumberFieldRoot, external_NumberField_js_default as default };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { createComponent, insert, mergeProps, spread, template } from "solid-js/web";
|
|
2
2
|
import "./Pagination.css";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
var _tmpl$ = /*#__PURE__*/
|
|
3
|
+
import { For, splitProps } from "solid-js";
|
|
4
|
+
import { twMerge } from "tailwind-merge";
|
|
5
|
+
import { CLASSES } from "./Pagination.classes.js";
|
|
6
|
+
var _tmpl$ = /*#__PURE__*/ template(`<nav><div>Page <!> of </div><ul><li><button type=button><span aria-hidden=true>\u{2039}</span><span>Previous</span></button></li><li><button type=button><span>Next</span><span aria-hidden=true>\u{203A}`), _tmpl$2 = /*#__PURE__*/ template("<li>"), _tmpl$3 = /*#__PURE__*/ template("<button type=button>"), _tmpl$4 = /*#__PURE__*/ template(`<span>\u{2026}`);
|
|
7
7
|
const clampPage = (page, total)=>{
|
|
8
8
|
if (!Number.isFinite(page)) return 1;
|
|
9
9
|
return Math.min(Math.max(1, Math.floor(page)), total);
|
|
@@ -41,8 +41,8 @@ const getPaginationTokens = (page, total)=>{
|
|
|
41
41
|
total
|
|
42
42
|
];
|
|
43
43
|
};
|
|
44
|
-
const
|
|
45
|
-
const [local, others] =
|
|
44
|
+
const Pagination_Pagination = (props)=>{
|
|
45
|
+
const [local, others] = splitProps(props, [
|
|
46
46
|
"class",
|
|
47
47
|
"className",
|
|
48
48
|
"dataTheme",
|
|
@@ -63,36 +63,36 @@ const Pagination = (props)=>{
|
|
|
63
63
|
};
|
|
64
64
|
return (()=>{
|
|
65
65
|
var _el$ = _tmpl$(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$5 = _el$3.nextSibling, _el$6 = (_el$5.nextSibling, _el$2.nextSibling), _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild, _el$9 = _el$7.nextSibling, _el$0 = _el$9.firstChild;
|
|
66
|
-
|
|
66
|
+
spread(_el$, mergeProps(others, {
|
|
67
67
|
"aria-label": "pagination",
|
|
68
68
|
role: "navigation"
|
|
69
69
|
}, ()=>({
|
|
70
|
-
class:
|
|
70
|
+
class: twMerge(CLASSES.base, local.class, local.className)
|
|
71
71
|
}), {
|
|
72
72
|
get ["data-theme"] () {
|
|
73
73
|
return local.dataTheme;
|
|
74
74
|
},
|
|
75
75
|
"data-slot": "pagination"
|
|
76
76
|
}), false, true);
|
|
77
|
-
|
|
78
|
-
class:
|
|
77
|
+
spread(_el$2, mergeProps(()=>({
|
|
78
|
+
class: CLASSES.slot.summary
|
|
79
79
|
}), {
|
|
80
80
|
"data-slot": "pagination-summary"
|
|
81
81
|
}), false, true);
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
class:
|
|
82
|
+
insert(_el$2, currentPage, _el$5);
|
|
83
|
+
insert(_el$2, safeTotal, null);
|
|
84
|
+
spread(_el$6, mergeProps(()=>({
|
|
85
|
+
class: CLASSES.slot.content
|
|
86
86
|
}), {
|
|
87
87
|
"data-slot": "pagination-content"
|
|
88
88
|
}), false, true);
|
|
89
|
-
|
|
90
|
-
class:
|
|
89
|
+
spread(_el$7, mergeProps(()=>({
|
|
90
|
+
class: CLASSES.slot.item
|
|
91
91
|
}), {
|
|
92
92
|
"data-slot": "pagination-item"
|
|
93
93
|
}), false, true);
|
|
94
|
-
|
|
95
|
-
class:
|
|
94
|
+
spread(_el$8, mergeProps(()=>({
|
|
95
|
+
class: twMerge(CLASSES.slot.link, CLASSES.slot.linkNav)
|
|
96
96
|
}), {
|
|
97
97
|
"data-slot": "pagination-previous",
|
|
98
98
|
onClick: ()=>handleChange(currentPage() - 1),
|
|
@@ -101,21 +101,21 @@ const Pagination = (props)=>{
|
|
|
101
101
|
},
|
|
102
102
|
"aria-label": "Go to previous page"
|
|
103
103
|
}), false, true);
|
|
104
|
-
|
|
104
|
+
insert(_el$6, createComponent(For, {
|
|
105
105
|
get each () {
|
|
106
106
|
return tokens();
|
|
107
107
|
},
|
|
108
108
|
children: (token)=>(()=>{
|
|
109
109
|
var _el$1 = _tmpl$2();
|
|
110
|
-
|
|
111
|
-
class:
|
|
110
|
+
spread(_el$1, mergeProps(()=>({
|
|
111
|
+
class: CLASSES.slot.item
|
|
112
112
|
}), {
|
|
113
113
|
"data-slot": "pagination-item"
|
|
114
114
|
}), false, true);
|
|
115
|
-
|
|
115
|
+
insert(_el$1, "number" == typeof token ? (()=>{
|
|
116
116
|
var _el$10 = _tmpl$3();
|
|
117
|
-
|
|
118
|
-
class:
|
|
117
|
+
spread(_el$10, mergeProps(()=>({
|
|
118
|
+
class: CLASSES.slot.link
|
|
119
119
|
}), {
|
|
120
120
|
"data-slot": "pagination-link",
|
|
121
121
|
get ["data-active"] () {
|
|
@@ -130,12 +130,12 @@ const Pagination = (props)=>{
|
|
|
130
130
|
},
|
|
131
131
|
onClick: ()=>handleChange(token)
|
|
132
132
|
}), false, true);
|
|
133
|
-
|
|
133
|
+
insert(_el$10, token);
|
|
134
134
|
return _el$10;
|
|
135
135
|
})() : (()=>{
|
|
136
136
|
var _el$11 = _tmpl$4();
|
|
137
|
-
|
|
138
|
-
class:
|
|
137
|
+
spread(_el$11, mergeProps(()=>({
|
|
138
|
+
class: CLASSES.slot.ellipsis
|
|
139
139
|
}), {
|
|
140
140
|
"data-slot": "pagination-ellipsis",
|
|
141
141
|
"aria-hidden": "true"
|
|
@@ -145,13 +145,13 @@ const Pagination = (props)=>{
|
|
|
145
145
|
return _el$1;
|
|
146
146
|
})()
|
|
147
147
|
}), _el$9);
|
|
148
|
-
|
|
149
|
-
class:
|
|
148
|
+
spread(_el$9, mergeProps(()=>({
|
|
149
|
+
class: CLASSES.slot.item
|
|
150
150
|
}), {
|
|
151
151
|
"data-slot": "pagination-item"
|
|
152
152
|
}), false, true);
|
|
153
|
-
|
|
154
|
-
class:
|
|
153
|
+
spread(_el$0, mergeProps(()=>({
|
|
154
|
+
class: twMerge(CLASSES.slot.link, CLASSES.slot.linkNav)
|
|
155
155
|
}), {
|
|
156
156
|
"data-slot": "pagination-next",
|
|
157
157
|
onClick: ()=>handleChange(currentPage() + 1),
|
|
@@ -163,5 +163,5 @@ const Pagination = (props)=>{
|
|
|
163
163
|
return _el$;
|
|
164
164
|
})();
|
|
165
165
|
};
|
|
166
|
-
const
|
|
167
|
-
export {
|
|
166
|
+
const Pagination = Pagination_Pagination;
|
|
167
|
+
export { Pagination as default };
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export { __webpack_exports__default as default };
|
|
1
|
+
import external_Pagination_js_default from "./Pagination.js";
|
|
2
|
+
export { external_Pagination_js_default as default };
|