loseta 0.0.0-stage → 0.3.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.
- package/LICENSE +21 -0
- package/NOTICE +12 -0
- package/README.md +85 -2
- package/bin/loseta.js +2 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +28 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/add.d.ts +24 -0
- package/dist/commands/add.js +163 -0
- package/dist/commands/add.js.map +1 -0
- package/dist/commands/init.d.ts +25 -0
- package/dist/commands/init.js +161 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/list.d.ts +11 -0
- package/dist/commands/list.js +41 -0
- package/dist/commands/list.js.map +1 -0
- package/dist/commands/style.d.ts +1 -0
- package/dist/commands/style.js +88 -0
- package/dist/commands/style.js.map +1 -0
- package/dist/config.d.ts +19 -0
- package/dist/config.js +48 -0
- package/dist/config.js.map +1 -0
- package/dist/fs.d.ts +8 -0
- package/dist/fs.js +30 -0
- package/dist/fs.js.map +1 -0
- package/dist/imports.d.ts +10 -0
- package/dist/imports.js +62 -0
- package/dist/imports.js.map +1 -0
- package/dist/install.d.ts +24 -0
- package/dist/install.js +61 -0
- package/dist/install.js.map +1 -0
- package/dist/manifest.d.ts +12 -0
- package/dist/manifest.js +34 -0
- package/dist/manifest.js.map +1 -0
- package/dist/registry.d.ts +27 -0
- package/dist/registry.js +88 -0
- package/dist/registry.js.map +1 -0
- package/dist/types.d.ts +54 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/ui.d.ts +5 -0
- package/dist/ui.js +14 -0
- package/dist/ui.js.map +1 -0
- package/package.json +58 -4
- package/registry/base.css +20 -0
- package/registry/components/alert-dialog.css +97 -0
- package/registry/components/alert.css +39 -0
- package/registry/components/badge.css +25 -0
- package/registry/components/button-group.css +83 -0
- package/registry/components/button.css +26 -0
- package/registry/components/card.css +46 -0
- package/registry/components/checkbox.css +24 -0
- package/registry/components/code-block.css +173 -0
- package/registry/components/dialog.css +64 -0
- package/registry/components/dropdown-menu.css +97 -0
- package/registry/components/empty.css +64 -0
- package/registry/components/field.css +164 -0
- package/registry/components/input.css +26 -0
- package/registry/components/item.css +102 -0
- package/registry/components/kbd.css +11 -0
- package/registry/components/label.css +31 -0
- package/registry/components/native-select.css +21 -0
- package/registry/components/popover.css +7 -0
- package/registry/components/radio.css +25 -0
- package/registry/components/skeleton.css +11 -0
- package/registry/components/switch.css +27 -0
- package/registry/components/table.css +73 -0
- package/registry/components/tabs.css +61 -0
- package/registry/components/textarea.css +19 -0
- package/registry/components/tooltip.css +255 -0
- package/registry/examples/alert-dialog.html +20 -0
- package/registry/examples/alert.html +15 -0
- package/registry/examples/badge.html +9 -0
- package/registry/examples/button-group.html +13 -0
- package/registry/examples/button.html +21 -0
- package/registry/examples/card.html +18 -0
- package/registry/examples/checkbox.html +8 -0
- package/registry/examples/code-block.html +73 -0
- package/registry/examples/dialog.html +26 -0
- package/registry/examples/dropdown-menu.html +15 -0
- package/registry/examples/empty.html +11 -0
- package/registry/examples/field.html +15 -0
- package/registry/examples/input.html +9 -0
- package/registry/examples/item.html +20 -0
- package/registry/examples/kbd.html +6 -0
- package/registry/examples/label.html +5 -0
- package/registry/examples/native-select.html +10 -0
- package/registry/examples/popover.html +16 -0
- package/registry/examples/radio.html +15 -0
- package/registry/examples/skeleton.html +6 -0
- package/registry/examples/switch.html +5 -0
- package/registry/examples/table.html +34 -0
- package/registry/examples/tabs.html +27 -0
- package/registry/examples/textarea.html +6 -0
- package/registry/examples/tooltip.html +4 -0
- package/registry/primitives/dialog-shell.css +71 -0
- package/registry/primitives/popover.css +130 -0
- package/registry/registry.json +2092 -0
- package/registry/reset.css +148 -0
- package/registry/schema.json +92 -0
- package/registry/styles/luma/alert-dialog.css +74 -0
- package/registry/styles/luma/alert.css +114 -0
- package/registry/styles/luma/badge.css +86 -0
- package/registry/styles/luma/button-group.css +75 -0
- package/registry/styles/luma/button.css +228 -0
- package/registry/styles/luma/card.css +100 -0
- package/registry/styles/luma/checkbox.css +59 -0
- package/registry/styles/luma/code-block.css +191 -0
- package/registry/styles/luma/dialog.css +64 -0
- package/registry/styles/luma/dropdown-menu.css +105 -0
- package/registry/styles/luma/empty.css +54 -0
- package/registry/styles/luma/field.css +120 -0
- package/registry/styles/luma/input.css +57 -0
- package/registry/styles/luma/item.css +133 -0
- package/registry/styles/luma/kbd.css +22 -0
- package/registry/styles/luma/label.css +71 -0
- package/registry/styles/luma/native-select.css +69 -0
- package/registry/styles/luma/popover.css +25 -0
- package/registry/styles/luma/primitives/dialog-shell.css +19 -0
- package/registry/styles/luma/primitives/popover.css +16 -0
- package/registry/styles/luma/radio.css +53 -0
- package/registry/styles/luma/skeleton.css +7 -0
- package/registry/styles/luma/switch.css +87 -0
- package/registry/styles/luma/table.css +87 -0
- package/registry/styles/luma/tabs.css +146 -0
- package/registry/styles/luma/textarea.css +49 -0
- package/registry/styles/luma/tooltip.css +22 -0
- package/registry/styles/lyra/alert-dialog.css +74 -0
- package/registry/styles/lyra/alert.css +114 -0
- package/registry/styles/lyra/badge.css +86 -0
- package/registry/styles/lyra/button-group.css +74 -0
- package/registry/styles/lyra/button.css +227 -0
- package/registry/styles/lyra/card.css +99 -0
- package/registry/styles/lyra/checkbox.css +59 -0
- package/registry/styles/lyra/code-block.css +191 -0
- package/registry/styles/lyra/dialog.css +64 -0
- package/registry/styles/lyra/dropdown-menu.css +105 -0
- package/registry/styles/lyra/empty.css +54 -0
- package/registry/styles/lyra/field.css +120 -0
- package/registry/styles/lyra/input.css +57 -0
- package/registry/styles/lyra/item.css +133 -0
- package/registry/styles/lyra/kbd.css +22 -0
- package/registry/styles/lyra/label.css +71 -0
- package/registry/styles/lyra/native-select.css +70 -0
- package/registry/styles/lyra/popover.css +25 -0
- package/registry/styles/lyra/primitives/dialog-shell.css +19 -0
- package/registry/styles/lyra/primitives/popover.css +16 -0
- package/registry/styles/lyra/radio.css +53 -0
- package/registry/styles/lyra/skeleton.css +7 -0
- package/registry/styles/lyra/switch.css +87 -0
- package/registry/styles/lyra/table.css +87 -0
- package/registry/styles/lyra/tabs.css +146 -0
- package/registry/styles/lyra/textarea.css +49 -0
- package/registry/styles/lyra/tooltip.css +22 -0
- package/registry/styles/maia/alert-dialog.css +74 -0
- package/registry/styles/maia/alert.css +114 -0
- package/registry/styles/maia/badge.css +86 -0
- package/registry/styles/maia/button-group.css +75 -0
- package/registry/styles/maia/button.css +228 -0
- package/registry/styles/maia/card.css +99 -0
- package/registry/styles/maia/checkbox.css +59 -0
- package/registry/styles/maia/code-block.css +191 -0
- package/registry/styles/maia/dialog.css +64 -0
- package/registry/styles/maia/dropdown-menu.css +105 -0
- package/registry/styles/maia/empty.css +54 -0
- package/registry/styles/maia/field.css +120 -0
- package/registry/styles/maia/input.css +57 -0
- package/registry/styles/maia/item.css +133 -0
- package/registry/styles/maia/kbd.css +22 -0
- package/registry/styles/maia/label.css +71 -0
- package/registry/styles/maia/native-select.css +69 -0
- package/registry/styles/maia/popover.css +25 -0
- package/registry/styles/maia/primitives/dialog-shell.css +19 -0
- package/registry/styles/maia/primitives/popover.css +16 -0
- package/registry/styles/maia/radio.css +53 -0
- package/registry/styles/maia/skeleton.css +7 -0
- package/registry/styles/maia/switch.css +87 -0
- package/registry/styles/maia/table.css +87 -0
- package/registry/styles/maia/tabs.css +146 -0
- package/registry/styles/maia/textarea.css +49 -0
- package/registry/styles/maia/tooltip.css +22 -0
- package/registry/styles/mira/alert-dialog.css +74 -0
- package/registry/styles/mira/alert.css +114 -0
- package/registry/styles/mira/badge.css +86 -0
- package/registry/styles/mira/button-group.css +75 -0
- package/registry/styles/mira/button.css +228 -0
- package/registry/styles/mira/card.css +99 -0
- package/registry/styles/mira/checkbox.css +59 -0
- package/registry/styles/mira/code-block.css +191 -0
- package/registry/styles/mira/dialog.css +64 -0
- package/registry/styles/mira/dropdown-menu.css +106 -0
- package/registry/styles/mira/empty.css +54 -0
- package/registry/styles/mira/field.css +120 -0
- package/registry/styles/mira/input.css +57 -0
- package/registry/styles/mira/item.css +133 -0
- package/registry/styles/mira/kbd.css +22 -0
- package/registry/styles/mira/label.css +71 -0
- package/registry/styles/mira/native-select.css +71 -0
- package/registry/styles/mira/popover.css +25 -0
- package/registry/styles/mira/primitives/dialog-shell.css +19 -0
- package/registry/styles/mira/primitives/popover.css +16 -0
- package/registry/styles/mira/radio.css +53 -0
- package/registry/styles/mira/skeleton.css +7 -0
- package/registry/styles/mira/switch.css +87 -0
- package/registry/styles/mira/table.css +87 -0
- package/registry/styles/mira/tabs.css +146 -0
- package/registry/styles/mira/textarea.css +49 -0
- package/registry/styles/mira/tooltip.css +22 -0
- package/registry/styles/nova/alert-dialog.css +74 -0
- package/registry/styles/nova/alert.css +114 -0
- package/registry/styles/nova/badge.css +86 -0
- package/registry/styles/nova/button-group.css +74 -0
- package/registry/styles/nova/button.css +227 -0
- package/registry/styles/nova/card.css +102 -0
- package/registry/styles/nova/checkbox.css +59 -0
- package/registry/styles/nova/code-block.css +191 -0
- package/registry/styles/nova/dialog.css +64 -0
- package/registry/styles/nova/dropdown-menu.css +105 -0
- package/registry/styles/nova/empty.css +54 -0
- package/registry/styles/nova/field.css +120 -0
- package/registry/styles/nova/input.css +57 -0
- package/registry/styles/nova/item.css +133 -0
- package/registry/styles/nova/kbd.css +22 -0
- package/registry/styles/nova/label.css +71 -0
- package/registry/styles/nova/native-select.css +71 -0
- package/registry/styles/nova/popover.css +25 -0
- package/registry/styles/nova/primitives/dialog-shell.css +23 -0
- package/registry/styles/nova/primitives/popover.css +16 -0
- package/registry/styles/nova/radio.css +53 -0
- package/registry/styles/nova/skeleton.css +7 -0
- package/registry/styles/nova/switch.css +87 -0
- package/registry/styles/nova/table.css +87 -0
- package/registry/styles/nova/tabs.css +146 -0
- package/registry/styles/nova/textarea.css +49 -0
- package/registry/styles/nova/tooltip.css +22 -0
- package/registry/styles/rhea/alert-dialog.css +74 -0
- package/registry/styles/rhea/alert.css +114 -0
- package/registry/styles/rhea/badge.css +86 -0
- package/registry/styles/rhea/button-group.css +75 -0
- package/registry/styles/rhea/button.css +228 -0
- package/registry/styles/rhea/card.css +100 -0
- package/registry/styles/rhea/checkbox.css +59 -0
- package/registry/styles/rhea/code-block.css +191 -0
- package/registry/styles/rhea/dialog.css +64 -0
- package/registry/styles/rhea/dropdown-menu.css +106 -0
- package/registry/styles/rhea/empty.css +54 -0
- package/registry/styles/rhea/field.css +120 -0
- package/registry/styles/rhea/input.css +57 -0
- package/registry/styles/rhea/item.css +133 -0
- package/registry/styles/rhea/kbd.css +22 -0
- package/registry/styles/rhea/label.css +71 -0
- package/registry/styles/rhea/native-select.css +69 -0
- package/registry/styles/rhea/popover.css +25 -0
- package/registry/styles/rhea/primitives/dialog-shell.css +19 -0
- package/registry/styles/rhea/primitives/popover.css +16 -0
- package/registry/styles/rhea/radio.css +53 -0
- package/registry/styles/rhea/skeleton.css +7 -0
- package/registry/styles/rhea/switch.css +87 -0
- package/registry/styles/rhea/table.css +87 -0
- package/registry/styles/rhea/tabs.css +146 -0
- package/registry/styles/rhea/textarea.css +49 -0
- package/registry/styles/rhea/tooltip.css +22 -0
- package/registry/styles/sera/alert-dialog.css +76 -0
- package/registry/styles/sera/alert.css +114 -0
- package/registry/styles/sera/badge.css +117 -0
- package/registry/styles/sera/button-group.css +75 -0
- package/registry/styles/sera/button.css +228 -0
- package/registry/styles/sera/card.css +102 -0
- package/registry/styles/sera/checkbox.css +59 -0
- package/registry/styles/sera/code-block.css +191 -0
- package/registry/styles/sera/dialog.css +67 -0
- package/registry/styles/sera/dropdown-menu.css +105 -0
- package/registry/styles/sera/empty.css +54 -0
- package/registry/styles/sera/field.css +120 -0
- package/registry/styles/sera/input.css +58 -0
- package/registry/styles/sera/item.css +133 -0
- package/registry/styles/sera/kbd.css +22 -0
- package/registry/styles/sera/label.css +71 -0
- package/registry/styles/sera/native-select.css +70 -0
- package/registry/styles/sera/popover.css +25 -0
- package/registry/styles/sera/primitives/dialog-shell.css +19 -0
- package/registry/styles/sera/primitives/popover.css +16 -0
- package/registry/styles/sera/radio.css +53 -0
- package/registry/styles/sera/skeleton.css +7 -0
- package/registry/styles/sera/switch.css +88 -0
- package/registry/styles/sera/table.css +88 -0
- package/registry/styles/sera/tabs.css +146 -0
- package/registry/styles/sera/textarea.css +50 -0
- package/registry/styles/sera/tooltip.css +22 -0
- package/registry/styles/vega/alert-dialog.css +74 -0
- package/registry/styles/vega/alert.css +114 -0
- package/registry/styles/vega/badge.css +86 -0
- package/registry/styles/vega/button-group.css +75 -0
- package/registry/styles/vega/button.css +228 -0
- package/registry/styles/vega/card.css +100 -0
- package/registry/styles/vega/checkbox.css +60 -0
- package/registry/styles/vega/code-block.css +191 -0
- package/registry/styles/vega/dialog.css +64 -0
- package/registry/styles/vega/dropdown-menu.css +105 -0
- package/registry/styles/vega/empty.css +54 -0
- package/registry/styles/vega/field.css +120 -0
- package/registry/styles/vega/input.css +58 -0
- package/registry/styles/vega/item.css +133 -0
- package/registry/styles/vega/kbd.css +22 -0
- package/registry/styles/vega/label.css +71 -0
- package/registry/styles/vega/native-select.css +70 -0
- package/registry/styles/vega/popover.css +25 -0
- package/registry/styles/vega/primitives/dialog-shell.css +19 -0
- package/registry/styles/vega/primitives/popover.css +16 -0
- package/registry/styles/vega/radio.css +53 -0
- package/registry/styles/vega/skeleton.css +7 -0
- package/registry/styles/vega/switch.css +88 -0
- package/registry/styles/vega/table.css +87 -0
- package/registry/styles/vega/tabs.css +146 -0
- package/registry/styles/vega/textarea.css +50 -0
- package/registry/styles/vega/tooltip.css +22 -0
- package/registry/tokens.css +139 -0
- package/registry/utilities.css +14 -0
package/dist/ui.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import pc from "picocolors";
|
|
2
|
+
/** Prints a compact list of registry items. */
|
|
3
|
+
export function printItems(items) {
|
|
4
|
+
for (const item of items) {
|
|
5
|
+
const name = pc.cyan(item.name.padEnd(18));
|
|
6
|
+
const kind = pc.dim(item.type.padEnd(11));
|
|
7
|
+
console.log(`${name} ${kind} ${item.description}`);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
/** Prints a one-line summary of installed item names. */
|
|
11
|
+
export function installedSummary(names) {
|
|
12
|
+
return names.length > 0 ? names.join(", ") : "nothing";
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=ui.js.map
|
package/dist/ui.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui.js","sourceRoot":"","sources":["../src/ui.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAG5B,+CAA+C;AAC/C,MAAM,UAAU,UAAU,CAAC,KAAqB;IAC9C,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,IAAI,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;QAC3C,MAAM,IAAI,GAAG,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;QAC1C,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,IAAI,IAAI,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;IACrD,CAAC;AACH,CAAC;AAED,yDAAyD;AACzD,MAAM,UAAU,gBAAgB,CAAC,KAAe;IAC9C,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AACzD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,60 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "loseta",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "Native CSS component scaffolds with the shadcn feel.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/vladiantio/loseta.git",
|
|
10
|
+
"directory": "packages/loseta"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://github.com/vladiantio/loseta",
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/vladiantio/loseta/issues"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"css",
|
|
18
|
+
"components",
|
|
19
|
+
"shadcn",
|
|
20
|
+
"scaffold",
|
|
21
|
+
"design-system"
|
|
22
|
+
],
|
|
23
|
+
"publishConfig": {
|
|
24
|
+
"access": "public"
|
|
25
|
+
},
|
|
26
|
+
"bin": {
|
|
27
|
+
"loseta": "./bin/loseta.js"
|
|
28
|
+
},
|
|
29
|
+
"files": [
|
|
30
|
+
"bin",
|
|
31
|
+
"dist",
|
|
32
|
+
"registry",
|
|
33
|
+
"NOTICE"
|
|
34
|
+
],
|
|
35
|
+
"engines": {
|
|
36
|
+
"node": ">=20"
|
|
37
|
+
},
|
|
38
|
+
"scripts": {
|
|
39
|
+
"build": "tsc -p tsconfig.json",
|
|
40
|
+
"dev": "tsx src/cli.ts",
|
|
41
|
+
"validate": "node scripts/validate-registry.mjs",
|
|
42
|
+
"examples": "tsx scripts/generate-examples.ts",
|
|
43
|
+
"check": "pnpm build && pnpm validate",
|
|
44
|
+
"test": "tsx --test test/*.test.ts",
|
|
45
|
+
"prepack": "pnpm build",
|
|
46
|
+
"prepublishOnly": "pnpm validate"
|
|
47
|
+
},
|
|
48
|
+
"dependencies": {
|
|
49
|
+
"@clack/prompts": "^1.8.1",
|
|
50
|
+
"citty": "^0.2.2",
|
|
51
|
+
"picocolors": "^1.1.1"
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@types/node": "^26.6.6",
|
|
55
|
+
"ajv": "^8.20.0",
|
|
56
|
+
"lightningcss": "^1.33.0",
|
|
57
|
+
"tsx": "^4.23.15",
|
|
58
|
+
"typescript": "^5.9.3"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/* Element defaults. Structural only: visual decisions live in the style layer. */
|
|
2
|
+
@layer loseta.base {
|
|
3
|
+
body {
|
|
4
|
+
background-color: var(--background);
|
|
5
|
+
color: var(--foreground);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
* {
|
|
9
|
+
outline-color: color-mix(in oklab, var(--ring) 50%, transparent);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
button:not(:disabled),
|
|
13
|
+
[role='button']:not(:disabled) {
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
::selection {
|
|
18
|
+
background-color: color-mix(in oklab, var(--primary) 20%, transparent);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/* Alert Dialog */
|
|
2
|
+
@layer loseta.components {
|
|
3
|
+
.alert-dialog {
|
|
4
|
+
> * > header {
|
|
5
|
+
display: grid;
|
|
6
|
+
grid-template-rows: auto 1fr;
|
|
7
|
+
place-items: center;
|
|
8
|
+
text-align: center;
|
|
9
|
+
|
|
10
|
+
@media (width >= 40rem) {
|
|
11
|
+
place-items: start;
|
|
12
|
+
text-align: start;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
> * > header:has(> figure) {
|
|
17
|
+
grid-template-rows: auto auto 1fr;
|
|
18
|
+
|
|
19
|
+
@media (width >= 40rem) {
|
|
20
|
+
grid-template-rows: auto 1fr;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
> * > header > figure {
|
|
25
|
+
margin: 0;
|
|
26
|
+
flex-shrink: 0;
|
|
27
|
+
|
|
28
|
+
@media (width >= 40rem) {
|
|
29
|
+
grid-row: span 2 / span 2;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
& svg {
|
|
33
|
+
pointer-events: none;
|
|
34
|
+
flex-shrink: 0;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
> * > header > figure:has(img) {
|
|
39
|
+
overflow: hidden;
|
|
40
|
+
|
|
41
|
+
& img {
|
|
42
|
+
width: 100%;
|
|
43
|
+
height: 100%;
|
|
44
|
+
object-fit: cover;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
> * > header:has(> figure) > :is(h2, p) {
|
|
49
|
+
@media (width >= 40rem) {
|
|
50
|
+
grid-column-start: 2;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
> * > footer {
|
|
55
|
+
display: flex;
|
|
56
|
+
flex-direction: column-reverse;
|
|
57
|
+
|
|
58
|
+
@media (width >= 40rem) {
|
|
59
|
+
flex-direction: row;
|
|
60
|
+
justify-content: flex-end;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&:is([data-size='sm']) > * > header,
|
|
65
|
+
> [data-size='sm'] > header {
|
|
66
|
+
@media (width >= 40rem) {
|
|
67
|
+
place-items: center;
|
|
68
|
+
text-align: center;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&:is([data-size='sm']) > * > header:has(> figure),
|
|
73
|
+
> [data-size='sm'] > header:has(> figure) {
|
|
74
|
+
@media (width >= 40rem) {
|
|
75
|
+
grid-template-rows: auto auto 1fr;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
&:is([data-size='sm']) > * > header:has(> figure) > :is(h2, p),
|
|
80
|
+
> [data-size='sm'] > header:has(> figure) > :is(h2, p) {
|
|
81
|
+
@media (width >= 40rem) {
|
|
82
|
+
grid-column-start: auto;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&:is([data-size='sm']) > * > footer,
|
|
87
|
+
> [data-size='sm'] > footer {
|
|
88
|
+
display: grid;
|
|
89
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
90
|
+
|
|
91
|
+
@media (width >= 40rem) {
|
|
92
|
+
display: grid;
|
|
93
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/* Alert */
|
|
2
|
+
@layer loseta.components {
|
|
3
|
+
.alert {
|
|
4
|
+
position: relative;
|
|
5
|
+
width: 100%;
|
|
6
|
+
|
|
7
|
+
> :is(h2, h3, h4, h5, h6, strong, [data-slot='title']) {
|
|
8
|
+
min-height: 1rem;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
> section {
|
|
12
|
+
display: grid;
|
|
13
|
+
justify-items: start;
|
|
14
|
+
gap: 0.25rem;
|
|
15
|
+
|
|
16
|
+
:where(p, ul, ol) {
|
|
17
|
+
margin: 0;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
:where(p, ul, ol):not(:last-child) {
|
|
21
|
+
margin-bottom: 1rem;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
ul {
|
|
25
|
+
list-style-position: inside;
|
|
26
|
+
list-style-type: disc;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
ol {
|
|
30
|
+
list-style-position: inside;
|
|
31
|
+
list-style-type: decimal;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
> footer {
|
|
36
|
+
position: absolute;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/* Badge */
|
|
2
|
+
@layer loseta.components {
|
|
3
|
+
.badge {
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
width: fit-content;
|
|
6
|
+
flex-shrink: 0;
|
|
7
|
+
align-items: center;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
white-space: nowrap;
|
|
11
|
+
|
|
12
|
+
&:focus-visible {
|
|
13
|
+
border-color: var(--ring);
|
|
14
|
+
box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&[aria-invalid='true'] {
|
|
18
|
+
border-color: var(--destructive);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
> svg {
|
|
22
|
+
pointer-events: none;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/* Button Group */
|
|
2
|
+
@layer loseta.components {
|
|
3
|
+
.btn-group {
|
|
4
|
+
isolation: isolate;
|
|
5
|
+
display: flex;
|
|
6
|
+
width: fit-content;
|
|
7
|
+
align-items: stretch;
|
|
8
|
+
|
|
9
|
+
&:has(> :is(.dropdown-menu, .popover, .select) > [data-popover][aria-hidden='false']) {
|
|
10
|
+
position: relative;
|
|
11
|
+
z-index: 50;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
> .input {
|
|
15
|
+
flex: 1;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
> *:focus-visible,
|
|
19
|
+
> :is(.dropdown-menu, .popover, .select) > button:focus-visible {
|
|
20
|
+
position: relative;
|
|
21
|
+
z-index: 10;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
> hr[role='separator'] {
|
|
25
|
+
position: relative;
|
|
26
|
+
margin-inline: 0;
|
|
27
|
+
margin-block: 1px;
|
|
28
|
+
height: auto;
|
|
29
|
+
width: 1px;
|
|
30
|
+
flex-shrink: 0;
|
|
31
|
+
align-self: stretch;
|
|
32
|
+
border-style: solid;
|
|
33
|
+
border-width: 0px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&:not([data-orientation='vertical']) {
|
|
37
|
+
> *:not(:first-child),
|
|
38
|
+
> :is(.dropdown-menu, .popover, .select):not(:first-child) > button {
|
|
39
|
+
border-start-start-radius: 0;
|
|
40
|
+
border-end-start-radius: 0;
|
|
41
|
+
border-inline-start-style: solid;
|
|
42
|
+
border-inline-start-width: 0px;
|
|
43
|
+
}
|
|
44
|
+
> *:not(:last-child),
|
|
45
|
+
> :is(.dropdown-menu, .popover, .select):not(:last-child) > button {
|
|
46
|
+
border-start-end-radius: 0;
|
|
47
|
+
border-end-end-radius: 0;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
&[data-orientation='vertical'] {
|
|
51
|
+
flex-direction: column;
|
|
52
|
+
|
|
53
|
+
> hr[role='separator'] {
|
|
54
|
+
margin-inline: 1px;
|
|
55
|
+
margin-block: 0;
|
|
56
|
+
height: 1px;
|
|
57
|
+
width: auto;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
> *:not(:first-child),
|
|
61
|
+
> :is(.dropdown-menu, .popover, .select):not(:first-child) > button {
|
|
62
|
+
border-top-left-radius: 0;
|
|
63
|
+
border-top-right-radius: 0;
|
|
64
|
+
border-top-style: solid;
|
|
65
|
+
border-top-width: 0px;
|
|
66
|
+
}
|
|
67
|
+
> *:not(:last-child),
|
|
68
|
+
> :is(.dropdown-menu, .popover, .select):not(:last-child) > button {
|
|
69
|
+
border-bottom-right-radius: 0;
|
|
70
|
+
border-bottom-left-radius: 0;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
> :is(span, label, output) {
|
|
75
|
+
display: flex;
|
|
76
|
+
align-items: center;
|
|
77
|
+
|
|
78
|
+
& svg {
|
|
79
|
+
pointer-events: none;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/* Button */
|
|
2
|
+
@layer loseta.components {
|
|
3
|
+
.btn {
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
flex-shrink: 0;
|
|
6
|
+
align-items: center;
|
|
7
|
+
justify-content: center;
|
|
8
|
+
white-space: nowrap;
|
|
9
|
+
transition-property: all;
|
|
10
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
11
|
+
transition-duration: 150ms;
|
|
12
|
+
outline-style: none;
|
|
13
|
+
-webkit-user-select: none;
|
|
14
|
+
user-select: none;
|
|
15
|
+
|
|
16
|
+
&:disabled {
|
|
17
|
+
pointer-events: none;
|
|
18
|
+
opacity: 50%;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
& svg {
|
|
22
|
+
pointer-events: none;
|
|
23
|
+
flex-shrink: 0;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/* Card */
|
|
2
|
+
@layer loseta.components {
|
|
3
|
+
.card {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
|
|
7
|
+
> header {
|
|
8
|
+
container-type: inline-size;
|
|
9
|
+
container-name: card-header;
|
|
10
|
+
display: grid;
|
|
11
|
+
grid-auto-rows: min-content;
|
|
12
|
+
align-items: flex-start;
|
|
13
|
+
|
|
14
|
+
&:has(> [data-slot='action'], > .card-action) {
|
|
15
|
+
grid-template-columns: 1fr auto;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&:has(> p) {
|
|
19
|
+
grid-template-rows: auto auto;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
> header > :is(h2, h3, [data-slot='title'], .card-title) {
|
|
24
|
+
line-height: 1;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
> header > :is([data-slot='action'], .card-action) {
|
|
28
|
+
grid-column-start: 2;
|
|
29
|
+
grid-row: span 2 / span 2;
|
|
30
|
+
grid-row-start: 1;
|
|
31
|
+
align-self: flex-start;
|
|
32
|
+
justify-self: flex-end;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
> header > menu.card-action {
|
|
36
|
+
margin: 0;
|
|
37
|
+
list-style-type: none;
|
|
38
|
+
padding: 0;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
> footer {
|
|
42
|
+
display: flex;
|
|
43
|
+
align-items: center;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/* Checkbox */
|
|
2
|
+
@layer loseta.components {
|
|
3
|
+
.checkbox:not([role='switch']) {
|
|
4
|
+
position: relative;
|
|
5
|
+
flex-shrink: 0;
|
|
6
|
+
appearance: none;
|
|
7
|
+
outline-style: none;
|
|
8
|
+
|
|
9
|
+
&:disabled {
|
|
10
|
+
cursor: not-allowed;
|
|
11
|
+
opacity: 50%;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
&:checked:after {
|
|
15
|
+
display: block;
|
|
16
|
+
background-color: currentcolor;
|
|
17
|
+
content: '';
|
|
18
|
+
mask-image: var(--check-icon);
|
|
19
|
+
mask-size: 0.875rem;
|
|
20
|
+
mask-position: center;
|
|
21
|
+
mask-repeat: no-repeat;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
/* Code Block */
|
|
2
|
+
@layer loseta.components {
|
|
3
|
+
.code-block {
|
|
4
|
+
position: relative;
|
|
5
|
+
display: flex;
|
|
6
|
+
width: 100%;
|
|
7
|
+
min-width: 0;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
|
|
11
|
+
> header {
|
|
12
|
+
display: flex;
|
|
13
|
+
min-width: 0;
|
|
14
|
+
flex-shrink: 0;
|
|
15
|
+
align-items: center;
|
|
16
|
+
gap: 0.5rem;
|
|
17
|
+
|
|
18
|
+
> [data-slot='title'] {
|
|
19
|
+
min-width: 0;
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
text-overflow: ellipsis;
|
|
22
|
+
white-space: nowrap;
|
|
23
|
+
|
|
24
|
+
& svg {
|
|
25
|
+
pointer-events: none;
|
|
26
|
+
flex-shrink: 0;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
> header > [data-slot='actions'],
|
|
32
|
+
> [data-slot='actions'] {
|
|
33
|
+
display: flex;
|
|
34
|
+
flex-shrink: 0;
|
|
35
|
+
align-items: center;
|
|
36
|
+
gap: 0.25rem;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
> header > [data-slot='actions'] {
|
|
40
|
+
margin-inline-start: auto;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
> [data-slot='actions'] {
|
|
44
|
+
position: absolute;
|
|
45
|
+
z-index: 1;
|
|
46
|
+
margin: 0;
|
|
47
|
+
opacity: 0;
|
|
48
|
+
transition-property: opacity;
|
|
49
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
50
|
+
transition-duration: 150ms;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&:hover > [data-slot='actions'],
|
|
54
|
+
&:focus-within > [data-slot='actions'] {
|
|
55
|
+
opacity: 1;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@media (pointer: coarse) {
|
|
59
|
+
> [data-slot='actions'] {
|
|
60
|
+
opacity: 1;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
> pre {
|
|
65
|
+
min-height: 0;
|
|
66
|
+
min-width: 0;
|
|
67
|
+
margin: 0;
|
|
68
|
+
overflow: auto;
|
|
69
|
+
direction: ltr;
|
|
70
|
+
text-align: start;
|
|
71
|
+
outline-style: none;
|
|
72
|
+
white-space: pre;
|
|
73
|
+
|
|
74
|
+
> code {
|
|
75
|
+
display: block;
|
|
76
|
+
min-width: max-content;
|
|
77
|
+
font: inherit;
|
|
78
|
+
white-space: inherit;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
> code:has(> [data-slot='line']) {
|
|
82
|
+
display: grid;
|
|
83
|
+
min-width: max-content;
|
|
84
|
+
align-content: start;
|
|
85
|
+
grid-auto-flow: row;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
&[data-line-numbers] {
|
|
89
|
+
counter-reset: line calc(var(--line-start, 1) - 1);
|
|
90
|
+
|
|
91
|
+
> code {
|
|
92
|
+
grid-template-columns: auto minmax(0, 1fr);
|
|
93
|
+
column-gap: 0.75rem;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
[data-slot='line'] {
|
|
97
|
+
display: grid;
|
|
98
|
+
grid-column: 1 / -1;
|
|
99
|
+
grid-template-columns: subgrid;
|
|
100
|
+
column-gap: inherit;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
[data-slot='line']::before {
|
|
104
|
+
grid-column: 1;
|
|
105
|
+
content: counter(line);
|
|
106
|
+
counter-increment: line;
|
|
107
|
+
min-width: 1.5rem;
|
|
108
|
+
align-self: start;
|
|
109
|
+
text-align: end;
|
|
110
|
+
-webkit-user-select: none;
|
|
111
|
+
user-select: none;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
@supports (content: counter(line) / '') {
|
|
115
|
+
[data-slot='line']::before {
|
|
116
|
+
content: counter(line) / '';
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
[data-slot='line'] > [data-slot='line-content'] {
|
|
121
|
+
grid-column: 2;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
&[data-wrap] {
|
|
126
|
+
white-space: pre-wrap;
|
|
127
|
+
overflow-wrap: anywhere;
|
|
128
|
+
|
|
129
|
+
> code {
|
|
130
|
+
min-width: 0;
|
|
131
|
+
white-space: inherit;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
[data-slot='line'] {
|
|
137
|
+
min-height: 1lh;
|
|
138
|
+
|
|
139
|
+
> [data-slot='line-content'] {
|
|
140
|
+
position: relative;
|
|
141
|
+
display: block;
|
|
142
|
+
min-width: 0;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
&[data-variant='added'] > [data-slot='line-content']::before {
|
|
146
|
+
content: '+';
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
&[data-variant='removed'] > [data-slot='line-content']::before {
|
|
150
|
+
content: '−';
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
&[data-variant='added'] > [data-slot='line-content']::before,
|
|
154
|
+
&[data-variant='removed'] > [data-slot='line-content']::before {
|
|
155
|
+
position: absolute;
|
|
156
|
+
inset-block-start: 0;
|
|
157
|
+
inset-inline-start: -0.75rem;
|
|
158
|
+
width: 0.75rem;
|
|
159
|
+
text-align: center;
|
|
160
|
+
-webkit-user-select: none;
|
|
161
|
+
user-select: none;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
> footer {
|
|
166
|
+
display: flex;
|
|
167
|
+
min-width: 0;
|
|
168
|
+
flex-shrink: 0;
|
|
169
|
+
align-items: center;
|
|
170
|
+
gap: 0.5rem;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/* Dialog */
|
|
2
|
+
@layer loseta.components {
|
|
3
|
+
.dialog {
|
|
4
|
+
> * > header {
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
> * > section {
|
|
10
|
+
flex: 1;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
> * > footer {
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column-reverse;
|
|
16
|
+
|
|
17
|
+
@media (width >= 40rem) {
|
|
18
|
+
flex-direction: row;
|
|
19
|
+
justify-content: flex-end;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
> * > :is(button, form[method='dialog']) {
|
|
24
|
+
position: absolute;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
> * > :is(button, form[method='dialog'] > button) {
|
|
28
|
+
display: inline-flex;
|
|
29
|
+
align-items: center;
|
|
30
|
+
justify-content: center;
|
|
31
|
+
opacity: 70%;
|
|
32
|
+
transition-property: opacity;
|
|
33
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
34
|
+
transition-duration: 150ms;
|
|
35
|
+
|
|
36
|
+
&:hover {
|
|
37
|
+
opacity: 100%;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&:focus-visible {
|
|
41
|
+
outline-style: none;
|
|
42
|
+
|
|
43
|
+
@media (forced-colors: active) {
|
|
44
|
+
outline: 2px solid transparent;
|
|
45
|
+
outline-offset: 2px;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&:disabled {
|
|
50
|
+
pointer-events: none;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
& svg {
|
|
54
|
+
pointer-events: none;
|
|
55
|
+
flex-shrink: 0;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
> * > :is(button, form[method='dialog'] > button) > svg {
|
|
60
|
+
width: var(--icon-size, 1rem);
|
|
61
|
+
height: var(--icon-size, 1rem);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|