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,175 @@
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__Typography.css'
7
+ ;
8
+
9
+ function variantToTag(variant) {
10
+ switch (variant) {
11
+ case "H1" :
12
+ return "h1";
13
+ case "H2" :
14
+ return "h2";
15
+ case "H3" :
16
+ return "h3";
17
+ case "H4" :
18
+ return "h4";
19
+ case "H5" :
20
+ return "h5";
21
+ case "H6" :
22
+ return "h6";
23
+ case "Small" :
24
+ return "small";
25
+ case "P" :
26
+ case "Lead" :
27
+ case "Muted" :
28
+ return "p";
29
+ case "Code" :
30
+ return "code";
31
+ case "Unstyled" :
32
+ return "div";
33
+ }
34
+ }
35
+
36
+ function variantToClass(variant) {
37
+ switch (variant) {
38
+ case "H1" :
39
+ return "basefn-typography--h1";
40
+ case "H2" :
41
+ return "basefn-typography--h2";
42
+ case "H3" :
43
+ return "basefn-typography--h3";
44
+ case "H4" :
45
+ return "basefn-typography--h4";
46
+ case "H5" :
47
+ return "basefn-typography--h5";
48
+ case "H6" :
49
+ return "basefn-typography--h6";
50
+ case "P" :
51
+ return "basefn-typography--p";
52
+ case "Small" :
53
+ return "basefn-typography--small";
54
+ case "Lead" :
55
+ return "basefn-typography--lead";
56
+ case "Muted" :
57
+ return "basefn-typography--muted";
58
+ case "Code" :
59
+ return "basefn-typography--code";
60
+ case "Unstyled" :
61
+ return "basefn-typography--unstyled";
62
+ }
63
+ }
64
+
65
+ function alignToString(align) {
66
+ switch (align) {
67
+ case "Left" :
68
+ return "left";
69
+ case "Center" :
70
+ return "center";
71
+ case "Right" :
72
+ return "right";
73
+ case "Justify" :
74
+ return "justify";
75
+ }
76
+ }
77
+
78
+ function Basefn__Typography(props) {
79
+ let style = props.style;
80
+ let __class = props.class;
81
+ let align = props.align;
82
+ let __variant = props.variant;
83
+ let text = props.text;
84
+ let variant = __variant !== undefined ? __variant : "P";
85
+ let $$class = __class !== undefined ? __class : "";
86
+ let variantClass = variantToClass(variant);
87
+ let baseClass = "basefn-typography " + variantClass;
88
+ let alignClass = align !== undefined ? " basefn-typography--" + alignToString(align) : "";
89
+ let customClass = $$class !== "" ? " " + $$class : "";
90
+ let $$class$1 = baseClass + alignClass + customClass;
91
+ let renderText = text => {
92
+ if (text.TAG === "Reactive") {
93
+ return {
94
+ TAG: "SignalText",
95
+ _0: text._0
96
+ };
97
+ } else {
98
+ return Xote.Component.text(text._0);
99
+ }
100
+ };
101
+ switch (variant) {
102
+ case "H1" :
103
+ return Xote__JSX.Elements.jsx("h1", {
104
+ class: $$class$1,
105
+ style: style,
106
+ children: renderText(text)
107
+ });
108
+ case "H2" :
109
+ return Xote__JSX.Elements.jsx("h2", {
110
+ class: $$class$1,
111
+ style: style,
112
+ children: renderText(text)
113
+ });
114
+ case "H3" :
115
+ return Xote__JSX.Elements.jsx("h3", {
116
+ class: $$class$1,
117
+ style: style,
118
+ children: renderText(text)
119
+ });
120
+ case "H4" :
121
+ return Xote__JSX.Elements.jsx("h4", {
122
+ class: $$class$1,
123
+ style: style,
124
+ children: renderText(text)
125
+ });
126
+ case "H5" :
127
+ return Xote__JSX.Elements.jsx("h5", {
128
+ class: $$class$1,
129
+ style: style,
130
+ children: renderText(text)
131
+ });
132
+ case "H6" :
133
+ return Xote__JSX.Elements.jsx("h6", {
134
+ class: $$class$1,
135
+ style: style,
136
+ children: renderText(text)
137
+ });
138
+ case "Small" :
139
+ return Xote__JSX.Elements.jsx("small", {
140
+ class: $$class$1,
141
+ style: style,
142
+ children: renderText(text)
143
+ });
144
+ case "P" :
145
+ case "Lead" :
146
+ case "Muted" :
147
+ return Xote__JSX.Elements.jsx("p", {
148
+ class: $$class$1,
149
+ style: style,
150
+ children: renderText(text)
151
+ });
152
+ case "Code" :
153
+ return Xote__JSX.Elements.jsx("code", {
154
+ class: $$class$1,
155
+ style: style,
156
+ children: renderText(text)
157
+ });
158
+ case "Unstyled" :
159
+ return Xote__JSX.Elements.jsx("div", {
160
+ class: $$class$1,
161
+ style: style,
162
+ children: renderText(text)
163
+ });
164
+ }
165
+ }
166
+
167
+ let make = Basefn__Typography;
168
+
169
+ export {
170
+ variantToTag,
171
+ variantToClass,
172
+ alignToString,
173
+ make,
174
+ }
175
+ /* Not a pure module */
@@ -0,0 +1,63 @@
1
+ open Xote
2
+
3
+ type theme = Light | Dark
4
+
5
+ // Global theme state
6
+ let currentTheme = Signal.make(Light)
7
+
8
+ // Convert theme to string
9
+ let themeToString = (theme: theme) => {
10
+ switch theme {
11
+ | Light => "light"
12
+ | Dark => "dark"
13
+ }
14
+ }
15
+
16
+ // Convert string to theme
17
+ let stringToTheme = (str: string) => {
18
+ switch str {
19
+ | "dark" => Dark
20
+ | _ => Light
21
+ }
22
+ }
23
+
24
+ // Apply theme to document
25
+ let applyTheme = (theme: theme) => {
26
+ let themeValue = themeToString(theme)
27
+
28
+ (
29
+ %raw(`function(val) { document.documentElement.setAttribute('data-theme', val) }`): string => unit
30
+ )(themeValue)
31
+ }
32
+
33
+ // LocalStorage persistence
34
+ let saveThemePreference = (theme: theme) => {
35
+ let themeValue = themeToString(theme)
36
+ (%raw(`function(val) { localStorage.setItem('basefn-theme', val) }`): string => unit)(themeValue)
37
+ }
38
+
39
+ let loadThemePreference = () => {
40
+ let stored: option<string> = %raw(`localStorage.getItem('basefn-theme')`)
41
+ switch stored {
42
+ | Some(value) => stringToTheme(value)
43
+ | None => Light
44
+ }
45
+ }
46
+
47
+ // Toggle between Light and Dark
48
+ let toggleTheme = () => {
49
+ let newTheme = switch Signal.get(currentTheme) {
50
+ | Light => Dark
51
+ | Dark => Light
52
+ }
53
+ Signal.set(currentTheme, newTheme)
54
+ applyTheme(newTheme)
55
+ saveThemePreference(newTheme)
56
+ }
57
+
58
+ // Initialize theme system
59
+ let init = () => {
60
+ let stored = loadThemePreference()
61
+ Signal.set(currentTheme, stored)
62
+ applyTheme(stored)
63
+ }
@@ -0,0 +1,65 @@
1
+ // Generated by ReScript, PLEASE EDIT WITH CARE
2
+
3
+ import * as Xote from "xote/src/Xote.res.mjs";
4
+
5
+ let currentTheme = Xote.Signal.make("Light", undefined, undefined);
6
+
7
+ function themeToString(theme) {
8
+ if (theme === "Light") {
9
+ return "light";
10
+ } else {
11
+ return "dark";
12
+ }
13
+ }
14
+
15
+ function stringToTheme(str) {
16
+ if (str === "dark") {
17
+ return "Dark";
18
+ } else {
19
+ return "Light";
20
+ }
21
+ }
22
+
23
+ function applyTheme(theme) {
24
+ ((function(val) { document.documentElement.setAttribute('data-theme', val) })(themeToString(theme)));
25
+ }
26
+
27
+ function saveThemePreference(theme) {
28
+ ((function(val) { localStorage.setItem('basefn-theme', val) })(themeToString(theme)));
29
+ }
30
+
31
+ function loadThemePreference() {
32
+ let stored = (localStorage.getItem('basefn-theme'));
33
+ if (stored !== undefined) {
34
+ return stringToTheme(stored);
35
+ } else {
36
+ return "Light";
37
+ }
38
+ }
39
+
40
+ function toggleTheme() {
41
+ let match = Xote.Signal.get(currentTheme);
42
+ let newTheme;
43
+ newTheme = match === "Light" ? "Dark" : "Light";
44
+ Xote.Signal.set(currentTheme, newTheme);
45
+ applyTheme(newTheme);
46
+ saveThemePreference(newTheme);
47
+ }
48
+
49
+ function init() {
50
+ let stored = loadThemePreference();
51
+ Xote.Signal.set(currentTheme, stored);
52
+ applyTheme(stored);
53
+ }
54
+
55
+ export {
56
+ currentTheme,
57
+ themeToString,
58
+ stringToTheme,
59
+ applyTheme,
60
+ saveThemePreference,
61
+ loadThemePreference,
62
+ toggleTheme,
63
+ init,
64
+ }
65
+ /* currentTheme Not a pure module */
@@ -0,0 +1,199 @@
1
+ @import url('https://fonts.googleapis.com/css2?family=Source+Code+Pro:ital,wght@0,200..900;1,200..900&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap');
2
+
3
+
4
+ :root {
5
+ /* Color Palette - Neutral Theme */
6
+ --basefn-color-primary: #3b82f6;
7
+ --basefn-color-primary-background: #eff6ff;
8
+ --basefn-color-primary-hover: #2563eb;
9
+ --basefn-color-primary-active: #1d4ed8;
10
+
11
+ --basefn-color-secondary: #111827;
12
+ --basefn-color-secondary-hover: #4b5563;
13
+ --basefn-color-secondary-active: #374151;
14
+
15
+ --basefn-color-neutral-50: #f9fafb;
16
+ --basefn-color-neutral-100: #f3f4f6;
17
+ --basefn-color-neutral-200: #e5e7eb;
18
+ --basefn-color-neutral-300: #d1d5db;
19
+ --basefn-color-neutral-400: #9ca3af;
20
+ --basefn-color-neutral-500: #6b7280;
21
+ --basefn-color-neutral-600: #4b5563;
22
+ --basefn-color-neutral-700: #374151;
23
+ --basefn-color-neutral-800: #1f2937;
24
+ --basefn-color-neutral-900: #111827;
25
+
26
+ --basefn-color-success: #10b981;
27
+ --basefn-color-error: #ef4444;
28
+ --basefn-color-warning: #f59e0b;
29
+ --basefn-color-info: #3b82f6;
30
+
31
+ --font-mono: "Source Code", monospace;
32
+
33
+ /* Typography */
34
+ --basefn-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
35
+ --basefn-font-family-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
36
+
37
+ --basefn-font-size-xs: 0.75rem; /* 12px */
38
+ --basefn-font-size-sm: 0.875rem; /* 14px */
39
+ --basefn-font-size-base: 1rem; /* 16px */
40
+ --basefn-font-size-lg: 1.125rem; /* 18px */
41
+ --basefn-font-size-xl: 1.25rem; /* 20px */
42
+
43
+ --basefn-font-weight-normal: 400;
44
+ --basefn-font-weight-medium: 500;
45
+ --basefn-font-weight-semibold: 600;
46
+ --basefn-font-weight-bold: 700;
47
+
48
+ --basefn-line-height-tight: 1.25;
49
+ --basefn-line-height-normal: 1.5;
50
+ --basefn-line-height-relaxed: 1.75;
51
+
52
+ /* Spacing */
53
+ --basefn-spacing-xs: 0.25rem; /* 4px */
54
+ --basefn-spacing-sm: 0.5rem; /* 8px */
55
+ --basefn-spacing-md: 0.75rem; /* 12px */
56
+ --basefn-spacing-lg: 1rem; /* 16px */
57
+ --basefn-spacing-xl: 1.5rem; /* 24px */
58
+ --basefn-spacing-2xl: 2rem; /* 32px */
59
+
60
+ /* Border Radius */
61
+ --basefn-radius-sm: 0.25rem; /* 4px */
62
+ --basefn-radius-md: 0.375rem; /* 6px */
63
+ --basefn-radius-lg: 0.5rem; /* 8px */
64
+ --basefn-radius-xl: 0.75rem; /* 12px */
65
+ --basefn-radius-full: 9999px;
66
+
67
+ /* Border Width */
68
+ --basefn-border-width: 1px;
69
+ --basefn-border-width-thick: 2px;
70
+
71
+ /* Shadows */
72
+ --basefn-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
73
+ --basefn-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
74
+ --basefn-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
75
+
76
+ /* Focus Ring */
77
+ --basefn-focus-ring-color: rgba(59, 130, 246, 0.5);
78
+ --basefn-focus-ring-width: 3px;
79
+ --basefn-focus-ring-offset: 2px;
80
+
81
+ /* Transitions */
82
+ --basefn-transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
83
+ --basefn-transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
84
+ --basefn-transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
85
+
86
+ /* Form-specific Variables */
87
+ --basefn-form-input-height: 2.5rem; /* 40px */
88
+ --basefn-form-input-height-sm: 2rem; /* 32px */
89
+ --basefn-form-input-height-lg: 3rem; /* 48px */
90
+
91
+ --basefn-form-input-padding-x: 0.75rem; /* 12px */
92
+ --basefn-form-input-padding-y: 0.5rem; /* 8px */
93
+
94
+ --basefn-form-input-bg: #ffffff;
95
+ --basefn-form-input-border: var(--basefn-color-neutral-300);
96
+ --basefn-form-input-border-focus: var(--basefn-color-primary);
97
+ --basefn-form-input-text: var(--basefn-color-neutral-900);
98
+ --basefn-form-input-placeholder: var(--basefn-color-neutral-400);
99
+
100
+ --basefn-form-input-disabled-bg: var(--basefn-color-neutral-100);
101
+ --basefn-form-input-disabled-border: var(--basefn-color-neutral-200);
102
+ --basefn-form-input-disabled-text: var(--basefn-color-neutral-500);
103
+
104
+ /* Button Variables */
105
+ --basefn-button-height: 2.5rem; /* 40px */
106
+ --basefn-button-height-sm: 2rem; /* 32px */
107
+ --basefn-button-height-lg: 3rem; /* 48px */
108
+
109
+ --basefn-button-padding-x: 1rem; /* 16px */
110
+ --basefn-button-padding-x-sm: 0.75rem; /* 12px */
111
+ --basefn-button-padding-x-lg: 1.5rem; /* 24px */
112
+
113
+ /* Semantic Color Tokens - Light Theme */
114
+ /* Backgrounds */
115
+ --basefn-bg-primary: #ffffff;
116
+ --basefn-bg-secondary: #f9fafb;
117
+ --basefn-bg-tertiary: #f3f4f6;
118
+ --basefn-bg-primary-aa: #eff6ff;
119
+
120
+
121
+ /* Text colors */
122
+ --basefn-text-primary: #111827;
123
+ --basefn-text-secondary: #4b5563;
124
+ --basefn-text-tertiary: #6b7280;
125
+ --basefn-text-muted: #9ca3af;
126
+
127
+ /* Borders */
128
+ --basefn-border-primary: #e5e7eb;
129
+ --basefn-border-secondary: #d1d5db;
130
+
131
+ /* Surfaces */
132
+ --basefn-surface-elevated: #ffffff;
133
+ --basefn-surface-overlay: rgba(0, 0, 0, 0.5);
134
+
135
+ /* Alert semantic colors - Light theme */
136
+ --basefn-alert-info-bg: #dbeafe;
137
+ --basefn-alert-info-text: #1e40af;
138
+ --basefn-alert-success-bg: #d1fae5;
139
+ --basefn-alert-success-text: #065f46;
140
+ --basefn-alert-error-bg: #fee2e2;
141
+ --basefn-alert-error-text: #991b1b;
142
+ --basefn-alert-warning-bg: #fef3c7;
143
+ --basefn-alert-warning-text: #92400e;
144
+ }
145
+
146
+ /* Dark Theme */
147
+ [data-theme="dark"] {
148
+
149
+ /* Backgrounds - Slate palette */
150
+ --basefn-bg-primary: #0f172a;
151
+ --basefn-bg-secondary: #131c2f;
152
+ --basefn-bg-tertiary: #334155;
153
+ --basefn-bg-primary-aa: #172443;
154
+ --basefn-bg-secondary-aa: #121e3b;
155
+
156
+ /* Text */
157
+ --basefn-text-primary: #f1f5f9;
158
+ --basefn-text-secondary: #cbd5e1;
159
+ --basefn-text-tertiary: #94a3b8;
160
+ --basefn-text-muted: #64748b;
161
+
162
+ /* Borders */
163
+ --basefn-border-primary: #334155;
164
+ --basefn-border-secondary: #475569;
165
+
166
+ /* Surfaces */
167
+ --basefn-surface-elevated: #1e293b;
168
+ --basefn-surface-overlay: rgba(0, 0, 0, 0.7);
169
+
170
+ /* Form inputs */
171
+ --basefn-form-input-bg: #1e293b;
172
+ --basefn-form-input-border: #475569;
173
+ --basefn-form-input-text: #f1f5f9;
174
+ --basefn-form-input-placeholder: #64748b;
175
+ --basefn-form-input-disabled-bg: #0f172a;
176
+ --basefn-form-input-disabled-border: #334155;
177
+ --basefn-form-input-disabled-text: #475569;
178
+
179
+ /* Shadows - darker for dark mode */
180
+ --basefn-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
181
+ --basefn-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.4);
182
+ --basefn-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5), 0 4px 6px -4px rgb(0 0 0 / 0.5);
183
+
184
+ /* Alert semantic colors - Dark theme */
185
+ --basefn-alert-info-bg: #1e3a5f;
186
+ --basefn-alert-info-text: #93c5fd;
187
+ --basefn-alert-success-bg: #064e3b;
188
+ --basefn-alert-success-text: #6ee7b7;
189
+ --basefn-alert-error-bg: #7f1d1d;
190
+ --basefn-alert-error-text: #fca5a5;
191
+ --basefn-alert-warning-bg: #78350f;
192
+ --basefn-alert-warning-text: #fcd34d;
193
+ }
194
+
195
+ /* Base reset for form elements */
196
+ * {
197
+ box-sizing: border-box;
198
+ font-family: 'Source Sans', sans-serif;
199
+ }