├── .Rbuildignore
├── .github
└── workflows
│ └── R-CMD-check.yaml
├── .gitignore
├── DESCRIPTION
├── LICENSE
├── LICENSE.md
├── NAMESPACE
├── NEWS.md
├── R
├── bs-icon.R
├── bsicons-package.R
└── icons.R
├── README.md
├── bsicons.Rproj
├── man
├── bs_icon.Rd
└── bsicons-package.Rd
├── revdep
├── .gitignore
├── README.md
├── cran.md
├── failures.md
└── problems.md
├── tests
├── testthat.R
└── testthat
│ ├── _snaps
│ ├── bsicon.md
│ └── bsicon
│ │ └── main-icon-test.png
│ ├── helper-skip.R
│ └── test-bsicon.R
└── tools
└── update_icons.R
/.Rbuildignore:
--------------------------------------------------------------------------------
1 | ^bsicons\.Rproj$
2 | ^\.Rproj\.user$
3 | ^LICENSE\.md$
4 | ^\.gitignore$
5 | ^\.github$
6 |
--------------------------------------------------------------------------------
/.github/workflows/R-CMD-check.yaml:
--------------------------------------------------------------------------------
1 | # Workflow derived from https://github.com/rstudio/shiny-workflows
2 | #
3 | # NOTE: This Shiny team GHA workflow is overkill for most R packages.
4 | # For most R packages it is better to use https://github.com/r-lib/actions
5 | on:
6 | push:
7 | branches: [main, rc-**]
8 | pull_request:
9 | branches: [main]
10 | schedule:
11 | - cron: '0 7 * * 1' # every monday
12 |
13 | name: Package checks
14 |
15 | jobs:
16 | website:
17 | uses: rstudio/shiny-workflows/.github/workflows/website.yaml@v1
18 | routine:
19 | uses: rstudio/shiny-workflows/.github/workflows/routine.yaml@v1
20 | R-CMD-check:
21 | uses: rstudio/shiny-workflows/.github/workflows/R-CMD-check.yaml@v1
22 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .Rproj.user
2 |
--------------------------------------------------------------------------------
/DESCRIPTION:
--------------------------------------------------------------------------------
1 | Package: bsicons
2 | Title: Easily Work with 'Bootstrap' Icons
3 | Version: 0.1.2.9000
4 | Authors@R: c(
5 | person("Carson", "Sievert", , "carson@posit.co", role = c("cre", "aut"),
6 | comment = c(ORCID = "0000-0002-4958-2844")),
7 | person("Posit Software, PBC", role = c("cph", "fnd")),
8 | person("Mark", "Otto", role = "cph",
9 | comment = "Bootstrap icons maintainer")
10 | )
11 | Description: Easily use 'Bootstrap' icons inside 'Shiny' apps and 'R
12 | Markdown' documents. More generally, icons can be inserted in any
13 | 'htmltools' document through inline 'SVG'.
14 | License: MIT + file LICENSE
15 | URL: https://github.com/rstudio/bsicons
16 | BugReports: https://github.com/rstudio/bsicons/issues
17 | Depends:
18 | R (>= 2.10)
19 | Imports:
20 | cli,
21 | htmltools,
22 | rlang,
23 | utils
24 | Suggests:
25 | bslib,
26 | processx,
27 | testthat,
28 | webshot2,
29 | withr
30 | Config/testthat/edition: 3
31 | Encoding: UTF-8
32 | Roxygen: list(markdown = TRUE)
33 | RoxygenNote: 7.2.3
34 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | YEAR: 2022
2 | COPYRIGHT HOLDER: bsicons authors
3 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | # MIT License
2 |
3 | Copyright (c) 2022 bsicons authors
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/NAMESPACE:
--------------------------------------------------------------------------------
1 | # Generated by roxygen2: do not edit by hand
2 |
3 | export(bs_icon)
4 | import(cli)
5 | import(htmltools)
6 | import(rlang)
7 | import(utils)
8 |
--------------------------------------------------------------------------------
/NEWS.md:
--------------------------------------------------------------------------------
1 | # bsicons (development version)
2 |
3 | # bsicons 0.1.2
4 |
5 | * Update icons from v1.10.2 to v1.11.1 (see [release notes](https://github.com/twbs/icons/releases)). (#9)
6 | * `bs_icon()` now defaults to `a11y="sem"` when `title` is provided, meaning that the title is shown on hover and announced by screen readers by default (#8).
7 |
8 | # bsicons 0.1.1
9 |
10 | * Improved default vertical alignment of icons in an inline context (#4).
11 | * Improved error message when an unrecognized icon is provided to `bs_icon()` (#5).
12 |
13 | # bsicons 0.1
14 |
15 | * Initial release of package.
16 |
--------------------------------------------------------------------------------
/R/bs-icon.R:
--------------------------------------------------------------------------------
1 | #' Use Bootstrap icons (as inline SVG)
2 | #'
3 | #' @param name The name of the Bootstrap icon. Whitespace is replaced with `-`
4 | #' (that way, `"arrow up"` can be used to refer to the "actual name" of
5 | #' `"arrow-up"`). For a searchable list of names, see
6 | #' @param size Any valid CSS unit defining both the height and width of the
7 | #' icon.
8 | #' @param class Additional CSS classes to add to the `