basefn 1.0.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 (154) hide show
  1. package/README.md +104 -0
  2. package/package.json +82 -0
  3. package/rescript.json +32 -0
  4. package/src/Basefn.css +14 -0
  5. package/src/Basefn.res +105 -0
  6. package/src/Basefn.res.mjs +114 -0
  7. package/src/Basefn__Dom.res +9 -0
  8. package/src/Basefn__Dom.res.mjs +24 -0
  9. package/src/Basefn__Utils.res +15 -0
  10. package/src/Basefn__Utils.res.mjs +32 -0
  11. package/src/Demo.res +1417 -0
  12. package/src/Demo.res.mjs +2328 -0
  13. package/src/Eita.res.mjs +105 -0
  14. package/src/Eita__Accordion.res.mjs +77 -0
  15. package/src/Eita__Alert.res.mjs +81 -0
  16. package/src/Eita__AppLayout.res.mjs +100 -0
  17. package/src/Eita__Avatar.res.mjs +40 -0
  18. package/src/Eita__Badge.res.mjs +65 -0
  19. package/src/Eita__Breadcrumb.res.mjs +53 -0
  20. package/src/Eita__Button.res.mjs +47 -0
  21. package/src/Eita__Card.res.mjs +60 -0
  22. package/src/Eita__Checkbox.res.mjs +36 -0
  23. package/src/Eita__Dom.res.mjs +16 -0
  24. package/src/Eita__Drawer.res.mjs +112 -0
  25. package/src/Eita__Dropdown.res.mjs +96 -0
  26. package/src/Eita__Grid.res.mjs +24 -0
  27. package/src/Eita__Input.res.mjs +54 -0
  28. package/src/Eita__Kbd.res.mjs +42 -0
  29. package/src/Eita__Label.res.mjs +24 -0
  30. package/src/Eita__Modal.res.mjs +93 -0
  31. package/src/Eita__Progress.res.mjs +101 -0
  32. package/src/Eita__Radio.res.mjs +38 -0
  33. package/src/Eita__Select.res.mjs +40 -0
  34. package/src/Eita__Separator.res.mjs +70 -0
  35. package/src/Eita__Sidebar.res.mjs +103 -0
  36. package/src/Eita__Slider.res.mjs +89 -0
  37. package/src/Eita__Spinner.res.mjs +69 -0
  38. package/src/Eita__Stepper.res.mjs +114 -0
  39. package/src/Eita__Switch.res.mjs +84 -0
  40. package/src/Eita__Tabs.res.mjs +57 -0
  41. package/src/Eita__Textarea.res.mjs +39 -0
  42. package/src/Eita__Timeline.res.mjs +86 -0
  43. package/src/Eita__Toast.res.mjs +112 -0
  44. package/src/Eita__Tooltip.res.mjs +60 -0
  45. package/src/Eita__Topbar.res.mjs +96 -0
  46. package/src/Eita__Typography.res.mjs +183 -0
  47. package/src/Eita__Utils.res.mjs +32 -0
  48. package/src/Example.res +111 -0
  49. package/src/Example.res.mjs +176 -0
  50. package/src/components/Basefn__Accordion.css +70 -0
  51. package/src/components/Basefn__Accordion.res +79 -0
  52. package/src/components/Basefn__Accordion.res.mjs +77 -0
  53. package/src/components/Basefn__Alert.css +79 -0
  54. package/src/components/Basefn__Alert.res +68 -0
  55. package/src/components/Basefn__Alert.res.mjs +78 -0
  56. package/src/components/Basefn__AppLayout.css +100 -0
  57. package/src/components/Basefn__AppLayout.res +74 -0
  58. package/src/components/Basefn__AppLayout.res.mjs +100 -0
  59. package/src/components/Basefn__Avatar.css +25 -0
  60. package/src/components/Basefn__Avatar.res +23 -0
  61. package/src/components/Basefn__Avatar.res.mjs +40 -0
  62. package/src/components/Basefn__Badge.css +71 -0
  63. package/src/components/Basefn__Badge.res +43 -0
  64. package/src/components/Basefn__Badge.res.mjs +65 -0
  65. package/src/components/Basefn__Breadcrumb.css +36 -0
  66. package/src/components/Basefn__Breadcrumb.res +45 -0
  67. package/src/components/Basefn__Breadcrumb.res.mjs +53 -0
  68. package/src/components/Basefn__Button.css +83 -0
  69. package/src/components/Basefn__Button.res +32 -0
  70. package/src/components/Basefn__Button.res.mjs +54 -0
  71. package/src/components/Basefn__Card.css +50 -0
  72. package/src/components/Basefn__Card.res +45 -0
  73. package/src/components/Basefn__Card.res.mjs +60 -0
  74. package/src/components/Basefn__Checkbox.css +72 -0
  75. package/src/components/Basefn__Checkbox.res +25 -0
  76. package/src/components/Basefn__Checkbox.res.mjs +36 -0
  77. package/src/components/Basefn__Drawer.css +168 -0
  78. package/src/components/Basefn__Drawer.res +86 -0
  79. package/src/components/Basefn__Drawer.res.mjs +112 -0
  80. package/src/components/Basefn__Dropdown.css +76 -0
  81. package/src/components/Basefn__Dropdown.res +85 -0
  82. package/src/components/Basefn__Dropdown.res.mjs +96 -0
  83. package/src/components/Basefn__Grid.css +11 -0
  84. package/src/components/Basefn__Grid.res +296 -0
  85. package/src/components/Basefn__Grid.res.mjs +263 -0
  86. package/src/components/Basefn__Icon.css +12 -0
  87. package/src/components/Basefn__Icon.res +196 -0
  88. package/src/components/Basefn__Icon.res.mjs +183 -0
  89. package/src/components/Basefn__Input.css +44 -0
  90. package/src/components/Basefn__Input.res +48 -0
  91. package/src/components/Basefn__Input.res.mjs +63 -0
  92. package/src/components/Basefn__Kbd.css +65 -0
  93. package/src/components/Basefn__Kbd.res +27 -0
  94. package/src/components/Basefn__Kbd.res.mjs +42 -0
  95. package/src/components/Basefn__Label.css +22 -0
  96. package/src/components/Basefn__Label.res +18 -0
  97. package/src/components/Basefn__Label.res.mjs +24 -0
  98. package/src/components/Basefn__Modal.css +100 -0
  99. package/src/components/Basefn__Modal.res +74 -0
  100. package/src/components/Basefn__Modal.res.mjs +93 -0
  101. package/src/components/Basefn__Progress.css +69 -0
  102. package/src/components/Basefn__Progress.res +88 -0
  103. package/src/components/Basefn__Progress.res.mjs +101 -0
  104. package/src/components/Basefn__Radio.css +72 -0
  105. package/src/components/Basefn__Radio.res +35 -0
  106. package/src/components/Basefn__Radio.res.mjs +38 -0
  107. package/src/components/Basefn__Select.css +44 -0
  108. package/src/components/Basefn__Select.res +33 -0
  109. package/src/components/Basefn__Select.res.mjs +40 -0
  110. package/src/components/Basefn__Separator.css +85 -0
  111. package/src/components/Basefn__Separator.res +45 -0
  112. package/src/components/Basefn__Separator.res.mjs +70 -0
  113. package/src/components/Basefn__Sidebar.css +141 -0
  114. package/src/components/Basefn__Sidebar.res +95 -0
  115. package/src/components/Basefn__Sidebar.res.mjs +107 -0
  116. package/src/components/Basefn__Slider.css +97 -0
  117. package/src/components/Basefn__Slider.res +68 -0
  118. package/src/components/Basefn__Slider.res.mjs +89 -0
  119. package/src/components/Basefn__Spinner.css +63 -0
  120. package/src/components/Basefn__Spinner.res +44 -0
  121. package/src/components/Basefn__Spinner.res.mjs +69 -0
  122. package/src/components/Basefn__Stepper.css +141 -0
  123. package/src/components/Basefn__Stepper.res +86 -0
  124. package/src/components/Basefn__Stepper.res.mjs +114 -0
  125. package/src/components/Basefn__Switch.css +80 -0
  126. package/src/components/Basefn__Switch.res +62 -0
  127. package/src/components/Basefn__Switch.res.mjs +84 -0
  128. package/src/components/Basefn__Tabs.css +54 -0
  129. package/src/components/Basefn__Tabs.res +73 -0
  130. package/src/components/Basefn__Tabs.res.mjs +57 -0
  131. package/src/components/Basefn__Textarea.css +41 -0
  132. package/src/components/Basefn__Textarea.res +28 -0
  133. package/src/components/Basefn__Textarea.res.mjs +41 -0
  134. package/src/components/Basefn__ThemeToggle.css +5 -0
  135. package/src/components/Basefn__ThemeToggle.res +29 -0
  136. package/src/components/Basefn__ThemeToggle.res.mjs +49 -0
  137. package/src/components/Basefn__Timeline.css +144 -0
  138. package/src/components/Basefn__Timeline.res +70 -0
  139. package/src/components/Basefn__Timeline.res.mjs +86 -0
  140. package/src/components/Basefn__Toast.css +100 -0
  141. package/src/components/Basefn__Toast.res +92 -0
  142. package/src/components/Basefn__Toast.res.mjs +112 -0
  143. package/src/components/Basefn__Tooltip.css +84 -0
  144. package/src/components/Basefn__Tooltip.res +42 -0
  145. package/src/components/Basefn__Tooltip.res.mjs +60 -0
  146. package/src/components/Basefn__Topbar.css +130 -0
  147. package/src/components/Basefn__Topbar.res +92 -0
  148. package/src/components/Basefn__Topbar.res.mjs +91 -0
  149. package/src/components/Basefn__Typography.css +120 -0
  150. package/src/components/Basefn__Typography.res +96 -0
  151. package/src/components/Basefn__Typography.res.mjs +175 -0
  152. package/src/styles/Basefn__Theme.res +63 -0
  153. package/src/styles/Basefn__Theme.res.mjs +65 -0
  154. package/src/styles/variables.css +199 -0
@@ -0,0 +1,86 @@
1
+ %%raw(`import './Basefn__Drawer.css'`)
2
+
3
+ open Xote
4
+
5
+ type position = Left | Right | Top | Bottom
6
+
7
+ type size = Sm | Md | Lg
8
+
9
+ let positionToString = (position: position) => {
10
+ switch position {
11
+ | Left => "left"
12
+ | Right => "right"
13
+ | Top => "top"
14
+ | Bottom => "bottom"
15
+ }
16
+ }
17
+
18
+ let sizeToString = (size: size) => {
19
+ switch size {
20
+ | Sm => "sm"
21
+ | Md => "md"
22
+ | Lg => "lg"
23
+ }
24
+ }
25
+
26
+ @jsx.component
27
+ let make = (
28
+ ~isOpen: Signal.t<bool>,
29
+ ~onClose: unit => unit,
30
+ ~position: position=Right,
31
+ ~size: size=Md,
32
+ ~title: option<string>=?,
33
+ ~showCloseButton: bool=true,
34
+ ~closeOnBackdrop: bool=true,
35
+ ~children: Component.node,
36
+ ~footer: option<Component.node>=?,
37
+ ) => {
38
+ let handleBackdropClick = evt => {
39
+ if closeOnBackdrop {
40
+ let target = Obj.magic(evt)["target"]
41
+ let currentTarget = Obj.magic(evt)["currentTarget"]
42
+ if target === currentTarget {
43
+ onClose()
44
+ }
45
+ }
46
+ }
47
+
48
+ let getDrawerClass = () => {
49
+ let positionClass = "basefn-drawer--" ++ positionToString(position)
50
+ let sizeClass = "basefn-drawer--" ++ sizeToString(size)
51
+ "basefn-drawer " ++ positionClass ++ " " ++ sizeClass
52
+ }
53
+
54
+ let content = Computed.make(() => {
55
+ if Signal.get(isOpen) {
56
+ [
57
+ <>
58
+ <div class="basefn-drawer-backdrop" onClick={handleBackdropClick} />
59
+ <div class={getDrawerClass()}>
60
+ {switch title {
61
+ | Some(titleText) =>
62
+ <div class="basefn-drawer__header">
63
+ <h2 class="basefn-drawer__title"> {Component.text(titleText)} </h2>
64
+ {showCloseButton
65
+ ? <button class="basefn-drawer__close" onClick={_ => onClose()}>
66
+ {Component.text("\u00d7")}
67
+ </button>
68
+ : <> </>}
69
+ </div>
70
+ | None => <> </>
71
+ }}
72
+ <div class="basefn-drawer__body"> {children} </div>
73
+ {switch footer {
74
+ | Some(footerContent) => <div class="basefn-drawer__footer"> {footerContent} </div>
75
+ | None => <> </>
76
+ }}
77
+ </div>
78
+ </>,
79
+ ]
80
+ } else {
81
+ []
82
+ }
83
+ })
84
+
85
+ Component.signalFragment(content)
86
+ }
@@ -0,0 +1,112 @@
1
+ // Generated by ReScript, PLEASE EDIT WITH CARE
2
+
3
+ import * as Xote from "xote/src/Xote.res.mjs";
4
+ import * as Xote__JSX from "xote/src/Xote__JSX.res.mjs";
5
+
6
+ import './Basefn__Drawer.css'
7
+ ;
8
+
9
+ function positionToString(position) {
10
+ switch (position) {
11
+ case "Left" :
12
+ return "left";
13
+ case "Right" :
14
+ return "right";
15
+ case "Top" :
16
+ return "top";
17
+ case "Bottom" :
18
+ return "bottom";
19
+ }
20
+ }
21
+
22
+ function sizeToString(size) {
23
+ switch (size) {
24
+ case "Sm" :
25
+ return "sm";
26
+ case "Md" :
27
+ return "md";
28
+ case "Lg" :
29
+ return "lg";
30
+ }
31
+ }
32
+
33
+ function Basefn__Drawer(props) {
34
+ let footer = props.footer;
35
+ let children = props.children;
36
+ let __closeOnBackdrop = props.closeOnBackdrop;
37
+ let __showCloseButton = props.showCloseButton;
38
+ let title = props.title;
39
+ let __size = props.size;
40
+ let __position = props.position;
41
+ let onClose = props.onClose;
42
+ let isOpen = props.isOpen;
43
+ let position = __position !== undefined ? __position : "Right";
44
+ let size = __size !== undefined ? __size : "Md";
45
+ let showCloseButton = __showCloseButton !== undefined ? __showCloseButton : true;
46
+ let closeOnBackdrop = __closeOnBackdrop !== undefined ? __closeOnBackdrop : true;
47
+ let handleBackdropClick = evt => {
48
+ if (!closeOnBackdrop) {
49
+ return;
50
+ }
51
+ let target = evt.target;
52
+ let currentTarget = evt.currentTarget;
53
+ if (target === currentTarget) {
54
+ return onClose();
55
+ }
56
+ };
57
+ let getDrawerClass = () => {
58
+ let positionClass = "basefn-drawer--" + positionToString(position);
59
+ let sizeClass = "basefn-drawer--" + sizeToString(size);
60
+ return "basefn-drawer " + positionClass + " " + sizeClass;
61
+ };
62
+ return Xote.Component.signalFragment(Xote.Computed.make(() => {
63
+ if (Xote.Signal.get(isOpen)) {
64
+ return [Xote__JSX.jsxs(Xote__JSX.jsxFragment, {
65
+ children: Xote__JSX.array([
66
+ Xote__JSX.Elements.jsx("div", {
67
+ class: "basefn-drawer-backdrop",
68
+ onClick: handleBackdropClick
69
+ }),
70
+ Xote__JSX.Elements.jsxs("div", {
71
+ class: getDrawerClass(),
72
+ children: Xote__JSX.array([
73
+ title !== undefined ? Xote__JSX.Elements.jsxs("div", {
74
+ class: "basefn-drawer__header",
75
+ children: Xote__JSX.array([
76
+ Xote__JSX.Elements.jsx("h2", {
77
+ class: "basefn-drawer__title",
78
+ children: Xote.Component.text(title)
79
+ }),
80
+ showCloseButton ? Xote__JSX.Elements.jsx("button", {
81
+ class: "basefn-drawer__close",
82
+ onClick: param => onClose(),
83
+ children: Xote.Component.text("\u00d7")
84
+ }) : Xote__JSX.jsx(Xote__JSX.jsxFragment, {})
85
+ ])
86
+ }) : Xote__JSX.jsx(Xote__JSX.jsxFragment, {}),
87
+ Xote__JSX.Elements.jsx("div", {
88
+ class: "basefn-drawer__body",
89
+ children: children
90
+ }),
91
+ footer !== undefined ? Xote__JSX.Elements.jsx("div", {
92
+ class: "basefn-drawer__footer",
93
+ children: footer
94
+ }) : Xote__JSX.jsx(Xote__JSX.jsxFragment, {})
95
+ ])
96
+ })
97
+ ])
98
+ })];
99
+ } else {
100
+ return [];
101
+ }
102
+ }, undefined));
103
+ }
104
+
105
+ let make = Basefn__Drawer;
106
+
107
+ export {
108
+ positionToString,
109
+ sizeToString,
110
+ make,
111
+ }
112
+ /* Not a pure module */
@@ -0,0 +1,76 @@
1
+ .basefn-dropdown {
2
+ position: relative;
3
+ display: inline-block;
4
+ }
5
+
6
+ .basefn-dropdown__menu {
7
+ position: absolute;
8
+ top: calc(100% + 4px);
9
+ left: 0;
10
+ min-width: 200px;
11
+ background: white;
12
+ border: 1px solid #e5e7eb;
13
+ border-radius: 0.5rem;
14
+ box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
15
+ z-index: 100;
16
+ animation: basefn-dropdown-fade-in 0.15s ease-out;
17
+ overflow: hidden;
18
+ }
19
+
20
+ .basefn-dropdown__menu--right {
21
+ left: auto;
22
+ right: 0;
23
+ }
24
+
25
+ .basefn-dropdown__item {
26
+ display: flex;
27
+ align-items: center;
28
+ gap: 0.75rem;
29
+ width: 100%;
30
+ padding: 0.75rem 1rem;
31
+ font-size: 0.875rem;
32
+ color: #374151;
33
+ background: none;
34
+ border: none;
35
+ cursor: pointer;
36
+ transition: background-color 0.15s;
37
+ text-align: left;
38
+ }
39
+
40
+ .basefn-dropdown__item:hover {
41
+ background-color: #f3f4f6;
42
+ }
43
+
44
+ .basefn-dropdown__item--disabled {
45
+ opacity: 0.5;
46
+ cursor: not-allowed;
47
+ }
48
+
49
+ .basefn-dropdown__item--disabled:hover {
50
+ background-color: transparent;
51
+ }
52
+
53
+ .basefn-dropdown__item--danger {
54
+ color: #ef4444;
55
+ }
56
+
57
+ .basefn-dropdown__item--danger:hover {
58
+ background-color: #fee2e2;
59
+ }
60
+
61
+ .basefn-dropdown__separator {
62
+ height: 1px;
63
+ background-color: #e5e7eb;
64
+ margin: 0.25rem 0;
65
+ }
66
+
67
+ @keyframes basefn-dropdown-fade-in {
68
+ from {
69
+ opacity: 0;
70
+ transform: translateY(-4px);
71
+ }
72
+ to {
73
+ opacity: 1;
74
+ transform: translateY(0);
75
+ }
76
+ }
@@ -0,0 +1,85 @@
1
+ %%raw(`import './Basefn__Dropdown.css'`)
2
+
3
+ open Xote
4
+
5
+ type menuItem = {
6
+ label: string,
7
+ onClick: unit => unit,
8
+ disabled?: bool,
9
+ danger?: bool,
10
+ }
11
+
12
+ type menuContent =
13
+ | Item(menuItem)
14
+ | Separator
15
+
16
+ @jsx.component
17
+ let make = (
18
+ ~trigger: Component.node,
19
+ ~items: array<menuContent>,
20
+ ~align: [#left | #right]=#left,
21
+ ) => {
22
+ let isOpen = Signal.make(false)
23
+
24
+ let handleToggle = _ => {
25
+ Signal.update(isOpen, prev => !prev)
26
+ }
27
+
28
+ let handleItemClick = (onClick: unit => unit, disabled: bool) => {
29
+ switch disabled {
30
+ | true => ()
31
+ | _ => {
32
+ onClick()
33
+ Signal.set(isOpen, false)
34
+ }
35
+ }
36
+ }
37
+
38
+ let getMenuClass = () => {
39
+ let baseClass = "basefn-dropdown__menu"
40
+ let alignClass = switch align {
41
+ | #right => " basefn-dropdown__menu--right"
42
+ | #left => ""
43
+ }
44
+ baseClass ++ alignClass
45
+ }
46
+
47
+ let menuContent = Computed.make(() => {
48
+ if Signal.get(isOpen) {
49
+ [
50
+ <div class={getMenuClass()}>
51
+ {items
52
+ ->Array.mapWithIndex((item, index) => {
53
+ switch item {
54
+ | Item({label, onClick, disabled, danger}) => {
55
+ let className =
56
+ "basefn-dropdown__item" ++
57
+ (disabled ? " basefn-dropdown__item--disabled" : "") ++ (
58
+ danger ? " basefn-dropdown__item--danger" : ""
59
+ )
60
+
61
+ <button
62
+ key={Int.toString(index)}
63
+ class={className}
64
+ onClick={_ => handleItemClick(onClick, disabled)}
65
+ disabled={disabled}
66
+ >
67
+ {Component.text(label)}
68
+ </button>
69
+ }
70
+ | Separator => <div key={Int.toString(index)} class="basefn-dropdown__separator" />
71
+ }
72
+ })
73
+ ->Component.fragment}
74
+ </div>,
75
+ ]
76
+ } else {
77
+ []
78
+ }
79
+ })
80
+
81
+ <div class="basefn-dropdown">
82
+ <div onClick={handleToggle}> {trigger} </div>
83
+ {Component.signalFragment(menuContent)}
84
+ </div>
85
+ }
@@ -0,0 +1,96 @@
1
+ // Generated by ReScript, PLEASE EDIT WITH CARE
2
+
3
+ import * as Xote from "xote/src/Xote.res.mjs";
4
+ import * as Xote__JSX from "xote/src/Xote__JSX.res.mjs";
5
+
6
+ import './Basefn__Dropdown.css'
7
+ ;
8
+
9
+ function Basefn__Dropdown(props) {
10
+ let __align = props.align;
11
+ let items = props.items;
12
+ let align = __align !== undefined ? __align : "left";
13
+ let isOpen = Xote.Signal.make(false, undefined, undefined);
14
+ let handleToggle = param => Xote.Signal.update(isOpen, prev => !prev);
15
+ let getMenuClass = () => {
16
+ let alignClass = align === "right" ? " basefn-dropdown__menu--right" : "";
17
+ return "basefn-dropdown__menu" + alignClass;
18
+ };
19
+ let menuContent = Xote.Computed.make(() => {
20
+ if (Xote.Signal.get(isOpen)) {
21
+ return [Xote__JSX.Elements.jsx("div", {
22
+ class: getMenuClass(),
23
+ children: Xote.Component.fragment(items.map((item, index) => {
24
+ if (typeof item !== "object") {
25
+ return Xote__JSX.Elements.jsxKeyed("div", {
26
+ class: "basefn-dropdown__separator"
27
+ }, index.toString(), undefined);
28
+ }
29
+ let match = item._0;
30
+ let disabled = match.disabled;
31
+ if (disabled !== undefined) {
32
+ let danger = match.danger;
33
+ if (danger !== undefined) {
34
+ let onClick = match.onClick;
35
+ let className = "basefn-dropdown__item" + (
36
+ disabled ? " basefn-dropdown__item--disabled" : ""
37
+ ) + (
38
+ danger ? " basefn-dropdown__item--danger" : ""
39
+ );
40
+ return Xote__JSX.Elements.jsxKeyed("button", {
41
+ class: className,
42
+ disabled: disabled,
43
+ onClick: param => {
44
+ if (disabled) {
45
+ return;
46
+ } else {
47
+ onClick();
48
+ return Xote.Signal.set(isOpen, false);
49
+ }
50
+ },
51
+ children: Xote.Component.text(match.label)
52
+ }, index.toString(), undefined);
53
+ }
54
+ throw {
55
+ RE_EXN_ID: "Match_failure",
56
+ _1: [
57
+ "Basefn__Dropdown.res",
58
+ 53,
59
+ 12
60
+ ],
61
+ Error: new Error()
62
+ };
63
+ }
64
+ throw {
65
+ RE_EXN_ID: "Match_failure",
66
+ _1: [
67
+ "Basefn__Dropdown.res",
68
+ 53,
69
+ 12
70
+ ],
71
+ Error: new Error()
72
+ };
73
+ }))
74
+ })];
75
+ } else {
76
+ return [];
77
+ }
78
+ }, undefined);
79
+ return Xote__JSX.Elements.jsxs("div", {
80
+ class: "basefn-dropdown",
81
+ children: Xote__JSX.array([
82
+ Xote__JSX.Elements.jsx("div", {
83
+ onClick: handleToggle,
84
+ children: props.trigger
85
+ }),
86
+ Xote.Component.signalFragment(menuContent)
87
+ ])
88
+ });
89
+ }
90
+
91
+ let make = Basefn__Dropdown;
92
+
93
+ export {
94
+ make,
95
+ }
96
+ /* Not a pure module */
@@ -0,0 +1,11 @@
1
+ @import '../styles/variables.css';
2
+
3
+ .basefn-grid {
4
+ display: grid;
5
+ gap: 1rem; /* Default gap */
6
+ }
7
+
8
+ .basefn-grid-item {
9
+ /* Grid items don't need special styling by default */
10
+ /* Positioning is handled via inline styles */
11
+ }