@jbpark/ui-kit 10.0.2 → 10.1.0

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 (120) hide show
  1. package/README.ko.md +7 -0
  2. package/README.md +7 -0
  3. package/dist/Breadcrumb.d.mts +39 -0
  4. package/dist/Breadcrumb.d.mts.map +1 -0
  5. package/dist/Breadcrumb.mjs +103 -0
  6. package/dist/Breadcrumb.mjs.map +1 -0
  7. package/dist/Pagination.d.mts +53 -0
  8. package/dist/Pagination.d.mts.map +1 -0
  9. package/dist/Pagination.mjs +208 -0
  10. package/dist/Pagination.mjs.map +1 -0
  11. package/dist/Table.d.mts +48 -0
  12. package/dist/Table.d.mts.map +1 -0
  13. package/dist/Table.mjs +119 -0
  14. package/dist/Table.mjs.map +1 -0
  15. package/dist/components/atoms/checkbox/checkbox.mjs +2 -1
  16. package/dist/components/atoms/checkbox/checkbox.mjs.map +1 -1
  17. package/dist/components/atoms/checkbox/group.mjs +2 -1
  18. package/dist/components/atoms/checkbox/group.mjs.map +1 -1
  19. package/dist/components/atoms/color-picker.mjs +1 -1
  20. package/dist/components/atoms/date-picker.mjs +1 -1
  21. package/dist/components/atoms/float-button/back-top.mjs +1 -1
  22. package/dist/components/atoms/index.d.mts +2 -1
  23. package/dist/components/atoms/input/search.mjs +3 -1
  24. package/dist/components/atoms/input/search.mjs.map +1 -1
  25. package/dist/components/atoms/popover.mjs +1 -1
  26. package/dist/components/atoms/radio/group.mjs +1 -1
  27. package/dist/components/atoms/radio/radio.mjs +2 -1
  28. package/dist/components/atoms/radio/radio.mjs.map +1 -1
  29. package/dist/components/atoms/select-multiple.d.mts +29 -0
  30. package/dist/components/atoms/select-multiple.d.mts.map +1 -0
  31. package/dist/components/atoms/select-multiple.mjs +97 -0
  32. package/dist/components/atoms/select-multiple.mjs.map +1 -0
  33. package/dist/components/atoms/select-searchable-options.d.mts +21 -0
  34. package/dist/components/atoms/select-searchable-options.d.mts.map +1 -0
  35. package/dist/components/atoms/select-searchable-options.mjs +62 -0
  36. package/dist/components/atoms/select-searchable-options.mjs.map +1 -0
  37. package/dist/components/atoms/select-searchable.d.mts +22 -0
  38. package/dist/components/atoms/select-searchable.d.mts.map +1 -0
  39. package/dist/components/atoms/select-searchable.mjs +65 -0
  40. package/dist/components/atoms/select-searchable.mjs.map +1 -0
  41. package/dist/components/atoms/select.d.mts +8 -2
  42. package/dist/components/atoms/select.d.mts.map +1 -1
  43. package/dist/components/atoms/select.mjs +11 -1
  44. package/dist/components/atoms/select.mjs.map +1 -1
  45. package/dist/components/atoms/slider/slider.mjs +1 -1
  46. package/dist/components/atoms/switch.mjs +1 -1
  47. package/dist/components/atoms/tooltip.d.mts +21 -0
  48. package/dist/components/atoms/tooltip.d.mts.map +1 -0
  49. package/dist/components/atoms/tooltip.mjs +78 -0
  50. package/dist/components/atoms/tooltip.mjs.map +1 -0
  51. package/dist/components/atoms/typography/paragraph.mjs +1 -0
  52. package/dist/components/atoms/typography/paragraph.mjs.map +1 -1
  53. package/dist/components/atoms/typography/title.mjs +1 -0
  54. package/dist/components/atoms/typography/title.mjs.map +1 -1
  55. package/dist/components/molecules/dropdown.mjs +1 -1
  56. package/dist/components/molecules/index.d.mts +13 -10
  57. package/dist/components/molecules/marquees/marquees.mjs +1 -1
  58. package/dist/components/molecules/menu/menu.mjs +2 -1
  59. package/dist/components/molecules/menu/menu.mjs.map +1 -1
  60. package/dist/components/molecules/tabs.d.mts +37 -0
  61. package/dist/components/molecules/tabs.d.mts.map +1 -0
  62. package/dist/components/molecules/tabs.mjs +51 -0
  63. package/dist/components/molecules/tabs.mjs.map +1 -0
  64. package/dist/components/molecules/upload.mjs +2 -1
  65. package/dist/components/molecules/upload.mjs.map +1 -1
  66. package/dist/components/organisms/drawer.d.mts.map +1 -1
  67. package/dist/components/organisms/drawer.mjs +7 -2
  68. package/dist/components/organisms/drawer.mjs.map +1 -1
  69. package/dist/components/organisms/index.d.mts +6 -5
  70. package/dist/components/organisms/list/list.mjs +1 -1
  71. package/dist/components/organisms/modal.d.mts.map +1 -1
  72. package/dist/components/organisms/modal.mjs +7 -4
  73. package/dist/components/organisms/modal.mjs.map +1 -1
  74. package/dist/components/organisms/toast.d.mts.map +1 -1
  75. package/dist/components/organisms/toast.mjs +2 -1
  76. package/dist/components/organisms/toast.mjs.map +1 -1
  77. package/dist/components/templates/empty.mjs +1 -0
  78. package/dist/components/templates/empty.mjs.map +1 -1
  79. package/dist/components/templates/layout/content.mjs +1 -0
  80. package/dist/components/templates/layout/content.mjs.map +1 -1
  81. package/dist/components/templates/layout/footer.mjs +1 -0
  82. package/dist/components/templates/layout/footer.mjs.map +1 -1
  83. package/dist/components/templates/layout/header.mjs +1 -0
  84. package/dist/components/templates/layout/header.mjs.map +1 -1
  85. package/dist/components/templates/layout/layout.mjs +1 -0
  86. package/dist/components/templates/layout/layout.mjs.map +1 -1
  87. package/dist/components/templates/layout/sider.mjs +3 -1
  88. package/dist/components/templates/layout/sider.mjs.map +1 -1
  89. package/dist/components/templates/page-header.mjs +1 -0
  90. package/dist/components/templates/page-header.mjs.map +1 -1
  91. package/dist/components/templates/result.mjs +1 -0
  92. package/dist/components/templates/result.mjs.map +1 -1
  93. package/dist/core/badge.d.mts +1 -1
  94. package/dist/core/button.d.mts +2 -2
  95. package/dist/core/combobox.d.mts +7 -0
  96. package/dist/core/combobox.d.mts.map +1 -0
  97. package/dist/core/combobox.mjs +99 -0
  98. package/dist/core/combobox.mjs.map +1 -0
  99. package/dist/core/dialog.mjs.map +1 -1
  100. package/dist/core/drawer.mjs.map +1 -1
  101. package/dist/core/field.mjs +2 -4
  102. package/dist/core/field.mjs.map +1 -1
  103. package/dist/core/index.d.mts +4 -1
  104. package/dist/core/select.mjs +27 -22
  105. package/dist/core/select.mjs.map +1 -1
  106. package/dist/core/tabs.d.mts +9 -0
  107. package/dist/core/tabs.d.mts.map +1 -0
  108. package/dist/core/tabs.mjs +59 -0
  109. package/dist/core/tabs.mjs.map +1 -0
  110. package/dist/core/tooltip.d.mts +2 -0
  111. package/dist/core/tooltip.mjs +41 -0
  112. package/dist/core/tooltip.mjs.map +1 -0
  113. package/dist/index.d.mts +31 -26
  114. package/dist/index.mjs +7 -2
  115. package/dist/lib/z-layers.mjs +21 -0
  116. package/dist/lib/z-layers.mjs.map +1 -1
  117. package/dist/providers/config/dark-mode.mjs +2 -10
  118. package/dist/providers/config/dark-mode.mjs.map +1 -1
  119. package/dist/style.css +195 -16
  120. package/package.json +17 -2
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tabs.mjs","names":["Tabs","TabsPrimitive"],"sources":["../../src/core/tabs.tsx"],"sourcesContent":["'use client';\n\nimport { Tabs as TabsPrimitive } from '@base-ui/react/tabs';\n\nimport { cn } from '@repo/ui/utils';\n\ntype RootProps = Omit<\n React.ComponentProps<typeof TabsPrimitive.Root>,\n 'className'\n> & {\n className?: string;\n};\ntype ListProps = Omit<\n React.ComponentProps<typeof TabsPrimitive.List>,\n 'className'\n> & {\n className?: string;\n};\ntype TabProps = Omit<\n React.ComponentProps<typeof TabsPrimitive.Tab>,\n 'className'\n> & {\n className?: string;\n};\ntype PanelProps = Omit<\n React.ComponentProps<typeof TabsPrimitive.Panel>,\n 'className'\n> & {\n className?: string;\n};\n\nfunction Tabs({ className, ...props }: RootProps) {\n return (\n <TabsPrimitive.Root\n data-slot=\"tabs\"\n className={cn(\n 'flex flex-col data-[orientation=vertical]:flex-row',\n className,\n //\n )}\n {...props}\n />\n );\n}\n\nfunction TabsList({ className, ...props }: ListProps) {\n return (\n <TabsPrimitive.List\n data-slot=\"tabs-list\"\n className={cn(\n `border-border flex shrink-0 border-b\n data-[orientation=vertical]:flex-col\n data-[orientation=vertical]:border-r\n data-[orientation=vertical]:border-b-0`,\n className,\n //\n )}\n {...props}\n />\n );\n}\n\nfunction TabsTab({ className, ...props }: TabProps) {\n return (\n <TabsPrimitive.Tab\n data-slot=\"tabs-tab\"\n className={cn(\n `text-muted-foreground hover:text-foreground focus-visible:ring-ring/50\n data-active:border-primary data-active:text-foreground relative -mb-px\n inline-flex items-center justify-center gap-2 border-b-2\n border-transparent px-4 py-2 text-sm font-medium whitespace-nowrap\n transition-colors outline-none focus-visible:rounded-sm\n focus-visible:ring-[3px] data-disabled:pointer-events-none\n data-disabled:opacity-50 data-[orientation=vertical]:-mr-px\n data-[orientation=vertical]:mb-0\n data-[orientation=vertical]:justify-start\n data-[orientation=vertical]:border-r-2\n data-[orientation=vertical]:border-b-0\n data-[orientation=vertical]:text-left`,\n className,\n //\n )}\n {...props}\n />\n );\n}\n\nfunction TabsPanel({ className, ...props }: PanelProps) {\n return (\n <TabsPrimitive.Panel\n data-slot=\"tabs-panel\"\n className={cn(\n `focus-visible:ring-ring/50 min-w-0 flex-1 p-4 outline-none\n focus-visible:ring-[3px]`,\n className,\n //\n )}\n {...props}\n />\n );\n}\n\nexport { Tabs, TabsList, TabsTab, TabsPanel };\n"],"mappings":";;;;;;;;;;;;AA+BA,SAASA,OAAK,EAAE,WAAW,GAAG,SAAoB;CAChD,OACE,oBAACC,KAAc,MAAf;EACE,aAAU;EACV,WAAW,GACT,sDACA,SAEF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,SAAS,EAAE,WAAW,GAAG,SAAoB;CACpD,OACE,oBAACA,KAAc,MAAf;EACE,aAAU;EACV,WAAW,GACT;;;iDAIA,SAEF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,QAAQ,EAAE,WAAW,GAAG,SAAmB;CAClD,OACE,oBAACA,KAAc,KAAf;EACE,aAAU;EACV,WAAW,GACT;;;;;;;;;;;gDAYA,SAEF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,UAAU,EAAE,WAAW,GAAG,SAAqB;CACtD,OACE,oBAACA,KAAc,OAAf;EACE,aAAU;EACV,WAAW,GACT;mCAEA,SAEF;EACA,GAAI;CACL,CAAA;AAEL"}
@@ -0,0 +1,2 @@
1
+ import "react";
2
+ import { Tooltip } from "@base-ui/react/tooltip";
@@ -0,0 +1,41 @@
1
+ "use client";
2
+ import { __exportAll } from "../_virtual/_rolldown/runtime.mjs";
3
+ import { cn } from "../utils.mjs";
4
+ import { useConfig } from "../providers/config/context.mjs";
5
+ import { OVERLAY_LAYER } from "../lib/z-layers.mjs";
6
+ import "react";
7
+ import { jsx } from "react/jsx-runtime";
8
+ import { Tooltip } from "@base-ui/react/tooltip";
9
+ //#region src/core/tooltip.tsx
10
+ var tooltip_exports = /* @__PURE__ */ __exportAll({
11
+ Tooltip: () => Tooltip$1,
12
+ TooltipContent: () => TooltipContent,
13
+ TooltipTrigger: () => TooltipTrigger
14
+ });
15
+ const Tooltip$1 = Tooltip.Root;
16
+ const TooltipTrigger = Tooltip.Trigger;
17
+ function TooltipContent({ className, side = "top", align = "center", sideOffset = 8, container, ...props }) {
18
+ const { getContainer } = useConfig();
19
+ return /* @__PURE__ */ jsx(Tooltip.Portal, {
20
+ container: container ?? getContainer(),
21
+ children: /* @__PURE__ */ jsx(Tooltip.Positioner, {
22
+ side,
23
+ align,
24
+ sideOffset,
25
+ className: OVERLAY_LAYER,
26
+ children: /* @__PURE__ */ jsx(Tooltip.Popup, {
27
+ "data-slot": "tooltip-content",
28
+ className: cn(`bg-popover text-popover-foreground max-w-xs
29
+ origin-(--transform-origin) rounded-md border px-2 py-1 text-xs
30
+ shadow-md transition-[opacity,transform] duration-150
31
+ data-ending-style:scale-95 data-ending-style:opacity-0
32
+ data-starting-style:scale-95 data-starting-style:opacity-0`, className),
33
+ ...props
34
+ })
35
+ })
36
+ });
37
+ }
38
+ //#endregion
39
+ export { Tooltip$1 as Tooltip, TooltipContent, TooltipTrigger, tooltip_exports };
40
+
41
+ //# sourceMappingURL=tooltip.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tooltip.mjs","names":["Tooltip","TooltipPrimitive"],"sources":["../../src/core/tooltip.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport { Tooltip as TooltipPrimitive } from '@base-ui/react/tooltip';\n\nimport { useConfig } from '@repo/ui/providers';\nimport { cn } from '@repo/ui/utils';\n\nimport { OVERLAY_LAYER } from '../lib/z-layers';\n\nconst Tooltip = TooltipPrimitive.Root;\nconst TooltipTrigger = TooltipPrimitive.Trigger;\n\ntype TooltipContentProps = React.ComponentProps<\n typeof TooltipPrimitive.Popup\n> & {\n side?: TooltipPrimitive.Positioner.Props['side'];\n align?: TooltipPrimitive.Positioner.Props['align'];\n sideOffset?: number;\n container?: HTMLElement;\n};\n\nfunction TooltipContent({\n className,\n side = 'top',\n align = 'center',\n sideOffset = 8,\n container,\n ...props\n}: TooltipContentProps) {\n const { getContainer } = useConfig();\n\n return (\n <TooltipPrimitive.Portal container={container ?? getContainer()}>\n <TooltipPrimitive.Positioner\n side={side}\n align={align}\n sideOffset={sideOffset}\n className={OVERLAY_LAYER}\n >\n <TooltipPrimitive.Popup\n data-slot=\"tooltip-content\"\n className={cn(\n `bg-popover text-popover-foreground max-w-xs\n origin-(--transform-origin) rounded-md border px-2 py-1 text-xs\n shadow-md transition-[opacity,transform] duration-150\n data-ending-style:scale-95 data-ending-style:opacity-0\n data-starting-style:scale-95 data-starting-style:opacity-0`,\n className,\n //\n )}\n {...props}\n />\n </TooltipPrimitive.Positioner>\n </TooltipPrimitive.Portal>\n );\n}\n\nexport { Tooltip, TooltipContent, TooltipTrigger };\n"],"mappings":";;;;;;;;;;;;;;AAWA,MAAMA,YAAUC,QAAiB;AACjC,MAAM,iBAAiBA,QAAiB;AAWxC,SAAS,eAAe,EACtB,WACA,OAAO,OACP,QAAQ,UACR,aAAa,GACb,WACA,GAAG,SACmB;CACtB,MAAM,EAAE,iBAAiB,UAAU;CAEnC,OACE,oBAACA,QAAiB,QAAlB;EAAyB,WAAW,aAAa,aAAa;EAC5D,UAAA,oBAACA,QAAiB,YAAlB;GACQ;GACC;GACK;GACZ,WAAW;GAEX,UAAA,oBAACA,QAAiB,OAAlB;IACE,aAAU;IACV,WAAW,GACT;;;;yEAKA,SAEF;IACA,GAAI;GACL,CAAA;EAC0B,CAAA;CACN,CAAA;AAE7B"}
package/dist/index.d.mts CHANGED
@@ -1,16 +1,19 @@
1
1
  import Button from "./Button.mjs";
2
2
  import Tag from "./Tag.mjs";
3
3
  import Typography from "./Typography.mjs";
4
- import Card, { Props } from "./Card.mjs";
5
- import Menu, { Props as Props$14 } from "./components/molecules/menu/menu.mjs";
6
- import { Props as Props$18 } from "./components/molecules/reveals/reveals.mjs";
4
+ import Breadcrumb, { Props } from "./Breadcrumb.mjs";
5
+ import Card, { Props as Props$1 } from "./Card.mjs";
6
+ import Menu, { Props as Props$15 } from "./components/molecules/menu/menu.mjs";
7
+ import Pagination, { Props as Props$18 } from "./Pagination.mjs";
8
+ import { Props as Props$20 } from "./components/molecules/reveals/reveals.mjs";
7
9
  import Reveals from "./Reveals.mjs";
8
- import Space, { Props as Props$21 } from "./Space.mjs";
9
- import { Props as Props$5 } from "./components/templates/layout/content.mjs";
10
- import { Props as Props$9 } from "./components/templates/layout/footer.mjs";
11
- import { Props as Props$10 } from "./components/templates/layout/header.mjs";
12
- import { Props as Props$11 } from "./components/templates/layout/layout.mjs";
13
- import { Props as Props$20 } from "./components/templates/layout/sider.mjs";
10
+ import Space, { Props as Props$23 } from "./Space.mjs";
11
+ import Table, { Column, PaginationOptions, Props as Props$26 } from "./Table.mjs";
12
+ import { Props as Props$6 } from "./components/templates/layout/content.mjs";
13
+ import { Props as Props$10 } from "./components/templates/layout/footer.mjs";
14
+ import { Props as Props$11 } from "./components/templates/layout/header.mjs";
15
+ import { Props as Props$12 } from "./components/templates/layout/layout.mjs";
16
+ import { Props as Props$22 } from "./components/templates/layout/sider.mjs";
14
17
  import Layout from "./Layout.mjs";
15
18
  import Checkbox from "./components/atoms/checkbox/index.mjs";
16
19
  import ColorPicker from "./components/atoms/color-picker.mjs";
@@ -27,31 +30,33 @@ import Slider from "./components/atoms/slider/slider.mjs";
27
30
  import Spin from "./components/atoms/spin.mjs";
28
31
  import { ComponentSize, DefaultProps, Locale, ThemeConfig, ThemeToken } from "./providers/config/types.mjs";
29
32
  import { DEFAULT_LOCALE, useConfig } from "./providers/config/context.mjs";
30
- import Config, { Props as Props$3 } from "./providers/config/config.mjs";
33
+ import Config, { Props as Props$4 } from "./providers/config/config.mjs";
31
34
  import { ConfigSnapshotProvider, getRootConfigValue } from "./providers/config/registry.mjs";
32
35
  import Switch from "./components/atoms/switch.mjs";
36
+ import Tooltip from "./components/atoms/tooltip.mjs";
33
37
  import "./components/atoms/index.mjs";
34
- import Collapse, { Props as Props$2 } from "./components/molecules/collapse.mjs";
35
- import Dropdown, { Props as Props$7 } from "./components/molecules/dropdown.mjs";
36
- import { Props as Props$13 } from "./components/molecules/marquees/marquees.mjs";
38
+ import Collapse, { Props as Props$3 } from "./components/molecules/collapse.mjs";
39
+ import Dropdown, { Props as Props$8 } from "./components/molecules/dropdown.mjs";
40
+ import { Props as Props$14 } from "./components/molecules/marquees/marquees.mjs";
37
41
  import Marquees from "./components/molecules/marquees/index.mjs";
38
- import { Props as Props$22 } from "./components/molecules/splitter/splitter.mjs";
42
+ import { Props as Props$24 } from "./components/molecules/splitter/splitter.mjs";
39
43
  import Splitter from "./components/molecules/splitter/index.mjs";
40
- import Upload, { Props as Props$24, UploadFile } from "./components/molecules/upload.mjs";
44
+ import Tabs, { Props as Props$27 } from "./components/molecules/tabs.mjs";
45
+ import Upload, { Props as Props$28, UploadFile } from "./components/molecules/upload.mjs";
41
46
  import "./components/molecules/index.mjs";
42
- import Drawer, { Props as Props$6 } from "./components/organisms/drawer.mjs";
43
- import { Props as Props$12 } from "./components/organisms/list/list.mjs";
47
+ import Drawer, { Props as Props$7 } from "./components/organisms/drawer.mjs";
48
+ import { Props as Props$13 } from "./components/organisms/list/list.mjs";
44
49
  import List from "./components/organisms/list/index.mjs";
45
- import Modal, { Props as Props$15 } from "./components/organisms/modal.mjs";
46
- import { Props as Props$23 } from "./components/organisms/swiper/swiper.mjs";
50
+ import Modal, { Props as Props$16 } from "./components/organisms/modal.mjs";
51
+ import { Props as Props$25 } from "./components/organisms/swiper/swiper.mjs";
47
52
  import Swiper from "./components/organisms/swiper/index.mjs";
48
53
  import Toast, { ToastOptions as StaticProps } from "./components/organisms/toast.mjs";
49
54
  import "./components/organisms/index.mjs";
50
- import Container, { Props as Props$4 } from "./components/templates/container.mjs";
51
- import Empty, { Props as Props$8 } from "./components/templates/empty.mjs";
52
- import Result, { Props as Props$17 } from "./components/templates/result.mjs";
53
- import PageHeader, { Props as Props$16 } from "./components/templates/page-header.mjs";
54
- import Row, { Props as Props$19 } from "./components/templates/grid/row.mjs";
55
- import Col, { Props as Props$1 } from "./components/templates/grid/col.mjs";
55
+ import Container, { Props as Props$5 } from "./components/templates/container.mjs";
56
+ import Empty, { Props as Props$9 } from "./components/templates/empty.mjs";
57
+ import Result, { Props as Props$19 } from "./components/templates/result.mjs";
58
+ import PageHeader, { Props as Props$17 } from "./components/templates/page-header.mjs";
59
+ import Row, { Props as Props$21 } from "./components/templates/grid/row.mjs";
60
+ import Col, { Props as Props$2 } from "./components/templates/grid/col.mjs";
56
61
  import "./components/templates/index.mjs";
57
- export { Button, Card, type Props as CardProps, Checkbox, Col, type Props$1 as ColProps, Collapse, type Props$2 as CollapseProps, ColorPicker, type ComponentSize, Config, type Props$3 as ConfigProps, ConfigSnapshotProvider, Container, type Props$4 as ContainerProps, type Props$5 as ContentProps, DEFAULT_LOCALE, DatePicker, type DefaultProps, Drawer, type Props$6 as DrawerProps, Dropdown, type Props$7 as DropdownProps, Empty, type Props$8 as EmptyProps, FloatButton, type Props$9 as FooterProps, type Props$10 as HeaderProps, Input, Layout, type Props$11 as LayoutProps, List, type Props$12 as ListProps, type Locale, Marquees, type Props$13 as MarqueesProps, Menu, type Props$14 as MenuProps, Modal, type Props$15 as ModalProps, PageHeader, type Props$16 as PageHeaderProps, Popover, Progress, Radio, Result, type Props$17 as ResultProps, Reveals, type Props$18 as RevealsProps, RichTextEditor, Row, type Props$19 as RowProps, Select, type Props$20 as SiderProps, Skeleton, Slider, Space, type Props$21 as SpaceProps, Spin, Splitter, type Props$22 as SplitterProps, Swiper, type Props$23 as SwiperProps, Switch, Tag, type ThemeConfig, type ThemeToken, Toast, type StaticProps as ToastOptions, Typography, Upload, type UploadFile, type Props$24 as UploadProps, getRootConfigValue, useConfig };
62
+ export { Breadcrumb, type Props as BreadcrumbProps, Button, Card, type Props$1 as CardProps, Checkbox, Col, type Props$2 as ColProps, Collapse, type Props$3 as CollapseProps, ColorPicker, type ComponentSize, Config, type Props$4 as ConfigProps, ConfigSnapshotProvider, Container, type Props$5 as ContainerProps, type Props$6 as ContentProps, DEFAULT_LOCALE, DatePicker, type DefaultProps, Drawer, type Props$7 as DrawerProps, Dropdown, type Props$8 as DropdownProps, Empty, type Props$9 as EmptyProps, FloatButton, type Props$10 as FooterProps, type Props$11 as HeaderProps, Input, Layout, type Props$12 as LayoutProps, List, type Props$13 as ListProps, type Locale, Marquees, type Props$14 as MarqueesProps, Menu, type Props$15 as MenuProps, Modal, type Props$16 as ModalProps, PageHeader, type Props$17 as PageHeaderProps, Pagination, type Props$18 as PaginationProps, Popover, Progress, Radio, Result, type Props$19 as ResultProps, Reveals, type Props$20 as RevealsProps, RichTextEditor, Row, type Props$21 as RowProps, Select, type Props$22 as SiderProps, Skeleton, Slider, Space, type Props$23 as SpaceProps, Spin, Splitter, type Props$24 as SplitterProps, Swiper, type Props$25 as SwiperProps, Switch, Table, type Column as TableColumn, type PaginationOptions as TablePaginationOptions, type Props$26 as TableProps, Tabs, type Props$27 as TabsProps, Tag, type ThemeConfig, type ThemeToken, Toast, type StaticProps as ToastOptions, Tooltip, Typography, Upload, type UploadFile, type Props$28 as UploadProps, getRootConfigValue, useConfig };
package/dist/index.mjs CHANGED
@@ -19,25 +19,30 @@ import slider_default from "./components/atoms/slider/index.mjs";
19
19
  import Spin from "./components/atoms/spin.mjs";
20
20
  import Switch from "./components/atoms/switch.mjs";
21
21
  import Tag from "./Tag.mjs";
22
+ import Tooltip from "./components/atoms/tooltip.mjs";
22
23
  import Card from "./Card.mjs";
24
+ import Breadcrumb from "./Breadcrumb.mjs";
23
25
  import Collapse from "./components/molecules/collapse.mjs";
24
26
  import Menu from "./components/molecules/menu/menu.mjs";
25
27
  import Dropdown from "./components/molecules/dropdown.mjs";
26
28
  import Marquees from "./components/molecules/marquees/index.mjs";
29
+ import Pagination from "./Pagination.mjs";
27
30
  import Reveals from "./Reveals.mjs";
28
31
  import Splitter from "./components/molecules/splitter/index.mjs";
29
32
  import Space from "./Space.mjs";
33
+ import Tabs from "./components/molecules/tabs.mjs";
30
34
  import Upload from "./components/molecules/upload.mjs";
31
35
  import Drawer from "./components/organisms/drawer.mjs";
32
36
  import List from "./components/organisms/list/index.mjs";
33
37
  import Modal from "./components/organisms/modal.mjs";
34
38
  import Swiper from "./components/organisms/swiper/index.mjs";
39
+ import Empty from "./components/templates/empty.mjs";
40
+ import Table from "./Table.mjs";
35
41
  import Toast from "./components/organisms/toast.mjs";
36
42
  import Layout from "./Layout.mjs";
37
43
  import Container from "./components/templates/container.mjs";
38
- import Empty from "./components/templates/empty.mjs";
39
44
  import Result from "./components/templates/result.mjs";
40
45
  import PageHeader from "./components/templates/page-header.mjs";
41
46
  import Row from "./components/templates/grid/row.mjs";
42
47
  import Col from "./components/templates/grid/col.mjs";
43
- export { Button, Card, Checkbox, Col, Collapse, ColorPicker, Config, ConfigSnapshotProvider, Container, DEFAULT_LOCALE, DatePicker, Drawer, Dropdown, Empty, FloatButton, Input, Layout, List, Marquees, Menu, Modal, PageHeader, Popover, Progress, Radio, Result, Reveals, RichTextEditor, Row, Select, Skeleton, slider_default as Slider, Space, Spin, Splitter, Swiper, Switch, Tag, Toast, Typography, Upload, getRootConfigValue, useConfig };
48
+ export { Breadcrumb, Button, Card, Checkbox, Col, Collapse, ColorPicker, Config, ConfigSnapshotProvider, Container, DEFAULT_LOCALE, DatePicker, Drawer, Dropdown, Empty, FloatButton, Input, Layout, List, Marquees, Menu, Modal, PageHeader, Pagination, Popover, Progress, Radio, Result, Reveals, RichTextEditor, Row, Select, Skeleton, slider_default as Slider, Space, Spin, Splitter, Swiper, Switch, Table, Tabs, Tag, Toast, Tooltip, Typography, Upload, getRootConfigValue, useConfig };
@@ -21,6 +21,27 @@
21
21
  * under the navbar. 1000 clears Infima's whole scale and sits in the band every
22
22
  * major library reserves for modals (antd 1000, Bootstrap 1055, MUI 1300).
23
23
  *
24
+ * **Why `[data-ui-root]` isolation doesn't replace this (#411).** `globals.css`
25
+ * gives a root marked `data-ui-root` `isolation: isolate`, so Base UI portals,
26
+ * appended to `body` beside that root, paint above everything inside it at any
27
+ * z-index. Measured in Chromium with this constant neutralised: a right Drawer
28
+ * clears a `z-index: 200` navbar when the navbar lives *inside* the marked
29
+ * root, but not when the root isn't marked, or when the host's chrome sits
30
+ * outside it. The attribute is opt-in, and a published library can't assume
31
+ * either, so the portalled sites keep the explicit layer. Nested portals are
32
+ * unaffected either way: a Select opened from a Drawer, or a Popover opened
33
+ * from a Modal, lands on top with or without this value, by DOM order alone.
34
+ *
35
+ * **The in-flow sites (dropdown, float button, `Layout.Header`) can't benefit
36
+ * from isolation at all**, and at 1000 they paint over a host overlay that
37
+ * sits lower — a portalled `z-50` shadcn/Radix dialog, say. A separate, lower
38
+ * chrome layer was considered and rejected: whatever value it took would
39
+ * still be above some host's overlay and below some host's page content, so
40
+ * it only moves the collision. `data-ui-root` is the host-side fix. Marking
41
+ * the app root isolates it at `z-index: auto`, so a host overlay portalled to
42
+ * `body` covers the whole app, this chrome included (verified with a `z-50`
43
+ * overlay against a sticky `Layout.Header` and a `FloatButton`).
44
+ *
24
45
  * Retune per call site with `className` / `classNames.mask` — both land after
25
46
  * this in `cn()`, so `tailwind-merge` lets them win.
26
47
  */
@@ -1 +1 @@
1
- {"version":3,"file":"z-layers.mjs","names":[],"sources":["../../src/lib/z-layers.ts"],"sourcesContent":["/**\n * The single stacking layer every floating/overlay primitive in this library\n * shares — dialog and drawer (mask + content), popover, select, dropdown,\n * float button, and `Layout.Header`.\n *\n * **They are all deliberately equal.** Nothing here ranks against anything else\n * here by z-index; relative order falls out of DOM order, which is what puts a\n * Select popup above the Drawer it was opened from (Base UI appends each portal\n * to `body` as it opens) and a Drawer above `Layout.Header`. Give one of them a\n * different value and those pairs silently invert. `Modal.confirm` and the\n * imperative `Toast`/`Modal` stack roots sit above this on purpose (`z-10000` /\n * `zIndex = '10000'`), so an imperative confirm opened from inside a declarative\n * Modal still lands on top.\n *\n * **Why 1000 and not shadcn's default of 50.** 50 assumes you own the whole app\n * and keep its chrome below that. This package is published, so it doesn't get\n * that assumption: Infima (Docusaurus) puts its navbar at `--ifm-z-index-fixed: 200`\n * and its own overlay at 400, so on this repo's own docs site a right-anchored\n * Drawer had its top 60px — the entire header, title and close button — painted\n * under the navbar. 1000 clears Infima's whole scale and sits in the band every\n * major library reserves for modals (antd 1000, Bootstrap 1055, MUI 1300).\n *\n * Retune per call site with `className` / `classNames.mask` — both land after\n * this in `cn()`, so `tailwind-merge` lets them win.\n */\nexport const OVERLAY_LAYER = 'z-1000';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,MAAa,gBAAgB"}
1
+ {"version":3,"file":"z-layers.mjs","names":[],"sources":["../../src/lib/z-layers.ts"],"sourcesContent":["/**\n * The single stacking layer every floating/overlay primitive in this library\n * shares — dialog and drawer (mask + content), popover, select, dropdown,\n * float button, and `Layout.Header`.\n *\n * **They are all deliberately equal.** Nothing here ranks against anything else\n * here by z-index; relative order falls out of DOM order, which is what puts a\n * Select popup above the Drawer it was opened from (Base UI appends each portal\n * to `body` as it opens) and a Drawer above `Layout.Header`. Give one of them a\n * different value and those pairs silently invert. `Modal.confirm` and the\n * imperative `Toast`/`Modal` stack roots sit above this on purpose (`z-10000` /\n * `zIndex = '10000'`), so an imperative confirm opened from inside a declarative\n * Modal still lands on top.\n *\n * **Why 1000 and not shadcn's default of 50.** 50 assumes you own the whole app\n * and keep its chrome below that. This package is published, so it doesn't get\n * that assumption: Infima (Docusaurus) puts its navbar at `--ifm-z-index-fixed: 200`\n * and its own overlay at 400, so on this repo's own docs site a right-anchored\n * Drawer had its top 60px — the entire header, title and close button — painted\n * under the navbar. 1000 clears Infima's whole scale and sits in the band every\n * major library reserves for modals (antd 1000, Bootstrap 1055, MUI 1300).\n *\n * **Why `[data-ui-root]` isolation doesn't replace this (#411).** `globals.css`\n * gives a root marked `data-ui-root` `isolation: isolate`, so Base UI portals,\n * appended to `body` beside that root, paint above everything inside it at any\n * z-index. Measured in Chromium with this constant neutralised: a right Drawer\n * clears a `z-index: 200` navbar when the navbar lives *inside* the marked\n * root, but not when the root isn't marked, or when the host's chrome sits\n * outside it. The attribute is opt-in, and a published library can't assume\n * either, so the portalled sites keep the explicit layer. Nested portals are\n * unaffected either way: a Select opened from a Drawer, or a Popover opened\n * from a Modal, lands on top with or without this value, by DOM order alone.\n *\n * **The in-flow sites (dropdown, float button, `Layout.Header`) can't benefit\n * from isolation at all**, and at 1000 they paint over a host overlay that\n * sits lower — a portalled `z-50` shadcn/Radix dialog, say. A separate, lower\n * chrome layer was considered and rejected: whatever value it took would\n * still be above some host's overlay and below some host's page content, so\n * it only moves the collision. `data-ui-root` is the host-side fix. Marking\n * the app root isolates it at `z-index: auto`, so a host overlay portalled to\n * `body` covers the whole app, this chrome included (verified with a `z-50`\n * overlay against a sticky `Layout.Header` and a `FloatButton`).\n *\n * Retune per call site with `className` / `classNames.mask` — both land after\n * this in `cn()`, so `tailwind-merge` lets them win.\n */\nexport const OVERLAY_LAYER = 'z-1000';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CA,MAAa,gBAAgB"}
@@ -1,17 +1,9 @@
1
1
  "use client";
2
2
  import { useConfig } from "./context.mjs";
3
- import { useSyncExternalStore } from "react";
3
+ import { useMediaQuery } from "@jbpark/use-hooks";
4
4
  //#region src/providers/config/dark-mode.ts
5
5
  const DARK_MEDIA_QUERY = "(prefers-color-scheme: dark)";
6
- const subscribeToSystemColorScheme = (callback) => {
7
- if (typeof window === "undefined") return () => {};
8
- const mql = window.matchMedia(DARK_MEDIA_QUERY);
9
- mql.addEventListener("change", callback);
10
- return () => mql.removeEventListener("change", callback);
11
- };
12
- const getSystemPrefersDark = () => typeof window !== "undefined" && window.matchMedia(DARK_MEDIA_QUERY).matches;
13
- const getServerSnapshot = () => false;
14
- const useSystemPrefersDark = () => useSyncExternalStore(subscribeToSystemColorScheme, getSystemPrefersDark, getServerSnapshot);
6
+ const useSystemPrefersDark = () => useMediaQuery(DARK_MEDIA_QUERY);
15
7
  /**
16
8
  * Turns the three-valued `theme.dark` setting into the boolean that decides
17
9
  * whether dark treatments actually apply. Kept as a pure function so `Config`
@@ -1 +1 @@
1
- {"version":3,"file":"dark-mode.mjs","names":[],"sources":["../../../src/providers/config/dark-mode.ts"],"sourcesContent":["'use client';\n\nimport { useSyncExternalStore } from 'react';\n\nimport { useConfig } from './context';\nimport type { ThemeConfig } from './types';\n\nconst DARK_MEDIA_QUERY = '(prefers-color-scheme: dark)';\n\nconst subscribeToSystemColorScheme = (callback: () => void) => {\n if (typeof window === 'undefined') {\n return () => {};\n }\n\n const mql = window.matchMedia(DARK_MEDIA_QUERY);\n mql.addEventListener('change', callback);\n return () => mql.removeEventListener('change', callback);\n};\n\nconst getSystemPrefersDark = () =>\n typeof window !== 'undefined' && window.matchMedia(DARK_MEDIA_QUERY).matches;\n\n// No `window` during SSR, so there's no way to know the visitor's actual\n// preference before hydration — assume light (the conservative default)\n// and let useSyncExternalStore correct it client-side once matchMedia is\n// available, same flash-of-incorrect-guess tradeoff already accepted for\n// Sider's breakpoint prop elsewhere in this library.\nconst getServerSnapshot = () => false;\n\nexport const useSystemPrefersDark = () =>\n useSyncExternalStore(\n subscribeToSystemColorScheme,\n getSystemPrefersDark,\n getServerSnapshot,\n );\n\n/**\n * Turns the three-valued `theme.dark` setting into the boolean that decides\n * whether dark treatments actually apply. Kept as a pure function so `Config`\n * can resolve the theme it is about to publish (its merged value isn't in\n * context yet) while consumers resolve the one already in context, without the\n * two drifting apart.\n */\nexport const resolveDark = (\n dark: ThemeConfig['dark'],\n systemPrefersDark: boolean,\n) => (dark === 'system' ? systemPrefersDark : dark === 'dark');\n\n/**\n * Whether dark mode is active for the nearest `Config`, with `'system'`\n * resolved against `prefers-color-scheme`.\n *\n * Internal to the package: components that render *CSS* can just use Tailwind's\n * `dark:` variants against the `.dark` class `Config` puts on its wrapper. This\n * exists for the ones that have to hand a light/dark choice to a third party in\n * JS instead — `CodeEditor` picking a CodeMirror theme extension.\n */\nexport const useIsDarkActive = () => {\n const { theme } = useConfig();\n\n return resolveDark(theme.dark, useSystemPrefersDark());\n};\n"],"mappings":";;;;AAOA,MAAM,mBAAmB;AAEzB,MAAM,gCAAgC,aAAyB;CAC7D,IAAI,OAAO,WAAW,aACpB,aAAa,CAAC;CAGhB,MAAM,MAAM,OAAO,WAAW,gBAAgB;CAC9C,IAAI,iBAAiB,UAAU,QAAQ;CACvC,aAAa,IAAI,oBAAoB,UAAU,QAAQ;AACzD;AAEA,MAAM,6BACJ,OAAO,WAAW,eAAe,OAAO,WAAW,gBAAgB,CAAC,CAAC;AAOvE,MAAM,0BAA0B;AAEhC,MAAa,6BACX,qBACE,8BACA,sBACA,iBACF;;;;;;;;AASF,MAAa,eACX,MACA,sBACI,SAAS,WAAW,oBAAoB,SAAS;;;;;;;;;;AAWvD,MAAa,wBAAwB;CACnC,MAAM,EAAE,UAAU,UAAU;CAE5B,OAAO,YAAY,MAAM,MAAM,qBAAqB,CAAC;AACvD"}
1
+ {"version":3,"file":"dark-mode.mjs","names":[],"sources":["../../../src/providers/config/dark-mode.ts"],"sourcesContent":["'use client';\n\nimport { useMediaQuery } from '@jbpark/use-hooks';\n\nimport { useConfig } from './context';\nimport type { ThemeConfig } from './types';\n\nconst DARK_MEDIA_QUERY = '(prefers-color-scheme: dark)';\n\n// No `window` during SSR, so there's no way to know the visitor's actual\n// preference before hydration — assume light (the conservative default)\n// and let useSyncExternalStore correct it client-side once matchMedia is\n// available, same flash-of-incorrect-guess tradeoff already accepted for\n// Sider's breakpoint prop elsewhere in this library. `useMediaQuery`'s\n// server snapshot is its `defaultValue`, which is `false` when omitted.\nexport const useSystemPrefersDark = () => useMediaQuery(DARK_MEDIA_QUERY);\n\n/**\n * Turns the three-valued `theme.dark` setting into the boolean that decides\n * whether dark treatments actually apply. Kept as a pure function so `Config`\n * can resolve the theme it is about to publish (its merged value isn't in\n * context yet) while consumers resolve the one already in context, without the\n * two drifting apart.\n */\nexport const resolveDark = (\n dark: ThemeConfig['dark'],\n systemPrefersDark: boolean,\n) => (dark === 'system' ? systemPrefersDark : dark === 'dark');\n\n/**\n * Whether dark mode is active for the nearest `Config`, with `'system'`\n * resolved against `prefers-color-scheme`.\n *\n * Internal to the package: components that render *CSS* can just use Tailwind's\n * `dark:` variants against the `.dark` class `Config` puts on its wrapper. This\n * exists for the ones that have to hand a light/dark choice to a third party in\n * JS instead — `CodeEditor` picking a CodeMirror theme extension.\n */\nexport const useIsDarkActive = () => {\n const { theme } = useConfig();\n\n return resolveDark(theme.dark, useSystemPrefersDark());\n};\n"],"mappings":";;;;AAOA,MAAM,mBAAmB;AAQzB,MAAa,6BAA6B,cAAc,gBAAgB;;;;;;;;AASxE,MAAa,eACX,MACA,sBACI,SAAS,WAAW,oBAAoB,SAAS;;;;;;;;;;AAWvD,MAAa,wBAAwB;CACnC,MAAM,EAAE,UAAU,UAAU;CAE5B,OAAO,YAAY,MAAM,MAAM,qBAAqB,CAAC;AACvD"}