@korsolutions/ui 0.0.51 → 0.0.52

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/AGENTS.md CHANGED
@@ -29,6 +29,7 @@ Layer 3: Variants (themed style hooks)
29
29
  Headless UI components providing behavior without visual styles.
30
30
 
31
31
  **Pattern**:
32
+
32
33
  ```typescript
33
34
  // primitives/button/button-root.tsx
34
35
  export interface ButtonRootProps {
@@ -65,6 +66,7 @@ export const ButtonPrimitive = {
65
66
  ```
66
67
 
67
68
  **Key Rules**:
69
+
68
70
  - ❌ No inline styles or hardcoded colors
69
71
  - ❌ No theme access (`useTheme`)
70
72
  - ✅ Accept `styles` prop for variant injection
@@ -76,6 +78,7 @@ export const ButtonPrimitive = {
76
78
  Styled components using primitives with variant system.
77
79
 
78
80
  **Pattern**:
81
+
79
82
  ```typescript
80
83
  // components/button/components/button-root.tsx
81
84
  export interface ButtonRootProps extends ButtonPrimitiveRootProps {
@@ -98,6 +101,7 @@ export const Button = {
98
101
  ```
99
102
 
100
103
  **Key Rules**:
104
+
101
105
  - ✅ Use primitives as base
102
106
  - ✅ Apply variants for styling
103
107
  - ✅ Default variant is "default"
@@ -109,6 +113,7 @@ export const Button = {
109
113
  Theme-aware style hooks providing reactive styles.
110
114
 
111
115
  **Pattern**:
116
+
112
117
  ```typescript
113
118
  // components/button/variants/default.tsx
114
119
  import { useThemedStyles } from "@/utils/use-themed-styles";
@@ -131,7 +136,7 @@ export const useButtonVariantDefault = (): ButtonStyles => {
131
136
  spinner: {
132
137
  color: colors.background,
133
138
  },
134
- })
139
+ }),
135
140
  );
136
141
  };
137
142
 
@@ -143,6 +148,7 @@ export const ButtonVariants = {
143
148
  ```
144
149
 
145
150
  **Key Rules**:
151
+
146
152
  - ✅ Always use `useThemedStyles` hook
147
153
  - ✅ Return complete style objects
148
154
  - ✅ Access theme tokens (colors, radius, fontSize, etc.)
@@ -328,7 +334,7 @@ export const useAlertVariantDefault = (): AlertStyles => {
328
334
  color: colors.mutedForeground,
329
335
  lineHeight: 20,
330
336
  },
331
- })
337
+ }),
332
338
  );
333
339
  };
334
340
  ```
@@ -407,6 +413,7 @@ const composedProps = {
407
413
  ### Style Composition Order
408
414
 
409
415
  Always compose styles in this order:
416
+
410
417
  1. Variant styles (from `styles` prop)
411
418
  2. User styles (from `style` prop)
412
419
 
@@ -480,16 +487,16 @@ interface Theme {
480
487
 
481
488
  Always use theme tokens instead of hardcoded values:
482
489
 
483
- | Token | Usage |
484
- |-------|-------|
485
- | `colors.background` | Main background color |
486
- | `colors.foreground` | Main text color |
487
- | `colors.primary` | Primary action color |
488
- | `colors.muted` | Subtle background (hover states) |
489
- | `colors.border` | Border color |
490
- | `radius` | Border radius value |
491
- | `fontSize` | Base font size |
492
- | `fontFamily` | Font family string |
490
+ | Token | Usage |
491
+ | ------------------- | -------------------------------- |
492
+ | `colors.background` | Main background color |
493
+ | `colors.foreground` | Main text color |
494
+ | `colors.primary` | Primary action color |
495
+ | `colors.muted` | Subtle background (hover states) |
496
+ | `colors.border` | Border color |
497
+ | `radius` | Border radius value |
498
+ | `fontSize` | Base font size |
499
+ | `fontFamily` | Font family string |
493
500
 
494
501
  ## Anti-Patterns (Avoid)
495
502
 
@@ -529,28 +536,28 @@ export const useVariant = (): Styles => {
529
536
 
530
537
  ```typescript
531
538
  // BAD
532
- backgroundColor: '#007AFF'
539
+ backgroundColor: "#007AFF";
533
540
  ```
534
541
 
535
542
  ### ✅ Theme Colors
536
543
 
537
544
  ```typescript
538
545
  // GOOD
539
- backgroundColor: theme.colors.primary
546
+ backgroundColor: theme.colors.primary;
540
547
  ```
541
548
 
542
549
  ### ❌ String Values for Spacing
543
550
 
544
551
  ```typescript
545
552
  // BAD
546
- padding: '16px'
553
+ padding: "16px";
547
554
  ```
548
555
 
549
556
  ### ✅ Number Values
550
557
 
551
558
  ```typescript
552
559
  // GOOD
553
- padding: 16
560
+ padding: 16;
554
561
  ```
555
562
 
556
563
  ## Type Safety
@@ -596,6 +603,7 @@ bun build
596
603
  ```
597
604
 
598
605
  This runs:
606
+
599
607
  1. `bob build` - Compiles TypeScript with Babel
600
608
  2. `tsc-alias` - Resolves path aliases in type definitions
601
609
 
@@ -641,18 +649,23 @@ dist/
641
649
  ## Common Issues
642
650
 
643
651
  **Issue**: "Cannot find module @/..."
652
+
644
653
  - **Fix**: Check `tsconfig.json` has path alias: `"@/*": ["./src/*"]`
645
654
 
646
655
  **Issue**: Styles not applying
656
+
647
657
  - **Fix**: Ensure variant styles passed to primitive via `styles` prop
648
658
 
649
659
  **Issue**: Theme not updating
660
+
650
661
  - **Fix**: Use `useThemedStyles` hook, not plain `useMemo`
651
662
 
652
663
  **Issue**: Type errors with compound exports
664
+
653
665
  - **Fix**: Export both types and components from index files
654
666
 
655
667
  **Issue**: Build fails
668
+
656
669
  - **Fix**: Run `bun build` from library directory, check for TypeScript errors
657
670
 
658
671
  ## Resources
@@ -1 +1 @@
1
- {"version":3,"names":["calculateComposedStyles","React","Text","useButton","jsx","_jsx","ButtonLabel","props","button","calculatedStyle","styles","state","style","isSelectable","selectable","children"],"sourceRoot":"../../../../../src","sources":["components/button/components/button-label.tsx"],"mappings":";;AAAA,SAASA,uBAAuB;AAChC,OAAOC,KAAK,MAAM,OAAO;AACzB,SAAyBC,IAAI,QAAwB,cAAc;AACnE,SAASC,SAAS;AAAqB,SAAAC,GAAA,IAAAC,IAAA;AAQvC,OAAO,SAASC,WAAWA,CAACC,KAAuB,EAAE;EACnD,MAAMC,MAAM,GAAGL,SAAS,CAAC,CAAC;EAE1B,MAAMM,eAAe,GAAGT,uBAAuB,CAACQ,MAAM,CAACE,MAAM,EAAEF,MAAM,CAACG,KAAK,EAAE,OAAO,EAAEJ,KAAK,CAACK,KAAK,CAAC;EAElG,MAAMC,YAAY,GAAGL,MAAM,CAACG,KAAK,KAAK,UAAU,IAAIH,MAAM,CAACG,KAAK,KAAK,SAAS;EAE9E,oBACEN,IAAA,CAACH,IAAI;IAACY,UAAU,EAAED,YAAa;IAACD,KAAK,EAAEH,eAAgB;IAAAM,QAAA,EACpDR,KAAK,CAACQ;EAAQ,CACX,CAAC;AAEX","ignoreList":[]}
1
+ {"version":3,"names":["calculateComposedStyles","React","Text","useButton","jsx","_jsx","ButtonLabel","props","button","calculatedStyle","styles","state","style","isSelectable","selectable","children"],"sourceRoot":"../../../../../src","sources":["components/button/components/button-label.tsx"],"mappings":";;AACA,SAASA,uBAAuB;AAChC,OAAOC,KAAK,MAAM,OAAO;AACzB,SAAyBC,IAAI,QAAwB,cAAc;AACnE,SAASC,SAAS;AAAqB,SAAAC,GAAA,IAAAC,IAAA;AAQvC,OAAO,SAASC,WAAWA,CAACC,KAAuB,EAAE;EACnD,MAAMC,MAAM,GAAGL,SAAS,CAAC,CAAC;EAE1B,MAAMM,eAAe,GAAGT,uBAAuB,CAACQ,MAAM,CAACE,MAAM,EAAEF,MAAM,CAACG,KAAK,EAAE,OAAO,EAAEJ,KAAK,CAACK,KAAK,CAAC;EAElG,MAAMC,YAAY,GAAGL,MAAM,CAACG,KAAK,KAAK,UAAU,IAAIH,MAAM,CAACG,KAAK,KAAK,SAAS;EAE9E,oBACEN,IAAA,CAACH,IAAI;IAACY,UAAU,EAAED,YAAa;IAACD,KAAK,EAAEH,eAAgB;IAAAM,QAAA,EACpDR,KAAK,CAACQ;EAAQ,CACX,CAAC;AAEX","ignoreList":[]}
@@ -1,35 +1,35 @@
1
1
  "use strict";
2
2
 
3
3
  export const lightColors = {
4
- background: "hsla(224, 0%, 100%, 1)",
5
- foreground: "hsla(224, 0%, 4%, 1)",
6
- primary: "hsla(224, 0%, 9%, 1)",
7
- primaryForeground: "hsla(224, 0%, 98%, 1)",
8
- secondary: "hsla(224, 0%, 96%, 1)",
9
- secondaryForeground: "hsla(224, 0%, 9%, 1)",
10
- muted: "hsla(224, 0%, 96%, 1)",
11
- mutedForeground: "hsla(224, 0%, 45%, 1)",
12
- border: "hsla(224, 0%, 90%, 1)",
13
- surface: "hsla(224, 0%, 100%, 1)",
14
- danger: "hsla(360, 100%, 45%, 1)",
15
- success: "hsla(140, 100%, 40%, 1)",
16
- warning: "hsla(31, 92%, 45%, 1)",
17
- info: "hsla(210, 92%, 45%, 1)"
4
+ background: "hsl(224, 0%, 100%)",
5
+ foreground: "hsl(224, 0%, 4%)",
6
+ primary: "hsl(224, 0%, 9%)",
7
+ primaryForeground: "hsl(224, 0%, 98%)",
8
+ secondary: "hsl(224, 0%, 96%)",
9
+ secondaryForeground: "hsl(224, 0%, 9%)",
10
+ muted: "hsl(224, 0%, 96%)",
11
+ mutedForeground: "hsl(224, 0%, 45%)",
12
+ border: "hsl(224, 0%, 90%)",
13
+ surface: "hsl(224, 0%, 100%)",
14
+ danger: "hsl(360, 100%, 45%)",
15
+ success: "hsl(140, 100%, 40%)",
16
+ warning: "hsl(31, 92%, 45%)",
17
+ info: "hsl(210, 92%, 45%)"
18
18
  };
19
19
  export const darkColors = {
20
- background: "hsla(224, 0%, 4%, 1)",
21
- foreground: "hsla(224, 0%, 98%, 1)",
22
- primary: "hsla(224, 0%, 90%, 1)",
23
- primaryForeground: "hsla(224, 0%, 9%, 1)",
24
- secondary: "hsla(224, 0%, 15%, 1)",
25
- secondaryForeground: "hsla(224, 0%, 98%, 1)",
26
- muted: "hsla(224, 0%, 15%, 1)",
27
- mutedForeground: "hsla(224, 0%, 63%, 1)",
28
- border: "hsla(224, 0%, 16%, 1)",
29
- surface: "hsla(224, 0%, 9%, 1)",
30
- danger: "hsla(360, 100%, 45%, 1)",
31
- success: "hsla(140, 100%, 40%, 1)",
32
- warning: "hsla(31, 92%, 45%, 1)",
33
- info: "hsla(210, 92%, 45%, 1)"
20
+ background: "hsl(224, 0%, 4%)",
21
+ foreground: "hsl(224, 0%, 98%)",
22
+ primary: "hsl(224, 0%, 90%)",
23
+ primaryForeground: "hsl(224, 0%, 9%)",
24
+ secondary: "hsl(224, 0%, 15%)",
25
+ secondaryForeground: "hsl(224, 0%, 98%)",
26
+ muted: "hsl(224, 0%, 15%)",
27
+ mutedForeground: "hsl(224, 0%, 63%)",
28
+ border: "hsl(224, 0%, 16%)",
29
+ surface: "hsl(224, 0%, 9%)",
30
+ danger: "hsl(360, 100%, 45%)",
31
+ success: "hsl(140, 100%, 40%)",
32
+ warning: "hsl(31, 92%, 45%)",
33
+ info: "hsl(210, 92%, 45%)"
34
34
  };
35
35
  //# sourceMappingURL=colors.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["lightColors","background","foreground","primary","primaryForeground","secondary","secondaryForeground","muted","mutedForeground","border","surface","danger","success","warning","info","darkColors"],"sourceRoot":"../../../../src","sources":["themes/default/colors.ts"],"mappings":";;AAEA,OAAO,MAAMA,WAAmB,GAAG;EACjCC,UAAU,EAAE,wBAAwB;EACpCC,UAAU,EAAE,sBAAsB;EAElCC,OAAO,EAAE,sBAAsB;EAC/BC,iBAAiB,EAAE,uBAAuB;EAE1CC,SAAS,EAAE,uBAAuB;EAClCC,mBAAmB,EAAE,sBAAsB;EAE3CC,KAAK,EAAE,uBAAuB;EAC9BC,eAAe,EAAE,uBAAuB;EAExCC,MAAM,EAAE,uBAAuB;EAC/BC,OAAO,EAAE,wBAAwB;EAEjCC,MAAM,EAAE,yBAAyB;EACjCC,OAAO,EAAE,yBAAyB;EAClCC,OAAO,EAAE,uBAAuB;EAChCC,IAAI,EAAE;AACR,CAAC;AAED,OAAO,MAAMC,UAAkB,GAAG;EAChCd,UAAU,EAAE,sBAAsB;EAClCC,UAAU,EAAE,uBAAuB;EAEnCC,OAAO,EAAE,uBAAuB;EAChCC,iBAAiB,EAAE,sBAAsB;EAEzCC,SAAS,EAAE,uBAAuB;EAClCC,mBAAmB,EAAE,uBAAuB;EAE5CC,KAAK,EAAE,uBAAuB;EAC9BC,eAAe,EAAE,uBAAuB;EAExCC,MAAM,EAAE,uBAAuB;EAC/BC,OAAO,EAAE,sBAAsB;EAE/BC,MAAM,EAAE,yBAAyB;EACjCC,OAAO,EAAE,yBAAyB;EAClCC,OAAO,EAAE,uBAAuB;EAChCC,IAAI,EAAE;AACR,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["lightColors","background","foreground","primary","primaryForeground","secondary","secondaryForeground","muted","mutedForeground","border","surface","danger","success","warning","info","darkColors"],"sourceRoot":"../../../../src","sources":["themes/default/colors.ts"],"mappings":";;AAEA,OAAO,MAAMA,WAAmB,GAAG;EACjCC,UAAU,EAAE,oBAAoB;EAChCC,UAAU,EAAE,kBAAkB;EAE9BC,OAAO,EAAE,kBAAkB;EAC3BC,iBAAiB,EAAE,mBAAmB;EAEtCC,SAAS,EAAE,mBAAmB;EAC9BC,mBAAmB,EAAE,kBAAkB;EAEvCC,KAAK,EAAE,mBAAmB;EAC1BC,eAAe,EAAE,mBAAmB;EAEpCC,MAAM,EAAE,mBAAmB;EAC3BC,OAAO,EAAE,oBAAoB;EAE7BC,MAAM,EAAE,qBAAqB;EAC7BC,OAAO,EAAE,qBAAqB;EAC9BC,OAAO,EAAE,mBAAmB;EAC5BC,IAAI,EAAE;AACR,CAAC;AAED,OAAO,MAAMC,UAAkB,GAAG;EAChCd,UAAU,EAAE,kBAAkB;EAC9BC,UAAU,EAAE,mBAAmB;EAE/BC,OAAO,EAAE,mBAAmB;EAC5BC,iBAAiB,EAAE,kBAAkB;EAErCC,SAAS,EAAE,mBAAmB;EAC9BC,mBAAmB,EAAE,mBAAmB;EAExCC,KAAK,EAAE,mBAAmB;EAC1BC,eAAe,EAAE,mBAAmB;EAEpCC,MAAM,EAAE,mBAAmB;EAC3BC,OAAO,EAAE,kBAAkB;EAE3BC,MAAM,EAAE,qBAAqB;EAC7BC,OAAO,EAAE,qBAAqB;EAC9BC,OAAO,EAAE,mBAAmB;EAC5BC,IAAI,EAAE;AACR,CAAC","ignoreList":[]}
@@ -1,7 +1,8 @@
1
+ import type { TextChildren } from "../../../types/element.types";
1
2
  import React from "react";
2
3
  import { type StyleProp, type TextStyle } from "react-native";
3
4
  export interface ButtonLabelProps {
4
- children?: string;
5
+ children?: TextChildren;
5
6
  style?: StyleProp<TextStyle>;
6
7
  }
7
8
  export declare function ButtonLabel(props: ButtonLabelProps): React.JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"button-label.d.ts","sourceRoot":"","sources":["../../../../../../src/components/button/components/button-label.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,SAAS,EAAQ,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGpE,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,qBAYlD"}
1
+ {"version":3,"file":"button-label.d.ts","sourceRoot":"","sources":["../../../../../../src/components/button/components/button-label.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,SAAS,EAAQ,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGpE,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,YAAY,CAAC;IAExB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,qBAYlD"}
@@ -1,5 +1,5 @@
1
1
  export type ColorScheme = "light" | "dark";
2
- type Color = `hsla(${number}, ${number}%, ${number}%, ${number})`;
2
+ type Color = `hsl(${number}, ${number}%, ${number}%)`;
3
3
  export interface Colors {
4
4
  background: Color;
5
5
  foreground: Color;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/themes/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,MAAM,CAAC;AAE3C,KAAK,KAAK,GAAG,QAAQ,MAAM,KAAK,MAAM,MAAM,MAAM,MAAM,MAAM,GAAG,CAAC;AAElE,MAAM,WAAW,MAAM;IACrB,UAAU,EAAE,KAAK,CAAC;IAClB,UAAU,EAAE,KAAK,CAAC;IAClB,OAAO,EAAE,KAAK,CAAC;IACf,iBAAiB,EAAE,KAAK,CAAC;IACzB,SAAS,EAAE,KAAK,CAAC;IACjB,mBAAmB,EAAE,KAAK,CAAC;IAC3B,KAAK,EAAE,KAAK,CAAC;IACb,eAAe,EAAE,KAAK,CAAC;IACvB,MAAM,EAAE,KAAK,CAAC;IACd,OAAO,EAAE,KAAK,CAAC;IACf,OAAO,EAAE,KAAK,CAAC;IACf,OAAO,EAAE,KAAK,CAAC;IACf,MAAM,EAAE,KAAK,CAAC;IACd,IAAI,EAAE,KAAK,CAAC;CACb;AAED,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC;AAC5B,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC;AAChC,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC;AACnC,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC;AAE9B,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,UAAU,CAAC;IACvB,aAAa,EAAE,aAAa,CAAC;IAC7B,QAAQ,EAAE,QAAQ,CAAC;CACpB"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/themes/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,MAAM,CAAC;AAE3C,KAAK,KAAK,GAAG,OAAO,MAAM,KAAK,MAAM,MAAM,MAAM,IAAI,CAAC;AAEtD,MAAM,WAAW,MAAM;IACrB,UAAU,EAAE,KAAK,CAAC;IAClB,UAAU,EAAE,KAAK,CAAC;IAClB,OAAO,EAAE,KAAK,CAAC;IACf,iBAAiB,EAAE,KAAK,CAAC;IACzB,SAAS,EAAE,KAAK,CAAC;IACjB,mBAAmB,EAAE,KAAK,CAAC;IAC3B,KAAK,EAAE,KAAK,CAAC;IACb,eAAe,EAAE,KAAK,CAAC;IACvB,MAAM,EAAE,KAAK,CAAC;IACd,OAAO,EAAE,KAAK,CAAC;IACf,OAAO,EAAE,KAAK,CAAC;IACf,OAAO,EAAE,KAAK,CAAC;IACf,MAAM,EAAE,KAAK,CAAC;IACd,IAAI,EAAE,KAAK,CAAC;CACb;AAED,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC;AAC5B,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC;AAChC,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC;AACnC,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC;AAE9B,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,UAAU,CAAC;IACvB,aAAa,EAAE,aAAa,CAAC;IAC7B,QAAQ,EAAE,QAAQ,CAAC;CACpB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@korsolutions/ui",
3
- "version": "0.0.51",
3
+ "version": "0.0.52",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,10 +1,11 @@
1
+ import type { TextChildren } from "@/types/element.types";
1
2
  import { calculateComposedStyles } from "@/utils/calculate-styles";
2
3
  import React from "react";
3
4
  import { type StyleProp, Text, type TextStyle } from "react-native";
4
5
  import { useButton } from "../context";
5
6
 
6
7
  export interface ButtonLabelProps {
7
- children?: string;
8
+ children?: TextChildren;
8
9
 
9
10
  style?: StyleProp<TextStyle>;
10
11
  }
@@ -1,45 +1,45 @@
1
1
  import type { Colors } from "../types";
2
2
 
3
3
  export const lightColors: Colors = {
4
- background: "hsla(224, 0%, 100%, 1)",
5
- foreground: "hsla(224, 0%, 4%, 1)",
4
+ background: "hsl(224, 0%, 100%)",
5
+ foreground: "hsl(224, 0%, 4%)",
6
6
 
7
- primary: "hsla(224, 0%, 9%, 1)",
8
- primaryForeground: "hsla(224, 0%, 98%, 1)",
7
+ primary: "hsl(224, 0%, 9%)",
8
+ primaryForeground: "hsl(224, 0%, 98%)",
9
9
 
10
- secondary: "hsla(224, 0%, 96%, 1)",
11
- secondaryForeground: "hsla(224, 0%, 9%, 1)",
10
+ secondary: "hsl(224, 0%, 96%)",
11
+ secondaryForeground: "hsl(224, 0%, 9%)",
12
12
 
13
- muted: "hsla(224, 0%, 96%, 1)",
14
- mutedForeground: "hsla(224, 0%, 45%, 1)",
13
+ muted: "hsl(224, 0%, 96%)",
14
+ mutedForeground: "hsl(224, 0%, 45%)",
15
15
 
16
- border: "hsla(224, 0%, 90%, 1)",
17
- surface: "hsla(224, 0%, 100%, 1)",
16
+ border: "hsl(224, 0%, 90%)",
17
+ surface: "hsl(224, 0%, 100%)",
18
18
 
19
- danger: "hsla(360, 100%, 45%, 1)",
20
- success: "hsla(140, 100%, 40%, 1)",
21
- warning: "hsla(31, 92%, 45%, 1)",
22
- info: "hsla(210, 92%, 45%, 1)",
19
+ danger: "hsl(360, 100%, 45%)",
20
+ success: "hsl(140, 100%, 40%)",
21
+ warning: "hsl(31, 92%, 45%)",
22
+ info: "hsl(210, 92%, 45%)",
23
23
  };
24
24
 
25
25
  export const darkColors: Colors = {
26
- background: "hsla(224, 0%, 4%, 1)",
27
- foreground: "hsla(224, 0%, 98%, 1)",
26
+ background: "hsl(224, 0%, 4%)",
27
+ foreground: "hsl(224, 0%, 98%)",
28
28
 
29
- primary: "hsla(224, 0%, 90%, 1)",
30
- primaryForeground: "hsla(224, 0%, 9%, 1)",
29
+ primary: "hsl(224, 0%, 90%)",
30
+ primaryForeground: "hsl(224, 0%, 9%)",
31
31
 
32
- secondary: "hsla(224, 0%, 15%, 1)",
33
- secondaryForeground: "hsla(224, 0%, 98%, 1)",
32
+ secondary: "hsl(224, 0%, 15%)",
33
+ secondaryForeground: "hsl(224, 0%, 98%)",
34
34
 
35
- muted: "hsla(224, 0%, 15%, 1)",
36
- mutedForeground: "hsla(224, 0%, 63%, 1)",
35
+ muted: "hsl(224, 0%, 15%)",
36
+ mutedForeground: "hsl(224, 0%, 63%)",
37
37
 
38
- border: "hsla(224, 0%, 16%, 1)",
39
- surface: "hsla(224, 0%, 9%, 1)",
38
+ border: "hsl(224, 0%, 16%)",
39
+ surface: "hsl(224, 0%, 9%)",
40
40
 
41
- danger: "hsla(360, 100%, 45%, 1)",
42
- success: "hsla(140, 100%, 40%, 1)",
43
- warning: "hsla(31, 92%, 45%, 1)",
44
- info: "hsla(210, 92%, 45%, 1)",
41
+ danger: "hsl(360, 100%, 45%)",
42
+ success: "hsl(140, 100%, 40%)",
43
+ warning: "hsl(31, 92%, 45%)",
44
+ info: "hsl(210, 92%, 45%)",
45
45
  };
@@ -1,6 +1,6 @@
1
1
  export type ColorScheme = "light" | "dark";
2
2
 
3
- type Color = `hsla(${number}, ${number}%, ${number}%, ${number})`;
3
+ type Color = `hsl(${number}, ${number}%, ${number}%)`;
4
4
 
5
5
  export interface Colors {
6
6
  background: Color;