@pathscale/ui 0.0.36 → 0.0.37

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.
Files changed (2) hide show
  1. package/dist/index.js +33 -152
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -7806,163 +7806,44 @@ const Table = Object.assign(TableComponent, {
7806
7806
  });
7807
7807
  const table_Table = Table;
7808
7808
  const table = table_Table;
7809
- const tabsNavVariants = cva("flex text-sm font-medium text-[var(--color-base-content)]", {
7810
- variants: {
7811
- type: {
7812
- basic: "",
7813
- boxed: "flex gap-2",
7814
- toggle: "inline-flex rounded-md p-1",
7815
- "toggle-rounded": "inline-flex rounded-full p-1"
7816
- },
7817
- size: {
7818
- sm: "text-xs gap-1",
7819
- md: "text-sm gap-2",
7820
- lg: "text-base gap-3"
7821
- },
7822
- alignment: {
7823
- left: "justify-start",
7824
- center: "justify-center",
7825
- right: "justify-end"
7826
- },
7827
- expanded: {
7828
- true: "w-full",
7829
- false: ""
7830
- }
7831
- },
7832
- defaultVariants: {
7833
- type: "basic",
7834
- size: "md",
7835
- alignment: "left",
7836
- expanded: false
7837
- }
7838
- });
7839
- const tabTriggerVariants = cva("inline-flex items-center justify-center whitespace-nowrap font-medium text-sm transition-colors", {
7840
- variants: {
7841
- size: {
7842
- sm: "text-xs px-2 py-1",
7843
- md: "text-sm px-3 py-2",
7844
- lg: "text-base px-4 py-3"
7845
- },
7846
- type: {
7847
- basic: "border-b-2 transition-colors hover:text-[var(--color-primary)]",
7848
- boxed: "rounded-t px-4 py-2 hover:text-[var(--color-primary)]",
7849
- toggle: "border -ml-px px-4 py-2 transition-colors first:ml-0 first:rounded-l-md last:rounded-r-md",
7850
- "toggle-rounded": "border -ml-px first:ml-0 first:rounded-l-full last:rounded-r-full transition-colors"
7851
- },
7852
- active: {
7853
- true: "",
7854
- false: ""
7855
- },
7856
- disabled: {
7857
- true: "opacity-50 cursor-not-allowed pointer-events-none",
7858
- false: ""
7859
- }
7860
- },
7861
- compoundVariants: [
7862
- {
7863
- type: "basic",
7864
- active: true,
7865
- class: "border-[var(--color-primary)] text-[var(--color-primary)]"
7866
- },
7867
- {
7868
- type: "basic",
7869
- active: false,
7870
- class: "border-transparent text-[var(--color-base-content)]/60"
7871
- },
7872
- {
7873
- type: "boxed",
7874
- active: true,
7875
- class: "border-x border-t border-b-0 border-[var(--color-base-300)] text-[var(--color-primary)]"
7876
- },
7877
- {
7878
- type: "boxed",
7879
- active: false,
7880
- class: "border-b border-transparent text-[var(--color-base-content)]/60 hover:text-[var(--color-primary)]"
7881
- },
7882
- {
7883
- type: "toggle",
7884
- active: true,
7885
- class: "bg-[var(--color-primary)] text-[var(--color-primary-content)] border-[var(--color-primary)]"
7886
- },
7887
- {
7888
- type: "toggle",
7889
- active: false,
7890
- class: "bg-transparent text-[var(--color-base-content)]/60 border-[var(--color-base-300)]"
7891
- },
7892
- {
7893
- type: "toggle-rounded",
7894
- active: true,
7895
- class: "bg-[var(--color-primary)] text-[var(--color-primary-content)] border-[var(--color-primary)]"
7896
- },
7897
- {
7898
- type: "toggle-rounded",
7899
- active: false,
7900
- class: "bg-transparent text-[var(--color-base-content)]/60 border-[var(--color-base-300)]"
7901
- }
7902
- ],
7903
- defaultVariants: {
7904
- active: false,
7905
- disabled: false
7906
- }
7907
- });
7908
- var Tabs_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<div><nav><ul class="flex gap-0"></ul></nav><div class=pt-4>'), Tabs_tmpl$2 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<li><button>");
7909
- const Tabs_Tabs = (props)=>{
7910
- const [local, variantProps, otherProps] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
7911
- "items",
7912
- "value",
7913
- "onChange"
7914
- ], [
7915
- "size",
7916
- "type",
7917
- "alignment",
7918
- "expanded"
7809
+ var Tab_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<a role=tab>");
7810
+ const Tab = (props)=>{
7811
+ const [local, others] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
7812
+ "children",
7813
+ "class",
7814
+ "className",
7815
+ "color",
7816
+ "bgColor",
7817
+ "borderColor",
7818
+ "active",
7819
+ "disabled"
7919
7820
  ]);
7920
- const [internalActive, setInternalActive] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createSignal)(local.value ?? 0);
7921
- const isControlled = ()=>void 0 !== local.value;
7922
- const active = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>isControlled() ? local.value : internalActive());
7923
- const handleChange = (i)=>{
7924
- const item = local.items[i];
7925
- if (!item || item.disabled) return;
7926
- if (!isControlled()) setInternalActive(i);
7927
- local.onChange?.(i);
7928
- };
7929
- return (()=>{
7930
- var _el$ = Tabs_tmpl$(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$2.nextSibling;
7931
- (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$, otherProps, false, true);
7932
- (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$3, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(__WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.For, {
7933
- get each () {
7934
- return local.items;
7935
- },
7936
- children: (tab, i)=>(()=>{
7937
- var _el$5 = Tabs_tmpl$2(), _el$6 = _el$5.firstChild;
7938
- _el$6.$$click = ()=>handleChange(i());
7939
- (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$6, ()=>tab.label);
7940
- (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)(()=>(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.className)(_el$6, tabTriggerVariants({
7941
- type: variantProps.type ?? "basic",
7942
- size: variantProps.size ?? "md",
7943
- active: i() === active(),
7944
- disabled: tab.disabled
7945
- })));
7946
- return _el$5;
7947
- })()
7821
+ const classes = ()=>twMerge("tab", local.class, local.className, clsx({
7822
+ [`[--tab-bg:${local.bgColor}]`]: local.bgColor,
7823
+ [`[--tab-border-color:${local.borderColor}]`]: local.borderColor,
7824
+ "text-neutral": "neutral" === local.color,
7825
+ "text-primary": "primary" === local.color,
7826
+ "text-secondary": "secondary" === local.color,
7827
+ "text-accent": "accent" === local.color,
7828
+ "text-info": "info" === local.color,
7829
+ "text-success": "success" === local.color,
7830
+ "text-warning": "warning" === local.color,
7831
+ "text-error": "error" === local.color,
7832
+ "tab-active": local.active,
7833
+ "tab-disabled": local.disabled
7948
7834
  }));
7949
- (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$4, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(__WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.Show, {
7950
- get when () {
7951
- return local.items[active()];
7952
- },
7953
- get children () {
7954
- return local.items[active()]?.content;
7835
+ return (()=>{
7836
+ var _el$ = Tab_tmpl$();
7837
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)({
7838
+ get ["class"] () {
7839
+ return classes();
7955
7840
  }
7956
- }));
7957
- (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)(()=>(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.className)(_el$2, tabsNavVariants(variantProps)));
7841
+ }, others), false, true);
7842
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$, ()=>local.children);
7958
7843
  return _el$;
7959
7844
  })();
7960
7845
  };
7961
- const Tabs = Tabs_Tabs;
7962
- (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.delegateEvents)([
7963
- "click"
7964
- ]);
7965
- const tabs = Tabs;
7846
+ const tabs_Tab = Tab;
7966
7847
  var Textarea_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<textarea>");
7967
7848
  const Textarea = (props)=>{
7968
7849
  const [local, others] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
@@ -8414,4 +8295,4 @@ const Artboard = (props)=>{
8414
8295
  })();
8415
8296
  };
8416
8297
  const artboard_Artboard = Artboard;
8417
- 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 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 };
8298
+ 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_Tab 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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pathscale/ui",
3
- "version": "0.0.36",
3
+ "version": "0.0.37",
4
4
  "author": "pathscale",
5
5
  "repository": {
6
6
  "type": "git",