diff --git a/components/Author.vue b/components/Author.vue index 377b74b7f..c9b5ecec8 100644 --- a/components/Author.vue +++ b/components/Author.vue @@ -100,7 +100,7 @@ /> - + diff --git a/components/FollowButton.vue b/components/FollowButton.vue index 04818dc94..3540726d2 100644 --- a/components/FollowButton.vue +++ b/components/FollowButton.vue @@ -4,7 +4,7 @@ :loading="loading" icon="plus" primary - full-width + fullwidth @click.prevent="follow" > Folgen diff --git a/pages/login.vue b/pages/login.vue index bb065f8c9..36829e0ee 100644 --- a/pages/login.vue +++ b/pages/login.vue @@ -17,7 +17,7 @@ @@ -70,7 +70,7 @@
@@ -85,6 +86,7 @@ ${code} border: $border-size-base solid $border-color-softer; padding: $space-base; margin-bottom: $space-small; + overflow: visible; .vuep-iframe & { padding: 0; @@ -163,4 +165,4 @@ $codemirror-primary: $color-primary; color: $text-color-softer; } } - + \ No newline at end of file diff --git a/styleguide/src/styleguide/components/ComponentDoc.vue b/styleguide/src/styleguide/components/ComponentDoc.vue index 12e6109f0..5ec16ab66 100644 --- a/styleguide/src/styleguide/components/ComponentDoc.vue +++ b/styleguide/src/styleguide/components/ComponentDoc.vue @@ -95,10 +95,11 @@ export default { }) }, docParts() { - if (!this.component.docs) { + const component = this.component.component + if (!component.__docs) { return [] } - const parts = this.component.docs.split('```') + const parts = component.__docs.split('```') let i = 0 const parsed = parts.reduce((result, part, index) => { if (index % 2 === 0) { diff --git a/styleguide/src/styleguide/components/ComponentOptionsDoc.vue b/styleguide/src/styleguide/components/ComponentOptionsDoc.vue index 87e82f1ad..9c262a474 100644 --- a/styleguide/src/styleguide/components/ComponentOptionsDoc.vue +++ b/styleguide/src/styleguide/components/ComponentOptionsDoc.vue @@ -2,44 +2,99 @@
{{ component.name | componentName }} Props - - - - @@ -57,8 +112,7 @@ export default { return { propFields: { name: { - label: 'Name', - width: '20%' + label: 'Name' }, type: { label: 'Type', @@ -67,8 +121,7 @@ export default { default: { label: 'Default', width: '20%' - }, - description: 'Description' + } }, slotFields: { name: { @@ -91,34 +144,68 @@ export default { if (!this.component.props) { return null } - return Object.keys(this.component.props).map(name => { - return { - name, - ...this.component.props[name] - } - }) + return Object.keys(this.component.props) + .map(name => { + return this.getPropAttributes(name, this.component.props[name]) + }) + .sort((a, b) => { + return a.name.localeCompare(b.name) + }) }, componentSlots() { if (!this.component.slots) { return null } - return Object.keys(this.component.slots).map(name => { - return { - name: (name.match(/[^/"\\]+/g) || []).join(''), - ...this.component.slots[name] - } - }) + return Object.keys(this.component.slots) + .map(name => { + return { + name: (name.match(/[^/"\\]+/g) || []).join(''), + ...this.component.slots[name] + } + }) + .sort((a, b) => { + return a.name.localeCompare(b.name) + }) }, componentEvents() { if (!this.component.events) { return null } - return Object.keys(this.component.events).map(name => { - return { - name, - ...this.component.events[name] - } - }) + return Object.keys(this.component.events) + .map(name => { + return { + name, + ...this.component.events[name] + } + }) + .sort((a, b) => { + return a.name.localeCompare(b.name) + }) + } + }, + methods: { + getPropAttributes(name, oldAttributes) { + const attributes = { + name, + ...oldAttributes, + ...this.getAttributesFromComment(oldAttributes.comment) + } + if (attributes.type && attributes.type.name) { + attributes.types = attributes.type.name.split('|') + } + return attributes + }, + getAttributesFromComment(comment) { + const attributes = {} + const optionsMatch = comment.match(/@options[ ]+(\S[ \S]*)\n/) + if (optionsMatch) { + attributes.options = optionsMatch[1].split('|') + } + const defaultMatch = comment.match(/@default[ ]+(\S[ \S]*)\n/) + if (defaultMatch) { + attributes.default = defaultMatch[1] + } + return attributes } } } diff --git a/styleguide/src/styleguide/components/Navigation.vue b/styleguide/src/styleguide/components/Navigation.vue index 3935d9403..2cbdfedf0 100644 --- a/styleguide/src/styleguide/components/Navigation.vue +++ b/styleguide/src/styleguide/components/Navigation.vue @@ -1,5 +1,12 @@ @@ -21,6 +21,5 @@ export default { } - diff --git a/styleguide/src/system/components/data-input/FormItem/InputError.vue b/styleguide/src/system/components/data-input/FormItem/InputError.vue old mode 100755 new mode 100644 diff --git a/styleguide/src/system/components/data-input/FormItem/InputLabel.vue b/styleguide/src/system/components/data-input/FormItem/InputLabel.vue old mode 100755 new mode 100644 diff --git a/styleguide/src/system/components/data-input/FormItem/style.scss b/styleguide/src/system/components/data-input/FormItem/style.scss old mode 100755 new mode 100644 diff --git a/styleguide/src/system/components/data-input/Input/Input.vue b/styleguide/src/system/components/data-input/Input/Input.vue index 22b7cbb42..6fb3d6eca 100755 --- a/styleguide/src/system/components/data-input/Input/Input.vue +++ b/styleguide/src/system/components/data-input/Input/Input.vue @@ -13,7 +13,7 @@ iconRight && `ds-input-has-icon-right` ]" :id="id" - :name="name" + :name="name ? name : model" :type="type" :autofocus="autofocus" :placeholder="placeholder" @@ -48,7 +48,8 @@ export default { mixins: [inputMixin], props: { /** - * The type of this input `url, text, password, email, search, textarea`. + * The type of this input. + * @options url|text|password|email|search|textarea */ type: { type: String, @@ -64,13 +65,6 @@ export default { type: String, default: null }, - /** - * The name of the field for better accessibility - */ - name: { - type: String, - default: null - }, /** * Whether the input should be automatically focused */ @@ -78,13 +72,6 @@ export default { type: Boolean, default: false }, - /** - * Whether the input should be read-only - */ - readonly: { - type: Boolean, - default: false - }, /** * How many rows this input should have (only for type="textarea") */ diff --git a/styleguide/src/system/components/data-input/Input/demo.md b/styleguide/src/system/components/data-input/Input/demo.md old mode 100755 new mode 100644 diff --git a/styleguide/src/system/components/data-input/Input/style.scss b/styleguide/src/system/components/data-input/Input/style.scss old mode 100755 new mode 100644 diff --git a/styleguide/src/system/components/data-input/Radio/Radio.vue b/styleguide/src/system/components/data-input/Radio/Radio.vue new file mode 100644 index 000000000..06524f98d --- /dev/null +++ b/styleguide/src/system/components/data-input/Radio/Radio.vue @@ -0,0 +1,123 @@ + + + + + + + diff --git a/styleguide/src/system/components/data-input/Radio/demo.md b/styleguide/src/system/components/data-input/Radio/demo.md new file mode 100644 index 000000000..7f9c8f59c --- /dev/null +++ b/styleguide/src/system/components/data-input/Radio/demo.md @@ -0,0 +1,74 @@ +## Basic usage + +``` + +``` + +## Usage with label + +``` + +``` + +## Bind to a value + +Use v-model to bind a value to the select input. + +``` + + +``` + +## Style variations + +``` + +``` + +## Validation + +We use async-validator schemas for validation. + +If you need to validate more than one field it is better to use the form component. + +``` + + +``` diff --git a/styleguide/src/system/components/data-input/Radio/style.scss b/styleguide/src/system/components/data-input/Radio/style.scss new file mode 100644 index 000000000..39c4a8c29 --- /dev/null +++ b/styleguide/src/system/components/data-input/Radio/style.scss @@ -0,0 +1,56 @@ +.ds-radio { + outline: none; + + .ds-input-is-disabled &, + &:disabled { + color: $text-color-disabled; + opacity: $opacity-disabled; + pointer-events: none; + cursor: not-allowed; + } +} + +.ds-radio-option { + &:not(.ds-button) { + @include inline-space($space-small); + } + display: inline-flex; + align-items: center; + cursor: pointer; + user-select: none; +} + +.ds-radio-option-mark { + display: inline-block; + position: relative; + width: $font-size-base; + height: $font-size-base; + border: $input-border-size solid $border-color-base; + background-color: $background-color-base; + border-radius: $border-radius-circle; + margin-right: $space-xx-small; + + &:before { + position: absolute; + content: ''; + top: 50%; + left: 50%; + transform: translateY(-50%) translateX(-50%) scale(0); + opacity: 0; + width: $font-size-x-small; + height: $font-size-x-small; + border-radius: $border-radius-circle; + background-color: $text-color-primary; + transition: all $duration-short $ease-in-sharp; + + .ds-radio-option-is-selected & { + opacity: 1; + transform: translateY(-50%) translateX(-50%) scale(1); + } + } +} + +.ds-radio-option-label { + font-size: $font-size-base; + cursor: pointer; +} \ No newline at end of file diff --git a/styleguide/src/system/components/data-input/Select/Select.vue b/styleguide/src/system/components/data-input/Select/Select.vue index e615dd6ea..382e328d1 100755 --- a/styleguide/src/system/components/data-input/Select/Select.vue +++ b/styleguide/src/system/components/data-input/Select/Select.vue @@ -2,8 +2,12 @@
+ :key="value[labelProp] || value"> - {{ value }} + color="primary" + :size="size"> + {{ value[labelProp] || value }}
+ + + {{ innerValue[labelProp] || innerValue }} +
{{ placeholder }}
- - - {{ innerValue }} -
-
    +
    + {{ noOptionsAvailable }} +
    +
    + {{ noOptionsFound }} "{{ searchString }}" +
    +
    • + :key="option[labelProp] || option"> - {{ option.label || option }} + {{ option[labelProp] || option }}
    @@ -132,7 +151,7 @@ import DsChip from '@@/components/typography/Chip/Chip' import DsIcon from '@@/components/typography/Icon/Icon' /** - * Used for handling basic user input. + * Used for letting the user choose values from a set of options. * @version 1.0.0 */ export default { @@ -149,7 +168,8 @@ export default { data() { return { searchString: '', - pointer: 0 + pointer: 0, + isOpen: false } }, props: { @@ -167,13 +187,6 @@ export default { type: Boolean, default: false }, - /** - * Whether the input should be read-only - */ - readonly: { - type: Boolean, - default: false - }, /** * The name of the input's icon. */ @@ -197,12 +210,33 @@ export default { return [] } }, + /** + * The prop to use as the label when options are objects + */ + labelProp: { + type: String, + default: 'label' + }, /** * Whether the options are searchable */ searchable: { type: Boolean, default: true + }, + /** + * Message to show when no options are available + */ + noOptionsAvailable: { + type: String, + default: 'No options available.' + }, + /** + * Message to show when the search result is empty + */ + noOptionsFound: { + type: String, + default: 'No options found for:' } }, computed: { @@ -249,13 +283,22 @@ export default { resetSearch() { this.searchString = '' }, - handleClick() { + openAndFocus() { + this.open() if (!this.focus || this.multiple) { this.$refs.search.focus() this.handleFocus() } }, + open() { + this.resetSearch() + this.isOpen = true + }, close() { + this.isOpen = false + }, + closeAndBlur() { + this.close() this.$refs.search.blur() this.handleBlur() }, @@ -269,6 +312,20 @@ export default { this.deselectOption(this.innerValue.length - 1) } }, + handleKeyUp() { + if (!this.isOpen) { + this.open() + return + } + this.pointerPrev() + }, + handleKeyDown() { + if (!this.isOpen) { + this.open() + return + } + this.pointerNext() + }, setPointer(index) { this.pointer = index }, diff --git a/styleguide/src/system/components/data-input/Select/__snapshots__/spec.js.snap b/styleguide/src/system/components/data-input/Select/__snapshots__/spec.js.snap old mode 100755 new mode 100644 diff --git a/styleguide/src/system/components/data-input/Select/demo.md b/styleguide/src/system/components/data-input/Select/demo.md old mode 100755 new mode 100644 index c80c9c391..1eae59135 --- a/styleguide/src/system/components/data-input/Select/demo.md +++ b/styleguide/src/system/components/data-input/Select/demo.md @@ -65,7 +65,7 @@ Use the multiple prop to allow the user selecting multiple values. ## Options as objects -Options can be objects with a label and a value property. +Options can be objects. You can define which property to show as the label by defining label-prop. Defaults to "label". ``` + + + + \ No newline at end of file diff --git a/styleguide/src/system/components/layout/Spinner/demo.md b/styleguide/src/system/components/layout/Spinner/demo.md new file mode 100644 index 000000000..dd47915c0 --- /dev/null +++ b/styleguide/src/system/components/layout/Spinner/demo.md @@ -0,0 +1,21 @@ +## Spinning loading indicator + +Multiple sizes + +```html + + + + + +``` + +Inverse color + +```html + + + + + +``` \ No newline at end of file diff --git a/styleguide/src/system/components/layout/Spinner/style.scss b/styleguide/src/system/components/layout/Spinner/style.scss new file mode 100644 index 000000000..9aa1b2c78 --- /dev/null +++ b/styleguide/src/system/components/layout/Spinner/style.scss @@ -0,0 +1,59 @@ +.ds-spinner { + $scale: 40px; + + animation: rotate 16s linear infinite; + position: relative; + display: inline-block; + width: $scale; + height: $scale; + + & .path { + stroke: $text-color-soft; + stroke-linecap: round; + animation: dash 1.5s ease-in-out infinite; + } + &.ds-spinner-inverse .path { + stroke: $color-primary-inverse; + } + &.ds-spinner-primary .path { + stroke: $text-color-primary; + } + &.ds-spinner-secondary .path { + stroke: $text-color-secondary; + } + &.ds-spinner-danger .path { + stroke: $text-color-danger; + } + + &.ds-size-small { + width: $scale * 0.5; + height: $scale * 0.5; + } + &.ds-size-large { + width: $scale * 1.5; + height: $scale * 1.5; + } + +} + +@keyframes rotate { + 100% { + transform: rotate(2160deg); + } +} + +@keyframes dash { + 0% { + stroke-dasharray: 1, 150; + stroke-dashoffset: 0; + } + 50% { + stroke-dasharray: 90, 150; + stroke-dashoffset: -35; + } + 100% { + stroke-dasharray: 90, 150; + stroke-dashoffset: -124; + } +} + diff --git a/styleguide/src/system/components/navigation/Button/Button.vue b/styleguide/src/system/components/navigation/Button/Button.vue index d806a9d6e..10daf3a89 100644 --- a/styleguide/src/system/components/navigation/Button/Button.vue +++ b/styleguide/src/system/components/navigation/Button/Button.vue @@ -10,26 +10,28 @@ ghost && `ds-button-ghost`, iconOnly && `ds-button-icon-only`, hover && `ds-button-hover`, - fullWidth && `ds-button-full-width`, - loading && `ds-button-loading` + fullwidth && `ds-button-fullwidth`, + loading && `ds-button-loading`, + right && `ds-button-right` ]" :name="name" v-bind="bindings" :is="linkTag"> - - - - - - +
    + + + + +
    + @@ -130,16 +132,16 @@ export default { default: null }, /** - * The name of the buttons right icon. + * Put the icon to the right. */ - iconRight: { - type: String, - default: null + right: { + type: Boolean, + default: false }, /** * Should the button spread to the full with of the parent? */ - fullWidth: { + fullwidth: { type: Boolean, default: false }, @@ -166,7 +168,7 @@ export default { return bindings }, iconOnly() { - return !this.$slots.default && this.icon && !this.iconRight + return !this.$slots.default && this.icon } }, methods: { diff --git a/styleguide/src/system/components/navigation/Button/demo.md b/styleguide/src/system/components/navigation/Button/demo.md index 5e1b0f4ae..b98278dc8 100644 --- a/styleguide/src/system/components/navigation/Button/demo.md +++ b/styleguide/src/system/components/navigation/Button/demo.md @@ -4,7 +4,7 @@ Use a primary button to draw the users attention to important actions. Use defau A danger button should be used only for destructive actions. -``` +```html Default Primary Secondary @@ -15,7 +15,7 @@ A danger button should be used only for destructive actions. Use a ghost button for secondary actions. -``` +```html Default Primary Secondary @@ -26,7 +26,7 @@ Use a ghost button for secondary actions. Use different sizes to create hierarchy. -``` +```html Small Base Large @@ -35,15 +35,15 @@ Use different sizes to create hierarchy. ## Button full width -``` -Full Width +```html +Full Width ``` ## Button states A button can take different states. -``` +```html Default state Disabled state Hover state @@ -54,9 +54,9 @@ A button can take different states. Add an icon to a button to help the user identify the button's action. -``` -Click me -Click me +```html +Click me +Click me ``` @@ -65,7 +65,7 @@ Add an icon to a button to help the user identify the button's action. Provide a path to the button. You can pass a url string or a Vue router path object. -``` +```html Click me Click me ``` diff --git a/styleguide/src/system/components/navigation/Button/style.scss b/styleguide/src/system/components/navigation/Button/style.scss index 2646719e3..d125c6592 100644 --- a/styleguide/src/system/components/navigation/Button/style.scss +++ b/styleguide/src/system/components/navigation/Button/style.scss @@ -37,10 +37,25 @@ border-radius: $border-radius-base; // box-shadow: $box-shadow-inset; opacity: 0; - visiblity: hidden; + visibility: hidden; pointer-events: none; } + &:after { + position: absolute; + content: ''; + top: 1px; + left: 1px; + right: 1px; + bottom: 1px; + border-radius: $border-radius-base; + border: 1px dotted currentColor; + opacity: 0; + visibility: hidden; + pointer-events: none; + transition: all $duration-short $ease-out; + } + &:focus { outline: none; } @@ -181,7 +196,8 @@ padding: 0; border-radius: $border-radius-rounded; - &:before { + &:before, + &:after { border-radius: $border-radius-rounded; } @@ -202,17 +218,49 @@ line-height: inherit; display: inline-block; white-space: nowrap; - margin: 0 $font-space-small; - - &:first-child { - margin-left: 0; - } - - &:last-child { - margin-right: 0; - } } -.ds-button-full-width { +.ds-button-fullwidth { width: 100%; } + +.ds-button-wrap { + transition: opacity 150ms ease-in-out; + display: flex; + align-items: center; + + & > * { + margin: 0 $font-space-small; + } + & > *:first-child { + margin-left: 0; + } + & > *:last-child { + margin-right: 0; + } + + .ds-button-loading & { + opacity: 0.1; + } +} + +.ds-button-right > .ds-button-wrap { + & > *:first-child { + margin-right: 0; + margin-left: $font-space-small; + } + & > *:last-child { + margin-right: 0; + margin-left: 0; + } +} + +.ds-button-right .ds-button-wrap { + flex-flow: row-reverse; +} + +.ds-button .ds-spinner { + position: absolute; + width: 60% !important; + height: 60% !important; +} diff --git a/styleguide/src/system/components/navigation/Menu/MenuItem.vue b/styleguide/src/system/components/navigation/Menu/MenuItem.vue index 0926d0803..83ce8fa2c 100644 --- a/styleguide/src/system/components/navigation/Menu/MenuItem.vue +++ b/styleguide/src/system/components/navigation/Menu/MenuItem.vue @@ -14,10 +14,6 @@ - + class="ds-chip-close" + tabindex="-1"> diff --git a/styleguide/src/system/components/typography/Chip/demo.md b/styleguide/src/system/components/typography/Chip/demo.md old mode 100755 new mode 100644 diff --git a/styleguide/src/system/components/typography/Chip/style.scss b/styleguide/src/system/components/typography/Chip/style.scss old mode 100755 new mode 100644 index f1f96abb7..c8660333d --- a/styleguide/src/system/components/typography/Chip/style.scss +++ b/styleguide/src/system/components/typography/Chip/style.scss @@ -6,11 +6,16 @@ font-family: $font-family-text; line-height: $line-height-base; padding: $space-xx-small $space-x-small; + margin-right: $font-space-xx-small; border-radius: $border-radius-base; font-weight: $font-weight-bold; color: $text-color-base; background-color: $background-color-softest; + &:last-child { + margin-right: 0; + } + &.ds-chip-removable { padding-right: $space-x-small + $space-small; } @@ -47,14 +52,19 @@ .ds-chip-size-base { font-size: $font-size-small; + padding-left: $space-small * 0.9; + padding-right: $space-small * 0.9; } .ds-chip-size-small { font-size: $font-size-x-small; + padding: $space-xxx-small $space-x-small * 1.2; } .ds-chip-size-large { font-size: $font-size-base; + padding-left: $space-small; + padding-right: $space-small; } .ds-chip-close { diff --git a/styleguide/src/system/components/typography/Code/Code.vue b/styleguide/src/system/components/typography/Code/Code.vue index 57d2e5265..be9fe5d6b 100644 --- a/styleguide/src/system/components/typography/Code/Code.vue +++ b/styleguide/src/system/components/typography/Code/Code.vue @@ -3,7 +3,6 @@ class="ds-code" :is="inline ? 'code' : 'pre'" :class="[ - size && `ds-code-size-${size}`, inline && `ds-code-inline` ]" > diff --git a/styleguide/src/system/components/typography/Code/style.scss b/styleguide/src/system/components/typography/Code/style.scss index 7fce31059..5ae7acc7c 100644 --- a/styleguide/src/system/components/typography/Code/style.scss +++ b/styleguide/src/system/components/typography/Code/style.scss @@ -12,6 +12,7 @@ .ds-code-inline { display: inline-block; padding: $space-xxx-small $space-x-small; + margin-bottom: 0; } .ds-code-size-small { diff --git a/styleguide/src/system/components/typography/Text/Text.vue b/styleguide/src/system/components/typography/Text/Text.vue index c1da4adfd..6d09c83f1 100644 --- a/styleguide/src/system/components/typography/Text/Text.vue +++ b/styleguide/src/system/components/typography/Text/Text.vue @@ -6,6 +6,7 @@ size && `ds-text-size-${size}`, color && `ds-text-${color}`, bold && `ds-text-bold`, + inline && `ds-text-inline`, align && `ds-text-${align}`, uppercase && `ds-text-uppercase` ]" @@ -36,7 +37,7 @@ export default { props: { /** * The color used for the text. - * `default, soft, softer, primary, inverse, success, warning, danger` + * @options default|soft|softer|primary|inverse|success|warning|danger */ color: { type: String, @@ -54,9 +55,19 @@ export default { type: Boolean, default: null }, + /** + * Whether the text is inline. + * @default false + */ + inline: { + type: Boolean, + default() { + return !!this.$parentText + } + }, /** * The size used for the text. - * `small, base, large, x-large` + * @options small|base|large|x-large|xx-large|xxx-large */ size: { type: String, @@ -66,12 +77,12 @@ export default { } }, /** - * The html element name used for the text. + * The html tag used for the text. */ tag: { type: String, default() { - return this.$parentText ? 'span' : 'p' + return this.inline ? 'span' : 'p' } }, /** diff --git a/styleguide/src/system/components/typography/Text/style.scss b/styleguide/src/system/components/typography/Text/style.scss index c00524dea..39aaca02c 100644 --- a/styleguide/src/system/components/typography/Text/style.scss +++ b/styleguide/src/system/components/typography/Text/style.scss @@ -3,12 +3,17 @@ @include stack-space($font-space-x-large); font-family: $font-family-text; line-height: $line-height-base; + display: block; } .ds-text-bold { font-weight: $font-weight-bold; } +.ds-text-inline { + display: inline; +} + .ds-text-left { text-align: left; } diff --git a/styleguide/src/system/plugins/utils.js b/styleguide/src/system/plugins/utils.js index a09921a2f..09b5c31ed 100644 --- a/styleguide/src/system/plugins/utils.js +++ b/styleguide/src/system/plugins/utils.js @@ -1,25 +1,11 @@ +import copy from 'clipboard-copy' + export default { install(Vue) { Vue.mixin({ methods: { $copyToClipboard(content) { - const el = document.createElement('textarea') - el.value = content - el.setAttribute('readonly', '') - el.style.position = 'absolute' - el.style.left = '-9999px' - document.body.appendChild(el) - const selected = - document.getSelection().rangeCount > 0 - ? document.getSelection().getRangeAt(0) - : false - el.select() - document.execCommand('copy') - document.body.removeChild(el) - if (selected) { - document.getSelection().removeAllRanges() - document.getSelection().addRange(selected) - } + return copy(content) } } }) diff --git a/styleguide/src/system/styles/core/reset.scss b/styleguide/src/system/styles/core/reset.scss index 9e9205932..d4a556aa9 100644 --- a/styleguide/src/system/styles/core/reset.scss +++ b/styleguide/src/system/styles/core/reset.scss @@ -35,6 +35,7 @@ input::-ms-clear, input::-ms-reveal { html { font-family: sans-serif; // 2 + font-size: $font-size-body; line-height: 1.15; // 3 -webkit-text-size-adjust: 100%; // 4 -ms-text-size-adjust: 100%; // 4 @@ -63,7 +64,7 @@ body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; color: $text-color-base; - background-color: $background-color-softer; // 2 + background-color: $background-color-base; // 2 } // Suppress the focus outline on elements that cannot be accessed via keyboard. diff --git a/styleguide/src/system/styles/shared/_mixins.scss b/styleguide/src/system/styles/shared/_mixins.scss index 922577750..2e8dcf1fc 100644 --- a/styleguide/src/system/styles/shared/_mixins.scss +++ b/styleguide/src/system/styles/shared/_mixins.scss @@ -2,11 +2,15 @@ --------------------------------------------- */ /* AUTO SCALING FOR TYPE WITH MIN/MAX SIZES + @param {Number} $responsive - Viewport-based size @param {Number} $min - Minimum font size (px) @param {Number} $max - Maximum font size (px) (optional) + @param {Number} $fallback - Fallback for viewport-based units (optional) + @example SCSS - 5vw size, 35px min & 150px max size + 50px fallback: + @include responsive-font(5vw, 35px, 150px, 50px); */ @mixin responsive-font($responsive, $min, $max: false, $fallback: false) { @@ -126,4 +130,4 @@ border-bottom-left-radius: $size; border-bottom-right-radius: $size; } -} +} \ No newline at end of file diff --git a/styleguide/src/system/tokens/_examples/airbnb/color.yml b/styleguide/src/system/tokens/_examples/airbnb/color.yml index c828c36cb..d7cc39a07 100644 --- a/styleguide/src/system/tokens/_examples/airbnb/color.yml +++ b/styleguide/src/system/tokens/_examples/airbnb/color.yml @@ -132,11 +132,11 @@ props: category: text-color - name: text-color-link - value: *color-secondary + value: *color-primary category: text-color - name: text-color-link-active - value: *color-secondary-active + value: *color-primary-active category: text-color - name: text-color-primary @@ -147,6 +147,14 @@ props: value: *color-primary-inverse category: text-color + - name: text-color-secondary + value: *color-secondary + category: text-color + + - name: text-color-secondary-inverse + value: *color-secondary-inverse + category: text-color + - name: text-color-success value: *color-success category: text-color @@ -176,11 +184,15 @@ props: value: *color-neutral-100 category: background-color + - name: background-color-soft + value: *color-neutral-95 + category: background-color + - name: background-color-softer value: *color-neutral-90 category: background-color - - name: background-color-soft + - name: background-color-softer-active value: *color-neutral-95 category: background-color @@ -192,20 +204,20 @@ props: value: *color-neutral-90 category: background-color - - name: background-color-inverse-softer - value: *color-neutral-20 - category: background-color - - - name: background-color-inverse-softer-active - value: *color-neutral-30 + - name: background-color-inverse + value: *color-neutral-0 category: background-color - name: background-color-inverse-soft value: *color-neutral-10 category: background-color - - name: background-color-inverse - value: *color-neutral-0 + - name: background-color-inverse-softer + value: *color-neutral-20 + category: background-color + + - name: background-color-inverse-softer-active + value: *color-neutral-30 category: background-color - name: background-color-primary @@ -220,6 +232,18 @@ props: value: *color-primary-inverse category: background-color + - name: background-color-secondary + value: *color-secondary + category: background-color + + - name: background-color-secondary-active + value: *color-secondary-active + category: background-color + + - name: background-color-secondary-inverse + value: *color-secondary-inverse + category: background-color + - name: background-color-success value: *color-success category: background-color @@ -270,7 +294,7 @@ props: category: border-color - name: border-color-active - value: *color-secondary + value: *color-primary category: border-color - name: border-color-primary diff --git a/styleguide/src/system/tokens/_examples/dark-purple/color.yml b/styleguide/src/system/tokens/_examples/dark-purple/color.yml index 0eeaedb43..3894d8114 100644 --- a/styleguide/src/system/tokens/_examples/dark-purple/color.yml +++ b/styleguide/src/system/tokens/_examples/dark-purple/color.yml @@ -34,7 +34,7 @@ props: # # Color Choices # - # Set definite color choices here. + # Set color choices here. # Use different lightness variations of the base hues. # # Light theme: darkest color | Dark theme: lightest color @@ -73,33 +73,40 @@ props: - name: color-primary-inverse value: &color-primary-inverse "hsla({!teal}, 5%, 1)" + - name: color-secondary + value: &color-secondary "hsla({!purple}, 45%, 1)" + - name: color-secondary-active + value: &color-secondary-active "hsla({!purple}, 52%, 1)" + - name: color-secondary-inverse + value: &color-secondary-inverse "hsla({!purple}, 97%, 1)" + - name: color-success value: &color-success "hsla({!green}, 40%, 1)" - name: color-success-active value: &color-success-active "hsla({!green}, 45%, 1)" - name: color-success-inverse - value: &color-success-inverse "hsla({!green}, 5%, 1)" + value: &color-success-inverse "hsla({!green}, 97%, 1)" - name: color-danger value: &color-danger "hsla({!red}, 50%, 1)" - name: color-danger-active value: &color-danger-active "hsla({!red}, 56%, 1)" - name: color-danger-inverse - value: &color-danger-inverse "hsla({!red}, 5%, 1)" + value: &color-danger-inverse "hsla({!red}, 97%, 1)" - name: color-warning value: &color-warning "hsla({!orange}, 50%, 1)" - name: color-warning-active value: &color-warning-active "hsla({!orange}, 56%, 1)" - name: color-warning-inverse - value: &color-warning-inverse "hsla({!orange}, 5%, 1)" + value: &color-warning-inverse "hsla({!orange}, 97%, 1)" - name: color-yellow value: &color-yellow "hsla({!yellow}, 48%, 1)" - name: color-yellow-active value: &color-yellow-active "hsla({!yellow}, 52%, 1)" - name: color-yellow-inverse - value: &color-yellow-inverse "hsla({!yellow}, 5%, 1)" + value: &color-yellow-inverse "hsla({!yellow}, 97%, 1)" # Text Colors - name: text-color-base @@ -138,6 +145,14 @@ props: value: *color-primary-inverse category: text-color + - name: text-color-secondary + value: *color-secondary + category: text-color + + - name: text-color-secondary-inverse + value: *color-secondary-inverse + category: text-color + - name: text-color-success value: *color-success category: text-color @@ -167,11 +182,15 @@ props: value: *color-neutral-100 category: background-color + - name: background-color-soft + value: *color-neutral-95 + category: background-color + - name: background-color-softer value: *color-neutral-90 category: background-color - - name: background-color-soft + - name: background-color-softer-active value: *color-neutral-95 category: background-color @@ -180,7 +199,15 @@ props: category: background-color - name: background-color-softest-active - value: *color-neutral-80 + value: *color-neutral-90 + category: background-color + + - name: background-color-inverse + value: *color-neutral-0 + category: background-color + + - name: background-color-inverse-soft + value: *color-neutral-10 category: background-color - name: background-color-inverse-softer @@ -191,14 +218,6 @@ props: value: *color-neutral-30 category: background-color - - name: background-color-inverse-soft - value: *color-neutral-10 - category: background-color - - - name: background-color-inverse - value: *color-neutral-0 - category: background-color - - name: background-color-primary value: *color-primary category: background-color @@ -211,6 +230,18 @@ props: value: *color-primary-inverse category: background-color + - name: background-color-secondary + value: *color-secondary + category: background-color + + - name: background-color-secondary-active + value: *color-secondary-active + category: background-color + + - name: background-color-secondary-inverse + value: *color-secondary-inverse + category: background-color + - name: background-color-success value: *color-success category: background-color diff --git a/styleguide/src/system/tokens/_examples/digital-ocean/box-shadow.yml b/styleguide/src/system/tokens/_examples/digital-ocean/box-shadow.yml new file mode 100644 index 000000000..bad2f9e1d --- /dev/null +++ b/styleguide/src/system/tokens/_examples/digital-ocean/box-shadow.yml @@ -0,0 +1,24 @@ +# +# BOX SHADOW TOKENS +# +# Use these tokens to set a box-shadow. +# + +props: + - name: box-shadow-large + value: "0 20px 60px 0 rgba(0, 0, 0, .15)" + - name: box-shadow-base + value: "0 2px 4px rgba(3,27,78,.06)" + - name: box-shadow-small + value: "0px 8px 18px -2px rgba(0, 0, 0, .1)" + - name: box-shadow-x-small + value: "0px 0px 3px 0px rgba(0, 0, 0, .1)" + - name: box-shadow-active + value: "0 0 6px 1px rgba(20, 100, 160, 0.5)" + - name: box-shadow-inset + value: "inset 0 0 20px 1px rgba(0,0,0,.15)" + - name: box-shadow-small-inset + value: "inset 0 0 0 1px rgba(0,0,0,.05)" +global: + type: ... + category: box-shadow diff --git a/styleguide/src/system/tokens/_examples/digital-ocean/color.yml b/styleguide/src/system/tokens/_examples/digital-ocean/color.yml new file mode 100644 index 000000000..64fd539fa --- /dev/null +++ b/styleguide/src/system/tokens/_examples/digital-ocean/color.yml @@ -0,0 +1,316 @@ +# +# COLOR TOKENS +# +# We use HSL in order to keep consistent hues +# For reference, see http://hslpicker.com/ +# + +# +# Base Hues +# +# Set hues here (these don't set lightness) +# +aliases: + neutral: + value: "221, 40%" + green: + value: "100, 69%" + orange: + value: "28, 80%" + yellow: + value: "48, 100%" + blue: + value: "215, 100%" + purple: + value: "264, 88%" + pink: + value: "330, 86%" + teal: + value: "178, 100%" + red: + value: "3, 65%" + +props: + # + # Color Choices + # + # Set color choices here. + # Use different lightness variations of the base hues. + # + # Light theme: darkest color | Dark theme: lightest color + - name: color-neutral-0 + value: &color-neutral-0 "hsla({!neutral}, 10%, 1)" + - name: color-neutral-10 + value: &color-neutral-10 "hsla({!neutral}, 16%, 1)" + - name: color-neutral-20 + value: &color-neutral-20 "hsla({!neutral}, 30%, 1)" + - name: color-neutral-30 + value: &color-neutral-30 "hsla({!neutral}, 40%, 1)" + - name: color-neutral-40 + value: &color-neutral-40 "hsla({!neutral}, 45%, 1)" + - name: color-neutral-50 + value: &color-neutral-50 "hsla({!neutral}, 60%, 1)" + - name: color-neutral-60 + value: &color-neutral-60 "hsla({!neutral}, 70%, 1)" + - name: color-neutral-70 + value: &color-neutral-70 "hsla({!neutral}, 80%, 1)" + - name: color-neutral-80 + value: &color-neutral-80 "hsla({!neutral}, 90%, 1)" + - name: color-neutral-85 + value: &color-neutral-85 "hsla({!neutral}, 94%, 1)" + - name: color-neutral-90 + value: &color-neutral-90 "hsla({!neutral}, 96%, 1)" + - name: color-neutral-95 + value: &color-neutral-95 "hsla({!neutral}, 98%, 1)" + # Light theme: lightest color | Dark theme: darkest color + - name: color-neutral-100 + value: &color-neutral-100 "hsla({!neutral}, 100%, 1)" + + - name: color-primary + value: &color-primary "hsla({!blue}, 50%, 1)" + - name: color-primary-active + value: &color-primary-active "hsla({!blue}, 54%, 1)" + - name: color-primary-inverse + value: &color-primary-inverse "hsla({!blue}, 97%, 1)" + + - name: color-secondary + value: &color-secondary "hsla({!teal}, 40%, 1)" + - name: color-secondary-active + value: &color-secondary-active "hsla({!teal}, 42%, 1)" + - name: color-secondary-inverse + value: &color-secondary-inverse "hsla({!teal}, 97%, 1)" + + - name: color-success + value: &color-success "hsla({!green}, 40%, 1)" + - name: color-success-active + value: &color-success-active "hsla({!green}, 45%, 1)" + - name: color-success-inverse + value: &color-success-inverse "hsla({!green}, 97%, 1)" + + - name: color-danger + value: &color-danger "hsla({!red}, 50%, 1)" + - name: color-danger-active + value: &color-danger-active "hsla({!red}, 56%, 1)" + - name: color-danger-inverse + value: &color-danger-inverse "hsla({!red}, 97%, 1)" + + - name: color-warning + value: &color-warning "hsla({!orange}, 50%, 1)" + - name: color-warning-active + value: &color-warning-active "hsla({!orange}, 56%, 1)" + - name: color-warning-inverse + value: &color-warning-inverse "hsla({!orange}, 97%, 1)" + + - name: color-yellow + value: &color-yellow "hsla({!yellow}, 48%, 1)" + - name: color-yellow-active + value: &color-yellow-active "hsla({!yellow}, 52%, 1)" + - name: color-yellow-inverse + value: &color-yellow-inverse "hsla({!yellow}, 97%, 1)" + + # Text Colors + - name: text-color-base + value: *color-neutral-20 + category: text-color + + - name: text-color-soft + value: *color-neutral-40 + category: text-color + + - name: text-color-softer + value: *color-neutral-60 + category: text-color + + - name: text-color-disabled + value: *color-neutral-60 + category: text-color + + - name: text-color-inverse + value: *color-neutral-95 + category: text-color + + - name: text-color-link + value: *color-primary + category: text-color + + - name: text-color-link-active + value: *color-primary-active + category: text-color + + - name: text-color-primary + value: *color-primary + category: text-color + + - name: text-color-primary-inverse + value: *color-primary-inverse + category: text-color + + - name: text-color-secondary + value: *color-secondary + category: text-color + + - name: text-color-secondary-inverse + value: *color-secondary-inverse + category: text-color + + - name: text-color-success + value: *color-success + category: text-color + + - name: text-color-success-inverse + value: *color-success-inverse + category: text-color + + - name: text-color-warning + value: *color-warning + category: text-color + + - name: text-color-warning-inverse + value: *color-warning-inverse + category: text-color + + - name: text-color-danger + value: *color-danger + category: text-color + + - name: text-color-danger-inverse + value: *color-danger-inverse + category: text-color + + # Background Colors + - name: background-color-base + value: *color-neutral-100 + category: background-color + + - name: background-color-soft + value: *color-neutral-95 + category: background-color + + - name: background-color-softer + value: *color-neutral-90 + category: background-color + + - name: background-color-softer-active + value: *color-neutral-95 + category: background-color + + - name: background-color-softest + value: *color-neutral-85 + category: background-color + + - name: background-color-softest-active + value: *color-neutral-90 + category: background-color + + - name: background-color-inverse + value: *color-neutral-0 + category: background-color + + - name: background-color-inverse-soft + value: *color-neutral-10 + category: background-color + + - name: background-color-inverse-softer + value: *color-neutral-20 + category: background-color + + - name: background-color-inverse-softer-active + value: *color-neutral-30 + category: background-color + + - name: background-color-primary + value: *color-primary + category: background-color + + - name: background-color-primary-active + value: *color-primary-active + category: background-color + + - name: background-color-primary-inverse + value: *color-primary-inverse + category: background-color + + - name: background-color-secondary + value: *color-secondary + category: background-color + + - name: background-color-secondary-active + value: *color-secondary-active + category: background-color + + - name: background-color-secondary-inverse + value: *color-secondary-inverse + category: background-color + + - name: background-color-success + value: *color-success + category: background-color + + - name: background-color-success-active + value: *color-success-active + category: background-color + + - name: background-color-success-inverse + value: *color-success-inverse + category: background-color + + - name: background-color-warning + value: *color-warning + category: background-color + + - name: background-color-warning-active + value: *color-warning-active + category: background-color + + - name: background-color-warning-inverse + value: *color-warning-inverse + category: background-color + + - name: background-color-danger + value: *color-danger + category: background-color + + - name: background-color-danger-active + value: *color-danger-active + category: background-color + + - name: background-color-danger-inverse + value: *color-danger-inverse + category: background-color + + # Border Colors + - name: border-color-base + value: *color-neutral-60 + category: border-color + + - name: border-color-soft + value: *color-neutral-70 + category: border-color + + - name: border-color-softer + value: *color-neutral-80 + category: border-color + + - name: border-color-active + value: *color-primary + category: border-color + + - name: border-color-primary + value: *color-primary + category: border-color + + - name: border-color-success + value: *color-success + category: border-color + + - name: border-color-warning + value: *color-warning + category: border-color + + - name: border-color-danger + value: *color-danger + category: border-color + +global: + type: color + category: color diff --git a/styleguide/src/system/tokens/_examples/digital-ocean/font.yml b/styleguide/src/system/tokens/_examples/digital-ocean/font.yml new file mode 100644 index 000000000..452644250 --- /dev/null +++ b/styleguide/src/system/tokens/_examples/digital-ocean/font.yml @@ -0,0 +1,25 @@ +# +# FONT TOKENS +# Use these tokens to set font-weight and font-family. +# + +props: + - name: font-family-heading + value: "Sailec-Bold,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Helvetica,Arial,sans-serif" + category: "font-family" + - name: font-family-text + value: "Sailec-Regular,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Helvetica,Arial,sans-serif" + category: "font-family" + - name: font-family-code + value: "inconsolata, monospace" + category: "font-family" + + - name: font-weight-regular + value: "normal" + category: "font-weight" + - name: font-weight-bold + value: "600" + category: "font-weight" +global: + type: ... + category: font diff --git a/styleguide/src/system/tokens/_examples/discord/box-shadow.yml b/styleguide/src/system/tokens/_examples/discord/box-shadow.yml new file mode 100644 index 000000000..0b8a5ccf1 --- /dev/null +++ b/styleguide/src/system/tokens/_examples/discord/box-shadow.yml @@ -0,0 +1,24 @@ +# +# BOX SHADOW TOKENS +# +# Use these tokens to set a box-shadow. +# + +props: + - name: box-shadow-large + value: "0 20px 60px 0 rgba(0, 0, 0, .5)" + - name: box-shadow-base + value: "0px 12px 26px -4px rgba(0, 0, 0, .5)" + - name: box-shadow-small + value: "0px 8px 18px -2px rgba(0, 0, 0, .5)" + - name: box-shadow-x-small + value: "0px 0px 3px 0px rgba(0, 0, 0, .5)" + - name: box-shadow-active + value: "0 0 6px 1px rgba(20, 100, 160, 0.5)" + - name: box-shadow-inset + value: "inset 0 0 20px 1px rgba(0,0,0,.15)" + - name: box-shadow-small-inset + value: "inset 0 0 0 1px rgba(0,0,0,.05)" +global: + type: ... + category: box-shadow diff --git a/styleguide/src/system/tokens/_examples/discord/color.yml b/styleguide/src/system/tokens/_examples/discord/color.yml new file mode 100644 index 000000000..0c5c4c4f9 --- /dev/null +++ b/styleguide/src/system/tokens/_examples/discord/color.yml @@ -0,0 +1,316 @@ +# +# COLOR TOKENS +# +# We use HSL in order to keep consistent hues +# For reference, see http://hslpicker.com/ +# + +# +# Base Hues +# +# Set hues here (these don't set lightness) +# +aliases: + neutral: + value: "240, 6%" + green: + value: "100, 69%" + orange: + value: "28, 80%" + yellow: + value: "48, 100%" + blue: + value: "200, 100%" + purple: + value: "227, 58%" + pink: + value: "330, 86%" + teal: + value: "153, 46%" + red: + value: "3, 80%" + +props: + # + # Color Choices + # + # Set color choices here. + # Use different lightness variations of the base hues. + # + # Light theme: darkest color | Dark theme: lightest color + - name: color-neutral-0 + value: &color-neutral-0 "hsla({!neutral}, 100%, 1)" + - name: color-neutral-10 + value: &color-neutral-10 "hsla({!neutral}, 90%, 1)" + - name: color-neutral-20 + value: &color-neutral-20 "hsla({!neutral}, 80%, 1)" + - name: color-neutral-30 + value: &color-neutral-30 "hsla({!neutral}, 70%, 1)" + - name: color-neutral-40 + value: &color-neutral-40 "hsla({!neutral}, 60%, 1)" + - name: color-neutral-50 + value: &color-neutral-50 "hsla({!neutral}, 50%, 1)" + - name: color-neutral-60 + value: &color-neutral-60 "hsla({!neutral}, 45%, 1)" + - name: color-neutral-70 + value: &color-neutral-70 "hsla({!neutral}, 40%, 1)" + - name: color-neutral-80 + value: &color-neutral-80 "hsla({!neutral}, 30%, 1)" + - name: color-neutral-85 + value: &color-neutral-85 "hsla({!neutral}, 24%, 1)" + - name: color-neutral-90 + value: &color-neutral-90 "hsla({!neutral}, 20%, 1)" + - name: color-neutral-95 + value: &color-neutral-95 "hsla({!neutral}, 16%, 1)" + # Light theme: lightest color | Dark theme: darkest color + - name: color-neutral-100 + value: &color-neutral-100 "hsla({!neutral}, 14%, 1)" + + - name: color-primary + value: &color-primary "hsla({!purple}, 65%, 1)" + - name: color-primary-active + value: &color-primary-active "hsla({!purple}, 62%, 1)" + - name: color-primary-inverse + value: &color-primary-inverse "hsla({!purple}, 98%, 1)" + + - name: color-secondary + value: &color-secondary "hsla({!teal}, 46%, 1)" + - name: color-secondary-active + value: &color-secondary-active "hsla({!teal}, 52%, 1)" + - name: color-secondary-inverse + value: &color-secondary-inverse "hsla({!teal}, 98%, 1)" + + - name: color-success + value: &color-success "hsla({!green}, 40%, 1)" + - name: color-success-active + value: &color-success-active "hsla({!green}, 45%, 1)" + - name: color-success-inverse + value: &color-success-inverse "hsla({!green}, 98%, 1)" + + - name: color-danger + value: &color-danger "hsla({!red}, 50%, 1)" + - name: color-danger-active + value: &color-danger-active "hsla({!red}, 56%, 1)" + - name: color-danger-inverse + value: &color-danger-inverse "hsla({!red}, 98%, 1)" + + - name: color-warning + value: &color-warning "hsla({!orange}, 50%, 1)" + - name: color-warning-active + value: &color-warning-active "hsla({!orange}, 56%, 1)" + - name: color-warning-inverse + value: &color-warning-inverse "hsla({!orange}, 98%, 1)" + + - name: color-yellow + value: &color-yellow "hsla({!yellow}, 48%, 1)" + - name: color-yellow-active + value: &color-yellow-active "hsla({!yellow}, 52%, 1)" + - name: color-yellow-inverse + value: &color-yellow-inverse "hsla({!yellow}, 98%, 1)" + + # Text Colors + - name: text-color-base + value: *color-neutral-10 + category: text-color + + - name: text-color-soft + value: *color-neutral-30 + category: text-color + + - name: text-color-softer + value: *color-neutral-50 + category: text-color + + - name: text-color-disabled + value: *color-neutral-50 + category: text-color + + - name: text-color-inverse + value: *color-neutral-95 + category: text-color + + - name: text-color-link + value: *color-primary + category: text-color + + - name: text-color-link-active + value: *color-primary-active + category: text-color + + - name: text-color-primary + value: *color-primary + category: text-color + + - name: text-color-primary-inverse + value: *color-primary-inverse + category: text-color + + - name: text-color-secondary + value: *color-secondary + category: text-color + + - name: text-color-secondary-inverse + value: *color-secondary-inverse + category: text-color + + - name: text-color-success + value: *color-success + category: text-color + + - name: text-color-success-inverse + value: *color-success-inverse + category: text-color + + - name: text-color-warning + value: *color-warning + category: text-color + + - name: text-color-warning-inverse + value: *color-warning-inverse + category: text-color + + - name: text-color-danger + value: *color-danger + category: text-color + + - name: text-color-danger-inverse + value: *color-danger-inverse + category: text-color + + # Background Colors + - name: background-color-base + value: *color-neutral-100 + category: background-color + + - name: background-color-soft + value: *color-neutral-95 + category: background-color + + - name: background-color-softer + value: *color-neutral-90 + category: background-color + + - name: background-color-softer-active + value: *color-neutral-95 + category: background-color + + - name: background-color-softest + value: *color-neutral-85 + category: background-color + + - name: background-color-softest-active + value: *color-neutral-90 + category: background-color + + - name: background-color-inverse + value: *color-neutral-0 + category: background-color + + - name: background-color-inverse-soft + value: *color-neutral-10 + category: background-color + + - name: background-color-inverse-softer + value: *color-neutral-20 + category: background-color + + - name: background-color-inverse-softer-active + value: *color-neutral-30 + category: background-color + + - name: background-color-primary + value: *color-primary + category: background-color + + - name: background-color-primary-active + value: *color-primary-active + category: background-color + + - name: background-color-primary-inverse + value: *color-primary-inverse + category: background-color + + - name: background-color-secondary + value: *color-secondary + category: background-color + + - name: background-color-secondary-active + value: *color-secondary-active + category: background-color + + - name: background-color-secondary-inverse + value: *color-secondary-inverse + category: background-color + + - name: background-color-success + value: *color-success + category: background-color + + - name: background-color-success-active + value: *color-success-active + category: background-color + + - name: background-color-success-inverse + value: *color-success-inverse + category: background-color + + - name: background-color-warning + value: *color-warning + category: background-color + + - name: background-color-warning-active + value: *color-warning-active + category: background-color + + - name: background-color-warning-inverse + value: *color-warning-inverse + category: background-color + + - name: background-color-danger + value: *color-danger + category: background-color + + - name: background-color-danger-active + value: *color-danger-active + category: background-color + + - name: background-color-danger-inverse + value: *color-danger-inverse + category: background-color + + # Border Colors + - name: border-color-base + value: *color-neutral-60 + category: border-color + + - name: border-color-soft + value: *color-neutral-70 + category: border-color + + - name: border-color-softer + value: *color-neutral-80 + category: border-color + + - name: border-color-active + value: *color-primary + category: border-color + + - name: border-color-primary + value: *color-primary + category: border-color + + - name: border-color-success + value: *color-success + category: border-color + + - name: border-color-warning + value: *color-warning + category: border-color + + - name: border-color-danger + value: *color-danger + category: border-color + +global: + type: color + category: color diff --git a/styleguide/src/system/tokens/_examples/discord/font.yml b/styleguide/src/system/tokens/_examples/discord/font.yml new file mode 100644 index 000000000..543d2b381 --- /dev/null +++ b/styleguide/src/system/tokens/_examples/discord/font.yml @@ -0,0 +1,25 @@ +# +# FONT TOKENS +# Use these tokens to set font-weight and font-family. +# + +props: + - name: font-family-heading + value: "Whitney,Helvetica Neue,Helvetica,Arial,sans-serif" + category: "font-family" + - name: font-family-text + value: "Whitney,Helvetica Neue,Helvetica,Arial,sans-serif" + category: "font-family" + - name: font-family-code + value: "inconsolata, monospace" + category: "font-family" + + - name: font-weight-regular + value: "normal" + category: "font-weight" + - name: font-weight-bold + value: "700" + category: "font-weight" +global: + type: ... + category: font diff --git a/styleguide/src/system/tokens/_examples/vue/color.yml b/styleguide/src/system/tokens/_examples/vue/color.yml index 48c834578..a6772c5ed 100644 --- a/styleguide/src/system/tokens/_examples/vue/color.yml +++ b/styleguide/src/system/tokens/_examples/vue/color.yml @@ -5,6 +5,11 @@ # For reference, see http://hslpicker.com/ # +# +# Base Hues +# +# Set hues here (these don't set lightness) +# # # Base Hues # @@ -73,6 +78,13 @@ props: - name: color-primary-inverse value: &color-primary-inverse "hsla({!teal}, 97%, 1)" + - name: color-secondary + value: &color-secondary "hsla({!pink}, 45%, 1)" + - name: color-secondary-active + value: &color-secondary-active "hsla({!pink}, 52%, 1)" + - name: color-secondary-inverse + value: &color-secondary-inverse "hsla({!pink}, 97%, 1)" + - name: color-success value: &color-success "hsla({!green}, 40%, 1)" - name: color-success-active @@ -138,6 +150,14 @@ props: value: *color-primary-inverse category: text-color + - name: text-color-secondary + value: *color-secondary + category: text-color + + - name: text-color-secondary-inverse + value: *color-secondary-inverse + category: text-color + - name: text-color-success value: *color-success category: text-color @@ -167,11 +187,15 @@ props: value: *color-neutral-100 category: background-color + - name: background-color-soft + value: *color-neutral-95 + category: background-color + - name: background-color-softer value: *color-neutral-90 category: background-color - - name: background-color-soft + - name: background-color-softer-active value: *color-neutral-95 category: background-color @@ -183,20 +207,20 @@ props: value: *color-neutral-90 category: background-color - - name: background-color-inverse-softer - value: *color-neutral-20 - category: background-color - - - name: background-color-inverse-softer-active - value: *color-neutral-30 + - name: background-color-inverse + value: *color-neutral-0 category: background-color - name: background-color-inverse-soft value: *color-neutral-10 category: background-color - - name: background-color-inverse - value: *color-neutral-0 + - name: background-color-inverse-softer + value: *color-neutral-20 + category: background-color + + - name: background-color-inverse-softer-active + value: *color-neutral-30 category: background-color - name: background-color-primary @@ -211,6 +235,18 @@ props: value: *color-primary-inverse category: background-color + - name: background-color-secondary + value: *color-secondary + category: background-color + + - name: background-color-secondary-active + value: *color-secondary-active + category: background-color + + - name: background-color-secondary-inverse + value: *color-secondary-inverse + category: background-color + - name: background-color-success value: *color-success category: background-color diff --git a/styleguide/src/system/tokens/color.yml b/styleguide/src/system/tokens/color.yml index 2ba577e73..cedb25e74 100644 --- a/styleguide/src/system/tokens/color.yml +++ b/styleguide/src/system/tokens/color.yml @@ -291,7 +291,7 @@ props: value: *color-neutral-80 category: border-color - - name: border-color-light + - name: border-color-softest value: *color-neutral-90 category: border-color