bako-ui 0.2.1 → 0.2.3

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.mjs CHANGED
@@ -1,11 +1,12 @@
1
- import { CloseButton, IconButton, Icon as Icon$1, Link, LinkOverlay, Checkbox as Checkbox$1, Combobox as Combobox$1, Input, RadioGroup as RadioGroup$1, Select as Select$1, Switch as Switch$1, mergeRefs, Progress as Progress$1, Dialog as Dialog$1, Drawer as Drawer$1, Popover as Popover$1, createToaster, Toast as Toast$1, Accordion as Accordion$1, Breadcrumb as Breadcrumb$1, Steps as Steps$1, Menu as Menu$1, createIcon, defineRecipe, defineSemanticTokens, defineSlotRecipe, defineTokens, defineConfig, createSystem, defaultConfig, Badge as Badge$1, Box, Card as Card$1, Clipboard as Clipboard$1, Portal, EmptyState as EmptyState$1, Flex, HStack as HStack$1, Heading, Image, List as List$1, Spinner, QrCode as QrCode$1, Separator, Skeleton as Skeleton$1, SkeletonCircle as SkeletonCircle$1, SkeletonText as SkeletonText$1, Stack as Stack$1, Tabs as Tabs$1, Text, Toaster, VStack as VStack$1, Grid as Grid$1, GridItem as GridItem$1, Button as Button$1, Container as Container$1, useFilter, useListCollection, Field, defineStyle, Span, InputGroup, Textarea, Avatar as Avatar$1, Group, Tooltip as Tooltip$1, ChakraProvider } from '@chakra-ui/react';
1
+ import { Button as Button$1, CloseButton, IconButton, Icon as Icon$1, Link, LinkOverlay, Checkbox as Checkbox$1, Combobox as Combobox$1, Input, RadioGroup as RadioGroup$1, Select as Select$1, Switch as Switch$1, mergeRefs, Progress as Progress$1, Tooltip as Tooltip$1, Portal, Dialog as Dialog$1, Drawer as Drawer$1, Popover as Popover$1, createToaster, Toast as Toast$1, Accordion as Accordion$1, Breadcrumb as Breadcrumb$1, Steps as Steps$1, Menu as Menu$1, createIcon, defineRecipe, defineSemanticTokens, defineSlotRecipe, defineTokens, defineConfig, createSystem, defaultConfig, Badge as Badge$1, Box, Card as Card$1, Clipboard as Clipboard$1, EmptyState as EmptyState$1, Flex, HStack as HStack$1, Heading, Image, List as List$1, Spinner, QrCode as QrCode$1, Separator, Skeleton as Skeleton$1, SkeletonCircle as SkeletonCircle$1, SkeletonText as SkeletonText$1, Stack as Stack$1, Tabs as Tabs$1, Text, Toaster, VStack as VStack$1, Grid as Grid$1, GridItem as GridItem$1, Container as Container$1, useFilter, useListCollection, Field, defineStyle, Span, InputGroup, Textarea, Avatar as Avatar$1, Group, ChakraProvider } from '@chakra-ui/react';
2
2
  export { Alert, ButtonGroup, Center, Icon as ChakraIcon, ClientOnly, Field, FormatNumber, InputGroup, Portal, Spacer, Span, createIcon, createListCollection, createToaster, useAccordion, useAccordionContext, useAccordionItemContext, useClipboard, useMediaQuery, useSteps, useStepsContext, useStepsItemContext } from '@chakra-ui/react';
3
3
  import { jsx, jsxs } from 'react/jsx-runtime';
4
+ import * as React from 'react';
4
5
  import { forwardRef, useRef, useMemo, useCallback, useState, useEffect } from 'react';
5
6
  import { flushSync } from 'react-dom';
6
7
  import { useController } from 'react-hook-form';
7
8
  import { withMask } from 'use-mask-input';
8
- import { menuAnatomy, progressAnatomy, tabsAnatomy, toastAnatomy } from '@chakra-ui/react/anatomy';
9
+ import { accordionAnatomy, menuAnatomy, progressAnatomy, tabsAnatomy, toastAnatomy } from '@chakra-ui/react/anatomy';
9
10
 
10
11
  // src/components/Stack/stack.tsx
11
12
  var Stack = Stack$1;
@@ -22,12 +23,13 @@ var text_default = Text;
22
23
  var heading_default = Heading;
23
24
  var box_default = Box;
24
25
  var Badge = Badge$1;
25
- function Button({
26
- colorPalette = "primary",
27
- ...props
28
- }) {
29
- return /* @__PURE__ */ jsx(Button$1, { colorPalette, ...props });
30
- }
26
+ var Button = forwardRef(
27
+ function Button2(props, ref) {
28
+ const { colorPalette = "primary", ...rest } = props;
29
+ return /* @__PURE__ */ jsx(Button$1, { ref, colorPalette, ...rest });
30
+ }
31
+ );
32
+ var button_default = Button;
31
33
  var Card = Card$1;
32
34
  var card_default = Card;
33
35
  var Clipboard = Clipboard$1;
@@ -576,16 +578,29 @@ var ProgressTrack = Progress$1.Track;
576
578
  var ProgressRange = Progress$1.Range;
577
579
  var ProgressLabel = Progress$1.Label;
578
580
  var ProgressValueText = Progress$1.ValueText;
579
- function Tooltip(props) {
580
- const { children, content, showArrow = true, ...rest } = props;
581
- return /* @__PURE__ */ jsxs(Tooltip$1.Root, { ...rest, children: [
582
- /* @__PURE__ */ jsx(Tooltip$1.Trigger, { asChild: true, children }),
583
- /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(Tooltip$1.Positioner, { children: /* @__PURE__ */ jsxs(Tooltip$1.Content, { children: [
584
- showArrow && /* @__PURE__ */ jsx(Tooltip$1.Arrow, { children: /* @__PURE__ */ jsx(Tooltip$1.ArrowTip, {}) }),
585
- content
586
- ] }) }) })
587
- ] });
588
- }
581
+ var Tooltip = React.forwardRef(
582
+ function Tooltip2(props, ref) {
583
+ const {
584
+ showArrow,
585
+ children,
586
+ disabled,
587
+ portalled = true,
588
+ content,
589
+ contentProps,
590
+ portalRef,
591
+ ...rest
592
+ } = props;
593
+ if (disabled) return children;
594
+ return /* @__PURE__ */ jsxs(Tooltip$1.Root, { ...rest, children: [
595
+ /* @__PURE__ */ jsx(Tooltip$1.Trigger, { asChild: true, children }),
596
+ /* @__PURE__ */ jsx(Portal, { disabled: !portalled, container: portalRef, children: /* @__PURE__ */ jsx(Tooltip$1.Positioner, { children: /* @__PURE__ */ jsxs(Tooltip$1.Content, { ref, ...contentProps, children: [
597
+ showArrow && /* @__PURE__ */ jsx(Tooltip$1.Arrow, { children: /* @__PURE__ */ jsx(Tooltip$1.ArrowTip, {}) }),
598
+ content
599
+ ] }) }) })
600
+ ] });
601
+ }
602
+ );
603
+ var tooltip_default = Tooltip;
589
604
  var Dialog = {
590
605
  ...Dialog$1,
591
606
  Portal: Portal
@@ -774,10 +789,10 @@ var semanticColors = defineSemanticTokens.colors({
774
789
  }
775
790
  },
776
791
  panel: {
777
- value: { _light: "{colors.gray.600}", _dark: "{colors.gray.600}" }
792
+ value: { _light: "{colors.gray.700}", _dark: "{colors.gray.700}" }
778
793
  },
779
794
  muted: {
780
- value: { _light: "{colors.gray.500}", _dark: "{colors.gray.500}" }
795
+ value: { _light: "{colors.gray.600}", _dark: "{colors.gray.600}" }
781
796
  }
782
797
  },
783
798
  fg: {
@@ -820,8 +835,8 @@ var semanticColors = defineSemanticTokens.colors({
820
835
  },
821
836
  solid: {
822
837
  value: {
823
- _light: "{colors.primary.default}",
824
- _dark: "{colors.primary.default}"
838
+ _light: "{colors.primary.main}",
839
+ _dark: "{colors.primary.main}"
825
840
  }
826
841
  },
827
842
  muted: {
@@ -847,8 +862,8 @@ var semanticColors = defineSemanticTokens.colors({
847
862
  },
848
863
  border: {
849
864
  value: {
850
- _light: "{colors.gray.600}",
851
- _dark: "{colors.gray.600}"
865
+ _light: "{colors.gray.700}",
866
+ _dark: "{colors.gray.700}"
852
867
  }
853
868
  }
854
869
  },
@@ -912,6 +927,26 @@ var semanticColors = defineSemanticTokens.colors({
912
927
  var semanticTokens = {
913
928
  colors: semanticColors
914
929
  };
930
+ var accordionSlotRecipe = defineSlotRecipe({
931
+ slots: accordionAnatomy.keys(),
932
+ base: {
933
+ root: {
934
+ "--accordion-radius": "radii.lg"
935
+ }
936
+ },
937
+ variants: {
938
+ variant: {
939
+ subtle: {
940
+ item: {
941
+ bg: "bg.panel",
942
+ _open: {
943
+ bg: "bg.panel"
944
+ }
945
+ }
946
+ }
947
+ }
948
+ }
949
+ });
915
950
  var menuSlotRecipe = defineSlotRecipe({
916
951
  slots: menuAnatomy.keys(),
917
952
  base: {
@@ -980,6 +1015,22 @@ var tabsSlotRecipe = defineSlotRecipe({
980
1015
  color: "fg"
981
1016
  }
982
1017
  }
1018
+ },
1019
+ subtle: {
1020
+ trigger: {
1021
+ rounded: "lg",
1022
+ color: "textSecondary",
1023
+ bg: "bg.panel",
1024
+ transition: "all 0.3s",
1025
+ _hover: {
1026
+ bg: "bg.muted",
1027
+ color: "textPrimary"
1028
+ },
1029
+ _selected: {
1030
+ color: "textPrimary",
1031
+ bg: "bg.muted"
1032
+ }
1033
+ }
983
1034
  }
984
1035
  }
985
1036
  }
@@ -1034,15 +1085,16 @@ var slotRecipes = {
1034
1085
  menu: menuSlotRecipe,
1035
1086
  tabs: tabsSlotRecipe,
1036
1087
  progress: progessSlotRecipes,
1037
- toast: toastSlotRecipe
1088
+ toast: toastSlotRecipe,
1089
+ accordion: accordionSlotRecipe
1038
1090
  };
1039
1091
  var colorsTokens = defineTokens.colors({
1040
1092
  primary: {
1041
- contrast: { value: "{colors.gray.500}" },
1042
- default: { value: "{colors.yellow.100}" }
1093
+ contrast: { value: "{colors.gray.600}" },
1094
+ main: { value: "{colors.yellow.100}" }
1043
1095
  },
1044
1096
  secondary: {
1045
- default: { value: "{colors.gray.500}" },
1097
+ main: { value: "{colors.gray.600}" },
1046
1098
  contrast: { value: "{colors.gray.300}" }
1047
1099
  },
1048
1100
  textPrimary: { value: "{colors.gray.100}" },
@@ -1055,8 +1107,10 @@ var colorsTokens = defineTokens.colors({
1055
1107
  "200": { value: "#AAA6A1" },
1056
1108
  "300": { value: "#868079" },
1057
1109
  "400": { value: "#5E5955" },
1058
- "500": { value: "#201F1D" },
1059
- "600": { value: "#151413" }
1110
+ "500": { value: "#353230" },
1111
+ "550": { value: "#2B2927" },
1112
+ "600": { value: "#201F1D" },
1113
+ "700": { value: "#151413" }
1060
1114
  },
1061
1115
  yellow: {
1062
1116
  "50": { value: "#EED07C" },
@@ -1126,6 +1180,6 @@ var config = defineConfig({
1126
1180
  var theme = createSystem(defaultConfig, config);
1127
1181
  var theme_default = theme;
1128
1182
 
1129
- export { Accordion, Avatar, AvatarGroup, Badge, box_default as Box, Breadcrumb, Button, card_default as Card, CheckIcon, checkbox_default as Checkbox, Clipboard, close_button_default as CloseButton, CloseIcon, Combobox, Container, Dialog, Drawer, EmptyState, flex_default as Flex, Grid, GridItem, HStack, heading_default as Heading, icon_default as Icon, icon_button_default as IconButton, image_default as Image, input_default as Input, link_default as Link, link_overlay_default as LinkOverlay, List, loader_default as Loader, Menu, MoneyField, Popover, Progress, ProgressLabel, ProgressRange, ProgressRoot, ProgressTrack, ProgressValueText, QrCode, radio_default as Radio, RadioGroup, RhfCombobox, RhfInput, RhfMoneyField, Select, separator_default as Separator, Skeleton, SkeletonCircle, SkeletonText, Stack, Steps, switch_default as Switch, Tabs, text_default as Text, TextArea, text_mask_default as TextMask, ThemeProvider, Toast, Tooltip, VStack, WalletIcon, theme_default as theme, toaster };
1183
+ export { Accordion, Avatar, AvatarGroup, Badge, box_default as Box, Breadcrumb, button_default as Button, card_default as Card, CheckIcon, checkbox_default as Checkbox, Clipboard, close_button_default as CloseButton, CloseIcon, Combobox, Container, Dialog, Drawer, EmptyState, flex_default as Flex, Grid, GridItem, HStack, heading_default as Heading, icon_default as Icon, icon_button_default as IconButton, image_default as Image, input_default as Input, link_default as Link, link_overlay_default as LinkOverlay, List, loader_default as Loader, Menu, MoneyField, Popover, Progress, ProgressLabel, ProgressRange, ProgressRoot, ProgressTrack, ProgressValueText, QrCode, radio_default as Radio, RadioGroup, RhfCombobox, RhfInput, RhfMoneyField, Select, separator_default as Separator, Skeleton, SkeletonCircle, SkeletonText, Stack, Steps, switch_default as Switch, Tabs, text_default as Text, TextArea, text_mask_default as TextMask, ThemeProvider, Toast, tooltip_default as Tooltip, VStack, WalletIcon, theme_default as theme, toaster };
1130
1184
  //# sourceMappingURL=index.mjs.map
1131
1185
  //# sourceMappingURL=index.mjs.map