diff --git a/cspell.json b/cspell.json index e5b28277e..6c381b4df 100644 --- a/cspell.json +++ b/cspell.json @@ -105,6 +105,7 @@ "keydown", "keyframes", "keymaker", + "Kickstarter", "Konnor", "Kool", "labelledby", @@ -117,6 +118,7 @@ "lowercasing", "Lucide", "maxlength", + "mdash", "Menlo", "menuitemcheckbox", "menuitemradio", @@ -130,6 +132,7 @@ "mouseout", "mouseup", "multiselectable", + "nbsp", "nextjs", "nocheck", "noindex", @@ -179,6 +182,7 @@ "shadowrootmode", "Shortcode", "Shortcodes", + "signup", "sitedir", "slotchange", "smartquotes", diff --git a/packages/webawesome/docs/_includes/sidebar.njk b/packages/webawesome/docs/_includes/sidebar.njk index 0d629660c..1f85fb8c9 100644 --- a/packages/webawesome/docs/_includes/sidebar.njk +++ b/packages/webawesome/docs/_includes/sidebar.njk @@ -81,7 +81,15 @@
  • Charts {{ plannedBadge("A Web Awesome Kickstarter stretch goal!") }}{{ proBadge({ description: "This will require access to Web Awesome Pro" }) }}
  • Checkbox
  • Color Picker
  • -
  • Combobox {{ plannedBadge("A Web Awesome Kickstarter stretch goal!") }}{{ proBadge({ description: "This will require access to Web Awesome Pro" }) }}
  • +
  • + + + Combobox + + + {{ proBadge() }} + +
  • Comparison
  • @@ -90,7 +98,7 @@
  • Data Grid {{ plannedBadge("A Web Awesome Kickstarter stretch goal!") }}{{ proBadge({ description: "This will require access to Web Awesome Pro" }) }}
  • -
  • Datepicker {{ plannedBadge("A Web Awesome Kickstarter stretch goal!") }}{{ proBadge({ description: "This will require access to Web Awesome Pro" }) }}
  • +
  • Date Picker {{ plannedBadge("A Web Awesome Kickstarter stretch goal!") }}{{ proBadge({ description: "This will require access to Web Awesome Pro" }) }}
  • Details
  • Dialog
  • Divider
  • diff --git a/packages/webawesome/docs/_layouts/component.njk b/packages/webawesome/docs/_layouts/component.njk index 4c260f17c..b6dd8d18d 100644 --- a/packages/webawesome/docs/_layouts/component.njk +++ b/packages/webawesome/docs/_layouts/component.njk @@ -8,10 +8,13 @@ Since {{ component.since }} {{ component.status }} + {% if isProComponent %} + Pro + {% endif %}

    {{ component.summary | inlineMarkdown | safe }} @@ -20,6 +23,37 @@ {# Component API #} {% block afterContent %} + {# Importing #} +

    Importing

    +

    + Autoloading components via projects is the recommended way to import components. If you prefer to do it manually, use one of the following code snippets. +

    + + {% set componentName = component.tagName | stripPrefix %} + {% set componentPath = ["components/", componentName, "/", componentName, ".js"] | join("") %} + + CDN + npm + React + +

    + Let your project code do the work! Sign up for free to use a project with your very own CDN — it's the fastest and easiest way to use Web Awesome. +

    +
    + +

    + To manually import this component from NPM, use the following code. +

    +
    import '@awesome.me/webawesome/dist/{{ componentPath }}';
    +
    + +

    + To manually import this component from React, use the following code. +

    +
    import {{ component.name }} from '@awesome.me/webawesome/dist/react/{{ componentName }}';
    +
    +
    + {# Slots #} {% if component.slots.length %}

    Slots

    @@ -270,38 +304,6 @@ {% endif %} - {# Importing #} -

    Importing

    -

    - Autoloading components via projects is the recommended way to import components. If you prefer to do it manually, use one of the following code snippets. -

    - - - {% set componentName = component.tagName | stripPrefix %} - {% set componentPath = ["components/", componentName, "/", componentName, ".js"] | join("") %} - - CDN - npm - React - -

    - Let your project code do the work! Sign up for free to use a project with your very own CDN — it's the fastest and easiest way to use Web Awesome. -

    -
    - -

    - To manually import this component from NPM, use the following code. -

    -
    import '@awesome.me/webawesome/dist/{{ componentPath }}';
    -
    - -

    - To manually import this component from React, use the following code. -

    -
    import {{ component.name }} from '@awesome.me/webawesome/dist/react/{{ componentName }}';
    -
    -
    -
    diff --git a/packages/webawesome/docs/docs/components/select.md b/packages/webawesome/docs/docs/components/select.md index ff7135e8a..2878fc00b 100644 --- a/packages/webawesome/docs/docs/components/select.md +++ b/packages/webawesome/docs/docs/components/select.md @@ -285,9 +285,10 @@ Remember that custom tags are rendered in a shadow root. To style them, you can const name = option.querySelector('wa-icon[slot="start"]').name; // You can return a string, a Lit Template, or an HTMLElement here + // Important: include data-value so the tag can be removed properly! return ` - - + + ${option.label} `; @@ -299,6 +300,10 @@ Remember that custom tags are rendered in a shadow root. To style them, you can Be sure you trust the content you are outputting! Passing unsanitized user input to `getTag()` can result in XSS vulnerabilities. ::: +:::info +When using custom tags with `with-remove`, you must include the `data-value` attribute set to the option's value. This allows the select to identify which option to deselect when the tag's remove button is clicked. +::: + ### Lazy loading options Lazy loading options works similarly to native `