Skip to content

Commit

Permalink
Merge pull request #29 from invopop/gokit
Browse files Browse the repository at this point in the history
minify css output
  • Loading branch information
beliolfa authored Oct 9, 2024
2 parents 0b18008 + 58694ff commit 5f2b382
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 11 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ node_modules
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
/src/lib
/storybook-static
/storybook-static
gokit
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@invopop/ui-kit",
"license": "MIT",
"version": "0.4.1",
"version": "0.4.2",
"scripts": {
"dev": "vite dev",
"build": "vite build && npm run package",
Expand All @@ -16,7 +16,7 @@
"lint": "prettier --plugin-search-dir . --check . && eslint .",
"format": "prettier --plugin-search-dir . --write .",
"storybook": "storybook dev -p 6006",
"build:tailwind": "npx tailwindcss -i ./styles.css -o ./dist/gokit.css",
"build:tailwind": "npx tailwindcss -i ./styles.css -o ./dist/gokit.css --minify",
"build-storybook": "storybook build",
"build-web-components": "vite build --config vite.wbc.config.ts",
"publish-wbc": "npm run build-web-components && cp ./package-wbc.json ./dist/package.json && cd ./dist && npm run publish"
Expand Down
Binary file removed src/gokit/gokit
Binary file not shown.
2 changes: 1 addition & 1 deletion src/gokit/head.templ
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ templ DefaultCSS() {
<link rel="preconnect" href="https://fonts.googleapis.com"/>
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin/>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap" rel="stylesheet"/>
<link href="https://cdn.jsdelivr.net/npm/@invopop/ui-kit@0.4.1/dist/gokit.css" rel="stylesheet"/>
<link href="https://cdn.jsdelivr.net/npm/@invopop/ui-kit@0.4.2/dist/gokit.css" rel="stylesheet"/>
}

templ DefaultScripts() {
Expand Down
38 changes: 31 additions & 7 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@
@apply flex items-center gap-2;
}
.kit-checkbox-input {
@apply form-checkbox w-5 h-5 text-workspace-accent focus:text-workspace-accent rounded border border-neutral-200 focus:ring-0 focus:ring-offset-0;
@apply form-checkbox w-5 h-5 text-workspace-accent rounded border border-neutral-200;
}
.kit-checkbox-input:focus {
@apply text-workspace-accent ring-0 ring-offset-0;
}
.kit-checkbox-label {
@apply text-base text-neutral-800;
Expand All @@ -53,10 +56,19 @@
@apply flex flex-col space-y-2;
}
.kit-input {
@apply py-1.5 px-2.5 border w-full rounded-md placeholder:text-neutral-500 text-base tracking-tight focus:ring-0 focus:ring-offset-0;
@apply py-1.5 px-2.5 border w-full rounded-md placeholder:text-neutral-500 text-base tracking-tight;
}
.kit-input:focus {
@apply ring-0 ring-offset-0;
}
.kit-input--success {
@apply border-neutral-200 hover:enabled:border-neutral-300 text-neutral-800 outline-none focus:border-workspace-accent-500 group-hover:focus:border-workspace-accent-500 caret-workspace-accent-500 focus:shadow-active;
@apply border-neutral-200 text-neutral-800 outline-none caret-workspace-accent-500;
}
.kit-input--success:hover:enabled {
@apply border-neutral-300;
}
.kit-input--success:focus {
@apply border-workspace-accent-500 shadow-active;
}
.kit-input--error {
@apply text-danger-500 border-danger-400 outline-danger-400;
Expand All @@ -67,7 +79,7 @@
.kit-error {
@apply text-sm text-danger-500 flex items-center space-x-1 pl-[20px] bg-no-repeat bg-left bg-[length:16px_16px];

background-url: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KCQk8cGF0aAoJCQlmaWxsLXJ1bGU9ImV2ZW5vZGQiCgkJCWNsaXAtcnVsZT0iZXZlbm9kZCIKCQkJZD0iTTggMTQuNUMxMS41ODk5IDE0LjU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NSAxNC41IDggMTQuNVpNNy45OTk5OSA5LjM1QzcuNjY4NjIgOS4zNSA3LjM5OTk5IDkuMDgxMzcgNy4zOTk5OSA4Ljc1VjQuNzVDNy4zOTk5OSA0LjQxODYzIDcuNjY4NjIgNC4xNSA3Ljk5OTk5IDQuMTVDOC4zMzEzNyA0LjE1IDguNTk5OTkgNC40MTg2MyA4LjU5OTk5IDQuNzVMOC41OTk5OSA4Ljc1QzguNTk5OTkgOS4wODEzNyA4LjMzMTM2IDkuMzUgNy45OTk5OSA5LjM1Wk04Ljc1IDExQzguNzUgMTEuNDE0MiA4LjQxNDIxIDExLjc1IDggMTEuNzVDNy41ODU3OSAxMS43NSA3LjI1IDExLjQxNDIgNy4yNSAxMUM3LjI1IDEwLjU4NTggNy41ODU3OSAxMC4yNSA4IDEwLjI1QzguNDE0MjEgMTAuMjUgOC43NSAxMC41ODU4IDguNzUgMTFaIgoJCQlmaWxsPSIjQzkyRDQ1IgoJCT48L3BhdGg+Cgk8L3N2Zz4=');
}

/* Text */
Expand Down Expand Up @@ -95,7 +107,10 @@ mark {
@apply hidden absolute left-0 top-7 popover-menu border border-neutral-200 rounded-md px-1 py-0.5 w-full bg-white;
}
.kit-popover-list-item {
@apply px-2 py-1.5 font-medium text-base text-neutral-800 w-full rounded hover:bg-neutral-100;
@apply px-2 py-1.5 font-medium text-base text-neutral-800 w-full rounded;
}
.kit-popover-list-item:hover {
@apply bg-neutral-100;
}
[popover] {
inset: unset;
Expand All @@ -120,21 +135,30 @@ mark {
@apply flex flex-col space-y-2;
}
.kit-select {
@apply pl-2 py-1.5 border border-neutral-200 hover:enabled:border-neutral-300 w-full rounded-md text-neutral-800 text-base pr-9 outline-none tracking-tight focus:border-workspace-accent group-hover:focus:border-workspace-accent focus:shadow-active disabled:bg-neutral-50 focus:ring-0 focus:ring-offset-0;
@apply pl-2 py-1.5 border border-neutral-200 w-full rounded-md text-neutral-800 text-base pr-9 outline-none tracking-tight disabled:bg-neutral-50;
appearance: none;
-webkit-appearance: none;
-moz-appearance: none;
background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgeD0iMiIgeT0iMiIgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiByeD0iNCIgZmlsbD0iI0YzRjRGNiIvPgo8cGF0aCBkPSJNNi41IDguMjUwMDRMMTAgMTEuNzVMMTMuNSA4LjI1IiBzdHJva2U9IiMwMzA3MTIiIHN0cm9rZS13aWR0aD0iMS4xIi8+Cjwvc3ZnPg==');
background-repeat: no-repeat;
background-position: center right 6px;
}
.kit-select:hover:enabled {
@apply border-neutral-300;
}
.kit-select:focus {
@apply border-workspace-accent shadow-active ring-0 ring-offset-0;
}

/* Textarea */
.kit-textarea-wrapper {
@apply flex flex-col space-y-2;
}
.kit-textarea {
@apply py-1.5 px-2.5 border w-full rounded-md placeholder:text-neutral-500 text-base tracking-tight focus:ring-0 focus:ring-offset-0 disabled:bg-neutral-50;
@apply py-1.5 px-2.5 border w-full rounded-md placeholder:text-neutral-500 text-base tracking-tight disabled:bg-neutral-50;
}
.kit-textarea:focus {
@apply ring-0 ring-offset-0;
}
div[contenteditable='true'] .tag {
display: inline-flex;
Expand Down

0 comments on commit 5f2b382

Please sign in to comment.