Skip to content

Commit

Permalink
Next Version Bump (#2027)
Browse files Browse the repository at this point in the history
* Badge: border and color updates (#2022)

* chore(ci): updating rails gem version [ci skip]

* chore(release): publish [skip ci]

* style(badge): rework documentation and styles for border and color updates

* fix(linter): remove extra spaces and reorg style order

* style(badge): rearrange badge preview and update styles

* fix: linting issue in the scss for order of props

* docs(badge): minor adjustments to grammar

* style(dot): adjust sage-badge dot spacing to align with designs

* revert versions to match develop

* fix: remove extra space in changelog

---------

Co-authored-by: Kajabi Automation Bot <dev+github-bot@kajabi.com>

* docs: update broken image paths (#2029)

* chore(deps): bump @pine-ds/icons from 8.11.0 to 8.12.0 (#2028)

Bumps [@pine-ds/icons](https://github.com/Kajabi/pine-icons) from 8.11.0 to 8.12.0.
- [Release notes](https://github.com/Kajabi/pine-icons/releases)
- [Changelog](https://github.com/Kajabi/pine-icons/blob/main/CHANGELOG.md)
- [Commits](Kajabi/pine-icons@v8.11.0...v8.12.0)

---
updated-dependencies:
- dependency-name: "@pine-ds/icons"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Kajabi Automation Bot <dev+github-bot@kajabi.com>
Co-authored-by: Phillip Lovelace <phillip.lovelace@kajabi.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
4 people authored Dec 13, 2024
1 parent b77aefd commit e09625d
Show file tree
Hide file tree
Showing 11 changed files with 123 additions and 137 deletions.
162 changes: 72 additions & 90 deletions docs/app/views/examples/components/badge/_preview.html.erb
Original file line number Diff line number Diff line change
@@ -1,102 +1,84 @@
<%
configs = [
{
color: "draft",
icon: "draft",
},
{
color: "published",
icon: "check",
},
{
color: "info",
icon: "draft",
},
{
color: "warning",
icon: "warning",
},
{
color: "danger",
icon: "danger",
},
{
color: "locked",
icon: "lock",
}
]
%>
<%= sage_component SagePanelBlock, {} do %>
<h3 class="t-sage-heading-6">Default Badge</h3>
<%= sage_component SageLabelGroup, {} do %>
<% configs.each do | config | %>
<%= sage_component SageBadge, {
color: config[:color],
value: config[:color].capitalize,
}%>
<% end %>
<% end %>
<h2>Variants</h2>

<h3>Default Badge</h3>
<p>Demonstrates the use of the default badge with various color options.</p>

<%= sage_component SageLabelGroup, { gap: :md, spacer: { bottom: :sm }} do %>
<%= sage_component SageBadge, { color: "draft", value: "Neutral" } %>
<%= sage_component SageBadge, { color: "info", value: "Info" } %>
<%= sage_component SageBadge, { color: "published", value: "Success" } %>
<%= sage_component SageBadge, { color: "warning", value: "Warning" } %>
<%= sage_component SageBadge, { color: "danger", value: "Danger" } %>
<%= sage_component SageBadge, { color: "locked", value: "Accent" } %>
<% end %>

<%= sage_component SagePanelBlock, {} do %>
<h3 class="t-sage-heading-6">Indicator Badge</h3>
<%= sage_component SageLabelGroup, {} do %>
<% configs.each do | config | %>
<%= sage_component SageBadge, {
color: config[:color],
value: config[:color].capitalize,
} do %>
<% content_for :sage_badge_dot do %>
<%= sage_component SageDot, { color: "primary" } %>
<% end %>
<% end %>
<%= sage_component SageDivider, {} %>

<h3>Dot</h3>
<p>Demostrates a badge with an indicator dot.</p>

<%= sage_component SageLabelGroup, { gap: :md, spacer: { bottom: :sm }} do %>
<%= sage_component SageBadge, { color: "draft", value: "Neutral" } do %>
<% content_for :sage_badge_dot do %>
<%= sage_component SageDot, { color: "primary" } %>
<% end %>
<% end %>
<% end %>

<%= sage_component SagePanelBlock, {} do %>
<h3 class="t-sage-heading-6">Interactive Badge</h3>
<%= sage_component SageLabelGroup, {} do %>
<% configs.each do | config | %>
<%= sage_component SageBadge, {
color: config[:color],
value: config[:color].capitalize,
interactive_type: :dropdown
} do %>
<% content_for :sage_badge_dot do %>
<%= sage_component SageDot, { color: "primary" } %>
<% end %>
<% end %>
<%= sage_component SageBadge, { color: "info", value: "Info" } do %>
<% content_for :sage_badge_dot do %>
<%= sage_component SageDot, { color: "primary" } %>
<% end %>
<% end %>
<%= sage_component SageBadge, { color: "published", value: "Success" } do %>
<% content_for :sage_badge_dot do %>
<%= sage_component SageDot, { color: "primary" } %>
<% end %>
<% end %>
<%= sage_component SageBadge, { color: "warning", value: "Warning" } do %>
<% content_for :sage_badge_dot do %>
<%= sage_component SageDot, { color: "primary" } %>
<% end %>
<% end %>
<%= sage_component SageBadge, { color: "danger", value: "Danger" } do %>
<% content_for :sage_badge_dot do %>
<%= sage_component SageDot, { color: "primary" } %>
<% end %>
<% end %>
<%= sage_component SageBadge, { color: "locked", value: "Accent" } do %>
<% content_for :sage_badge_dot do %>
<%= sage_component SageDot, { color: "primary" } %>
<% end %>
<% end %>
<% end %>

<%= sage_component SagePanelBlock, {} do %>
<h3 class="t-sage-heading-6">Large Badge</h3>
<%= sage_component SageLabelGroup, {} do %>
<%= sage_component SageBadge, {
color: "draft",
value: "Draft",
large: true,
} %>
<%= sage_component SageBadge, {
color: "published",
value: "Published",
large: true,
} do %>
<% content_for :sage_badge_dot do %>
<%= sage_component SageDot, {} %>
<% end %>
<%= sage_component SageDivider, {} %>

<h3>Interactive Badge</h3>
<p>Demonstrates an interactive badge with dropdown functionality.</p>

<%= sage_component SageLabelGroup, { gap: :md, spacer: { bottom: :sm }} do %>
<%= sage_component SageBadge, { color: "draft", value: "Neutral", interactive_type: :dropdown } %>
<%= sage_component SageBadge, { color: "info", value: "Info", interactive_type: :dropdown } %>
<%= sage_component SageBadge, { color: "published", value: "Success", interactive_type: :dropdown } %>
<%= sage_component SageBadge, { color: "warning", value: "Warning", interactive_type: :dropdown } %>
<%= sage_component SageBadge, { color: "danger", value: "Danger", interactive_type: :dropdown } %>
<%= sage_component SageBadge, { color: "locked", value: "Accent", interactive_type: :dropdown } %>
<% end %>

<%= sage_component SageDivider, {} %>

<h3>Large Badge</h3>
<p>Demonstrates larger badge sizes for emphasis.</p>

<%= sage_component SageLabelGroup, { gap: :md, spacer: { bottom: :sm }} do %>
<%= sage_component SageBadge, { color: "draft", value: "Neutral", large: true } %>
<%= sage_component SageBadge, { color: "published", value: "Success", large: true } do %>
<% content_for :sage_badge_dot do %>
<%= sage_component SageDot, {} %>
<% end %>
<%= sage_component SageBadge, {
color: "warning",
value: "Warning",
large: true,
interactive_type: :dropdown
} do %>
<% content_for :sage_badge_dot do %>
<%= sage_component SageDot, {} %>
<% end %>
<% end %>
<%= sage_component SageBadge, { color: "warning", value: "Warning", large: true, interactive_type: :dropdown } do %>
<% content_for :sage_badge_dot do %>
<%= sage_component SageDot, {} %>
<% end %>
<% end %>
<% end %>
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ panels = [
caption: %(
<p>Vivamus dictum rutrum dui, nec placerat ante</p>
),
media: %(<img src="/assets/card-placeholder-lg.png" alt="Image of Product Abra" />),
media: %(#{image_tag("card-placeholder-lg.png", alt: "media tile image placeholder")}),
title: "Product Abra",
},
{
Expand All @@ -44,7 +44,7 @@ panels = [
caption: %(
<p>Suspendisse eu tellus quis arcu sagittis semper</p>
),
media: %(<img src="/assets/card-placeholder-lg.png" alt="Image of Product Cadabra" />),
media: %(#{image_tag("card-placeholder-lg.png", alt: "media tile image placeholder")}),
title: "Product Cadabra",
},
{
Expand All @@ -56,7 +56,7 @@ panels = [
caption: %(
<p>Maecenas vitae leo eu tellus efficitur viverra sit amet ut tortor vestibulum</p>
),
media: %(<img src="/assets/card-placeholder-lg.png" alt="Image of Product Jimminycricket" />),
media: %(#{image_tag("card-placeholder-lg.png", alt: "media tile image placeholder")}),
title: "Product Jimminycricket",
},
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
],
file_selected: true,
accepted_file_types: ["image/jpg"],
selection_preview: "https://placekitten.com/360",
selection_preview: "hero-workshop-placeholder.jpg",
selection_label: "Replace file",
id: "upload-card-selected",
} do %>
Expand All @@ -53,7 +53,7 @@
{name: "my-image-file.jpg"},
],
file_selected: true,
selection_preview: "https://placekitten.com/360",
selection_preview: "hero-workshop-placeholder.jpg",
stack_layout: true,
id: "upload-card-stack",
selection_label: "Edit file",
Expand All @@ -72,11 +72,11 @@
<p><strong>NOTE:</strong> a file input field and label are <em>included by default in the base component</em>, as seen in the examples above. When applying a custom file input with `sage_upload_card_actions`, set <code>custom_file_input_field</code> to <code>true</code> to remove these defaults.</p>
<%= sage_component SageUploadCard, {
accepted_files: [
{name: "fluffy-kitteh.jpg"},
{name: "my-image-file.jpg"},
],
custom_file_input_field: true,
file_selected: true,
selection_preview: "https://placekitten.com/360",
selection_preview: "hero-workshop-placeholder.jpg",
id: "upload-card-dropdown"
} do %>
<% content_for :sage_upload_card_actions do %>
Expand Down
16 changes: 8 additions & 8 deletions docs/lib/sage_rails/app/sage_tokens/sage_dictionary.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ module SageDictionary
SD_SAGE_COLOR_BASE_BLUE_200_HEX = "#bfdbfe"
SD_SAGE_COLOR_BASE_BLUE_200_CODE = "blue-200"
SD_SAGE_COLOR_BASE_BLUE_200_CLASSNAME = "t-sage--color-blue-200"
SD_SAGE_COLOR_BASE_BLUE_300_HEX = "#92c5fd"
SD_SAGE_COLOR_BASE_BLUE_300_HEX = "#93c5fd"
SD_SAGE_COLOR_BASE_BLUE_300_CODE = "blue-300"
SD_SAGE_COLOR_BASE_BLUE_300_CLASSNAME = "t-sage--color-blue-300"
SD_SAGE_COLOR_BASE_BLUE_400_HEX = "#60a5fa"
Expand Down Expand Up @@ -132,7 +132,7 @@ module SageDictionary
SD_SAGE_COLOR_BASE_PRIMARY_100_HEX = "#dbe9fe"
SD_SAGE_COLOR_BASE_PRIMARY_100_CODE = "primary-100"
SD_SAGE_COLOR_BASE_PRIMARY_100_CLASSNAME = "t-sage--color-primary-100"
SD_SAGE_COLOR_BASE_PRIMARY_200_HEX = "#92c5fd"
SD_SAGE_COLOR_BASE_PRIMARY_200_HEX = "#93c5fd"
SD_SAGE_COLOR_BASE_PRIMARY_200_CODE = "primary-200"
SD_SAGE_COLOR_BASE_PRIMARY_200_CLASSNAME = "t-sage--color-primary-200"
SD_SAGE_COLOR_BASE_PRIMARY_300_HEX = "#2463eb"
Expand Down Expand Up @@ -975,7 +975,7 @@ module SageDictionary
#
SD_SAGE_COLOR_COMBOS_DRAFT_DEFAULT_FOREGROUND = "#343332"
SD_SAGE_COLOR_COMBOS_DRAFT_DEFAULT_FOREGROUND_ACCENT = "#1a1a19"
SD_SAGE_COLOR_COMBOS_DRAFT_DEFAULT_BACKGROUND = "#e4e4e4"
SD_SAGE_COLOR_COMBOS_DRAFT_DEFAULT_BACKGROUND = "#f0f0f0"
SD_SAGE_COLOR_COMBOS_DRAFT_DEFAULT_BACKGROUND_ACCENT = "#d2d1d1"
SD_SAGE_COLOR_COMBOS_DRAFT_DEFAULT_ICON_BACKGROUND_ACCENT = "#6c6a69"
SD_SAGE_COLOR_COMBOS_DRAFT_SUBTLE_FOREGROUND = "#6c6a69"
Expand All @@ -996,11 +996,11 @@ module SageDictionary
SD_SAGE_COLOR_COMBOS_INFO_DEFAULT_FOREGROUND = "#1c4ed8"
SD_SAGE_COLOR_COMBOS_INFO_DEFAULT_FOREGROUND_ACCENT = "#172554"
SD_SAGE_COLOR_COMBOS_INFO_DEFAULT_BACKGROUND = "#dbe9fe"
SD_SAGE_COLOR_COMBOS_INFO_DEFAULT_BACKGROUND_ACCENT = "#92c5fd"
SD_SAGE_COLOR_COMBOS_INFO_DEFAULT_BACKGROUND_ACCENT = "#93c5fd"
SD_SAGE_COLOR_COMBOS_INFO_DEFAULT_ICON_BACKGROUND_ACCENT = "#2463eb"
SD_SAGE_COLOR_COMBOS_INFO_SUBTLE_FOREGROUND = "#1c4ed8"
SD_SAGE_COLOR_COMBOS_INFO_SUBTLE_FOREGROUND_ACCENT = "#2463eb"
SD_SAGE_COLOR_COMBOS_INFO_SUBTLE_BACKGROUND = "#92c5fd"
SD_SAGE_COLOR_COMBOS_INFO_SUBTLE_BACKGROUND = "#93c5fd"
SD_SAGE_COLOR_COMBOS_INFO_BOLD_FOREGROUND = "#dbe9fe"
SD_SAGE_COLOR_COMBOS_INFO_BOLD_BACKGROUND = "#2463eb"
SD_SAGE_COLOR_COMBOS_LOCKED_DEFAULT_FOREGROUND = "#402fa4"
Expand Down Expand Up @@ -1035,12 +1035,12 @@ module SageDictionary
SD_SAGE_COLOR_COMBOS_DANGER_BOLD_BACKGROUND = "#fda5a5"
SD_SAGE_COLOR_COMBOS_PRIMARY_DEFAULT_FOREGROUND = "#fff"
SD_SAGE_COLOR_COMBOS_PRIMARY_DEFAULT_FOREGROUND_ACCENT = "#fff"
SD_SAGE_COLOR_COMBOS_PRIMARY_DEFAULT_BACKGROUND = "#92c5fd"
SD_SAGE_COLOR_COMBOS_PRIMARY_DEFAULT_BACKGROUND = "#93c5fd"
SD_SAGE_COLOR_COMBOS_PRIMARY_SUBTLE_FOREGROUND = "#fff"
SD_SAGE_COLOR_COMBOS_PRIMARY_SUBTLE_FOREGROUND_ACCENT = "#fff"
SD_SAGE_COLOR_COMBOS_PRIMARY_SUBTLE_BACKGROUND = "#92c5fd"
SD_SAGE_COLOR_COMBOS_PRIMARY_SUBTLE_BACKGROUND = "#93c5fd"
SD_SAGE_COLOR_COMBOS_PRIMARY_BOLD_FOREGROUND = "#fff"
SD_SAGE_COLOR_COMBOS_PRIMARY_BOLD_BACKGROUND = "#92c5fd"
SD_SAGE_COLOR_COMBOS_PRIMARY_BOLD_BACKGROUND = "#93c5fd"

#
# Map for COLOR COMBOS
Expand Down
24 changes: 14 additions & 10 deletions packages/sage-assets/lib/stylesheets/components/_badge.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@
$-badge-min-height: rem(20px);
$-badge-interactive-icon-size: rem(24px);
$-badge-interactive-icon-size-decor: rem(28px);
$-badge-padding: sage-spacing(3xs) rem(10px) sage-spacing(3xs) sage-spacing(xs);
$-badge-padding: 1px sage-spacing(xs);
$-badge-padding-lg: sage-spacing(2xs) rem(12px);
$-badge-border-radius: sage-border(radius-x-large);
$-badge-inset-border: 0 0 0 1px inset;
$-badge-statuses: (
danger,
draft,
Expand All @@ -26,22 +25,23 @@ $-badge-statuses: (
align-items: center;
position: relative;
border-radius: $-badge-border-radius;
border-width: 1px;
border-style: solid;

&[class*="sage-badge--icon-only"] {
background-color: transparent;
}
}

.sage-badge__value {
@extend %t-sage-body-small-med;

@extend %t-sage-body-med;
appearance: none;
display: flex;
align-items: center;
max-width: 100%;
min-height: $-badge-min-height;
padding: $-badge-padding;
color: sage-color(grey, 950);
letter-spacing: sage-letter-spacing(md);
white-space: nowrap;
background-color: transparent;
border-radius: $-badge-border-radius;
Expand All @@ -59,8 +59,14 @@ $-badge-statuses: (
}

.sage-badge--large & {
@extend %t-sage-body-med;
@extend %t-sage-heading-6;
padding: $-badge-padding-lg;
font-family: $-heading-font;

.sage-badge__value-text {
font-size: sage-font-size(lg, false);
letter-spacing: sage-letter-spacing(sm);
}
}
}

Expand All @@ -84,11 +90,9 @@ $-badge-statuses: (
$-color-modifier: ".sage-badge--#{$-color-name}";

#{$-color-modifier} {
color: sage-color-combo($-color-name, default, foreground-accent);
background-color: sage-color-combo($-color-name, default, background);

&:hover:not(:focus):not(:active):not(:disabled):not(.disabled) {
color: sage-color-combo($-color-name, default, background-accent);
}
border-color: sage-color-combo($-color-name, default, background-accent);
}

#{$-color-modifier} .sage-dot {
Expand Down
2 changes: 1 addition & 1 deletion packages/sage-assets/lib/stylesheets/components/_dot.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ $-sage-dot-size--badge: rem(6px);
}

.sage-badge & {
margin-inline-start: rem(6px);
margin-inline-start: sage-spacing(xs);
}

.sage-badge--large & {
Expand Down
Loading

0 comments on commit e09625d

Please sign in to comment.