@marigold/theme-rui 0.0.2
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/LICENSE +21 -0
- package/README.md +3 -0
- package/dist/index.d.mts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +182 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +161 -0
- package/dist/index.mjs.map +1 -0
- package/dist/styles.css +3775 -0
- package/dist/theme.css +55 -0
- package/package.json +57 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Marigold UI
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
package/dist/index.d.mts
ADDED
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
default: () => index_default,
|
|
24
|
+
theme: () => theme
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(index_exports);
|
|
27
|
+
|
|
28
|
+
// src/components/index.ts
|
|
29
|
+
var components_exports = {};
|
|
30
|
+
__export(components_exports, {
|
|
31
|
+
Button: () => Button,
|
|
32
|
+
Card: () => Card,
|
|
33
|
+
DateField: () => DateField,
|
|
34
|
+
Field: () => Field,
|
|
35
|
+
HelpText: () => HelpText,
|
|
36
|
+
Input: () => Input,
|
|
37
|
+
Label: () => Label,
|
|
38
|
+
NumberField: () => NumberField,
|
|
39
|
+
TextArea: () => TextArea,
|
|
40
|
+
inputContainer: () => inputContainer,
|
|
41
|
+
inputDisabled: () => inputDisabled,
|
|
42
|
+
inputFocus: () => inputFocus,
|
|
43
|
+
inputInvalid: () => inputInvalid,
|
|
44
|
+
inputReadOnly: () => inputReadOnly
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
// src/components/Button.styles.ts
|
|
48
|
+
var import_system = require("@marigold/system");
|
|
49
|
+
var Button = (0, import_system.cva)(
|
|
50
|
+
[
|
|
51
|
+
"inline-flex items-center justify-center whitespace-nowrap rounded-lg text-sm font-medium transition-colors outline-offset-2 focus-visible:outline-2 focus-visible:outline-ring/70 disabled:pointer-events-none disabled:opacity-50"
|
|
52
|
+
],
|
|
53
|
+
{
|
|
54
|
+
variants: {
|
|
55
|
+
variant: {
|
|
56
|
+
primary: "bg-brand text-brand-foreground shadow-sm shadow-black/5 hover:bg-primary/90",
|
|
57
|
+
destructive: "bg-destructive text-destructive-foreground"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
|
|
63
|
+
// src/components/Card.styles.ts
|
|
64
|
+
var import_system2 = require("@marigold/system");
|
|
65
|
+
var Card = (0, import_system2.cva)("");
|
|
66
|
+
|
|
67
|
+
// src/components/DateField.styles.ts
|
|
68
|
+
var import_system4 = require("@marigold/system");
|
|
69
|
+
|
|
70
|
+
// src/components/Input.styles.ts
|
|
71
|
+
var import_system3 = require("@marigold/system");
|
|
72
|
+
var inputContainer = "flex w-full px-3 py-2 rounded-lg shadow-sm shadow-black/5 border border-input-border bg-background text-sm text-foreground transition-shadow";
|
|
73
|
+
var inputDisabled = "disabled:cursor-not-allowed disabled:opacity-50";
|
|
74
|
+
var inputInvalid = "group-error/field:border-destructive group-error/field:focus:border-destructive group-error/field:focus:ring-destructive/20";
|
|
75
|
+
var inputFocus = "focus:border-input-ring focus:outline-none focus:ring-[3px] focus:ring-input-ring/20";
|
|
76
|
+
var inputReadOnly = "read-only:bg-muted";
|
|
77
|
+
var Input = {
|
|
78
|
+
input: (0, import_system3.cva)([
|
|
79
|
+
inputContainer,
|
|
80
|
+
inputDisabled,
|
|
81
|
+
inputInvalid,
|
|
82
|
+
inputFocus,
|
|
83
|
+
inputReadOnly,
|
|
84
|
+
"h-input",
|
|
85
|
+
"placeholder:text-placeholder",
|
|
86
|
+
"[&[type=file]]:border-solid [&[type=file]]:bg-background [&[type=file]]:p-0 [&[type=file]]:pr-3 [&[type=file]]:italic [&[type=file]]:text-muted-foreground/70 file:me-3 file:h-full file:border-0 file:border-r file:border-solid file:border-input-border file:bg-transparent file:px-3 file:text-sm file:font-medium file:not-italic file:text-foreground",
|
|
87
|
+
"group-[icon]/input:pl-8",
|
|
88
|
+
"group-[action]/input:pr-8"
|
|
89
|
+
]),
|
|
90
|
+
icon: (0, import_system3.cva)([
|
|
91
|
+
"pointer-events-none left-1",
|
|
92
|
+
"text-muted-foreground disabled:opacity-50"
|
|
93
|
+
]),
|
|
94
|
+
action: (0, import_system3.cva)(["text-muted-foreground right-1"])
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
// src/components/DateField.styles.ts
|
|
98
|
+
var DateField = {
|
|
99
|
+
field: (0, import_system4.cva)([
|
|
100
|
+
"h-input",
|
|
101
|
+
inputContainer,
|
|
102
|
+
inputDisabled,
|
|
103
|
+
inputFocus,
|
|
104
|
+
inputInvalid,
|
|
105
|
+
inputReadOnly
|
|
106
|
+
]),
|
|
107
|
+
segment: (0, import_system4.cva)([]),
|
|
108
|
+
action: (0, import_system4.cva)("")
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
// src/components/Field.styles.ts
|
|
112
|
+
var import_system5 = require("@marigold/system");
|
|
113
|
+
var Field = (0, import_system5.cva)("space-y-2");
|
|
114
|
+
|
|
115
|
+
// src/components/HelpText.styles.ts
|
|
116
|
+
var import_system6 = require("@marigold/system");
|
|
117
|
+
var HelpText = {
|
|
118
|
+
container: (0, import_system6.cva)([
|
|
119
|
+
"mt-2 text-xs text-muted-foreground",
|
|
120
|
+
"group-error/field:text-destructive"
|
|
121
|
+
]),
|
|
122
|
+
icon: (0, import_system6.cva)("")
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
// src/components/Label.styles.ts
|
|
126
|
+
var import_system7 = require("@marigold/system");
|
|
127
|
+
var Label = {
|
|
128
|
+
container: (0, import_system7.cva)([
|
|
129
|
+
"text-sm font-medium leading-4 text-foreground",
|
|
130
|
+
"group-disabled/field:cursor-not-allowed group-disabled/field:opacity-70"
|
|
131
|
+
]),
|
|
132
|
+
indicator: (0, import_system7.cva)(
|
|
133
|
+
"group-required/field:block group-required/field:text-destructive"
|
|
134
|
+
)
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
// src/components/NumberField.styles.ts
|
|
138
|
+
var import_system8 = require("@marigold/system");
|
|
139
|
+
var NumberField = {
|
|
140
|
+
group: (0, import_system8.cva)([
|
|
141
|
+
inputFocus,
|
|
142
|
+
inputInvalid,
|
|
143
|
+
"relative inline-flex w-full -mb-0.5 items-center overflow-hidden whitespace-nowrap rounded-lg h-input grow text-center tabular-nums text-foreground",
|
|
144
|
+
"border border-input-border text-sm shadow-sm shadow-black/5 transition-shadow",
|
|
145
|
+
"data-invalid:data-[focus-within]:border-destructive data-invalid:data-[focus-within]:ring-destructive/20",
|
|
146
|
+
"data-[focus-within]:border-input-ring data-[focus-within]:outline-none data-[focus-within]:ring-[3px] data-[focus-within]:ring-input-ring/20"
|
|
147
|
+
]),
|
|
148
|
+
stepper: (0, import_system8.cva)([
|
|
149
|
+
"w-7 h-full",
|
|
150
|
+
"data-[disabled]:opacity-50",
|
|
151
|
+
"border-input-border border-solid first-of-type:border-r",
|
|
152
|
+
"border-input-border border-solid last-of-type:border-l "
|
|
153
|
+
]),
|
|
154
|
+
input: (0, import_system8.cva)(
|
|
155
|
+
"border-none shadow-none rounded-none outline-offset-0 text-center focus-visible:ring-0"
|
|
156
|
+
)
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
// src/components/TextArea.styles.ts
|
|
160
|
+
var import_system9 = require("@marigold/system");
|
|
161
|
+
var TextArea = (0, import_system9.cva)([
|
|
162
|
+
inputContainer,
|
|
163
|
+
inputInvalid,
|
|
164
|
+
inputFocus,
|
|
165
|
+
inputDisabled,
|
|
166
|
+
inputReadOnly,
|
|
167
|
+
"data-invalid:text-destructive"
|
|
168
|
+
]);
|
|
169
|
+
|
|
170
|
+
// src/theme.ts
|
|
171
|
+
var theme = {
|
|
172
|
+
name: "rui",
|
|
173
|
+
components: components_exports
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
// src/index.ts
|
|
177
|
+
var index_default = theme;
|
|
178
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
179
|
+
0 && (module.exports = {
|
|
180
|
+
theme
|
|
181
|
+
});
|
|
182
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/components/index.ts","../src/components/Button.styles.ts","../src/components/Card.styles.ts","../src/components/DateField.styles.ts","../src/components/Input.styles.ts","../src/components/Field.styles.ts","../src/components/HelpText.styles.ts","../src/components/Label.styles.ts","../src/components/NumberField.styles.ts","../src/components/TextArea.styles.ts","../src/theme.ts"],"sourcesContent":["import { theme } from './theme';\n\nexport { theme };\nexport default theme;\n","export * from './Button.styles';\nexport * from './Card.styles';\nexport * from './DateField.styles';\nexport * from './Input.styles';\nexport * from './Field.styles';\nexport * from './HelpText.styles';\nexport * from './Label.styles';\nexport * from './NumberField.styles';\nexport * from './TextArea.styles';\n","import { cva } from '@marigold/system';\nimport type { ThemeComponent } from '@marigold/system';\n\nexport const Button: ThemeComponent<'Button'> = cva(\n [\n 'inline-flex items-center justify-center whitespace-nowrap rounded-lg text-sm font-medium transition-colors outline-offset-2 focus-visible:outline-2 focus-visible:outline-ring/70 disabled:pointer-events-none disabled:opacity-50',\n ],\n {\n variants: {\n variant: {\n primary:\n 'bg-brand text-brand-foreground shadow-sm shadow-black/5 hover:bg-primary/90',\n\n destructive: 'bg-destructive text-destructive-foreground',\n },\n },\n }\n);\n","import { cva } from '@marigold/system';\nimport type { ThemeComponent } from '@marigold/system';\n\nexport const Card: ThemeComponent<'Card'> = cva('');\n","import { type ThemeComponent, cva } from '@marigold/system';\nimport {\n inputContainer,\n inputDisabled,\n inputFocus,\n inputInvalid,\n inputReadOnly,\n} from './Input.styles';\n\nexport const DateField: ThemeComponent<'DateField'> = {\n field: cva([\n 'h-input',\n inputContainer,\n inputDisabled,\n inputFocus,\n inputInvalid,\n inputReadOnly,\n ]),\n segment: cva([]),\n action: cva(''),\n};\n","import { cva } from '@marigold/system';\nimport type { ThemeComponent } from '@marigold/system';\n\nexport const inputContainer =\n 'flex w-full px-3 py-2 rounded-lg shadow-sm shadow-black/5 border border-input-border bg-background text-sm text-foreground transition-shadow';\nexport const inputDisabled = 'disabled:cursor-not-allowed disabled:opacity-50';\nexport const inputInvalid =\n 'group-error/field:border-destructive group-error/field:focus:border-destructive group-error/field:focus:ring-destructive/20';\nexport const inputFocus =\n 'focus:border-input-ring focus:outline-none focus:ring-[3px] focus:ring-input-ring/20';\nexport const inputReadOnly = 'read-only:bg-muted';\n\nexport const Input: ThemeComponent<'Input'> = {\n input: cva([\n inputContainer,\n inputDisabled,\n inputInvalid,\n inputFocus,\n inputReadOnly,\n 'h-input',\n 'placeholder:text-placeholder',\n '[&[type=file]]:border-solid [&[type=file]]:bg-background [&[type=file]]:p-0 [&[type=file]]:pr-3 [&[type=file]]:italic [&[type=file]]:text-muted-foreground/70 file:me-3 file:h-full file:border-0 file:border-r file:border-solid file:border-input-border file:bg-transparent file:px-3 file:text-sm file:font-medium file:not-italic file:text-foreground',\n 'group-[icon]/input:pl-8',\n 'group-[action]/input:pr-8',\n ]),\n icon: cva([\n 'pointer-events-none left-1',\n 'text-muted-foreground disabled:opacity-50',\n ]),\n action: cva(['text-muted-foreground right-1']),\n};\n","import { type ThemeComponent, cva } from '@marigold/system';\n\nexport const Field: ThemeComponent<'Field'> = cva('space-y-2');\n","import { type ThemeComponent, cva } from '@marigold/system';\n\nexport const HelpText: ThemeComponent<'HelpText'> = {\n container: cva([\n 'mt-2 text-xs text-muted-foreground',\n 'group-error/field:text-destructive',\n ]),\n icon: cva(''),\n};\n","import { type ThemeComponent, cva } from '@marigold/system';\n\nexport const Label: ThemeComponent<'Label'> = {\n container: cva([\n 'text-sm font-medium leading-4 text-foreground',\n 'group-disabled/field:cursor-not-allowed group-disabled/field:opacity-70',\n ]),\n indicator: cva(\n 'group-required/field:block group-required/field:text-destructive'\n ),\n};\n","import { type ThemeComponent, cva } from '@marigold/system';\nimport { inputFocus, inputInvalid } from './Input.styles';\n\nexport const NumberField: ThemeComponent<'NumberField'> = {\n group: cva([\n inputFocus,\n inputInvalid,\n 'relative inline-flex w-full -mb-0.5 items-center overflow-hidden whitespace-nowrap rounded-lg h-input grow text-center tabular-nums text-foreground',\n 'border border-input-border text-sm shadow-sm shadow-black/5 transition-shadow',\n 'data-invalid:data-[focus-within]:border-destructive data-invalid:data-[focus-within]:ring-destructive/20',\n 'data-[focus-within]:border-input-ring data-[focus-within]:outline-none data-[focus-within]:ring-[3px] data-[focus-within]:ring-input-ring/20',\n ]),\n stepper: cva([\n 'w-7 h-full',\n 'data-[disabled]:opacity-50',\n 'border-input-border border-solid first-of-type:border-r',\n 'border-input-border border-solid last-of-type:border-l ',\n ]),\n input: cva(\n 'border-none shadow-none rounded-none outline-offset-0 text-center focus-visible:ring-0'\n ),\n};\n","import { type ThemeComponent, cva } from '@marigold/system';\nimport {\n inputContainer,\n inputDisabled,\n inputFocus,\n inputInvalid,\n inputReadOnly,\n} from './Input.styles';\n\nexport const TextArea: ThemeComponent<'TextArea'> = cva([\n inputContainer,\n inputInvalid,\n inputFocus,\n inputDisabled,\n inputReadOnly,\n 'data-invalid:text-destructive',\n]);\n","import { Theme } from '@marigold/system';\nimport * as components from './components';\n\nexport const theme: Theme = {\n name: 'rui',\n components,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;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iC;AAAA,EAC5C,eAAW,oBAAI;AAAA,IACb;AAAA,IACA;AAAA,EACF,CAAC;AAAA,EACD,eAAW;AAAA,IACT;AAAA,EACF;AACF;;;ACVA,IAAAC,iBAAyC;AAGlC,IAAM,cAA6C;AAAA,EACxD,WAAO,oBAAI;AAAA,IACT;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AAAA,EACD,aAAS,oBAAI;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AAAA,EACD,WAAO;AAAA,IACL;AAAA,EACF;AACF;;;ACrBA,IAAAC,iBAAyC;AASlC,IAAM,eAAuC,oBAAI;AAAA,EACtD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;;;ACbM,IAAM,QAAe;AAAA,EAC1B,MAAM;AAAA,EACN;AACF;;;AXHA,IAAO,gBAAQ;","names":["import_system","import_system","import_system","import_system","import_system","import_system","import_system","import_system"]}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __export = (target, all) => {
|
|
3
|
+
for (var name in all)
|
|
4
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
// src/components/index.ts
|
|
8
|
+
var components_exports = {};
|
|
9
|
+
__export(components_exports, {
|
|
10
|
+
Button: () => Button,
|
|
11
|
+
Card: () => Card,
|
|
12
|
+
DateField: () => DateField,
|
|
13
|
+
Field: () => Field,
|
|
14
|
+
HelpText: () => HelpText,
|
|
15
|
+
Input: () => Input,
|
|
16
|
+
Label: () => Label,
|
|
17
|
+
NumberField: () => NumberField,
|
|
18
|
+
TextArea: () => TextArea,
|
|
19
|
+
inputContainer: () => inputContainer,
|
|
20
|
+
inputDisabled: () => inputDisabled,
|
|
21
|
+
inputFocus: () => inputFocus,
|
|
22
|
+
inputInvalid: () => inputInvalid,
|
|
23
|
+
inputReadOnly: () => inputReadOnly
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
// src/components/Button.styles.ts
|
|
27
|
+
import { cva } from "@marigold/system";
|
|
28
|
+
var Button = cva(
|
|
29
|
+
[
|
|
30
|
+
"inline-flex items-center justify-center whitespace-nowrap rounded-lg text-sm font-medium transition-colors outline-offset-2 focus-visible:outline-2 focus-visible:outline-ring/70 disabled:pointer-events-none disabled:opacity-50"
|
|
31
|
+
],
|
|
32
|
+
{
|
|
33
|
+
variants: {
|
|
34
|
+
variant: {
|
|
35
|
+
primary: "bg-brand text-brand-foreground shadow-sm shadow-black/5 hover:bg-primary/90",
|
|
36
|
+
destructive: "bg-destructive text-destructive-foreground"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
// src/components/Card.styles.ts
|
|
43
|
+
import { cva as cva2 } from "@marigold/system";
|
|
44
|
+
var Card = cva2("");
|
|
45
|
+
|
|
46
|
+
// src/components/DateField.styles.ts
|
|
47
|
+
import { cva as cva4 } from "@marigold/system";
|
|
48
|
+
|
|
49
|
+
// src/components/Input.styles.ts
|
|
50
|
+
import { cva as cva3 } from "@marigold/system";
|
|
51
|
+
var inputContainer = "flex w-full px-3 py-2 rounded-lg shadow-sm shadow-black/5 border border-input-border bg-background text-sm text-foreground transition-shadow";
|
|
52
|
+
var inputDisabled = "disabled:cursor-not-allowed disabled:opacity-50";
|
|
53
|
+
var inputInvalid = "group-error/field:border-destructive group-error/field:focus:border-destructive group-error/field:focus:ring-destructive/20";
|
|
54
|
+
var inputFocus = "focus:border-input-ring focus:outline-none focus:ring-[3px] focus:ring-input-ring/20";
|
|
55
|
+
var inputReadOnly = "read-only:bg-muted";
|
|
56
|
+
var Input = {
|
|
57
|
+
input: cva3([
|
|
58
|
+
inputContainer,
|
|
59
|
+
inputDisabled,
|
|
60
|
+
inputInvalid,
|
|
61
|
+
inputFocus,
|
|
62
|
+
inputReadOnly,
|
|
63
|
+
"h-input",
|
|
64
|
+
"placeholder:text-placeholder",
|
|
65
|
+
"[&[type=file]]:border-solid [&[type=file]]:bg-background [&[type=file]]:p-0 [&[type=file]]:pr-3 [&[type=file]]:italic [&[type=file]]:text-muted-foreground/70 file:me-3 file:h-full file:border-0 file:border-r file:border-solid file:border-input-border file:bg-transparent file:px-3 file:text-sm file:font-medium file:not-italic file:text-foreground",
|
|
66
|
+
"group-[icon]/input:pl-8",
|
|
67
|
+
"group-[action]/input:pr-8"
|
|
68
|
+
]),
|
|
69
|
+
icon: cva3([
|
|
70
|
+
"pointer-events-none left-1",
|
|
71
|
+
"text-muted-foreground disabled:opacity-50"
|
|
72
|
+
]),
|
|
73
|
+
action: cva3(["text-muted-foreground right-1"])
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
// src/components/DateField.styles.ts
|
|
77
|
+
var DateField = {
|
|
78
|
+
field: cva4([
|
|
79
|
+
"h-input",
|
|
80
|
+
inputContainer,
|
|
81
|
+
inputDisabled,
|
|
82
|
+
inputFocus,
|
|
83
|
+
inputInvalid,
|
|
84
|
+
inputReadOnly
|
|
85
|
+
]),
|
|
86
|
+
segment: cva4([]),
|
|
87
|
+
action: cva4("")
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
// src/components/Field.styles.ts
|
|
91
|
+
import { cva as cva5 } from "@marigold/system";
|
|
92
|
+
var Field = cva5("space-y-2");
|
|
93
|
+
|
|
94
|
+
// src/components/HelpText.styles.ts
|
|
95
|
+
import { cva as cva6 } from "@marigold/system";
|
|
96
|
+
var HelpText = {
|
|
97
|
+
container: cva6([
|
|
98
|
+
"mt-2 text-xs text-muted-foreground",
|
|
99
|
+
"group-error/field:text-destructive"
|
|
100
|
+
]),
|
|
101
|
+
icon: cva6("")
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
// src/components/Label.styles.ts
|
|
105
|
+
import { cva as cva7 } from "@marigold/system";
|
|
106
|
+
var Label = {
|
|
107
|
+
container: cva7([
|
|
108
|
+
"text-sm font-medium leading-4 text-foreground",
|
|
109
|
+
"group-disabled/field:cursor-not-allowed group-disabled/field:opacity-70"
|
|
110
|
+
]),
|
|
111
|
+
indicator: cva7(
|
|
112
|
+
"group-required/field:block group-required/field:text-destructive"
|
|
113
|
+
)
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
// src/components/NumberField.styles.ts
|
|
117
|
+
import { cva as cva8 } from "@marigold/system";
|
|
118
|
+
var NumberField = {
|
|
119
|
+
group: cva8([
|
|
120
|
+
inputFocus,
|
|
121
|
+
inputInvalid,
|
|
122
|
+
"relative inline-flex w-full -mb-0.5 items-center overflow-hidden whitespace-nowrap rounded-lg h-input grow text-center tabular-nums text-foreground",
|
|
123
|
+
"border border-input-border text-sm shadow-sm shadow-black/5 transition-shadow",
|
|
124
|
+
"data-invalid:data-[focus-within]:border-destructive data-invalid:data-[focus-within]:ring-destructive/20",
|
|
125
|
+
"data-[focus-within]:border-input-ring data-[focus-within]:outline-none data-[focus-within]:ring-[3px] data-[focus-within]:ring-input-ring/20"
|
|
126
|
+
]),
|
|
127
|
+
stepper: cva8([
|
|
128
|
+
"w-7 h-full",
|
|
129
|
+
"data-[disabled]:opacity-50",
|
|
130
|
+
"border-input-border border-solid first-of-type:border-r",
|
|
131
|
+
"border-input-border border-solid last-of-type:border-l "
|
|
132
|
+
]),
|
|
133
|
+
input: cva8(
|
|
134
|
+
"border-none shadow-none rounded-none outline-offset-0 text-center focus-visible:ring-0"
|
|
135
|
+
)
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
// src/components/TextArea.styles.ts
|
|
139
|
+
import { cva as cva9 } from "@marigold/system";
|
|
140
|
+
var TextArea = cva9([
|
|
141
|
+
inputContainer,
|
|
142
|
+
inputInvalid,
|
|
143
|
+
inputFocus,
|
|
144
|
+
inputDisabled,
|
|
145
|
+
inputReadOnly,
|
|
146
|
+
"data-invalid:text-destructive"
|
|
147
|
+
]);
|
|
148
|
+
|
|
149
|
+
// src/theme.ts
|
|
150
|
+
var theme = {
|
|
151
|
+
name: "rui",
|
|
152
|
+
components: components_exports
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
// src/index.ts
|
|
156
|
+
var index_default = theme;
|
|
157
|
+
export {
|
|
158
|
+
index_default as default,
|
|
159
|
+
theme
|
|
160
|
+
};
|
|
161
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/index.ts","../src/components/Button.styles.ts","../src/components/Card.styles.ts","../src/components/DateField.styles.ts","../src/components/Input.styles.ts","../src/components/Field.styles.ts","../src/components/HelpText.styles.ts","../src/components/Label.styles.ts","../src/components/NumberField.styles.ts","../src/components/TextArea.styles.ts","../src/theme.ts","../src/index.ts"],"sourcesContent":["export * from './Button.styles';\nexport * from './Card.styles';\nexport * from './DateField.styles';\nexport * from './Input.styles';\nexport * from './Field.styles';\nexport * from './HelpText.styles';\nexport * from './Label.styles';\nexport * from './NumberField.styles';\nexport * from './TextArea.styles';\n","import { cva } from '@marigold/system';\nimport type { ThemeComponent } from '@marigold/system';\n\nexport const Button: ThemeComponent<'Button'> = cva(\n [\n 'inline-flex items-center justify-center whitespace-nowrap rounded-lg text-sm font-medium transition-colors outline-offset-2 focus-visible:outline-2 focus-visible:outline-ring/70 disabled:pointer-events-none disabled:opacity-50',\n ],\n {\n variants: {\n variant: {\n primary:\n 'bg-brand text-brand-foreground shadow-sm shadow-black/5 hover:bg-primary/90',\n\n destructive: 'bg-destructive text-destructive-foreground',\n },\n },\n }\n);\n","import { cva } from '@marigold/system';\nimport type { ThemeComponent } from '@marigold/system';\n\nexport const Card: ThemeComponent<'Card'> = cva('');\n","import { type ThemeComponent, cva } from '@marigold/system';\nimport {\n inputContainer,\n inputDisabled,\n inputFocus,\n inputInvalid,\n inputReadOnly,\n} from './Input.styles';\n\nexport const DateField: ThemeComponent<'DateField'> = {\n field: cva([\n 'h-input',\n inputContainer,\n inputDisabled,\n inputFocus,\n inputInvalid,\n inputReadOnly,\n ]),\n segment: cva([]),\n action: cva(''),\n};\n","import { cva } from '@marigold/system';\nimport type { ThemeComponent } from '@marigold/system';\n\nexport const inputContainer =\n 'flex w-full px-3 py-2 rounded-lg shadow-sm shadow-black/5 border border-input-border bg-background text-sm text-foreground transition-shadow';\nexport const inputDisabled = 'disabled:cursor-not-allowed disabled:opacity-50';\nexport const inputInvalid =\n 'group-error/field:border-destructive group-error/field:focus:border-destructive group-error/field:focus:ring-destructive/20';\nexport const inputFocus =\n 'focus:border-input-ring focus:outline-none focus:ring-[3px] focus:ring-input-ring/20';\nexport const inputReadOnly = 'read-only:bg-muted';\n\nexport const Input: ThemeComponent<'Input'> = {\n input: cva([\n inputContainer,\n inputDisabled,\n inputInvalid,\n inputFocus,\n inputReadOnly,\n 'h-input',\n 'placeholder:text-placeholder',\n '[&[type=file]]:border-solid [&[type=file]]:bg-background [&[type=file]]:p-0 [&[type=file]]:pr-3 [&[type=file]]:italic [&[type=file]]:text-muted-foreground/70 file:me-3 file:h-full file:border-0 file:border-r file:border-solid file:border-input-border file:bg-transparent file:px-3 file:text-sm file:font-medium file:not-italic file:text-foreground',\n 'group-[icon]/input:pl-8',\n 'group-[action]/input:pr-8',\n ]),\n icon: cva([\n 'pointer-events-none left-1',\n 'text-muted-foreground disabled:opacity-50',\n ]),\n action: cva(['text-muted-foreground right-1']),\n};\n","import { type ThemeComponent, cva } from '@marigold/system';\n\nexport const Field: ThemeComponent<'Field'> = cva('space-y-2');\n","import { type ThemeComponent, cva } from '@marigold/system';\n\nexport const HelpText: ThemeComponent<'HelpText'> = {\n container: cva([\n 'mt-2 text-xs text-muted-foreground',\n 'group-error/field:text-destructive',\n ]),\n icon: cva(''),\n};\n","import { type ThemeComponent, cva } from '@marigold/system';\n\nexport const Label: ThemeComponent<'Label'> = {\n container: cva([\n 'text-sm font-medium leading-4 text-foreground',\n 'group-disabled/field:cursor-not-allowed group-disabled/field:opacity-70',\n ]),\n indicator: cva(\n 'group-required/field:block group-required/field:text-destructive'\n ),\n};\n","import { type ThemeComponent, cva } from '@marigold/system';\nimport { inputFocus, inputInvalid } from './Input.styles';\n\nexport const NumberField: ThemeComponent<'NumberField'> = {\n group: cva([\n inputFocus,\n inputInvalid,\n 'relative inline-flex w-full -mb-0.5 items-center overflow-hidden whitespace-nowrap rounded-lg h-input grow text-center tabular-nums text-foreground',\n 'border border-input-border text-sm shadow-sm shadow-black/5 transition-shadow',\n 'data-invalid:data-[focus-within]:border-destructive data-invalid:data-[focus-within]:ring-destructive/20',\n 'data-[focus-within]:border-input-ring data-[focus-within]:outline-none data-[focus-within]:ring-[3px] data-[focus-within]:ring-input-ring/20',\n ]),\n stepper: cva([\n 'w-7 h-full',\n 'data-[disabled]:opacity-50',\n 'border-input-border border-solid first-of-type:border-r',\n 'border-input-border border-solid last-of-type:border-l ',\n ]),\n input: cva(\n 'border-none shadow-none rounded-none outline-offset-0 text-center focus-visible:ring-0'\n ),\n};\n","import { type ThemeComponent, cva } from '@marigold/system';\nimport {\n inputContainer,\n inputDisabled,\n inputFocus,\n inputInvalid,\n inputReadOnly,\n} from './Input.styles';\n\nexport const TextArea: ThemeComponent<'TextArea'> = cva([\n inputContainer,\n inputInvalid,\n inputFocus,\n inputDisabled,\n inputReadOnly,\n 'data-invalid:text-destructive',\n]);\n","import { Theme } from '@marigold/system';\nimport * as components from './components';\n\nexport const theme: Theme = {\n name: 'rui',\n components,\n};\n","import { theme } from './theme';\n\nexport { theme };\nexport default theme;\n"],"mappings":";;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,SAAS,WAAW;AAGb,IAAM,SAAmC;AAAA,EAC9C;AAAA,IACE;AAAA,EACF;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SACE;AAAA,QAEF,aAAa;AAA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