Skip to content

Commit

Permalink
feat(*): integrate zag
Browse files Browse the repository at this point in the history
  • Loading branch information
cschroeter committed Oct 18, 2024
1 parent 23212e9 commit 04b1885
Show file tree
Hide file tree
Showing 49 changed files with 838 additions and 402 deletions.
Binary file modified bun.lockb
Binary file not shown.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@
"root": "."
},
"devDependencies": {
"@biomejs/biome": "1.9.3",
"@biomejs/biome": "1.9.4",
"@types/bun": "1.1.11",
"lefthook": "1.7.18",
"turbo": "2.1.3",
"lefthook": "1.7.22",
"turbo": "2.2.0",
"typescript": "5.6.3",
"vercel": "37.8.0"
"vercel": "37.11.0"
},
"packageManager": "[email protected].30",
"packageManager": "[email protected].31",
"trustedDependencies": ["@ark-ui/website"]
}
82 changes: 41 additions & 41 deletions packages/anatomy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -458,52 +458,52 @@
},
"sideEffects": false,
"dependencies": {
"@zag-js/accordion": "0.74.2",
"@zag-js/anatomy": "0.74.2",
"@zag-js/avatar": "0.74.2",
"@zag-js/carousel": "0.74.2",
"@zag-js/checkbox": "0.74.2",
"@zag-js/clipboard": "0.74.2",
"@zag-js/collapsible": "0.74.2",
"@zag-js/color-picker": "0.74.2",
"@zag-js/color-utils": "0.74.2",
"@zag-js/combobox": "0.74.2",
"@zag-js/date-picker": "0.74.2",
"@zag-js/date-utils": "0.74.2",
"@zag-js/dialog": "0.74.2",
"@zag-js/editable": "0.74.2",
"@zag-js/file-upload": "0.74.2",
"@zag-js/hover-card": "0.74.2",
"@zag-js/menu": "0.74.2",
"@zag-js/number-input": "0.74.2",
"@zag-js/pagination": "0.74.2",
"@zag-js/pin-input": "0.74.2",
"@zag-js/popover": "0.74.2",
"@zag-js/presence": "0.74.2",
"@zag-js/progress": "0.74.2",
"@zag-js/qr-code": "0.74.2",
"@zag-js/radio-group": "0.74.2",
"@zag-js/rating-group": "0.74.2",
"@zag-js/select": "0.74.2",
"@zag-js/signature-pad": "0.74.2",
"@zag-js/slider": "0.74.2",
"@zag-js/splitter": "0.74.2",
"@zag-js/switch": "0.74.2",
"@zag-js/tabs": "0.74.2",
"@zag-js/tags-input": "0.74.2",
"@zag-js/time-picker": "0.74.2",
"@zag-js/timer": "0.74.2",
"@zag-js/toast": "0.74.2",
"@zag-js/toggle-group": "0.74.2",
"@zag-js/tooltip": "0.74.2",
"@zag-js/tree-view": "0.74.2"
"@zag-js/accordion": "0.75.0",
"@zag-js/anatomy": "0.75.0",
"@zag-js/avatar": "0.75.0",
"@zag-js/carousel": "0.75.0",
"@zag-js/checkbox": "0.75.0",
"@zag-js/clipboard": "0.75.0",
"@zag-js/collapsible": "0.75.0",
"@zag-js/color-picker": "0.75.0",
"@zag-js/color-utils": "0.75.0",
"@zag-js/combobox": "0.75.0",
"@zag-js/date-picker": "0.75.0",
"@zag-js/date-utils": "0.75.0",
"@zag-js/dialog": "0.75.0",
"@zag-js/editable": "0.75.0",
"@zag-js/file-upload": "0.75.0",
"@zag-js/hover-card": "0.75.0",
"@zag-js/menu": "0.75.0",
"@zag-js/number-input": "0.75.0",
"@zag-js/pagination": "0.75.0",
"@zag-js/pin-input": "0.75.0",
"@zag-js/popover": "0.75.0",
"@zag-js/presence": "0.75.0",
"@zag-js/progress": "0.75.0",
"@zag-js/qr-code": "0.75.0",
"@zag-js/radio-group": "0.75.0",
"@zag-js/rating-group": "0.75.0",
"@zag-js/select": "0.75.0",
"@zag-js/signature-pad": "0.75.0",
"@zag-js/slider": "0.75.0",
"@zag-js/splitter": "0.75.0",
"@zag-js/switch": "0.75.0",
"@zag-js/tabs": "0.75.0",
"@zag-js/tags-input": "0.75.0",
"@zag-js/time-picker": "0.75.0",
"@zag-js/timer": "0.75.0",
"@zag-js/toast": "0.75.0",
"@zag-js/toggle-group": "0.75.0",
"@zag-js/tooltip": "0.75.0",
"@zag-js/tree-view": "0.75.0"
},
"devDependencies": {
"@release-it/keep-a-changelog": "5.0.0",
"globby": "14.0.2",
"release-it": "17.8.2",
"release-it": "17.10.0",
"typescript": "5.6.3",
"vite": "5.4.8",
"vite": "5.4.9",
"vite-plugin-dts": "4.2.4"
}
}
129 changes: 94 additions & 35 deletions packages/react/.storybook/styles/slider.css
Original file line number Diff line number Diff line change
@@ -1,70 +1,129 @@
[data-scope='slider'][data-part='root'] {
.slider > * {
width: 100%;
}

[data-scope="slider"][data-part="root"] {
max-width: 320px;
width: 100%;
display: flex;
flex-direction: column;
gap: 8px;
}

[data-scope='slider'][data-part='control'] {
position: relative;
[data-scope="slider"][data-part="root"][data-orientation="vertical"] {
height: 240px;
}

[data-scope="slider"][data-part="control"] {
--slider-thumb-size: 20px;
--slider-track-height: 4px;
display: flex;
align-items: center;
justify-content: center;
position: relative;
}

[data-scope="slider"][data-part="control"][data-orientation="horizontal"] {
height: var(--slider-thumb-size);
}

[data-scope="slider"][data-part="control"][data-orientation="vertical"] {
width: var(--slider-thumb-size);
}

[data-scope="slider"][data-part="thumb"] {
all: unset;
width: var(--slider-thumb-size);
height: var(--slider-thumb-size);
border-radius: 999px;
background: white;
box-shadow: rgba(0, 0, 0, 0.14) 0px 2px 10px;
}

[data-scope="slider"][data-part="thumb"]:focus-visible {
box-shadow: rgb(0 0 0 / 22%) 0px 0px 0px 5px;
}

[data-scope="slider"][data-part="thumb"]:hover:not([data-disabled]) {
background-color: rgb(245, 242, 255);
}

[data-scope="slider"][data-part="thumb"][data-disabled] {
background-color: lightgray;
}

[data-scope="slider"] .control-area {
margin-top: 12px;
display: flex;
}

[data-scope='slider'][data-part='control'][data-orientation='vertical'] {
height: 20rem;
width: 8px;
.slider [data-orientation="horizontal"] .control-area {
flex-direction: column;
width: 100%;
}

[data-scope='slider'][data-part='track'] {
background: silver;
height: 8px;
flex: 1;
.slider [data-orientation="vertical"] .control-area {
flex-direction: row;
height: 100%;
}

[data-scope='slider'][data-part='track'][data-orientation='horizontal'] {
height: 8px;
[data-scope="slider"][data-part="track"] {
background: rgba(0, 0, 0, 0.2);
border-radius: 9999px;
}

[data-scope='slider'][data-part='track'][data-orientation='vertical'] {
width: 8px;
[data-scope="slider"][data-part="track"][data-orientation="horizontal"] {
height: var(--slider-track-height);
width: 100%;
}

[data-scope='slider'][data-part='range'] {
background: orange;
[data-scope="slider"][data-part="track"][data-orientation="vertical"] {
height: 100%;
width: var(--slider-track-height);
}

[data-scope='slider'][data-part='range'][data-orientation='horizontal'] {
height: inherit;
[data-scope="slider"][data-part="range"] {
background: magenta;
border-radius: inherit;
}

[data-scope='slider'][data-part='range'][data-orientation='vertical'] {
width: inherit;
[data-scope="slider"][data-part="range"][data-disabled] {
background: rgba(0, 0, 0, 0.4);
}

[data-scope='slider'][data-part='thumb'] {
background: blue;
width: 20px;
height: 20px;
border-radius: 999px;
[data-scope="slider"][data-part="range"][data-orientation="horizontal"] {
height: 100%;
}

[data-scope='slider'][data-part='marker-group'] {
height: 10rem;
[data-scope="slider"][data-part="range"][data-orientation="vertical"] {
width: 100%;
}

[data-scope='slider'][data-part='marker'] {
color: gray;
[data-scope="slider"][data-part="value-text"] {
margin-inline-start: 12px;
}

[data-scope='slider'][data-part='marker'][data-state='under-value'] {
color: blue;
[data-scope="slider"][data-part="marker-group"][data-orientation="vertical"] {
height: 100%;
}

[data-scope='slider'][data-part='marker'][data-state='at-value'] {
color: green;
[data-scope="slider"][data-part="marker"] {
color: lightgray;
}

[data-scope='slider'][data-part='marker'][data-state='over-value'] {
[data-scope="slider"][data-part="marker"]:is([data-state="under-value"], [data-state="at-value"]) {
color: red;
}

[data-scope="slider"][data-part="dragging-indicator"] {
background: magenta;
border-radius: 4px;
padding: 2px 4px;
color: white;
&[data-orientation="horizontal"] {
top: calc(var(--slider-thumb-size) + 8px);
}

&[data-orientation="vertical"] {
left: calc(var(--slider-thumb-size) + 8px);
}
}
Loading

0 comments on commit 04b1885

Please sign in to comment.