@pathscale/ui 0.0.38 → 0.0.40
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/index.js +54 -4
- package/package.json +9 -3
package/dist/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import * as __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__ from "solid-js/web";
|
|
2
2
|
import * as __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__ from "solid-js";
|
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE__felte_solid_6a709b1d__ from "@felte/solid";
|
|
4
|
+
import * as __WEBPACK_EXTERNAL_MODULE__felte_validator_zod_bb07151a__ from "@felte/validator-zod";
|
|
3
5
|
const CLASS_PART_SEPARATOR = '-';
|
|
4
6
|
const createClassGroupUtils = (config)=>{
|
|
5
7
|
const classMap = createClassMap(config);
|
|
@@ -5403,6 +5405,7 @@ const Label = (props)=>{
|
|
|
5403
5405
|
"class",
|
|
5404
5406
|
"className"
|
|
5405
5407
|
]);
|
|
5408
|
+
const resolvedChildren = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.children)(()=>local.children);
|
|
5406
5409
|
const classes = ()=>twMerge("label", local.class, local.className);
|
|
5407
5410
|
return (()=>{
|
|
5408
5411
|
var _el$ = Label_tmpl$(), _el$2 = _el$.firstChild;
|
|
@@ -5415,11 +5418,56 @@ const Label = (props)=>{
|
|
|
5415
5418
|
}
|
|
5416
5419
|
}), false, true);
|
|
5417
5420
|
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$2, ()=>local.title);
|
|
5418
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$,
|
|
5421
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$, resolvedChildren, null);
|
|
5419
5422
|
return _el$;
|
|
5420
5423
|
})();
|
|
5421
5424
|
};
|
|
5422
5425
|
const form_Label = Label;
|
|
5426
|
+
const FormValidationContext = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createContext)();
|
|
5427
|
+
function useFormValidation() {
|
|
5428
|
+
const context = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.useContext)(FormValidationContext);
|
|
5429
|
+
if (!context) throw new Error("useFormValidation must be used within a ValidatedForm");
|
|
5430
|
+
return context;
|
|
5431
|
+
}
|
|
5432
|
+
function ValidatedForm(props) {
|
|
5433
|
+
const [local, others] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
|
|
5434
|
+
"children",
|
|
5435
|
+
"schema",
|
|
5436
|
+
"onSubmit",
|
|
5437
|
+
"initialValues"
|
|
5438
|
+
]);
|
|
5439
|
+
const { form, errors, touched, data, isValid, isSubmitting } = (0, __WEBPACK_EXTERNAL_MODULE__felte_solid_6a709b1d__.createForm)({
|
|
5440
|
+
initialValues: local.initialValues,
|
|
5441
|
+
extend: [
|
|
5442
|
+
(0, __WEBPACK_EXTERNAL_MODULE__felte_validator_zod_bb07151a__.validator)({
|
|
5443
|
+
schema: local.schema
|
|
5444
|
+
})
|
|
5445
|
+
],
|
|
5446
|
+
onSubmit: local.onSubmit
|
|
5447
|
+
});
|
|
5448
|
+
const resolvedChildren = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.children)(()=>local.children);
|
|
5449
|
+
const contextValue = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>({
|
|
5450
|
+
errors,
|
|
5451
|
+
touched,
|
|
5452
|
+
data,
|
|
5453
|
+
isValid,
|
|
5454
|
+
isSubmitting
|
|
5455
|
+
}));
|
|
5456
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(FormValidationContext.Provider, {
|
|
5457
|
+
get value () {
|
|
5458
|
+
return contextValue();
|
|
5459
|
+
},
|
|
5460
|
+
get children () {
|
|
5461
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(form_Form, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)(others, {
|
|
5462
|
+
ref: form,
|
|
5463
|
+
get children () {
|
|
5464
|
+
return resolvedChildren();
|
|
5465
|
+
}
|
|
5466
|
+
}));
|
|
5467
|
+
}
|
|
5468
|
+
});
|
|
5469
|
+
}
|
|
5470
|
+
const form_ValidatedForm = ValidatedForm;
|
|
5423
5471
|
var Form_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<form role=form>");
|
|
5424
5472
|
const Form = (props)=>{
|
|
5425
5473
|
const [local, others] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
|
|
@@ -5428,6 +5476,7 @@ const Form = (props)=>{
|
|
|
5428
5476
|
"class",
|
|
5429
5477
|
"className"
|
|
5430
5478
|
]);
|
|
5479
|
+
const resolvedChildren = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.children)(()=>local.children);
|
|
5431
5480
|
const classes = ()=>twMerge("form-control", local.class, local.className);
|
|
5432
5481
|
return (()=>{
|
|
5433
5482
|
var _el$ = Form_tmpl$();
|
|
@@ -5439,12 +5488,13 @@ const Form = (props)=>{
|
|
|
5439
5488
|
return classes();
|
|
5440
5489
|
}
|
|
5441
5490
|
}), false, true);
|
|
5442
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$,
|
|
5491
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$, resolvedChildren);
|
|
5443
5492
|
return _el$;
|
|
5444
5493
|
})();
|
|
5445
5494
|
};
|
|
5446
5495
|
const form_Form = Object.assign(Form, {
|
|
5447
|
-
Label: form_Label
|
|
5496
|
+
Label: form_Label,
|
|
5497
|
+
Validated: form_ValidatedForm
|
|
5448
5498
|
});
|
|
5449
5499
|
const colsMap = {
|
|
5450
5500
|
1: "grid-cols-1",
|
|
@@ -8390,4 +8440,4 @@ const Artboard = (props)=>{
|
|
|
8390
8440
|
})();
|
|
8391
8441
|
};
|
|
8392
8442
|
const artboard_Artboard = Artboard;
|
|
8393
|
-
export { accordion_Accordion as Accordion, alert_Alert as Alert, artboard_Artboard as Artboard, avatar as Avatar, background_Background as Background, Badge, Breadcrumbs, breadcrumbs_BreadcrumbsItem as BreadcrumbsItem, browsermockup_BrowserMockup as BrowserMockup, button_Button as Button, card_Card as Card, carousel_Carousel as Carousel, chatbubble_ChatBubble as ChatBubble, checkbox_Checkbox as Checkbox, codemockup_CodeMockup as CodeMockup, CodeMockupLine, collapse_Collapse as Collapse, CollapseContent, CollapseDetails, CollapseTitle, copy_button_CopyButton as CopyButton, countdown_Countdown as Countdown, diff_Diff as Diff, divider as Divider, dock as Dock, Drawer, dropdown as Dropdown, FileInput, flex_Flex as Flex, footer_Footer as Footer, form_Form as Form, grid_Grid as Grid, hero_Hero as Hero, icon_Icon as Icon, indicator_Indicator as Indicator, input_Input as Input, join_Join as Join, kbd_Kbd as Kbd, link_Link as Link, loading_Loading as Loading, mask as Mask, menu_Menu as Menu, modal as Modal, navbar_Navbar as Navbar, pagination_Pagination as Pagination, phonemockup_PhoneMockup as PhoneMockup, Progress, props_table_PropsTable as PropsTable, radialprogress_RadialProgress as RadialProgress, radio_Radio as Radio, range_Range as Range, Rating, select_Select as Select, showcase_ShowcaseBlock as ShowcaseBlock, ShowcaseSection, Sidenav, skeleton_Skeleton as Skeleton, Stack, stats_Stats as Stats, status_Status as Status, steps as Steps, Summary, Swap, table as Table, tabs_Tabs as Tabs, textarea_Textarea as Textarea, Timeline, timeline_TimelineEnd as TimelineEnd, timeline_TimelineItem as TimelineItem, timeline_TimelineMiddle as TimelineMiddle, timeline_TimelineStart as TimelineStart, toast_Toast as Toast, toggle_Toggle as Toggle, tooltip_Tooltip as Tooltip, windowmockup_WindowMockup as WindowMockup };
|
|
8443
|
+
export { accordion_Accordion as Accordion, alert_Alert as Alert, artboard_Artboard as Artboard, avatar as Avatar, background_Background as Background, Badge, Breadcrumbs, breadcrumbs_BreadcrumbsItem as BreadcrumbsItem, browsermockup_BrowserMockup as BrowserMockup, button_Button as Button, card_Card as Card, carousel_Carousel as Carousel, chatbubble_ChatBubble as ChatBubble, checkbox_Checkbox as Checkbox, codemockup_CodeMockup as CodeMockup, CodeMockupLine, collapse_Collapse as Collapse, CollapseContent, CollapseDetails, CollapseTitle, copy_button_CopyButton as CopyButton, countdown_Countdown as Countdown, diff_Diff as Diff, divider as Divider, dock as Dock, Drawer, dropdown as Dropdown, FileInput, flex_Flex as Flex, footer_Footer as Footer, form_Form as Form, grid_Grid as Grid, hero_Hero as Hero, icon_Icon as Icon, indicator_Indicator as Indicator, input_Input as Input, join_Join as Join, kbd_Kbd as Kbd, link_Link as Link, loading_Loading as Loading, mask as Mask, menu_Menu as Menu, modal as Modal, navbar_Navbar as Navbar, pagination_Pagination as Pagination, phonemockup_PhoneMockup as PhoneMockup, Progress, props_table_PropsTable as PropsTable, radialprogress_RadialProgress as RadialProgress, radio_Radio as Radio, range_Range as Range, Rating, select_Select as Select, showcase_ShowcaseBlock as ShowcaseBlock, ShowcaseSection, Sidenav, skeleton_Skeleton as Skeleton, Stack, stats_Stats as Stats, status_Status as Status, steps as Steps, Summary, Swap, table as Table, tabs_Tabs as Tabs, textarea_Textarea as Textarea, Timeline, timeline_TimelineEnd as TimelineEnd, timeline_TimelineItem as TimelineItem, timeline_TimelineMiddle as TimelineMiddle, timeline_TimelineStart as TimelineStart, toast_Toast as Toast, toggle_Toggle as Toggle, tooltip_Tooltip as Tooltip, windowmockup_WindowMockup as WindowMockup, useFormValidation };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pathscale/ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.40",
|
|
4
4
|
"author": "pathscale",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -24,6 +24,8 @@
|
|
|
24
24
|
"types": "./dist/index.d.ts",
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@biomejs/biome": "1.9.4",
|
|
27
|
+
"@felte/solid": "^1.2.11",
|
|
28
|
+
"@felte/validator-zod": "^1.0.15",
|
|
27
29
|
"@iconify/json": "^2.2.342",
|
|
28
30
|
"@iconify/utils": "^2.3.0",
|
|
29
31
|
"@rsbuild/core": "^1.3.20",
|
|
@@ -37,7 +39,8 @@
|
|
|
37
39
|
"postcss-cli": "^11.0.1",
|
|
38
40
|
"svgo": "^3.3.2",
|
|
39
41
|
"tailwind-merge": "^3.3.0",
|
|
40
|
-
"typescript": "^5.8.3"
|
|
42
|
+
"typescript": "^5.8.3",
|
|
43
|
+
"zod": "^3.22.4"
|
|
41
44
|
},
|
|
42
45
|
"dependencies": {
|
|
43
46
|
"@iconify/tailwind4": "^1.0.6",
|
|
@@ -55,7 +58,10 @@
|
|
|
55
58
|
"solid-js": "^1.9.7"
|
|
56
59
|
},
|
|
57
60
|
"peerDependencies": {
|
|
58
|
-
"solid
|
|
61
|
+
"@felte/solid": "^1.2.0",
|
|
62
|
+
"@felte/validator-zod": "^1.0.0",
|
|
63
|
+
"solid-js": "^1.9",
|
|
64
|
+
"zod": "^3.22.0"
|
|
59
65
|
},
|
|
60
66
|
"scripts": {
|
|
61
67
|
"build": "rslib build && bun scripts/copy-css.js",
|