Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Light doc update #210

Closed
wants to merge 41 commits into from
Closed
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
fcbc26a
Link npm downloads badge to npm package page
techniq Jan 3, 2024
992bdde
🕰️ NEW: formatDate (#137)
jycouet Jan 3, 2024
5d58c6a
Design tokens / Theme support (with dark mode) (#146)
techniq Jan 3, 2024
d5b1b98
Change "theme" to "classes" in Settings (#172)
dimfeld Jan 3, 2024
9ef1108
Add svelte settings to .prettierrc (#173)
dimfeld Jan 4, 2024
853b109
Theme store (#174)
dimfeld Jan 4, 2024
f618863
Move culori to be a regular dependency so that all package managers w…
dimfeld Jan 4, 2024
8735eae
add ThemeInit component that place script inside <head> tag (#176)
dimfeld Jan 4, 2024
5e58ad7
Version bump to 0.58.0-next.8
techniq Jan 4, 2024
07f94f5
Improve dark scheme icon
techniq Jan 4, 2024
4c3ce20
Rename `ThemeButton` to `ThemeSelect`
techniq Jan 4, 2024
a56b33a
Add `ThemeSwitch` component to toggle between light/dark theme
techniq Jan 4, 2024
5dc3792
Generate `-50` shade for an option lighter than `-100`
techniq Jan 4, 2024
dc2fc6e
Update Settings component to expose each settings value as its own co…
dimfeld Jan 4, 2024
a60fe00
Format project (fix lint failure)
techniq Jan 4, 2024
a6009ac
Update tailwind plugin to only generate shade colors if not present i…
techniq Jan 5, 2024
98998fe
Map Skeleton themes to Svelte UX themes
techniq Jan 5, 2024
179f0c5
Switch Daisy UI themes back as the default (for now, until a more rob…
techniq Jan 6, 2024
a1d3cf7
refacto peer dev (#201)
jycouet Jan 8, 2024
5d5c82d
Move format function definitions onto settings to avoid calling getSe…
dimfeld Jan 9, 2024
71f4382
[formatNumber] Fix default style handling and update tests
techniq Jan 9, 2024
fa009e0
Locale support cleanup (#202)
dimfeld Jan 9, 2024
44f07aa
Format last qol for next (#203)
jycouet Jan 9, 2024
7dfc008
Theme generator (#192)
techniq Jan 10, 2024
1980650
Version bump to 0.58.0-next.9
techniq Jan 10, 2024
250b407
Add ThemeSwitch to top-level exports
techniq Jan 10, 2024
d8f28c6
pass through existing locale stores if they are passed into settings …
dimfeld Jan 10, 2024
fe55006
make DateField format and mask reactive to locale changes (#206)
dimfeld Jan 10, 2024
b115fa9
fix getPeriodTypeName calls (#207)
dimfeld Jan 10, 2024
96e9965
[ColorField] Make color swatch look clickable
techniq Jan 11, 2024
dc96dba
[TableOfContents] Support changing icon
techniq Jan 11, 2024
2d0b147
[Popover|Menu|popover] Support `resize` width or height only
techniq Jan 11, 2024
5540c14
[ThemeSelect] Improve width (consistent when switching between light/…
techniq Jan 11, 2024
18d942d
[MenuButton] Support hiding `menuIcon` and dispatch `change` event
techniq Jan 11, 2024
1285894
Collapse app header actions into menu on small viewports. Resolves #185
techniq Jan 11, 2024
3431929
Small docs design refinements
techniq Jan 11, 2024
e379731
[LanguageSelect] Use code instead of flag for selection display
techniq Jan 11, 2024
f9fd7c7
Responsive tweaks
techniq Jan 11, 2024
a25fa6f
Update examles to use `fill-light" instead of "fill" for default colo…
techniq Jan 11, 2024
3b53cdc
Feat/date range weekstarton (#208)
jycouet Jan 11, 2024
dbcd18b
Update localization settings and translations
jycouet Jan 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/angry-zebras-remember.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'svelte-ux': patch
---

Add styles (with daisy) as top-level export
5 changes: 5 additions & 0 deletions .changeset/chilled-dingos-sell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"svelte-ux": minor
---

Update Settings component to expose each settings key as a component prop
5 changes: 5 additions & 0 deletions .changeset/cool-hotels-own.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"svelte-ux": patch
---

[SelectField] Add `stepper` prop to iterate through options (like `MenuField`)
5 changes: 5 additions & 0 deletions .changeset/eight-bottles-eat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"svelte-ux": patch
---

[TableOfContents] Support changing icon
5 changes: 5 additions & 0 deletions .changeset/fair-trees-sparkle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"svelte-ux": patch
---

[MenuField] Expose `selected` option via prop (similar to `SelectField`)
7 changes: 7 additions & 0 deletions .changeset/for-you-sean.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'svelte-ux': minor
---

- Rename settings `theme` argument to `classes`
- Rename getTheme to getClasses and getComponentTheme to getComponentClasses

5 changes: 5 additions & 0 deletions .changeset/friendly-pets-reflect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"svelte-ux": patch
---

Add ThemeInit component to prevent flash of unstyled content when SSR is enabled
5 changes: 5 additions & 0 deletions .changeset/healthy-files-search.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"svelte-ux": patch
---

[MenuButton] Support hiding `menuIcon` and dispatch `change` event
5 changes: 5 additions & 0 deletions .changeset/light-pianos-refuse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"svelte-ux": patch
---

Rename `ThemeButton` to `ThemeSelect`
5 changes: 5 additions & 0 deletions .changeset/light-ways-dress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'svelte-ux': minor
---

BREAKING: removed `dateDisplay()` in favor of `format()`
5 changes: 5 additions & 0 deletions .changeset/modern-pumpkins-march.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"svelte-ux": patch
---

Add a store to manage the current theme
5 changes: 5 additions & 0 deletions .changeset/ninety-carpets-cross.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'svelte-ux': patch
---

add locale management of date leveraging intl
31 changes: 31 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"mode": "pre",
"tag": "next",
"initialVersions": {
"create-svelte-ux": "0.2.1",
"svelte-ux": "0.57.1"
},
"changesets": [
"angry-zebras-remember",
"chilled-dingos-sell",
"cool-hotels-own",
"fair-trees-sparkle",
"for-you-sean",
"friendly-pets-reflect",
"light-pianos-refuse",
"light-ways-dress",
"modern-pumpkins-march",
"ninety-carpets-cross",
"quick-avocados-hope",
"quick-carrots-grab",
"rare-flowers-flash",
"selfish-hounds-dance",
"shiny-hornets-study",
"shy-peaches-ring",
"sixty-walls-rest",
"strong-flies-provide",
"wicked-melons-fold",
"yellow-nails-vanish",
"yellow-oranges-fly"
]
}
5 changes: 5 additions & 0 deletions .changeset/quick-carrots-grab.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"svelte-ux": minor
---

Add theme selection/creation page and simplify loading themes
5 changes: 5 additions & 0 deletions .changeset/rare-flowers-flash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"svelte-ux": patch
---

Map Skeleton themes to Svelte UX themes
5 changes: 5 additions & 0 deletions .changeset/selfish-hounds-dance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"svelte-ux": patch
---

[SelectField] Fix toggling display of options menu using toggleIcon. Support hiding toggleIcon (`<SelectField toggleIcon={null} />
6 changes: 6 additions & 0 deletions .changeset/sixty-walls-rest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"svelte-ux": minor
---

- Add locale settings to settings object, and allow dynamically changing the current locale.
- Move format function to be a store on the settings object, which updates when the locale changes.
5 changes: 5 additions & 0 deletions .changeset/strong-flies-provide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'svelte-ux': minor
---

Support `ux.themes` tailwind config, including Daisy UI
5 changes: 5 additions & 0 deletions .changeset/tidy-gifts-yawn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"svelte-ux": patch
---

[Popover|Menu|popover] Support `resize` width or height only
5 changes: 5 additions & 0 deletions .changeset/wicked-melons-fold.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"svelte-ux": patch
---

Add `ThemeSwitch` component to toggle between light/dark theme
5 changes: 5 additions & 0 deletions .changeset/yellow-nails-vanish.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'svelte-ux': minor
---

Rename `cssVars` action to `styleVars` and do not prefix properties with `--` by default (more flexible)
6 changes: 6 additions & 0 deletions .changeset/yellow-oranges-fly.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'create-svelte-ux': minor
'svelte-ux': minor
---

Theme support
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -6,5 +6,6 @@ coverage/
.idea/
.svelte-kit/
.env
.DS_Store

test-*
11 changes: 10 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
{
"singleQuote": true,
"printWidth": 100,
"trailingComma": "es5"
"trailingComma": "es5",
"plugins": ["prettier-plugin-svelte"],
"overrides": [
{
"files": "*.svelte",
"options": {
"parser": "svelte"
}
}
]
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
![](https://img.shields.io/github/license/techniq/svelte-ux?style=flat)
[![](https://img.shields.io/github/actions/workflow/status/techniq/svelte-ux/ci.yml?style=flat)](https://github.com/techniq/svelte-ux/actions/workflows/ci.yml)
[![](https://img.shields.io/npm/v/svelte-ux?style=flat)](https://www.npmjs.com/package/svelte-ux)
![npm](https://img.shields.io/npm/dw/svelte-ux?style=flat&color=orange)
[![](https://img.shields.io/npm/dw/svelte-ux?style=flat&color=orange)](https://www.npmjs.com/package/svelte-ux)

[![](https://img.shields.io/badge/Open_in-SvelteLab-black?logo=svelte&color=%23FF3E00)](https://www.sveltelab.dev/?provider=github&owner=techniq&repo=svelte-ux&branch=main&path=%2Fpackages%2Fcreate-svelte-ux%2Ftemplates%2Fstarter) [![](https://img.shields.io/badge/Open_in-StackBlitz-black?logo=stackblitz&color=%231269D3)](https://stackblitz.com/github/techniq/svelte-ux/tree/main/packages/create-svelte-ux/templates/starter) [![](https://img.shields.io/badge/Open_in-CodeSandbox-black?logo=codesandbox&color=%23151515)](https://codesandbox.io/p/sandbox/github/techniq/svelte-ux/tree/main/packages/create-svelte-ux/templates/starter)

6 changes: 6 additions & 0 deletions packages/create-svelte-ux/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# create-svelte-ux

## 0.3.0-next.0

### Minor Changes

- Theme support ([#146](https://github.com/techniq/svelte-ux/pull/146))

## 0.2.1

### Patch Changes
8 changes: 4 additions & 4 deletions packages/create-svelte-ux/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-svelte-ux",
"version": "0.2.1",
"version": "0.3.0-next.0",
"description": "A CLI for creating new Svelte UX projects",
"repository": {
"type": "git",
@@ -18,12 +18,12 @@
},
"dependencies": {
"@clack/prompts": "^0.7.0",
"@kitql/helpers": "^0.8.3",
"@kitql/helpers": "^0.8.8",
"commander": "^11.1.0"
},
"devDependencies": {
"@types/node": "^20.9.2",
"prettier": "^3.1.0"
"@types/node": "^20.10.6",
"prettier": "^3.1.1"
},
"files": [
"fragments",
Original file line number Diff line number Diff line change
@@ -5,8 +5,8 @@
import '../app.postcss';

settings({
theme:{
AppBar: 'bg-accent-500 text-white shadow-md',
classes: {
AppBar: 'bg-primary text-white shadow-md',
AppLayout: {
nav: 'bg-neutral-800'
},
Original file line number Diff line number Diff line change
@@ -9,15 +9,15 @@
href="https://svelte-ux.techniq.dev"
target="_blank"
variant="fill-light"
color="accent"
color="primary"
>
Documentation
</Button>
<Button
href="https://svelte-ux.techniq.dev/customization"
target="_blank"
variant="fill-light"
color="accent"
color="primary"
>
Customization
</Button>
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@
<Svg>
<Axis placement="left" grid rule />
<Axis placement="bottom" format={(d) => format(d, PeriodType.Day, 'short')} rule />
<Area line={{ class: 'stroke-2 stroke-accent-500' }} class="fill-accent-500/30" />
<Area line={{ class: 'stroke-2 stroke-primary' }} class="fill-primary/30" />
<Highlight points lines />
</Svg>

Original file line number Diff line number Diff line change
@@ -9,11 +9,7 @@ const config = {
'./node_modules/layerchart/**/*.{svelte,js}'
],
theme: {
extend: {
colors: {
accent: colors.blue
}
}
extend: {}
},
variants: {
extend: {}
Original file line number Diff line number Diff line change
@@ -5,11 +5,7 @@ const svelte_ux = require('svelte-ux/plugins/tailwind.cjs');
const config = {
content: ['./src/**/*.{html,svelte}', './node_modules/svelte-ux/**/*.{svelte,js}'],
theme: {
extend: {
colors: {
accent: colors.blue
}
}
extend: {}
},
variants: {
extend: {}
Original file line number Diff line number Diff line change
@@ -5,8 +5,8 @@
import '../app.postcss';

settings({
theme:{
AppBar: 'bg-accent-500 text-white shadow-md',
classes: {
AppBar: 'bg-primary text-white shadow-md',
AppLayout: {
nav: 'bg-neutral-800'
},
Original file line number Diff line number Diff line change
@@ -9,15 +9,15 @@
href="https://svelte-ux.techniq.dev"
target="_blank"
variant="fill-light"
color="accent"
color="primary"
>
Documentation
</Button>
<Button
href="https://svelte-ux.techniq.dev/customization"
target="_blank"
variant="fill-light"
color="accent"
color="primary"
>
Customization
</Button>
Original file line number Diff line number Diff line change
@@ -5,11 +5,7 @@ const svelte_ux = require('svelte-ux/plugins/tailwind.cjs');
const config = {
content: ['./src/**/*.{html,svelte}', './node_modules/svelte-ux/**/*.{svelte,js}'],
theme: {
extend: {
colors: {
accent: colors.blue
}
}
extend: {}
},
variants: {
extend: {}
Loading