@spectrum-web-components/icons-ui 0.50.0-beta.0 → 0.50.0-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/build.js +316 -185
- package/package.json +9 -7
- package/src/elements/IconArrow100.js +1 -1
- package/src/elements/IconArrow100.js.map +3 -3
- package/src/elements/IconArrow200.js +1 -1
- package/src/elements/IconArrow200.js.map +3 -3
- package/src/elements/IconArrow300.js +1 -1
- package/src/elements/IconArrow300.js.map +3 -3
- package/src/elements/IconArrow400.js +1 -1
- package/src/elements/IconArrow400.js.map +3 -3
- package/src/elements/IconArrow500.js +1 -1
- package/src/elements/IconArrow500.js.map +3 -3
- package/src/elements/IconArrow600.js +1 -1
- package/src/elements/IconArrow600.js.map +3 -3
- package/src/elements/IconArrow75.js +1 -1
- package/src/elements/IconArrow75.js.map +3 -3
- package/src/elements/IconAsterisk100.js +1 -1
- package/src/elements/IconAsterisk100.js.map +3 -3
- package/src/elements/IconAsterisk200.js +1 -1
- package/src/elements/IconAsterisk200.js.map +3 -3
- package/src/elements/IconAsterisk300.js +1 -1
- package/src/elements/IconAsterisk300.js.map +3 -3
- package/src/elements/IconAsterisk75.js +1 -1
- package/src/elements/IconAsterisk75.js.map +3 -3
- package/src/elements/IconCheckmark100.js +1 -1
- package/src/elements/IconCheckmark100.js.map +3 -3
- package/src/elements/IconCheckmark200.js +1 -1
- package/src/elements/IconCheckmark200.js.map +3 -3
- package/src/elements/IconCheckmark300.js +1 -1
- package/src/elements/IconCheckmark300.js.map +3 -3
- package/src/elements/IconCheckmark400.js +1 -1
- package/src/elements/IconCheckmark400.js.map +3 -3
- package/src/elements/IconCheckmark50.js +1 -1
- package/src/elements/IconCheckmark50.js.map +3 -3
- package/src/elements/IconCheckmark500.js +1 -1
- package/src/elements/IconCheckmark500.js.map +3 -3
- package/src/elements/IconCheckmark600.js +1 -1
- package/src/elements/IconCheckmark600.js.map +3 -3
- package/src/elements/IconCheckmark75.js +1 -1
- package/src/elements/IconCheckmark75.js.map +3 -3
- package/src/elements/IconChevron100.js +1 -1
- package/src/elements/IconChevron100.js.map +3 -3
- package/src/elements/IconChevron200.js +1 -1
- package/src/elements/IconChevron200.js.map +3 -3
- package/src/elements/IconChevron300.js +1 -1
- package/src/elements/IconChevron300.js.map +3 -3
- package/src/elements/IconChevron400.js +1 -1
- package/src/elements/IconChevron400.js.map +3 -3
- package/src/elements/IconChevron50.js +1 -1
- package/src/elements/IconChevron50.js.map +3 -3
- package/src/elements/IconChevron500.js +1 -1
- package/src/elements/IconChevron500.js.map +3 -3
- package/src/elements/IconChevron600.js +1 -1
- package/src/elements/IconChevron600.js.map +3 -3
- package/src/elements/IconChevron75.js +1 -1
- package/src/elements/IconChevron75.js.map +3 -3
- package/src/elements/IconCornerTriangle100.js +1 -1
- package/src/elements/IconCornerTriangle100.js.map +3 -3
- package/src/elements/IconCornerTriangle200.js +1 -1
- package/src/elements/IconCornerTriangle200.js.map +3 -3
- package/src/elements/IconCornerTriangle300.js +1 -1
- package/src/elements/IconCornerTriangle300.js.map +3 -3
- package/src/elements/IconCornerTriangle75.js +1 -1
- package/src/elements/IconCornerTriangle75.js.map +3 -3
- package/src/elements/IconCross100.js +1 -1
- package/src/elements/IconCross100.js.map +3 -3
- package/src/elements/IconCross200.js +1 -1
- package/src/elements/IconCross200.js.map +3 -3
- package/src/elements/IconCross300.js +1 -1
- package/src/elements/IconCross300.js.map +3 -3
- package/src/elements/IconCross400.js +1 -1
- package/src/elements/IconCross400.js.map +3 -3
- package/src/elements/IconCross500.js +1 -1
- package/src/elements/IconCross500.js.map +3 -3
- package/src/elements/IconCross600.js +1 -1
- package/src/elements/IconCross600.js.map +3 -3
- package/src/elements/IconCross75.js +1 -1
- package/src/elements/IconCross75.js.map +3 -3
- package/src/elements/IconDash100.js +1 -1
- package/src/elements/IconDash100.js.map +3 -3
- package/src/elements/IconDash200.js +1 -1
- package/src/elements/IconDash200.js.map +3 -3
- package/src/elements/IconDash300.js +1 -1
- package/src/elements/IconDash300.js.map +3 -3
- package/src/elements/IconDash400.js +1 -1
- package/src/elements/IconDash400.js.map +3 -3
- package/src/elements/IconDash50.js +1 -1
- package/src/elements/IconDash50.js.map +3 -3
- package/src/elements/IconDash500.js +1 -1
- package/src/elements/IconDash500.js.map +3 -3
- package/src/elements/IconDash600.js +1 -1
- package/src/elements/IconDash600.js.map +3 -3
- package/src/elements/IconDash75.js +1 -1
- package/src/elements/IconDash75.js.map +3 -3
- package/src/elements/IconDoubleGripper.js +1 -1
- package/src/elements/IconDoubleGripper.js.map +3 -3
- package/src/elements/IconSingleGripper.js +1 -1
- package/src/elements/IconSingleGripper.js.map +3 -3
- package/src/elements/IconTripleGripper.js +1 -1
- package/src/elements/IconTripleGripper.js.map +3 -3
- package/src/icons/Arrow100.d.ts +2 -1
- package/src/icons/Arrow100.js +5 -5
- package/src/icons/Arrow100.js.map +3 -3
- package/src/icons/Arrow200.d.ts +2 -1
- package/src/icons/Arrow200.js +5 -5
- package/src/icons/Arrow200.js.map +3 -3
- package/src/icons/Arrow300.d.ts +2 -1
- package/src/icons/Arrow300.js +5 -5
- package/src/icons/Arrow300.js.map +3 -3
- package/src/icons/Arrow400.d.ts +2 -1
- package/src/icons/Arrow400.js +5 -5
- package/src/icons/Arrow400.js.map +3 -3
- package/src/icons/Arrow500.d.ts +2 -1
- package/src/icons/Arrow500.js +5 -5
- package/src/icons/Arrow500.js.map +3 -3
- package/src/icons/Arrow600.d.ts +2 -1
- package/src/icons/Arrow600.js +5 -5
- package/src/icons/Arrow600.js.map +3 -3
- package/src/icons/Arrow75.d.ts +2 -1
- package/src/icons/Arrow75.js +5 -5
- package/src/icons/Arrow75.js.map +3 -3
- package/src/icons/Asterisk100.d.ts +2 -1
- package/src/icons/Asterisk100.js +5 -5
- package/src/icons/Asterisk100.js.map +3 -3
- package/src/icons/Asterisk200.d.ts +2 -1
- package/src/icons/Asterisk200.js +5 -5
- package/src/icons/Asterisk200.js.map +3 -3
- package/src/icons/Asterisk300.d.ts +2 -1
- package/src/icons/Asterisk300.js +5 -5
- package/src/icons/Asterisk300.js.map +3 -3
- package/src/icons/Asterisk75.d.ts +2 -1
- package/src/icons/Asterisk75.js +5 -5
- package/src/icons/Asterisk75.js.map +3 -3
- package/src/icons/Checkmark100.d.ts +2 -1
- package/src/icons/Checkmark100.js +5 -5
- package/src/icons/Checkmark100.js.map +3 -3
- package/src/icons/Checkmark200.d.ts +2 -1
- package/src/icons/Checkmark200.js +5 -5
- package/src/icons/Checkmark200.js.map +3 -3
- package/src/icons/Checkmark300.d.ts +2 -1
- package/src/icons/Checkmark300.js +5 -5
- package/src/icons/Checkmark300.js.map +3 -3
- package/src/icons/Checkmark400.d.ts +2 -1
- package/src/icons/Checkmark400.js +5 -5
- package/src/icons/Checkmark400.js.map +3 -3
- package/src/icons/Checkmark50.d.ts +2 -1
- package/src/icons/Checkmark50.js +5 -5
- package/src/icons/Checkmark50.js.map +3 -3
- package/src/icons/Checkmark500.d.ts +2 -1
- package/src/icons/Checkmark500.js +5 -5
- package/src/icons/Checkmark500.js.map +3 -3
- package/src/icons/Checkmark600.d.ts +2 -1
- package/src/icons/Checkmark600.js +5 -5
- package/src/icons/Checkmark600.js.map +3 -3
- package/src/icons/Checkmark75.d.ts +2 -1
- package/src/icons/Checkmark75.js +5 -5
- package/src/icons/Checkmark75.js.map +3 -3
- package/src/icons/Chevron100.d.ts +2 -1
- package/src/icons/Chevron100.js +5 -5
- package/src/icons/Chevron100.js.map +3 -3
- package/src/icons/Chevron200.d.ts +2 -1
- package/src/icons/Chevron200.js +5 -5
- package/src/icons/Chevron200.js.map +3 -3
- package/src/icons/Chevron300.d.ts +2 -1
- package/src/icons/Chevron300.js +5 -5
- package/src/icons/Chevron300.js.map +3 -3
- package/src/icons/Chevron400.d.ts +2 -1
- package/src/icons/Chevron400.js +5 -5
- package/src/icons/Chevron400.js.map +3 -3
- package/src/icons/Chevron50.d.ts +2 -1
- package/src/icons/Chevron50.js +5 -5
- package/src/icons/Chevron50.js.map +3 -3
- package/src/icons/Chevron500.d.ts +2 -1
- package/src/icons/Chevron500.js +5 -5
- package/src/icons/Chevron500.js.map +3 -3
- package/src/icons/Chevron600.d.ts +2 -1
- package/src/icons/Chevron600.js +5 -5
- package/src/icons/Chevron600.js.map +3 -3
- package/src/icons/Chevron75.d.ts +2 -1
- package/src/icons/Chevron75.js +5 -5
- package/src/icons/Chevron75.js.map +3 -3
- package/src/icons/CornerTriangle100.d.ts +2 -1
- package/src/icons/CornerTriangle100.js +5 -5
- package/src/icons/CornerTriangle100.js.map +3 -3
- package/src/icons/CornerTriangle200.d.ts +2 -1
- package/src/icons/CornerTriangle200.js +5 -5
- package/src/icons/CornerTriangle200.js.map +3 -3
- package/src/icons/CornerTriangle300.d.ts +2 -1
- package/src/icons/CornerTriangle300.js +5 -5
- package/src/icons/CornerTriangle300.js.map +3 -3
- package/src/icons/CornerTriangle75.d.ts +2 -1
- package/src/icons/CornerTriangle75.js +5 -5
- package/src/icons/CornerTriangle75.js.map +3 -3
- package/src/icons/Cross100.d.ts +2 -1
- package/src/icons/Cross100.js +5 -5
- package/src/icons/Cross100.js.map +3 -3
- package/src/icons/Cross200.d.ts +2 -1
- package/src/icons/Cross200.js +5 -5
- package/src/icons/Cross200.js.map +3 -3
- package/src/icons/Cross300.d.ts +2 -1
- package/src/icons/Cross300.js +5 -5
- package/src/icons/Cross300.js.map +3 -3
- package/src/icons/Cross400.d.ts +2 -1
- package/src/icons/Cross400.js +5 -5
- package/src/icons/Cross400.js.map +3 -3
- package/src/icons/Cross500.d.ts +2 -1
- package/src/icons/Cross500.js +5 -5
- package/src/icons/Cross500.js.map +3 -3
- package/src/icons/Cross600.d.ts +2 -1
- package/src/icons/Cross600.js +5 -5
- package/src/icons/Cross600.js.map +3 -3
- package/src/icons/Cross75.d.ts +2 -1
- package/src/icons/Cross75.js +5 -5
- package/src/icons/Cross75.js.map +3 -3
- package/src/icons/Dash100.d.ts +2 -1
- package/src/icons/Dash100.js +5 -5
- package/src/icons/Dash100.js.map +3 -3
- package/src/icons/Dash200.d.ts +2 -1
- package/src/icons/Dash200.js +5 -5
- package/src/icons/Dash200.js.map +3 -3
- package/src/icons/Dash300.d.ts +2 -1
- package/src/icons/Dash300.js +5 -5
- package/src/icons/Dash300.js.map +3 -3
- package/src/icons/Dash400.d.ts +2 -1
- package/src/icons/Dash400.js +5 -5
- package/src/icons/Dash400.js.map +3 -3
- package/src/icons/Dash50.d.ts +2 -1
- package/src/icons/Dash50.js +5 -5
- package/src/icons/Dash50.js.map +3 -3
- package/src/icons/Dash500.d.ts +2 -1
- package/src/icons/Dash500.js +5 -5
- package/src/icons/Dash500.js.map +3 -3
- package/src/icons/Dash600.d.ts +2 -1
- package/src/icons/Dash600.js +5 -5
- package/src/icons/Dash600.js.map +3 -3
- package/src/icons/Dash75.d.ts +2 -1
- package/src/icons/Dash75.js +5 -5
- package/src/icons/Dash75.js.map +3 -3
- package/src/icons/DoubleGripper.d.ts +2 -1
- package/src/icons/DoubleGripper.js +5 -5
- package/src/icons/DoubleGripper.js.map +3 -3
- package/src/icons/SingleGripper.d.ts +2 -1
- package/src/icons/SingleGripper.js +5 -5
- package/src/icons/SingleGripper.js.map +3 -3
- package/src/icons/TripleGripper.d.ts +2 -1
- package/src/icons/TripleGripper.js +5 -5
- package/src/icons/TripleGripper.js.map +3 -3
- package/src/icons-s2/Arrow100.d.ts +8 -0
- package/src/icons-s2/Arrow100.js +15 -0
- package/src/icons-s2/Arrow100.js.map +7 -0
- package/src/icons-s2/Arrow200.d.ts +8 -0
- package/src/icons-s2/Arrow200.js +15 -0
- package/src/icons-s2/Arrow200.js.map +7 -0
- package/src/icons-s2/Arrow300.d.ts +8 -0
- package/src/icons-s2/Arrow300.js +15 -0
- package/src/icons-s2/Arrow300.js.map +7 -0
- package/src/icons-s2/Arrow400.d.ts +8 -0
- package/src/icons-s2/Arrow400.js +15 -0
- package/src/icons-s2/Arrow400.js.map +7 -0
- package/src/icons-s2/Arrow500.d.ts +8 -0
- package/src/icons-s2/Arrow500.js +15 -0
- package/src/icons-s2/Arrow500.js.map +7 -0
- package/src/icons-s2/Arrow600.d.ts +8 -0
- package/src/icons-s2/Arrow600.js +15 -0
- package/src/icons-s2/Arrow600.js.map +7 -0
- package/src/icons-s2/Arrow75.d.ts +8 -0
- package/src/icons-s2/Arrow75.js +15 -0
- package/src/icons-s2/Arrow75.js.map +7 -0
- package/src/icons-s2/Asterisk100.d.ts +8 -0
- package/src/icons-s2/Asterisk100.js +15 -0
- package/src/icons-s2/Asterisk100.js.map +7 -0
- package/src/icons-s2/Asterisk200.d.ts +8 -0
- package/src/icons-s2/Asterisk200.js +15 -0
- package/src/icons-s2/Asterisk200.js.map +7 -0
- package/src/icons-s2/Asterisk300.d.ts +8 -0
- package/src/icons-s2/Asterisk300.js +15 -0
- package/src/icons-s2/Asterisk300.js.map +7 -0
- package/src/icons-s2/Asterisk75.d.ts +8 -0
- package/src/icons-s2/Asterisk75.js +15 -0
- package/src/icons-s2/Asterisk75.js.map +7 -0
- package/src/icons-s2/Checkmark100.d.ts +8 -0
- package/src/icons-s2/Checkmark100.js +15 -0
- package/src/icons-s2/Checkmark100.js.map +7 -0
- package/src/icons-s2/Checkmark200.d.ts +8 -0
- package/src/icons-s2/Checkmark200.js +15 -0
- package/src/icons-s2/Checkmark200.js.map +7 -0
- package/src/icons-s2/Checkmark300.d.ts +8 -0
- package/src/icons-s2/Checkmark300.js +15 -0
- package/src/icons-s2/Checkmark300.js.map +7 -0
- package/src/icons-s2/Checkmark400.d.ts +8 -0
- package/src/icons-s2/Checkmark400.js +15 -0
- package/src/icons-s2/Checkmark400.js.map +7 -0
- package/src/icons-s2/Checkmark50.d.ts +8 -0
- package/src/icons-s2/Checkmark50.js +15 -0
- package/src/icons-s2/Checkmark50.js.map +7 -0
- package/src/icons-s2/Checkmark500.d.ts +8 -0
- package/src/icons-s2/Checkmark500.js +15 -0
- package/src/icons-s2/Checkmark500.js.map +7 -0
- package/src/icons-s2/Checkmark600.d.ts +8 -0
- package/src/icons-s2/Checkmark600.js +15 -0
- package/src/icons-s2/Checkmark600.js.map +7 -0
- package/src/icons-s2/Checkmark75.d.ts +8 -0
- package/src/icons-s2/Checkmark75.js +15 -0
- package/src/icons-s2/Checkmark75.js.map +7 -0
- package/src/icons-s2/Chevron100.d.ts +8 -0
- package/src/icons-s2/Chevron100.js +15 -0
- package/src/icons-s2/Chevron100.js.map +7 -0
- package/src/icons-s2/Chevron200.d.ts +8 -0
- package/src/icons-s2/Chevron200.js +15 -0
- package/src/icons-s2/Chevron200.js.map +7 -0
- package/src/icons-s2/Chevron300.d.ts +8 -0
- package/src/icons-s2/Chevron300.js +15 -0
- package/src/icons-s2/Chevron300.js.map +7 -0
- package/src/icons-s2/Chevron400.d.ts +8 -0
- package/src/icons-s2/Chevron400.js +15 -0
- package/src/icons-s2/Chevron400.js.map +7 -0
- package/src/icons-s2/Chevron50.d.ts +8 -0
- package/src/icons-s2/Chevron50.js +14 -0
- package/src/icons-s2/Chevron50.js.map +7 -0
- package/src/icons-s2/Chevron500.d.ts +8 -0
- package/src/icons-s2/Chevron500.js +15 -0
- package/src/icons-s2/Chevron500.js.map +7 -0
- package/src/icons-s2/Chevron600.d.ts +8 -0
- package/src/icons-s2/Chevron600.js +15 -0
- package/src/icons-s2/Chevron600.js.map +7 -0
- package/src/icons-s2/Chevron75.d.ts +8 -0
- package/src/icons-s2/Chevron75.js +15 -0
- package/src/icons-s2/Chevron75.js.map +7 -0
- package/src/icons-s2/CornerTriangle100.d.ts +8 -0
- package/src/icons-s2/CornerTriangle100.js +15 -0
- package/src/icons-s2/CornerTriangle100.js.map +7 -0
- package/src/icons-s2/CornerTriangle200.d.ts +8 -0
- package/src/icons-s2/CornerTriangle200.js +15 -0
- package/src/icons-s2/CornerTriangle200.js.map +7 -0
- package/src/icons-s2/CornerTriangle300.d.ts +8 -0
- package/src/icons-s2/CornerTriangle300.js +15 -0
- package/src/icons-s2/CornerTriangle300.js.map +7 -0
- package/src/icons-s2/CornerTriangle75.d.ts +8 -0
- package/src/icons-s2/CornerTriangle75.js +15 -0
- package/src/icons-s2/CornerTriangle75.js.map +7 -0
- package/src/icons-s2/Cross100.d.ts +8 -0
- package/src/icons-s2/Cross100.js +15 -0
- package/src/icons-s2/Cross100.js.map +7 -0
- package/src/icons-s2/Cross200.d.ts +8 -0
- package/src/icons-s2/Cross200.js +15 -0
- package/src/icons-s2/Cross200.js.map +7 -0
- package/src/icons-s2/Cross300.d.ts +8 -0
- package/src/icons-s2/Cross300.js +15 -0
- package/src/icons-s2/Cross300.js.map +7 -0
- package/src/icons-s2/Cross400.d.ts +8 -0
- package/src/icons-s2/Cross400.js +15 -0
- package/src/icons-s2/Cross400.js.map +7 -0
- package/src/icons-s2/Cross500.d.ts +8 -0
- package/src/icons-s2/Cross500.js +15 -0
- package/src/icons-s2/Cross500.js.map +7 -0
- package/src/icons-s2/Cross600.d.ts +8 -0
- package/src/icons-s2/Cross600.js +15 -0
- package/src/icons-s2/Cross600.js.map +7 -0
- package/src/icons-s2/Cross75.d.ts +8 -0
- package/src/icons-s2/Cross75.js +15 -0
- package/src/icons-s2/Cross75.js.map +7 -0
- package/src/icons-s2/Dash100.d.ts +8 -0
- package/src/icons-s2/Dash100.js +13 -0
- package/src/icons-s2/Dash100.js.map +7 -0
- package/src/icons-s2/Dash200.d.ts +8 -0
- package/src/icons-s2/Dash200.js +13 -0
- package/src/icons-s2/Dash200.js.map +7 -0
- package/src/icons-s2/Dash300.d.ts +8 -0
- package/src/icons-s2/Dash300.js +13 -0
- package/src/icons-s2/Dash300.js.map +7 -0
- package/src/icons-s2/Dash400.d.ts +8 -0
- package/src/icons-s2/Dash400.js +13 -0
- package/src/icons-s2/Dash400.js.map +7 -0
- package/src/icons-s2/Dash50.d.ts +8 -0
- package/src/icons-s2/Dash50.js +13 -0
- package/src/icons-s2/Dash50.js.map +7 -0
- package/src/icons-s2/Dash500.d.ts +8 -0
- package/src/icons-s2/Dash500.js +13 -0
- package/src/icons-s2/Dash500.js.map +7 -0
- package/src/icons-s2/Dash600.d.ts +8 -0
- package/src/icons-s2/Dash600.js +13 -0
- package/src/icons-s2/Dash600.js.map +7 -0
- package/src/icons-s2/Dash75.d.ts +8 -0
- package/src/icons-s2/Dash75.js +13 -0
- package/src/icons-s2/Dash75.js.map +7 -0
- package/src/icons-s2/DoubleGripper.d.ts +8 -0
- package/src/icons-s2/DoubleGripper.js +15 -0
- package/src/icons-s2/DoubleGripper.js.map +7 -0
- package/src/icons-s2/SingleGripper.d.ts +8 -0
- package/src/icons-s2/SingleGripper.js +13 -0
- package/src/icons-s2/SingleGripper.js.map +7 -0
- package/src/icons-s2/TripleGripper.d.ts +8 -0
- package/src/icons-s2/TripleGripper.js +15 -0
- package/src/icons-s2/TripleGripper.js.map +7 -0
- package/src/icons-s2.d.ts +49 -0
- package/src/icons-s2.js +2 -0
- package/src/icons-s2.js.map +7 -0
- package/stories/icon-manifest.js +98 -0
- package/stories/icon-manifest.js.map +2 -2
package/bin/build.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
|
1
2
|
/*
|
|
2
3
|
Copyright 2020 Adobe. All rights reserved.
|
|
3
4
|
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -22,9 +23,6 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
|
22
23
|
|
|
23
24
|
const rootDir = path.join(__dirname, '../../../');
|
|
24
25
|
|
|
25
|
-
const iconsPath = process.argv.slice(2)[0];
|
|
26
|
-
const keepColors = process.argv.slice(2)[1];
|
|
27
|
-
|
|
28
26
|
const disclaimer = `
|
|
29
27
|
/*
|
|
30
28
|
Copyright 2020 Adobe. All rights reserved.
|
|
@@ -38,7 +36,9 @@ OF ANY KIND, either express or implied. See the License for the specific languag
|
|
|
38
36
|
governing permissions and limitations under the License.
|
|
39
37
|
*/`;
|
|
40
38
|
|
|
41
|
-
const
|
|
39
|
+
const S1IConsPackageDir = '@spectrum-css/ui-icons/dist/medium';
|
|
40
|
+
const S2IConsPackageDir = '@spectrum-css/ui-icons-s2/dist/medium';
|
|
41
|
+
const keepColors = '';
|
|
42
42
|
|
|
43
43
|
if (!fs.existsSync(`${rootDir}packages/icons-ui/src`)) {
|
|
44
44
|
fs.mkdirSync(`${rootDir}packages/icons-ui/src`);
|
|
@@ -46,6 +46,9 @@ if (!fs.existsSync(`${rootDir}packages/icons-ui/src`)) {
|
|
|
46
46
|
if (!fs.existsSync(`${rootDir}packages/icons-ui/src/icons`)) {
|
|
47
47
|
fs.mkdirSync(`${rootDir}packages/icons-ui/src/icons`);
|
|
48
48
|
}
|
|
49
|
+
if (!fs.existsSync(`${rootDir}packages/icons-ui/src/icons-s2`)) {
|
|
50
|
+
fs.mkdirSync(`${rootDir}packages/icons-ui/src/icons-s2`);
|
|
51
|
+
}
|
|
49
52
|
if (!fs.existsSync(`${rootDir}packages/icons-ui/src/elements`)) {
|
|
50
53
|
fs.mkdirSync(`${rootDir}packages/icons-ui/src/elements`);
|
|
51
54
|
}
|
|
@@ -57,6 +60,11 @@ fs.writeFileSync(
|
|
|
57
60
|
disclaimer,
|
|
58
61
|
'utf-8'
|
|
59
62
|
);
|
|
63
|
+
fs.writeFileSync(
|
|
64
|
+
path.join(rootDir, 'packages', 'icons-ui', 'src', 'icons-s2.ts'),
|
|
65
|
+
disclaimer,
|
|
66
|
+
'utf-8'
|
|
67
|
+
);
|
|
60
68
|
const manifestPath = path.join(
|
|
61
69
|
rootDir,
|
|
62
70
|
'packages',
|
|
@@ -71,211 +79,334 @@ let manifestImports = `import {
|
|
|
71
79
|
} from '@spectrum-web-components/base';\r\n`;
|
|
72
80
|
let manifestListings = `\r\nexport const iconManifest = [\r\n`;
|
|
73
81
|
|
|
74
|
-
|
|
75
|
-
const svg = fs.readFileSync(i, 'utf-8');
|
|
76
|
-
let id = path.basename(i, '.svg').replace('S_', '').replace('_22_N', '');
|
|
77
|
-
if (id.search(/^Ad[A-Z]/) !== -1) {
|
|
78
|
-
id = id.replace(/^Ad/, '');
|
|
79
|
-
id += 'Advert';
|
|
80
|
-
}
|
|
81
|
-
const ComponentName = id === 'github' ? 'GitHub' : Case.pascal(id);
|
|
82
|
-
const $ = load(svg, {
|
|
83
|
-
xmlMode: true,
|
|
84
|
-
});
|
|
85
|
-
const title = Case.capital(id);
|
|
86
|
-
const fileName = `${id}.ts`;
|
|
87
|
-
const location = path.join(
|
|
88
|
-
rootDir,
|
|
89
|
-
'packages/icons-ui/src/icons',
|
|
90
|
-
fileName
|
|
91
|
-
);
|
|
92
|
-
|
|
93
|
-
if (!Number.isNaN(Number(ComponentName[0]))) {
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
82
|
+
const defaultIconImport = `import { DefaultIcon as AlternateIcon } from '../DefaultIcon.js';\r\n`;
|
|
96
83
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
84
|
+
async function buildIcons(icons, tag, iconsNameList) {
|
|
85
|
+
icons.forEach((i) => {
|
|
86
|
+
const svg = fs.readFileSync(i, 'utf-8');
|
|
87
|
+
let id = path
|
|
88
|
+
.basename(i, '.svg')
|
|
89
|
+
.replace('S2_Icon_', '')
|
|
90
|
+
.replace('_20_N', '')
|
|
91
|
+
.replace('_22x20_N', '');
|
|
92
|
+
if (id.search(/^Ad[A-Z]/) !== -1) {
|
|
93
|
+
id = id.replace(/^Ad/, '');
|
|
94
|
+
id += 'Advert';
|
|
108
95
|
}
|
|
109
|
-
|
|
110
|
-
|
|
96
|
+
|
|
97
|
+
if (id === 'UnLink') {
|
|
98
|
+
id = 'Unlink';
|
|
111
99
|
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
100
|
+
if (id === 'TextStrikeThrough') {
|
|
101
|
+
id = 'TextStrikethrough';
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
let ComponentName = id === 'github' ? 'GitHub' : Case.pascal(id);
|
|
105
|
+
|
|
106
|
+
if (ComponentName === 'TextStrikeThrough') {
|
|
107
|
+
ComponentName = 'TextStrikethrough';
|
|
108
|
+
}
|
|
109
|
+
if (ComponentName === 'UnLink') {
|
|
110
|
+
ComponentName = 'Unlink';
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
const $ = load(svg, {
|
|
114
|
+
xmlMode: true,
|
|
115
|
+
});
|
|
116
|
+
const title = Case.capital(id);
|
|
117
|
+
const fileName = `${id}.ts`;
|
|
118
|
+
const location = path.join(
|
|
119
|
+
rootDir,
|
|
120
|
+
'packages/icons-ui/src',
|
|
121
|
+
tag,
|
|
122
|
+
fileName
|
|
123
|
+
);
|
|
124
|
+
|
|
125
|
+
if (!Number.isNaN(Number(ComponentName[0]))) {
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
$('*').each((index, el) => {
|
|
130
|
+
if (el.name === 'svg') {
|
|
131
|
+
$(el).attr('aria-hidden', '...');
|
|
132
|
+
$(el).attr('role', 'img');
|
|
133
|
+
if (keepColors !== 'keep') {
|
|
134
|
+
$(el).attr('fill', 'currentColor');
|
|
135
|
+
}
|
|
136
|
+
$(el).attr('aria-label', '...');
|
|
137
|
+
$(el).removeAttr('id');
|
|
138
|
+
$(el).attr('width', '...');
|
|
139
|
+
$(el).attr('height', '...');
|
|
118
140
|
}
|
|
119
|
-
if (
|
|
120
|
-
$(el).
|
|
141
|
+
if (el.name === 'defs') {
|
|
142
|
+
$(el).remove();
|
|
121
143
|
}
|
|
144
|
+
Object.keys(el.attribs).forEach((x) => {
|
|
145
|
+
if (x === 'class') {
|
|
146
|
+
$(el).removeAttr(x);
|
|
147
|
+
}
|
|
148
|
+
if (keepColors !== 'keep' && x === 'stroke') {
|
|
149
|
+
$(el).attr(x, 'currentColor');
|
|
150
|
+
}
|
|
151
|
+
if (keepColors !== 'keep' && x === 'fill') {
|
|
152
|
+
$(el).attr(x, 'currentColor');
|
|
153
|
+
}
|
|
154
|
+
});
|
|
122
155
|
});
|
|
156
|
+
|
|
157
|
+
const iconLiteral = `
|
|
158
|
+
${disclaimer}
|
|
159
|
+
|
|
160
|
+
import {tag as html, TemplateResult} from '../custom-tag.js';
|
|
161
|
+
|
|
162
|
+
export {setCustomTemplateLiteralTag} from '../custom-tag.js';
|
|
163
|
+
export const ${ComponentName}Icon = ({
|
|
164
|
+
width = 24,
|
|
165
|
+
height = 24,
|
|
166
|
+
hidden = false,
|
|
167
|
+
title = '${title}',
|
|
168
|
+
} = {},): string | TemplateResult => {
|
|
169
|
+
return html\`${$('svg')
|
|
170
|
+
.toString()
|
|
171
|
+
.replace(
|
|
172
|
+
'aria-hidden="..."',
|
|
173
|
+
"aria-hidden=${hidden ? 'true' : 'false'}"
|
|
174
|
+
)
|
|
175
|
+
.replace('width="..."', 'width="${width}"')
|
|
176
|
+
.replace('height="..."', 'height="${height}"')
|
|
177
|
+
.replace('aria-label="..."', 'aria-label="${title}"')}\`;
|
|
178
|
+
}
|
|
179
|
+
`;
|
|
180
|
+
|
|
181
|
+
prettier
|
|
182
|
+
.format(iconLiteral, {
|
|
183
|
+
printWidth: 100,
|
|
184
|
+
tabWidth: 2,
|
|
185
|
+
useTabs: false,
|
|
186
|
+
semi: true,
|
|
187
|
+
singleQuote: true,
|
|
188
|
+
trailingComma: 'all',
|
|
189
|
+
bracketSpacing: true,
|
|
190
|
+
jsxBracketSameLine: false,
|
|
191
|
+
arrowParens: 'avoid',
|
|
192
|
+
parser: 'typescript',
|
|
193
|
+
})
|
|
194
|
+
.then((icon) => {
|
|
195
|
+
fs.writeFileSync(location, icon, 'utf-8');
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
const exportString = `export {${ComponentName}Icon} from './${tag}/${id}.js';\r\n`;
|
|
199
|
+
fs.appendFileSync(
|
|
200
|
+
path.join(rootDir, 'packages', 'icons-ui', 'src', tag + '.ts'),
|
|
201
|
+
exportString,
|
|
202
|
+
'utf-8'
|
|
203
|
+
);
|
|
204
|
+
|
|
205
|
+
const iconElementName = `sp-icon-${Case.kebab(ComponentName)}`;
|
|
206
|
+
|
|
207
|
+
const currenVersionIconImport = `import { ${ComponentName}Icon as CurrentIcon } from '../${tag}/${id}.js';\r\n`;
|
|
208
|
+
|
|
209
|
+
// check if the icon is present in the other version
|
|
210
|
+
let otherVersionIconImport = defaultIconImport;
|
|
211
|
+
|
|
212
|
+
if (iconsNameList.includes(ComponentName)) {
|
|
213
|
+
const alternateTag = tag === 'icons' ? 'icons-s2' : 'icons';
|
|
214
|
+
otherVersionIconImport = `import { ${ComponentName}Icon as AlternateIcon } from '../${alternateTag}/${id}.js';\r\n`;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
const spectrumVersion = tag === 'icons' ? 1 : 2;
|
|
218
|
+
|
|
219
|
+
const iconElement = `
|
|
220
|
+
${disclaimer}
|
|
221
|
+
|
|
222
|
+
import {
|
|
223
|
+
html,
|
|
224
|
+
TemplateResult
|
|
225
|
+
} from '@spectrum-web-components/base';
|
|
226
|
+
import {
|
|
227
|
+
IconBase
|
|
228
|
+
} from '@spectrum-web-components/icon';
|
|
229
|
+
import {
|
|
230
|
+
setCustomTemplateLiteralTag
|
|
231
|
+
} from '../custom-tag.js';
|
|
232
|
+
|
|
233
|
+
${currenVersionIconImport}
|
|
234
|
+
${otherVersionIconImport}
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* @element ${iconElementName}
|
|
238
|
+
*/
|
|
239
|
+
export class Icon${ComponentName} extends IconBase {
|
|
240
|
+
protected override render(): TemplateResult {
|
|
241
|
+
setCustomTemplateLiteralTag(html);
|
|
242
|
+
|
|
243
|
+
if(this.spectrumVersion === ${spectrumVersion}){
|
|
244
|
+
return CurrentIcon({ hidden: !this.label, title: this.label }) as TemplateResult;
|
|
245
|
+
}
|
|
246
|
+
return AlternateIcon({ hidden: !this.label, title: this.label }) as TemplateResult;
|
|
247
|
+
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
`;
|
|
251
|
+
|
|
252
|
+
prettier
|
|
253
|
+
.format(iconElement, {
|
|
254
|
+
printWidth: 100,
|
|
255
|
+
tabWidth: 2,
|
|
256
|
+
useTabs: false,
|
|
257
|
+
semi: true,
|
|
258
|
+
singleQuote: true,
|
|
259
|
+
trailingComma: 'all',
|
|
260
|
+
bracketSpacing: true,
|
|
261
|
+
jsxBracketSameLine: false,
|
|
262
|
+
arrowParens: 'avoid',
|
|
263
|
+
parser: 'typescript',
|
|
264
|
+
})
|
|
265
|
+
.then((iconElementFile) => {
|
|
266
|
+
fs.writeFileSync(
|
|
267
|
+
path.join(
|
|
268
|
+
rootDir,
|
|
269
|
+
'packages',
|
|
270
|
+
'icons-ui',
|
|
271
|
+
'src',
|
|
272
|
+
'elements',
|
|
273
|
+
`Icon${id}.ts`
|
|
274
|
+
),
|
|
275
|
+
iconElementFile,
|
|
276
|
+
'utf-8'
|
|
277
|
+
);
|
|
278
|
+
});
|
|
279
|
+
|
|
280
|
+
const iconRegistration = `
|
|
281
|
+
${disclaimer}
|
|
282
|
+
|
|
283
|
+
import { Icon${ComponentName} } from '../src/elements/Icon${id}.js';
|
|
284
|
+
import { defineElement } from '@spectrum-web-components/base/src/define-element.js';
|
|
285
|
+
|
|
286
|
+
defineElement('${iconElementName}', Icon${ComponentName});
|
|
287
|
+
|
|
288
|
+
declare global {
|
|
289
|
+
interface HTMLElementTagNameMap {
|
|
290
|
+
'${iconElementName}': Icon${ComponentName};
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
`;
|
|
294
|
+
|
|
295
|
+
prettier
|
|
296
|
+
.format(iconRegistration, {
|
|
297
|
+
printWidth: 100,
|
|
298
|
+
tabWidth: 2,
|
|
299
|
+
useTabs: false,
|
|
300
|
+
semi: true,
|
|
301
|
+
singleQuote: true,
|
|
302
|
+
trailingComma: 'all',
|
|
303
|
+
bracketSpacing: true,
|
|
304
|
+
jsxBracketSameLine: false,
|
|
305
|
+
arrowParens: 'avoid',
|
|
306
|
+
parser: 'typescript',
|
|
307
|
+
})
|
|
308
|
+
.then((iconRegistrationFile) => {
|
|
309
|
+
fs.writeFileSync(
|
|
310
|
+
path.join(
|
|
311
|
+
rootDir,
|
|
312
|
+
'packages',
|
|
313
|
+
'icons-ui',
|
|
314
|
+
'icons',
|
|
315
|
+
`${iconElementName}.ts`
|
|
316
|
+
),
|
|
317
|
+
iconRegistrationFile,
|
|
318
|
+
'utf-8'
|
|
319
|
+
);
|
|
320
|
+
});
|
|
321
|
+
|
|
322
|
+
const importStatement = `\r\nimport '@spectrum-web-components/icons-ui/icons/${iconElementName}.js';`;
|
|
323
|
+
const metadata = `{name: '${Case.sentence(
|
|
324
|
+
ComponentName
|
|
325
|
+
)}', tag: '<${iconElementName}>', story: (size: string): TemplateResult => html\`<${iconElementName} size=\$\{size\}></${iconElementName}>\`},\r\n`;
|
|
326
|
+
manifestImports += importStatement;
|
|
327
|
+
manifestListings += metadata;
|
|
123
328
|
});
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
const iconsV1 = (
|
|
332
|
+
await fg(`${rootDir}/node_modules/${S1IConsPackageDir}/**.svg`)
|
|
333
|
+
).sort();
|
|
334
|
+
|
|
335
|
+
const iconsV2 = (
|
|
336
|
+
await fg(`${rootDir}/node_modules/${S2IConsPackageDir}/**.svg`)
|
|
337
|
+
).sort();
|
|
124
338
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
} = {},): string | TemplateResult => {
|
|
136
|
-
return html\`${$('svg')
|
|
137
|
-
.toString()
|
|
138
|
-
.replace('width="..."', 'width=${width}')
|
|
139
|
-
.replace('height="..."', 'height=${height}')
|
|
140
|
-
.replace('aria-label="..."', 'aria-label=${title}')}\`;
|
|
339
|
+
const iconsV1NameList = iconsV1.map((i) => {
|
|
340
|
+
let id = path
|
|
341
|
+
.basename(i, '.svg')
|
|
342
|
+
.replace('S2_Icon_', '')
|
|
343
|
+
.replace('_20_N', '')
|
|
344
|
+
.replace('_22x20_N', '');
|
|
345
|
+
|
|
346
|
+
if (id.search(/^Ad[A-Z]/) !== -1) {
|
|
347
|
+
id = id.replace(/^Ad/, '');
|
|
348
|
+
id += 'Advert';
|
|
141
349
|
}
|
|
142
|
-
`;
|
|
143
|
-
|
|
144
|
-
prettier
|
|
145
|
-
.format(iconLiteral, {
|
|
146
|
-
printWidth: 100,
|
|
147
|
-
tabWidth: 2,
|
|
148
|
-
useTabs: false,
|
|
149
|
-
semi: true,
|
|
150
|
-
singleQuote: true,
|
|
151
|
-
trailingComma: 'all',
|
|
152
|
-
bracketSpacing: true,
|
|
153
|
-
jsxBracketSameLine: false,
|
|
154
|
-
arrowParens: 'avoid',
|
|
155
|
-
parser: 'typescript',
|
|
156
|
-
})
|
|
157
|
-
.then((icon) => {
|
|
158
|
-
fs.writeFileSync(location, icon, 'utf-8');
|
|
159
|
-
});
|
|
160
350
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
'
|
|
166
|
-
);
|
|
167
|
-
|
|
168
|
-
const iconElementName = `sp-icon-${Case.kebab(ComponentName)}`;
|
|
169
|
-
const iconElement = `
|
|
170
|
-
${disclaimer}
|
|
171
|
-
|
|
172
|
-
import {
|
|
173
|
-
html,
|
|
174
|
-
TemplateResult
|
|
175
|
-
} from '@spectrum-web-components/base';
|
|
176
|
-
import {
|
|
177
|
-
IconBase
|
|
178
|
-
} from '@spectrum-web-components/icon';
|
|
179
|
-
|
|
180
|
-
import {
|
|
181
|
-
${ComponentName}Icon
|
|
182
|
-
} from '../icons/${id}.js';
|
|
183
|
-
import {
|
|
184
|
-
setCustomTemplateLiteralTag
|
|
185
|
-
} from '../custom-tag.js';
|
|
186
|
-
|
|
187
|
-
/**
|
|
188
|
-
* @element ${iconElementName}
|
|
189
|
-
*/
|
|
190
|
-
export class Icon${ComponentName} extends IconBase {
|
|
191
|
-
protected override render(): TemplateResult {
|
|
192
|
-
setCustomTemplateLiteralTag(html);
|
|
193
|
-
return ${ComponentName}Icon() as TemplateResult;
|
|
194
|
-
}
|
|
351
|
+
if (id === 'UnLink') {
|
|
352
|
+
id = 'Unlink';
|
|
353
|
+
}
|
|
354
|
+
if (id === 'TextStrikeThrough') {
|
|
355
|
+
id = 'TextStrikethrough';
|
|
195
356
|
}
|
|
196
|
-
`;
|
|
197
|
-
prettier
|
|
198
|
-
.format(iconElement, {
|
|
199
|
-
printWidth: 100,
|
|
200
|
-
tabWidth: 2,
|
|
201
|
-
useTabs: false,
|
|
202
|
-
semi: true,
|
|
203
|
-
singleQuote: true,
|
|
204
|
-
trailingComma: 'all',
|
|
205
|
-
bracketSpacing: true,
|
|
206
|
-
jsxBracketSameLine: false,
|
|
207
|
-
arrowParens: 'avoid',
|
|
208
|
-
parser: 'typescript',
|
|
209
|
-
})
|
|
210
|
-
.then((iconElementFile) => {
|
|
211
|
-
fs.writeFileSync(
|
|
212
|
-
path.join(
|
|
213
|
-
rootDir,
|
|
214
|
-
'packages',
|
|
215
|
-
'icons-ui',
|
|
216
|
-
'src',
|
|
217
|
-
'elements',
|
|
218
|
-
`Icon${id}.ts`
|
|
219
|
-
),
|
|
220
|
-
iconElementFile,
|
|
221
|
-
'utf-8'
|
|
222
|
-
);
|
|
223
|
-
});
|
|
224
357
|
|
|
225
|
-
|
|
226
|
-
${disclaimer}
|
|
358
|
+
let ComponentName = id === 'github' ? 'GitHub' : Case.pascal(id);
|
|
227
359
|
|
|
228
|
-
|
|
229
|
-
|
|
360
|
+
if (ComponentName === 'TextStrikeThrough') {
|
|
361
|
+
ComponentName = 'TextStrikethrough';
|
|
362
|
+
}
|
|
363
|
+
if (ComponentName === 'UnLink') {
|
|
364
|
+
ComponentName = 'Unlink';
|
|
365
|
+
}
|
|
230
366
|
|
|
231
|
-
|
|
367
|
+
return ComponentName;
|
|
368
|
+
});
|
|
369
|
+
const iconsV2NameList = iconsV2.map((i) => {
|
|
370
|
+
let id = path
|
|
371
|
+
.basename(i, '.svg')
|
|
372
|
+
.replace('S2_Icon_', '')
|
|
373
|
+
.replace('_20_N', '')
|
|
374
|
+
.replace('_22x20_N', '');
|
|
232
375
|
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
}
|
|
376
|
+
if (id.search(/^Ad[A-Z]/) !== -1) {
|
|
377
|
+
id = id.replace(/^Ad/, '');
|
|
378
|
+
id += 'Advert';
|
|
237
379
|
}
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
'packages',
|
|
257
|
-
'icons-ui',
|
|
258
|
-
'icons',
|
|
259
|
-
`${iconElementName}.ts`
|
|
260
|
-
),
|
|
261
|
-
iconRegistrationFile,
|
|
262
|
-
'utf-8'
|
|
263
|
-
);
|
|
264
|
-
});
|
|
265
|
-
const importStatement = `\r\nimport '@spectrum-web-components/icons-ui/icons/${iconElementName}.js';`;
|
|
266
|
-
const metadata = `{name: '${Case.sentence(
|
|
267
|
-
ComponentName
|
|
268
|
-
)}', tag: '<${iconElementName}>', story: (size: string): TemplateResult => html\`<${iconElementName} size=\$\{size\}></${iconElementName}>\`},\r\n`;
|
|
269
|
-
manifestImports += importStatement;
|
|
270
|
-
manifestListings += metadata;
|
|
380
|
+
|
|
381
|
+
if (id === 'UnLink') {
|
|
382
|
+
id = 'Unlink';
|
|
383
|
+
}
|
|
384
|
+
if (id === 'TextStrikeThrough') {
|
|
385
|
+
id = 'TextStrikethrough';
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
let ComponentName = id === 'github' ? 'GitHub' : Case.pascal(id);
|
|
389
|
+
|
|
390
|
+
if (ComponentName === 'TextStrikeThrough') {
|
|
391
|
+
ComponentName = 'TextStrikethrough';
|
|
392
|
+
}
|
|
393
|
+
if (ComponentName === 'UnLink') {
|
|
394
|
+
ComponentName = 'Unlink';
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
return ComponentName;
|
|
271
398
|
});
|
|
272
399
|
|
|
400
|
+
await buildIcons(iconsV1, 'icons', iconsV2NameList);
|
|
401
|
+
await buildIcons(iconsV2, 'icons-s2', iconsV1NameList);
|
|
402
|
+
|
|
273
403
|
const exportString = `\r\nexport { setCustomTemplateLiteralTag } from './custom-tag.js';\r\n`;
|
|
274
404
|
fs.appendFileSync(
|
|
275
405
|
path.join(rootDir, 'packages', 'icons-ui', 'src', 'icons.ts'),
|
|
276
406
|
exportString,
|
|
277
407
|
'utf-8'
|
|
278
408
|
);
|
|
409
|
+
|
|
279
410
|
fs.appendFileSync(
|
|
280
411
|
manifestPath,
|
|
281
412
|
`${manifestImports}${manifestListings}];\r\n`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spectrum-web-components/icons-ui",
|
|
3
|
-
"version": "0.50.0-beta.
|
|
3
|
+
"version": "0.50.0-beta.10",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"./package.json": "./package.json"
|
|
27
27
|
},
|
|
28
28
|
"scripts": {
|
|
29
|
-
"build": "node ./bin/build
|
|
29
|
+
"build": "node ./bin/build.js"
|
|
30
30
|
},
|
|
31
31
|
"files": [
|
|
32
32
|
"**/*.d.ts",
|
|
@@ -44,12 +44,13 @@
|
|
|
44
44
|
"lit-html"
|
|
45
45
|
],
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@spectrum-web-components/base": "^0.50.0-beta.
|
|
48
|
-
"@spectrum-web-components/icon": "^0.50.0-beta.
|
|
49
|
-
"@spectrum-web-components/iconset": "^0.50.0-beta.
|
|
47
|
+
"@spectrum-web-components/base": "^0.50.0-beta.10",
|
|
48
|
+
"@spectrum-web-components/icon": "^0.50.0-beta.10",
|
|
49
|
+
"@spectrum-web-components/iconset": "^0.50.0-beta.10"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@spectrum-css/ui-icons": "^1.1.2",
|
|
53
|
+
"@spectrum-css/ui-icons-s2": "npm:@spectrum-css/ui-icons@^2.0.0-s2-foundations.10",
|
|
53
54
|
"case": "^1.6.1",
|
|
54
55
|
"cheerio": "^1.0.0-rc.2",
|
|
55
56
|
"fast-glob": "^3.2.12",
|
|
@@ -61,7 +62,8 @@
|
|
|
61
62
|
"customElements": "custom-elements.json",
|
|
62
63
|
"sideEffects": [
|
|
63
64
|
"./src/index.js",
|
|
64
|
-
"./icons/*"
|
|
65
|
+
"./icons/*",
|
|
66
|
+
"./icons-s2/*"
|
|
65
67
|
],
|
|
66
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "395073bbb2a7fc859d54f59cd0d93d80cc3c60a7"
|
|
67
69
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";import{html as e}from"@spectrum-web-components/base";import{IconBase as
|
|
1
|
+
"use strict";import{html as e}from"@spectrum-web-components/base";import{IconBase as t}from"@spectrum-web-components/icon";import{setCustomTemplateLiteralTag as r}from"../custom-tag.js";import{Arrow100Icon as o}from"../icons-s2/Arrow100.js";import{Arrow100Icon as l}from"../icons/Arrow100.js";export class IconArrow100 extends t{render(){return r(e),this.spectrumVersion===2?o({hidden:!this.label,title:this.label}):l({hidden:!this.label,title:this.label})}}
|
|
2
2
|
//# sourceMappingURL=IconArrow100.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["IconArrow100.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport { html, TemplateResult } from '@spectrum-web-components/base';\nimport { IconBase } from '@spectrum-web-components/icon';\n\nimport { Arrow100Icon } from '../icons/Arrow100.js';\nimport {
|
|
5
|
-
"mappings": "aAYA,OAAS,QAAAA,MAA4B,gCACrC,OAAS,YAAAC,MAAgB,
|
|
6
|
-
"names": ["html", "IconBase", "
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport { html, TemplateResult } from '@spectrum-web-components/base';\nimport { IconBase } from '@spectrum-web-components/icon';\nimport { setCustomTemplateLiteralTag } from '../custom-tag.js';\n\nimport { Arrow100Icon as CurrentIcon } from '../icons-s2/Arrow100.js';\n\nimport { Arrow100Icon as AlternateIcon } from '../icons/Arrow100.js';\n\n/**\n * @element sp-icon-arrow100\n */\nexport class IconArrow100 extends IconBase {\n protected override render(): TemplateResult {\n setCustomTemplateLiteralTag(html);\n\n if (this.spectrumVersion === 2) {\n return CurrentIcon({ hidden: !this.label, title: this.label }) as TemplateResult;\n }\n return AlternateIcon({ hidden: !this.label, title: this.label }) as TemplateResult;\n }\n}\n"],
|
|
5
|
+
"mappings": "aAYA,OAAS,QAAAA,MAA4B,gCACrC,OAAS,YAAAC,MAAgB,gCACzB,OAAS,+BAAAC,MAAmC,mBAE5C,OAAS,gBAAgBC,MAAmB,0BAE5C,OAAS,gBAAgBC,MAAqB,uBAKvC,aAAM,qBAAqBH,CAAS,CACtB,QAAyB,CAG1C,OAFAC,EAA4BF,CAAI,EAE5B,KAAK,kBAAoB,EACpBG,EAAY,CAAE,OAAQ,CAAC,KAAK,MAAO,MAAO,KAAK,KAAM,CAAC,EAExDC,EAAc,CAAE,OAAQ,CAAC,KAAK,MAAO,MAAO,KAAK,KAAM,CAAC,CACjE,CACF",
|
|
6
|
+
"names": ["html", "IconBase", "setCustomTemplateLiteralTag", "CurrentIcon", "AlternateIcon"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";import{html as e}from"@spectrum-web-components/base";import{IconBase as
|
|
1
|
+
"use strict";import{html as e}from"@spectrum-web-components/base";import{IconBase as t}from"@spectrum-web-components/icon";import{setCustomTemplateLiteralTag as r}from"../custom-tag.js";import{Arrow200Icon as o}from"../icons-s2/Arrow200.js";import{Arrow200Icon as l}from"../icons/Arrow200.js";export class IconArrow200 extends t{render(){return r(e),this.spectrumVersion===2?o({hidden:!this.label,title:this.label}):l({hidden:!this.label,title:this.label})}}
|
|
2
2
|
//# sourceMappingURL=IconArrow200.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["IconArrow200.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport { html, TemplateResult } from '@spectrum-web-components/base';\nimport { IconBase } from '@spectrum-web-components/icon';\n\nimport { Arrow200Icon } from '../icons/Arrow200.js';\nimport {
|
|
5
|
-
"mappings": "aAYA,OAAS,QAAAA,MAA4B,gCACrC,OAAS,YAAAC,MAAgB,
|
|
6
|
-
"names": ["html", "IconBase", "
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport { html, TemplateResult } from '@spectrum-web-components/base';\nimport { IconBase } from '@spectrum-web-components/icon';\nimport { setCustomTemplateLiteralTag } from '../custom-tag.js';\n\nimport { Arrow200Icon as CurrentIcon } from '../icons-s2/Arrow200.js';\n\nimport { Arrow200Icon as AlternateIcon } from '../icons/Arrow200.js';\n\n/**\n * @element sp-icon-arrow200\n */\nexport class IconArrow200 extends IconBase {\n protected override render(): TemplateResult {\n setCustomTemplateLiteralTag(html);\n\n if (this.spectrumVersion === 2) {\n return CurrentIcon({ hidden: !this.label, title: this.label }) as TemplateResult;\n }\n return AlternateIcon({ hidden: !this.label, title: this.label }) as TemplateResult;\n }\n}\n"],
|
|
5
|
+
"mappings": "aAYA,OAAS,QAAAA,MAA4B,gCACrC,OAAS,YAAAC,MAAgB,gCACzB,OAAS,+BAAAC,MAAmC,mBAE5C,OAAS,gBAAgBC,MAAmB,0BAE5C,OAAS,gBAAgBC,MAAqB,uBAKvC,aAAM,qBAAqBH,CAAS,CACtB,QAAyB,CAG1C,OAFAC,EAA4BF,CAAI,EAE5B,KAAK,kBAAoB,EACpBG,EAAY,CAAE,OAAQ,CAAC,KAAK,MAAO,MAAO,KAAK,KAAM,CAAC,EAExDC,EAAc,CAAE,OAAQ,CAAC,KAAK,MAAO,MAAO,KAAK,KAAM,CAAC,CACjE,CACF",
|
|
6
|
+
"names": ["html", "IconBase", "setCustomTemplateLiteralTag", "CurrentIcon", "AlternateIcon"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";import{html as e}from"@spectrum-web-components/base";import{IconBase as
|
|
1
|
+
"use strict";import{html as e}from"@spectrum-web-components/base";import{IconBase as t}from"@spectrum-web-components/icon";import{setCustomTemplateLiteralTag as r}from"../custom-tag.js";import{Arrow300Icon as o}from"../icons-s2/Arrow300.js";import{Arrow300Icon as l}from"../icons/Arrow300.js";export class IconArrow300 extends t{render(){return r(e),this.spectrumVersion===2?o({hidden:!this.label,title:this.label}):l({hidden:!this.label,title:this.label})}}
|
|
2
2
|
//# sourceMappingURL=IconArrow300.js.map
|