Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
d436bc3
feat(slider!): slider core tokens (CSS-177)
mlogsdon18 Mar 21, 2023
0d6ba90
chore(slider): manual version bump for beta release
pfulton Nov 28, 2022
d04cbec
feat: pr feedback around soft-coding
bernhard-adobe Nov 29, 2022
0150cf9
feat: setting border radii an var correction
bernhard-adobe Nov 30, 2022
b70587b
feat: upping core vars to 5.0.0
bernhard-adobe Nov 30, 2022
4ad3949
feat: core-tokens 5.0.0 line-height fix
bernhard-adobe Nov 30, 2022
c5cd126
feat: addressing PR feedback
bernhard-adobe Dec 6, 2022
35960c9
feat: adjusting high contrast mode colors
bernhard-adobe Dec 7, 2022
9dd3b19
feat: rounding corners
bernhard-adobe Dec 7, 2022
467d01a
feat: high contrast slider tick
bernhard-adobe Dec 8, 2022
33fcc67
feat: minor test removal
bernhard-adobe Dec 8, 2022
80e5c93
feat: border rings for slider
bernhard-adobe Dec 8, 2022
f82fc6a
feat: correct border token for down + ramp high contrast color
bernhard-adobe Dec 9, 2022
4598f5f
feat: make tick slider handles align to ticks (follow up on #1289)
bernhard-adobe Dec 14, 2022
8d4ddb4
feat: slider tick position
bernhard-adobe Dec 20, 2022
093e0c5
feat: border-width down change (follow up on #1154)
bernhard-adobe Jan 11, 2023
1a321e8
feat: fill color for handle, variant ramp and ticks (from #1154)
bernhard-adobe Jan 11, 2023
c8410f6
feat: border-width adjustment for handle-down
bernhard-adobe Jan 12, 2023
4bb2b81
feat: removing commented out width calculations
bernhard-adobe Jan 12, 2023
05e271c
feat: widths, top, height in sizes and starts
bernhard-adobe Jan 23, 2023
12fe7fc
feat: sizing widths and heights, including animations
bernhard-adobe Jan 23, 2023
eadc91c
feat: remove double-mods and contrast mods
bernhard-adobe Jan 24, 2023
fe5b0e7
feat: use t-shirt sized handle size, move ramp forced colors bottom, …
bernhard-adobe Jan 25, 2023
5d86946
feat: high contrast feedback
bernhard-adobe Jan 25, 2023
6009b95
feat: custom vars for ticks
bernhard-adobe Jan 25, 2023
dd8b6ed
feat: t-shirt size default
bernhard-adobe Jan 26, 2023
b3ecbac
feat: correct 32px height
bernhard-adobe Jan 27, 2023
da4d4ac
feat: high-contrast mode simplifications
bernhard-adobe Jan 27, 2023
99d2a75
feat: slider control height now 16px
bernhard-adobe Jan 30, 2023
6832d1d
feat: adding margin to the bottom of handle
bernhard-adobe Jan 30, 2023
9028ffe
feat: more control spacing for tick-variant
bernhard-adobe Jan 31, 2023
15e2d83
feat: cjk rename
bernhard-adobe Feb 2, 2023
cc0ff5c
feat: updated label margin
bernhard-adobe Feb 2, 2023
c260f78
feat: slider label block-end margins via design update
bernhard-adobe Feb 3, 2023
7255a46
feat: 80px removal
bernhard-adobe Feb 3, 2023
11f4b99
feat: disabled tick-mark colors use disabled background-color token.
bernhard-adobe Feb 3, 2023
55696eb
feat: setting slider tick marks and label
bernhard-adobe Feb 4, 2023
8529c61
fix(slider): disabled tick label color
lunarfusion Feb 6, 2023
a6155a7
fix(slider): refactor without :has
lunarfusion Feb 6, 2023
5daf116
chore(slider): use latest tokens dependency
pfulton Feb 6, 2023
eb37727
chore(slider): manual version bump for beta release
pfulton Feb 6, 2023
3f544c0
fix(slider): resolve malformed CSS
pfulton Feb 6, 2023
f16b838
fix(slider): resolve malformed syntax
pfulton Feb 6, 2023
7a54cda
style(slider): add cursor pointer
mlogsdon18 Mar 21, 2023
4e90e30
chore(slider): remove unneeded classes and add headings to docs
mlogsdon18 Mar 21, 2023
3e9f549
feat: update tokens package and added new tokens for bottom-to-text
mlogsdon18 Mar 21, 2023
1b38974
refactor(slider): adding in updated tokens and label sizing to docs
mlogsdon18 Mar 21, 2023
22f22d8
feat(slider): add gradient story
mlogsdon18 Mar 22, 2023
d0f00a0
docs(slider): added range variant instructions for three handles
mlogsdon18 Mar 22, 2023
4df58ae
chore(slider): add todos for tokens still needed
mlogsdon18 Mar 22, 2023
96521a4
chore(slider): manual prerelease bump
castastrophe Mar 27, 2023
e1460a5
fix(slider): remove unneeded css
mlogsdon18 Mar 28, 2023
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
2 changes: 1 addition & 1 deletion components/slider/gulpfile.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require('@spectrum-css/component-builder');
module.exports = require('@spectrum-css/component-builder-simple');
626 changes: 453 additions & 173 deletions components/slider/index.css

Large diffs are not rendered by default.

196 changes: 161 additions & 35 deletions components/slider/metadata/slider.yml

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions components/slider/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@spectrum-css/slider",
"version": "3.1.17",
"version": "4.0.0-beta.5",
"description": "The Spectrum CSS slider component",
"license": "Apache-2.0",
"author": "Adobe",
Expand All @@ -18,11 +18,13 @@
"build": "gulp"
},
"peerDependencies": {
"@spectrum-css/vars": "^8.0.0"
"@spectrum-css/stepper": "^4.0.1",
"@spectrum-css/tokens": "^7.6.0"
},
"devDependencies": {
"@spectrum-css/component-builder": "^4.0.3",
"@spectrum-css/vars": "^8.0.5",
"@spectrum-css/component-builder-simple": "^2.0.0",
"@spectrum-css/stepper": "^4.0.1",
"@spectrum-css/tokens": "^7.6.0",
"gulp": "^4.0.0"
},
"publishConfig": {
Expand Down
206 changes: 0 additions & 206 deletions components/slider/skin.css

This file was deleted.

9 changes: 9 additions & 0 deletions components/slider/stories/slider.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,3 +159,12 @@ Disabled.args = {
...Default.args,
isDisabled: true,
};

export const Gradient = Template.bind({});
Gradient.args = {
...Default.args,
style: {
"--spectrum-slider-track-color": "linear-gradient(to right, red, green 100%)",
"--spectrum-slider-track-color-rtl": "linear-gradient(to left, red, green 100%)"
}
}
11 changes: 6 additions & 5 deletions components/slider/stories/template.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { ifDefined } from "lit-html/directives/if-defined.js";
import { useArgs, useGlobals } from "@storybook/client-api";

import "../index.css";
import "../skin.css";

export const Template = ({
rootClass = "spectrum-Slider",
Expand All @@ -16,11 +15,12 @@ export const Template = ({
step = 2,
values = [],
variant,
fillColor,
fillColor = "rgb(213, 213, 213)",
showTicks = false,
isDisabled = false,
isFocused = false,
customClasses = [],
style = {},
id,
// ...globals
}) => {
Expand Down Expand Up @@ -52,6 +52,7 @@ export const Template = ({
style=${ifDefined(styleMap({
[rtl ? 'right' : 'left']: position ? `${position}%` : undefined,
width: width ? `${width}%` : undefined,
...style
}))}
></div>`;
};
Expand Down Expand Up @@ -107,10 +108,10 @@ export const Template = ({
...customClasses.reduce((a, c) => ({ ...a, [c]: true }), {}),
})}
id=${ifDefined(id)}
style=${ifDefined(styleMap({
style=${styleMap({
maxWidth: `var(--spectrum-global-dimension-size-3000)`,
['--spectrum-slider-m-track-fill-color']: fillColor,
}))}
['--spectrum-slider-track-color']: fillColor,
})}
role=${ifDefined(values.length > 1 ? "group" : undefined)}
aria-labelledby=${ifDefined(label && id ? `${id}-label` : undefined)}>

Expand Down
35 changes: 35 additions & 0 deletions components/slider/themes/express.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
Copyright 2023 Adobe. All rights reserved.
This file is licensed to you under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. You may obtain a copy
of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
OF ANY KIND, either express or implied. See the License for the specific language
governing permissions and limitations under the License.
*/

@container (--system: express) {
.spectrum-Slider {

--spectrum-slider-margin-top-offset: -6px;
--spectrum-slider-track-color: var(--spectrum-gray-200);
--spectrum-slider-track-fill-color: var(--spectrum-gray-600);
--spectrum-slider-ramp-track-color: var(--spectrum-gray-300);
--spectrum-slider-ramp-track-color-disabled: var(--spectrum-gray-200);

--spectrum-slider-handle-background-color: var(--spectrum-gray-50);
--spectrum-slider-handle-background-color-disabled: var(--spectrum-gray-50);
--spectrum-slider-ramp-handle-background-color: var(--spectrum-gray-50);
--spectrum-slider-ticks-handle-background-color: var(--spectrum-gray-50);
--spectrum-slider-handle-border-color: var(--spectrum-gray-800);
--spectrum-slider-handle-disabled-background-color: var(--spectrum-gray-50);

--spectrum-slider-tick-mark-color: var(--spectrum-gray-200);

--spectrum-slider-handle-border-color-hover: var(--spectrum-gray-900);
--spectrum-slider-handle-border-color-down: var(--spectrum-gray-900);
--spectrum-slider-handle-border-color-key-focus: var(--spectrum-gray-900);
--spectrum-slider-handle-focus-ring-color-key-focus: var(--spectrum-focus-indicator-color);
}
}
37 changes: 37 additions & 0 deletions components/slider/themes/spectrum.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
Copyright 2023 Adobe. All rights reserved.
This file is licensed to you under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. You may obtain a copy
of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
OF ANY KIND, either express or implied. See the License for the specific language
governing permissions and limitations under the License.
*/

@container (--system: spectrum) {
.spectrum-Slider {


--spectrum-slider-margin-top-offset: 0px;

--spectrum-slider-track-color: var(--spectrum-gray-300);
--spectrum-slider-track-fill-color: var(--spectrum-gray-700);
--spectrum-slider-ramp-track-color: var(--spectrum-gray-400);
--spectrum-slider-ramp-track-color-disabled: var(--spectrum-gray-200);

--spectrum-slider-handle-background-color: transparent;
--spectrum-slider-handle-background-color-disabled: transparent;
--spectrum-slider-ramp-handle-background-color: var(--spectrum-gray-100);
--spectrum-slider-ticks-handle-background-color: var(--spectrum-gray-100);
--spectrum-slider-handle-border-color: var(--spectrum-gray-700);
--spectrum-slider-handle-disabled-background-color: var(--spectrum-gray-100);

--spectrum-slider-tick-mark-color: var(--spectrum-gray-300);

--spectrum-slider-handle-border-color-hover: var(--spectrum-gray-800);
--spectrum-slider-handle-border-color-down: var(--spectrum-gray-800);
--spectrum-slider-handle-border-color-key-focus: var(--spectrum-gray-800);
--spectrum-slider-handle-focus-ring-color-key-focus: var(--spectrum-focus-indicator-color);
}
}
5 changes: 5 additions & 0 deletions components/tokens/custom-spectrum/custom-large-vars.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ governing permissions and limitations under the License.

--spectrum-slider-tick-mark-height: 13px;
--spectrum-slider-ramp-track-height: 20px;
--spectrum-slider-label-margin-block-end: 10px;

--spectrum-colorwheel-path: "M 119 119 m -119 0 a 119 119 0 1 0 238 0 a 119 119 0 1 0 -238 0.2 M 119 119 m -91 0 a 91 91 0 1 0 182 0 a 91 91 0 1 0 -182 0";
--spectrum-colorwheel-path-borders: "M 120 120 m -120 0 a 120 120 0 1 0 240 0 a 120 120 0 1 0 -240 0.2 M 120 120 m -90 0 a 90 90 0 1 0 180 0 a 90 90 0 1 0 -180 0";
Expand All @@ -45,4 +46,8 @@ governing permissions and limitations under the License.
--spectrum-menu-item-checkmark-width-extra-large: 16px;

--spectrum-rating-icon-spacing: var(--spectrum-spacing-100);
--spectrum-slider-label-margin-block-end-small: -6px;
--spectrum-slider-label-margin-block-end-medium: -10px;
--spectrum-slider-label-margin-block-end-large: -14px;
--spectrum-slider-label-margin-block-end-extra-large: -17px;
}
5 changes: 5 additions & 0 deletions components/tokens/custom-spectrum/custom-medium-vars.css
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,9 @@ governing permissions and limitations under the License.
--spectrum-menu-item-checkmark-width-extra-large: 14px;

--spectrum-rating-icon-spacing: var(--spectrum-spacing-75);
--spectrum-slider-label-margin-block-end: 8px;
--spectrum-slider-label-margin-block-end-small: -5px;
--spectrum-slider-label-margin-block-end-medium: -8px;
--spectrum-slider-label-margin-block-end-large: -11px;
--spectrum-slider-label-margin-block-end-extra-large: -14px;
}
Loading