@stll/ui 0.2.0 → 0.4.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.
@@ -0,0 +1,59 @@
1
+ //#region src/lib/option-color.ts
2
+ /** Named preset colors with CSS variable references. */
3
+ const NAMED_COLORS = Object.freeze([
4
+ "red",
5
+ "orange",
6
+ "amber",
7
+ "yellow",
8
+ "lime",
9
+ "green",
10
+ "emerald",
11
+ "teal",
12
+ "cyan",
13
+ "sky",
14
+ "blue",
15
+ "indigo",
16
+ "violet",
17
+ "purple",
18
+ "fuchsia",
19
+ "gray"
20
+ ]);
21
+ const optionVar = (name) => ({
22
+ background: `var(--option-${name}-bg)`,
23
+ foreground: `var(--option-${name}-fg)`,
24
+ color: `var(--option-${name})`
25
+ });
26
+ const hexVar = (hex) => ({
27
+ background: `color-mix(in srgb, #${hex} 12%, var(--background))`,
28
+ foreground: `color-mix(in srgb, #${hex} 50%, var(--foreground))`,
29
+ color: `#${hex}`
30
+ });
31
+ const namedColorsMap = {
32
+ red: optionVar("red"),
33
+ orange: optionVar("orange"),
34
+ amber: optionVar("amber"),
35
+ yellow: optionVar("yellow"),
36
+ lime: optionVar("lime"),
37
+ green: optionVar("green"),
38
+ emerald: optionVar("emerald"),
39
+ teal: optionVar("teal"),
40
+ cyan: optionVar("cyan"),
41
+ sky: optionVar("sky"),
42
+ blue: optionVar("blue"),
43
+ indigo: optionVar("indigo"),
44
+ violet: optionVar("violet"),
45
+ purple: optionVar("purple"),
46
+ fuchsia: optionVar("fuchsia"),
47
+ gray: optionVar("gray")
48
+ };
49
+ const emptyColor = optionVar("empty");
50
+ /** Resolve any OptionColor (named or hex) to CSS color variants. */
51
+ const resolveOptionColor = (color) => {
52
+ const namedColor = NAMED_COLORS.find((candidate) => candidate === color);
53
+ if (namedColor !== void 0) return namedColorsMap[namedColor];
54
+ return hexVar(color);
55
+ };
56
+ /** The 16 named preset color keys. */
57
+ const optionColors = NAMED_COLORS;
58
+ //#endregion
59
+ export { emptyColor, optionColors, resolveOptionColor };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stll/ui",
3
- "version": "0.2.0",
3
+ "version": "0.4.0",
4
4
  "description": "Stella's design system: bidi-aware React primitives built on Base UI, the dockable inspector pane, and the Tailwind v4 theme they are styled with.",
5
5
  "keywords": [
6
6
  "base-ui",
@@ -81,6 +81,14 @@
81
81
  "types": "./dist/components/command.d.ts",
82
82
  "import": "./dist/components/command.js"
83
83
  },
84
+ "./calendar": {
85
+ "types": "./dist/calendar/index.d.ts",
86
+ "import": "./dist/calendar/index.js"
87
+ },
88
+ "./data-table": {
89
+ "types": "./dist/data-table/index.d.ts",
90
+ "import": "./dist/data-table/index.js"
91
+ },
84
92
  "./date-picker-popover": {
85
93
  "types": "./dist/components/date-picker-popover.d.ts",
86
94
  "import": "./dist/components/date-picker-popover.js"
@@ -137,6 +145,10 @@
137
145
  "types": "./dist/components/menu.d.ts",
138
146
  "import": "./dist/components/menu.js"
139
147
  },
148
+ "./option-color": {
149
+ "types": "./dist/lib/option-color.d.ts",
150
+ "import": "./dist/lib/option-color.js"
151
+ },
140
152
  "./outline-rail": {
141
153
  "types": "./dist/components/outline-rail.d.ts",
142
154
  "import": "./dist/components/outline-rail.js"
@@ -249,6 +261,10 @@
249
261
  "types": "./dist/inspector/index.d.ts",
250
262
  "import": "./dist/inspector/index.js"
251
263
  },
264
+ "./kanban": {
265
+ "types": "./dist/kanban/index.d.ts",
266
+ "import": "./dist/kanban/index.js"
267
+ },
252
268
  "./theme.css": "./dist/styles/theme.css",
253
269
  "./components/accordion": {
254
270
  "types": "./dist/components/accordion.d.ts",
@@ -485,6 +501,8 @@
485
501
  "tailwind-merge": "^3.6.0"
486
502
  },
487
503
  "devDependencies": {
504
+ "@atlaskit/pragmatic-drag-and-drop": "^3.0.0",
505
+ "@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^3.0.1",
488
506
  "@base-ui/react": "1.7.0",
489
507
  "@stll/typescript-config": "0.0.0",
490
508
  "@types/bun": "1.3.14",
@@ -496,6 +514,8 @@
496
514
  "tsdown": "0.22.14"
497
515
  },
498
516
  "peerDependencies": {
517
+ "@atlaskit/pragmatic-drag-and-drop": "^3.0.0",
518
+ "@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^3.0.1",
499
519
  "@base-ui/react": "^1.7.0",
500
520
  "react": ">=19",
501
521
  "react-dom": ">=19",